Mixed Integer Optimal Control Problem
Each of the following three topics:
has rich theories and abundant numerical algorithms.
Today we focus on their interactions.
Mixed Integer Optimal Control Problem
\begin{align*}
&\underset{x(\cdot),u(\cdot),w(\cdot)}{\text{minimize}}
& &\psi(x(\cdot),u(\cdot),w(\cdot)) \\
&\text{subject to}
& &\dot{x}(t) = f(t, x(t),u(t), w(t)) \;\; \forall t \in \mathcal{T}, \\
&&&0 \le c(t, x(t),u(t),w(t)) \;\; \forall t \in \mathcal{T}, \tag{2.1}\\
&&&0 \le r(\{x(t_i)\}) \;\; \{t_i \}\subset \mathcal{T}, \\
\end{align*}
where codomain of the discrete control \(w(\cdot)\) is a finite set \(\Omega\) with \(n^{\Omega}\) values (\(n^{\Omega}<\infty\)); other details are the same as (1.1) in lecture 2 slides.
Don't confuse the interity requirment with the discretization grid.
Multiple Shooting Discretized MIOCP
\begin{align*}
&\underset{s,q,w}{\text{minimize}}
& &\sum_{i=1}^{m} l_i(t_i,s_i,q_i,w_i) \\
&\text{subject to}
& &0 = s_{i+1} - x_i(t_{i+1};t_i,s_i,b_i(t_i,q_i),w_i) \;\; 0\le i \le m-1, \\
&&&0 \le c_i(t_i, s_i,b_i(t_i,q_i),w_i) \;\; 0\le i \le m, \\
&&&0 \le r_i(t_i,s_i,b_i(t_i,q_i),w_i) \;\; 0\le i \le m, \\
&&& w_i \in \{0,1\}^{n^w} \;\; (2.3)
\end{align*}
It is an integer NLP.
Integer/Binary/Discretization Control Functions
For an integer control function \(0 \le \hat{v}(\cdot) < n^v:\)
\begin{equation*}
\hat{v}(t) \equiv \sum_{i=0}^{\lceil \log_2 n^v \rceil}{2^i w_i(t)},
\end{equation*}
where \(w_i(t)\) is binary; for other discrete control functions:
\begin{equation*}
f(t,x(t),u(t),w(t)) \equiv \sum_{i=1}^{n^v}{f(t,x(t),u(t),v_i) w_i(t)},
\end{equation*}
similarly for \(\psi(\cdot), c(\cdot)\).
Full enumeration: \(\left(2^{n^w}\right)^m\)
Dynamic Programming: curse of dimensionality
Branch and Bound: tree enumeration by \(w_i\le \lfloor \hat{w_i} \rfloor\) or \(w_i\ge \lceil \hat{w_i} \rceil\); degenerates to full enumeration
Branch and Cut: tree enumeration by \(pw\le k\) or \(pw\ge k+1\); degenerates to full enumeration
Generalized Benders' decomposition: outer approximation, a sequence of master and subproblems
Nonlinear transformation: \(w_i(1-w_i)=0\), very hard to solve due to violation of Constraint Qualification of KKT
Homotopies: \(w_i(1-w_i)\le \beta, \beta \to 0^+\), needs to solve many continuous optimal control problem
Convexzation and Relaxation: relax, and solve just one OCP of better relaxation
Better Relaxation: Jensen's inequality
Convexification and Relaxation
Tight bounds means better relaxation. We are able to get tight bounds on some problems.
Binary Nonlinear Problem (BN)
\begin{align*}
&\underset{x(\cdot),u(\cdot),w(\cdot)}{\text{minimize}}
& &\psi(x(\cdot),u(\cdot),w(\cdot)) \\
&\text{subject to}
& &\dot{x}(t) = f(t, x(t),u(t), w(t)) \;\; \forall t \in \mathcal{T}, \\
&&& x(t_0) = x_0, \\
&&& w(t) \in \{0,1\}^{n^w} \;\; \forall t \in \mathcal{T}
\end{align*}
Relaxed Nonlinear Problem (RN)
\begin{align*}
&\underset{x(\cdot),u(\cdot),w(\cdot)}{\text{minimize}}
& &\psi(x(\cdot),u(\cdot),w(\cdot)) \\
&\text{subject to}
& &\dot{x}(t) = f(t, x(t),u(t), w(t)) \;\; \forall t \in \mathcal{T}, \\
&&& x(t_0) = x_0, \\
&&& w(t) \in [0,1]^{n^w} \;\; \forall t \in \mathcal{T}
\end{align*}
Binary Convexified Linear Problem (BC)
\begin{align*}
&\underset{x(\cdot),u(\cdot),w(\cdot)}{\text{minimize}}
& &\sum_{i=1}^{2^{n^w}} \psi(x(\cdot),u(\cdot),w^i)w_i(\cdot) \\
&\text{subject to}
& &\dot{x}(t) = \sum_{i=1}^{2^{n^w}}f(t, x(t),u(t), w^i)w_i(t) \;\; \forall t \in \mathcal{T}, \\
&&& x(t_0) = x_0, \\
&&& w(t) \in \{0,1\}^{n^w} \;\; \forall t \in \mathcal{T}\\
&&& 1 = \sum_{i=1}^{2^{n^w}}w_i(t).
\end{align*}
Specicial Ordered Set One (SOS1)
\begin{equation*}
1 = \sum_{i=1}^{2^{n^w}}w_i(t), w(t) \in \{0,1\}^{n^w} \;\; \forall t \in \mathcal{T}
\end{equation*}
SOS property is important for branching in solving integer problems.
Relaxed Convexified Linear Problem (RC)
\begin{align*}
&\underset{x(\cdot),u(\cdot),w(\cdot)}{\text{minimize}}
& & \sum_{i=1}^{2^{n^w}} \psi(x(\cdot),u(\cdot),w^i)\alpha_i(\cdot) \\
&\text{subject to}
& &\dot{x}(t) = \sum_{i=1}^{2^{n^w}}f(t, x(t),u(t), w^i)\alpha_i(\cdot) \;\; \forall t \in \mathcal{T}, \\
&&& x(t_0) = x_0, \\
&&& \alpha(t) \in [0,1]^{n^w} \;\; \forall t \in \mathcal{T}\\
&&& 1 = \sum_{i=1}^{2^{n^w}}\alpha_i(t).
\end{align*}
Bounds in LOCP and Bang-Bang
Linear Control Problem:
\begin{align*}
\dot{x}(t) &= A(t)x(t) + B(t) u(t) \;\; \forall t \in \mathcal{T}, \\
x(t_0) &= x_0 \\
u(t) &\in [u^{lb},u^{ub}]^{n^w} \;\; \forall t \in \mathcal{T} \;\;\;\;\; (2.6)
\end{align*}
Bang-Bang controls:
\begin{equation*}
\{u: \mathcal{T} \to \mathbb{R}^{n^u} | \forall t \in \mathcal{T} , 1 \le i \le n^u, u_i(t) \in \{u_i^{lb}, u_i^{ub}\} \}
\end{equation*}
Conclusion: there is always an optimal bang-bang control; optimal set of both (RN) and (RC) cover the optimal set of (BN).
Bounds on Objective Functions of BN and BC
\begin{equation*}
\psi^{BN} = \psi^{BC} \;\;\tag{Theorem 2.2}
\end{equation*}
Bounds on Objective Functions of BC and RC
\begin{equation*}
\exists w_{\epsilon} \in \{0,1\}^{n^w}, \psi_{\epsilon}^{BC} \le \psi^{RC} + \epsilon \;\;\tag{Theorem 2.3}
\end{equation*}
Bounds on BN, RN, BC, RC and infeasibility
\begin{equation*}
\psi^{RN} \le \psi^{RC} \le \psi_{\epsilon}^{BN} = \psi_{\epsilon}^{BC} \le \psi^{RC} + \epsilon \;\;\tag{Theorem 2.4}
\end{equation*}
Thus the true \(\psi^{BN}\) could be arbitrarily approximated by a feasible solution close to the boundary of RC.
Again, BN does not have the path constraint. In case the path constraint does not involve the binary control, the bounds still apply; o.w., fail.
Example of Path Constraint with Integer Control
\begin{align*}
0 &\le 1 - 10^{-n} - w(t)\\
0 &\le w(t) - 10^{-n}, n\ge 1
\end{align*}
It is infeasible but has a solution for a relaxed \(w(t)\in [0,1]\).
\begin{align*}
0 &<= (1 - 10^{-n})\alpha_1(t) - 10^{-n}\alpha_2(t) \\
0 &<= -10^{-n} \alpha_1(t) + (1 - 10^{-n})\alpha_2(t)
\end{align*}
The Outer Convexification of Constraint has no solution, which reveals the infeasibility of the original problem.
Rounding Strategies for RC
Suppose we have solved (RC) by multiple shooting and get \(\alpha^*(\cdot)\).
In general \(\alpha^*(\cdot)\) is not binary, not even for the relaxed LOCP. A switching point of
the convex multiplier \(\alpha^*(\cdot)\) may fall in-between an interval of the discretization grid of a multiple shooting algorithm,
in this case \(\alpha^*(\cdot)\) will be fractional in that interval.
Theorem 2.4 suggests us to find a feasible solution close to the boundary of (RC).
We apply rounding huristics for this purpose.
Note that for a linear (BN), its (RC) degenerates to (RN), i.e., the convexification is equivalent to the direct relaxation;
for a nonlinear (BN), its (RC) has an extra SOS1 constraint.
For a linear (BN), let \(\alpha^*(\cdot)\) be the solution of (RC). Then the direct rounding solution \(w(t)=p_i\in \{0,1\}^{n^w}\)
for \(t \in [t_i , t_{i+1}]\) on the grid \(\{t_i\}, 0 \le i \le m\) is defined by
\begin{equation*}
p_{i,j} = 1 \;\;\; \text{ if } \int_{t_i}^{t_{i+1}} \alpha^*(t) dt \ge \frac{1}{2}; 0 \text{ otherwise.}
\end{equation*}
Sum-up Rounding and Bounds
For a linear (BN),
\begin{equation*}
p_{i,j} = 1 \;\;\; \text{ if } \int_{t_0}^{t_{i+1}} \alpha^*(t) dt - \sum_{k=0}^{k=i-1}p_{k,j} \delta t_k\ge \frac{1}{2} \delta t_i; 0 \text{ otherwise.}
\end{equation*}
\begin{equation*}
hence,
\end{equation*}
\begin{equation*}
\left|\int_{t_0}^{t} w(\tau) - \alpha(\tau) d\tau \right|_{\infty} \le \frac{1}{2} \max_i \delta t_i
\end{equation*}
Sum-up rounding respects the accumulation effect of the control.
Sum-up Rounding and Bounds on State Trajectory
Let two initial value problems be given on the time horizon \(\tau = [t_0, t_f]\),
\begin{align*}
\dot{x}(t) = A(t, x(t))\alpha(t), \forall t \in \tau , x(t_0) = x_0,\\
\dot{y}(t) = A(t, y(t))w(t), \forall t \in \tau , y(t_0) = y_0,
\end{align*}
assume that \(\forall t \in \tau\) and almost everywhere,
\begin{align*}
\|\frac{d}{dt}A(t,x(t))\| \le C \\
\|A(t,x(t)) - A(t,y(t))\| \le L\|x(t) - y(t)\| \\
\|A(t,x(t)\|_{\infty} \le M \\
\|\int_{t_0}^{t} w(\tau) - \alpha(\tau) d\tau \|_{\infty} \le \epsilon
\end{align*}
Sum-up Rounding and Bounds of State Trajectory (Cont.)
then
\begin{equation*}
\|y(t)-x(t)\| \le \left( \|y_0 - x_0\| +\left(M + C(t - t_0)\epsilon\right)\right)e^{L(t-t_0)}
\end{equation*}
Note that for a nonlinear (BN), its (RC) has an extra SOS1 constraint. For example, \(\sum_{i=1}^{100}x_i=1, x_i\in\{0,1\}\), then
a relaxed solution hardly has any \(x_i>0.5\). We should boost the largest \(x_i\) to one. In case of a tie, we arbitrarily choose
the \(x_i\) with the smallest index \(i\).
\begin{align*}
\hat{p}_{i,j} &= \int_{t_0}^{t_i} \alpha_j^*(t) dt - \sum_{k=0}^{i-1} p_{k,j}\\
p_{i,j} &= 1 \text{ if } \hat{p}_{i,j} \text{ is one of the largest with the smallest index,}
\end{align*}
then
\begin{equation*}
\left|\int_{t_0}^{t} w(\tau) - \alpha(\tau) d \tau \right|_{\infty} \le (n^w - 1) \max_i \delta t_i
\end{equation*}
It is hard to obtain a bound on the state trajectory though.
We will implement controls provided by (RC) + Rounding, not by (BN) or (BC). Hence we need to know the quality and characteristics of (RC) + Rounding.
Zeno's or chattering phenomenon
\begin{align*}
&\underset{x(\cdot),u(\cdot),w(\cdot)}{\text{minimize}}
& &\psi(x(\cdot),u(\cdot),w(\cdot)) \\
&\text{subject to}
& &\dot{x}(t) = f(t, x(t),u(t), w(t)) \;\; \forall t \in \mathcal{T}, \tag{BN}\\
&&& x(t_0) = x_0, \\
&&& w(t) \in \{0,1\}^{n^w} \;\; \forall t \in \mathcal{T}
\end{align*}
Oscillating \(w(\cdot)\) could be optimal, then what you will see in the \(\alpha^*(\cdot)\) of its (RC)?
Infinitely Many Switching in Finite Horizon
\begin{equation*}
\psi^{RN} \le \psi^{RC} \le \psi_{\epsilon}^{BN} = \psi_{\epsilon}^{BC} \le \psi^{RC} + \epsilon \;\;\tag{Theorem 2.4}
\end{equation*}
Beautiful bounds at a cost of infinitely many switching in a finite horizon.
Zeno's or chattering phenomenon
Zeno's or chattering phenomenon
Binary Convexified Linear Problem with Switching Cost (BCS)
\begin{align*}
&\underset{x(\cdot),u(\cdot),w(\cdot)}{\text{minimize}}
& & \sum_{i=1}^{2^{n^w}} \psi(x(\cdot),u(\cdot),w^i)\alpha_i(\cdot) + \sum_{j=1}^{n^w}\pi_j \sigma_j \\
&\text{subject to}
& &\dot{x}(t) = \sum_{i=1}^{2^{n^w}}f(t, x(t),u(t), w^i)\alpha_i(\cdot) \;\; \forall t \in \mathcal{T}, \\
&&& x(t_0) = x_0,w(t) \in \{0,1\}^{n^w} \;\; \forall t \in \mathcal{T}, 1 = \sum_{i=1}^{2^{n^w}}w_i(t),\\
&&& \sigma_j=\sum_{i=0}^{m-1}|w_{i+1,j}-w_{i,j}|, \sigma_j \le \sigma_{j,max}
\end{align*}
Relaxed Convexified Linear Problem with Switching Cost (RCS)
\begin{align*}
&\underset{x(\cdot),u(\cdot),w(\cdot)}{\text{minimize}}
& & \sum_{i=1}^{2^{n^w}} \psi(x(\cdot),u(\cdot),w^i)\alpha_i(\cdot) + \sum_{j=1}^{n^w}\pi_j \sigma_j \\
&\text{subject to}
& &\dot{x}(t) = \sum_{i=1}^{2^{n^w}}f(t, x(t),u(t), w^i)\alpha_i(\cdot) \;\; \forall t \in \mathcal{T}, \\
&&& x(t_0) = x_0,w(t) \in [0,1]^{n^w} \;\; \forall t \in \mathcal{T}, 1 = \sum_{i=1}^{2^{n^w}}w_i(t),\\
&&& \sigma_j=\sum_{i=0}^{m-1}|w_{i+1,j}-w_{i,j}|, \sigma_j \le \sigma_{j,max}
\end{align*}
No Free Switching, no chattering, no Zeno's Phenomenon
Though it is possible to solve an integer OCP to optimality, we choose a more economical strategy and make best out of the limited computing budget.
KIRCHES, CHRISTIAN. Fast Numerical Methods for Mixed-Integer Nonlinear Model-Predictive Control, 2010, PhD dissertation.