Controller Design For Hybrid Systems With Nonlinear Sub-Systems Using Common Lyapunov Functions


 Hybrid systems are common in real life and have been studied in many different fields. However, due to the interaction of different sub-systems, a hybrid system is much more complex than a mono-dynamic one, where great challenges are confronted when seeking stable controllers either for linear or nonlinear systems. The traditional design scheme for such a system, namely, to design a controller for each sub-system separately, cannot yield satisfactory performance, since the switches between sub-systems are not specifically considered. In fact, the controllers constructed in this way are usually of poor performance, or even unstable, as a disastrous effect caused by the alternation of sub-systems. In this paper, considering the aforementioned problem, a control scheme is proposed to design suitable controllers for hybrid systems to achieve overall stabilization by taking account of the switching behaviors of the system, as well as its sub-systems carefully. The design scheme consists of two steps, wherein the first step aims to design sub-controllers for different sub-systems, usually with different Lyapunov functions, while a common Lyapunov function candidate is composed in the second step to modify the previously designed sub-controllers correspondingly. Following this design scheme, not only the stability, but also the performance of the closed-loop hybrid systems, is successfully guaranteed. Some simulation results are provided to show the satisfactory performance of the proposed design scheme.


Introduction
Hybrid systems widely exist in real life as pointed out in [1], and have received extensive attention in many fields, such as communication networks ( [2,3]), renewable energy systems ( [4,5]), legged locomotion ( [6,7,8]), circuit and power systems ( [9,10,11,12]), ecology ( [13,14]), sampled-data systems/control ( [15,16,17]), humancomputer interaction ( [18,19,20]), multi-agent systems ( [21,22]). A hybrid system contains both continuous and discrete variables, which interact with each other, yielding rich dynamical behaviors different from those in traditional mono-dynamic continuous/discrete systems. The hybrid events, such as switches and impulses, introduce abrupt changes in the dynamics or states, which need to be specifically addressed, and subsequently make the stabilization of hybrid systems extremely challenging. As a result, the controller design problem is far more difficult than designing several stable subcontrollers separately for different sub-systems and then putting them together directly. Therefore, for hybrid controller design, many extra efforts have to be devoted to analyzing and then taking advantages of the hybrid events' intrinsic properties, so as to eliminate their negative effects, and guarantee the closed-loop stability and performance.
Many results have been achieved concerning hybrid systems in quite a few fields in the past, and in numerous aspects, such as modelling and stabilization [17, 23, ?] of hybrid systems. As the current research hotspot, the stabilization problem for hybrid systems is much more difficult when compared with that for mono-dynamic systems, since the former involves both handling the hybrid events and designing a composite controller in the continuous domain for several sub-systems. Depending on whether the controller and hybrid events can be designed or not, the mainstream stabilization research for hybrid systems can be classified into the following three categories: 1) Both the controllers and the hybrid events are designable. It is the most studied and fruitful topic, and many results have been achieved so far, for instance, the widely known minimum dwell-time (MDT), average dwell-time (ADT), persistent dwelltime (PDT) [24,25], ranged dwell-time and other variants [26]. 2) Fixed controllers and designable hybrid events. The goal for this category of research is to decide when the hybrid events take place, and how much the input changes at the discrete points. Such behavior usually appears in non-mechanical systems, for instance, ecosystem [27]. 3) Fixed hybrid events and designable controllers. The fixed-hybrid-event systems are more frequently met in real life. Since the hybrid events cannot be decided intentionally, even more difficulties have to be addressed when trying to neutralize the adverse effects of hybrid events.
Recently, a hybrid system with fixed hybrid events has become a research focus within the control community. Usually, for such a system, it is extremely difficult, if not completely impossible, to construct a uniform controller making the states of all the sub-systems converge, since the dynamics for different sub-systems may vary significantly. For instance, for some sub-systems, their dynamics are exactly known, while for others, they may present different uncertainties, such as unknown parameters or various disturbances. Therefore, it is necessary to design different controllers, called as sub-controllers, for the various sub-systems consisting in the hybrid system. However, as pointed out in [28], even if all the sub-systems are linear and exponentially stable, the overall system can still be unstable. When a hybrid system contains nonlinear sub-systems, its behavior is even more intricate, which makes the controller design problem for such a system extremely challenging, mainly in the following aspects: 1) usually only asymptotic stability can be achieved for nonlinear subsystems, which cannot guarantee the stability of the overall hybrid system; 2) state transformations are often needed in nonlinear controller design scheme, which brings extra difficulties; 3) for sub-systems with uncertainties, some advanced control schemes, such as adaptive law, need to be designed to possibly achieve desired performance, which meets with great difficulties.
Considering the aforementioned challenges, in this paper, special considerations are given for a hybrid system with fixed hybrid events, and a controller design scheme with a hierarchical structure consisting of two steps is proposed to achieve overall stabilization of the system. In the first step, various controllers are designed to achieve asymptotical stability for all sub-systems, where specific control laws, such as adaptive controllers, sliding mode controllers, neural network based controllers, and so on, are constructed based on the analysis for the behavior of different sub-systems. Note that in this step, no extra restrictions are imposed on the sub-controllers, hence, the fruitful achievements for mono-dynamic controller design can be fully exploited. And then, as the essence of this paper, the sub-controllers are modified in the second step to guarantee the uniform stability and the performance of the whole hybrid system. As shown subsequently, the modification procedure of the controllers are widely applicable both for linear and nonlinear hybrid systems.
The main contributions of this research lie in the following aspects: 1) it is rigorously analyzed why controller design for nonlinear hybrid systems is more difficult than that for linear systems; 2) based on some prerequisites, sub-controllers are constructed to achieve uniform stability of the overall hybrid system; 3) both theoretical analyses and simulation tests verify satisfactory performance of the designed control scheme.
The remaining sections are organized as follows: In Section 2, the properties of hybrid systems are described; After that, the design scheme is illustrated for a hybrid system with uncertain nonlinear sub-systems in Section 3; In Section 4, the hybrid controller design scheme is further extended and discussed in detail; In Section 5, numerical examples are presented to verify the stability and performance of the system with modified controllers; Finally, this paper is concluded in Section 6.

