Skip to main content

A new computational approach for optimal control of switched systems

Abstract

The combination of the time-scaling transformation and control parameterization has proven to be an effective approach in addressing optimal control problems involving switching systems with predefined subsystem sequences. However, this approach has certain limitations. First, the number of control switchings is required to be no less than the number of subsystem switchings. Second, the switching of the subsystem must be accompanied by the switching of the control. Third, this scheme introduces many hyperparameters, leading to combinatorial explosion. To address these drawbacks, we introduce a novel computational approach such that the control switching can be independent of subsystem switching. The superiority of this novel approach can be clearly observed from the solutions obtained using the proposed method for solving two illustrative examples.

1 Introduction

A switching system is a dynamic system composed of multiple modes (often called subsystems). The system transitions between these modes based on defined rules or conditions. More specifically, a transition between subsystems can be triggered by predefined events, specific time instances, or conditions tied to the system state. Due to their inherent adaptability, such systems can dynamically shape their behavior and control strategies to adeptly respond to changes in environmental conditions or system requirements. Switching systems are encountered in a variety of areas such as robots [1, 2], power systems [3], and communication networks [4, 5]. The success of these applications demonstrates the versatility and importance of switching systems. The challenge in solving the optimal control problem of switching systems (SOCP) lies in intelligently determining the control inputs and switching laws. The switching law serves as a blueprint outlining the detailed sequence of active subsystems and their corresponding switching times. This sequence encapsulates the precise moments when the system transitions smoothly from one subsystem to another, coordinating the interaction of modes to optimize overall performance.

Early theoretical advances to address this problem can be found in [6] and [7], where dynamic programming and the maximum principle were adopted, respectively. However, they do not provide effective numerical methods to obtain optimal solutions. In [8], Xu and Antsaklis introduced a bilevel optimization approach to address SOCPs. This approach breaks down the problem into two levels and solves them iteratively. The lower level focuses on fixing the switching sequence and optimizing the control inputs and switching times to minimize the cost function. On the other hand, the upper layer optimizes the switching sequence and performs the lower layer optimization for each switching sequence. This is much more complex. In [913], it was generally assumed that the switching sequence is predetermined, and the focus is on optimizing the lower level. This consideration applies to scenarios where the order of switching sequences is predetermined and only lower-level issues are performed. See, for example, [8]. In addition, the research results of the lower level will lay the foundation for the research of the upper level. Therefore, this paper also studies the switching optimal control problem of fixed switching sequence.

Most existing strategies for addressing the lower-level problem resort to discretizing the control function and/or state variable. Then, a search algorithm is applied to the resulting discrete model to find the optimal solution [14]. However, these discretization methods can lead to combinatorial explosion. To address this issue, a novel method is proposed in [8] to decompose the lower-level problem into two subproblems. The first subproblem focuses on minimizing the cost function with fixed switching instants, where decision variables are limited to control inputs. This process converts the problem into a nonlinear optimization problem. For the second subproblem, it aims to minimize the cost function with respect to switching instants. For this, the gradient of the cost function with respect to the switching times is derived. This approach has been improved in [1517].

In [18], a novel technique is introduced to address the lower-level problem without the need for decomposition. This method works by first approximating the control function using a piecewise constant function where the control heights and the control switching times become the new optimization variables. Then, with the aid of the time-scaling transformation [19, 20], the switching times of the control and subsystems are mapped into fixed knots within a newly defined time horizon. This process leads to the approximation of the original optimal control problem as a nonlinear optimization problem. Since then, this technique has been widely adopted for solving optimal control problems involving switching systems over the past decade [2123]. However, it is worth noting that this scheme requires that (i) the number of control switchings must be no less than the number of switchings between subsystems, and (ii) the switching of the subsystem must be accompanied by the switching of the control. These predetermined requirements may not be strictly adhered to for many practical problems. This is because the control switching times and the subsystem switching times are usually independent of each other.

In [24, 25], within the computational paradigm of control parameterization, an effective strategy called Sequential Adaptive Switching Time Optimization (SASTO) is proposed to solve standard optimal control problems. The SASTO approach is applicable to scenarios where the optimization is to be carried out on multiple sets of mutually independent switching times. It is achieved through the systematic introduction of new time domains. Motivated by the success of this approach, our aim is to devise a new method that efficiently addresses the limitations faced when solving switching optimal control problems.

The remainder of the paper is structured as follows. The problem formulation is presented in Sect. 2. Moving on to Sect. 3, we delve into the shortcomings of employing traditional time scale transformations and devise an efficient approach to address this challenge. A new computational method is constructed to solve the resulting transformed problem. In Sect. 4, the gradient formulas of the cost/constraint functions are given. In Sect. 5, two numerical examples are solved. Finally, concluding remarks are provided in Sect. 6.

2 Problem formulation

Consider the following nonlinear switched system with N subsystems:

$$\begin{aligned} &\dot{\boldsymbol {x}}(t)=\boldsymbol {f}^{j}\bigl(\boldsymbol {x}(t), \boldsymbol {u}(t)\bigr),\quad t\in [t_{j-1},t_{j}), j=1, \ldots ,N, \end{aligned}$$
(1)
$$\begin{aligned} &\boldsymbol {x}(t_{0})=\boldsymbol {x}^{0}, \end{aligned}$$
(2)

where \(\boldsymbol {x}(t)\in \mathbb{R}^{n}\) and \(\boldsymbol {u}(t)\in \mathbb{R}^{m}\) are the state and control vectors of the system at time t, respectively; \(\boldsymbol {x}_{0}\in \mathbb{R}^{n}\) is the given initial state; \(\boldsymbol {f}^{j}: \mathbb{R}^{n}\times \mathbb{R}^{m}\rightarrow \mathbb{R}^{n}\), \(j=1, \ldots ,N\), is the given continuously differentiable function representing the jth subsystem; \(t_{0}, t_{1},\ldots , t_{N}\) are the switching instants of subsystems where \(t_{0}=0\), \(t_{N}=T>0\) are the initial and terminal times, respectively. Let \(\boldsymbol{\tau}=[t_{0},t_{1},\dots ,t_{N}]^{\top}\) be such that \(t_{j-1}< t_{j}\), \(j=1,\dots ,N\). Let \(\mathcal{T}\) be the set consisting of all such τ.

Let \(\boldsymbol {u}: [0, T]\rightarrow \mathbb{R}^{m}\) be a Borel measurable function satisfying \(\boldsymbol {u}(t)\in U\) for almost all \(t\in [0, T ]\), where U is a compact and convex set in \(\mathbb{R}^{m}\). Such a u is termed an admissible control. Denote the set of all such admissible controls as \(\mathcal{U}\). The formal definition of the optimal control problem for the switched system is as follows:

Problem (P1)

Given the switched system (1)–(2), find \(\boldsymbol {u}\in \mathcal{U}\) and \(\boldsymbol{\tau}\in \mathcal{T}\) such that the cost function

$$\begin{aligned} g_{0}(\boldsymbol {u})=\Phi _{0}\bigl(\boldsymbol {x}(T| \boldsymbol {u})\bigr)+ \int _{0}^{T}{ \mathcal{L}_{0}\bigl( \boldsymbol {x}(t),\boldsymbol {u}(t)\bigr)\,dt } \end{aligned}$$

is minimized subject to the canonical constraints

