# Optimality Condition-Based Sensitivity Analysis of Optimal Control for Hybrid Systems and Its Application

Authors: Chunyue Song
Journal: Mathematical Problems in Engineering
 (2012)

---

## Abstract

Gradient-based algorithms are efficient to compute numerical solutions of optimal control problems for hybrid systems (OCPHS), and the key point is how to get the sensitivity analysis of the optimal control problems. In this paper, optimality condition-based sensitivity analysis of optimal control for hybrid systems with mode invariants and control constraints is addressed under a priori fixed mode transition order. The decision variables are the mode transition instant sequence and admissible continuous control functions. After equivalent transformation of the original problem, the derivatives of the objective functional with respect to control variables are established based on optimal necessary conditions. By using the obtained derivatives, a control vector parametrization method is implemented to obtain the numerical solution to the OCPHS. Examples are given to illustrate the results.


---

## Body

## 1. Introduction

In many fields of applications, such as powertrain systems of automobiles and multistage chemical processes, dynamics of the systems involve a sequence of distinct modes with fixed mode transition order, forming a hybrid system characterized by the coexistence and interaction of discrete and continuous dynamics (the mode is commonly denoted by a discrete state of the systems in hybrid systems literature). To achieve some overall optimal performance for the systems, the duration and the admissible continuous control function of each mode must be determined as a whole [1–3]; thus, it necessitates the use of theories and techniques for the analysis and synthesis of hybrid dynamical systems. With the growing importance of hybrid models, various classes of hybrid systems for analysis, design, and optimization have been addressed by research communities in recent years. For more discussions on various literature results, the reader is referred to [4–8], and the references therein.The existed results on OCPHS can be divided into the following two categories. One is about the optimal control theory on OCPHS. The theory inherits conventional optimal control theory and can be regarded as the extension of conventional optimal control theory [3, 9–14]. When control can take any value, Xu and Antsaklis [3] and Hwang et al. [9] addressed the variational method for hybrid systems. Sussmann [10], Shaikh and Caines [11], and Dmitruk and Kaganovich [12] established the Maximum Principle for hybrid systems with control constraints. Branicky et al. [14] and Bensoussan and Menaldi [13] provided the dynamic programming principle for general hybrid systems.The other results focus on how to compute optimal control for OCPHS, which can be carried out by using a wide variety of methods (see [3, 6, 11, 15–20] and the references therein). Given a prespecified order of mode transitions, Xu and Antsaklis [3] obtained the optimal continuous control and optimal switching instants based on parameterization of the switching instant for switching hybrid systems with free control. Under a fixed switching sequence of modes, Attia et al. [19] considered an optimization problem for a class of impulsive hybrid systems where continuous control function is not involved. When switching hybrid systems with control constraints are considered, Shaikh and Caines [11] proposed two algorithms for obtaining the optimal control. As far as switching hybrid systems without external continuous control function are concerned, Egerstedt et al. [6] and Johnson and Murphey [18] derived the gradients and second-order derivatives of the cost functional, respectively, and used them to design an associated algorithm to get the mode transition instants. Based on the hybrid Maximum Principle, Taringoo and Caines [20] provided gradient geodesic and Newton geodesic algorithms for the optimization of autonomous hybrid systems, and convergence analysis for the algorithms was also provided. From the view of dynamic programming, Seatzu et al. [16] provided an optimal state feedback control law to switched piecewise affine autonomous systems. Generally, these algorithms pose the hierarchy [17, 21, 22], and the basic module of the hierarchical algorithms is how to get optimal continuous control and optimal mode transition instants, though the main challenge of OCPHS is how to get the optimal mode transition order. The basic module of the hierarchical algorithms is commonly gradient based due to that gradient information can provide a better searching direction and hence reduce computation burden and help the gradient-based algorithms converge quickly, which motivates us to pay attention to the sensitivity analysis of optimal control for hybrid systems.Although the derivative of cost functional with respect to switching instants has been discussed in the aforementioned literature [3, 6, 18], the derivative of cost functional with respect to control function is not involved. When hybrid systems are considered, due to the coexistence and interaction of discrete and continuous dynamics, the derivative of cost functional w.r.t control functions is nontrivial and is not directly formulated by ∂H/∂u as conventional optimal control indicates, where H is the Hamiltonian function. The derivative will be a function of the derivatives of continuous states w.r.t control functions at the instants of subsequent modes. In this paper, the derivatives of cost functional w.r.t control functions are established analytically, which can facilitate the design of associated gradient-based algorithms.Motivated by the work of Vassiliadis et al. [1, 2] and Jennings et al. [23], in this paper, optimal control problem of hybrid systems (OCPHS) with mode invariants which describe the conditions that continuous states have to satisfy at this mode are considered. Based on optimal necessary conditions, the derivatives of the objective functional w.r.t control variables, that is, the mode transition instant sequence and admissible continuous control functions, are derived analytically. As a result, a control vector parametrization method is implemented to obtain the numerical solution to optimal control of the hybrid systems with the obtained derivatives. The sensitivity analysis in Vassiliadis et al. [1, 2] is similar to the work, in which the sensitivity of states w.r.t control parameters is directly obtained from the state equations and the sensitivity of objective functional with respect to control parameters is not involved. In contrast, this paper derives the derivatives of cost functional w.r.t control variables based on the optimality conditions and gives the explicitly expression of the derivatives. Therefore, the main contributions of this paper are listed as follows. (a) Optimality conditions-based sensitivity analysis of optimal control for hybrid systems with mode invariants are given explicitly, and (b) following the given derivatives, a control vector parameterization method is designed to obtain the numerical solution. Compared with the existing results on the OCPHS with fixed mode transition order, the settings in this paper cover not only the control constraints, but also the continuous states constraints, which makes the results here more general.The paper is organized as follows. In the next section, the hybrid system with mode invariants and its optimal control problem are formulated. In Section3, the equivalent problem and associated optimal conditions are analyzed. The derivatives of the objective functional w.r.t control variables are established in Section 4, and a control vector parametrization approach is also proposed in this section. Some numerical examples are presented in Section 5, and Section 6 contains conclusions.Terminology and Notation
ℕ denotes the set of positive integers. ℝ and ℝ+ denote the set of real numbers and nonnegative real numbers, respectively. AT denotes the transpose of a vector (or a matrix) A. Cl([a,b],ℝn) denotes the family of continuous functions f from [a,b] to ℝn with up to l order derivatives. ∥·∥ denotes the Euclidean norm.


## 2. Hybrid Systems and Its Optimal Control Problem

### 2.1. Hybrid Systems