System Description
A hybrid system contains several sub-systems which share the same states, but are mutually exclusive and exhaustive in the time domain. Namely, the time span is split into several, possibly infinite, spans by the so called hybrid events at the discrete time points τ k , k ∈ {1, 2, . . .}, 0 < τ 1 < τ 2 < · · · < τ i < τ i+1 < · · · . For the fixed-hybrid-event systems, these hybrid events are dominated by the system itself, and cannot be decided by the controller explicitly. In each time span, only one of the sub-systems is active, whose index is denoted as σ subsequently, so as to distinguish it from the remaining inactive ones. For a hybrid system, switched sub-controllers should be designed in response to the hybrid events. Since the sub-systems may vary significantly, it is very difficult for a uniform controller without switches to stabilize all the sub-systems, let alone the overall hybrid system. Therefore, to achieve the stabilization task, the controller itself should take suitable switches corresponding to the alternation of sub-systems.
In this paper, we focus on the situation that the dynamics and the controller switch synchronously. Namely, when the system changes into a sub-system S σi at τ i , the controller needs to switch into a suitable law u σi , ideally as quickly as possible. The architecture of the whole hybrid system can be illustrated as shown in Figure 1. Without loss of generality, each sub-system i is Fig. 1 The architecture of a hybrid system. assumed to be asymptotically stabilized by the subcontroller u i . However, the stability of all sub-systems does not essentially guarantee the stability of the overall hybrid system, as stated previously. To guarantee the stability of the overall hybrid system, for the commonly utilized multiple Lyapunov functions technique [29], the value of the Lyapunov function should be no more than that when it left the same sub-system last time [30]. Unfortunately, it is nearly impossible to verify this condition for fixed-hybrid-event systems in most cases. At present, for a hybrid system consisting of linear sub-systems, selecting a common Lyapunov function proves to be a good practice for stability analysis. However, when it comes to nonlinear sub-systems, it is extremely challenging to seek out a common Lyapunov function and then construct corresponding subcontrollers to make the Lyapunov function monotonously decreasing for all sub-systems. To deal with this problem, a novel Lyapunov function candidate based on the existing ones for all the sub-systems is constructed, which inspires to introduce a certain new term into each sub-controller to form a new composite control strategy, as depicted in Figure 2, with h σ (σ ∈ 1, 2, . . . , p) depicted in Figure 3 in detail, so as to drive all the states of the hybrid system to zero. Fig. 3 The details of h σ Nomenclature To facilitate the subsequent description, the following important symbols are introduced and summarized: q is the number of different sub-systems/working modes. σ indicates different sub-systems, σ ∈ {1, 2, . . . , q}. n is the degree of the system, namely, the dimension of states. m is the dimension of the control input. p σ is the dimension for unknown parameters in the σ th system. And in the following text, we will use lowercase normal, lowercase bold, and uppercase bold fonts to represent scalars, vectors, and matrices, respectively. With slight abuse of notation, we utilize diag {·} to denote blockwise diagonal matrix, defined as