$$\begin{aligned} &g_{l}(\boldsymbol {u})=\Phi _{l}\bigl(\boldsymbol {x}(T| \boldsymbol {u})\bigr)+ \int _{0}^{T}{ \mathcal{L}_{l}\bigl( \boldsymbol {x}(t),\boldsymbol {u}(t)\bigr)\,dt }\ge 0,\quad l=1,\dots ,N_{b}, \\ &g_{l}(\boldsymbol {u})=\Phi _{l}\bigl(\boldsymbol {x}(T| \boldsymbol {u})\bigr)+ \int _{0}^{T}{ \mathcal{L}_{l}\bigl( \boldsymbol {x}(t),\boldsymbol {u}(t)\bigr)\,dt }=0,\quad l=N_{b}+1,\dots ,N_{b}+N_{d}. \end{aligned}$$

Here, \(N_{b}\) and \(N_{d}\) represent the counts of inequality and equality constraints, respectively; \(\Phi _{l}: \mathbb{R}^{n} \to \mathbb{R}\), \(\mathcal{L}_{l}:\mathbb{R}^{n}\times \mathbb{R}^{m}\to \mathbb{R}\), \(l=0,1, \dots ,N_{b}+N_{d}\), are specified real-valued functions.

We presume that the conditions outlined in [20] are satisfied throughout this paper:

  1. A1.

    Function \(\boldsymbol {f}^{j}\), \(j=1,\ldots ,N\), is twice continuously differentiable.

  2. A2.

    For \(j=1,\ldots ,N\), there is a constant L (\(L>0\)) such that

    $$ \bigl\| \boldsymbol {f}^{j}(\boldsymbol{\aleph}\,, \boldsymbol{\daleth})\bigr\| \le L \bigl(1+\|\boldsymbol{\aleph}\, \|+\| \boldsymbol{\daleth}\|\bigr),\quad (\boldsymbol{\aleph}\,,\boldsymbol{\daleth})\in \mathbb{R}^{n}\times \mathbb{R}^{m}. $$
  3. A3.

    Functions \(\Phi _{l}:\mathbb{R}^{n} \to \mathbb{R}\), \(l=0,1,\dots ,N_{b}+N_{d}\), and \(\mathcal{L}_{l}:\mathbb{R}^{n}\times \mathbb{R}^{m}\to \mathbb{R}\), \(l=0,1, \dots ,N_{b}+N_{d}\), are continuously differentiable with respect to their arguments.

3 Method analysis

Over the past few decades, the utilization of the time-scaling transformation and control parameterization method has gained popularity as a numerical method for solving SOCPs [18, 21, 26]. This method subdivides the time interval \([t_{j-1},t_{j}]\) into \(p_{j}\) subintervals and denotes the \(p_{j}+1\) nodes as \(\tau _{0}^{j},\tau _{1}^{j},\ldots ,\tau _{p_{j}}^{j}\), \(j=1,\ldots , N\), where \(t_{0}=0\), \(t_{N}=T\) and \(t_{j-1}=\tau _{0}^{j}<\tau _{1}^{j}<\cdots <\tau _{p_{j}}^{j}=t_{j}\), as shown in Fig. 1. By applying the control parameterization, \(\boldsymbol {u}(t)\) is approximated by a piecewise constant function on the time domain \([0,T]\) as follows:

$$\begin{aligned} \boldsymbol {u}(t)\approx \sum_{j=1}^{N} \sum_{k=1}^{{p_{j}}} \boldsymbol{\rho}^{j,k}\chi _{[\tau _{k-1}^{j},\tau _{k}^{j})(t)},\quad t\in [0,T], \end{aligned}$$
(3)

where \(\boldsymbol{\rho}^{j,k}\) is the approximate value of the control \(\boldsymbol {u}(t)\) on the kth interval \([t_{j-1},t_{j}]\). Then, the time-scaling transformation operates by mapping these variable knots \(\{t_{0},\tau _{1}^{1},\ldots ,\tau _{p_{1}-1}^{1}, t_{2},\ldots ,t_{N-1}, \tau _{1}^{N},\ldots ,\tau _{p_{N}-1}^{N},t_{N}\}\) to fixed and ordered points \(\{0,1\ldots ,p_{1}-1,p_{1},\ldots ,p_{1}+p_{2},\ldots , \sum_{j=1}^{N}p_{j} \}\) in a new domain. Clearly, there are many hyperparameters \(p_{1},\ldots ,p_{N}\), which can easily lead to combinatoric explosion. For example, when \(p = 5\) and \(p\triangleq \sum_{j=1}^{N}p_{j}\), there are 21 possible combinations of partitions \((p_{1}, p_{2}, p_{3})\). To avoid this situation, most existing literature such as [18, 21, 22, 27, 28] only consider the case of \(p_{1} = p_{2} = p_{3}\) in their numerical experiments so that p must be a multiple of N.

Figure 1
figure 1

Illustration of switching times for \(\boldsymbol {u}(t)\)

Additionally, from Fig. 1 it can be seen that the switching instants \(t_{0}, t_{1},\ldots ,t_{N}\) coincide with the partition knots \(\tau _{0}^{1},\tau _{0}^{2},\ldots ,\tau _{N}^{N}\), so \(p\triangleq \sum_{j=1}^{N}p_{j}\ge N\), which indicates (i) the number of control switchings must be no less than the number of switchings between subsystems; and (ii) the switching of the subsystem must be accompanied by the switching of the control. This is clearly unreasonable because the switching times \(t_{0}, t_{1},\ldots ,t_{N}\) and the control switching points are usually mutually independent.

In [24, 25], it is pointed out that the time-scaling transformation is an order-preserving mapping. Therefore, the application of this method must meet the essential requirements of a priori knowledge of the chronological order of these time instants to be optimized. Nevertheless, due to the independence of these two types of switching instants, the temporal sequence between the control switching points and the switching times of the subsystems cannot be known in advance. Thus, using this method to solve Problem (P1) must require the switching of the subsystem be accompanied by the switching of control, i.e., \(t_{j}=\tau _{0}^{j+1}\), \(j=1,\ldots , N\). In other words, the prior knowledge of the chronological order of these time instants \(\{t_{0},\tau _{1}^{1},\ldots ,\tau _{p_{1}-1}^{1},t_{2},\ldots ,t_{N-1}, \tau _{1}^{N},\ldots ,\tau _{p_{N}-1}^{N},t_{N}\}\) is essential. This clearly violates the independent nature between these two types of switching instants.

To overcome these shortcomings, we will design a new method to solve Problem (P1), which enables adaptive optimization of the selection of unknown switching time sequences as in [24].

3.1 A new numerical solution procedure

For Problem (P1), the switching instant vector τ and the control function \(\boldsymbol {u}(t)\) need to be optimized jointly. Initially, we employ the time-scaling transformation to the subsystem which involves τ, while keeping \(\boldsymbol {u}(t)\) temporarily unchanged. This process leads to the formulation of a new optimal control problem. Following this, we implement the control parameterization for \(\boldsymbol {u}(t)\) within the newly defined time domain and subsequently utilize the time-scaling transformation to handle the control switching times, thereby introducing an additional new time domain. The detailed procedure is given below.

Step 1. Time-scaling transformation for switching time vector τ

For each \(\boldsymbol{\tau}=[t_{1},\ldots ,t_{N}]^{\top}\in \mathcal{T}\), define \(\boldsymbol{\theta}= [\theta _{1},\ldots ,\theta _{N}]^{\top}\in \mathbb{R}^{N}\), where \(\theta _{j}=t_{j}-t_{j-1}\ge 0\), \({j=1},\ldots ,N\), and \(\theta _{1}+\cdots +\theta _{N}=T\). Define Θ as the set comprising all such vectors \(\boldsymbol{\theta}\in \mathbb{R}^{N}\). By introducing a new time variable s, we establish the definition for the time-scaling function \(\mu _{1}(s\mid \boldsymbol{\theta})\) such that