Engineered systems, such as chemical engineering systems and powertrain systems of automobiles, always undergo multiple modes which are represented by a discrete statei taking values from set I≐{1,2,…,M} and pose hybrid characters. The evolution of discrete state i is determined by mode transition sequence. A mode transition sequence schedules the sequence of active modes ij,ij∈I and is a sequence of pairs of (tj-1,ij), which can be defined by {(t0,i1),(t1,i2),…}≐(θ,π) where θ≐{t0,t1,…} and π≐{i1,i2,…} are referred to as mode transition instants and mode transition order, respectively. A pair of (tj-1,ij) indicates that at instant tj-1, the hybrid system transits from mode ij-1 to mode ij. During the time interval [tj-1,tj), mode ij is active and unchanged.The mode transition orderπ of the considered hybrid dynamical systems is known a priori. Without loss of generality, it is supposed that the mode transition order is {i1,i2,…,iK} over the finite horizon [t0,tf], ij∈I, j=1,2,…,K. Moreover, according to each distinct mode, the continuous states are restricted in a specified range which is referred to as mode invariants. Here, the mode invariants are formulated by a set of inequalities. Thus, for each mode ij∈I and its active horizon [tj-1,tj), the dynamics of the considered systems can be formulated by
(2.1)x˙=fij(x,u),pij(x)<0,x(tj-1)=ψij(x(tj-1-)),gij(x(tj-))=0,
where x∈ℝn, u∈Uij⊆ℝm is a piecewise continuous function, fij:ℝn×Uij→ℝn, tj is the mode transition instant when a particular mode transition occurs, pij, ψij, and gij are hij<n, n and rij≤n dimensional vectors for ij∈I, respectively. n,m,hij,rij∈ℕ. To make the hybrid systems formulated by (2.1) well defined, the following assumption is needed.Assumption 2.1.
For anyij∈I, fij∈Cl(ℝn×Uij;ℝn),l≥1,l∈ℕ, and such that a uniform Lipschitz condition holds, that is, there exists Kf<∞ such that
(2.2)∥fij(x,u)-fij(x′,u)∥≤Kf∥x-x'∥,
where x,x′∈ℝn,u∈Uij.Remark 2.2.
p
i
j
(
x
)
<
0 indicates mode invariant for mode ij∈I, which describes the conditions that the continuous states have to satisfy at this mode and can be referred to as the path constraints of the continuous states in Vassiliadis et al. [1, 2].Remark 2.3.
g
i
j
(
x
(
t
j
-
)
)
=
0 can be referred to as mode transition conditions which describe the conditions on the continuous states under which a particular mode transition takes place. When mode ij is active over [tj-1,tj), then, at tj-, x meets an (n-rij)-dimensional smooth manifold Sij={x∣gij(x)=0} and mode transition from ij to ij+1 occurs. The mode transition conditions implicitly define the mode ij's active horizon [tj-1,tj). To prevent Zeno behavior from occurrence, tj-1<tj is assumed. Physically, the mode transition conditions are always the boundary of closure of the mode invariant pij<0.Remark 2.4.
x
(
t
j
-
1
)
=
ψ
i
j
(
x
(
t
j
-
1
-
)
) is the outcome of the mode transition and describes the effect that the transition will have on the continuous states. It can be viewed as junction conditions in Vassiliadis et al. [1, 2]. It is assumed that ψij∈Cl(ℝn), l≥1, l∈ℕ.Remark 2.5.
Basically, for general hybrid systems, the evaluation ofi should be formulated by a function of impulsive control or a graph, which generates mode transition sequence, as formulated in Song and Li [24] and Cassandras and Lygeros [8]. However, the order of the mode transition π is known a prior here thus, the evaluation of i is determined only by the transition instants tj, and the evaluation function of i is omitted here.
Besides Assumption2.1, to make the considered systems to be well defined, there are some additional assumptions on mode invariants and mode transition conditions should be imposed. Here, it is supposed that the mode invariants and mode transition conditions meet the requirements as in Taringoo and Caines [20].


### 2.2. Optimal Control Problem for Hybrid Systems

LetLi∈Cl(ℝn×Ui;ℝ) be a running cost function, φij∈Cl(ℝn;ℝ+) be a discrete state transition cost function, and ϕ∈Cl(ℝn;ℝ+) be a terminal cost function, i,j∈I, l≥1, l∈ℕ, respectively. The optimal control problem for the hybrid systems (2.1) is stated as follows.Optimal Problem A
Consider a hybrid system formulated by (2.1), given a fixed time interval [t0,tf] and a prespecified mode transition order π={i1,i2,…,iK}, find a continuous control u∈Uij in each mode ij∈I and mode transition instants θ={t1,…,tK-1}, such that the corresponding continuous state trajectory x departs from a given initial state x(t0)=x0 and meets an (n-lf)-dimensional smooth manifold Sf={x∣ϑ(x)=0,ϑ:ℝn→ℝlf}, lf∈ℕ, at tf and the cost functional
(2.3)J(θ,u)=ϕ(x(tf))+∫t0tfLi(t)(x(t),u(t))dt+∑j=1K-1φijij+1(x(tj-))
is minimized.Remark 2.6.
As it is well known, whent0 and tf are unknown points in some fixed interval T⊂ℝ+, this problem can be transformed to one with fixed time essentially by introducing an additional state variable.There are fruitful strategies about how to compute OCPHS (see [15] and the references therein), and the basic idea is briefly reviewed as follows for completeness.Obtaining the optimal control for hybrid systems is very difficult due to the interactions between the continuous states and discrete states which produce a mode transition sequence that increases the feasibility range of the decision variables. One algorithm framework for dealing with this complexity is the decomposition method as follows:(2.4)min((π,θ),u)J((π,θ),u)=min(π,θ)minuJ(u∣(π,θ))=minπminθminuJ((u,θ)∣π),
where J(·∣b) means that b is given.According to this framework, the master problem is how to get the optimum of the inner functional, that is, minimizeJ(u,θ) given π. The key point of finding the optimal solution of J(u,θ) is how to get the sensitivity of the objective with respect to control variables, which provides a better direction for searching and hence reduces computational burden and help associated algorithms converge quickly and accelerate the primary problem convergence eventually.In next section, the derivatives of cost functional with respect to control variables are established analytically based on optimality condition, which can facilitate the design of associated gradient-based algorithms.


## 2.1. Hybrid Systems