Controller Design for Hybrid Systems with Nonlinear Sub-systems
This section designs controllers for a second-order hybrid system consisting of nonlinear sub-systems with unknown parameters. For such a system, a two-step design strategy is proposed to construct suitable control laws to ensure the overall stability. That is, in the first step, some sub-controllers are designed to ensure that each sub-system is stabilized. Then considering that, as will be indicated by the subsequent simulation results presented in Section 5, although each sub-system is globally asymptotically stable, the performance of the overall hybrid system can be unacceptable and the system can even be unstable under some situations. In the second step, a novel composite Lyapunov function is constructed to inspire the modifications of all the subcontrollers, which finally guarantee the stability of the overall hybrid system.

Step 1: Plain Sub-controller Design
For the convenience of description, consider a secondorder hybrid system with two sub-systems S A and S B , namely, σ ∈ {A, B}, with the dynamics being where , with x ∈ R 2 and the corresponding elements x 1 , x 2 ∈ R being the states, u σ ∈ R m being the control input, being known functions, θ σ ∈ R pσ being a set of unknown constant parameters, and g σ,2 ∈ R m is assumed nonzero to ensure the system to be controllable. Noting that controller design for each sub-systems is not the focus of this paper, the conventional adaptive backstepping controller [31] is employed to construct the sub-controllers.
Sub-controller Design in S A For the first row of equation (1), define the new state variable and introduce a virtual control α A as with k A,1 ∈ R being a positive constant. After some mathematical calculation, the closed-loop dynamics of z A,1 is obtained as: whereθ A,1 denotes the estimation of θ A generated through the subsequently designed update law, and z A,2 is a new state variable, defined as Based on the analysis for the dynamics (5), choose the following Lyapunov function candidate: where Γ A,1 ∈ R pσ×pσ is a positive-definite, diagonal update matrix. Then, after taking the time derivative of (7) and then substituting (5) into the resulting expression, it yieldṡ Further, the time derivative of (6) can be calculated after performing some manipulations as: Inspired by the forms of (8) and (9), design the controller as with k A,2 ∈ R being a positive control gain, where the

