Difference between revisions of "Subway ride"
m (Initial setup of IMA paper text) |
FelixMueller (Talk | contribs) (→Mathematical formulation) |
||
(10 intermediate revisions by 3 users not shown) | |||
Line 6: | Line 6: | ||
}} | }} | ||
− | The ''subway ride'' optimal control problem goes back to work of < | + | The ''subway ride'' optimal control problem goes back to work of <bib id="Bock1982" /> for the city of New York. In an extension, also velocity limits that lead to path-constrained arcs appear. |
The aim is to minimize the energy used for a subway ride from one station to another, taking into account boundary conditions and a restriction on the time. | The aim is to minimize the energy used for a subway ride from one station to another, taking into account boundary conditions and a restriction on the time. | ||
Line 15: | Line 15: | ||
<center> | <center> | ||
<math> | <math> | ||
− | \begin{array}{ | + | \begin{array}{llll} |
− | \displaystyle \min_{x, w} & | + | \displaystyle \min_{x, w} & \int_{0}^{t_f} & L(x, w) \; \mathrm{d} t \\[1.5ex] |
− | \mbox{s.t.} & \dot{x}_0 | + | \mbox{s.t.} & \dot{x}_0 & = & x_1, \\ |
− | & \dot{x}_1 | + | & \dot{x}_1 & = & f_1(x,w), \\ |
& x(0) &=& (0, 0)^T, \\ | & x(0) &=& (0, 0)^T, \\ | ||
& x(t_f) &=& (2112, 0)^T, \\ | & x(t_f) &=& (2112, 0)^T, \\ | ||
− | & w(t) &\in& \{1, 2, 3, 4\} | + | & w(t) &\in& \{1, 2, 3, 4\}. |
\end{array} | \end{array} | ||
</math> | </math> | ||
</center> | </center> | ||
− | The terminal time <math>t_f=65</math> denotes the time of arrival of a subway train in the next station. The differential states <math>x_0(\cdot)</math> and <math>x_1(\cdot)</math> describe position | + | The terminal time <math>t_f=65</math> denotes the time of arrival of a subway train in the next station. The differential states <math>x_0(\cdot)</math> and <math>x_1(\cdot)</math> describe position and velocity of the train, respectively. The train can be operated in one of four different modes, <math>w(\cdot) = 1</math> series, <math>w(\cdot) = 2</math> parallel, <math>w(\cdot) = 3</math> coasting, or <math>w(\cdot) = 4</math> braking that accelerate or decelerate the train and have different energy consumption. |
− | that accelerate or decelerate the train and have different energy consumption. | + | |
Acceleration and energy comsumption are velocity-dependent. Hence, we will need switching functions <math>\sigma_i( x_1 ) = v_i - x_1</math> for given velocities <math>v_i, i=1..3</math>. | Acceleration and energy comsumption are velocity-dependent. Hence, we will need switching functions <math>\sigma_i( x_1 ) = v_i - x_1</math> for given velocities <math>v_i, i=1..3</math>. | ||
Line 63: | Line 62: | ||
</math></center> | </math></center> | ||
− | Details about the derivation of this model and the assumptions made can be found in < | + | Details about the derivation of this model and the assumptions made can be found in <bib id="Bock1982" /> or in <bib id="Kraemer-Eis1985" />. |
+ | == Parameters == | ||
+ | |||
+ | {| border="1" align="center" cellpadding="5" cellspacing="0" | ||
+ | |- bgcolor=#c7c7c7 | ||
+ | ! Symbol !! Value !! Unit !! Symbol !! Value !! Unit | ||
+ | |- | ||
+ | !<math>W</math> !! 78000 !! lbs !! <math>v_1</math> !! 0.979474 !! mph | ||
+ | |- | ||
+ | !<math>W_{\mathrm{eff}}</math> !! 85200 !! lbs !! <math>v_2</math> !! 6.73211 !! mph | ||
+ | |- | ||
+ | !<math>S</math> !! 2112 !! ft !! <math>v_3</math> !! 14.2658 !! mph | ||
+ | |- | ||
+ | !<math>S_4</math> !! 700 !! ft !! <math>v_4</math> !! 22.0 !! mph | ||
+ | |- | ||
+ | !<math>S_5</math> !! 1200 !! ft !! <math>v_5</math> !! 24.0 !! mph | ||
+ | |- | ||
+ | !<math>\gamma</math> !! <math>\frac{3600}{5280}</math> !! <math>\frac{\mbox{sec}}{\mbox{h}} / \frac{\mbox{ft}}{\mbox{mile}}</math> !! <math>a_1</math> !! 6017.611205 !! lbs | ||
+ | |- | ||
+ | !<math>a</math> !! 100 !! ft<math>^2</math> !! <math>a_2</math> !! 12348.34865 !! lbs | ||
+ | |- | ||
+ | !<math>n_{\mathrm{wag}}</math> !! 10 !! - !! <math>a_3</math> !! 11124.63729 !! lbs | ||
+ | |- | ||
+ | !<math>b</math> !! 0.045 !! - !! <math>u_{\mathrm{max}}</math> !! 4.4 !! ft / sec<math>^2</math> | ||
+ | |- | ||
+ | !<math>C</math> !! 0.367 !! - !! <math>p_1</math> !! 106.1951102 !! - | ||
+ | |- | ||
+ | !<math>g</math> !! 32.2 !! <math>\frac{\mbox{ft}}{\mbox{sec}^2}</math> !! <math>p_2</math> !! 180.9758408 !! - | ||
+ | |- | ||
+ | !<math>e</math> !! 1.0 !! - !! <math>p_3</math> !! 354.136479 !! - | ||
+ | |} | ||
+ | |||
+ | {| border="1" align="center" cellpadding="5" cellspacing="0" | ||
+ | |- bgcolor=#c7c7c7 | ||
+ | ! Parameter !! Value !! Parameter !! Value | ||
+ | |- | ||
+ | ! b_0(1) !! -0.1983670410E02 !! c_0(1) !! 0.3629738340E02 | ||
+ | |- | ||
+ | ! b_1(1) !! 0.1952738055E03 !! c_1(1) !! -0.2115281047E03 | ||
+ | |- | ||
+ | ! b_2(1) !! 0.2061789974E04 !! c_2(1) !! 0.7488955419E03 | ||
+ | |- | ||
+ | ! b_3(1) !! -0.7684409308E03 !! c_3(1) !! -0.9511076467E03 | ||
+ | |- | ||
+ | ! b_4(1) !! 0.2677869201E03 !! c_4(1) !! 0.5710015123E03 | ||
+ | |- | ||
+ | ! b_5(1) !! -0.3159629687E02 !! c_5(1) !! -0.1221306465E03 | ||
+ | |- | ||
+ | ! b_0(2) !! -0.1577169936E03 !! c_0(2) !! 0.4120568887E02 | ||
+ | |- | ||
+ | ! b_1(2) !! 0.3389010339E04 !! c_1(2) !! 0.3408049202E03 | ||
+ | |- | ||
+ | ! b_2(2) !! 0.6202054610E04 !! c_1(2) !! 0.3408049202E03 | ||
+ | |- | ||
+ | ! b_3(2) !! -0.4608734450E04 !! c_3(2) !! 0.8108316584E02 | ||
+ | |- | ||
+ | ! b_4(2) !! 0.2207757061E04 !! c_4(2) !! -0.5689703073E01 | ||
+ | |- | ||
+ | ! b_5(2) !! -0.3673344160E03 !! c_5(2) !! -0.2191905731E01 | ||
+ | |} | ||
== Reference Solutions == | == Reference Solutions == | ||
− | The optimal trajectory for this problem has been calculated by means of an indirect approach in < | + | The optimal trajectory for this problem has been calculated by means of an indirect approach in <bib id="Bock1982" /><bib id="Kraemer-Eis1985" />, and based on the direct multiple shooting method in <bib id="Sager2009" />. |
+ | |||
+ | |||
+ | {| border="1" align="center" cellpadding="5" cellspacing="0" | ||
+ | |- bgcolor=#c7c7c7 | ||
+ | ! Time <math>t</math> !! <math>w(\cdot)</math> !! <math>f_1 = </math> !! <math>x_0</math> [ft] !! <math>x_1</math> [mph] !! <math>x_1</math> [ftps] !! Energy | ||
+ | |- | ||
+ | ! <math>0.00000</math> !! 1 !! <math>f_1^{1A}</math> !! 0.0 !! 0.0 !! 0.0 !! 0.0 | ||
+ | |- | ||
+ | ! <math>0.63166</math> !! 1 !! <math>f_1^{1B}</math> !! 0.453711 !! 0.979474 !! 1.43656 !! 0.0186331 | ||
+ | |- | ||
+ | ! <math>2.43955</math> !! 1 !! <math>f_1^{1C}</math> !! 10.6776 !! 6.73211 !! 9.87375 !! 0.109518 | ||
+ | |- | ||
+ | ! <math>3.64338</math> !! 2 !! <math>f_1^{2B}</math> !! 24.4836 !! 8.65723 !! 12.6973 !! 0.147387 | ||
+ | |- | ||
+ | ! <math>5.59988</math> !! 2 !! <math>f_1^{2C}</math> !! 57.3729 !! 14.2658 !! 20.9232 !! 0.339851 | ||
+ | |- | ||
+ | ! <math>12.6070</math> !! 1 !! <math>f_1^{1C}</math> !! 277.711 !! 25.6452 !! 37.6129 !! 0.93519 | ||
+ | |- | ||
+ | ! <math>45.7827</math> !! 3 !! <math>f_1(3)</math> !! 1556.5 !! 26.8579 !! 39.3915 !! 1.14569 | ||
+ | |- | ||
+ | ! <math>46.8938</math> !! 3 !! <math>f_1(3)</math> !! 1600 !! 26.5306 !! 38.9115 !! 1.14569 | ||
+ | |- | ||
+ | ! <math>57.1600</math> !! 4 !! <math>f_1(4)</math> !! 1976.78 !! 23.5201 !! 34.4961 !! 1.14569 | ||
+ | |- | ||
+ | ! <math>65.0000</math> !! - !! <math>-</math> !! 2112 !! 0.0 !! 0.0 !! 1.14569 | ||
+ | |} | ||
+ | |||
== Variants == | == Variants == | ||
Line 96: | Line 181: | ||
The additional path constraint changes the qualitative behavior of the relaxed solution. While all solutions considered this far were bang-bang and the main work consisted in finding the switching points, we now have a path-constrained arc. The optimal solutions for refined grids yield a series of monotonically decreasing objective function values, where the limit is the best value that can be approximated by an integer feasible solution. In our case we obtain 1.33108, 1.31070, 1.31058, 1.31058, ... | The additional path constraint changes the qualitative behavior of the relaxed solution. While all solutions considered this far were bang-bang and the main work consisted in finding the switching points, we now have a path-constrained arc. The optimal solutions for refined grids yield a series of monotonically decreasing objective function values, where the limit is the best value that can be approximated by an integer feasible solution. In our case we obtain 1.33108, 1.31070, 1.31058, 1.31058, ... | ||
+ | |||
+ | The plot shows two possible integer realizations, with a trade-off between energy consumption and number of switches. Note that the solutions approximate the optimal driving behavior (a convex combination of two operation modes) by switching between the two and causing a touching of the velocity constraint from below as many times as we switch. | ||
+ | |||
+ | <gallery caption="Reference solution plots" widths="271px" heights="379px" perrow="2"> | ||
+ | Image:subway78000PathConstraint1600-24Opt1.png| Optimal solution with 1 touch point. | ||
+ | Image:subway78000PathConstraint1600-24Opt2.png| Optimal solution with 3 touch points. | ||
+ | </gallery> | ||
+ | |||
+ | The differential state ''velocity'' of a subway train over time. The dotted vertical line indicates the beginning of the path constraint, the horizontal line the maximum velocity. Left: one switch leading to one touch point. Right: optimal solution for three switches. The energy-optimal solution needs to stay as close as possible to the maximum velocity on this time interval to avoid even higher energy-intensive accelerations in the start-up phase to match the terminal time constraint <math>t_f \le 65</math> to reach the next station. | ||
+ | |||
+ | == Source Code == | ||
+ | |||
+ | Model descriptions are available in | ||
+ | |||
+ | * [[:Category:Muscod | Muscod code]] at [[Subway ride (Muscod)]] | ||
== References == | == References == | ||
− | < | + | <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 --> |
Latest revision as of 17:21, 22 February 2016
Subway ride | |
---|---|
State dimension: | 1 |
Differential states: | 2 |
Discrete control functions: | 1 |
Interior point equalities: | 4 |
The subway ride optimal control problem goes back to work of [Bock1982]Address: Taiwan
Author: Bock, H.G.; Longman, R.W.
Booktitle: Proceedings of the American Astronomical Society. Symposium on Engineering Science and Mechanics
Title: Computation of optimal controls on disjoint control sets for minimum energy subway operation
Year: 1982
for the city of New York. In an extension, also velocity limits that lead to path-constrained arcs appear.
The aim is to minimize the energy used for a subway ride from one station to another, taking into account boundary conditions and a restriction on the time.
Contents
Mathematical formulation
The MIOCP reads as
The terminal time denotes the time of arrival of a subway train in the next station. The differential states and describe position and velocity of the train, respectively. The train can be operated in one of four different modes, series, parallel, coasting, or braking that accelerate or decelerate the train and have different energy consumption.
Acceleration and energy comsumption are velocity-dependent. Hence, we will need switching functions for given velocities .
The Lagrange term reads as
The right hand side function reads as
The braking deceleration can be varied between and a given . It can be shown that only maximal braking can be optimal, hence we fixed to without loss of generality.
Occurring forces are
Details about the derivation of this model and the assumptions made can be found in [Bock1982]Address: Taiwan
Author: Bock, H.G.; Longman, R.W.
Booktitle: Proceedings of the American Astronomical Society. Symposium on Engineering Science and Mechanics
Title: Computation of optimal controls on disjoint control sets for minimum energy subway operation
Year: 1982
or in [Kraemer-Eis1985]Address: Bonn
Author: Kr\"amer-Eis, P.
Publisher: Universit\"at Bonn
Series: Bonner Mathematische Schriften
Title: Ein Mehrzielverfahren zur numerischen Berechnung optimaler Feedback--Steuerungen bei beschr\"ankten nichtlinearen Steuerungsproblemen
Volume: 166
Year: 1985
.
Parameters
Symbol | Value | Unit | Symbol | Value | Unit |
---|---|---|---|---|---|
78000 | lbs | 0.979474 | mph | ||
85200 | lbs | 6.73211 | mph | ||
2112 | ft | 14.2658 | mph | ||
700 | ft | 22.0 | mph | ||
1200 | ft | 24.0 | mph | ||
6017.611205 | lbs | ||||
100 | ft | 12348.34865 | lbs | ||
10 | - | 11124.63729 | lbs | ||
0.045 | - | 4.4 | ft / sec | ||
0.367 | - | 106.1951102 | - | ||
32.2 | 180.9758408 | - | |||
1.0 | - | 354.136479 | - |
Parameter | Value | Parameter | Value |
---|---|---|---|
b_0(1) | -0.1983670410E02 | c_0(1) | 0.3629738340E02 |
b_1(1) | 0.1952738055E03 | c_1(1) | -0.2115281047E03 |
b_2(1) | 0.2061789974E04 | c_2(1) | 0.7488955419E03 |
b_3(1) | -0.7684409308E03 | c_3(1) | -0.9511076467E03 |
b_4(1) | 0.2677869201E03 | c_4(1) | 0.5710015123E03 |
b_5(1) | -0.3159629687E02 | c_5(1) | -0.1221306465E03 |
b_0(2) | -0.1577169936E03 | c_0(2) | 0.4120568887E02 |
b_1(2) | 0.3389010339E04 | c_1(2) | 0.3408049202E03 |
b_2(2) | 0.6202054610E04 | c_1(2) | 0.3408049202E03 |
b_3(2) | -0.4608734450E04 | c_3(2) | 0.8108316584E02 |
b_4(2) | 0.2207757061E04 | c_4(2) | -0.5689703073E01 |
b_5(2) | -0.3673344160E03 | c_5(2) | -0.2191905731E01 |
Reference Solutions
The optimal trajectory for this problem has been calculated by means of an indirect approach in [Bock1982]Address: Taiwan
Author: Bock, H.G.; Longman, R.W.
Booktitle: Proceedings of the American Astronomical Society. Symposium on Engineering Science and Mechanics
Title: Computation of optimal controls on disjoint control sets for minimum energy subway operation
Year: 1982
[Kraemer-Eis1985]Address: Bonn
Author: Kr\"amer-Eis, P.
Publisher: Universit\"at Bonn
Series: Bonner Mathematische Schriften
Title: Ein Mehrzielverfahren zur numerischen Berechnung optimaler Feedback--Steuerungen bei beschr\"ankten nichtlinearen Steuerungsproblemen
Volume: 166
Year: 1985
, and based on the direct multiple shooting method in [Sager2009]Author: Sager, S.; Reinelt, G.; Bock, H.G.
Journal: Mathematical Programming
Number: 1
Pages: 109--149
Title: Direct Methods With Maximal Lower Bound for Mixed-Integer Optimal Control Problems
Url: http://mathopt.de/PUBLICATIONS/Sager2009.pdf
Volume: 118
Year: 2009
.
Time | [ft] | [mph] | [ftps] | Energy | ||
---|---|---|---|---|---|---|
1 | 0.0 | 0.0 | 0.0 | 0.0 | ||
1 | 0.453711 | 0.979474 | 1.43656 | 0.0186331 | ||
1 | 10.6776 | 6.73211 | 9.87375 | 0.109518 | ||
2 | 24.4836 | 8.65723 | 12.6973 | 0.147387 | ||
2 | 57.3729 | 14.2658 | 20.9232 | 0.339851 | ||
1 | 277.711 | 25.6452 | 37.6129 | 0.93519 | ||
3 | 1556.5 | 26.8579 | 39.3915 | 1.14569 | ||
3 | 1600 | 26.5306 | 38.9115 | 1.14569 | ||
4 | 1976.78 | 23.5201 | 34.4961 | 1.14569 | ||
- | 2112 | 0.0 | 0.0 | 1.14569 |
Variants
The given parameters have to be modified to match different parts of the track, subway train types, or amount of passengers. A minimization of travel time might also be considered.
The problem becomes more challenging, when additional point or path constraints are considered.
Point constraint
We consider the point constraint
for a given distance and velocity . Note that the state is strictly monotonically increasing with time, as for all .
The optimal order of gears for and with the additional interior point constraints (\ref{FASOPOINTCON}) is . The stage lengths between switches are 2.86362, 10.722, 15.3108, 5.81821, 1.18383, 2.72451, 12.917, 5.47402, and 7.98594 with . For different parameters and we obtain the gear choice 1, 2, 1, 3, 2, 1, 3, 4 and stage lengths 2.98084, 6.28428, 11.0714, 4.77575, 6.0483, 18.6081, 6.4893, and 8.74202 with .
Path constraint
A more practical restriction are path constraints on subsets of the track. We will consider a problem with additional path constraints
The additional path constraint changes the qualitative behavior of the relaxed solution. While all solutions considered this far were bang-bang and the main work consisted in finding the switching points, we now have a path-constrained arc. The optimal solutions for refined grids yield a series of monotonically decreasing objective function values, where the limit is the best value that can be approximated by an integer feasible solution. In our case we obtain 1.33108, 1.31070, 1.31058, 1.31058, ...
The plot shows two possible integer realizations, with a trade-off between energy consumption and number of switches. Note that the solutions approximate the optimal driving behavior (a convex combination of two operation modes) by switching between the two and causing a touching of the velocity constraint from below as many times as we switch.
The differential state velocity of a subway train over time. The dotted vertical line indicates the beginning of the path constraint, the horizontal line the maximum velocity. Left: one switch leading to one touch point. Right: optimal solution for three switches. The energy-optimal solution needs to stay as close as possible to the maximum velocity on this time interval to avoid even higher energy-intensive accelerations in the start-up phase to match the terminal time constraint to reach the next station.
Source Code
Model descriptions are available in
References
There were no citations found in the article.