Engineered systems, such as chemical engineering systems and powertrain systems of automobiles, always undergo multiple modes which are represented by a discrete statei taking values from set I≐{1,2,…,M} and pose hybrid characters. The evolution of discrete state i is determined by mode transition sequence. A mode transition sequence schedules the sequence of active modes ij,ij∈I and is a sequence of pairs of (tj-1,ij), which can be defined by {(t0,i1),(t1,i2),…}≐(θ,π) where θ≐{t0,t1,…} and π≐{i1,i2,…} are referred to as mode transition instants and mode transition order, respectively. A pair of (tj-1,ij) indicates that at instant tj-1, the hybrid system transits from mode ij-1 to mode ij. During the time interval [tj-1,tj), mode ij is active and unchanged.The mode transition orderπ of the considered hybrid dynamical systems is known a priori. Without loss of generality, it is supposed that the mode transition order is {i1,i2,…,iK} over the finite horizon [t0,tf], ij∈I, j=1,2,…,K. Moreover, according to each distinct mode, the continuous states are restricted in a specified range which is referred to as mode invariants. Here, the mode invariants are formulated by a set of inequalities. Thus, for each mode ij∈I and its active horizon [tj-1,tj), the dynamics of the considered systems can be formulated by
(2.1)x˙=fij(x,u),pij(x)<0,x(tj-1)=ψij(x(tj-1-)),gij(x(tj-))=0,
where x∈ℝn, u∈Uij⊆ℝm is a piecewise continuous function, fij:ℝn×Uij→ℝn, tj is the mode transition instant when a particular mode transition occurs, pij, ψij, and gij are hij<n, n and rij≤n dimensional vectors for ij∈I, respectively. n,m,hij,rij∈ℕ. To make the hybrid systems formulated by (2.1) well defined, the following assumption is needed.Assumption 2.1.
For anyij∈I, fij∈Cl(ℝn×Uij;ℝn),l≥1,l∈ℕ, and such that a uniform Lipschitz condition holds, that is, there exists Kf<∞ such that
(2.2)∥fij(x,u)-fij(x′,u)∥≤Kf∥x-x'∥,
where x,x′∈ℝn,u∈Uij.Remark 2.2.
p
i
j
(
x
)
<
0 indicates mode invariant for mode ij∈I, which describes the conditions that the continuous states have to satisfy at this mode and can be referred to as the path constraints of the continuous states in Vassiliadis et al. [1, 2].Remark 2.3.
g
i
j
(
x
(
t
j
-
)
)
=
0 can be referred to as mode transition conditions which describe the conditions on the continuous states under which a particular mode transition takes place. When mode ij is active over [tj-1,tj), then, at tj-, x meets an (n-rij)-dimensional smooth manifold Sij={x∣gij(x)=0} and mode transition from ij to ij+1 occurs. The mode transition conditions implicitly define the mode ij's active horizon [tj-1,tj). To prevent Zeno behavior from occurrence, tj-1<tj is assumed. Physically, the mode transition conditions are always the boundary of closure of the mode invariant pij<0.Remark 2.4.
x
(
t
j
-
1
)
=
ψ
i
j
(
x
(
t
j
-
1
-
)
) is the outcome of the mode transition and describes the effect that the transition will have on the continuous states. It can be viewed as junction conditions in Vassiliadis et al. [1, 2]. It is assumed that ψij∈Cl(ℝn), l≥1, l∈ℕ.Remark 2.5.
Basically, for general hybrid systems, the evaluation ofi should be formulated by a function of impulsive control or a graph, which generates mode transition sequence, as formulated in Song and Li [24] and Cassandras and Lygeros [8]. However, the order of the mode transition π is known a prior here thus, the evaluation of i is determined only by the transition instants tj, and the evaluation function of i is omitted here.
Besides Assumption2.1, to make the considered systems to be well defined, there are some additional assumptions on mode invariants and mode transition conditions should be imposed. Here, it is supposed that the mode invariants and mode transition conditions meet the requirements as in Taringoo and Caines [20].


## 2.2. Optimal Control Problem for Hybrid Systems

LetLi∈Cl(ℝn×Ui;ℝ) be a running cost function, φij∈Cl(ℝn;ℝ+) be a discrete state transition cost function, and ϕ∈Cl(ℝn;ℝ+) be a terminal cost function, i,j∈I, l≥1, l∈ℕ, respectively. The optimal control problem for the hybrid systems (2.1) is stated as follows.Optimal Problem A
Consider a hybrid system formulated by (2.1), given a fixed time interval [t0,tf] and a prespecified mode transition order π={i1,i2,…,iK}, find a continuous control u∈Uij in each mode ij∈I and mode transition instants θ={t1,…,tK-1}, such that the corresponding continuous state trajectory x departs from a given initial state x(t0)=x0 and meets an (n-lf)-dimensional smooth manifold Sf={x∣ϑ(x)=0,ϑ:ℝn→ℝlf}, lf∈ℕ, at tf and the cost functional
(2.3)J(θ,u)=ϕ(x(tf))+∫t0tfLi(t)(x(t),u(t))dt+∑j=1K-1φijij+1(x(tj-))
is minimized.Remark 2.6.
As it is well known, whent0 and tf are unknown points in some fixed interval T⊂ℝ+, this problem can be transformed to one with fixed time essentially by introducing an additional state variable.There are fruitful strategies about how to compute OCPHS (see [15] and the references therein), and the basic idea is briefly reviewed as follows for completeness.Obtaining the optimal control for hybrid systems is very difficult due to the interactions between the continuous states and discrete states which produce a mode transition sequence that increases the feasibility range of the decision variables. One algorithm framework for dealing with this complexity is the decomposition method as follows:(2.4)min((π,θ),u)J((π,θ),u)=min(π,θ)minuJ(u∣(π,θ))=minπminθminuJ((u,θ)∣π),
where J(·∣b) means that b is given.According to this framework, the master problem is how to get the optimum of the inner functional, that is, minimizeJ(u,θ) given π. The key point of finding the optimal solution of J(u,θ) is how to get the sensitivity of the objective with respect to control variables, which provides a better direction for searching and hence reduces computational burden and help associated algorithms converge quickly and accelerate the primary problem convergence eventually.In next section, the derivatives of cost functional with respect to control variables are established analytically based on optimality condition, which can facilitate the design of associated gradient-based algorithms.


## 3. Equivalent Problem and Its Optimal Conditions