$$\begin{aligned} t(s)\triangleq \mu _{\mathtt{1}}(s\mid \boldsymbol{\theta})=\sum _{{j=1}}^{ \lfloor s\rfloor}\theta _{j}+\theta _{({\lfloor s\rfloor}+1)}\bigl(s-{ \lfloor s\rfloor}\bigr),\quad s\in [0,N]. \end{aligned}$$

Here, \(\lfloor \cdot \rfloor \) represents the floor function. The choice of \(\theta _{{N+1}}\) is arbitrary since its value does not impact the result when \(s=N\). Under the effect of time-scaling transformation, \(t = t_{j}\) are transformed into fixed points \(s = j\), \(j= 1, \ldots , N\). Figure 2 shows the transformation of the variable switching times to the fixed points on the time domain s through the time-scaling function \(\mu _{1}(s\mid \boldsymbol{\theta})\) when \(N=4\). Accordingly, \(\boldsymbol {u}(t)\) is transformed into \(\boldsymbol {u}(\mu _{1}(s))\triangleq \boldsymbol {w}(s)\), which is called the transitional control function of \(\boldsymbol {u}(t)\). The switching system defined on the new time domain \([0,N]\) is

$$\begin{aligned} &\dot{\boldsymbol {y}}(s)=\theta _{j}\boldsymbol {f}^{j} \bigl(\boldsymbol {y}(s), \boldsymbol {w}(s)\bigr), \quad s\in [{j-1},j), j=1, \ldots ,N, \end{aligned}$$
(4)
$$\begin{aligned} &\boldsymbol {y}(0)=\boldsymbol {x}^{0}, \end{aligned}$$
(5)

where \(\boldsymbol {y}(s)\triangleq \boldsymbol {x}(\mu _{1}(s))=\boldsymbol {x}(t)\) is the new state vector of the time variable s.

Figure 2
figure 2

The time-scaling function \(\mu (s\mid \boldsymbol{\theta})\)

Step 2. Control parameterization applied to \(\boldsymbol {w}(s)\)

We divide the time interval \([0,N]\) into p subintervals with \(p+1\) partition points denoted by \(s_{0},s_{1},\ldots ,s_{p}\), satisfying \(0=s_{0}< s_{1}<\cdots <s_{p}=N\) as shown in Fig. 3. Note that we introduce only one hyperparameter p compared with the method in [18] (see Fig. 1). Define Ξ as the set comprising all such vectors \(\boldsymbol{\xi}=[s_{0},s_{1},\ldots ,s_{p}]^{\top}\in \mathbb{R}^{p}\), where \(s_{k}, k=1,\ldots ,p\), are the switching times of the transitional control function \(\boldsymbol {w}(s)\). Accordingly, \(\boldsymbol {w}(s)\) is approximated by

$$\begin{aligned} \boldsymbol {w}(s)\approx \sum_{k=1}^{p} \boldsymbol{\rho}_{k}\chi _{[s_{k-1},s_{k})}(s), \quad s\in [0,N], \end{aligned}$$
(6)

where \(\boldsymbol{\rho}_{k}=[\rho _{k}^{1},\ldots ,\rho _{k}^{m}]^{\top}\) is the approximate value of the transitional control \(\boldsymbol {w}(s)=[w_{1}(s),\ldots ,w_{m}(s)]^{\top}\) on the kth subinterval. Define Δ as the set comprising all such vectors \(\boldsymbol{\rho}=[\boldsymbol{\rho}_{1}^{\top},\ldots ,\boldsymbol{\rho}_{p}^{\top}]^{\top}\) and let \(\chi _{[s_{k-1},s_{k})}(s)\) be defined by

$$\begin{aligned} \chi _{[s_{k-1},s_{k})}(s)=\textstyle\begin{cases} 1, & \text{if $s\in [s_{k-1},s_{k})$,} \\ 0, & \text{otherwise.} \end{cases}\displaystyle \end{aligned}$$

The switching system (4)–(5) defined on the interval \([0,N]\) becomes

$$\begin{aligned} &\dot{\boldsymbol {y}}(s)=\theta _{j}\boldsymbol {f}^{j} \Biggl(\boldsymbol {y}(s), \sum_{k=1}^{p} \boldsymbol{\rho}_{k}\chi _{[s_{k-1},s_{k})}(s) \Biggr), \quad s\in [j-1,j), j=1, \ldots ,N, \end{aligned}$$
(7)
$$\begin{aligned} &\boldsymbol {y}(0)=\boldsymbol {x}^{0}. \end{aligned}$$
(8)

Step 3. Time-scaling transformation applied to the control switching times in ξ

Figure 3
figure 3

Control switching times for \(\boldsymbol {w}(s)\)

For each \(\boldsymbol{\xi}=[s_{0},s_{1},\ldots ,s_{p}]^{\top} \in \Xi \), define \(\boldsymbol{\sigma}=[\sigma _{1},\dots ,\sigma _{p}]^{\top} \in \mathbb{R}^{p}\), where \(\sigma _{k}=s_{k}-s_{k-1}>0\), \(k=1,\ldots ,p\), and \(\sigma _{1}+\cdots +\sigma _{p}=N\). Define Σ as the set comprising all such vectors \(\boldsymbol{\sigma}\in \mathbb{R}^{p}\). By introducing a new time variable v, we establish the definition for the time-scaling function \(\mu _{\mathtt{2}}(v| \boldsymbol{\sigma})\),

$$ s(v) \triangleq \mu _{2}(v| \boldsymbol{\sigma}) = \sum _{{k=1}}^{ \lfloor v\rfloor}\sigma _{k}+\sigma _{({\lfloor v\rfloor}+\mathtt{1})}\bigl(v - {\lfloor v\rfloor}\bigr),\quad v \in [0,p]. $$

The above transformation maps variable times \(s=s_{k}\) to fixed times \(v=k\), \(k=1,\ldots ,p\). Also \(\boldsymbol {y}(s)=\boldsymbol {y}(\mu _{2}(v))\triangleq \boldsymbol {z}(v)\), which is the new state vector of the time variable v. Accordingly, the switching system (7)–(8) becomes

$$\begin{aligned} &\dot{\boldsymbol {z}}(v)=\sigma _{k}\sum _{j=1}^{N}\theta _{j}\boldsymbol {f}^{j}\bigl( \boldsymbol {z}(v), \boldsymbol{\rho}_{k}\bigr) \chi _{[{j-1},j)}\bigl(\mu _{2}(v)\bigr), \quad v\in [{k-1},k), k=1, \ldots ,p, \end{aligned}$$
(9)
$$\begin{aligned} &\boldsymbol {z}(0)=\boldsymbol {x}^{0}. \end{aligned}$$
(10)

Denote \(\boldsymbol {z}(\cdot |\boldsymbol{\theta}, \boldsymbol{\sigma}, \boldsymbol{\rho})\) as the solution of (9)–(10). Based on Assumptions A1–A2, we can show that the system possesses a unique solution for every permissible \((\boldsymbol{\theta},\boldsymbol{\sigma}, \boldsymbol{\rho})\) within the set \((\Sigma , \Theta , \Delta )\) [20]. Problem (P1) is approximated as the following nonlinear programming problem.

