Cart Pendulum: Difference between revisions
RobertLampel (talk | contribs) |
RobertLampel (talk | contribs) No edit summary |
||
| Line 7: | Line 7: | ||
The '''Cart Pendulum problem''' concerns a pendulum hinged to a mobile cart. The control objective is to transition the pendulum from a downward position to a stabilized, inverted state above the cart. In this formulation, the objective function is defined by a composite of least-squares terms that penalize the required horizontal motion, the distance of the pendulum's angle from the upward position, and the required control. | The '''Cart Pendulum problem''' concerns a pendulum hinged to a mobile cart. The control objective is to transition the pendulum from a downward position to a stabilized, inverted state above the cart. In this formulation, the objective function is defined by a composite of least-squares terms that penalize the required horizontal motion, the distance of the pendulum's angle from the upward position, and the required control. | ||
The implementation here is | The implementation here is adapted from [[#openmdao | [1]]] and [[#OCPjl | [2]]]. | ||
Its dynamics are given by a four-dimensional [[:Category:ODE model|ODE model]]. | Its dynamics are given by a four-dimensional [[:Category:ODE model|ODE model]]. | ||
Revision as of 08:56, 3 February 2026
| Cart Pendulum | |
|---|---|
| State dimension: | 1 |
| Differential states: | 3 |
| Discrete control functions: | 2 |
The Cart Pendulum problem concerns a pendulum hinged to a mobile cart. The control objective is to transition the pendulum from a downward position to a stabilized, inverted state above the cart. In this formulation, the objective function is defined by a composite of least-squares terms that penalize the required horizontal motion, the distance of the pendulum's angle from the upward position, and the required control.
The implementation here is adapted from [1] and [2]. Its dynamics are given by a four-dimensional ODE model.
Mathematical formulation
Parameters
These fixed values are used within the model:
| Symbol | Value | Description |
|---|---|---|
| 10 | Objective coefficient for | |
| 50 | Objective coefficient for | |
| 0.5 | Objective coefficient for | |
| 4 | Horizon of the control problem | |
| 1 | Weight of the cart | |
| 0.1 | Weight of the pendulum | |
| 9.81 | Gravitational acceleration |
Reference Solutions
Here is one local solution to the above control problem.
- Reference solution plots
-
States and discretized control for a local optimum.
Miscellaneous and Further Reading
This formulation and a detailed description can be found in [1].
References
[1] Multidisciplinary Optimal Control Library: https://openmdao.org/dymos/docs/latest/examples/cart_pole/cart_pole.html
[2] OptimalControlProblems.jl: https://github.com/control-toolbox/OptimalControlProblems.jl/blob/main/ext/Descriptions/moonlander.md