Appendix: Proof of Theorem 2.1
A switched dynamic system is described in Eq. (1) below. The initial system equations g
1 are dependent on the state, control, and time. The second equations of the system g
2 are also dependent on the switching time. Note that, since this is a physical (causal) system, g
1 cannot depend on the future switching instance.
$$ \dot{x}(t) = \left \{\begin{array}{l@{\quad}l} g_{1} ( x ( t ),u (t ),t ), & t \in [t_{0},t_{s}], \\ g_{2} ( x ( t ),u ( t ),t,t_{s} ), & t \in\, ]t_{s},t_{f}]. \end{array} \right . $$
(31)
The state variable x(t), and the control variable u(t), are of dimensions n and m, respectively.
The switching may be constrained by the general interior constraint
$$ \psi ( x_{s},t_{s} ) = 0. $$
(32)
The control u is piecewise continuous (PWC), g
1 and g
2 are continuous and have all of the required partial derivatives; but we may have g
1(t
s
)≠g
2(t
s
), i.e. no continuity of the state derivatives at the switching instance. The result is that \(\dot{x}\) is PWC, and x is piece wise smooth (PWS).
We want to minimize the general cost function
$$ J: = \varphi ( x_{f},t_{f} ) + \int_{t_{0}}^{t_{f}} L ( x,u,t )\,dt, $$
(33)
for specified initial conditions, but the switching time and the final time are free.
Let us adjoin the performance index with the system equations, using the Lagrange multipliers (costates) λ(t); and adjoin the interior constraint, using the constant Lagrange multiplier ν ([6]; see also the discussion in [7]).
$$\begin{aligned} \tilde{J} =& \varphi ( x_{f},t_{f} ) + \nu^{T} \psi ( x_{s},t_{s} ) + \int_{t_{0}}^{t_{s}} \bigl[ L ( x,u,t ) + \lambda^{T} ( g_{1} - \dot{x} ) \bigr] \,dt \\ &{}+ \int_{t_{s}}^{t_{f}} \bigl[ L ( x,u,t ) + \lambda^{T} ( g_{2} - \dot{x} ) \bigr]\,dt. \end{aligned}$$
(34)
The perturbed cost, taking into account the variations in the state; the control; the switching time; and the free final time, is
$$\begin{aligned} &\tilde{J} ( x + \delta x,u + \delta u,t_{s} + \delta t_{s},t_{f} + \delta t_{f} ) \\ &\quad= \tilde{J} + \delta \tilde{J} = \varphi ( x_{f},t_{f} ) + \frac{\partial \varphi}{\partial x}\,dx \bigg|_{t_{f}} + \frac{\partial \varphi}{\partial t}\delta t_{f} \bigg|_{t_{f}} \\ &\qquad{} + \nu^{T} \biggl( \psi ( x_{s},t_{s} ) + \frac{\partial \psi}{\partial x}\,dx \bigg|_{t_{s}} + \frac{\partial \psi}{\partial t}\delta t_{s} \bigg|_{t_{s}} \biggr) \\ &\qquad{} + \int_{t_{0}}^{t_{s} + \delta t_{s}} \biggl[ L + \frac{\partial L}{\partial x}\delta x + \frac{\partial L}{\partial u}\delta u \\ &\qquad{}+ \lambda^{T} \biggl( g_{1} + \frac{\partial g_{1}}{\partial x}\delta x + \frac{\partial g_{1}}{\partial u}\delta u \biggr) - \lambda^{T} ( \dot{x} + \delta \dot{x} ) \biggr]\,dt \\ &\qquad{} + \int_{t_{s} + \delta t_{s}}^{t_{f} + \delta t_{f}} \biggl[ L + \frac{\partial L}{\partial x}\delta x + \frac{\partial L}{\partial u}\delta u \\ &\qquad{}+ \lambda^{T} \biggl( g_{2} + \frac{\partial g_{2}}{\partial x}\delta x + \frac{\partial g_{2}}{\partial u}\delta u + \frac{\partial g_{2}}{\partial t_{s}}\delta t_{s} \biggr) - \lambda^{T} ( \dot{x} + \delta \dot{x} ) \biggr]\,dt. \end{aligned}$$
(35)
Subtracting (34) from (35), results in the variation in the cost:
$$\begin{aligned} \delta \tilde{J} =& \frac{\partial \varphi}{ \partial x}\,dx \bigg|_{t_{f}} + \frac{\partial \varphi}{\partial t} \delta t_{f} \bigg|_{t_{f}} + \nu^{T} \frac{\partial \psi}{ \partial x}\,dx \bigg|_{t_{s}} + \nu^{T} \frac{\partial \psi}{ \partial t}\delta t_{s} \bigg|_{t_{s}} \\ &{} + \int_{t_{0}}^{t_{s}} \biggl[ \frac{\partial L}{\partial x} \delta x + \frac{\partial L}{\partial u}\delta u + \lambda^{T} \biggl( \frac{\partial g_{1}}{\partial x}\delta x + \frac{\partial g_{1}}{\partial u}\delta u \biggr) - \lambda^{T}\delta \dot{x} \biggr]\,dt \\ &{} + \int_{t_{s}}^{t_{s} + \delta t_{s}} \biggl[ L + \frac{\partial L}{\partial x}\delta x + \frac{\partial L}{\partial u}\delta u + \lambda^{T} \biggl( g_{1} + \frac{\partial g_{1}}{\partial x}\delta x + \frac{\partial g_{1}}{\partial u}\delta u \biggr) \\ &{}- \lambda^{T} ( \dot{x} + \delta \dot{x} ) \biggr]\,dt \\ &{} + \int_{t_{s}}^{t_{f}} \biggl[ \frac{\partial L}{\partial x} \delta x + \frac{\partial L}{\partial u}\delta u + \lambda^{T} \biggl( \frac{\partial g_{2}}{\partial x}\delta x + \frac{\partial g_{2}}{\partial u}\delta u + \frac{\partial g_{2}}{\partial t_{s}}\delta t_{s} \biggr) - \lambda^{T}\delta \dot{x} \biggr]\,dt \\ &{} + \int_{t_{f}}^{t_{f} + \delta t_{f}} \biggl[ L + \frac{\partial L}{\partial x}\delta x + \frac{\partial L}{\partial u}\delta u + \lambda^{T} \biggl( g_{2} + \frac{\partial g_{2}}{\partial x}\delta x + \frac{\partial g_{2}}{\partial u}\delta u + \frac{\partial g_{2}}{\partial t_{s}}\delta t_{s} \biggr) \\ &{}- \lambda^{T} ( \dot{x} + \delta \dot{x} ) \biggr]\,dt \\ &{} - \int_{t_{s}}^{t_{s} + \delta t_{s}} \biggl[ L + \frac{\partial L}{\partial x}\delta x + \frac{\partial L}{\partial u}\delta u + \lambda^{T} \biggl( g_{2} + \frac{\partial g_{2}}{\partial x}\delta x + \frac{\partial g_{2}}{\partial u}\delta u + \frac{\partial g_{2}}{\partial t_{s}}\delta t_{s} \biggr) \\ &{} - \lambda^{T} ( \dot{x} + \delta \dot{x} ) \biggr]\,dt. \end{aligned}$$
(36)
Integration by parts of \(\int_{t_{1}}^{t_{2}} \lambda^{T}\delta \dot{x}\,dt = \lambda^{T}\delta x |_{t_{2}} - \lambda^{T}\delta x |_{t_{1}} - \int_{t_{1}}^{t_{2}} \dot{\lambda}^{T}\delta x\,dt\), results in
$$\begin{aligned} \delta \tilde{J} =& \frac{\partial \varphi}{ \partial x}\,dx \bigg|_{t_{f}} + \frac{\partial \varphi}{\partial t} \delta t_{f}\bigg |_{t_{f}} + \nu^{T} \frac{\partial \psi}{ \partial x}\,dx \bigg|_{t_{s}} + \nu^{T} \frac{\partial \psi}{ \partial t}\delta t_{s} \bigg|_{t_{s}} \\ &{} + \int_{t_{0}}^{t_{s}} \biggl[ \frac{\partial L}{\partial x} \delta x + \frac{\partial L}{\partial u}\delta u + \lambda^{T} \biggl( \frac{\partial g_{1}}{\partial x}\delta x + \frac{\partial g_{1}}{\partial u}\delta u \biggr) + \dot{ \lambda}^{T}\delta x \biggr]\,dt \\ &{}- \lambda^{T}\delta x \big|_{t_{s}^{ -}} + \lambda^{T}\delta x \big|_{t_{0}} \\ &{} + \int_{t_{s}}^{t_{s} + \delta t_{s}} \biggl[ L + \frac{\partial L}{\partial x}\delta x + \frac{\partial L}{\partial u}\delta u + \lambda^{T} \biggl( g_{1} + \frac{\partial g_{1}}{\partial x}\delta x + \frac{\partial g_{1}}{\partial u}\delta u \biggr) \\ &{}- \lambda^{T} ( \dot{x} + \delta \dot{x} ) \biggr]\,dt \\ &{} + \int_{t_{s}}^{t_{f}} \biggl[ \frac{\partial L}{\partial x} \delta x + \frac{\partial L}{\partial u}\delta u + \lambda^{T} \biggl( \frac{\partial g_{2}}{\partial x}\delta x + \frac{\partial g_{2}}{\partial u}\delta u + \frac{\partial g_{2}}{\partial t_{s}}\delta t_{s} \biggr) + \dot{\lambda}^{T}\delta x \biggr]\,dt \\ &{}- \lambda^{T}\delta x \big|_{tf} + \lambda^{T}\delta x \big|_{t_{s}^{ +}} \\ &{} + \int_{t_{f}}^{t_{f} + \delta t_{f}} \biggl[ L + \frac{\partial L}{\partial x}\delta x + \frac{\partial L}{\partial u}\delta u + \lambda^{T} \biggl( g_{2} + \frac{\partial g_{2}}{\partial x}\delta x + \frac{\partial g_{2}}{\partial u}\delta u + \frac{\partial g_{2}}{\partial t_{s}}\delta t_{s} \biggr) \\ &{}- \lambda^{T} ( \dot{x} + \delta \dot{x} ) \biggr]\,dt \\ &{} - \int_{t_{s}}^{t_{s} + \delta t_{s}} \biggl[ L + \frac{\partial L}{\partial x}\delta x + \frac{\partial L}{\partial u}\delta u + \lambda^{T} \biggl( g_{2} + \frac{\partial g_{2}}{\partial x}\delta x + \frac{\partial g_{2}}{\partial u}\delta u + \frac{\partial g_{2}}{\partial t_{s}}\delta t_{s} \biggr) \\ &{}- \lambda^{T} ( \dot{x} + \delta \dot{x} ) \biggr]\,dt. \end{aligned}$$
(37)
In the first order variation, the approximation \(\int_{t}^{t + \delta t} f\,dt \approx f\delta t\) is used. Using this approximation, and neglecting higher order terms such as δx⋅δt; \(\delta \dot{x} \cdot \delta t\); and δu⋅δt, leads to
$$\begin{aligned} \delta \tilde{J} =& \frac{\partial \varphi}{ \partial x}\,dx \bigg|_{t_{f}} + \frac{\partial \varphi}{\partial t} \delta t_{f} \bigg|_{t_{f}} + \nu^{T} \frac{\partial \psi}{ \partial x}\,dx \bigg|_{t_{s}} + \nu^{T} \frac{\partial \psi}{ \partial t}\delta t_{s} \bigg|_{t_{s}} \\ &{} + \int_{t_{0}}^{t_{s}} \biggl[ \biggl( \frac{\partial L}{\partial x} + \lambda^{T}\frac{\partial g_{1}}{\partial x} + \dot{ \lambda}^{T} \biggr)\delta x + \biggl( \frac{\partial L}{\partial u} + \lambda^{T}\frac{\partial g_{1}}{\partial u} \biggr)\delta u \biggr]\,dt - \lambda^{T}\delta x \big|_{t_{s}^{ -}} \\ &{} + \lambda^{T}\delta x \big|_{t_{0}} + \bigl( L + \lambda^{T}g_{1} - \lambda^{T} \dot{x} \bigr) \big|_{t_{s}}\delta t_{s} \\ &{} + \int_{t_{s}}^{t_{f}} \biggl[ \biggl( \frac{\partial L}{\partial x} + \lambda^{T}\frac{\partial g_{2}}{\partial x} + \dot{ \lambda}^{T} \biggr)\delta x + \biggl( \frac{\partial L}{\partial u} + \lambda^{T}\frac{\partial g_{2}}{\partial u} \biggr)\delta u + \lambda^{T} \frac{\partial g_{2}}{\partial t_{s}}\delta t_{s} \biggr]\,dt \\ &{} - \lambda^{T}\delta x \big|_{tf} + \lambda^{T}\delta x \big|_{t_{s}^{ +}} \\ &{} + \bigl( L + \lambda^{T}g_{2} - \lambda^{T} \dot{x} \bigr) \big|_{t_{f}}\delta t_{f} - \bigl( L + \lambda^{T}g_{2} - \lambda^{T}\dot{x} \bigr) \big|_{t_{s}}\delta t_{s}. \end{aligned}$$
(38)
The Hamiltonian is defined as
$$ H ( x,u,t,\lambda ): = \left \{\begin{array}{l@{\quad}l} L + \lambda^{T}g_{1}, & t \in [t_{0},t_{s}], \\ L + \lambda^{T}g_{2}, & t \in\, ]t_{s},t_{f}]. \end{array} \right . $$
(39)
For simplicity, the costates are chosen in a manner that causes the coefficients of δx to vanish
$$ \dot{\lambda}^{T} = - \frac{\partial H}{\partial x} = \left \{ \begin{array}{l@{\quad}l} - \frac{\partial L}{\partial x} - \lambda^{T}\frac{\partial g_{1}}{\partial x}, & t \in [t_{0},t_{s}], \\ - \frac{\partial L}{\partial x} - \lambda^{T}\frac{\partial g_{2}}{\partial x}, & t \in\, ]t_{s},t_{f}]. \end{array} \right . $$
(40)
Using (39) and (40), the cost variation becomes
$$\begin{aligned} \delta \tilde{J} =& \frac{\partial \varphi}{ \partial x}\,dx \bigg|_{t_{f}} + \frac{\partial \varphi}{\partial t} \delta t_{f}\bigg |_{t_{f}} + \nu^{T} \frac{\partial \psi}{ \partial x}\,dx \bigg|_{t_{s}} + \nu^{T} \frac{\partial \psi}{ \partial t}\delta t_{s} \bigg|_{t_{s}} \\ &{} + \int_{t_{0}}^{t_{s}} \frac{\partial H}{\partial u}\delta u \,dt - \lambda^{T}\delta x\big |_{t_{s}^{ -}} + \lambda^{T} \delta x \big|_{t_{0}} + H |_{t_{s}^{ -}} \delta t_{s} - \lambda^{T}\dot{x} \big|_{t_{s}}\delta t_{s} \\ &{} + \int_{t_{s}}^{t_{f}} \frac{\partial H}{\partial u}\delta u\,dt + \int_{t_{s}}^{t_{f}} \lambda^{T} \frac{\partial g_{2}}{\partial t_{s}}\delta t_{s}\,dt - \lambda^{T}\delta x \big|_{tf} + \lambda^{T}\delta x \big|_{t_{s}^{ +}} \\ &{} + H |_{t_{f}}\delta t_{f} - \lambda^{T} \dot{x}\big|_{t_{f}}\delta t_{f} - H |_{t_{s}^{ +}} \delta t_{s} + \lambda^{T}\dot{x} \big|_{t_{s}}\delta t_{s}. \end{aligned}$$
(41)
Note that δx is the variation in x for a fixed time, whereas dx is the total variation including the time variation. For the terminal time, we have \(dx_{f} = \delta x_{f} + \dot{x} ( t_{f} )\delta t_{f}\); and for the switching time, we have \(dx_{s} = \delta x_{s} + \dot{x} ( t_{s} )\delta t_{s}\). Substituting these relations into the cost variation results in
$$\begin{aligned} \delta \tilde{J} =& \frac{\partial \varphi}{ \partial x}\,dx \bigg|_{t_{f}} + \frac{\partial \varphi}{\partial t} \delta t_{f} \bigg|_{t_{f}} + \nu^{T} \frac{\partial \psi}{ \partial x}\,dx \bigg|_{t_{s}} + \nu^{T} \frac{\partial \psi}{ \partial t}\delta t_{s} \bigg|_{t_{s}} \\ &{} + \int_{t_{0}}^{t_{s}} \frac{\partial H}{\partial u}\delta u \,dt - \lambda^{T} ( dx - \dot{x}\delta t_{s} ) \big|_{t_{s}^{ -}} + \lambda^{T}\delta x \big|_{t_{0}} + H |_{t_{s}^{ -}} \delta t_{s} - \lambda^{T}\dot{x} \big|_{t_{s}}\delta t_{s} \\ &{} + \int_{t_{s}}^{t_{f}} \frac{\partial H}{\partial u}\delta u \,dt + \int_{t_{s}}^{t_{f}} \lambda^{T} \frac{\partial g_{2}}{\partial t_{s}}\delta t_{s}\,dt - \lambda^{T} ( dx - \dot{x}\delta t_{f} ) \big|_{tf} + \lambda^{T} ( dx - \dot{x}\delta t_{s} ) \big|_{t_{s}^{ +}} \\ &{}+ H |_{t_{f}}\delta t_{f} - \lambda^{T}\dot{x} \big|_{t_{f}}\delta t_{f} - H |_{t_{s}^{ +}} \delta t_{s} + \lambda^{T}\dot{x} \big|_{t_{s}}\delta t_{s}. \end{aligned}$$
(42)
Collecting terms, we have
$$\begin{aligned} \delta \tilde{J} =& \biggl( \frac{\partial \varphi}{ \partial x} - \lambda^{T} \biggr)\,dx \bigg|_{t_{f}} + \biggl( H + \frac{\partial \varphi}{\partial t} \biggr)\delta t_{f} \bigg|_{t_{f}} + \int_{t_{0}}^{t_{s}} \frac{\partial H}{\partial u}\delta u\,dt \\ &{}+ \int_{t_{s}}^{t_{f}} \frac{\partial H}{\partial u}\delta u\,dt + \lambda^{T}\delta x \big|_{t_{0}} + \biggl( \nu^{T}\frac{\partial \psi}{ \partial x_{s}} - \lambda^{T} \big|_{t_{s}^{ -}} + \lambda^{T} \big|_{t_{s}^{ +}} \biggr)\,dx_{s} \\ &{}+ \biggl( \nu^{T}\frac{\partial \psi}{\partial t_{s}} + H |_{t_{s}^{ -}} - H |_{t_{s}^{ +}} + \int_{t_{s}}^{t_{f}} \lambda^{T}\frac{\partial g_{2}}{\partial t_{s}}\,dt \biggr)\delta t_{s}. \end{aligned}$$
(43)
For an extremum, the cost should be non-improving, i.e. δJ≥0 for each of the variations. This leads to the following conditions.
-
(a)
For unconstrained continuous control, the optimality condition is
$$ \frac{\partial H}{\partial u} = 0. $$
(44)
-
(b)
The known transversality conditions, used for boundary values on the costates, are
$$ \biggl( \frac{\partial \varphi}{\partial x} - \lambda^{T} \biggr)\,dx\bigg |_{t_{f}} = 0;\qquad \biggl( H + \frac{\partial \varphi}{ \partial t} \biggr)\delta t_{f} \bigg|_{t_{f}} = 0;\qquad \lambda^{T}\delta x \big|_{t_{0}} = 0. $$
(45)
-
(c)
A new transversality condition, at the switching instance, takes the form of
$$ \biggl( \nu^{T}\frac{\partial \psi}{\partial x_{s}} - \lambda^{T} \big|_{t_{s}^{ -}} + \lambda^{T} \big|_{t_{s}^{ +}} \biggr)\,dx_{s} = 0. $$
(46)
-
(d)
A new condition for optimality of the switching instance (the parameter control) turns out to be
$$ \biggl( \nu^{T}\frac{\partial \psi}{\partial t_{s}} + H |_{t_{s}^{ -}} - H |_{t_{s}^{ +}} + \int_{t_{s}}^{t_{f}} \lambda^{T}\frac{\partial g_{2}}{\partial t_{s}}\,dt \biggr)\delta t_{s} = 0. $$
(47)
Note: The term \(\int_{t_{s}}^{t_{f}} \lambda^{T}\frac{\partial g_{2}}{\partial t_{s}}\,dt\), in Eq. (47), is the additional term added due to the dependence of the system equation on the switching time.