Difference between revisions of "Double Tank"
ClemensZeile (Talk | contribs) (→Reference Solution) |
ClemensZeile (Talk | contribs) (→Reference Solution) |
||
Line 74: | Line 74: | ||
By introducing the lifts <math>l_i=\sqrt{x_i}</math>, algebraically constrained as <math>l_i^2=x_i, \; l_i\geq 0,</math> the problem is recast with polynomial data. In this way way switch in connection with GloptiPoly3 can be applied. GloptiPoly 3 is a Matlab package developed by Didier Henrion for generalized problems of moments and needs polynomial input data. The exact code used to solve the problem can be found under [[Double Tank Problem (switch)]]. The calculated objective is 4.7296 with the following trajectories of states and controls: | By introducing the lifts <math>l_i=\sqrt{x_i}</math>, algebraically constrained as <math>l_i^2=x_i, \; l_i\geq 0,</math> the problem is recast with polynomial data. In this way way switch in connection with GloptiPoly3 can be applied. GloptiPoly 3 is a Matlab package developed by Didier Henrion for generalized problems of moments and needs polynomial input data. The exact code used to solve the problem can be found under [[Double Tank Problem (switch)]]. The calculated objective is 4.7296 with the following trajectories of states and controls: | ||
<gallery caption="Reference solution plots" widths="180px" heights="140px" perrow="2"> | <gallery caption="Reference solution plots" widths="180px" heights="140px" perrow="2"> | ||
− | Image: | + | Image:State_sequence_Tank.jpg| State trajectory over time. |
Image:Control_sequence_Tank.jpg| Control sequence over time. | Image:Control_sequence_Tank.jpg| Control sequence over time. | ||
</gallery> | </gallery> | ||
− | |||
== Source Code == | == Source Code == |
Revision as of 19:15, 10 December 2015
Double Tank | |
---|---|
State dimension: | 1 |
Differential states: | 2 |
Continuous control functions: | 0 |
Discrete control functions: | 1 |
Interior point equalities: | 2 |
The double tank problem is a basic example for a switching system. It contains the dynamics of an upper and a lower tank, connected to each other with a pipe. The goal is to minimize the deviation of a certain fluid level in the lower tank. The problem was introduced and discussed in a variety of publications for the optimal control of constrained switched systems, e.g. Henrion et al. and Vasudevan et al.
Mathematical formulation
The two states of the system correspond to the fluid levels of an upper and a lower tank. The output of the upper tank flows into the lower tank, the output of the lower tank exits the system, and the flow into the upper tank is restricted to either [lt/s] or [lt/s]. The dynamics in each mode are then derived using Torricelli’s law, as shown in constraints 1 and 2. The objective of the optimization is to have the fluid level in the lower tank equal to [m], as reflected in the cost function.
Parameters
In an exemplary test, the parameters were chosen to be:
Symbol | Initial value () |
Symbol | Value |
Reference Solution
The problem was solved in Matlab (version 2014b) with Switch. The switch codes rely on GloptiPoly 3 and the solver SeDuMi 1.3 (optimization over symmetric cones). By introducing the lifts , algebraically constrained as the problem is recast with polynomial data. In this way way switch in connection with GloptiPoly3 can be applied. GloptiPoly 3 is a Matlab package developed by Didier Henrion for generalized problems of moments and needs polynomial input data. The exact code used to solve the problem can be found under Double Tank Problem (switch). The calculated objective is 4.7296 with the following trajectories of states and controls:
Source Code
Model descriptions are available in
References
CLAEYS, Mathieu; DAAFOUZ Jamal; HENRION Didier Modal occupation measures and LMI relaxations for nonlinear switched systems control. arXiv preprint arXiv:1404.4699 (2014)
VASUDEVAN, Ramanarayan, et al. Consistent Approximations for the Optimal Control of Constrained Switched Systems---Part 2: An Implementable Algorithm. SIAM Journal on Control and Optimization, 2013, 51. Jg., Nr. 6, S. 4484-4503.