Abstract

This paper investigates the optimal control problem of a particular class of hybrid dynamical systems with controlled switching. Given a prespecified sequence of active subsystems, the objective is to seek both the continuous control input and the discrete switching instants that minimize a performance index over a finite time horizon. Based on the use of the calculus of variations, necessary conditions for optimality are derived. An efficient algorithm, based on nonlinear optimization techniques and numerical methods, is proposed to solve the boundary-value ordinary differential equations. In the case of linear quadratic problems, the two-point boundary-value problems can be avoided which reduces the computational effort. Illustrative examples are provided and stress the relevance of the proposed nonlinear optimization algorithm.

1. Introduction

The optimization of hybrid dynamical systems has been widely investigated in the last years [17] because such systems can be used to model a wide range of real-world processes in many application fields, such as automotive systems, communication networks, chemical processes, robotics, air-traffic management systems, automated highway systems, embedded systems, and electrical circuit systems, etc [811].

The focus of this paper is on the optimal control of a particular class of hybrid dynamical systems called switched systems. The behaviour of interest of such systems is described by a set of time-driven continuous-state subsystems and a switching law specifying the active subsystem at each time instant. A switching happens when an event signal is received. This signal may be an external generated signal or an internal signal generated if a condition on the time evolution, the states, and/or the inputs is satisfied. Consequently, we call a switching triggered by an external event an externally forced switching. So, according to the nature of the switching signal, switched systems may be classified into switched systems with externally forced switching or switched systems with internally forced switching.

In the last decade the switched systems have been extensively studied [1216] and the corresponding optimal control has never been as relevant as it is nowadays. Due to its significance in theory and applications many theoretical results and numerical algorithms have appeared in the literature [1620]. Most of the available theoretical results are concerned with the study of necessary and/or sufficient conditions for a trajectory to be optimal by means of the Pontryagin maximum principle [21, 22], the dynamic programming approach [23], or the calculus of variations [24]. See [25] for a brief survey on recent progress in computational methods of the optimal control of switched systems.

Modeling switched system depends on the different dynamics of its subsystems described by indexed differential or difference equations. Otherwise, if there is no external control influence on the system, we call it an autonomous switched system. To address the optimal control problem of autonomous switched systems, we have to focus on deriving the optimal sequence of switching times, and even if this sequence is the sole control influence, its determination remains a challenging task. In previous work [10], we have investigated the optimal control problem for autonomous switched systems with autonomous and/or controlled switches. The obtained results were considered to solve a time-optimal control problem for a nonlinear chemical process subject to state constraints.

For nonautonomous switched systems, it is necessary to consider the continuous input together with switching times and sequences. Similar to the optimization for autonomous switched systems, optimization techniques are needed to find the optimal solutions for nonautonomous switched systems. But, despite the relevant contributions to find numerical solutions to such problems by employing the established theoretical conditions, effective algorithms still remain to be developed.

Inspired by what is cited above, the main contribution of this paper is to solve the optimal control problem for nonautonomous switched systems with controlled switching. So, given a prespecified sequence of active subsystems, the objective is to seek both the continuous control input and the discrete switching instants that minimize a performance index over a finite time horizon. By using the calculus of variations, we derive necessary conditions for optimality. A computational algorithm, based on nonlinear optimization techniques and numerical methods for solving boundary-value ordinary differential equations, is then proposed. We also show that, in the case of linear quadratic problems, we can avoid dealing with two-point boundary-value problems and therefore reduce the computational effort.

This paper is organized as follows. In Section 2, the description of the studied switched systems is introduced and the corresponding optimal control problem is formulated. The main results of nonlinear optimization problem are presented in Section 3. An algorithm for computing the optimal continuous control input as well as the full information of the switching sequence and time instants is also proposed. In Section 4, we focus on quadratic optimal control problems for linear switched systems. Numerical simulations are performed in Section 5 to demonstrate the efficiency of the derived results and algorithm. Finally, some concluding remarks and suggested future work are given in Section 6.

2. Problem Statements and Preliminaries

In this paper, we focus on continuous-time switched systems whose dynamics are described for bywhere is the continuous-state vector, is the continuous control input vector, is a set of continuously differentiable functions describing the dynamics of the subsystems, and is a piecewise constant function of time, named switching signal, specifying the active subsystem at each time instant.

For such switched systems, we can control the state trajectory evolution by appropriately choosing the continuous control input and the switching signal . Given a prespecified switching sequence that indicates the order of active subsystems, the control task is reduced to the computation of the continuous control and the discrete switching instants. A switching sequence in is defined aswithwhere are the switching instants and is the number of the active subsystems during the time interval .

The optimal control problem considered in the present paper can be formulated as follows.