Problem (P2)

Given system (7)–(8), find \(\boldsymbol{\theta}\in \Theta \), \(\boldsymbol{\sigma}\in \Sigma \), \(\boldsymbol{\rho}\in \Delta \), such that the cost function

$$\begin{aligned} \bar{g}_{0}(\boldsymbol{\theta}, \boldsymbol{\sigma}, \boldsymbol{\rho})=&\Phi _{0}\bigl(\boldsymbol {z}(p| \boldsymbol{\theta},\boldsymbol {\sigma},\boldsymbol{\rho})\bigr)+\sum_{{k=1}}^{p} \int _{{k-1}}^{{k}}{ \sigma _{k}\theta _{\lfloor \mu _{2}(v)\rfloor}\mathcal{L}_{0}\bigl(\boldsymbol {z}(v), \boldsymbol {\rho}_{k}\bigr)\,dv } \end{aligned}$$

is minimized subject to the canonical constraints

$$\begin{aligned} &\bar{g}_{l}(\boldsymbol{\theta}, \boldsymbol{\sigma}, \boldsymbol {\rho})=\Phi _{l}\bigl(\boldsymbol {z}(p| \boldsymbol{\theta},\boldsymbol {\sigma},\boldsymbol{\rho})\bigr)+\sum_{{k=1}}^{p} \int _{{k-1}}^{{k}}{ \sigma _{k}\theta _{\lfloor \mu _{2}(v)\rfloor}\mathcal{L}_{l}\bigl(\boldsymbol {z}(v), \boldsymbol {\rho}_{k}\bigr)\,dv }\ge 0, \\ &\quad l=1, \dots ,N_{b}, \\ &\bar{g}_{l}(\boldsymbol{\theta}, \boldsymbol{\sigma}, \boldsymbol{\rho})=\Phi _{l}\bigl(\boldsymbol {z}(p| \boldsymbol{\theta},\boldsymbol {\sigma},\boldsymbol{\rho})\bigr)+\sum_{{k=1}}^{p} \int _{{k-1}}^{{k}}{ \sigma _{k}\theta _{\lfloor \mu _{2}(v)\rfloor}\mathcal{L}_{l}\bigl(\boldsymbol {z}(v), \boldsymbol {\rho}_{k}\bigr)\,dv }= 0, \\ &\quad l=N_{b}+1, \dots ,N_{b}+N_{d}. \end{aligned}$$

3.2 The switching times analysis

After making the above approximation to Problem (P1), the original switching time vector τ is transformed into the duration θ between two successive subsystem switching points, while the switching times for the control function \(\boldsymbol {u}(t)\) are transformed into the control height ρ and the duration σ between two successive control switching knots. Here, ρ, σ, and θ are new decision vectors to be optimized. Once the optimal solution \((\boldsymbol{\rho}^{\ast},\boldsymbol{\sigma}^{\ast },\boldsymbol{\theta}^{\ast })\) is obtained by solving Problem (P2), we can derive the switching times of the subsystem and the control on the original time interval \([0,T]\).

To be specific, the optimal switching times, \(t_{j}^{*}, j=1,\ldots ,N\), of the subsystem can be readily calculated by using the time-scaling function \(\mu _{1}(s\mid \boldsymbol{\theta}^{*})\) and setting \(s=1,\dots ,N\). However, determining the switching times of \(\boldsymbol {u}(t)\) necessitates the following procedure:

  1. (i)

    Use the time-scaling function \(\mu _{2}(v\mid \boldsymbol{\sigma}^{*})\) and set \(v=1,\dots ,p\). This results in the optimal switching times of \(\boldsymbol {w}(s)\), denoted as \(s_{k}^{*}, k=1,\dots ,p\), according to the time variable s within the interval \([0, N]\);

  2. (ii)

    Use the time-scaling function \(\mu _{1}(s\mid \boldsymbol{\theta}^{*})\) and set \(s=s_{1}^{*},\dots ,s_{p}^{*}\). The optimal switching times of \(\boldsymbol {u}(t)\), \(\tau _{k}^{*}=\mu _{1}(s_{k}^{*}\mid \boldsymbol{\theta}^{*})\), \(k=1,\dots ,p\), are determined. Let \(\boldsymbol{\tau}^{1,*}=[\tau _{1}^{*},\ldots ,\tau _{p}^{*}]^{\top}\) represent the control switching times.

Note that \(\boldsymbol{\tau}^{*}=[t_{1}^{*},\ldots ,t_{N}^{*}]^{\top}\) and \(\boldsymbol{\tau}^{1,*}=[\tau _{1}^{*},\ldots ,\tau _{p}^{*}]^{\top}\) are selected adaptively, being carried out under the condition that the subsystem switching times and the control switching times are mutually independent, as illustrated in Fig. 4. Moreover, it is worth noting that compared to Fig. 1, there is only one hyperparameter p.

Figure 4
figure 4

The optimal switching times of the subsystems and the control

4 Gradient computation

Problem (P2) can be addressed through the application of gradient-based nonlinear optimization algorithms. To accomplish this, it is necessary to calculate the gradients of both the cost and constraint functions, where the used gradient computational method is the variational method. The theorem below provides the partial derivatives of the state at θ.

Theorem 1

For each \((\boldsymbol{\theta},\boldsymbol{\sigma},\boldsymbol{\rho})\),

$$\begin{aligned} \frac{\partial{{\boldsymbol {z}}(v\mid \boldsymbol{\theta},\boldsymbol{\sigma},\boldsymbol{\rho})}}{\partial \boldsymbol{\theta}}= \boldsymbol{\Lambda}(v\mid \boldsymbol{\theta},\boldsymbol {\sigma},\boldsymbol{\rho}), \end{aligned}$$

\(\boldsymbol{\Lambda}(\cdot \mid \boldsymbol{\theta},\boldsymbol{\sigma},\boldsymbol{\rho})\) is the solution of the following variational system on \(v\in [k-1,k)\), \(k=1,\ldots ,p\):

$$\begin{aligned}& \begin{aligned} \dot{\boldsymbol{\Lambda}}(v)&= \frac{\partial \sigma _{k}\sum_{j=1}^{N}\theta _{j}\boldsymbol {f}^{j}(\boldsymbol {z}(v), \boldsymbol{\rho}_{k})\chi _{[{j-1},j)}(\mu _{2}(v))}{\partial \boldsymbol {z}(v)}{ \boldsymbol{\Lambda}}(v) \\ &\quad{} + \frac{\partial \sigma _{k}\sum_{j=1}^{N}\theta _{j}\boldsymbol {f}^{j}(\boldsymbol {z}(v), \boldsymbol{\rho}_{k})\chi _{[{j-1},j)}(\mu _{2}(v))}{\partial \boldsymbol{\theta}}, \end{aligned} \\& \boldsymbol{\Lambda}(0)=0. \end{aligned}$$

Proof

The proof closely resembles that presented in Theorem 1 of [29] and is consequently omitted. □

Utilizing the chain rule, the theorem below provides the gradients of \(g_{l}(\boldsymbol{\theta},\boldsymbol{\sigma},\boldsymbol{\rho})\) at \(\boldsymbol{\theta}, l=0,1,\ldots ,N_{b}+N_{d}\).

Theorem 2

For each \(l=0,1,\ldots ,N_{b}+N_{d}\), the gradient of \(g_{l}\) in terms of θ, are given by

