Double oscillator
- 4 state
- 1 control
- Lagrange cost
- fixed final time
- 1 control box
- 2 boundary
- OptimalControl valid
- OptimalControl, scalarized valid
- JuMP valid
- ModelingToolkit valid
The Double Oscillator problem is a benchmark in constrained optimal control illustrating the control of coupled mechanical systems with damping and stiffness effects. It consists of two masses connected by springs and a damper, with one mass directly influenced by an external periodic force and the other influenced indirectly through the coupling and a controlled damping term. Both the state trajectory
Mathematical formulation
The problem can be stated as
where
Qualitative behaviour
The system exhibits coupled oscillatory dynamics due to interaction between the two masses through springs and damper.
The control input modulates the damping of the second mass, affecting the amplitude and phase of oscillations.
The quadratic cost penalises both deviations of the masses and the control effort, balancing tracking and energy usage.
Optimal trajectories often exhibit bang–bang behaviour on
, consistent with theoretical results for mechanical oscillators under bounded control.
Characteristics
Coupled linear–nonlinear dynamics with external periodic forcing.
Control input enters through a damping term, introducing nonlinearity in the system response.
Widely used to benchmark numerical methods for constrained optimal control in mechanical systems.
Serves as a testbed for averaging methods and bang–bang control design.
References
Coudurier, C., Lepreux, O., & Petit, N. (2018). Optimal bang-bang control of a mechanical double oscillator using averaging methods. IFAC-PapersOnLine, 51(2), 49–54. Investigates bang-bang control strategies for the double oscillator system using averaging methods to analyse optimal trajectories.
Graichen, K., & Petit, N. (2009). Incorporating a class of constraints into the dynamics of optimal control problems. Optim. Control Appl. Methods, 30(5), 397–415. Explores methods for integrating constraints directly into the dynamics of optimal control problems, relevant to double oscillator systems with constrained damping.
Petit, N. (2018). MathMod 2018: Examples on coupled mechanical systems and damping control. PDF Provides practical examples on coupled mechanical systems, including double oscillators, focusing on damping control and optimal control formulation.
Parameters
| Parameter | Default value | Unit | Meaning |
|---|---|---|---|
t0 | 0 | s | initial time |
tf | 6.283185307179586 | s | final time, one period of the force F |
m1 | 100 | kg | mass of the first body, driven by the force F |
m2 | 2 | kg | mass of the second body, damped by the control |
c | 0.5 | N·s/m | damping coefficient of the second body |
k1 | 100 | N/m | stiffness of the spring between the first body and the frame |
k2 | 3 | N/m | stiffness of the spring between the two bodies |
u_l | -1 | – | lower bound of the control u |
u_u | 1 | – | upper bound of the control u |
x₁_t0 | 0 | m | initial position x₁ of the first body |
x₂_t0 | 0 | m | initial position x₂ of the second body |
Every modeling takes other values with the keyword parameters, merged with these: double_oscillator(backend; parameters=(t0=…,)).
Reference objective
The best objective among the solves that converged, in each modeling, on the default grid of the modeling: the modelings are independent, each has its own reference. See how the references are computed.
| Modeling | Scheme | Grid | Reference objective | Solves | Distinct solutions | Configurations agree |
|---|---|---|---|---|---|---|
| JuMP | :trapeze | 500 | 0.0009109230332 | 8 | 1 | yes, within 6.2e-12 |
| OptimalControl | :trapeze | 500 | 0.0009109230332 | 18 | 1 | yes, within 6.2e-12 |
| OptimalControl, scalarized | :trapeze | 500 | 0.0009109230332 | 3 | 1 | yes, within 0 |