When control vector parametrization methods are implemented to obtain numerical solution to the OCPHS, updating the parameters of control profiles should be at the same time point when iterative procedure is running. However, the fact is that the mode active horizon[tj-1,tj) for mode ij∈I is varying during the procedure running, so a fixed horizon should be introduced, which will guarantee the updating of parameters of control profiles is at the same time point. For this purpose, let τ∈[0,K] be a time independent variable, and t∈[tj-1,tj) can be formulated by
(3.1)t=tj-1+(τ-(j-1))(tj-tj-1),τ∈[j-1,j),j=1,…,K.In addition, to deal with mode invariants constraintspij(x)<0, slack algebraic variable sij=[sij1,…,sijhij]T∈ℝ+hij is introduced for each mode ij∈I, such that pij(x)+diag[sij1,…,sijhij]sij=0. For τ∈[j-1,j), denote xj(τ)≐x(tj-1+(τ-(j-1))(tj-tj-1)), uj(τ)≐u(tj-1+(τ-(j-1))(tj-tj-1)), sj(τ)≐sij(tj-1+(τ-(j-1))(tj-tj-1)), and let x=[x1,…,xK]T, u=[u1,…,uK]T, and s=[s1,…,sK]T.According to the above definition, the Optimal Problem A can be transcribed into an equivalent Optimal Problem B as follows:Optimal Problem B
Given a fixed interval[0,K], find continuous inputs u∈Ui1×⋯×UiK, s∈ℝ+hi1×⋯×ℝ+hiK and θ, such that the corresponding continuous state trajectory x1 departs from a given initial state x1(0)=x0 and xK meets an (n-lf)-dimensional smooth manifold Sf={xK∣ϑ(xK)=0,ϑ:ℝn→ℝlf} at K, and the cost functional
(3.2)J~(θ,u,s)=ϕ(xK(K))+∑j=1K‍∫j-1jL~ij(xj(τ),uj(τ),sj(τ))dτ+∑j=1K-1φijij+1(xj(j-))
is minimized, subject to
(3.3)dxj(τ)dτ=f~ij(xj(τ),uj(τ))≐(tj-tj-1)fij(xj(τ),uj(τ)),xj(j-1)=ψij(xj-1((j-1)-)),gij(xj(j-))=0,
where
(3.4)L~ij(xj,uj,sj)=(tj-tj-1)L-ij,L-ij=Lij(xj,uj)+M∑l=1hij(pijl(xj)+sijl2)2,
and M is a large positive constant.According to Theorems 2 and 3 in Dmitruk and Kaganovich [12], when M is big enough Optimal Problem B is equivalent to Optimal Problem A.Remark 3.1.
The penalty function term, say,M∑l=1hij‍(pijl(xj)+sijl2)2, cannot always guarantee the state satisfies the mode invariant conditions. However, the method works well in practice; moreover, the mode transition order is fixed in this paper which reduces the negative effect of the penalty function method for OCPHS.Forτ∈[j-1,j), j=1,…,K, let λj∈ℝn, and define Hamiltonian function Hj by
(3.5)Hj(λj,xj,uj,sj)=L~ij(xj,uj,sj)+λjTf~ij(xj,uj),
and according to Sussmann [10], Shaikh and Caines [11], and Dmitruk and Kaganovich [12], the following Theorem 3.2 holds.Theorem 3.2.
In order thatu and s are optimal for Optimal Problem B, it is necessary that there exist vector functions λj, j=1,…,K, such that the following conditions hold:(a)
for almost anyτ∈[j-1,j), the following state equations hold:
(3.6)dxj(τ)dτ=f~ij(xj(τ),uj(τ)),(b)
for almost anyτ∈[j-1,j), the following costate equations hold:
(3.7)λ˙j=-(∂L~ij∂xj)T-(∂f~ij∂xj)Tλj,(c)
for a.e.τ∈[j-1,j),
(3.8)Hj(λj*,xj*,uj*,sj*)=0,(d)
minimality condition: for allτ∈[j-1,j),
(3.9)min{uj∈Uij,sj∈ℝ+hij}Hj(λj*,xj*,uj,sj*)=0,(e)
transversality conditions forλj,
(3.10)λj+1(j)=βj,j=1,…,K-1,λj(j-)=(∂gij∂xj(j-))Tαj-(∂ψij+1∂xj(j-))Tβj+(∂φijij+1∂xj(j-))T,j=1,…,K-1,λK(K)=(∂ϕ∂xK(K))T+(∂ϑ∂xK(K))TαK,where αj∈ℝhi, βj∈ℝn are Lagrangian multipliers. Based on Theorem 3.2, the sensitivity analysis is established in the next section for Optimal Problem B.


## 4. Sensitivity Analysis and Parametrization Method

For finding numerical solution to the OCPHS effectively, based on Theorem3.2, the derivatives of the objective functional J~(·) with respect to the control u, s, and the mode transition instant tj,j=1,…,K-1 are established in this section, and by using the obtained derivatives associated parametrization method is proposed.


### 4.1. Sensitivity Analysis

