Complexity

Volume 2017, Article ID 5308013, 11 pages

https://doi.org/10.1155/2017/5308013

## Calculus of Variations and Nonlinear Optimization Based Algorithm for Optimal Control of Hybrid Systems with Controlled Switching

^{1}High Institute of Technological Studies in Communications (ISET’COM), Tunis, Tunisia^{2}Automatic Research Laboratory (LARA), National Engineering School of Tunis (ENIT), Tunis, Tunisia

Correspondence should be addressed to Hajer Bouzaouache; nt.unr.tpe@ehcauoazuob.rejah

Received 10 February 2017; Revised 7 July 2017; Accepted 10 July 2017; Published 10 August 2017

Academic Editor: Michele Scarpiniti

Copyright © 2017 Hajer Bouzaouache. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### 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 [1–7] 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 [8–11].

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 [12–16] 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 [16–20]. 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.