Difference between revisions of "F-8 aircraft"

From mintOC
Jump to: navigation, search
m (formatted table)
 
(27 intermediate revisions by 7 users not shown)
Line 3: Line 3:
 
|nx        = 3
 
|nx        = 3
 
|nw        = 1
 
|nw        = 1
 +
|nc        = 2
 
|nre      = 6
 
|nre      = 6
 
}}
 
}}
  
The F-8 aircraft control problem is based on a very simple aircraft model. The control problem was introduced by Kaya and Noakes in 2003<bibref>Kaya2003</bibref> and aims at controlling an aircraft in a time-optimal way from an initial state to a terminal state.
+
The F-8 aircraft control problem is based on a very simple aircraft model. The control problem was introduced by Kaya and Noakes and aims at controlling an aircraft in a time-optimal way from an initial state to a terminal state.
  
The mathematical equations form a small-scale [[:Category:ODE Model|ODE Model]]. The interior point equality conditions fix both initial and terminal values of the differential states.
+
The mathematical equations form a small-scale [[:Category:ODE model|ODE model]]. The interior point equality conditions fix both initial and terminal values of the differential states.
  
The optimal integer control functions shows [[:Category:Bang bang|bang bang]] behavior. The problem is furthermore interesting as it should be reformulated equivalently.
+
The optimal, relaxed control function shows [[:Category:Bang bang|bang bang]] behavior. The problem is furthermore interesting as it should be reformulated equivalently.
  
 
== Mathematical formulation ==
 
== Mathematical formulation ==
Line 30: Line 31:
 
</math>
 
</math>
  
<math>x_0</math> is the angle of attack in radians, <math>x_1</math> is the pitch angle, <math>x_2</math> is the pitch rate in rad/s, and the control function <math>w = w(t)</math> is the tail deflection angle in radians. This model goes back to Garrard<bibref>Garrard1977</bibref>.
+
<math>x_0</math> is the angle of attack in radians, <math>x_1</math> is the pitch angle, <math>x_2</math> is the pitch rate in rad/s, and the control function <math>w = w(t)</math> is the tail deflection angle in radians. This model goes back to Garrard<bib id="Garrard1977" />.
  
In the control problem, both initial as terminal values of the differential states are fixed.
+
In the control problem, both initial and terminal values of the differential states are fixed.
  
 
== Reformulation ==
 
== Reformulation ==
Line 43: Line 44:
 
  \mbox{s.t.} & \dot{x}_0 &=& -0.877 \; x_0 + x_2 - 0.088 \; x_0 \; x_2 + 0.47 \; x_0^2 - 0.019 \; x_1^2 - x_0^2 \; x_2 + 3.846 \; x_0^3 \\
 
  \mbox{s.t.} & \dot{x}_0 &=& -0.877 \; x_0 + x_2 - 0.088 \; x_0 \; x_2 + 0.47 \; x_0^2 - 0.019 \; x_1^2 - x_0^2 \; x_2 + 3.846 \; x_0^3 \\
 
&&&          - \left( 0.215 \; \xi - 0.28 \; x_0^2 \; \xi - 0.47 \; x_0 \; \xi^2 - 0.63 \; \xi^3 \right) \; w \\  
 
&&&          - \left( 0.215 \; \xi - 0.28 \; x_0^2 \; \xi - 0.47 \; x_0 \; \xi^2 - 0.63 \; \xi^3 \right) \; w \\  
&&&          - \left( - 0.215 \; \xi + 0.28 \; x_0^2 \; \xi + 0.47 \; x_0 \; \xi^2 + 0.63 \; \xi^3 \right) \; (1 - w) \\  
+
&&&          - \left( - 0.215 \; \xi + 0.28 \; x_0^2 \; \xi - 0.47 \; x_0 \; \xi^2 + 0.63 \; \xi^3 \right) \; (1 - w) \\
 +
&          &=& -0.877 \; x_0 + x_2 - 0.088 \; x_0 \; x_2 + 0.47 \; x_0^2 - 0.019 \; x_1^2 - x_0^2 \; x_2 + 3.846 \; x_0^3 \\
 +
