output-based optimal timing control of switched systems · 2006. 4. 12. · output-based optimal...

15
Output-Based Optimal Timing Control of Switched Systems Shun-ichi Azuma 1 , Magnus Egerstedt 2 , and Yorai Wardi 2 1 Graduate School of Informatics, Kyoto University, Uji, Kyoto 611-0011, Japan [email protected] 2 School of Electrical and Computer Engineering, Georgia Institute of Technology, Atlanta, GA 30332, USA {magnus, ywardi}@ece.gatech.edu Abstract. Optimal switch-time control is an area that investigates how best to switch between different control modes. In this paper we present an algorithm for solving the optimal switch-time control problem for nonlinear systems where the state is only partially known through the outputs. A method is presented that both guarantees that the current switch-time estimates remain optimal as the state estimates evolve, and that ensures this in a computationally feasible manner, thus rendering the method applicable to real-time applications. The viability of the proposed method is illustrated through a number of examples. 1 Introduction The basic question behind the work in this paper can be summarized as fol- lows: If only incomplete information about the state of the system is available, and one would like to solve an optimal switch-time control problem with respect to the true state of the system, how can this be achieved in real-time, i.e. in a computationally feasible manner? The solution that we propose consists of three main building-blocks. The first building block is given by the solution to the optimization problem for a given, initial state estimate/guess. This is compu- tationally expensive and is a price one can only afford to pay ”off-line” in the sense that once the system starts evolving, the exact solution can no longer be obtained from scratch due to computational real-time constraints. The second building-block is the construction of a set of dynamical equations that dictate how the current solution to the optimization problem evolves as the state esti- mate evolves. This ”solution dynamics” must satisfy two properties, namely: (i) It must be computationally cheap, i.e. no extensive computations are allowed as the solution evolves over time. (ii) It must be optimal with respect to the cur- rent state estimate. In other words, at all times the best possible solution to the optimization problem must be obtained. The final building block that is needed is a safe-guard against undesirable behaviors that may arise due to the transient response of the state estimate, e.g. observer over-shoots. We will achieve this by This work was supported by the National Science Foundation through grant #0509064. Jo˜ao Hespanha and A. Tiwari (Eds.): HSCC 2006, LNCS 3927, pp. 64–78, 2006. c Springer-Verlag Berlin Heidelberg 2006

Upload: others

Post on 02-Mar-2021

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Output-Based Optimal Timing Control of Switched Systems · 2006. 4. 12. · Output-Based Optimal Timing Control of Switched Systems 65 imposing constraints on the possible switching

Output-Based Optimal Timing Controlof Switched Systems�

Shun-ichi Azuma1, Magnus Egerstedt2, and Yorai Wardi2

1 Graduate School of Informatics, Kyoto University, Uji, Kyoto 611-0011, [email protected]

2 School of Electrical and Computer Engineering,Georgia Institute of Technology, Atlanta, GA 30332, USA

{magnus, ywardi}@ece.gatech.edu

Abstract. Optimal switch-time control is an area that investigates howbest to switch between different control modes. In this paper we presentan algorithm for solving the optimal switch-time control problem fornonlinear systems where the state is only partially known through theoutputs. A method is presented that both guarantees that the currentswitch-time estimates remain optimal as the state estimates evolve, andthat ensures this in a computationally feasible manner, thus renderingthe method applicable to real-time applications. The viability of theproposed method is illustrated through a number of examples.

1 Introduction

The basic question behind the work in this paper can be summarized as fol-lows: If only incomplete information about the state of the system is available,and one would like to solve an optimal switch-time control problem with respectto the true state of the system, how can this be achieved in real-time, i.e. in acomputationally feasible manner? The solution that we propose consists of threemain building-blocks. The first building block is given by the solution to theoptimization problem for a given, initial state estimate/guess. This is compu-tationally expensive and is a price one can only afford to pay ”off-line” in thesense that once the system starts evolving, the exact solution can no longer beobtained from scratch due to computational real-time constraints. The secondbuilding-block is the construction of a set of dynamical equations that dictatehow the current solution to the optimization problem evolves as the state esti-mate evolves. This ”solution dynamics” must satisfy two properties, namely: (i)It must be computationally cheap, i.e. no extensive computations are allowed asthe solution evolves over time. (ii) It must be optimal with respect to the cur-rent state estimate. In other words, at all times the best possible solution to theoptimization problem must be obtained. The final building block that is neededis a safe-guard against undesirable behaviors that may arise due to the transientresponse of the state estimate, e.g. observer over-shoots. We will achieve this by� This work was supported by the National Science Foundation through grant

#0509064.

Joao Hespanha and A. Tiwari (Eds.): HSCC 2006, LNCS 3927, pp. 64–78, 2006.c© Springer-Verlag Berlin Heidelberg 2006

Page 2: Output-Based Optimal Timing Control of Switched Systems · 2006. 4. 12. · Output-Based Optimal Timing Control of Switched Systems 65 imposing constraints on the possible switching

Output-Based Optimal Timing Control of Switched Systems 65

imposing constraints on the possible switching times, thus producing a solutionto a constrained rather than a free parameter optimization problem.

This idea has been investigated in [10] for single-switch, linear systems, andprovides us with some initial guidance. However, this paper considerably extendsthe results in [10] in order to complete the framework of computationally feasibleoptimal switch-time control with partial information. In other words, in thispaper we deal with the problem in its full generality, namely, the multiple-switch,nonlinear case.