Tθ
A are introduced to correspondingly cancel the crossing term z A,1 z A,2 in (8), the known function f A,2 , and the known part ofα A in (9). Substituting the controller (10) into the openloop dynamics (9) yields the following closed-loop dynamicṡ which is then combined with (5) to obtain the following compact vector/matrix form: with To prove the stability of the closed-loop sub-system, choose a second Lyapunov function candidate as which is an extension of (8) Together with (13), the derivative of V A iṡ By choosing the update law aṡ equation (17) can be further reduced intȯ Since K A is negative definite, it can be concluded according to extended Barbalat's lemma that the system S A , under the actuation of the controller (10), and the update law (18), is asymptotically stable.
Sub-controller Design in S B For the sub-system S B , the same process can be followed to construct a similar sub-controller u B0 , whose specific expression is not presented for the sake of brevity. Then by taking a similar Lyapunov function candidate V B , it can be shown that the sub-system S B is globally asymptotically stable under the effect of the sub-controller u B0 as well.

Step 2: Uniform Stable Controller Design
As stated previously, for the system (1), even though the designed sub-controllers u A0 and u B0 can respectively stabilize the sub-systems S A and S B , if combined directly, they cannot guarantee the stability of the overall system. For this problem, the common Lyapunov function method proves to be a good practice. However, as z σ and ϑ σ are different in different sub-systems, so are V A and V B . Generally, when design sub-controller u A0 for S A at the very beginning, we would not take z B andθ B into consideration, otherwise it would be too complex for controller design. To address this problem herein, some additional term h σ (σ ∈ {A, B}), whose specific form will be subsequently determined after some analysis on the stability of the system, is introduced into the original sub-controller u σ0 , so as to make a new Lyapunov function candidate decrease all the time, which, as a consequence, stabilizes the overall hybrid system (1). To be specific, the sub-controllers turn into with h σ ∈ R m .
Renew Sub-controller in S A To achieve overall stability, it is important to consider the information of all the sub-systems when designing a controller for the single, currently active sub-system. The state transformations can represent the characteristics of sub-systems to a certain degree, and a Lyapunov function in the hyperspace consisting of all the state transformations can utilize the information from active as well as the inactive sub-systems. To this end, for the example system presented in subsection 3.1, the new composite common Lyapunov function candidate V is chosen as: where Γ A is given in (16), and Γ B ∈ R 2p B ×2p B is the corresponding one in S B . Here, the roles of z A and z B are to present the characteristics of the corresponding sub-systems. The closed-loop dynamics of the system with the new controller is obtained by inserting equation (20) into (1), taking S A as an example: In the following steps, the signal h A is designed to stabilize the system, assisted by the common Lyapunov function (21). The time derivative of V in S A , with sub-controller u A , can be calculated aṡ whereẋ A is a shorthand forẋ A (u A , . . .), namely, the closed-loop dynamical equation in S A . By introducing the following notations: together with the definition ofθ A given in (14), and the controller (20),V can be rewritten into a more compact form aṡ Note that ∂V ∂x T G A ∈ R 1×m is a row vector, and is assumed to be nonzero. Defining and reordering the terms,V can be further rewritten aṡ In equation (27) ) Tθ B are both zeros, thenV is negative definite, and the new composite controller achieves the desired goal. Based on previous analysis, the term h A and the update laws can be accordingly designed as with Λ A ∈ R 2×2 being a positive-definite, diagonal matrix. For the sub-system S A , substituting (28)-(30) into (27) yieldṡ which is negative definite, and therefore V is monotonously decreasing.
Renew Sub-controller in S B For the sub-system S B , the Lyapunov function is chosen the same as that in S A (21), and the controller can be designed in a similar way, thus the detailed expressions are directly given without redundant analysis: and all the symbols with subscript B are defined in the same manner.

