Cushioned Oscillation: Difference between revisions
FelixMueller (talk | contribs) |
RobertLampel (talk | contribs) |
||
| (6 intermediate revisions by 2 users not shown) | |||
| Line 3: | Line 3: | ||
|nx = 2 | |nx = 2 | ||
|nu = 1 | |nu = 1 | ||
|nc = 2 | |||
|nre = 4 | |nre = 4 | ||
}}The Cushioned Oscillation is a simplified model of time optimal "stopping" of an oscillating object attached to a spring by applying a control and moving it back into the relaxed position and zero velocity. | }}The Cushioned Oscillation is a simplified model of time optimal "stopping" of an oscillating object attached to a spring by applying a control and moving it back into the relaxed position and zero velocity. | ||
| Line 24: | Line 25: | ||
The goal is to reset position and velocity of the object as fast as possible, meaning: | The goal is to reset position and velocity of the object as fast as possible, meaning: | ||
<math>(x( | <math>(x(t\mathrm{f}),v(t_\mathrm{f})) = (0,0)</math>, | ||
with the objective function: | with the objective function: | ||
<math>\min\limits_{ | <math>\min\limits_{t_\mathrm{f}} t_\mathrm{f}</math> | ||
== Optimal Control Problem Formulation == | == Optimal Control Problem Formulation == | ||
| Line 34: | Line 35: | ||
The above results in the following OCP | The above results in the following OCP | ||
<math> | <math> \begin{array}{llll} | ||
\min\limits_{x,v,u,t_\mathrm{f}} & t_\mathrm{f} & & \\ | |||
& \dot | s.t. & \dot x & = v,\\ | ||
\\ | |||
& x(0) & = | & \dot v & = \frac{1}{m}(u - c \cdot x),\\ | ||
& v(0) & = | \\ | ||
& x( | & x(0) & = x_0,\\ | ||
& v( | & v(0) & = v_0,\\ | ||
& |u| & \le u_{mm}.\\ | & x(t_\mathrm{f}) & = 0,\\ | ||
& v(t_\mathrm{f}) & = 0,\\ | |||
& |u| & \le u_\mathrm{mm}.\\ | |||
\end{array}</math> | \end{array}</math> | ||
| Line 51: | Line 53: | ||
== Parameters and Reference Solution == | == Parameters and Reference Solution == | ||
The following parameters were used, to create the reference solution below, with an almost optimal final time <math> | The following parameters were used, to create the reference solution below, with an almost optimal final time <math> t_\mathrm{f} = 8.98 s</math>: | ||
<math> m=5, </math> | <math> m=5, </math> | ||
| Line 57: | Line 59: | ||
<math> x_0=2, </math> | <math> x_0=2, </math> | ||
<math> v_0=5, </math> | <math> v_0=5, </math> | ||
<math> u_{mm}=5.</math> | <math> u_\mathrm{mm}=5.</math> | ||
== Reference Solution == | == Reference Solution == | ||
| Line 74: | Line 76: | ||
[[Category:MIOCP]] | [[Category:MIOCP]] | ||
[[Category:Bang bang]] | |||
[[Category:ODE model]] | |||
[[Category: Minimum time]] | [[Category: Minimum time]] | ||
Latest revision as of 13:26, 19 February 2026
| Cushioned Oscillation | |
|---|---|
| State dimension: | 1 |
| Differential states: | 2 |
| Continuous control functions: | 1 |
| Path constraints: | 2 |
| Interior point equalities: | 4 |
The Cushioned Oscillation is a simplified model of time optimal "stopping" of an oscillating object attached to a spring by applying a control and moving it back into the relaxed position and zero velocity.
Model formulation
An object with mass is attached to a spring with stiffness constant .
If the resetting spring force is proportional to the deviation , an oscillation, induced by an external force , satisfies:
(which is equivalent to )
where denotes the deviation to the relaxed position and the velocity of the oscillating object.
Through external force, the object has been put into an initial state :
The goal is to reset position and velocity of the object as fast as possible, meaning:
,
with the objective function:
Optimal Control Problem Formulation
The above results in the following OCP
Parameters and Reference Solution
The following parameters were used, to create the reference solution below, with an almost optimal final time :
Reference Solution
- Reference solution plots
-
States and Controls
The OCP was solved within MATLAB R2015b, using the TOMLAB Optimization Package. PROPT reformulates such problems with the direct collocation approach (n=80 collocation points) and automatically finds a suiting solver included in the TOMLAB Optimization Package (in this case, SNOPT was used).
Source Code
- A MATLAB script using PROPT can be found in: Cushioned Oscillation (PROPT)