The outline of this paper is as follows: In Section 2, the solution to the com-plete state-information problem is recalled and the strategy of using observer-based switch-time control for the partial information case is introduced. The nextsection (Section 3) presents the solution to the observer-based problem. Section4 presents a method for dealing with constrained switch-times in order to avoidundesirable switch-time behaviors caused by nonlinear observer dynamics. Theresulting, constrained optimization problem is solved, and a number of examplesillustrate the viability of the proposed solution.

2 Background

2.1 State-Based Switch-Time Optimization

Consider the problem of finding the switch-times τ� = (τ�1 , τ�

2 , . . . , τ�N )T that

solves the optimization problem Σ1(t0, x0):

Σ1(t0, x0) :

minτ

J(t0, x0, τ) = 12

∫ T

t0L(x(t))dt

subject to

⎧⎪⎪⎪⎪⎪⎪⎪⎨

⎪⎪⎪⎪⎪⎪⎪⎩

x(t) =

⎧⎪⎪⎪⎪⎪⎨

⎪⎪⎪⎪⎪⎩

f1(x(t)), t ∈ [t0, τ1)f2(x(t)), t ∈ [τ1, τ2)

...fN (x(t)), t ∈ [τN−1, τN )fN+1(x(t)), t ∈ [τN , T ]

x(t0) = x0.

Here x is the n-dimensional state vector, L and fi (i = 1, 2, . . . , N + 1) are con-tinuously differentiable functions from R

n to R and from Rn to R

n, respectively,N is the number of switch-times, and τ is the collection of switch-times, i.e.τ = (τ1, τ2, . . . , τN )T . The interpretation here is that the system evolves accord-ing to x = f1(x(t)) on the time interval [t0, τ1), to x = fi+1(x(t)) on [τi, τi+1)(i ∈ {1, 2, . . . , N − 1}), and to x = fN+1(x(t)) on [τN+1, T ]. Such systems arisein a variety of applications, including situations where a control module has toswitch its attention among a number of subsystems [14, 17, 21], or collect datasequentially from a number of sensory sources [5, 7, 13].

Recently, there has been a growing interest in optimal switching time controlof such hybrid systems, where the control variable consists of a proper switchinglaw as well as the input function u(t) (see [4, 6, 11, 12, 18, 19, 20, 22]). In particu-lar, in [4] a framework is established for optimal control, while [18, 19, 20] present

Page 3: Output-Based Optimal Timing Control of Switched Systems · 2006. 4. 12. · Output-Based Optimal Timing Control of Switched Systems 65 imposing constraints on the possible switching

66 S.-i. Azuma, M. Egerstedt, and Y. Wardi

suitable variants of the maximum principle to the setting of hybrid systems. In[2, 3, 11, 16] piecewise-linear or affine systems are considered, while the specialcase of autonomous systems, where the term u(t) is absent and the control vari-able consists solely of the switching times, is considered in [11, 13, 23, 24]. Inparticular, in [8, 23, 24] general nonlinear systems are considered together withnonlinear-programming algorithms that compute the gradient and second-orderderivatives of the cost functional. Note that we, in this paper, follow this line ofwork by not having an explicit input u affect the system. This restriction willhave the effect that the gradient of the cost with respect to the control param-eters (the switch-times) can be quickly computed without having to solve anyboundary value problems. However, the reason why we focus on this model isnot entirely driven by this computational concern, but it also stems from thefact that in a number of applciations, a collection of control laws have alreadybeen designed (i.e. u has already been given in terms of x) and the remainingproblem is simply the problem of determining the duration of each individualcontrol mode.

In particular, in [8], the Calculus of Variations were used for finding the firstorder, necessary optimality conditions for τ�, namely

∂J

∂τi(t0, x0, τ

�) = λi(τ�i )

(fi(x(τ�

i )) − fi+1(x(τ�i ))

)= 0

for every i ∈ {1, 2, . . . , N}, where the costate λi satisfies

λi(t) = −λi(t)∂fi+1

∂x (x(t)) − ∂L∂x (x(t)), t ∈ [τi, τi+1]

λi(τi+1) = 0.

Here we have used the convention that the costate is an n-dimensional row vector.Note that we only obtain locally optimal and not globally optimal solutions,which is all we can hope for in general since J is nonconvex in τ .

In this case, i.e. in the case where the complete state information is avail-able, we can thus easily produce a gradient descent-based algorithm for actuallyfinding the optimal switching time, e.g.:

Algorithm 1:τ = τ0 (initial guess)repeat

solve for x(t), t ∈ [t0, T ] forwardssolve for λi(t), t ∈ [τi, τi+1] backwards for every i

compute ∂J/∂τ =[

∂J∂τ1

∂J∂τ2

· · · ∂J∂τN

]with

∂J∂τi

= λi(τi)(fi(x(τi)) − fi+1(x(τi))

)

τ := τ − γ(∂J/∂τ)T

until ‖∂J/∂τ(τ)‖ ≤ ε

Here ε > 0 is the termination thresh-hold, and γ is the step length in the gradientdescent. Note that γ could possibly be varying, e.g. using the Armijo stepsize [1],

Page 4: Output-Based Optimal Timing Control of Switched Systems · 2006. 4. 12. · Output-Based Optimal Timing Control of Switched Systems 65 imposing constraints on the possible switching

Output-Based Optimal Timing Control of Switched Systems 67