Stability Analysis
Theorem 1 The closed-loop hybrid system (1), with the sub-controllers given by (20), the detailed terms h σ (σ ∈ A, B) and the update laws given by (28)- (30) in the sub-system S A and (32)-(34) in the sub-system S B , is asymptotically stable.
Proof As already shown in (31), it can be learnt thaṫ V is negative definite both in the sub-system S A with sub-controller u A , update laws (29), (30), and the subsystem S B with the sub-controller u B , the update laws (34), (34), which indicates that V is monotonously decreasing. Since V is the same for both sub-systems, x T Λ σ x(σ ∈ A, B) are uniformly continuous, and Λ σ (σ ∈ A, B) are positive definite, then it can be learnt that all the signals within the system are bounded, and according to the extended Barbalat's lemma that x T Λ σ x converges to zero asymptotically, and the closed-loop system is asymptotically stable.

Extensions
The controller design scheme presented in Section 3 works for a certain class of hybrid systems, and with some efforts, the scheme can be extended to address a wider class of systems. Considering the following high-order nonlinear hybrid system: where x ∈ R n are measurable state variables, f σ (x) ∈ R n , Y σ T (x) ∈ R n×pσ , G σ (x) ∈ R n×m are known nonzero functions, θ σ ∈ R pσ are unknown constant parameters, u σ (x) ∈ R m are the control inputs, and σ ∈ {1, 2, . . . , q} is the index for the current active subsystem. Noting that, p σ = 0 is a special case for subsystems without unknown parameters. z σ ∈ R n is assumed to be the state transformation in the σ th subsystem. Without loss of generality, assume that for the σ th sub-system, there exists a basic sub-controller u σ0 making the sub-system S σ asymptotically stable. Subsequently, choose the new composite Lyapunov function as V = q i=1 V i , and for the σ th sub-system, the renewed controller and the corresponding update law can be designed as where ϕ σ (x) ∈ R is a positive function,θ σ [θ σ,1 T ,θ σ,2 T , · · · ,θ σ,n T ] T ∈ R npσ is the vector of parameters' estimations, withθ σ,k being the k th estimation of θ σ , Γ σ ∈ R npσ×npσ is a position-definite, diagonal matrix.
And the remaining symbols are defined as Then the composite Lyapunov function is decreasing among all the sub-systems, and the hybrid system with the new controller is asymptotically stable.
Proof The proof is similar with that in Subsection 3.2 and thus omitted for the sake of brevity.
In previous analysis, adaptive schemes are used to handle the unknown parameters. However, many other schemes, which are usually used in the mono-dynamic systems, such as neural network approximation, fuzzy control scheme, and so on, can be adopted in the proposed design scheme, and the subsequent analysis can be implemented in a similar way.

Simulation Test
In this section, several numerical simulations are implemented to verify the aforementioned properties, without disturbances in Subsection 5.1, and with disturbances in Subsection 5.2, respectively. To facilitate the following description, in this section, the hybrid systems with the directly combined controller and the uniform stable controller are referred as plain hybrid systems (PHS) and renewed hybrid systems (RHS) respectively.

Simulation Without Disturbances
First take the hybrid system introduced in Section 3 without disturbances to illustrate the difference between PHS and RHS, with m = 1 and the functions/parameters chosen as follows: and the control parameters are shown in Table 1, which are kept the same for all simulation tests.

Parameters
Value All through the simulations, the following hybrid events with frequency of 1 Hz is imposed to the hybrid system: At the very beginning, no disturbances are introduced, and the results for PHS are presented in Figure 4, where the solid blue lines at the top sub-figures denote the current active subsystem, the solid red and dashed green lines denote the variables x 1 and x 2 respectively. The plots at the left part illustrate the overall behaviors through 0-25 s, and those on the right part illustrate the behaviors during 20-25 s in detail. As can be seen from  Figure 4, even after a long period of 25 s, both states are still oscillating with very slowly-decreasing amplitude, implying unacceptably convergence rate, and the mean value of x 1 is biased from zero. The updating process for all the parameter estimations are shown in Figure 5, demonstrating thatθ A,1 andθ A,2 are updating when the sub-system S A is active, and remain unchanged when S B is active. In RHS, the results for the uniform stable controller are shown in Figure 6, with the left part for overall resilience process during 0-10 s and the right part for the detailed views during 6-8 s. Intentionally, the plot ranges along the vertical axes are not limited at the left part to get an overview, and are scaled to the same range as those at the right part in Figure 4 for comparison purposes. It can be seen that, compared with PHS, in RHS, the maximum amplitude of both states are much smaller, both states converge quickly, the errors almost vanish after 8 s and there is no steady-state error. And the updating process for the estimations of the uncertain parameters is presented in Figure 7. Wherein, the first row denotes the currently active subsystem S σ , the second to the fifth rows denote the estimationθ A,1 , θ A,2 ,θ B,1 andθ B,2 respectively. Comparing the updating processes in PHS ( Figure 5), and RHS (Figure 7), especially the second component inθ A,2 during 1-1.5 s, it can be learnt that the updating process in RHS is much smoother, implying better practicability.