$$\begin{aligned} \frac{\partial g_{l}}{\partial \boldsymbol{\theta}}&= \frac{\partial \Phi _{l}({\boldsymbol {z}}(p))}{\partial{\boldsymbol {z}}}\boldsymbol{\Lambda}(p) \\ &\quad{}+\sum_{k=1}^{p} \int _{k-1}^{k}\sigma _{k} \biggl\{ \frac{\theta _{\lfloor \mu _{2}(v)\rfloor}\partial{\mathcal{L}}_{l}({\boldsymbol {z}}(v),\boldsymbol{\rho}_{k})}{\partial \boldsymbol {z}} \boldsymbol{\Lambda}(v)+ \frac{\theta _{\lfloor \mu _{2}(v)\rfloor}\partial{\mathcal{L}}_{l}({\boldsymbol {z}}(v),\boldsymbol{\rho}_{k})}{\partial \boldsymbol{\theta}} \biggr\} \,dv . \end{aligned}$$

Proof

The proof is derived by using the chain rule to the cost/constraint functionals in conjunction with Theorem 1. □

Likewise, the derivatives of the cost/constraint functions in terms of ρ can be computed.

Theorem 3

For each \((\boldsymbol{\theta},\boldsymbol{\sigma},\boldsymbol{\rho})\),

$$\begin{aligned} \frac{\partial{{\boldsymbol {z}}(v\mid \boldsymbol{\theta},\boldsymbol{\sigma},\boldsymbol{\rho})}}{\partial \boldsymbol{\rho}}= \boldsymbol{\Upsilon}(v\mid \boldsymbol{\theta},\boldsymbol {\sigma},\boldsymbol{\rho}), \end{aligned}$$

where \(\boldsymbol{\Upsilon}(\cdot \mid \boldsymbol{\theta},\boldsymbol{\sigma},\boldsymbol{\rho})\) is the solution of the following variational system on \(v\in [k-1,k)\), \(k=1,\ldots ,p\),

$$\begin{aligned}& \begin{aligned} \dot{\boldsymbol{\Upsilon}}(v)&= \frac{\partial \sigma _{k}\sum_{j=1}^{N}\theta _{j}\boldsymbol {f}^{j}(\boldsymbol {z}(v), \boldsymbol{\rho}_{k})\chi _{[{j-1},j)}(\mu _{2}(v))}{\partial \boldsymbol {z}(v)}{ \boldsymbol{\Upsilon}}(v) \\ &\quad{}+ \frac{\partial \sigma _{k}\sum_{j=1}^{N}\theta _{j}\boldsymbol {f}^{j}(\boldsymbol {z}(v), \boldsymbol{\rho}_{k})\chi _{[{j-1},j)}(\mu _{2}(v))}{\partial \boldsymbol{\rho}}, \end{aligned} \\& \boldsymbol{\Upsilon}(0)=0. \end{aligned}$$

Utilizing the chain rule, the theorem below provides the gradients of \(g_{l}(\boldsymbol{\theta},\boldsymbol{\sigma},\boldsymbol{\rho})\) at ρ.

Theorem 4

For each \(l=0,1,\ldots ,N_{b}+N_{d}\), the gradient of \(g_{l}\) in terms of ρ, are given by

$$\begin{aligned} \frac{\partial g_{l}}{\partial \boldsymbol{\rho}}&= \frac{\partial \Phi _{l}({\boldsymbol {z}}(p))}{\partial{\boldsymbol {z}}}\boldsymbol{\Upsilon}(p) \\ &\quad{}+\sum_{k=1}^{p} \int _{k-1}^{k}\sigma _{k} \biggl\{ \frac{\theta _{\lfloor \mu _{2}(v)\rfloor}\partial{\mathcal{L}}_{l}({\boldsymbol {z}}(v),\boldsymbol{\rho}_{k})}{\partial \boldsymbol {z}} \boldsymbol{\Upsilon}(v)+ \frac{\theta _{\lfloor \mu _{2}(v)\rfloor}\partial{\mathcal{L}}_{l}({\boldsymbol {z}}(v),\boldsymbol{\rho}_{k})}{\partial \boldsymbol{\rho}} \biggr\} \,dv . \end{aligned}$$

Regarding the gradients of the cost/constraint functions in terms of σ, the derivation is more intricate, as discussed in [24]. To begin, we provide the inverse function of \(\mu _{2}(v\mid \boldsymbol{\sigma})\),

$$\begin{aligned} \mu _{2}^{-1}(s\mid \boldsymbol{\sigma})= \textstyle\begin{cases} \frac{s}{\sigma _{1}}, & s\in [0,\sigma _{1}), \\ (k-1)+\frac{1}{\sigma _{k}}(s-\sum_{{i=1}}^{k-1} \sigma _{i}), & s\in [\sum_{{i=1}}^{k-1}\sigma _{i},\sum_{i=1}^{k}\sigma _{i} ), \\ p,&s=N, \end{cases}\displaystyle \end{aligned}$$

where \(k=2,\dots ,p\). The switching times of subsystems in the time domain v, denoted as \(\mu _{2}^{-1}(s\mid \boldsymbol{\sigma})\), are dependent on σ. At each junction point \(\mu _{2}^{-1}(\mathtt{h})\) where \(\mathtt{h}=1,\dots ,N-1\), coinciding with any \(v=1,\ldots ,p-1\), the inverse function is nondifferentiable.

It is worth noting that, for each integer \(\mathtt{h}=1,\dots ,N\) in the time domain s, there exists a unique \(q\in{{1},\dots , p}\) such that \(\mu _{2}^{-1}(\mathtt{h}-1)\in [q-1,q)\). Let \(v_{\mathtt{h}}\) represent \(\mu _{2}^{-1}(\mathtt{h})\) for \(\mathtt{h}=1,\dots ,N\). The partial derivatives of \(v_{\mathtt{h}}\) in terms of \(\sigma _{k}, k=1,\ldots ,p\), are provided for each \(\mathtt{h}=1,\ldots , N-1\).

Case 1. When the point \(v_{\mathtt{h}}\) aligns with any \(v=\mathtt{1},\ldots ,p-1\):

$$\begin{aligned}& \frac{\partial v_{\mathtt{h}}^{-}}{\partial \sigma _{k}}= \textstyle\begin{cases} 0, &\text{if $k>q$,} \\ (-\mathtt{h}+\sum_{{j=1}}^{q-1}\sigma _{j}) /(\sigma _{q})^{2},& \text{if $k=q$,} \\ -\frac{1}{\sigma _{q}},&\text{if $k< q$,} \end{cases}\displaystyle \\& \frac{\partial v_{\mathtt{h}}^{+}}{\partial \sigma _{k}}= \textstyle\begin{cases} 0, &\text{if $k>q+1$,} \\ (-\mathtt{h}+\sum_{{j=1}}^{q}\theta _{\mathtt{2}}^{ \mathtt{j}}) /(\theta _{\mathtt{2}}^{q+\mathtt{1}})^{2},& \text{if $k=q+1$,} \\ -\frac{1}{\sigma _{q+1}},&\text{if $k< q+1$.} \end{cases}\displaystyle \end{aligned}$$

Case 2. We have \(\frac{\partial v_{\mathtt{h}}^{+}}{\partial \boldsymbol{\sigma}}= \frac{\partial v_{\mathtt{h}}^{-}}{\partial \boldsymbol{\sigma}}\) when \(v_{\mathtt{h}}\) does not align with any \(v=1,\ldots ,p-1\).

Theorem 5