which was the case in [8, 9]. Note also that such an algorithm involves solvingfor x(t) and λ(t) a number of times until the optimal τ has been found. In otherwords, if δ is the stepsize used in the numerical integration algorithm, and ifa total number of M gradient descent iterations are needed, the computationalcomplexity is O(M/δ), which is a non-trivial computational burden if the optimalτ has to be found in real-time, i.e. fast enough with respect to the particularapplication that is being considered.

2.2 Partial State Information

We now turn our attention to a slightly different problem, namely the problemof finding the optimal τ when only partial information is available. By this weunderstand that only y(t) ∈ R

p (and not x(t)) is known, where

y(t) =

⎧⎪⎪⎪⎪⎪⎨

⎪⎪⎪⎪⎪⎩

g1(x(t)), t ∈ [t0, τ1)g2(x(t)), t ∈ [τ1, τ2)

...gN(x(t)), t ∈ [τN−1, τN )gN+1(x(t)), t ∈ [τN , T ]

and gi (i = 1, 2, . . . , N +1) are continuously differentiable output functions fromR

n to Rp.

The strategy that we will use is to guess an initial state value, x(t0) and thensolve the computational resource intense optimal control problem for this initialstate using the gradient descent algorithm in Algorithm 1, resulting in an optimalswitching time τ (t0). The idea is that this computation can be performed off-line, i.e. before the system actually starts evolving. Once this happens, we willuse an observer for estimating the state. Moreover, the main idea of this paperis to also update τ (t) in such a way that the following two conditions hold:

1. For all times t ∈ [t0, T ], τ (t) is optimal given the current state estimate x(t).2. The time evolution of τ (t) must be computationally reasonable.

What these two conditions thus say is that we should only pay the high compu-tational price associated with solving the optimal switch-time control problemfor the initial state estimate guess. After that, the switch-time estimates shouldevolve in such a way that they remain optimal as well as are easy to compute.

3 Observer-Based Switch-Time Optimization

This section is concerned with the problem of solving Σ1(t, x(t)), where x(t) isthe state of the previously defined observer. First, for simplicity of discussion,we derive the switch-time dynamics for the case N = 1 (single switch time),i.e. τ = τ1. This will clearly show the key idea behind switch-time optimizationbased on observers. Next, observers are introduced for executing our technique,and then the validity is demonstrated by a numerical example. We finally extendthe result to the multiple switch-time problem (with N ≥ 2).

Page 5: Output-Based Optimal Timing Control of Switched Systems · 2006. 4. 12. · Output-Based Optimal Timing Control of Switched Systems 65 imposing constraints on the possible switching

68 S.-i. Azuma, M. Egerstedt, and Y. Wardi

3.1 Switch-Time Dynamics

Let us consider the dynamics of the optimal switch-time for the current stateestimate x(t) under N = 1. For this, we assume that we have been able tocompute τ(t0) as the solution to Σ1(t0, x(t0)) using Algorithm 1, where x(t0) isthe initial state estimate. Now, let

˙τ(t) = − 1∂2J∂τ2 (t, x(t), τ (t))

( ∂2J

∂t∂τ(t, x(t), τ (t)) +

∂2J

∂x∂τ(t, x(t), τ (t)) ˙x(t)

). (1)

Throughout this paper we will make the explicit assumption that τ (t) is a localminimum to Σ1(t, x(t)) for all t ∈ [t0, T ], and hence that the Hessian, i.e. thesecond derivative matrix of J with respect to τ is positive definite, which inturn implies that the above expression is well-defined. This assumption may notalways hold since extrema are known to not always be continuous across systemparameters even though the cost and the constraints may be arbitrarily smooth.In fact, this is a potential weakness of the proposed approach but at present,we state it as an assumption and leave further investigations of this issue to thefuture.

That this is in fact the correct evolution of τ (t) follows directly from the factthat

d

dt

(∂J

∂τ(t, x(t), τ (t))

)

=∂2J

∂τ2 (t, x(t), τ (t)) ˙τ(t) +∂2J

∂t∂τ(t, x(t), τ (t)) +

∂2J

∂x∂τ(t, x(t), τ (t)) ˙x(t)

= −∂2J∂τ2 (t, x(t), τ (t))∂2J∂τ2 (t, x(t), τ (t))

( ∂2J

∂t∂τ(t, x(t), τ (t)) +

∂2J

∂x∂τ(t, x(t), τ (t)) ˙x(t)

)

+∂2J

∂t∂τ(t, x(t), τ (t)) +

∂2J

∂x∂τ(t, x(t), τ (t)) ˙x(t) = 0.

Hence, as long as ∂J/∂τ = 0 initially it will remain zero and τ (t) will in factremain optimal. In the following paragraphs we will compute an explicit expres-sion for this update rule as well as show that it does in fact satisfy the secondcondition that we imposed, namely that the computational burden associatedwith evolving τ (t) is low.

From Section 2.1 we know that

∂J

∂τ(t, x, τ) = λ(τ)(f1(x(τ)) − f2(x(τ))),

where ⎧⎨

⎩x(s) =