Simulation With Disturbances
In this subsection, we introduce two kinds of disturbances, step and sinusoidal disturbances, into PHS and RHS. Most parameters are kept the same as those in Subsection 5.1, and the modified ones will be subsequently stated in detail.
Step Disturbance A step signal w(t), with amplitude of 0.8, is introduced at 5 s into the hybrid systems, namely PHS and RHS, to indicate a sudden external change, for instance, human interaction. With all the parameters chosen the same as those in Table 1, the obtained results are presented in Figure 8 for the PHS system, and Figure 9 for the RHS system, with the current active sub-system σ, the disturbance w(t), states x 1 and x 2 shown from top to down. Compared with the results presented in Subsection 5.1, both PHS and RHS present a step in the states x 1 's, and they then go back to the normal situation, with the RHS system responding much more quickly than the PHS one.
Sinusoidal Disturbance A sinusoidal signal w(t) is introduced into the hybrid system to indicate the external persistent disturbances, with the specific expression as: Some control gains are chosen as shown in Table 2, while the other ones remain unchanged. The results for PHS and RHS are presented in Figure 10 and 11, respectively, with the current active sub-system σ, the disturbance w(t), states x 1 and x 2 presented from top to down. As clearly shown, due to the persistent disturbances, both PHS and RHS present vibrations in states. To be more specific, the disturbances are introduced into the systems from 3 s, where x 1 's have converged into a small neighborhood of 0 for both hybrid systems. However, the oscillation frequency in PHS is much higher than that in RHS hereafter. In addition, x 2 in RHS is more relevant to the external disturbance, which, as a result, can successfully compensate the undesired disturbance, whilst x 2 in PHS is less relevant, which in consequence yields poor performance in x 1 . By comparing the wave forms of x 1 , x 2 in both systems, it can be learnt that, the states repeat periodically after 15 s. Further more, compared with corresponding signal in PHS system, x 2 in RHS system is much smoother and x 1 is much smaller in amplitude, indicating better performance as well.

Conclusion
Stable control for hybrid systems with nonlinear subsystems is still in urgent need of further research, and very few results concerning the control problems in nonlinear hybrid systems have been reported due to the extreme complex properties. In this paper, a novel controller design scheme is developed to stabilize the fixedhybrid-event systems successfully. By dividing the controller design task into two steps, namely, the first step of sub-controller design without considering the hybrid events, and then the second step of sub-controller modification, this design scheme can fully exploit the marvelous mono-dynamic controller design techniques and the properties of the system itself. With the new composite Lyapunov function, the nonlinear hybrid system achieves uniform closed-loop stability in the second step through some important designs, such as state transformation, parameter estimation and disturbance rejection. Numerical simulation results verify that the proposed controller achieves satisfactory performance. In the future, we will try to apply the developed control strategy to practical hybrid systems with nonlinear subsystems.

Funding
This work was supported by the National Natural Science Foundation of China under Grant 61633012 and 62003172.

Conflicts of interest/Competing interests
This paper declares no conflicts of interest/competing interests.

Availability of data and material
No.

Code availability
No.