&&&          + 0.215 \; \xi - 0.28 \; x_0^2 \; \xi + 0.47 \; x_0 \; \xi^2 - 0.63 \; \xi^3 \\
 +
&&&          - \left( 0.215 \; \xi - 0.28 \; x_0^2 \; \xi - 0.63 \; \xi^3 \right) \; 2 w \\  
 
& \dot{x}_1 &=& x_2 \\
 
& \dot{x}_1 &=& x_2 \\
 
& \dot{x}_2 &=& -4.208 \; x_0 - 0.396 \; x_2 - 0.47 \; x_0^2 - 3.564 \; x_0^3 \\
 
& \dot{x}_2 &=& -4.208 \; x_0 - 0.396 \; x_2 - 0.47 \; x_0^2 - 3.564 \; x_0^3 \\
 
&&&          - \left( 20.967 \; \xi - 6.265 \; x_0^2 \; \xi -46 \; x_0 \; \xi^2 - 61.4 \; \xi^3 \right) \; w \\  
 
&&&          - \left( 20.967 \; \xi - 6.265 \; x_0^2 \; \xi -46 \; x_0 \; \xi^2 - 61.4 \; \xi^3 \right) \; w \\  
&&&          - \left( - 20.967 \; \xi + 6.265 \; x_0^2 \; \xi +46 \; x_0 \; \xi^2 + 61.4 \; \xi^3 \right) \; (1 - w) \\  
+
&&&          - \left( - 20.967 \; \xi + 6.265 \; x_0^2 \; \xi -46 \; x_0 \; \xi^2 + 61.4 \; \xi^3 \right) \; (1 - w) \\
 +
&          &=& -4.208 \; x_0 - 0.396 \; x_2 - 0.47 \; x_0^2 - 3.564 \; x_0^3 \\
 +
&&&          + 20.967 \; \xi - 6.265 \; x_0^2 \; \xi + 46 \; x_0 \; \xi^2 - 61.4 \; \xi^3 \\
 +
&&&          - \left( 20.967 \; \xi - 6.265 \; x_0^2 \; \xi - 61.4 \; \xi^3 \right) \; 2 w \\  
 
  & x(0) &=& (0.4655,0,0)^T, \\
 
  & x(0) &=& (0.4655,0,0)^T, \\
 
  & x(T) &=& (0,0,0)^T, \\
 
  & x(T) &=& (0,0,0)^T, \\
Line 62: Line 69:
 