For each \((\boldsymbol{\theta},\boldsymbol{\sigma},\boldsymbol{\rho})\),

$$\begin{aligned} & \frac{\partial \boldsymbol {z}(v\mid \boldsymbol{\theta},\boldsymbol{\sigma},\boldsymbol{\rho})}{\partial \boldsymbol{\sigma}}= \boldsymbol{\Psi}(v\mid \boldsymbol{\theta},\boldsymbol {\sigma},\boldsymbol{\rho}), \end{aligned}$$

where \(\boldsymbol{\Psi}(\cdot |\boldsymbol{\theta},\boldsymbol{\sigma},\boldsymbol{\rho})\) is the solution of the following variational system on \(v\in [k-1,k)\), \({k=1},\ldots ,p\):

$$\begin{aligned}& \begin{aligned} \dot{\boldsymbol{\Psi}}(v)&= \frac{\partial \sigma _{k}\sum_{j=1}^{N}\theta _{j}\boldsymbol {f}^{j}(\boldsymbol {z}(v), \boldsymbol{\rho}_{k})\chi _{[{j-1},j)}(\mu _{2}(v))}{\partial \boldsymbol {z}(v)}{ \boldsymbol{\Psi}}(v) \\ &\quad {}+ \frac{\partial \sigma _{k}\sum_{j=1}^{N}\theta _{j}\boldsymbol {f}^{j}(\boldsymbol {z}(v), \boldsymbol{\rho}_{k})\chi _{[{j-1},j)}(\mu _{2}(v))}{\partial \boldsymbol{\sigma}}, \end{aligned} \\& \boldsymbol{\Psi}\bigl(v_{\mathtt{h}}^{+}\bigr)=\boldsymbol{\Psi}\bigl(v_{\mathtt{h}}^{-}\bigr)-H_{ \mathtt{h},\boldsymbol {f}}^{+}+H_{\mathtt{h},\boldsymbol {f}}^{-}, \end{aligned}$$

and

$$\begin{aligned} &\boldsymbol{\Psi}(0)=\boldsymbol {0}, \end{aligned}$$

while

$$\begin{aligned} &H_{\mathtt{h},\boldsymbol {f}}^{-}=\theta _{\lfloor \mu _{2}(v_{\mathtt{h}}^{-}) \rfloor}\sigma _{\lfloor v_{\mathtt{h}}^{-}\rfloor}{\boldsymbol {f}}^{\lfloor \mu _{2}(v_{\mathtt{h}}^{+})\rfloor}\bigl(\boldsymbol {z} \bigl(v_{\mathtt{h}}^{-}\bigr), \boldsymbol{\rho}_{\lfloor v_{\mathtt{h}}^{-}\rfloor} \bigr) \frac{\partial v_{\mathtt{h}}^{-}}{\partial \boldsymbol{\sigma}} \end{aligned}$$

and

$$\begin{aligned} &H_{\mathtt{h},\boldsymbol {f}}^{+}=\theta _{\lfloor \mu _{2}(v_{\mathtt{h}}^{+}) \rfloor}\sigma _{\lfloor v_{\mathtt{h}}^{+}\rfloor}{\boldsymbol {f}}^{\lfloor \mu _{2}(v_{\mathtt{h}}^{+})\rfloor}\bigl(\boldsymbol {z} \bigl(v_{\mathtt{h}}^{+}\bigr), \boldsymbol{\rho}_{\lfloor v_{\mathtt{h}}^{+}\rfloor} \bigr) \frac{\partial v_{\mathtt{h}}^{+}}{\partial \boldsymbol{\sigma}}. \end{aligned}$$

Furthermore, for each \(l=0,1,\ldots ,N_{b}+N_{d}\), the partial derivative of \(\bar{g}_{l}\) in terms of σ is given by

$$\begin{aligned} \frac{\partial \bar{g}_{l}}{\partial \boldsymbol{\sigma}}&= \frac{\partial \Phi _{l}(\boldsymbol {z}(p))}{\partial \boldsymbol {z}}\boldsymbol{\Psi}(p) \\ &\quad {}+\sum_{k=1}^{p} \biggl\{ \int _{k-1}^{k}\sigma _{k} \biggl( \frac{\theta _{\lfloor \mu _{2}(v)\rfloor}\partial{\mathcal{L}}_{l}({\boldsymbol {z}}(v),\boldsymbol{\rho}_{k})}{\partial \boldsymbol {z}} \boldsymbol{\Psi}(v)+ \frac{\theta _{\lfloor \mu _{2}(v)\rfloor}\partial{\mathcal{L}}_{l}({\boldsymbol {z}}(v),\boldsymbol{\rho}_{k})}{\partial \boldsymbol{\sigma}} \biggr)\,dv \\ &\quad {}+H_{\mathtt{h},\mathcal{L}_{l}}^{-}-H_{\mathtt{h},\mathcal{L}_{l}}^{+} \biggr\} . \end{aligned}$$

The definitions of \(H_{\mathtt{h},\mathcal{L}_{l}}^{-}\) and \(H_{\mathtt{h},\mathcal{L}_{l}}^{+}\) are analogous to those of \(H_{\mathtt{h},\boldsymbol {f}}^{-}\) and \(H_{\mathtt{h},\boldsymbol {f}}^{+}\).

5 Illustrative example

To showcase the efficacy of the proposed approach, we examine two representative examples. We employ the Fmincon-SQP optimization solver in MATLAB R2022a to address our problem. The ordinary differential equations (ODEs) are solved using the fourth-order Runge–Kutta method with a step size of 10−2. The calculation of cost and constraint integrals is performed using Simpson’s rule, with a step size of 10−2 as well. All numerical experiments are conducted on a computer with a CPU and RAM of 3.60 GHz and 16 GB, respectively.

Example 5.1

Consider a nonlinear switching system, as detailed in [8], composed of three subsystems described as follows:

  • subsystem 1:

    $$ \textstyle\begin{cases} \dot{x}_{1}(t)=-x_{1}(t)+2x_{1}(t)u(t), \\ \dot{x}_{2}(t)=x_{2}(t)+x_{2}(t)u(t), \end{cases} $$
    (11)
  • subsystem 2:

    $$ \textstyle\begin{cases} \dot{x}_{1}(t)=x_{1}(t)-3x_{1}(t)u(t), \\ \dot{x}_{2}(t)=2x_{2}(t)-2x_{2}(t)u(t), \end{cases} $$
    (12)
  • subsystem 3:

    $$ \textstyle\begin{cases} \dot{x}_{1}(t)=2x_{1}(t)+x_{1}(t)u(t), \\ \dot{x}_{2}(t)=-x_{2}(t)+3x_{2}(t)u(t). \end{cases} $$
    (13)

Let \(t_{0} = 0\) and \(t_{f} = 3\), and assume that the system switches at \(t = t_{1}\) from subsystem 1 to subsystem 2 and at \(t = t_{2}\) from subsystem 2 to subsystem 3 (\(0 < t_{1} < t_{2} < 3\)). Our objective is to determine the optimal switching instants \(t_{1}\), \(t_{2}\) and the optimal input u to minimize the cost functional

$$ J=\frac{1}{2}\bigl(x_{1}(3)-2\bigr)^{2}+ \frac{1}{2}\bigl(x_{2}(3)-2\bigr)^{2}+ \frac{1}{2} \int _{0}^{3}\bigl\{ \bigl(x_{1}(t)-2 \bigr)^{2}+\bigl(x_{2}(t)-2\bigr)^{2}+u^{2}(t) \bigr\} \,dt . $$
(14)