Lemma 4.1.
The derivatives ofxj(j-),j=1,…,K, w.r.t tk and uk are given, respectively, as follows for k=1,…,K-1,
(4.1)dxj(j-)dtk=0,j=1,…,k-1,dxk(k-)dtk=fik(xk(k-),uk(k-)),dxk+1((k+1)-)dtk=Ωk+1,dxj(j-)dtk=[∏l=k+2jΦl(l,l-1)dψildxl-1((l-1)-)]Ωk+1,j=k+2,…,K,(4.2)δxj(j-)δuk=0,j=1,…,k-1,δxk(k-)δuk=Γk(τ),δxj(j-)δuk=∏l=k+1j[Φl(l,l-1)dψildxl-1((l-1)-)]Γk(τ),j=k+1,…,K,
where
(4.3)Ωk+1=Φk+1(k+1,k)dψik+1dxk(k-)fik(xk(k-),uk(k-))-fik+1(xk+1(k),uk+1(k)),Γk(τ)=(tk-tk-1)Φk(k,τ)∂fik∂uk,Φl(τ,v)=exp(∫vτ‍(tl-tl-1)∂fil∂xlda).Note thatx(tj) is a functional vector of uk, and the expression δxj/δuk is used, where the notation δxj/δuk is the functional derivatives which describe the response of the functional xj to an infinitesimal change in the function uk at each point.Proof.
The proof of (4.1) is only going to be shown for easily reading. The proof for (4.2) can be found in Appendix.
Whenj=1,…,k-1, xj(j-) and xj+1(j) are independent of tk, and obviously dxj(j-)/dtk=0 holds. In the case of j=k, xk(k-) is a function of tk which gives rise to dxk(k-)/dtk=fik(xk(k-),uk(k-)).
Case i. (j=k+1). In this case, xk+1 is a function of tk and xk+1(k), and we have
(4.4)dxk+1(τ)dtk=∂xk+1∂tk+∂xk+1∂xk+1(k)∂xk+1(k)∂tk.
Note that in (4.4), ∂xk+1/∂tk is produced by the perturbation of tk, and (∂xk+1/∂xk+1(k))(∂xk+1(k)/∂tk) is produced by the perturbation of xk+1(k) with respect to tk. Obviously, for τ∈[k,k+1),
(4.5)∂xk+1(τ)∂tk=-fik+1(xk+1(k),uk+1(k)).
The solution to∂xk+1(τ)/∂xk+1(k) is given by
(4.6)∂xk+1(τ)∂xk+1(k+)=I+(tk+1-tk)∫kτ‍∂fik+1∂xk+1∂xk+1(v)∂xk+1(k)dv.
Equation (4.6) is a linear system about ∂xk+1/∂xk+1(k). Define the state transition matrix Φl(τ,v) by
(4.7)Φl(τ,v)=exp(∫vτ‍(tl-tl-1)∂fil(a)∂xl(a)da),
according to (4.6), and we have
(4.8)∂xk+1(τ)∂xk+1(k)=Φk+1(τ,k).
Thus,(4.9)dxk+1(τ)dtk=Φk+1(τ,k)∂xk+1(k)∂tk-fik+1(xk+1(k),uk+1(k)).
At transition instantstj, since xj+1(j)=ψij+1(xj(j-)), so
(4.10)dxj+1(j)dtk=dψij+1dxj(j-)dxj(j-)dtk,
which implies
(4.11)∂xk+1(k)∂tk=dψik+1dxk(k-)dxk(k-)dtk=dψik+1dxk(k-)fik(xk(k-),uk(k-)).
According to (4.9), and we have
(4.12)dxk+1((k+1)-)dtk=Φk+1(k+1,k)dψik+1dxk(k-)fik(xk(k-),uk(k-))-fik+1(xk+1(k),uk+1(k))≐Ωk+1.
Caseii. (j=k+2,…,K). When j=k+2,…,K, the following holds:
(4.13)dxj(τ)dtk=dxj(j-1)dtk+(tj-tj-1)∫j-1τ‍∂fij∂xjdxj(v)dtkdv,τ∈[j-1,j).
Then,(4.14)dxj(τ)dtk=Φj(τ,j-1)dxj(j-1)dtk.
Substituting the termdxj(j-1)/dtk in (4.14) by (4.10), we obtain
(4.15)dxj(j-)dtk=[∏l=k+2jΦl(l,l-1)dψildxl-1((l-1)-)]Ωk+1.Theorem 4.2.
The derivatives of the objective functionalJ~(·) w.r.t tk, uk and sk are given, respectively, as follows:
(4.16)dJ~dtk=L-ik(xk(k-),uk(k-),sk(k-))-L-ik+1(xk+1(k),uk+1(k),sk+1(k))+λk(k-)Tfik(xk(k-),uk(k-))-λk+1(k)Tfik+1(xk+1(k),uk+1(k))-∑j=kK-1‍αjT∂gij∂xj(j-)dxj(j-)dtk-αKT∂ϑ∂xK(K)dxK(K)dtkδJ~δuk=∂Hk∂uk-∑j=kK-1‍αjT∂gij∂xj(j-)δxj(j-)δuk-αKT∂ϑ∂xK(K)δxK(K)δukδJ~δsk=∂Hk∂sk.Before proving Theorem4.2, Lemma 4.3 is firstly given as follows.Lemma 4.3.
Forj=k+2,…,K,
(4.17)ddtk∫j-1j‍L~ij(xj,uj,sj)dτ=λj(j-1)Tdxj(j-1)dtk-λj(j-)Tdxj(j-)dtk.Proof.
For anyj=k+2,…,K, we have
(4.18)ddtk∫j-1j‍L~ij(xj,uj,sj)dτ=∫j-1jddtk(Hj(λj,xj,uj,sj)-λjTf~ij)dτ=∫j-1j(∂Hj∂xjdxjdtk+∂Hj∂λjdλjdtk-(dλjdtk)Tf~ij-λjTddtkf~ij)dτ.
Since the following holds by Theorem3.2,
(4.19)(∂Hj∂xj)T=-λ˙j,(∂Hj∂λj)T=f~ij,
then
(4.20)ddtk∫j-1jL~ij(xj,uj,sj)dτ=∫j-1j(-(λ˙j)Tdxjdtk+(f~ij)Tdλjdtk-(dλjdtk)Tf~ij-λjTddtkf~ij)dτ=∫j-1j‍(-(λ˙j)Tdxjdtk-λjTddtkf~ij)dτ=-∫j-1j‍ddτ(λjTdxjdtk)dτ=λj(j-1)Tdxj(j-1)dtk-λj(j-)Tdxj(j-)dtk.Obviously, whenj=k,k+1, we have
(4.21)ddtk∫k-1k‍L~ik(xk,uk,sk)dτ=ddtk∫tk-1tk‍L-ik(x,u,sik)dt=L-ik(xk(k-),uk(k-),sk(k-)),(4.22)ddtk∫kk+1‍L~ik+1(xk+1,uk+1,sk+1)dτ=λk+1(k)Tdxk+1(k)dtk-λk+1((k+1)-)Tdxk+1((k+1)-)dtk-L-ik+1(xk+1(k),uk+1(k),sk+1(k)).Now we prove Theorem4.2. We are only going to show dJ~/dtk for easily reading. The proofs for δJ~/δuk and δJ~/δsk can be found in Appendix.Proof.
J
~
(
θ
,
u
,
s
) can be formulated as
(4.23)J~(θ,u,s)=ϕ(xK(K))+∑j=1k-1‍∫j-1j‍L~ij(xj,uj,sj)dτ+∑j=kK‍∫j-1j‍L~ij(xj,uj,sj)dτ+∑j=1K-1‍φijij+1(xj(j-)).
SinceL~ij(·) is independent of tk for j=1,…,k-1, then dJ~/dtk can be obtained by
(4.24)dJ~dtk(θ,u,s)=∂ϕ(xK(K))∂xK(K)dxK(K)dtk+ddtk∑j=kK‍∫j-1j‍L~ij(xj,uj,sj)dτ+∑j=1K-1‍∂φijij+1∂xj(j-)dxj(j-)dtk.
Substituting (4.17), (4.21), and (4.22) into (4.24), we have
(4.25)dJ~dtk(θ,u,s)=∂ϕ(xK(K))∂xK(K)dxK(K)dtk+L-ik(xk(k-),uk(k-),sk(k-))-L-ik+1(xk+1(k),uk+1(k),sk+1(k))+λk+1(k)Tdxk+1(k)dtk+∂φikik+1∂xk(k-)dxk(k-)dtk-∑j=k+1K-1‍(λj(j-)Tdxj(j-)dtk-λj+1(j)Tdxj+1(j)dtk-∂φijij+1∂xj(j-)dxj(j-)dtk)-λK(K)TdxK(K)dtk.
Due to Theorem3.2 and (4.10), dJ~/dtk can be formulated by
(4.26)dJ~dtk(θ,u,s)=(∂ϕ(xK(K))∂xK(K)-λK(K)T)dxK(K)dtk+L-ik(xk(k-),uk(k-),sk(k-))-L-ik+1(xk+1(k),uk+1(k),sk+1(k))+λk(k-)Tdxk(k-)dtk-λk+1(k)Tfik+1(xk+1(k),uk+1(k))-αkT∂pik∂xk(k-)dxk(k-)dtk-∑j=kK-1‍αjT∂gij∂xj(j-)dxj(j-)dtk=L-ik(xk(k-),uk(k-),sk(k-))-L-ik+1(xk+1(k),uk+1(k),sk+1(k))+λk(k-)Tfik(xk(k-),uk(k-))-λk+1(k)Tfik+1(xk+1(k),uk+1(k))-∑j=kK-1‍αjT∂gij∂xj(j-)dxj(j-)dtk-αKT∂ϑ∂xK(K)dxK(K)dtk.Note that when second-order derivatives are needed, there is no difficulty to obtain the second-order derivatives following the above procedure.