{| border="1" align="center" cellpadding="5" cellspacing="0"
 
{| border="1" align="center" cellpadding="5" cellspacing="0"
 
|- bgcolor=#c7c7c7
 
|- bgcolor=#c7c7c7
! Arc !! w(t) !! Lee et al.<bibref>Lee1997a</bibref> !! Kaya<bibref>Kaya2003</bibref> !! Sager<bibref>Sager2005</bibref>
+
! Arc !! w(t) !! Lee et al.<bib id="Lee1997a" /> !! Kaya<bib id="Kaya2003" /> !! Sager<bib id="Sager2005" /> !! [[User:MartinSchlueter | Schlueter]]/[[User:Matthias.gerdts | Gerdts]] !! Sager
 
|-  
 
|-  
| align=center | 1 || align=center | 1 || 0.00000 || 0.10292 || 0.10235
+
| align=center | 1 || align=center | 1 || 0.00000 || 0.10292 || 0.10235 || 0.0 || 1.13492
 
|-
 
|-
| align=center | 2 || align=center | 0 || 2.18000 || 1.92793 || 1.92812
+
| align=center | 2 || align=center | 0 || 2.18800 || 1.92793 || 1.92812 || 0.608750 || 0.34703
 
|-
 
|-
| align=center | 3 || align=center | 1 || 0.16400 || 0.16687 || 0.16645
+
| align=center | 3 || align=center | 1 || 0.16400 || 0.16687 || 0.16645 || 3.136514 || 1.60721
 
|-
 
|-
| align=center | 4 || align=center | 0 || 2.88100 || 2.74338 || 2.73071
+
| align=center | 4 || align=center | 0 || 2.88100 || 2.74338 || 2.73071 || 0.654550 || 0.69169
 
|-
 
|-
| align=center | 5 || align=center | 1 || 0.33000 || 0.32992 || 0.32994  
+
| align=center | 5 || align=center | 1 || 0.33000 || 0.32992 || 0.32994 || 0.0 || 0.0
 
|-
 
|-
| align=center | 6 || align=center | 0 || 0.47200 || 0.47116 || 0.47107
+
| align=center | 6 || align=center | 0 || 0.47200 || 0.47116 || 0.47107 || 0.0 || 0.0
 
|-
 
|-
| Claim: Infeasibility || align=center | - || 1.00E-10 || 7.30E-06 || 5.90E-06
+
| Claim: Infeasibility || align=center | - || 1.00E-10 || 7.30E-06 || 5.90E-06 || 3.29169e-06 || 2.21723e-07
 
|-
 
|-
| Claim: Objective    || align=center | - || 6.03500 || 5.74217 || 5.72864
+
| Claim: Objective    || align=center | - || 6.03500 || 5.74217 || 5.72864 || 4.39981 || 3.78086
 
|- style="font-style:italic;background-color:#ffffcc;"
 
|- style="font-style:italic;background-color:#ffffcc;"
! Simulation: Infeasibility  || align=center | - || 1.75E-03 || 1.64E-03 || 5.90E-06
+
! Simulation: Infeasibility  || align=center | - || 1.75E-03 || 1.64E-03 || 5.90E-06 || 3.29169e-06 || 2.21723e-07
 
|- style="font-style:italic;background-color:#ffffcc;"
 
|- style="font-style:italic;background-color:#ffffcc;"
! Simulation: Objective      || align=center | - || 6.03500 || 5.74218 || 5.72864
+
! Simulation: Objective      || align=center | - || 6.03500 || 5.74218 || 5.72864 || 4.39981 || 3.78086
 
|}
 
|}
  
The best known optimal objective value of this  problem given is given in Sager 2005<bibref>Sager2005</bibref> by <math>T = 5.72864</math>. The corresponding solution is shown in the rightmost plot. The solution of bang-bang type switches five times, starting with <math>w(t) = 1</math>.
+
The best known optimal objective value of this  problem given is given by <math>T = 3.78086</math>. The corresponding solution is shown in the rightmost plot. The solution of bang-bang type switches three times, starting with <math>w(t) = 1</math>.
 
+
 
<gallery caption="Reference solution plots" widths="240px" heights="167px" perrow="3">
 
<gallery caption="Reference solution plots" widths="240px" heights="167px" perrow="3">
  Image:f8aircraftRelaxedCoarse.png| Optimal relaxed control on a coarse control discretization grid and corresponding differential states.
+
  Image:f8aircraftRelaxedCoarse.png| Locally optimal relaxed control on a coarse control discretization grid and corresponding differential states.
  Image:f8aircraftRelaxedFine.png| Optimal relaxed control on a fine, adaptively chosen control discretization grid and corresponding differential states.
+
  Image:f8aircraftRelaxedFine.png| Locally optimal relaxed control on a fine, adaptively chosen control discretization grid and corresponding differential states.
  Image:f8aircraftInteger.png| Optimal integer control and corresponding differential states.
+
  Image:f8aircraftInteger.png| Integer control and corresponding differential states from Sager<bib id="Sager2005" />.
 +
 
 +
Image:f8aircraftSchlueter.png| Integer control and corresponding differential states from [[User:MartinSchlueter | Schlueter]]/[[User:Matthias.gerdts | Gerdts]] solution.
 +
Image:f8aircraftSager2009.png| Best known integer control and corresponding differential states from Sager solution.
 
</gallery>
 
</gallery>
  
== Source Code ==
+
=== jModelica ===
  
=== C ===
+
Objective    : 5.12799232
 +
infeasibility : 6.2235588037251599e-10
 +
 
 +