{f1(x(s)), s ∈ [t, τ)f2(x(s)), s ∈ [τ, T ]

x(t) = x{λ(s) = −λ(s)∂f2

∂x (x(s)) − ∂L∂x (x(s)), s ∈ [τ, T ]

λ(T ) = 0,

where the costate λ1 is simply denoted by λ.

Page 6: Output-Based Optimal Timing Control of Switched Systems · 2006. 4. 12. · Output-Based Optimal Timing Control of Switched Systems 65 imposing constraints on the possible switching

Output-Based Optimal Timing Control of Switched Systems 69

By letting Φ2(s, τ) be the state transition matrix on s ∈ [τ, T ] of theautonomous linear system

z =∂f2

∂xz,

it is straightforward to solve the above costate equation with respect to λ, giving

λ(τ) =∫ T

τ

∂L

∂x(x(s))Φ2(s, τ)ds.

By plugging this into the expression for ∂J/∂τ we obtain

∂J

∂τ(t, x, τ) =

∫ T

τ

∂L

∂x(x(s))Φ2(s, τ)ds(f1(x(τ)) − f2(x(τ))).

Now, in order to compute the update rule for τ (t), we need the partial derivativesof ∂J/∂τ , for which it is convenient to define p(t, x, τ) and q(t, x, τ) as

p(t, x, τ) =∫ T

τ

∂L

∂x(x(s))Φ2(s, τ)ds,

q(t, x, τ) = f1(x(τ)) − f2(x(τ)),

where, as before, x(t) = x. Using this notation, the partial derivative with respectto x becomes

∂2J

∂x∂τ(t, x, τ) = qT (t, x, τ)

∂p

∂x(t, x, τ) + p(t, x, τ)

∂q

∂x(t, x, τ),

and then

∂p

∂x(t, x, τ) =

∫ T

τ

(∂x(s)∂x

)T∂2L

∂x2 (x(s))Φ2(s, τ)ds

=∫ T

τ

(Φ2(s, τ)Φ1(τ, t))T ∂2L

∂x2 (x(s))Φ2(s, τ)ds

∂q

∂x(t, x, τ) =

(∂f1

∂x(x(τ)) − ∂f2

∂x(x(τ))

)∂x(τ)∂x

=(

∂f1

∂x(x(τ)) − ∂f2

∂x(x(τ))

)

Φ1(τ, t),

where the facts ∂x(s)/∂x = Φ2(s, τ)Φ1(τ, t) and ∂x(τ)/∂x = Φ1(τ, t) are used.It should be noted that this form of the partial derivative ∂J/∂τ can be

easily computed. In fact, we mainly need to calculate the five integrations forobtaining Φ1, Φ2, x, p, and ∂p/∂x, in which the three integrations are requiredfor the differential equations on Φ1, Φ2, and x. Hence, we have a computationallyfeasible method for computing ∂J/∂τ that does not involve any iterations in agradient descent algorithm.

Page 7: Output-Based Optimal Timing Control of Switched Systems · 2006. 4. 12. · Output-Based Optimal Timing Control of Switched Systems 65 imposing constraints on the possible switching

70 S.-i. Azuma, M. Egerstedt, and Y. Wardi

In a similar way, the partial derivatives with respect to t and τ are given by

∂2J

∂t∂τ(t, x, τ) =

∂p

∂t(t, x, τ)q(t, x, τ) + p(t, x, τ)

∂q

∂t(t, x, τ)

∂2J

∂τ2 (t, x, τ) =∂p

∂τ(t, x, τ)q(t, x, τ) + p(t, x, τ)

∂q

∂τ(t, x, τ)

where

∂p

∂t(t, x, τ) =

∫ T

τ

∂x(s)∂t

∂2L

∂x2 (x(s))Φ2(s, τ)ds

= −∫ T

τ

Φ2(s, τ)Φ1(τ, t)f1(x)∂2L

∂x2 (x(s))Φ2(s, τ)ds

∂q

∂t(t, x, τ) =

(∂f1

∂t(x(τ)) − ∂f2

∂t(x(τ))

)∂x(τ)

∂t

= −(

∂f1

∂x(x(τ)) − ∂f2

∂x(x(τ))

)

Φ1(τ, t)f(x)

∂p

∂τ(t, x, τ)

= −∂L

∂x(x(τ))Φ2(τ, τ) +

∫ T

τ

∂2L

∂τ∂x(x(s))Φ2(s, τ) +

∂L

∂x(x(s))

∂τΦ2(s, τ)ds

= −∂L

∂x(x(τ)) +

∫ T

τ

Φ2(s, t)q∂2L

∂x2 (x(s))Φ2(s, τ) − ∂L

∂x(x(s))Φ2(s, τ)

∂f2

∂x(x(τ))ds

∂q

∂τ(t, x, τ) =

(∂f1

∂x(x(τ)) − ∂f2

∂x(x(τ))

)∂x(τ)

∂τ

=(

∂f1

∂x(x(τ)) − ∂f2

∂x(x(τ))

)

f1(x(τ)),

and the relations ∂x(s)/∂t = −Φ2(s, τ)Φ1(τ, t)f1(x), ∂x(τ)/∂t = −Φ1(τ, t)f1(x),∂x(s)/∂τ = Φ2(s, τ)q, and ∂x(τ)/∂τ = f1(x(τ)) are used. It is moreover easy tosee that these partial derivatives can be obtained in a computationally feasiblemanner.

Under the assumption that we have a strict local minimum (i.e. that theHessian is positive definite), this expression is well-defined, and, as previouslyshown, τ (t) is a solution to Σ1(t, x(t)), which establishes the first property thatour solution needed to satisfy. The second property involves the computationalburden associated with computing τ(t). And, the pieces needed for the compu-tation of the partial derivatives are given by a bounded number of integrations.Hence we have an algorithm for updating the optimal switching time that sat-isfies both properties required from the solution, namely (i) optimality, and (ii)computational feasibility.

Page 8: Output-Based Optimal Timing Control of Switched Systems · 2006. 4. 12. · Output-Based Optimal Timing Control of Switched Systems 65 imposing constraints on the possible switching

Output-Based Optimal Timing Control of Switched Systems 71

3.2 Observers for Switch-Time Optimization

The observers underlying this switch-time optimization strategy should (if pos-sible) provide good estimates of the state, i.e. the estimated state should quicklyconverge to the real system state. We here outline two possible such observers:

If the system is in fact composed of linear subsystems, i.e.,

x(t) ={

A1x(t), t ∈ [t0, τ)A2x(t), t ∈ [τ, T ]

y(t) ={

C1x(t), t ∈ [t0, τ)C2x(t), t ∈ [τ, T ]

x(t0) = x0,

we can use a standard switched-type Luenberger observer, defined as

˙x(t) ={

A1x(t) − K1(C1x(t) − y(t)), t ∈ [t0, τ)A2x(t) − K2(C2x(t) − y(t)), t ∈ [τ, T ],

where K1, K2 are appropriately chosen observer gain matrices. This observer hasthe advantage that the convergence of the observer state to the real system statecan be specified by choosing K1, K2.

On the other hand, for systems with nonlinear subsystems:

x(t) = f(x(t)) ={

f1(x(t)), t ∈ [t0, τ)f2(x(t)), t ∈ [τ, T ]

y(t) = g(x(t)) ={

g1(x(t)), t ∈ [t0, τ)g2(x(t)), t ∈ [τ, T ]

x(t0) = x0,

the Grizzle-Moraal Newton observer, originally proposed in [15], provides a goodcandidate. This observer is based on Newton’s method for solving nonlinearequations, and we recall this method below for the non-switched case:

Given the state x(t) and a (sufficiently) small positive scalar ∆, then x(t+∆)can be approximately expressed as x(t + ∆) � x(t) + ∆f(x(t)). Then we havean approximation of x(t + k∆) for a natural number k as x(t + k∆) � F k(x(t)),where F (x(t)) = x(t) + ∆f(x(t)) and

F k(x(t)) = F ◦ F ◦ · · · ◦ F︸ ︷︷ ︸k times

(x(t)).

Using this notation, y(t + k∆) can be approximated by y(t + k∆)�g(F k(x(t))).Next, define Gm(x0(t)) = Ym − Ym(x0(t)), where

Ym =

⎢⎢⎢⎢⎢⎣

y(t)y(t + ∆)y(t + 2∆)

...y(t + (m − 1)∆)

⎥⎥⎥⎥⎥⎦

, Ym(x0(t)) =

⎢⎢⎢⎢⎢⎣

g(x0(t))g(F (x0(t)))g(F 2(x0(t)))

...g(Fm−1(x0(t)))

⎥⎥⎥⎥⎥⎦

.

Page 9: Output-Based Optimal Timing Control of Switched Systems · 2006. 4. 12. · Output-Based Optimal Timing Control of Switched Systems 65 imposing constraints on the possible switching

72 S.-i. Azuma, M. Egerstedt, and Y. Wardi

Then the Grizzle-Moraal Newton observer is given by the following predictor-corrector step:

x−k = f(x(t + (k − 1)∆)) (2)

x(t + k∆) = x−k −

{∂Gm

∂x0(x−

k )}†

Gm(x−k ), (3)

where the symbol “†” denotes the pseudo-inverse. Although this observer is notalways guaranteed to globally converge to the real system state, this observercan be applied to a broad class of the nonlinear systems, and the estimated stateoften converges very quickly to the real system state.

3.3 Example

Consider the system defined by

x =

⎧⎪⎪⎨

⎪⎪⎩

(2√

x1 − √x2

−√x2

)

t ∈ [t0, τ)(

−√x1 +

√x2√

x2

)

t ∈ [τ, T ]

y = (1 1)x t ∈ [t0, T ],

where t0 = 0, T = 1 and the cost function given by

L(x) =(

x −(

22

))T (

x −(

22

))

. (4)

The initial state of the system is given as (1.3, 1.8)T , and the observer used hereis a switched version of the Grizzle-Moraal Newton observer whose initial stateis (1.2, 1.9)T .

Figure 1 shows that, as the observer state approaches to the real system state,the switch time converges from τ (0) = 0.365 to the true optimal switch-timeτ� = 0.337. In this way, even if the complete state information cannot be used,the switch-time is optimized when using the switch-time dynamics together witha suitable observer.

3.4 Extension to the Multiple Switch-Time Case

The switch-time optimization technique derived in the previous paragraphs willhere be extended to the multiple switch-time case as follows:

Recall the relation for the single-switch case

∂2J

∂τ2 (t, x(t), τ (t)) ˙τ(t) +∂2J

∂t∂τ(t, x(t), τ (t)) +

∂2J

∂x∂τ(t, x(t), τ (t)) ˙x(t) = 0,

where the left hand side corresponds to the time derivative of ∂J∂τ (t, x(t), τ (t)),

i.e. ddt

(∂J∂τ (t, x(t), τ (t))

). It can be directly shown in exactly the same way as for

Page 10: Output-Based Optimal Timing Control of Switched Systems · 2006. 4. 12. · Output-Based Optimal Timing Control of Switched Systems 65 imposing constraints on the possible switching

Output-Based Optimal Timing Control of Switched Systems 73

Fig. 1. The upper figure shows the state and observer trajectories (solid lines anddotted lines), while the lower figure shows τ(t) in which it is illustrated how τ (t) (solidline) evolves until τ(t) = t (dotted line), at which point the system switches

the single-switch case that this relation still holds for the multiple switch-timecase (N ≥ 2) and then ∂2J/∂τ2 ∈ R

N×N , ∂2J/∂t∂τ ∈ RN×1, and ∂2J/∂x∂τ ∈

RN×n. Thus we obtain the following expression for the multiple switch-time

dynamics.

˙τ(t) = −(

∂2J

∂τ2 (t, x(t), τ (t)))−1(

∂2J

∂t∂τ(t, x(t), τ (t)) +

∂2J

∂x∂τ(t, x(t), τ (t)) ˙x(t)

)

.

(5)

Here the partial derivatives of ∂J/∂τ , i.e. ∂2J/∂τ2, ∂2J/∂t∂τ , and ∂2J/∂x∂τ ,can be expressed as similar explicit forms to the case of N = 1. In fact, this isseen by computing the gradient

∂J

∂τi(t, x, τ) =

∫ τi+1

τi

∂L

∂x(x(s))Φi+1(s, τ)ds(fi(x(τi)) − fi+1(x(τi)))

λ(τ) =∫ τi+1

τi

∂L

∂x(x(s))Φi+1(s, τ)ds.

Furthermore, the observers supporting the switch-time optimization can alsobe obtained through a straightforward extension of the results in Section 3.2.Therefore, the switch-time optimization method works also for the multipleswitch-time case.

The multiple switch-case can best be illustrated through an example. Considerthe system defined as

Page 11: Output-Based Optimal Timing Control of Switched Systems · 2006. 4. 12. · Output-Based Optimal Timing Control of Switched Systems 65 imposing constraints on the possible switching

74 S.-i. Azuma, M. Egerstedt, and Y. Wardi

f1(x) =(

1 00 −1

)

x, f2(x) =(

−1 00 1

)

x, f3(x) =(

1 00 −1

)

x,

g1(x) = g2(x) = g3(x) = (1, 1),with N = 2, and the cost function

L(x) = xT

(1 00 1

)

x.

The initial time is t0 = 0 and the final time is T = 1. The initial state of thesystem is given by (0.7, 1.4)T , and the observer used here is the Luenbergerobserver whose poles are all set at −13, while the initial state is (1, 1)T , whichgives τ (t0) = (0.2, 0.6)T .

Figure 2 shows that even multiple switch-time case, we can still optimize theswitch-times by estimating the state with a suitable observer. It should be notedthat the dynamics are linear in this example. However, this example is to bethought of as illustrating the transition from N = 1 to N ≥ 2 rather than linearvs. nonlinear.

Fig. 2. The upper figure illustrates the state and observer trajectories (solid lines anddotted lines), while the lower figure shows τ(t) (solid lines) evolving until τ(t) = t(dotted line). The first switch occurs at t � 0.468 and the second at t � 0.736.

4 Constrained Switch-Time Optimization

As noted in our previous paper [10], it is possible that the transient behavior(e.g. over-shoot) of the observer dynamics will force the system to switch veryquickly. This should not be taken as a fault with the proposed method since weare in fact guaranteeing that the resulting switch-times τ(t) are optimal withrespect to the current state estimate. Instead this implies that the optimality

Page 12: Output-Based Optimal Timing Control of Switched Systems · 2006. 4. 12. · Output-Based Optimal Timing Control of Switched Systems 65 imposing constraints on the possible switching

Output-Based Optimal Timing Control of Switched Systems 75

with respect to the current state estimate may not always be desirable unlessadditional constraints are imposed on the system. Thus as proposed in [10], itis quite natural to introduce the constraint on the switch-times for making surethat the observer is given enough time to settle.

On the other hand, this is just a special case of the more challenging problemthat we will address in this paper. Namely, when multiple switches are present,we must enforce that t0 ≤ τ1 ≤ τ2 ≤ · · · ≤ τN ≤ T . This is the case sinceotherwise the transient observer behavior may change the switch-time sequence.Thus we deal with the following problem: How is the problem Σ1(t0, x0) solvedunder the switch-time sequence constraint t0 ≤ τ1 ≤ τ2 ≤ · · · ≤ τN ≤ T ?

4.1 Optimality Conditions

We first assumeN =2 for simplicity of notation. Then the following problem arises.

Σ2(t, x) :

minτ J(t, x, τ) = 12

∫ T

tL(x(s))ds

subject to

⎧⎪⎪⎪⎪⎨

⎪⎪⎪⎪⎩

x(s) =

⎧⎨

f1(x(s)), s ∈ [t, τ1)f2(x(s)), s ∈ [τ1, τ2)f3(x(s)), s ∈ [τ2, T ]

x(t) = xτ1 ≤ τ2.

Now, in order to solve Σ2(t, x) it is no longer enough to find τ (t) such that∂J/∂τ = 0. Instead, the first order necessary Kuhn-Tucker condition will have toserve as the optimality function. In other words, we must have that ∂L/∂τ = 0,where the Lagrangian L is given by

L(t, x, τ, µ) = J(t, x, τ) + µ(τ1 − τ2),

where the multiplier satisfies

µ ={

0, τ1 < τ2≥ 0, τ1 = τ2.

It is straightforward to see that the Kuhn-Tucker condition becomes{ ∂J

∂τ1= 0, ∂J

∂τ2= 0 if τ1 < τ2

∂J∂τ1

≤ 0, ∂J∂τ2

≥ 0, ∂J∂τ1

+ ∂J∂τ2

= 0 if τ1 = τ2,

which provides the following switch-time dynamics.⎧⎪⎪⎪⎪⎪⎪⎪⎪⎨

⎪⎪⎪⎪⎪⎪⎪⎪⎩

˙τ(t) = − 1∂2J

∂τ21

+ ∂2J∂τ2∂τ1

+ ∂2J∂τ1∂τ2

+ ∂2J

∂τ22

(∂2J

∂t∂τ1+ ∂2J

∂t∂τ2+

(∂2J

∂x∂τ1+ ∂2J

∂x∂τ2

)˙x(t)

) [11

]

if{

τ1 = τ2˙τ1(t) > ˙τ2(t)

˙τ(t) = −(

∂2J∂τ2

)−1 (∂2J∂t∂τ + ∂2J

∂x∂τ˙x(t)

)otherwise

The switching time τ (t) obtained according to the above dynamics is a solutionto Σ2(t, x(t)), i.e., it satisfies the first order necessary Kuhn-Tucker condition.This can be shown as follows.

Page 13: Output-Based Optimal Timing Control of Switched Systems · 2006. 4. 12. · Output-Based Optimal Timing Control of Switched Systems 65 imposing constraints on the possible switching

76 S.-i. Azuma, M. Egerstedt, and Y. Wardi

First, as discussed in Sections 3.1 and 3.4, the second switch-time dynamicssatisfies the Kuhn-Tucker condition when (a) τ1(t) < τ2(t) or (b) τ1(t) = τ2(t),˙τ1(t) ≤ ˙τ2(t).

Next, it is proven by the reduction to absurdity that the Kuhn-Tucker con-dition at the boundary point is satisfied by the first switch-time dynamics, ob-tained from d

dt

(∂J∂τ1

+ ∂J∂τ2

)= 0, namely, we will show that the first switch-time

dynamics provides τ (t+δ) for some δ > 0 satisfying the Kuhn-Tucker condition:Let τ∗(t) be an optimal solution satisfying τ∗

1 (t) = τ∗2 (t), ∂L

∂τi(t, x, τ∗(t)) = 0

for all i ∈ {1, 2}, and τ∗1 (t+ δ) = τ∗

2 (t+ δ) for some δ > 0, where τ∗i (t) is the i-th

element of τ∗(t). Note that τ∗(t) is the switch time satisfying the Kuhn-Tuckercondition at the boundary point and remains on the boundary for a while. If weassume ˙τ(t) �= τ∗(t), we have

d

dt

(∂J

∂τ1(t, x(t), τ∗(t))

)

> 0,d

dt

(∂J

∂τ2(t, x(t), τ∗(t))

)

< 0, (6)

since the Kuhn-Tucker condition at the boundary point is violated and ∂J∂τ1

+∂J∂τ2

= 0 holds for ˙τ(t). This gives

∂J

∂τ1(t + δ, x(t + δ), τ∗(t) + ˙τ(t)δ + o(δ)) > 0 (7)

∂J

∂τ2(t + δ, x(t + δ), τ∗(t) + ˙τ(t)δ + o(δ)) < 0, (8)

for a small positive scalar δ, which implies that

τ∗1 (t + δ) < τ∗

1 (t) + ˙τ1(t)δ + o(δ) (9)τ∗2 (t + δ) > τ∗

2 (t) + ˙τ2(t)δ + o(δ). (10)

Note here that (7) and (8) mean J(t + δ, x(t + δ), τ∗(t) + ˙τ(t)δ + o(δ)) > J(t +δ, x(t+δ), τ) for a τ satisfying τ1 < τ∗

1 (t)+ ˙1τ(t)δ+o(δ), τ2 > τ∗2 (t)+ ˙2τ(t)δ+o(δ),

and thus (9) and (10) are provided. Then, because τ∗1 (t) = τ∗

2 (t) and ˙τ1(t) =˙τ2(t), it follows that τ∗

1 (t + δ) < τ∗2 (t + δ), namely, it contradicts τ∗

1 (t + δ)= τ∗

2 (t + δ) for some δ > 0. Hence, ˙τ(t) = τ∗(t). Therefore, this choice of ˙τ(t)does in fact guarantee that the resulting solution is locally optimal to Σ2(t, x(t)),and thus we use the new ˙τ(t) instead of the old one.

For the case N > 2, we can derive the corresponding update rule based onthe first order necessary Kuhn-Tucker condition. More precisely, ˙τ(t) can beprovided as the time-derivative of τ (t) satisfying the equality condition in thecorresponding Kuhn-Tucker condition at the boundary point.

4.2 Example: The Constrained Case

Let us return to the example in Section 3.4. Here we consider the initial state(1.2, 0.3)T .

Figure 3 shows a situation where τ1(t) approaches to τ2(t) as the time pro-ceeds, and τ1(t) = τ2(t) holds on [0.022, 0.147]. On this time interval, the

Page 14: Output-Based Optimal Timing Control of Switched Systems · 2006. 4. 12. · Output-Based Optimal Timing Control of Switched Systems 65 imposing constraints on the possible switching

Output-Based Optimal Timing Control of Switched Systems 77

Fig. 3. A situation is shown where although τ1(t) approaches to τ2(t), τ1(t) = τ2(t)holds on [0.022, 0.147] and the switch-time optimization is achieved with the properswitching sequence

switch-time dynamics newly obtained in Section 4.1 is used. It is thus clear thatthe switch-times can be optimized while maintaining the switching sequence.

5 Conclusions

An algorithm was presented for solving the optimal switch-time control problemwhen the state of the system is only partially known through the output. Thisalgorithm was constructed in such a way that it both guarantees that the currentswitch-time remains optimal as the state estimates evolve, and that it ensuresthis in a computationally feasible manner, thus rendering the method applica-ble for real-time applications. An extension was moreover considered where theswitching-times ensure that they do not cross each other, thus maintaining thecorrect switching sequence.

References1. L. Armijo. Minimization of Functions Having Lipschitz Continuous First-Partial

Derivatives. Pacific J. of Mathematics, Vol. 16, pp. 1-3, 1966.2. A. Bemporad, F. Borrelli, and M. Morari. Piecewise Linear Optimal Controllers

for Hybrid Systems. American Control Conf., pp. 1190-1194, 2000.3. A. Bemporad, F. Borrelli, and M. Morari. On the Optimal Control Law for Linear

Discrete Time Hybrid Systems. Hybrid Systems: Computation and Control, M.Greenstreet and C. Tomlin, Editors, Springer-Verlag, pp. 105-119, 2002.

4. M.S. Branicky, V.S. Borkar, and S.K. Mitter. A Unified Framework for HybridControl: Model and Optimal Control Theory. IEEE Trans. on Automatic Control,Vol. 43, pp. 31-45, 1998.

Page 15: Output-Based Optimal Timing Control of Switched Systems · 2006. 4. 12. · Output-Based Optimal Timing Control of Switched Systems 65 imposing constraints on the possible switching

78 S.-i. Azuma, M. Egerstedt, and Y. Wardi

5. R. Brockett. Stabilization of Motor Networks. IEEE Conf. on Decision and Control,pp. 1484–1488, 1995.

6. J. Chudoung and C. Beck. The Minimum Principle for Deterministic ImpulsiveControl Systems. IEEE Conf. on Decision and Control, pp. 3569–3574, 2001.

7. M. Egerstedt and Y. Wardi. Multi-Process Control Using Queuing Theory. IEEEConf. on Decision and Control, pp. 1991–1996, 2002.

8. M. Egerstedt, Y. Wardi, and F. Delmotte. Optimal Control of Switching Times inSwitched Dynamical Systems. IEEE Conf. on Decision and Control, pp. 2138-2143,2003.

9. M. Egerstedt, Y. Wardi, and H. Axelsson. Transition-Time Optimization forSwitched-Mode Dynamical Systems. to appear in IEEE Trans. on Automatic Con-trol, 2005.

10. M. Egerstedt, S. Azuma, and Y. Wardi. Optimal Timing Control of Switched LinearSystems Based on Partial Information. to appear in Nonlinear Analysis: Theory,Methods & Applications, 2006.

11. A. Guia, C. Seatzu, and C. Van der Mee. Optimal Control of Switched AutonomousLinear Systems. In IEEE Conf. on Decision and Control, pp. 1816-1821, 1999.

12. S. Hedlund and A. Rantzer. Optimal Control of Hybrid Systems. IEEE Conf. onDecision and Control, pp. 3972-3977, 1999.

13. D. Hristu-Varsakelis. Feedback Control Systems as Users of Shared Network: Com-munication Sequences that Guarantee Stability. IEEE Conf. on Decision and Con-trol, pp. 3631–3631, 2001.

14. B. Lincoln and A. Rantzer. Optimizing Linear Systems Switching. IEEE Conf. onDecision and Control, pp. 2063–2068, 2001.

15. P. E. Moraal and J. W. Grizzle. Observer Design for Nonlinear Systems withDiscrete-Time Measurements. IEEE Trans. on Automatic Control, vol. 40, pp.395–404, 1995.

16. A. Rantzer and M. Johansson. Piecewise Linear Quadratic Optimal Control. IEEETrans. on Automatic Control, Vol. 54, pp. 629-637, 2000.

17. H. Rehbinder and M. Sanfirdson. Scheduling of a Limited Communication Channelfor Optimal Control. IEEE Conf. on Decision and Control, pp. 1011–1016, 2000.

18. M.S. Shaikh and P. Caines. On Trajectory Optimization for Hybrid Systems: The-ory and Algorithms for Fixed Schedules. IEEE Conf. on Decision and Control, pp.1997–1998, 2002.

19. M.S. Shaikh and P.E. Caines. On the Optimal Control of Hybrid Systems: Opti-mization of Trajectories, Switching Times and Location Schedules. In 6th Interna-tional Workshop on Hybrid Systems: Computation and Control, 2003.

20. H.J. Sussmann. Set-Valued Differentials and the Hybrid Maximum Principle. IEEEConf. on Decision and Control, pp. 558–563, 2000.

21. G. Walsh, H. Ye, and L. Bushnell. Stability Analysis of Networked Control Systems.American Control Conf., pp. 2876–2880, 1999.

22. L.Y. Wang, A. Beydoun, J. Cook, J. Sun, and I. Kolmanovsky. Optimal Hy-brid Control with Applications to Automotive Powertrain Systems. Control UsingLogic-Based Switching, Vol. 222 of LNCIS, pp. 190-200, Springer-Verlag, 1997.

23. X. Xu and P. Antsaklis. Optimal Control of Switched Autonomous Systems. IEEEConf. on Decision and Control, pp. 4401–4406, 2002.

24. X. Xu and P.J. Antsaklis. Optimal Control of Switched Systems via Nonlinear Op-timization Based on Direct Differentiations of Value Functions. Int. J. of Control,Vol. 75, pp. 1406-1426, 2002.