### 4.2. Parametrization Method

To obtain the numerical solution to optimal control for hybrid systems, continuous control profiles are parameterized on each mode active horizon in this section. Then the numerical solution to optimal controls can be computed based on the obtained sensitivity analysis results. The basic idea behind the proposed method using finite parameterizations of the controls is to transcribe the original infinite dimensional problem, that is,C-problem, into a finite dimensional nonlinear programming problem, that is, P-problem [25]. Here, the parametrization method that the control profiles are approximated by a family of Lagrange form polynomials is implemented.Partition each horizon[j-1,j) into Nj elements as j-1=τj0<τj1<⋯<τjNj=j where τjl are referred to as collocation points, l=0,…,Nj. Let ujl denote the value of uj at τjl, l=0,…,Nj. Thus, the control variable uj is represented approximately by a Lagrange interpolation profile for j=1,…,K,
(4.27)uj(τ)=∑l=0Nj‍l^l(τ)ujl,τ∈[j-1,j),
where l^l(τ)=∏m=0,m≠lNj((τ-τjm)/(τjl-τjm)). sj is also parameterized by
(4.28)sj(τ)=∑l=0Nj‍l^l(τ)sjl,τ∈[j-1,j),
where sjl is the value of sj at the collocation points τjl, l=0,…,Nj.As a result, based on the obtained derivatives, the numerical solution ofu and θ to optimal control for the hybrid systems can be solved simultaneously and efficiently by adopting gradient-based algorithms as described in Xu and Antsaklis [3] and Egerstedt et al. [6]. Note that the derivatives are functions of costate λj as formulated in Theorem 4.2. When control polynomial profiles are implemented, a multipoint boundary value problem about state and costate expressed by (3.6), (3.7), and (3.10) will be solved, which produces the derivatives.Although the Lagrange interpolation profiles may cause the state or/and control trajectories violate their constraints, this parameterizations method has been proved useful in practice. Moreover, there are some techniques to decrease the defect [1, 2].Remark 4.4.
Control variableuj can be approximated by several piecewise Lagrange interpolation profiles by further partitioning the element [j-1,j). More detail of the parameterizations methods can be found in Vassiliadis et al. [1, 2], Kameswaran and Biegler [26], and the references therein. Only one Lagrange interpolation profile is used here to show the process of the proposed method.


## 4.1. Sensitivity Analysis