2.1. Problem 1

Given a continuous-time switched system whose dynamics are governed by (1) and (2) for a fixed time interval , the objective is to find the continuous control and the switching instants that minimize the quadratic performance indexwith, and are symmetric matrices with , and is a desired trajectory over and are costs associated with the switches.

In order to solve this problem, we will resort to the calculus of variations.

2.2. Basic Concepts

Based on the optimal control problem of continuous systems and the calculus of variations, the variational problem can be stated as follows. Let be a family of trajectories defined on some interval byThe problem is to find that minimize a given cost functional defined aswhere and are real-valued continuously differentiable functions with respect to their arguments.

In order to solve the above problem, we need to express the variation of the cost functional , denoted by , in terms of independent increments in all of its arguments. The optimal trajectory is then characterized by imposing the stationary condition Let be a neighboring perturbed trajectory of , evolving in the time interval , as illustrated in Figure 1. , and are small changes in the trajectory at the initial and final instants.

The variation of is given byFrom the calculus of variations, we can obtain the expression of asIf we introduce the Hamiltonian function and the conjugate moment as defined belowthe variation of may be rewritten in the following form:Setting to zero the coefficients of the independent increments , and yields necessary conditions for a trajectory to be optimal. The obtained results will be used in the following section to solve the hybrid control problem.

3. Main Results

In this section, we will consider the case of a single switching, but the proposed approach and used methods can be straightforwardly applied to the case of several subsystems and more than one switching. The first problem is then reduced to the following problem.

3.1. Problem 2

A continuous-time switched system is given whose dynamics are governed bywhere , and are fixed.

Find the continuous control and the switching instant that minimize the quadratic performance indexwith, and are symmetric matrices with , and .

To solve this problem, we introduce a costate variable also called Lagrange multiplier to adjoin the system subject to constraints (15) to (16). The augmented performance index is thuswhich can be written as withNote that the performance index (19) is a sum of two cost functionals having the same form as (10) with . The variation can therefore be obtained by using the results developed in Section 2.2. According to (13), the Hamiltonian function and the conjugate moment are expressed byUsing (14), we can writeSinceit follows thatAccording to the Lagrange theory, a necessary condition for a solution to be optimal is Setting to zero the coefficients of the independent increments , and yields the costate equation defined asthe gradient of the cost functional with respect to uand the gradient of the cost functional with respect to the switching instant Taking into account (17) and (21), the costate equation (26) is rewrittenThe gradient of the cost functional with respect to u (27) will be described byand the gradient of the cost functional with respect to the switching instant (28) will be expressed asConsidering linear controlled systems, we get from (30)Substituting (32) into the costate equation (29) and the state equation (15) yields the Hamiltonian system expressed byTo determine the hybrid optimal control , we have to solve (33) and (31). Analytical resolution of the above equations is a difficult task, so we need to resort to the following:(i)Numerical methods for solving boundary-value ordinary differential equations: the Hamiltonian system consists of two boundary-value ordinary differential equations whose solutions must satisfy conditions specified at the boundaries of the time intervals and To find these solutions, we can use, for example, the shooting method [26] consisting in replacing the boundary-value problem by an initial-value problem. More details about this method will be further provided.(ii)Nonlinear optimization algorithms: to locate the optimal switching instant , we shall use nonlinear optimization techniques which are abundant in the literature [20, 27, 28]. These methods allow finding the instant that satisfies the stationary condition (31).Therefore, the hybrid optimal control can be found by the implementation of the algorithm detailed in the following subsection.

3.2. Algorithm

See Algorithm 1.

Step 1. Chose an initial for ;
Step 2. Compute the corresponding continuous control
 (i) Solve the Hamiltonian system using the shooting method
  (a) Guess the unspecified initial conditions
  and ;
  (b) Integrate the Hamiltonian system (33) forward from
  to ;
  (c) Using the resulting values of and , evaluate
  the error function:
    ;
       ;
  (d) Adjust the value of and , using a
  numerical method for solving nonlinear equations, to bring
  the function E closer to zero;
 (ii) Calculate the continuous optimal control (32);
Step 3. Calculate J (16);
Step 4. Calculate (31);
Step 5. Find the value of by using a nonlinear optimization
   technique; ;
Step 6. Repeat Steps , , and until the criterion
    is satisfied.

Remark 1. Note that, at each iteration k, we have to solve a boundary-value problem to find the continuous control for a fixed switching instant. Numerical methods used for solving such problem are generally iterative, which may lead to heavy computational time.

Remark 2. For the case of linear switched systems with quadratic performance index, the present work will show that dealing with two-point boundary-value problems can be avoided, and therefore the computational effort can be reduced.

