Difference between revisions of "Cushioned Oscillation"
(→Model formulation) |
|||
Line 64: | Line 64: | ||
− | The following parameters were used, to create the reference solution below, with an almost optimal final time <math> t_f = | + | The following parameters were used, to create the reference solution below, with an almost optimal final time <math> t_f = 8.98 s</math>: |
− | <math> m= | + | <math> m=5, </math> |
<math> c=10, </math> | <math> c=10, </math> | ||
Line 79: | Line 79: | ||
<gallery caption="Reference solution plots" widths="180px" heights="140px" perrow="1"> | <gallery caption="Reference solution plots" widths="180px" heights="140px" perrow="1"> | ||
− | Image: | + | Image:Ref_sol_plot_cushioned_oscillation_m5.png| States and Controls |
</gallery> | </gallery> | ||
− | The OCP was solved within MATLAB R2015b, using the TOMLAB Optimization Package. PROPT reformulates such problems with the direct collocation | + | 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). |
Revision as of 11:04, 18 January 2016
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 no velocity.
Contents
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 (OCP) 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 :
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
The MATLAB script can be found in: Cushioned Oscillation (PROPT)