Lemma 4.1.
The derivatives ofxj(j-),j=1,…,K, w.r.t tk and uk are given, respectively, as follows for k=1,…,K-1,
(4.1)dxj(j-)dtk=0,j=1,…,k-1,dxk(k-)dtk=fik(xk(k-),uk(k-)),dxk+1((k+1)-)dtk=Ωk+1,dxj(j-)dtk=[∏l=k+2jΦl(l,l-1)dψildxl-1((l-1)-)]Ωk+1,j=k+2,…,K,(4.2)δxj(j-)δuk=0,j=1,…,k-1,δxk(k-)δuk=Γk(τ),δxj(j-)δuk=∏l=k+1j[Φl(l,l-1)dψildxl-1((l-1)-)]Γk(τ),j=k+1,…,K,
where
(4.3)Ωk+1=Φk+1(k+1,k)dψik+1dxk(k-)fik(xk(k-),uk(k-))-fik+1(xk+1(k),uk+1(k)),Γk(τ)=(tk-tk-1)Φk(k,τ)∂fik∂uk,Φl(τ,v)=exp(∫vτ‍(tl-tl-1)∂fil∂xlda).Note thatx(tj) is a functional vector of uk, and the expression δxj/δuk is used, where the notation δxj/δuk is the functional derivatives which describe the response of the functional xj to an infinitesimal change in the function uk at each point.Proof.
The proof of (4.1) is only going to be shown for easily reading. The proof for (4.2) can be found in Appendix.
Whenj=1,…,k-1, xj(j-) and xj+1(j) are independent of tk, and obviously dxj(j-)/dtk=0 holds. In the case of j=k, xk(k-) is a function of tk which gives rise to dxk(k-)/dtk=fik(xk(k-),uk(k-)).
Case i. (j=k+1). In this case, xk+1 is a function of tk and xk+1(k), and we have
(4.4)dxk+1(τ)dtk=∂xk+1∂tk+∂xk+1∂xk+1(k)∂xk+1(k)∂tk.
Note that in (4.4), ∂xk+1/∂tk is produced by the perturbation of tk, and (∂xk+1/∂xk+1(k))(∂xk+1(k)/∂tk) is produced by the perturbation of xk+1(k) with respect to tk. Obviously, for τ∈[k,k+1),
(4.5)∂xk+1(τ)∂tk=-fik+1(xk+1(k),uk+1(k)).
The solution to∂xk+1(τ)/∂xk+1(k) is given by
(4.6)∂xk+1(τ)∂xk+1(k+)=I+(tk+1-tk)∫kτ‍∂fik+1∂xk+1∂xk+1(v)∂xk+1(k)dv.
Equation (4.6) is a linear system about ∂xk+1/∂xk+1(k). Define the state transition matrix Φl(τ,v) by
(4.7)Φl(τ,v)=exp(∫vτ‍(tl-tl-1)∂fil(a)∂xl(a)da),
according to (4.6), and we have
(4.8)∂xk+1(τ)∂xk+1(k)=Φk+1(τ,k).
Thus,(4.9)dxk+1(τ)dtk=Φk+1(τ,k)∂xk+1(k)∂tk-fik+1(xk+1(k),uk+1(k)).
At transition instantstj, since xj+1(j)=ψij+1(xj(j-)), so
(4.10)dxj+1(j)dtk=dψij+1dxj(j-)dxj(j-)dtk,
which implies
(4.11)∂xk+1(k)∂tk=dψik+1dxk(k-)dxk(k-)dtk=dψik+1dxk(k-)fik(xk(k-),uk(k-)).
According to (4.9), and we have
(4.12)dxk+1((k+1)-)dtk=Φk+1(k+1,k)dψik+1dxk(k-)fik(xk(k-),uk(k-))-fik+1(xk+1(k),uk+1(k))≐Ωk+1.
Caseii. (j=k+2,…,K). When j=k+2,…,K, the following holds:
(4.13)dxj(τ)dtk=dxj(j-1)dtk+(tj-tj-1)∫j-1τ‍∂fij∂xjdxj(v)dtkdv,τ∈[j-1,j).
Then,(4.14)dxj(τ)dtk=Φj(τ,j-1)dxj(j-1)dtk.
Substituting the termdxj(j-1)/dtk in (4.14) by (4.10), we obtain
(4.15)dxj(j-)dtk=[∏l=k+2jΦl(l,l-1)dψildxl-1((l-1)-)]Ωk+1.Theorem 4.2.
The derivatives of the objective functionalJ~(·) w.r.t tk, uk and sk are given, respectively, as follows:
(4.16)dJ~dtk=L-ik(xk(k-),uk(k-),sk(k-))-L-ik+1(xk+1(k),uk+1(k),sk+1(k))+λk(k-)Tfik(xk(k-),uk(k-))-λk+1(k)Tfik+1(xk+1(k),uk+1(k))-∑j=kK-1‍αjT∂gij∂xj(j-)dxj(j-)dtk-αKT∂ϑ∂xK(K)dxK(K)dtkδJ~δuk=∂Hk∂uk-∑j=kK-1‍αjT∂gij∂xj(j-)δxj(j-)δuk-αKT∂ϑ∂xK(K)δxK(K)δukδJ~δsk=∂Hk∂sk.Before proving Theorem4.2, Lemma 4.3 is firstly given as follows.Lemma 4.3.
Forj=k+2,…,K,
(4.17)ddtk∫j-1j‍L~ij(xj,uj,sj)dτ=λj(j-1)Tdxj(j-1)dtk-λj(j-)Tdxj(j-)dtk.Proof.
For anyj=k+2,…,K, we have
(4.18)ddtk∫j-1j‍L~ij(xj,uj,sj)dτ=∫j-1jddtk(Hj(λj,xj,uj,sj)-λjTf~ij)dτ=∫j-1j(∂Hj∂xjdxjdtk+∂Hj∂λjdλjdtk-(dλjdtk)Tf~ij-λjTddtkf~ij)dτ.
Since the following holds by Theorem3.2,
(4.19)(∂Hj∂xj)T=-λ˙j,(∂Hj∂λj)T=f~ij,
then
(4.20)ddtk∫j-1jL~ij(xj,uj,sj)dτ=∫j-1j(-(λ˙j)Tdxjdtk+(f~ij)Tdλjdtk-(dλjdtk)Tf~ij-λjTddtkf~ij)dτ=∫j-1j‍(-(λ˙j)Tdxjdtk-λjTddtkf~ij)dτ=-∫j-1j‍ddτ(λjTdxjdtk)dτ=λj(j-1)Tdxj(j-1)dtk-λj(j-)Tdxj(j-)dtk.Obviously, whenj=k,k+1, we have
(4.21)ddtk∫k-1k‍L~ik(xk,uk,sk)dτ=ddtk∫tk-1tk‍L-ik(x,u,sik)dt=L-ik(xk(k-),uk(k-),sk(k-)),(4.22)ddtk∫kk+1‍L~ik+1(xk+1,uk+1,sk+1)dτ=λk+1(k)Tdxk+1(k)dtk-λk+1((k+1)-)Tdxk+1((k+1)-)dtk-L-ik+1(xk+1(k),uk+1(k),sk+1(k)).Now we prove Theorem4.2. We are only going to show dJ~/dtk for easily reading. The proofs for δJ~/δuk and δJ~/δsk can be found in Appendix.Proof.
J
~
(
θ
,
u
,
s
) can be formulated as
(4.23)J~(θ,u,s)=ϕ(xK(K))+∑j=1k-1‍∫j-1j‍L~ij(xj,uj,sj)dτ+∑j=kK‍∫j-1j‍L~ij(xj,uj,sj)dτ+∑j=1K-1‍φijij+1(xj(j-)).
SinceL~ij(·) is independent of tk for j=1,…,k-1, then dJ~/dtk can be obtained by
(4.24)dJ~dtk(θ,u,s)=∂ϕ(xK(K))∂xK(K)dxK(K)dtk+ddtk∑j=kK‍∫j-1j‍L~ij(xj,uj,sj)dτ+∑j=1K-1‍∂φijij+1∂xj(j-)dxj(j-)dtk.
Substituting (4.17), (4.21), and (4.22) into (4.24), we have
(4.25)dJ~dtk(θ,u,s)=∂ϕ(xK(K))∂xK(K)dxK(K)dtk+L-ik(xk(k-),uk(k-),sk(k-))-L-ik+1(xk+1(k),uk+1(k),sk+1(k))+λk+1(k)Tdxk+1(k)dtk+∂φikik+1∂xk(k-)dxk(k-)dtk-∑j=k+1K-1‍(λj(j-)Tdxj(j-)dtk-λj+1(j)Tdxj+1(j)dtk-∂φijij+1∂xj(j-)dxj(j-)dtk)-λK(K)TdxK(K)dtk.
Due to Theorem3.2 and (4.10), dJ~/dtk can be formulated by
(4.26)dJ~dtk(θ,u,s)=(∂ϕ(xK(K))∂xK(K)-λK(K)T)dxK(K)dtk+L-ik(xk(k-),uk(k-),sk(k-))-L-ik+1(xk+1(k),uk+1(k),sk+1(k))+λk(k-)Tdxk(k-)dtk-λk+1(k)Tfik+1(xk+1(k),uk+1(k))-αkT∂pik∂xk(k-)dxk(k-)dtk-∑j=kK-1‍αjT∂gij∂xj(j-)dxj(j-)dtk=L-ik(xk(k-),uk(k-),sk(k-))-L-ik+1(xk+1(k),uk+1(k),sk+1(k))+λk(k-)Tfik(xk(k-),uk(k-))-λk+1(k)Tfik+1(xk+1(k),uk+1(k))-∑j=kK-1‍αjT∂gij∂xj(j-)dxj(j-)dtk-αKT∂ϑ∂xK(K)dxK(K)dtk.Note that when second-order derivatives are needed, there is no difficulty to obtain the second-order derivatives following the above procedure.


## 4.2. Parametrization Method

