In the modern world, where efficiency, stability, and precision play a crucial role, the development and application of optimal control strategies in oscillatory systems hold significant importance. The issues related to the numerical solution of control problems associated with damping oscillatory systems consisting of two objects are considered. To numerically solve the discussed problem, the gradient projection method, based on the formula for the first variation of the functional, and the method of successive approximations, associated with the linearity of boundary problems describing oscillatory processes, are applied. The oscillations of one object are described by a wave equation with first-order boundary conditions, while a second-order ordinary differential equation models the oscillations of the other object. Furthermore, the original and the adjoint boundary value problems are solved using direct methods at each iteration step. An algorithm for the numerical solution of the problem is proposed, and based on this algorithm, a software code for implementation is developed. The numerical results obtained in the study demonstrate that there is convergence in terms of functionality, and the approximately optimal controls found in this process are minimizing sequences in the control space. The mechanism of controlling and regulating the operation of the system according to its input constraints is provided by observed feedback, allowing systems with limited excitation to maintain stability and optimal functioning in conditions of changing external or internal circumstances. The obtained results can also be used to forecast the system's behavior in the future, resource planning, prevention of emergencies, or optimization of production processes