<gallery caption="Obtained solution plots" widths="240px" heights="167px" perrow="3">
 +
Image:f8aircraft1.png| (Probably sub-)Optimal control.
 +
Image:f8aircraft2.png| Corresponding differential states.
 +
 
 +
</gallery>
 +
 
 +
== Source Code ==
  
The differential equations in C code:
+
Model descriptions are available in
<source lang="cpp">
+
double x1 = xd[0];
+
double x2 = xd[1];
+
double x3 = xd[2];
+
  
double u0 = -0.05236;
+
* [[:Category:AMPL | AMPL code]] at [[F-8 aircraft (AMPL)]]
double u1 = 0.05236;
+
* [[:Category:Muscod | Muscod code]] at [[F-8 aircraft (Muscod)]]
double f00, f10, f20;
+
* [[:Category:JModelica | JModelica code]] at [[F-8 aircraft (JModelica)]]
double f01, f11, f21;
+
 
+
f00 = - 0.877*x1 + x3 - 0.088*x1*x3 + 0.47*x1*x1 - 0.019*x2*x2
+
      - x1*x1*x3 + 3.846*x1*x1*x1 - 0.215*u0 + 0.28*x1*x1*u0 + 0.47*x1*u0*u0 + 0.63*u0*u0*u0;
+
f10 = x3;
+
f20 = - 4.208*x1 - 0.396*x3 - 0.47*x1*x1 - 3.564*x1*x1*x1
+
      - 20.967*u0 + 6.265*x1*x1*u0 + 46*x1*u0*u0 + 61.4*u0*u0*u0;
+
  
f01 = - 0.877*x1 + x3 - 0.088*x1*x3 + 0.47*x1*x1 - 0.019*x2*x2
+
== Variants ==
      - x1*x1*x3 + 3.846*x1*x1*x1 - 0.215*u1 + 0.28*x1*x1*u1 + 0.47*x1*u1*u1 + 0.63*u1*u1*u1;
+
f11 = x3;
+
f21 = - 4.208*x1 - 0.396*x3 - 0.47*x1*x1 - 3.564*x1*x1*x1
+
      -20.967*u1 + 6.265*x1*x1*u1 + 46*x1*u1*u1 + 61.4*u1*u1*u1;
+
  
rhs[0] = u[0]*f01 + (1-u[0])*f00;
+
* a prescribed time grid for the control function, see [[F-8 aircraft (AMPL)]],
rhs[1] = u[0]*f11 + (1-u[0])*f10;
+
rhs[2] = u[0]*f21 + (1-u[0])*f20;
+
</source>
+
  
 
== Miscellaneous and Further Reading ==
 
== Miscellaneous and Further Reading ==
See <bibref>Kaya2003</bibref> and <bibref>Sager2005</bibref> for details.
+
See <bib id="Kaya2003" /> and <bib id="Sager2005" /> for details.
  
 
== References ==
 
== References ==
<bibreferences/>
+
<biblist />
  
 
<!--List of all categories this page is part of. List characterization of solution behavior, model properties, ore presence of implementation details (e.g., AMPL for AMPL model) here -->
 
<!--List of all categories this page is part of. List characterization of solution behavior, model properties, ore presence of implementation details (e.g., AMPL for AMPL model) here -->
 
[[Category:Bang bang]]
 
[[Category:Bang bang]]
 
[[Category:MIOCP]]
 
[[Category:MIOCP]]
[[Category:ODE Model]]
+
[[Category:ODE model]]
 +
[[Category:Aeronautics]]
 +
[[Category:Outer convexification]]
 +
[[Category: Minimum time]]

Latest revision as of 09:29, 27 July 2016

F-8 aircraft
State dimension: 1
Differential states: 3
Discrete control functions: 1
Path constraints: 2
Interior point equalities: 6


The F-8 aircraft control problem is based on a very simple aircraft model. The control problem was introduced by Kaya and Noakes and aims at controlling an aircraft in a time-optimal way from an initial state to a terminal state.

The mathematical equations form a small-scale ODE model. The interior point equality conditions fix both initial and terminal values of the differential states.

