Optimal control of discrete-time switched linear systems via continuous parameterization
J\'er\'emie Kreiss, Laurent Bako, Eric Blanco

TL;DR
This paper introduces a new optimization-based method for designing optimal controllers for discrete-time switched linear systems, reducing computational complexity by using auxiliary variables and non-smooth optimization techniques.
Contribution
It proposes a continuous parameterization approach that simplifies the switching law design, enabling more efficient computation compared to traditional methods.
Findings
Reduces computational complexity in switching law design
Uses auxiliary continuous input variables for optimization
Demonstrates effectiveness through simulations
Abstract
The paper presents a novel method for designing an optimal controller for discrete-time switched linear systems. The problem is formulated as one of computing the discrete mode sequence and the continuous input sequence that jointly minimize a quadratic performance index. State-of-art methods for solving such a control problem suffer in general from a high computational requirement due to the fact that an exponential number of switching sequences must be explored. The method of this paper addresses the challenge of the switching law design by introducing auxiliary continuous input variables and then solving a non-smooth block-sparsity inducing optimization problem.
| Threshold on | |||||
|---|---|---|---|---|---|
| examples |
| Threshold | ||||||
|---|---|---|---|---|---|---|
| examples |
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Optimal control of discrete-time switched linear systems via continuous parameterization
Jérémie Kreiss
Laurent Bako
Eric Blanco
Laboratoire Ampère, INSA de Lyon, Université de Lyon
20, Avenue Albert Einstein, 69100 Villeurbanne, France
E-mail: [email protected]
Laboratoire Ampère – Ecole Centrale de Lyon – Université de Lyon
36, Avenue Guy de Collongue, 69134 Ecully, France
Abstract
The paper presents a novel method for designing an optimal controller for discrete-time switched linear systems. The problem is formulated as one of computing the discrete mode sequence and the continuous input sequence that jointly minimize a quadratic performance index. State-of- art methods for solving such a control problem suffer in general from a high computational requirement due to the fact that an exponential number of switching sequences must be explored. The method of this paper addresses the challenge of the switching law design by introducing auxiliary continuous input variables and then solving a non-smooth block-sparsity inducing optimization problem.
keywords:
optimal control, switched linear systems, quadratic control, dynamic programming.
1 Introduction
Switched systems constitute a class of dynamic systems consisting of a finite number of subsystems which are activated one after another over time by a switching signal (12), (8), (7). In many cases, the switching signal is an external input which, together with the continuous input vector, can be used to control the behavior of the switched system. Examples of real processes that can be represented as switched systems with external discrete and/or continuous inputs are: autonomous vehicles, chemical processes, electrical circuits, etc. (see e.g., (12) and (8) for a background). The problem of controlling switched systems of this type therefore involves designing a continuous control law along with a switching sequence to achieve some performance specifications. We will be interested more specifically in optimal control design for discrete-time switched linear systems (SLS).
The existing approaches to the problem of optimal control for switched systems can be classified into two groups: the ones addressing the continuous-time case (13; 5; 9; 10; 11) and those pertaining to the discrete-time case (14), (6). Other classifications can be done with respect to the length of the control horizon (finite or infinite), the simplifying assumptions posed a priori on the structure of the discrete or the continuous input or the conceptual nature of the methods. One observation that can be made is the following. Considering the quadratic optimal control of SLS in continuous-time where no structure is imposed in advance on the discrete and continuous control policies, there is so far no exact solution for both finite and infinite control horizons. In discrete-time an exact solution has been derived in (14) for the case of finite control horizon. However direct numerical implementation proves to be so expensive that it is not affordable in practice. Therefore a relevant question of major importance is how to develop some suboptimal strategies that would be much less expensive while still being close to optimality. Some relaxations have been discussed in (14; 6) for this purpose. However the resulting control algorithms still suffer from an exponential demand in storage capacity.
In this paper, we focus on the quadratic optimal control of switched linear systems. The discussion here is restricted to finite-horizon problems but the envisioned ultimate goal is to extend it to infinite horizon. We first observe that the origin of the huge complexity associated with computing the solution to this optimization problem is the presence of discrete variables. Therefore a key idea in our approach is to parameterize the discrete inputs by auxiliary control variables which are continuous. With this reformulation, the SLS optimal control problem becomes completely continuous but nonconvex. We then discuss some convex relaxation strategies. More precisely, we propose solving a sequence of convex problems in order to estimate the auxiliary control variables. The whole process yields an implementation which is shown in simulation to coincide statistically very often with the true optimal control. The advantage of the proposed computational scheme is that it has only a polynomial complexity. Moreover it requires the same storing capacity (for the sequence of positive semidefinite matrices generated by the Riccati recursion) as the solution to the simpler linear quadratic optimal problem.
The structure of this paper is as follows. In Section 2, we formulate the switched quadratic control problem. We discuss the expression of the optimal solution and the associated complexity issue. In Section 3 we present the new continuous parameterization of the discrete control variable and develop a four-steps algorithm for solving it approximately. A numerical illustration is provided in Section 4. Finally, some concluding remarks are given in section 5.
2 Problem Formulation
2.1 Switched linear systems
We consider a discrete-time switched linear system (SLS) described by
[TABLE]
where is a time index, and are respectively the state and the continuous input at time , is the initial state; refers to the value taken by the switching signal (also called here the discrete input) at time . is a finite set collecting the indices of the different subsystems of the SLS (1). For any , the pair of matrices is associated with the subsystem . Throughout the paper, we use notations of the type to designate the entire sequence .
It is important to note that the switching signal is viewed here as an external input. For simplicity, we assume that can be selected freely in without any constraint. The control problem of interest is that of designing jointly a continuous control sequence and a discrete control sequence so as to minimize a certain performance index over a finite time horizon. For this purpose it will be assumed throughout the paper that the SLS (1) is stabilizable.
2.2 Switched optimal quadratic problem
We consider a quadratic performance index associated with system (1) in the form
[TABLE]
where denotes the control horizon, is a given sequence of symmetric positive definite matrices; with represents a sequence of positive semidefinite matrices. The problem of interest in this paper is stated as follows.
Problem 1
Given the performance matrices and , find a continuous input sequence and a discrete input sequence that minimize the performance index (2) subject to the switched system equation (1). In more formal terms, this is equivalent to solving the optimization problem
[TABLE]
We start by observing that the solution to problem (3) can be mathematically characterized in a quite straightforward way using, for example, the Bellman optimality principle (4). However a direct implementation of the optimal control suffers from an exponential complexity in both storing and computational resources. The goal of this paper is to discuss some alternative formulations and corresponding solutions of the quadratic optimal control problem for SLS so as to yield more efficient implementations.
Let us first characterize the solution to problem (3). For this purpose, let denote the performance index corresponding to the situation when the system starts in an arbitrary state at time and evolves under the action of the inputs and . Introduce the function defined by
[TABLE]
is called the value function or the cost-to-go. It is interesting to note from (2) that for all . Equipped with the notation (4), the Bellman principle of optimality (4) can be expressed as
[TABLE]
where is the running cost.
Theorem 1
Consider the control problem (3) and let the functions be defined as in (4). Denote with , , respectively the optimal continuous input, discrete input and continuous state. Then the following statements hold.
The value function is quadratic and can be written as
[TABLE]
where is a sequence of matrices generated recursively backward in time according to the Ricatti recursion defined by
[TABLE]
with
[TABLE] 2. 2.
The optimal continuous input is given by
[TABLE]
where K_{i,k}(P)=\big{(}R(k)+B_{i}^{\textsf{T}}PB_{i}\big{)}^{-1}B_{i}^{\textsf{T}}PA_{i}. 3. 3.
The optimal discrete input is given by
[TABLE]
{pf}
The proof follows by a simple backward induction exploiting the Bellman optimality equation (5). It is therefore omitted.
2.3 Implementation of the optimal control
In order to implement the control law (9)-(10), we need to fully compute offline the sequence by the Ricatti recursion (7). Note that this recursion depends on the optimal switching signal which in turn depends on the optimal continuous state as can be seen from Eq. (10). Unfortunately the optimal state is not available offline. This is a source of a major difficulty. To cope with this challenge an elegant solution has been developed in (14). The authors first showed that the value function given in (6) can be re-expressed as
[TABLE]
where is a sequence of sets of symmetric positive semidefinite matrices defined by111Note that in the setting of (14) the weighting matrices and depend on the subsystem index, not on time. As a consequence is indexed there only by .
[TABLE]
The sets collect indeed all the possible values of the Ricatti sequence (7) for all admissible switching signals. Since the definition of the sets is now freed from the dependence on the continuous state, they can be computed offline and stored. Once this is done the optimal control law can be obtained online by applying
[TABLE]
along with (9).
It turns out that the trick of (14) makes the optimal control (9)-(10) implementable. This is done however at the price of a huge complexity. In effect, the cardinality of the sets grows exponentially fast with respect to the control horizon . For example, the cardinality of is about . Indeed the above implementation requires an exponential load in terms of both computational and storage resources. This complexity affects all the steps of the implementation: offline computation and storage of the sets and online reading and search for the optimal discrete control by Eq. (12) over the sets . To reduce the complexity, a suboptimal solution is discussed in (14). But it is fair to observe that some shortcomings still persist. First, the proposed procedure does not alleviate the off-line computational load ; it only allows for a saving of the necessary storage capacity. Moreover the cardinality reduction algorithm has still to test all the elements in the sets hence resulting in an exponential complexity.
This complexity restricts the applicability of the solution of (14) to the control of switched systems with small number of subsystems and small control horizons. Noting that exponential complexity is generated by the presence of discrete variables in the optimization problem, we discuss here a new approach which relies on a continuous parameterization of the switching sequence.
3 Proposed solution
The proposed design method relies on two main ideas:
- •
A continuous parameterization of the discrete control variable . This consists in replacing the discrete input in the SLS (1) with continuous variables called auxiliary control variables. Consequently, problem (3) can be written as a constrained optimization problem in only continuous variables hence getting rid of its combinatorial feature.
- •
A nonsmooth block-sparsity-inducing optimization involving the auxiliary control variables. The purpose of this is to enforce their expected structure as will be described next.
3.1 Continuous parameterization of the discrete input
A starting point is to notice that the SLS dynamics in (1) can be written in the form
[TABLE]
where . Each can be interpreted as the difference between the state of the SLS at time under and the state that would have been obtained if was set equal to . It follows that for any time instant , .
From now on let us forget about the explicit expressions of the ’s and view them just as unknown control variables satisfying the following constraint: for all , there exists such that where denotes a -dimensional vector with all entries equal to zero. By letting , the above constraint can be written as with being a subset of defined by
[TABLE]
There are many other equivalent ways of representing the set . One of those which are smooth is the following
[TABLE]
for any vector norm on . The variable is then regarded as an auxiliary control variable to be computed along with the continuous input variable. Based on this parameterization we now restate the control problem as follows.
Problem 2
Given the matrices and , find a continuous input sequence and an auxiliary input sequence that minimize the performance index
[TABLE]
subject to system (13) written in expanded form as
[TABLE]
and the constraint .
To write this in a more compact form, define
[TABLE]
where is a vector of ones, is the -dimensional identity matrix and denotes the Kronecker product. Then problem (2) can be written as a constrained optimization problem as follows
[TABLE]
It is important to note that problems (3) and (17) are equivalent. But contrary to (3), problem (17) is an optimization problem in which all the decision variables are continuous. One can therefore hope for designing an algorithm that solves it in polynomial time. A remaining challenge to deal with is the non convexity of (17).
3.2 An algorithm in four stages
We now ask the question of how to compute numerically the solution to problem (17). Because of the non-convex constraint , the problem is not convex. For efficiency of solving we therefore need to find a convex relaxation. We will discuss a block-sparsity inducing optimization technique for that. The global computational procedure can be decomposed into four stages which are described next.
3.2.1 Stage (a)
In this first stage, the sequence is considered as a (unknown) parameter. Hence the criterion is minimized with respect to only, i.e., we solve
[TABLE]
where the constraint on has been removed. This is a convex program. One difference with the classical linear quadratic control problem is that the dynamic matrix in (18) is rectangular rather than square. Also the state is repeated here times on left hand side of the dynamics equation. Denote with the resulting optimal functional, i.e., V_{1}(x_{0},\bar{f}(\cdot))=\min_{u(\cdot)}V\big{(}x_{0},u(\cdot),\bar{f}(\cdot)\big{)}.
Using the method of Lagrange multipliers, construct the Lagrangian by embedding the constraints of (18) in the cost functional. This yields
[TABLE]
where , with , is a sequence of Lagrange multipliers. Introduce now the discrete time Hamiltonian associated with the system (16) and the performance index (15) defined by
[TABLE]
With this short-hand notation the extended cost (19) takes the form
[TABLE]
Considering the minimization of with respect to , let us look at the effect of an elementary variation of and of the induced change in the state. These together induce a variation of , expressible by
[TABLE]
Note that since the initial state is fixed. At the optimal value of we must have as a consequence of any variation of the input and any subsequent variation of the state. This implies that all terms in the previous equation must be set to zero. Thus for all , must satisfy
[TABLE]
Similarly, we must impose
[TABLE]
It follows that the optimal continuous input can be expressed as
[TABLE]
We can rewrite (16) and (23) respectively as follows
[TABLE]
with initial condition and
[TABLE]
with the final constraint .
Eqs (25) and (26) form a system of linear equations that characterizes completely the solution to (18).
3.2.2 Stage (b)
Now, we seek the minimal value of with respect to . Since for any the solution is expected to live in the set defined in (14), the optimization problem is as follows
[TABLE]
As mentioned earlier, this problem is not convex. In order to keep polynomial complexity, we need to find a convex relaxation of it.
To do so, let us denote with the indicator function of defined from to real extended line by if and otherwise. Then (27) is equivalent
[TABLE]
To find a convex relaxation of the terms , we view each vector as being relatively block-sparse in the sense that it must admit at least one subvector which is equal to zero. With this in mind we replace with a nonsmooth convex function, where the ’s denote some positive weights. As is suggested by a certain number of results (see e.g., (3; 2)), minimizing such a function enjoys the nice property that it is able to promote block sparsity hence yielding a vector with some of its subvectors potentially equal or close to zero. The role of the weights is to discriminate between the different subvectors of . They can be selected, for example, iteratively as follows: solve the problem with all weights set to one and based on the resulting solution, retune the weights through a simple rule of the form for some small number . For better numerical stability, one can consider normalizing a posteriori the weights along the dimension.
Finally we formulate the following convex optimization problem:
[TABLE]
For writing simplicity, we have not given here the explicit expression of . The derivation of such an expression follows from straightforward algebraic calculations departing from the system of linear equations (25)-(26).
3.2.3 Stage (c)
Let \big{\{}\hat{\bar{f}}(k)\big{\}} with denote a solution to problem (28). Since this is obtained under some relaxation of the initial problem, there is no guarantee that will lie in the set for all . Hence, we need to project those onto in order to determine the switching sequence. The projection we used consists in selecting the discrete input to be the index such that has the minimum norm among all, i.e.,
[TABLE]
with denoting the vector -norm. In some sense, this corresponds to forcing to zero the having the minimum norm.
3.2.4 Stage (d)
Once we have computed the switching sequence offline, the SLS optimal control problem reduces to that of a linear time-varying system with matrices defined by . The solution of such a problem with respect to the quadratic cost (2) can be determined as in the conventional case (1). To obtain it, we can just apply (7)-(8) with replaced by to generate offline a sequence of matrices . By storing this single Ricatti sequence, the final continuous and discrete inputs are then, similarly as in (9)-(10), selected online as
[TABLE]
with denoting the associated state trajectory. This means that the discrete input is recalculated online.
As it turns out, the implementation proposed in this paper has a polynomial complexity. Moreover it requires storing only a single sequence of matrices just as in the solution of the linear quadratic problem (single linear subsystem). In comparison with (14), the gain on the memory demand is significant. However in its current version, the proposed implementation is not guaranteed to yield the optimal control. In view of the applied control policy (30)-(31), the sole objective of the procedure described above for solving Problem 2 is the computation of the Ricatti sequence .
4 Results
Note that for all the following tests, the weights and are taken equals to .
4.1 A statistical test
In this section we challenge the capability of the proposed method to obtain the solution to the optimal quadratic control problem for switched systems of the form (1). For this purpose examples of two-dimensional switched systems, with each composed of subsystems, are generated at random using the MATLAB function drss. The initial state is also sampled from a Gaussian distribution . For each of these examples, the optimal control problem is that of finding the discrete and continuous inputs to minimize a finite horizon performance index of the form (2) with and with and for all .
For the sake of comparison, we also implement the optimal control law as described in (14) and recalled above in Eqs (11)-(12). This is possible here since the number of subsystems and the control horizon are small. As a matter of fact the cardinality of in (11) for the current experiment is about , which is computationally affordable on a standard computer. Let and , , denote respectively the optimal index and the value yielded by our method. For each of the examples, define the following relative error as an empirical measure of the distance to optimality
[TABLE]
The table below displays the distribution of in terms of probabilities of the type with being a threshold taking values in . It turns out that the solution achieved by the proposed method either coincides with the optimal index or lies generally in a small neighborhood of it. This suggests that for generic systems, the implemented strategy discussed in this paper has the potential of recovering the optimal control and this, at a much affordable price.
Repeating a similar experiment as above with this time examples of switched systems with state dimension and number of modes yield the results reported in Table 2. Note that for this last experiment the control horizon has been reduced to in order to alleviate the computational load associated with the computation of the exact optimal solution. A little degradation of the results can be observed in Table 2 in comparison with the results given in Table 1. This may be due to numerical artefacts as a result of increased number of decision variables. The approximate performance index is still very close to the optimal one.
4.2 Illustration of performance on a single example
For illustration purpose, let us now focus on a single switched system. The considered example is in the form (1) and consists of two linear subsystems with matrices defined by
[TABLE]
It can be observed that none of the individual subsystems is stable. In this experiment, the control horizon is set to ; the initial state is and the weighting matrices of the performance index are defined as in Section 4.1. Applying the proposed method on this example yields the results presented in Figure 1. It turns out that the obtained discrete input is equal to the optimal one except at the two time instants and . However the impact of this difference is negligible on the performance index since we still get a relative error of . This is because the errors occur at a time when the state has almost already converged to zero as shown by Figure 1-(b). We can even conjecture that small amplitude of the state makes it difficult to recover the optimal discrete input by (31).
5 Conclusion
In this paper, we studied the discrete-time quadratic optimal control problem for switched systems on a finite time horizon. Based on a continuous parameterization of the discrete input, we proposed an approach that is able to yield the optimal solution in polynomial time with respect to the length of control horizon. Moreover the proposed algorithm appears to be cheaper than most existing methods in terms of computational load and storage resources. Future research will focus on analyzing the properties of this method.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1Anderson and Moore (1990) Anderson, B. and Moore, J. (1990). Optimal Control : Linear Quadratic Methods . Prentice-Hall International.
- 2Bako and Lecoeuche (2013) Bako, L. and Lecoeuche, S. (2013). A sparse optimization approach to state observer design for switched linear systems. Systems & Control Letters , 62, 143–151.
- 3Bako and Ohlsson (2016) Bako, L. and Ohlsson, H. (2016). Analysis of a nonsmooth optimization approach to robust estimation. Automatica , 66, 132–145.
- 4Bertsekas (2012) Bertsekas, D.P. (2012). Dynamic Programming and Optimal Control . Athena Scientific.
- 5Deaecto et al. (2011) Deaecto, G.S., Geromel, J.C., and Daafouz, J. (2011). Dynamic output feedback hinf control of switched linear systems. Automatica , 47, 1713–1720.
- 6Görges et al. (2011) Görges, D., Izák, M., and Liu, S. (2011). Optimal control and scheduling of switched systems. IEEE Transactions on Automatic Control .
- 7Lemmon et al. (1999) Lemmon, M.D., He, K.X., and Markovsky, I. (1999). Supervisory hybrid systems. IEEE Control Systems , 19, 42–55.
- 8Lunze and Lamnabhi-Lagarrigue (2009) Lunze, J. and Lamnabhi-Lagarrigue, F. (eds.) (2009). Handbook of Hybrid Systems Control, Theory, Tools, Application . Cambridge University Press.