Here, \(\boldsymbol {x} (0)=[1, 1]^{\top}\).

First, we apply the new approach to solve this problem using 3, 4, and 5 partitions for the control function within the time interval of \([0, 3]\). For comparison, we also consider using the conventional time-scaling transformation to solve this problem. As stated in Sect. 3, this method requires that \(p_{1}=p_{2}=p_{3}\) (\(p\triangleq \sum_{j=1}^{3}p_{j}\) must be a multiple of N). However, a crucial distinction between them is that the time-scaling method requires that the system switching times and discrete time knots of the control space coincide, resulting in the computational combinatoric explosion. On the other hand, the proposed method can effectively avoid the above deficiency by allowing the system switching to be independent of the control switching. To continue, when applying the time-scaling method, we select \(p= 3, 6, 9\) with equal partition numbers (\(p_{1}=p_{2}=p_{3}\)). The corresponding optimal results obtained using these two methods are listed in Table 1. The optimal control are shown in Figs. 57, where the two red vertical lines represent \(t=t_{1}^{\star}\) and \(t=t_{2}^{\star}\), respectively; \(t_{1}^{\star}\) and \(t_{2}^{\star}\) are the optimal switching times of the subsystem.

Figure 5
figure 5

Optimal control using these two method when \(p=3\) for Example 5.1

Table 1 Optimal results and computational times using the two techniques for Example 5.1

Table 1 reveals that the optimal cost, 3.6809, obtained by doubling p from 3 to 9 using the time-scaling method is inferior to the result obtained by using the proposed method for \(p=5\), which indicates the effectiveness of our method in eliminating unnecessary partitions. Figure 5 shows that the time-scaling method necessitates the optimal control switches at \(t_{1}^{\star}\) and \(t_{2}^{\star}\), while our method has no such restriction. Furthermore, in Fig. 7, the optimal number of switches of the control \(\boldsymbol {u}^{\star}\) on each subinterval \([t_{i-1}, t_{i}]\), \(i = 1, 2, 3\), is given in advance and is equal. However, in Fig. 6, the optimal number of switches of the control \(\boldsymbol {u}^{\star}\) on each subinterval is determined by the adaptive optimization. This demonstrates our method can achieve the adaptive selection of the number of control segments within each subinterval \([t_{i-1}, t_{i}]\), \(i = 1, 2, 3\), whereas the time-scaling method lacks this flexibility.

Figure 6
figure 6

Optimal control using the proposed method when \(p=5\) for Example 5.1

Figure 7
figure 7

Optimal control using the time-scaling method when \(p=9\) for Example 5.1

Example 5.2

In this problem [18], a nonlinear switching system with three subsystems is defined over the time domain \([0,3]\):

  • subsystem 1:

    $$ \textstyle\begin{cases} \dot{x}_{1}(t)=x_{1}(t)+u(t)\sin (x_{1}(t)), \\ \dot{x}_{2}(t)=-x_{2}(t)+u(t)\cos (x_{2}(t)), \end{cases} $$
    (15)
  • subsystem 2:

    $$ \textstyle\begin{cases} \dot{x}_{1}(t)=x_{2}(t)+u(t)\sin (x_{2}(t)), \\ \dot{x}_{2}(t)=-x_{1}(t)+u(t)\cos (x_{1}(t)), \end{cases} $$
    (16)
  • subsystem 3:

    $$ \textstyle\begin{cases} \dot{x}_{1}(t)=-x_{1}(t)-u(t)\sin (x_{1}(t)), \\ \dot{x}_{2}(t)=x_{2}(t)+u(t)\cos (x_{2}(t)), \end{cases} $$
    (17)

The initial conditions are

$$ \boldsymbol {x} (0)=[2, 3]^{\top}. $$
(18)

The system undergoes a switch at \(t = t_{1}\) from subsystem 1 to subsystem 2 and at \(t = t_{2}\) from subsystem 2 to subsystem 3 (\(0 < t_{1} < t_{2} < 3\)). We aim to determine the optimal switching instants \(t_{1}\), \(t_{2}\), and the optimal input u that minimize the cost function

$$ J=\frac{1}{2}\bigl(x_{1}(t_{1})-1 \bigr)^{2}+\frac{1}{2}\bigl(x_{2}(3)+1 \bigr)^{2}+ \frac{1}{2} \int _{0}^{3}\bigl\{ \bigl(x_{1}(t)-1 \bigr)^{2}+\bigl(x_{2}(t)+1\bigr)^{2}+u^{2}(t) \bigr\} \,dt . $$
(19)

Note that the cost function contains the state \(x_{1}(t_{1})\) at the switching time \(t=t_{1}\).

We use the proposed method and the time-scaling technique to solve this problem. The optimal results are listed in Table 2. The optimal controls are depicted in Figs. 89, with the two red vertical lines denoting \(t=t_{1}^{\star}\) and \(t=t_{2}^{\star}\) correspondingly. Here, \(t_{1}^{\star}\) and \(t_{2}^{\star}\) are the optimal switching times of the subsystem.

Figure 8
figure 8

Optimal control using the proposed method when \(p=6\) for Example 5.2

Figure 9
figure 9

Optimal control using the time-scaling method when \(p=9\) for Example 5.2

Table 2 Optimal results and computational times using the two techniques for Example 5.2

It can be seen from Table 2 that when \(p=6\) and \(p=9\), the optimal costs obtained by the proposed method both are obviously better than the optimal costs obtained by the time-scaling method. Figure 8 when compared with Fig. 9 also shows that our method can avoid the limitation that the switching of the subsystem must be accompanied by the switching of the control, and allows for the adaptive determination of the number of control segments within each subinterval.

6 Conclusion

We considered a type of optimal control problems involving the switched system with a prespecified sequence of subsystems. We then highlighted the limitations of the conventional time-scaling transformation used in solving this type of optimal control problems. Subsequently, we propose a novel method to overcome the existing shortcomings of the conventional time scaling transformation, where the control switching times and system switching moments are sequentially selected independently. Notably, in the proposed method, we introduced only one hyperparameter, reducing the need for extensive parameter tuning, thus improving overall efficiency. Two numerical examples are solved and the results obtained clearly illustrate the effectiveness of the new approach. In future studies, the proposed method can also be considered to solve problems involving the switching time-delay system and the switching time-dependent state system.

Data availability

No datasets were generated or analysed during the current study.