The optimal, relaxed control function shows bang bang behavior. The problem is furthermore interesting as it should be reformulated equivalently.

Mathematical formulation

For t \in [0, T] almost everywhere the mixed-integer optimal control problem is given by


\begin{array}{llcl}
 \displaystyle \min_{x, w, T} & T \\[1.5ex]
 \mbox{s.t.} & \dot{x}_0 &=& -0.877 \; x_0 + x_2 - 0.088 \; x_0 \; x_2 + 0.47 \; x_0^2 - 0.019 \; x_1^2 - x_0^2 \; x_2 + 3.846 \; x_0^3 \\
&&&           - 0.215 \; w + 0.28 \; x_0^2 \; w + 0.47 \; x_0 \; w^2 + 0.63 \; w^3 \\ 
& \dot{x}_1 &=& x_2 \\
& \dot{x}_2 &=& -4.208 \; x_0 - 0.396 \; x_2 - 0.47 \; x_0^2 - 3.564 \; x_0^3 \\
&&&            - 20.967 \; w + 6.265 \; x_0^2 \; w + 46 \; x_0 \; w^2 + 61.4 \; w^3 \\ 
 & x(0) &=& (0.4655,0,0)^T, \\
 & x(T) &=& (0,0,0)^T, \\
 & w(t) &\in& \{-0.05236,0.05236\}.
\end{array}

x_0 is the angle of attack in radians, x_1 is the pitch angle, x_2 is the pitch rate in rad/s, and the control function w = w(t) is the tail deflection angle in radians. This model goes back to Garrard[Garrard1977]Author: Garrard, W.L.; Jordan, J.M.
Journal: Automatica
Pages: 497--505
Title: Design of Nonlinear Automatic Control Systems
Volume: 13
Year: 1977
Link to Google Scholar
.

In the control problem, both initial and terminal values of the differential states are fixed.

Reformulation

The control w(t) is restricted to take values from a finite set only. Hence, the control problem can be reformulated equivalently to


\begin{array}{llcl}
 \displaystyle \min_{x, w, T} & T \\[1.5ex]
 \mbox{s.t.} & \dot{x}_0 &=& -0.877 \; x_0 + x_2 - 0.088 \; x_0 \; x_2 + 0.47 \; x_0^2 - 0.019 \; x_1^2 - x_0^2 \; x_2 + 3.846 \; x_0^3 \\
&&&           - \left( 0.215 \; \xi - 0.28 \; x_0^2 \; \xi - 0.47 \; x_0 \; \xi^2 - 0.63 \; \xi^3 \right) \; w \\ 
&&&           - \left( - 0.215 \; \xi + 0.28 \; x_0^2 \; \xi - 0.47 \; x_0 \; \xi^2 + 0.63 \; \xi^3 \right) \; (1 - w) \\ 
&           &=& -0.877 \; x_0 + x_2 - 0.088 \; x_0 \; x_2 + 0.47 \; x_0^2 - 0.019 \; x_1^2 - x_0^2 \; x_2 + 3.846 \; x_0^3 \\
&&&           + 0.215 \; \xi - 0.28 \; x_0^2 \; \xi + 0.47 \; x_0 \; \xi^2 - 0.63 \; \xi^3 \\ 
&&&           - \left( 0.215 \; \xi - 0.28 \; x_0^2 \; \xi - 0.63 \; \xi^3 \right) \; 2 w \\ 
& \dot{x}_1 &=& x_2 \\
& \dot{x}_2 &=& -4.208 \; x_0 - 0.396 \; x_2 - 0.47 \; x_0^2 - 3.564 \; x_0^3 \\
&&&           - \left( 20.967 \; \xi - 6.265 \; x_0^2 \; \xi -46 \; x_0 \; \xi^2 - 61.4 \; \xi^3 \right) \; w \\ 
&&&           - \left( - 20.967 \; \xi + 6.265 \; x_0^2 \; \xi -46 \; x_0 \; \xi^2 + 61.4 \; \xi^3 \right) \; (1 - w) \\ 
&           &=& -4.208 \; x_0 - 0.396 \; x_2 - 0.47 \; x_0^2 - 3.564 \; x_0^3 \\
&&&           + 20.967 \; \xi - 6.265 \; x_0^2 \; \xi + 46 \; x_0 \; \xi^2 - 61.4 \; \xi^3 \\ 
&&&           - \left( 20.967 \; \xi - 6.265 \; x_0^2 \; \xi - 61.4 \; \xi^3 \right) \; 2 w \\ 
 & x(0) &=& (0.4655,0,0)^T, \\
 & x(T) &=& (0,0,0)^T, \\
 & w(t) &\in& \{0,1\},