4. Quadratic Optimization

In this section, we consider the problem of minimizing a quadratic criterion subject to switched linear subsystems. For this special class, we can obtain a closed-loop continuous control within each time interval As for the previous section, we consider the case of a single switching. The proposed approach can be straightforwardly applied to the case of several subsystems and more than one switching. So, we will try to find a more attractive solution to Problem 2 withwhere and .

According to (32), the continuous control is given asUsing (33) and (31), the Hamiltonian system can be written asThe gradient of the cost functional with respect to the switching instant is then defined asIn order to solve the Hamiltonian system, we use the sweep method [19]. Thus, assume that and satisfy a linear relation like (40) for all If we can find the matrices and , then our assumption is valid.

By differentiating (42) with respect to time, we getAccording to (38), one obtainsTaking into account (42), it follows thatThis condition holds for all state trajectories , which implies The matrices and are determined by solving (46) and (47) with final conditions deduced from relation (40) and they are written asOur assumption, (42), was then valid.

Sincewe can rewrite (37) asNote that is linear in Hence, to solve the Hamiltonian system in the time interval , we make the same assumption as (42)and then, by using (36), we establish the needed equations for the determination of the matrices and in the time interval with final conditions deduced from (50) Substituting (42) and (51) into (35), we getNote that is an affine state feedback. The closed-loop system is therefore governed byIn order to compute the optimal continuous control for a fixed switching instant, we need to solve the matrix Riccati equations (46)–(52) and the auxiliary equations (47)–(53). The latter are integrated backward in time to get the matrices and The hybrid optimal control is then determined by the implementation of Algorithm 1 with Step modified in Algorithm 2.

Step 2. Compute the corresponding continuous control
 (a) Solve the matrix Riccati equations (46)–(52)
 backward from to ;
 (b) Solve the auxiliary equations (47)–(53) backward
 from to ;
 (c) Solve the state equation (56) forward;
 (d) Calculate (42) and (51);
 (e) Calculate the continuous optimal control (55);

5. Simulation Results

To illustrate the validity of the proposed result and the efficiency of the algorithms, two examples are considered in this section. The former concerns the optimization of a nonlinear switched system. The latter deals with quadratic optimal control problem for linear switched system. The computation was performed using MATLAB 6.5 on a Celeron 2 GHz PC with 256 Mo of RAM.

5.1. First Illustrative Numerical Example

Consider a nonlinear switched system described bySubsystem 1 Subsystem 2 Subsystem 3 with and

The objective is to find the continuous control and the switching times and that minimize the following performance index:By the implementation of Algorithm 1 with and using the steepest descent method to locate the switching instants, after 6 iterations taking about 93.78 seconds of CPU time, we find , and

The optimal control and the corresponding state trajectory are shown in Figure 2. Figure 3 shows the plot of the cost functional for different .

5.2. Second Illustrative Example

Let us consider a linear switched system, described by three subsystems asSubsystem 1Subsystem 2Subsystem 3with and .

The problem is to find the continuous control and the switching instants and that minimize the quadratic performance index By the implementation of the modified Algorithm 1 (see Algorithm 2) with and using the Broyden-Fletcher-Goldfarb-Shanno method to locate the switching instants, after 5 iterations taking about 47.51 seconds of CPU time, we find , and The optimal control and the corresponding state trajectory are shown in Figure 4. Figure 5 shows the plot of the cost functional for different .

By examining Figures 3 and 5, we can notice that the function is not convex. Since the nonlinear optimization techniques lead generally to local minimums, the initial point of Algorithm 1 must be adequately chosen to reach the global minimum. The solutions presented for the both examples were evidently the optimal ones.

6. Conclusion

Based on nonlinear optimization techniques and numerical methods for solving boundary-value ordinary differential equations, we proposed an algorithm for solving optimal control problems for switched systems with externally forced switching. We assumed that the switching sequence is fixed, and therefore the control variables are only the continuous control input and the discrete switching instants. The effectiveness of the presented algorithm was demonstrated through simulation results.

The obtained results will be extended to the optimal control of interconnected switched systems. Otherwise parametric uncertainties and input disturbances are often present in real-life applications. So, analysis procedures and control synthesis algorithm for hybrid systems if additive disturbances and/or parametric uncertainties are present are topics that are starting to deserve the attention of researchers [5]. Indeed, uncertainty in hybrid system can be present in the vector fields describing the flow of the system and/or in the switching transition law. It can be of parametric nature or caused by time-varying perturbations of the vector field, switching delays. Thus, the robustness analysis will be investigated and can be handled in our future works.

Conflicts of Interest

The author declares that there are no conflicts of interest regarding the publication of this paper.