References

  1. Wei, S., Uthaichana, K., Zefran, M., DeCarlo, R.: Hybrid model predictive control for the stabilization of wheeled mobile robots subject to wheel slippage. IEEE Trans. Control Syst. Technol. 21, 2181–2193 (2013)

    Article  Google Scholar 

  2. Li, C., Guo, S.: Adaptive multi-mode switching strategy for the spherical underwater robot with hybrid thrusters. Adv. Eng. Inform. 55, 101845 (2022)

    Article  Google Scholar 

  3. Wang, C., Fu, S., Zhang, L., Jiang, Y., Shu, Y.: Optimal control of source-load-storage energy in DC microgrid based on the virtual energy storage system. Energy Rep. 9, 621–630 (2023)

    Article  Google Scholar 

  4. Chen, Z., Niu, B., Zhang, L., Zhao, J., Ahmad, A.M., Alassafi, M.O.: Command filtering-based adaptive neural network control for uncertain switched nonlinear systems using event-triggered communication. Int. J. Robust Nonlinear Control 32, 6507–6522 (2022)

    Article  MathSciNet  Google Scholar 

  5. Sun, G.X., Alpcan, T.S., Rubinstein, B.I.P., Camtepe, S.: A communication security game on switched systems for autonomous vehicle platoons. In: Proceedings of the 60th IEEE Conference on Decision and Control, Austin, Texas (2021)

    Google Scholar 

  6. Yong, J.: Systems governed by ordinary differential equations with continuous, switching and impulse controls. Appl. Math. Optim. 20, 223–235 (1989)

    Article  MathSciNet  Google Scholar 

  7. Sussmann, H.J.: A maximum principle for hybrid optimal control problems. In: Proceedings of the 38th IEEE Conference on Decision and Control, Phoenix, AZ (1999)

    Google Scholar 

  8. Xu, X., Antsaklis, P.J.: Optimal control of switched systems via nonlinear optimization based on direct differentiation of value functions. Int. J. Control 75, 1406–1426 (2002)

    Article  Google Scholar 

  9. Gonzalez, H., Vasudevan, R., Kamgarpour, M., Sastry, S.S., Bajcsy, R., Tomlin, C.: Optimal control of switched systems via nonlinear optimization based on direct differentiation of value functions. In: 49th IEEE Conference on Decision and Control, pp. 7519–7526 (2010)

    Chapter  Google Scholar 

  10. Gonzalez, H., Vasudevan, R., Kamgarpour, M., Sastry, S.S., Bajcsy, R., Tomlin, C.: A descent algorithm for the optimal control of constrained nonlinear switched dynamical systems. In: Proceedings of the 13th ACM International Conference on Hybrid Systems: Computation and Control, pp. 51–60 (2010)

    Google Scholar 

  11. Axelsson, H., Wardi, Y., Egerstedt, M., Verriest, E.: Gradient descent approach to optimal mode scheduling in hybrid dynamical systems. J. Optim. Theory Appl. 136, 167–186 (2008)

    Article  MathSciNet  Google Scholar 

  12. Egerstedt, M., Wardi, Y., Axelsson, H.: Transition-time optimization for switched-mode dynamical systems. IEEE Trans. Autom. Control 51, 110–115 (2006)

    Article  MathSciNet  Google Scholar 

  13. Liu, C.Y., Loxton, R., Teo, K.L.: Switching time and parameter optimization in nonlinear switched systems with multiple time-delays. Nonlinear Anal. Hybrid Syst. 163, 957–988 (2014)

    MathSciNet  Google Scholar 

  14. Xu, X.: Analysis and design of switched systems. PhD thesis, University of Notre Dame (2001)

  15. Feng, Z.G., Teo, K.L., Rehbock, V.: A discrete filled function method for the optimal control of switched systems in discrete time. Optim. Control Appl. Methods 30, 585–593 (2009)

    Article  MathSciNet  Google Scholar 

  16. Zhu, F., Antsaklis, P.J.: Optimal control of hybrid switched systems: a brief survey. Discrete Event Dyn. Syst. 25, 345–364 (2015)

    Article  MathSciNet  Google Scholar 

  17. Xu, W., Feng, Z.G., Peng, J.W., Yiu, K.: Optimal switching for linear quadratic problem of switched systems in discrete time. Automatica 78, 185–193 (2017)

    Article  MathSciNet  Google Scholar 

  18. Li, R., Teo, K.L., Wong, K.H., Duan, G.R.: Control parameterization enhancing transform for optimal control of switched systems. Math. Comput. Model. 43, 1393–1403 (2006)

    Article  MathSciNet  Google Scholar 

  19. Lee, H.W.J., Teo, K.L., Rehbock, V., Jennings, L.S.: Control parametrization enhancing technique for time-optimal control problems. Dyn. Syst. Appl. 6, 243–262 (1997)

    MathSciNet  Google Scholar 

  20. Teo, K.L., Li, B., Yu, C.J., Rehbock, V.: Applied and Computational Optimal Control: A Control Parameterization Approach. Springer, Berlin (2021)

    Book  Google Scholar 

  21. Yuan, J., Wu, C., Liu, C., Teo, K.L., Xie, J.: Robust suboptimal feedback control for a fed-batch nonlinear time-delayed switched system. J. Franklin Inst. 360, 1835–1869 (2023)

    Article  MathSciNet  Google Scholar 

  22. Teng, N., Zhai, J., Yin, H., Feng, E.M., Liu, C.Y.: The uncoupled microbial fed-batch fermentation optimization based on state-dependent switched system. Int. J. Biomath. 14, 1–22 (2021)

    MathSciNet  Google Scholar 

  23. Loxton, R., Lin, Q., Teo, K.L.: Switching time optimization for nonlinear switched systems: direct optimization and the time-scaling transformation. Pac. J. Optim. 10, 537–560 (2014)

    MathSciNet  Google Scholar 

  24. Zhu, X., Yu, C.J., Teo, K.L.: Sequential adaptive switching time optimization technique for optimal control problems. Automatica 146, 110565 (2022)

    Article  MathSciNet  Google Scholar 

  25. Zhu, X., Yu, C.J., Teo, K.L.: A new switching time optimization technique for multi-switching systems. J. Ind. Manag. Optim. 19, 2838–2854 (2023)

    Article  MathSciNet  Google Scholar 

  26. Li, R., Feng, Z.G., Teo, K.L., Duan, G.R.: Applied and computational optimal control: a control parameterization approach. Math. Comput. Model. 48, 468–479 (2008)

    Article  Google Scholar 

  27. Li, L.N., Zhang, C.J.Y.N., Bai, Y.Q.: A time-scaling technique for time-delay switched systems. Discrete Contin. Dyn. Syst., Ser. S 13(6), 1825–1843 (2020)

    MathSciNet  Google Scholar 

  28. Zhang, N., Yu, C.J., Xie, F.S.: The time-scaling transformation technique for optimal control problems with time-varying time-delay switched system. J. Oper. Res. Soc. China 8(2), 581–600 (2020)

    Article  MathSciNet  Google Scholar 

  29. Loxton, R., Teo, K.L., Rehbock, V.: Optimal control problems with multiple characteristic time points in the objective and constraints. Automatica 44, 2923–2929 (2008)

    Article  MathSciNet  Google Scholar 

Download references

Acknowledgements

This work was supported by National Natural Science Foundation of China (No. 12271335), National Natural Science Foundation of China (No. 12171307), the Fundamental Research Grant Scheme of Malaysia [grant number FRGS/1/2021/STG06/SYUC/03/1] and was funded by Shanghai Key Laboratory of Pure Mathematics and Mathematical Practice (No. 22DZ2229014).

Funding

This work was supported by the Fundamental Research Grant Scheme of Malaysia (grant number FRGS/1/2021/STG06/SYUC/03/1), National Natural Science Foundation of China (No. 12171307); Moreover, this work was supported by National Natural Science Foundation of China (No. 12271335), and was funded by Shanghai Key Laboratory of Pure Mathematics and Mathematical Practice.

Author information

Authors and Affiliations

Authors

Contributions

These authors contributed equally to this work.

Corresponding author

Correspondence to Changjun Yu.

Ethics declarations

Competing interests

The authors declare no competing interests.

Additional information

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Zhu, X., Bai, Y., Yu, C. et al. A new computational approach for optimal control of switched systems. J Inequal Appl 2024, 53 (2024). https://doi.org/10.1186/s13660-024-03124-2

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1186/s13660-024-03124-2

Keywords