\end{array}

with \xi = 0.05236. Note that there is a bijection between optimal solutions of the two problems.

Reference solutions

We provide here a comparison of different solutions reported in the literature. The numbers show the respective lengths t_i - t_{i-1} of the switching arcs with the value of w(t) on the upper or lower bound (given in the second column). Claim denotes what is stated in the respective publication, Simulation shows values obtained by a simulation with a Runge-Kutta-Fehlberg method of 4th/5th order and an integration tolerance of 10^{-8}.

Arc w(t) Lee et al.[Lee1997a]Author: Lee, H.W.J.; Teo, K.L.; Rehbock, V.; Jennings, L.S.
Journal: Dynamic Systems and Applications
Pages: 243--262
Title: Control Parametrization Enhancing Technique for Time-Optimal Control Problems
Volume: 6
Year: 1997
Link to Google Scholar
Kaya[Kaya2003]Author: C.Y. Kaya; J.L. Noakes
Journal: Journal of Optimization Theory and Applications
Pages: 69--92
Title: A Computational Method for Time-Optimal Control
Volume: 117
Year: 2003
Link to Google Scholar
Sager[Sager2005]Address: Tönning, Lübeck, Marburg
Author: S. Sager
Editor: ISBN 3-89959-416-9
Publisher: Der andere Verlag
Title: Numerical methods for mixed--integer optimal control problems
Url: http://mathopt.de/PUBLICATIONS/Sager2005.pdf
Year: 2005
Link to Google Scholar
Schlueter/ Gerdts Sager
1 1 0.00000 0.10292 0.10235 0.0 1.13492
2 0 2.18800 1.92793 1.92812 0.608750 0.34703
3 1 0.16400 0.16687 0.16645 3.136514 1.60721
4 0 2.88100 2.74338 2.73071 0.654550 0.69169
5 1 0.33000 0.32992 0.32994 0.0 0.0
6 0 0.47200 0.47116 0.47107 0.0 0.0
Claim: Infeasibility - 1.00E-10 7.30E-06 5.90E-06 3.29169e-06 2.21723e-07
Claim: Objective - 6.03500 5.74217 5.72864 4.39981 3.78086
Simulation: Infeasibility - 1.75E-03 1.64E-03 5.90E-06 3.29169e-06 2.21723e-07
Simulation: Objective - 6.03500 5.74218 5.72864 4.39981 3.78086

The best known optimal objective value of this problem given is given by T = 3.78086. The corresponding solution is shown in the rightmost plot. The solution of bang-bang type switches three times, starting with w(t) = 1.

jModelica

Objective  : 5.12799232 infeasibility : 6.2235588037251599e-10

Source Code

Model descriptions are available in

Variants

Miscellaneous and Further Reading

See [Kaya2003]Author: C.Y. Kaya; J.L. Noakes
Journal: Journal of Optimization Theory and Applications
Pages: 69--92
Title: A Computational Method for Time-Optimal Control
Volume: 117
Year: 2003
Link to Google Scholar
and [Sager2005]Address: Tönning, Lübeck, Marburg
Author: S. Sager
Editor: ISBN 3-89959-416-9
Publisher: Der andere Verlag
Title: Numerical methods for mixed--integer optimal control problems
Url: http://mathopt.de/PUBLICATIONS/Sager2005.pdf
Year: 2005
Link to Google Scholar
for details.

References

There were no citations found in the article.