To obtain the numerical solution to optimal control for hybrid systems, continuous control profiles are parameterized on each mode active horizon in this section. Then the numerical solution to optimal controls can be computed based on the obtained sensitivity analysis results. The basic idea behind the proposed method using finite parameterizations of the controls is to transcribe the original infinite dimensional problem, that is,C-problem, into a finite dimensional nonlinear programming problem, that is, P-problem [25]. Here, the parametrization method that the control profiles are approximated by a family of Lagrange form polynomials is implemented.Partition each horizon[j-1,j) into Nj elements as j-1=τj0<τj1<⋯<τjNj=j where τjl are referred to as collocation points, l=0,…,Nj. Let ujl denote the value of uj at τjl, l=0,…,Nj. Thus, the control variable uj is represented approximately by a Lagrange interpolation profile for j=1,…,K,
(4.27)uj(τ)=∑l=0Nj‍l^l(τ)ujl,τ∈[j-1,j),
where l^l(τ)=∏m=0,m≠lNj((τ-τjm)/(τjl-τjm)). sj is also parameterized by
(4.28)sj(τ)=∑l=0Nj‍l^l(τ)sjl,τ∈[j-1,j),
where sjl is the value of sj at the collocation points τjl, l=0,…,Nj.As a result, based on the obtained derivatives, the numerical solution ofu and θ to optimal control for the hybrid systems can be solved simultaneously and efficiently by adopting gradient-based algorithms as described in Xu and Antsaklis [3] and Egerstedt et al. [6]. Note that the derivatives are functions of costate λj as formulated in Theorem 4.2. When control polynomial profiles are implemented, a multipoint boundary value problem about state and costate expressed by (3.6), (3.7), and (3.10) will be solved, which produces the derivatives.Although the Lagrange interpolation profiles may cause the state or/and control trajectories violate their constraints, this parameterizations method has been proved useful in practice. Moreover, there are some techniques to decrease the defect [1, 2].Remark 4.4.
Control variableuj can be approximated by several piecewise Lagrange interpolation profiles by further partitioning the element [j-1,j). More detail of the parameterizations methods can be found in Vassiliadis et al. [1, 2], Kameswaran and Biegler [26], and the references therein. Only one Lagrange interpolation profile is used here to show the process of the proposed method.


## 5. Some Examples

To illustrate the effectiveness of the developed method, two examples with different situations are presented in the following. Numerical examples are conducted on an ThinkPad X61 2.10-GHz PC with 2G of RAM. The program is implemented using MatLab 7. The order of Lagrange polynomials in the examples is 3.Example 5.1.
The prototype of this example comes from Vassiliadis et al. [1]. The hybrid system consists of two batch reactors as shown in Figure 1. The first reactor denoted by mode 1 is fitted with a heating coil which can be used to manipulate the reactor temperature u over time and is initially loaded with 0.1 m3 of an aqueous solution of component x1 of concentration 2000 mol/m3. This reacts to form components x2 according to the consecutive reaction scheme 2x1→x2. After completion of the first reaction, an amount of dilute aqueous solution of component x2 of concentration 600 mol/m3 is added instantaneously to the products of the first reactor, and the mixture is loaded into the second reactor denoted by mode 2 where the reaction x2→x3 takes place under isothermal conditions at a fixed temperature. The decision variables are the temperature u of the mode 1, and the durations of the two mode over the horizon [0,180]. The dynamics of the hybrid systems can be described by
Mode 1:(5.1)x˙1=-0.0888e(-2500/u)x12,x˙2=0.0444e(-2500/u)x12-6889.0e(-5000/u)x2,x˙3=0.
Mode 2:(5.2)x˙1=0,x˙2=-0.07x2-8.0×10-5x22,x˙3=0.02x2,
with x(0)=[200000]T. The system transits once at t=t1(t0<t1<tf) from mode 1 to 2 with x1(t1)=x1(t1-)/1.7,x2(t1)=(x2(t1-)+420)/1.7. The OCPHS is to find an optimal mode transition instant t1 and an optimal input 298≤u(t)≤398, t∈[t0,t1], to maximize the cost functional
(5.3)maxt1,ux3(tf),
with x3(tf)≥150 must be satisfied.Figure 1
Two batch reactors system.By using the proposed method, the optimal mode transition instant ist1=105 and the corresponding optimal cost is J*=150.0285. The corresponding continuous control and state trajectories are shown in Figure 2. In Vassiliadis et al. [1], the transition instants and the optimal cost are t1=106, J*=150.294, respectively, which are solved by software package DAEOPT.Figure 2
State trajectories and control input of Example5.1.Example 5.2.
Example5.2 comes from Xu and Antsaklis [3] and is also reconsidered by Hwang et al. [9]. Different from the example in the two references, the control constraint is imposed. The example can be referred to as autonomous switching hybrid systems with mode invariants. Consider the hybrid system consisting of
Mode 1:(5.4)x˙=(1.5001)x+(11)u,
Mode 2:(5.5)x˙=(0.50.8660.866-0.5)x+(11)u,
with x0=[11]T. Assume that t0=0, tf=2 and the system transits once at t=t1(t0<t1<tf) from Mode 1 to 2 when the state trajectories intersect the linear manifold defined by m(x)=x1+x2-7=0. Mode 1 is active with its mode invariant x1+x2-7<0 and Mode 2 is active with its mode invariant x1+x2-7>0. The OCPHS is to find an optimal mode transition instant t1 and an optimal input u(t)∈[-1,1] such that the cost functional
(5.6)J(t1,u)=12[(x1(tf)-10)2+(x2(tf)-6)2+∫t0tf‍u2(t)dt]
is minimized.By using the method developed here, the optimal mode transition instant ist1=1.1857 and the corresponding optimal cost is J*=0.1246. The corresponding continuous control and state trajectories are shown in Figure 3. In Xu and Antsaklis [3], the transition instants and the optimal cost are t1=1.1624, J*=0.1130, respectively. The bad performance results from that the optimal control is approximated by polynomial.Figure 3
State trajectories and control input of Example5.2.


## 6. Conclusions

The optimal control problem for hybrid systems (OCPHS) with mode invariants and control constraints is addressed under a priori fixed mode transition order. By introducing new independent variables and auxiliary algebraic variables, the original OCPHS is transformed into an equivalent optimal control problem, and the optimality conditions for the OCPHS is stated. Based on the optimality conditions, the derivatives of the objective functional w.r.t control variables, that is, mode transition instant sequence and admissible continuous control functions, are established analytically. As a result, a control vector parametrization method is implemented to obtain the numerical solution by using gradient-based algorithms with the obtained derivatives. Compared with the existing results on the OCPHS with fixed mode transition order, the settings cover not only the control constraints but also the continuous states constraints, which makes the obtained results more general. Note that when no information about the mode transition sequence is known a priori, the discrete model methods formulated in Bemporad and Morari [27], Barton et al. [15], and Song et al. [28] seem appropriate. In addition, when uncertainties are considered in the systems, the reader is referred to Hu et al. [29] and the references therein.



---

*Source: 581040-2012-08-28.xml*