# Adaptive Observer-Based Output Feedback Control for Two-Wheeled Self-Balancing Robot

Authors: Ines Jmel; Habib Dimassi; Salim Hadj Said; Faouzi M’Sahli
Journal: Mathematical Problems in Engineering
 (2020)

---

## Abstract

In this paper, an output feedback control approach based on an adaptive observer is developed for the two-wheeled self-balancing robot subject to unknown parameters (with nonlinear parameterization). Firstly, a high gain control method with state feedback is proposed. Then, an adaptive observer is designed to estimate the unknown state and the unknown body mass of the robot which influences the height of the center of mass. Next, the adaptive observer is combined with the designed high gain controller: a Lyapunov-based stability analysis of the closed loop system is developed to establish the convergence of the tracking error as well as estimation and adaptation errors. Simulation results assert the performance of the developed tracking control scheme for the two-wheeled self-balancing robot subject to mass variation.


---

## Body

## 1. Introduction

Control problem investigation on self-balancing robots has grown over the past decade in a number of robotic laboratories around the world. This is due not only to the dynamics of the inherent instability, nonlinearity, and under-actuation of these systems but also to the presence of disturbance and parameter uncertainties. These robots are characterized by their ability to balance only on two wheels and to turn on the spot.Therefore, many researchers have conducted extensive studies, which can be proven how successful they were, to master the problems of modeling and control and application of the self-balancing robots. In [1], a robust tracking control scheme, employing the sliding mode method and based on nonlinear observer to estimate the unknown disturbances, is developed for two-wheeled self-balancing robot. In [2], the authors have proposed a nonlinear disturbance observer to estimate the uncertain disturbance torques with exponential convergence. More recently, a robust tracking control scheme based on a fuzzy disturbance observer was proposed for wheeled mobile robots with slipping and skidding in [3].The sliding mode control (SMC) has proved its robustness on the control of the self-balancing robots. In [4], a robust sliding mode controller has been designed to deal with disturbances and instability of the self-balancing robot. An adaptive neural sliding mode controller for nonholonomic wheeled mobile robots with external disturbances and model uncertainties was investigated in [5]. The robustness and the efficiency of this control system were proven by the simulation results. Furthermore, a sliding mode controller was developed in [6] to achieve a trajectory tracking of mobile robots with parametric variations and external disturbances. The asymptotic convergence of tracking errors was shown using Lyapunov’s theory. More recently, in [7], a new sliding mode control strategy based on a high-order disturbance observer has been developed for a mobile wheeled inverted pendulum. Theoretical stability results of both estimation and tracking errors have been established and validated experimentally.On the contrary, thanks to its robustness in preserving system performances; adaptive control represents the main motivation of several works notably the control of self-balancing robots. In [8], the authors have proposed an adaptive backstepping method to estimate the uncertain parameters and also to control the two-wheeled e-scooter. They used a PD controller to ensure the turning on the right and left of this system. They also treated the modeling, the material configuration of this system, and the signal processing using a Kalman filter. The experimental results proved the effectiveness of an adaptive backstepping self-balancing control. All the deepened studies on the self-balancing robot prove that changing in the center of mass of the robot affects, directly or indirectly, the system equilibrium and consequently the control of this system. The change of the center of mass may be a consequence of a terrain inclination and may be also due to the mass variation of loads carried by the robot. In this context, a full-state feedback controller based on the LQR method was proposed in [9] to perform the rejection of disturbance forces due to the terrain inclination by adjusting the center of mass position of the robot. In [10], the authors have developed an adaptive controller to deal with the variation of the height of the center of mass. Indeed, the height is re-estimated each time the states move away from what is expected. Simulation results have proved the performance of this adaptive controller in maintaining stability even during height change.In this paper, we investigate the problem of observer-based control of the self-balancing robots in the case where the center of mass is changing. The idea that we adopt to deal with this problem is to design an adaptive observer that the objective is to estimate both, the unmeasured states and the mass of the robot which is assumed unknown.In the literature of automatic control, many adaptive observers have been developed. In [11], the author has illustrated the performance of the adaptive observer by developing an adaptive observer for MIMO linear time-varying systems. In addition, the authors in [12] have developed an observer design for nonlinear systems by immersion into an appropriate form and under some conditions. The design methodology was demonstrated through application examples. In [13], an adaptive observer for parametric and state estimation was proposed for synchronization of chaotic systems. Moreover, an adaptive observer for nonlinear systems was designed in [14] to tackle the issue of state estimation in the presence of parameter uncertainty. More recently, the authors of [15] have designed an adaptive neural observer used for adaptive neural tracking control with backstepping approach applied to nonlinear nonstrict-feedback systems.In particular, Farza et al. have developed in [16] an adaptive observer for nonlinearly parameterized class of nonlinear systems. The exponential convergence of the designed observer was warranted under a determined persistent excitation condition for linear and nonlinear parameterization. The application of this observer in a bioreactor model proved its effectiveness to estimate unmeasured states and model parameters.In our case, since the mass parameter appears nonlinearly in the dynamics of the self-balancing robot, we adopt the adaptive estimation approach developed in [16] to deal with the mass variation.The adopted observer is then combined with a high gain control law with output feedback which has the advantages to upgrade the dynamic performances and to preserve the steady-state error as small as possible, and this seems clear in [17], in which the authors have developed an adaptive output feedback controller for a class of uncertain nonlinear system. They showed the full convergence analysis of the tracking error of the high gain control method with state feedback. Simulation results proved the performances of the proposed controller.Motivated by the advantages of this controller, a high gain control method with output feedback was developed for the two-wheeled self-balancing robot. Indeed, the designed observer to estimate both unmeasured states and body weight of the robot is combined with the proposed control law in order to provide an adaptive high gain controller with output feedback. The convergence of the tracking error is established using a Lyapunov analysis.In summary, we propose in this paper an efficient adaptive observer-based tracking controller for two-wheeled self-balancing robot subject to a varying center of mass (the robot is manipulating objects and additional loads). The main contributions of this paper are as follows:(i)
Simultaneous estimation of unmeasured states and the unknown mass parameter which appears nonlinearly in the dynamics of the two-wheeled robot, using a high gain adaptive observer(ii)
Synthesis of an output feedback tracking control scheme, consisting of a high gain controller combined with the designed high gain adaptive observer, for the two-wheeled robot(iii)
Proofs of stability of the closed loop system and demonstration of convergence of the tracking error based on Lyapunov theory(iv)
Validation of the good performances of the proposed adaptive observer-based tracking control approach and illustration of the robustness against additive disturbances, measurement noise, and computational delays, via numerical simulationsThe paper is organized as follows: Section2 introduces the problem statement and preliminaries. The high gain control method based on adaptive observer as well as the stability of analysis of the complete system is presented in Section 3. Simulation results in Section 4 are dedicated to emphasize the performances of the proposed tracking control scheme. Finally, a few conclusions are given in Section 5.


### 1.1. Notation

. represents the Euclidean norm for vectors and induced norm for matrices. In is an identity matrix with n×n dimension. 0n×m is a null matrix with n rows and m columns. λmaxM and λminM denote, respectively, the maximum and the minimum eigenvalues of M. diagM1,…,Mn represents the block-diagonal matrix = M10⋯00⋱⋱⋮⋮⋱⋱⋮0⋯0Mn, where M1 and Mn are the square matrices. R+∈ℝn×m denotes the pseudoinverse (generalized inverse) of a matrix R∈ℝm×n. R+ is a matrix such that RR+R=R and R+RR+=R+.


## 1.1. Notation

. represents the Euclidean norm for vectors and induced norm for matrices. In is an identity matrix with n×n dimension. 0n×m is a null matrix with n rows and m columns. λmaxM and λminM denote, respectively, the maximum and the minimum eigenvalues of M. diagM1,…,Mn represents the block-diagonal matrix = M10⋯00⋱⋱⋮⋮⋱⋱⋮0⋯0Mn, where M1 and Mn are the square matrices. R+∈ℝn×m denotes the pseudoinverse (generalized inverse) of a matrix R∈ℝm×n. R+ is a matrix such that RR+R=R and R+RR+=R+.


## 2. Context and Problem Statement

### 2.1. Model of Self-Balancing Two-Wheeled Robot

The modeling of the two-wheeled self-balancing robot is directly inspired by the famous academic model of the inverted pendulum [18]. It consists of a mobile cart surmounted by an inverted pendulum, freely articulated around a transverse axis. In order to ease the control of the robot and to impose a desired dynamics, a decoupling unit is needed to transform the two-wheeled torques CL and CR into a torque Cδ around the vertical axis and another torque Cθ around the horizontal axis [1, 18].The model of the two-wheeled self-balancing robot is given as [1](1)x˙1=x2,x˙2=Fx,ρ+Gx,ρu+D,where x1=x,ψ,δT, x2=x˙,ψ˙,δ˙T, x=x1T,x2TT, and x represents the linear displacement of the chassis. u=Cθ,CδT is the input vector. ψ and δ are, respectively, the pitch angle and the yaw angle. D=d1;d2;d3 is the unknown external disturbance vector. The control input matrix and the function vector are, respectively, Gx,ρ=g11x,ρ,0;g21x,ρ,0;0,g32x,ρ and Fx,ρ=f1x,ρ,f2x,ρ,0T, where ρ is a constant unknown parameter that will be defined later.The moments of inertia of the system are given as follows (11): Jp=1/3MpL2, Jδ=1/12MpD2, and Jr=1/2MrR2, where Jp is the moment of inertia of the chassis with respect to the z-axis, Jδ is the moment of inertia of the chassis with respect to the y-axis, and Jr is the moment of inertia of the wheel. D is the lateral distance between the contact patches of the wheels, R is the radius of the wheels, and Mr is its mass. ρ=Mp is the total mass of the robot, which is assumed unknown. In fact, Mp=M1+M2 where M1 is the mass of the upper part of the robot which represents the movable mass block supported by the stem and M2 is the mass of the lower part which is composed of the chassis and wheels. Our objective later is to design an adaptive observer to estimate the unknown parameter ρ=Mp. According to the center of mass theorem, we deduce the height of the center of mass L=L0cosψ1−M2/Mp, where L0 is the length of the stem.Proceeding as in (1) and (10) and replacing the moments of inertia Jp and Jδ as well as the center of mass L by their respective expressions depending on the total mass Mp, we conclude the following expressions:(2)f1=L02gMp2−2M2Mp+M22sinψcos3ψ−4/3L03ψ˙sinψcos2ψMp2−3M2Mp+3M22−M23/MpB,f2=1BMp2L2ψ˙2sinψcosψ−Mp2gLsinψ+3MpMrgLsinψ,g11=1RB−243MpL2+MpLRcosψ,g21=1RB−2MpLcosψ+MpR+3MrR,g32=43MrRD+13MpRD−1,withB=L02Mp2−2M2Mp+M22cos4ψ−43L02cos2ψMp2−2M2MP+M22+4MrL02cos2ψMp−2M2+M22Mp.


### 2.2. Problem Formulation

To develop an effective tracking control scheme, it is essential to have a complete and instant knowledge of the state variables. Given the economic, technological, and even feasibility constraints, it is often difficult to access all this variables. In the same way, a precise knowledge of the parameters describing the system proves necessary for its control, mainly the parameters which influence the system equilibrium, notably the mass. Indeed, it is assumed in this paper that the massρ=Mp is unknown. As a consequence, the height of center of mass changes and pushes the system to move away from its equilibrium position which inhibits the system control and decreases its robustness. So designing a suitable observer is the best solution for this problem. In this regard, to deal with the change of the height of the center of mass due to the variation of the body weight of the two-wheeled self-balancing robot and with the only measurements of linear and angular positions (x, ψ, δ), we consider the problem of adaptive observer design to estimate the speed states (x˙, ψ˙, δ˙) as well as the unknown parameter ρ=Mp. That is,(3)limt⟶∞xt−x^t=0,limt⟶∞ρt−ρ^t=0,where the estimated states x^t and the unknown parameter ρ^t obtained from the adaptive observer are used by a high gain output feedback controller which ensures the following trajectory tracking objective:(4)limt⟶∞xt−xrt=0,where xrt is the reference trajectory.Remark 1.
The two-wheeled self-balancing robot is an under-actuated nonlinear system with more degrees of freedom than actuators (three degrees of freedom and two control inputs). The lack of actuators complicates the control problem, and many classical nonlinear control methods are not directly applicable. Analytical tools based on the use of global change of coordinates have been developed in the literature to transform the considered under-actuated systems in appropriate normal forms such as strict feedback form and feed-forward form, under some restrictive assumptions (see reference [19] for more details). However, when applying global transformations, the new control inputs may appear in both actuated and unactuated subsystems which make the control problem more complex. Alternatively, particular global transformations have been introduced in [19] to decouple actuated and unactuated parts with respect to the new control input. Classical control strategies such as state feedback control and backstepping control may be addressed to the obtained normal forms.
In this context, the two-wheeled self-balancing robot model is subject to all the difficulties cited above. In our approach, we avoid the global transformation methods: the control and observation algorithms that will be developed in this paper are directly applied to the original model of the self-balancing robot. Indeed, at the beginning, the dynamics of the wheels and pendulum are analyzed separately. Using a decoupling unit, the two-wheeled torquesCL and CR are transformed into two torques Cδ and Cθ.
The torqueCδ controls the left and right rotation of the robot which allows us to obtain the desired yaw trajectory δd. The torque Cθ controls the translation along the x-axis while keeping the vertical up position, and this behavior is similar to a pendulum cart. On the contrary, by observing that the model of the self-balancing robot is a MIMO system that is naturally in the canonical triangular form subject to nonlinear functions with a triangular structure with respect to the subblocks xk (k∈1,2 in our case), high gain observer design and high gain control approaches will be adopted to achieve both observation and tracking control objectives (see References [16] and [17] for more details about high gain strategies for canonical triangular form systems).


## 2.1. Model of Self-Balancing Two-Wheeled Robot

The modeling of the two-wheeled self-balancing robot is directly inspired by the famous academic model of the inverted pendulum [18]. It consists of a mobile cart surmounted by an inverted pendulum, freely articulated around a transverse axis. In order to ease the control of the robot and to impose a desired dynamics, a decoupling unit is needed to transform the two-wheeled torques CL and CR into a torque Cδ around the vertical axis and another torque Cθ around the horizontal axis [1, 18].The model of the two-wheeled self-balancing robot is given as [1](1)x˙1=x2,x˙2=Fx,ρ+Gx,ρu+D,where x1=x,ψ,δT, x2=x˙,ψ˙,δ˙T, x=x1T,x2TT, and x represents the linear displacement of the chassis. u=Cθ,CδT is the input vector. ψ and δ are, respectively, the pitch angle and the yaw angle. D=d1;d2;d3 is the unknown external disturbance vector. The control input matrix and the function vector are, respectively, Gx,ρ=g11x,ρ,0;g21x,ρ,0;0,g32x,ρ and Fx,ρ=f1x,ρ,f2x,ρ,0T, where ρ is a constant unknown parameter that will be defined later.The moments of inertia of the system are given as follows (11): Jp=1/3MpL2, Jδ=1/12MpD2, and Jr=1/2MrR2, where Jp is the moment of inertia of the chassis with respect to the z-axis, Jδ is the moment of inertia of the chassis with respect to the y-axis, and Jr is the moment of inertia of the wheel. D is the lateral distance between the contact patches of the wheels, R is the radius of the wheels, and Mr is its mass. ρ=Mp is the total mass of the robot, which is assumed unknown. In fact, Mp=M1+M2 where M1 is the mass of the upper part of the robot which represents the movable mass block supported by the stem and M2 is the mass of the lower part which is composed of the chassis and wheels. Our objective later is to design an adaptive observer to estimate the unknown parameter ρ=Mp. According to the center of mass theorem, we deduce the height of the center of mass L=L0cosψ1−M2/Mp, where L0 is the length of the stem.Proceeding as in (1) and (10) and replacing the moments of inertia Jp and Jδ as well as the center of mass L by their respective expressions depending on the total mass Mp, we conclude the following expressions:(2)f1=L02gMp2−2M2Mp+M22sinψcos3ψ−4/3L03ψ˙sinψcos2ψMp2−3M2Mp+3M22−M23/MpB,f2=1BMp2L2ψ˙2sinψcosψ−Mp2gLsinψ+3MpMrgLsinψ,g11=1RB−243MpL2+MpLRcosψ,g21=1RB−2MpLcosψ+MpR+3MrR,g32=43MrRD+13MpRD−1,withB=L02Mp2−2M2Mp+M22cos4ψ−43L02cos2ψMp2−2M2MP+M22+4MrL02cos2ψMp−2M2+M22Mp.


## 2.2. Problem Formulation

To develop an effective tracking control scheme, it is essential to have a complete and instant knowledge of the state variables. Given the economic, technological, and even feasibility constraints, it is often difficult to access all this variables. In the same way, a precise knowledge of the parameters describing the system proves necessary for its control, mainly the parameters which influence the system equilibrium, notably the mass. Indeed, it is assumed in this paper that the massρ=Mp is unknown. As a consequence, the height of center of mass changes and pushes the system to move away from its equilibrium position which inhibits the system control and decreases its robustness. So designing a suitable observer is the best solution for this problem. In this regard, to deal with the change of the height of the center of mass due to the variation of the body weight of the two-wheeled self-balancing robot and with the only measurements of linear and angular positions (x, ψ, δ), we consider the problem of adaptive observer design to estimate the speed states (x˙, ψ˙, δ˙) as well as the unknown parameter ρ=Mp. That is,(3)limt⟶∞xt−x^t=0,limt⟶∞ρt−ρ^t=0,where the estimated states x^t and the unknown parameter ρ^t obtained from the adaptive observer are used by a high gain output feedback controller which ensures the following trajectory tracking objective:(4)limt⟶∞xt−xrt=0,where xrt is the reference trajectory.Remark 1.
The two-wheeled self-balancing robot is an under-actuated nonlinear system with more degrees of freedom than actuators (three degrees of freedom and two control inputs). The lack of actuators complicates the control problem, and many classical nonlinear control methods are not directly applicable. Analytical tools based on the use of global change of coordinates have been developed in the literature to transform the considered under-actuated systems in appropriate normal forms such as strict feedback form and feed-forward form, under some restrictive assumptions (see reference [19] for more details). However, when applying global transformations, the new control inputs may appear in both actuated and unactuated subsystems which make the control problem more complex. Alternatively, particular global transformations have been introduced in [19] to decouple actuated and unactuated parts with respect to the new control input. Classical control strategies such as state feedback control and backstepping control may be addressed to the obtained normal forms.
In this context, the two-wheeled self-balancing robot model is subject to all the difficulties cited above. In our approach, we avoid the global transformation methods: the control and observation algorithms that will be developed in this paper are directly applied to the original model of the self-balancing robot. Indeed, at the beginning, the dynamics of the wheels and pendulum are analyzed separately. Using a decoupling unit, the two-wheeled torquesCL and CR are transformed into two torques Cδ and Cθ.
The torqueCδ controls the left and right rotation of the robot which allows us to obtain the desired yaw trajectory δd. The torque Cθ controls the translation along the x-axis while keeping the vertical up position, and this behavior is similar to a pendulum cart. On the contrary, by observing that the model of the self-balancing robot is a MIMO system that is naturally in the canonical triangular form subject to nonlinear functions with a triangular structure with respect to the subblocks xk (k∈1,2 in our case), high gain observer design and high gain control approaches will be adopted to achieve both observation and tracking control objectives (see References [16] and [17] for more details about high gain strategies for canonical triangular form systems).


## 3. Adaptive Observer-Based High Gain Control for the Two-Wheeled Self-Balancing Robot

### 3.1. High Gain Control Method

We consider the class of systems studied in (2) and described by the following equations:(5)x˙=Ax+φu,x,ρ,y=Cx=x1.It is clear that the system described in (5) includes the two-wheeled self-balancing robot system (1).So, in our case, the functionφ is defined as φu,x,ρ=gx,ρu+fx,ρ, where gx,ρ=03×2Gx,ρ, fx,ρ=03×1Fx,ρ, x=x1x2, A=03I30303, and C=I3,03.The outputy∈ℝp; the state x∈X, an open compact ℝn, and the input ut∈U, a compact for ℝs. For this control method, the following assumptions must be taken into account [17]:(A1).
For any bounded inputu, i.e., ∀u∈U a compact subset of Rs, the state xt, and the unknown parameter ρ are bounded, i.e., xt∈X, for all t≥0 and ρ∈Ω, where X⊂Rn and Ω∈Rm are compact sets.(A2).
The functionsgx,ρ and fx,ρ are Lipschitz with respect to x and ρ, uniformly in u, where (u,x,ρ) in U × X × Ω.
The problem of the high gain control consists of the perfect pursuit of output trajectory that we will noteyrt∈ℝ3 and we assume that it is sufficiently differentiable, i.e.,(6)limt⟶∞eyt=0,where(7)eyt=yt−yrt.
Given the two-wheeled self-balancing robot system described in (1), it is possible to determine the system state path xrt∈ℝn and the input sequence urt corresponding to the output sequence yrt∈ℝ3. To that end, it is required to generate a second time derivative of the reference output yrt. The latter signal may be made sufficiently smooth by using a second-order filtered trapezoidal profile. This allows us to define a reference model as follows:(8)x˙r=Axr+gxr,ρur+fxr,ρ,yr=Cxr=x1r,where xr∈ℝn and ur∈ℝm are given by(9)x1r=yr,x2r=x˙2r=yr1;withyr1=dyrdt,ur=gxr,ρ+x˙2r−fxr,ρ.
In fact, the statesx1r and x2r can be determined from the reference signal yr and its derivative with respect to time. As a consequence, the tracking of the output problem may be extended to the state tracking problem:(10)limt⟶∞et=0,where(11)et=xt−xrt.
The tracking error system is given by(12)e˙=Ae+fx,ρ−fxr,ρ+gx,ρu−gxr,ρur,ey=y−yr.
Proceeding as in (4), we obtain the structure of the state feedback high gain control for the two-wheeled self-balancing robot system (1):(13)ux=ur+ve,ur=gxr,ρ+x˙2r−fxr,ρ,ve=−Kcλ2CS¯−1TΔλe,where e is defined by (7) as the tracking error and Δλ is a diagonal matrix given by(14)Δλ=diagI3,1λI3,where λ>0 is a strictly positive scalar, Kc:ℝp⟼ℝp is a bounded function, and S¯ is the solution of Lyapunov equations (3) and (5):(15)S¯+ATS¯+S¯A−CTC=0.
Considering the expression ofS¯−1C given by (5) and (7), we have CS¯−1T=C22I3,C21I3, where T=T−1=03I3I303, C22=1, and C21=2.
Proceeding as in the proof of Theorem 3.1 in [17], it may be shown that the control law (13) achieves the tracking objective. That is, the state xt and the output yt converge exponentially, respectively, to the state xrt and the output yrt of the reference model (43) by choosing relatively large values of λ.
At this stage, the use ofρ in the high gain control law is not realistic since ρ is assumed unknown and not available. Indeed, the height of the center of mass is sensitive to the robot mass variation Mp=ρ, which reduces the efficiency of this control law described in (13). So, to solve this problem we propose, in the next section, an adaptive observer which allows the joint estimation of the states and the unknown parameter ρ.


### 3.2. Adaptive Observer with Nonlinear Parameterization

In this section, we recall the main features of the adaptive estimation approach developed in [16]. It is to be noticed that if the nonlinear functions fx,ρ and gx,ρ are not globally Lipschitz but just once continuously differentiable which is the case of the self-balancing robot system, we can apply the so-called Lipschitz prolongation approach under the assumption (A1). The idea of this approach consists in constructing a prolongation g˜ and f˜ of the nonlinear functions f and g using saturation functions (for more details about the Lipschitz extension technique, see References [16, 20]). So one obtains the following dynamical system:(16)x˙=Ax+g˜x,ρu+f˜x,ρ,y=Cx=x1,where f˜ and g˜ are global Lipschitz and defined as f˜x,ρ=fσx,σρρ and g˜x,ρ=gσx,σρρ, where σ:ℝn⟶X,x⟼σx and σρ:ℝ⟶Ω,ρ⟼σρρ are smooth bounded saturation functions such that σx=x and σρρ=ρ for all x∈X and ρ∈Ω. According to (2), the observer elaborated for system (5) is given by(17)x^˙=Ax^+g˜x^,ρ^u+f˜x^,ρ^−θΔ−1S¯−1+ϒtPtϒTtCTKCx˜,ρ^˙t=−θPtϒTtCTKCx˜,ϒ˙t=θA−S¯−1CTCϒt+Δθ∂g˜∂ρx^,ρ^u+Δθ∂f˜∂ρx^,ρ^withϒ0=0,P˙t=−θPtϒTtCTCϒtPt+θPtwithP0=PT0>0,where x^=x^1x^2 and Δθ=diagI3,1/θI3, where θ>0 is a real number, x˜=x^−x, and S¯ is the unique solution of the algebraic Lyapunov equation (15), and S¯ is the symmetric positive definite (SPD) and the matrix A−S¯−1CTC is Hurwitz. KCx˜ is defined as(18)KHGy˜=Ky˜,K≥12.In order to ensure the parametric convergence, we need the following additional assumption.(A3).
For any trajectoryx^,ρ^∈X×Ω, the matrix Cϒt must satisfy the condition of persistent excitation, and it means(19)∃δ1,δ2>0;∃T>0;∀t≥0:δ1Im≤∫tt+TϒTtCTCϒτdτ≤δ2Im.
Assumption (A3) is the classical assumption of persistency of excitation usually used in the literature of adaptive control. Physically, it means that the signals forming the matrixCϒt are sufficiently rich in frequency. Persistency of excitation is a necessary sufficient condition for asymptotic stability and parametric convergence. By applying Theorem 4.1 in [16] for system (5) with φu,x,ρ=g˜x,ρu+f˜x,ρ under Assumptions (A1) to (A3), one can deduce that the estimation error x˜ and the adaptation error ρ˜=ρ^−ρ converge exponentially to zero for relatively high values of the design parameter θ. Refer also to reference [21] where we have applied the adaptive observer (17) to the two-wheeled robot under proportional-integral-derivative (PID) control.
Once the unknown parameterρ=Mp and the unmeasured states of the self-balancing robot are estimated, they are used by the state feedback control law developed in Section 3.1 to obtain an adaptive output feedback control which is the purpose of the next section.Remark 2.
The adaptive high gain observer used in this paper may be compared with three important classes of adaptive observers. The first one was proposed by Zhang in the pioneering work [11] for a class of MIMO linear time-varying systems. The design of Zhang’s adaptive observer does not need any structural assumptions, but it is only addressed to linear systems which is not our case (the self-balancing robot model is nonlinear). The second one is the class of adaptive observers used, for instance, in [14, 22]. This approach is characterized by its simple architecture for practical implementation, but it is specifically addressed to particular systems (with linear parameterization) satisfying the restrictive minimum phase and relative degree one assumptions. These conditions are clearly not satisfied for the self-balancing robot model, and the latter approach is not applicable in our case. The third one is the class of extended Kalman filters (EKFs) [23]: This approach is a powerful estimation and filtering method which is characterized by its robustness against relatively small perturbations; however, it is designed under the classical restrictive observability assumption. Alternatively, high gain extended Kalman filters (HG-EKFs) [24] which have been designed for nonlinear systems in the triangular canonical form are robust against larger perturbations but more sensitive with respect to measurement noise. An improved version of the HG-EKF has been developed in [25] by using an adaptive high gain design parameter to reduce the sensitivity to the measurement noise. When using Kalman filtering in our case, the unknown parameter should be considered as an additional state. Unfortunately, the EKF may not be applied to solve the problem of joint states and unknown parameters estimation in our case because the observability condition is actually not satisfied. Moreover, the HG-EKF design is not applicable to the self-balancing robot model for which the classical canonical form is not satisfied (x1 and x2 are not scalar in our case). The adaptive high gain observer that we consider in this paper is addressed to a particular class of nonlinear systems in the block triangular canonical form subject to nonlinear functions with a triangular structure with respect to the subblocks xk (k∈1,2 in our case) which includes several mechanical systems and particularly the self-balancing robot system. The minimum phase assumption and the observer-matching condition are not needed in our adaptive high gain estimation approach, and the unknown parameters appear nonlinearly in the state model (we do not need to consider the unknown parameter as an additional state in our approach). The main drawback of adaptive high gain observers is their sensitivity to the measurement noise whose the effect is amplified when using large values of the design parameters. The effect of measurement noise may be reduced by well adjusting the high gain parameter θ and applying appropriate law-pass filters to the noisy output signals. Some recent design methods have been addressed in the literature of high gain observers to the problem of sensitivity to measurement noise (see References [26, 27]). It is also worth noticing that a common hypothesis used for all the above adaptive design methods including the adaptive observer used in this paper is the persistency of excitation assumption which means that the considered system is sufficiently rich in frequencies and which leads to the statement of necessary and sufficient conditions for asymptotic stability and parametric convergence.


### 3.3. Adaptive Observer-Based Output Feedback Control for the Self-Balancing Robot

The output feedback adaptive controller is obtained by the replacement of the speed states (x˙, ψ˙, δ˙ ), which are not accessible to the measurement, and the unknown parameter ρ=Mp for the two-wheeled self-balancing robot by their estimates generated by the adaptive observer (17) as it is shown in Figure 1.Figure 1
Synoptic diagram of the proposed method.The state feedback control law incorporating the adaptive observer is given by(20)ux^,ρ^=g˜x^r,ρ^+x^˙2r−f˜x^r,ρ^+ve^,where(21)ve^=−Kcλ2CS¯−1TΔλe^,where x^r represents the trajectory estimated for xr and it is calculated as in (11) by replacing ρ by ρ^ and e^∈ℝn refers to the estimate of the state tracking error which is defined as e^=x^−x^r. The matrices Δλ and S¯ are, respectively, defined as in (14) and (15). First of all, to prove the convergence of the estimated tracking error based on the control laws (20) and (21) one must show that the observation error x˜ and the adaptation error ρ˜ converge exponentially to zero, and this follows directly from Theorem 3.1 in [16], in which the authors showed that by considering the Lyapunov function V0t=ηtTS¯ηt+ρ˜TtP−1tρ˜t with ηt=x¯t−ϒtρ˜t and x¯t=Δθx^−x, one has(22)V˙0≤−θ−K11−k22θθ−k1V0,and by choosing θ such that(23)1−k22θθ−k1>0,the inequality (22) leads to(24)V0η,ρ˜≤e−θ−k1/2V00.Next, we are going to show the convergence of the estimated tracking error, starting with an appropriate Lyapunov function.Let us consider both tracking errore˜ and observation error x˜ as follows: e^=x^−x^r and x˜=x^−x.Using equations (43), (13), and (17), one can obtain(25)e^˙=Ae^+g˜x^,ρ^−g˜x^r,ρ^ur+g˜x^,ρ^ve^+f˜x^,ρ^−f˜x^r,ρ^−θΔθ−1S¯−1+ϒPϒTCTKCx˜.Sete¯=λ2Δλe^ and x¯=Δθx˜. Referring to the identity (21) and taking into account that ΔλAΔλ−1=λA and CΔθ=C, we get(26)e¯˙=λAe¯+λ2Δλg˜x^,ρ^−g˜x^r,ρ^ur−λ2Δλg˜x^,ρ^KcCS¯−1Te¯+λ2Δλf˜x^,ρ^−f˜x^r,ρ^−λ2ΔλθΔθ−1S¯−1+ϒPϒTCTKCx˜.Now, we consider the Lyapunov functionVc:e¯⟼Vce¯=λ−4e¯TS¯e¯, and its total derivative along the trajectories of (26) is given by(27)V˙c=λ−3e¯TS¯A+ATS¯e¯+2e¯TS¯λ−2Δλg˜x^,ρ^−g˜x^r,ρ^ur−2λ−2e¯TS¯Δλg˜x^,ρ^KcCS¯−1Te¯+2λ−2e¯TS¯Δλf˜x^,ρ^−f˜x^r,ρ^−2λ−2e¯TS¯ΔλθΔθ−1S¯−1+ϒPϒTCTKCx¯.Hence, according to (15), one can obtain(28)V˙c=−λVc+λ−3e¯TCCTe¯+2e¯TS¯λ−2Δλg˜x^,ρ^−g˜x^r,ρ^ur−2λ−2e¯TS¯Δλg˜x^,ρ^KcCS¯−1Te¯+2λ−2e¯TS¯Δλf˜x^,ρ^−f˜x^r,ρ^−2λ−2e¯TS¯ΔλθΔθ−1S¯−1+ϒPϒTCTKCx¯.Letgmax=supg˜x^,ρ^ and urmax=supur. Using the mean value theorem, one has(29)Δλg˜x^,ρ^−g˜x^r,ρ^ur=Δλ∂g˜∂xξ,ρ˜urx^−x^r=Δλ∂g˜∂xξ,ρ˜ure˜=1λ2Δλ∂g˜∂xξ,ρ˜urΔλ−1e¯.Given thatg˜ is globally Lipschitz in X and continuously differentiable in X, the matrix(30)∂g˜∂xξ,ρ˜=∂g˜1∂x1ξ,ρ˜03∂g˜2∂x1ξ,ρ˜∂g˜2∂x2ξ,ρ˜is bounded. Taking into account the triangular structure of g˜, then(31)Δλ∂g˜∂xξ,ρ˜urΔλ−1=∂g˜1∂x1ξ,ρ˜ur031λ∂g˜2∂x1ξ,ρ˜ur∂g˜2∂x2ξ,ρ˜urdepends only on 1/λ.So for large values ofλλ≫1, Δλ∂g˜/∂xξ,ρ˜urΔλ−1≤a1, with a1 is independent of λ. As a consequence, one can obtain(32)2e−TS¯λ−2Δλg˜x^,ρ^−g˜x^r,ρ^ur≤2λ−2e−TS¯1λ2Δλ∂g˜∂xξ,ρ˜urΔλ−1e¯≤2λ−4λmaxS¯Δλ∂g˜∂xξ,ρ˜urΔλ−1e¯2≤2λmaxS¯λminS¯Δλ∂g˜∂xξ,ρ˜urΔλ−1Vc≤k0Vc,where λ≥1,θ≥1, and k0=2λmaxS¯/λminS¯a1.We proceed in the same way forf˜, and Δλ∂f˜/∂xξ,ρ˜Δλ−1≤a2 is obtained, for λ>1 and a2 is independent of λ.As a result, we obtain(33)2λ−2e¯TS¯λ2Δλf˜x^,ρ^−f˜x^r,ρ^≤2λmaxS¯λminS¯Δλ∂f˜∂xξ,ρ˜Δλ−1Vc≤k1Vc,where k1=2λmaxS/λminS¯a2. In addition, we have(34)λ−3e¯TCCTe¯≤λ−3CCTe¯2≤λ−11λminS¯CCTVc≤k2Vc,with k2=λ−1b1 and b1=1/λminS¯ since C=I3,03 and CCT=1. Now, using that Δλg˜x^,ρ^=1/λg˜x^,ρ^, one can obtain(35)2λ−2e¯TS¯Δλg˜x^,ρ^KcCS¯−1Te¯≤2λ−3e¯TS¯g˜x^,ρ^CS¯−1Te¯≤2λ−3λmax2S¯gmaxCTe¯2≤2λ−1λmax2S¯λminS¯gmaxCTVc≤k3Vc,with k3=λ−1b2 and b2=2λmax2S¯/λminS¯gmaxCT.Applying condition (18), one can easily obtain the following inequality:(36)2λ−2e¯TS¯ΔλθΔθ−1S¯−1CTKCx¯≤2λ−2e¯TS¯ΔλθΔθ−1S¯−1CTCx¯≤2λmax2S¯θλ−2ΔλΔθ−1CCTx¯e¯≤2λmax2S¯λminS¯θΔλΔθ−1CCTV0Vc≤k4V0Vc,with k4=2λmax2S¯/λminS¯θΔλΔθ−1CCT.It is to be noticed thatΔλ is calculated as in (14) and it depends only on 1/λ. As a result, Δλ=1 for a large value of λ (λ>1). Similarly, since P is bounded, one can obtain(37)2λ−2e¯TS¯ΔλθΔθ−1ϒPϒTCTKCx¯≤2λ−2e¯TS¯ΔλθΔθ−1ϒPϒTCTCx¯≤2λmaxS¯λ−2ϒPϒTCTCx¯e¯≤2λmaxS¯λminS¯ϒPϒTCTCV0Vc≤k5V0Vc.It is to be noticed thatϒt is bounded. Indeed, considering the dynamics of ϒt in system (17) and using the fact that the matrix A−S¯−1CTC is Hurwitz and that Δθ∂g˜/∂ρx^,ρ˜u and Δθ∂f˜/∂ρx^,ρ˜ are bounded (according to Assumption (A2) and with the triangular structure of g˜ and f˜), it exists a positive constant ϒmax such that for all t≥0, ϒt≤ϒmax.As a result,k5=2λmaxS¯/λminS¯ϒmax2PCTC. Moreover, by combining the previous inequalities (32)–(37), one can obtain(38)Vc˙≤−λ−1λb1+b2−c1Vc+c2V0Vc,where c2=k4+k5 and c1=k0+k1.This allows us to conclude the asymptotic convergence of the estimated tracking error:(39)Vce¯≤e−λ−1/λb1+b2−c1/2tVce¯0+2c2θ−k1−2λ+1/λb1+b2+c1e−λ−1/λb1+b2−c1t−e−θ−k1/4t.It is important to notice that our adaptive high gain observer-based output feedback control approach guarantees the global asymptotic convergence of both estimation and tracking errors unlike many local control methods used in the literature of under-actuated control systems. The tracking problem considered in this paper consists in maintaining the unactuated variable (the pitch angle) in the unstable equilibrium position and to force the actuated variables (the linear displacement) to track a reference trajectory. The only assumption required for the desired trajectoryyrt is to plan sufficiently smooth trajectories. Indeed, in order to generate the input reference trajectories urt, it is required to calculate a second time derivative of the reference output yrt. The latter signal may be made sufficiently smooth by using a second-order filtered trapezoidal profile.


## 3.1. High Gain Control Method

We consider the class of systems studied in (2) and described by the following equations:(5)x˙=Ax+φu,x,ρ,y=Cx=x1.It is clear that the system described in (5) includes the two-wheeled self-balancing robot system (1).So, in our case, the functionφ is defined as φu,x,ρ=gx,ρu+fx,ρ, where gx,ρ=03×2Gx,ρ, fx,ρ=03×1Fx,ρ, x=x1x2, A=03I30303, and C=I3,03.The outputy∈ℝp; the state x∈X, an open compact ℝn, and the input ut∈U, a compact for ℝs. For this control method, the following assumptions must be taken into account [17]:(A1).
For any bounded inputu, i.e., ∀u∈U a compact subset of Rs, the state xt, and the unknown parameter ρ are bounded, i.e., xt∈X, for all t≥0 and ρ∈Ω, where X⊂Rn and Ω∈Rm are compact sets.(A2).
The functionsgx,ρ and fx,ρ are Lipschitz with respect to x and ρ, uniformly in u, where (u,x,ρ) in U × X × Ω.
The problem of the high gain control consists of the perfect pursuit of output trajectory that we will noteyrt∈ℝ3 and we assume that it is sufficiently differentiable, i.e.,(6)limt⟶∞eyt=0,where(7)eyt=yt−yrt.
Given the two-wheeled self-balancing robot system described in (1), it is possible to determine the system state path xrt∈ℝn and the input sequence urt corresponding to the output sequence yrt∈ℝ3. To that end, it is required to generate a second time derivative of the reference output yrt. The latter signal may be made sufficiently smooth by using a second-order filtered trapezoidal profile. This allows us to define a reference model as follows:(8)x˙r=Axr+gxr,ρur+fxr,ρ,yr=Cxr=x1r,where xr∈ℝn and ur∈ℝm are given by(9)x1r=yr,x2r=x˙2r=yr1;withyr1=dyrdt,ur=gxr,ρ+x˙2r−fxr,ρ.
In fact, the statesx1r and x2r can be determined from the reference signal yr and its derivative with respect to time. As a consequence, the tracking of the output problem may be extended to the state tracking problem:(10)limt⟶∞et=0,where(11)et=xt−xrt.
The tracking error system is given by(12)e˙=Ae+fx,ρ−fxr,ρ+gx,ρu−gxr,ρur,ey=y−yr.
Proceeding as in (4), we obtain the structure of the state feedback high gain control for the two-wheeled self-balancing robot system (1):(13)ux=ur+ve,ur=gxr,ρ+x˙2r−fxr,ρ,ve=−Kcλ2CS¯−1TΔλe,where e is defined by (7) as the tracking error and Δλ is a diagonal matrix given by(14)Δλ=diagI3,1λI3,where λ>0 is a strictly positive scalar, Kc:ℝp⟼ℝp is a bounded function, and S¯ is the solution of Lyapunov equations (3) and (5):(15)S¯+ATS¯+S¯A−CTC=0.
Considering the expression ofS¯−1C given by (5) and (7), we have CS¯−1T=C22I3,C21I3, where T=T−1=03I3I303, C22=1, and C21=2.
Proceeding as in the proof of Theorem 3.1 in [17], it may be shown that the control law (13) achieves the tracking objective. That is, the state xt and the output yt converge exponentially, respectively, to the state xrt and the output yrt of the reference model (43) by choosing relatively large values of λ.
At this stage, the use ofρ in the high gain control law is not realistic since ρ is assumed unknown and not available. Indeed, the height of the center of mass is sensitive to the robot mass variation Mp=ρ, which reduces the efficiency of this control law described in (13). So, to solve this problem we propose, in the next section, an adaptive observer which allows the joint estimation of the states and the unknown parameter ρ.


## 3.2. Adaptive Observer with Nonlinear Parameterization

In this section, we recall the main features of the adaptive estimation approach developed in [16]. It is to be noticed that if the nonlinear functions fx,ρ and gx,ρ are not globally Lipschitz but just once continuously differentiable which is the case of the self-balancing robot system, we can apply the so-called Lipschitz prolongation approach under the assumption (A1). The idea of this approach consists in constructing a prolongation g˜ and f˜ of the nonlinear functions f and g using saturation functions (for more details about the Lipschitz extension technique, see References [16, 20]). So one obtains the following dynamical system:(16)x˙=Ax+g˜x,ρu+f˜x,ρ,y=Cx=x1,where f˜ and g˜ are global Lipschitz and defined as f˜x,ρ=fσx,σρρ and g˜x,ρ=gσx,σρρ, where σ:ℝn⟶X,x⟼σx and σρ:ℝ⟶Ω,ρ⟼σρρ are smooth bounded saturation functions such that σx=x and σρρ=ρ for all x∈X and ρ∈Ω. According to (2), the observer elaborated for system (5) is given by(17)x^˙=Ax^+g˜x^,ρ^u+f˜x^,ρ^−θΔ−1S¯−1+ϒtPtϒTtCTKCx˜,ρ^˙t=−θPtϒTtCTKCx˜,ϒ˙t=θA−S¯−1CTCϒt+Δθ∂g˜∂ρx^,ρ^u+Δθ∂f˜∂ρx^,ρ^withϒ0=0,P˙t=−θPtϒTtCTCϒtPt+θPtwithP0=PT0>0,where x^=x^1x^2 and Δθ=diagI3,1/θI3, where θ>0 is a real number, x˜=x^−x, and S¯ is the unique solution of the algebraic Lyapunov equation (15), and S¯ is the symmetric positive definite (SPD) and the matrix A−S¯−1CTC is Hurwitz. KCx˜ is defined as(18)KHGy˜=Ky˜,K≥12.In order to ensure the parametric convergence, we need the following additional assumption.(A3).
For any trajectoryx^,ρ^∈X×Ω, the matrix Cϒt must satisfy the condition of persistent excitation, and it means(19)∃δ1,δ2>0;∃T>0;∀t≥0:δ1Im≤∫tt+TϒTtCTCϒτdτ≤δ2Im.
Assumption (A3) is the classical assumption of persistency of excitation usually used in the literature of adaptive control. Physically, it means that the signals forming the matrixCϒt are sufficiently rich in frequency. Persistency of excitation is a necessary sufficient condition for asymptotic stability and parametric convergence. By applying Theorem 4.1 in [16] for system (5) with φu,x,ρ=g˜x,ρu+f˜x,ρ under Assumptions (A1) to (A3), one can deduce that the estimation error x˜ and the adaptation error ρ˜=ρ^−ρ converge exponentially to zero for relatively high values of the design parameter θ. Refer also to reference [21] where we have applied the adaptive observer (17) to the two-wheeled robot under proportional-integral-derivative (PID) control.
Once the unknown parameterρ=Mp and the unmeasured states of the self-balancing robot are estimated, they are used by the state feedback control law developed in Section 3.1 to obtain an adaptive output feedback control which is the purpose of the next section.Remark 2.
The adaptive high gain observer used in this paper may be compared with three important classes of adaptive observers. The first one was proposed by Zhang in the pioneering work [11] for a class of MIMO linear time-varying systems. The design of Zhang’s adaptive observer does not need any structural assumptions, but it is only addressed to linear systems which is not our case (the self-balancing robot model is nonlinear). The second one is the class of adaptive observers used, for instance, in [14, 22]. This approach is characterized by its simple architecture for practical implementation, but it is specifically addressed to particular systems (with linear parameterization) satisfying the restrictive minimum phase and relative degree one assumptions. These conditions are clearly not satisfied for the self-balancing robot model, and the latter approach is not applicable in our case. The third one is the class of extended Kalman filters (EKFs) [23]: This approach is a powerful estimation and filtering method which is characterized by its robustness against relatively small perturbations; however, it is designed under the classical restrictive observability assumption. Alternatively, high gain extended Kalman filters (HG-EKFs) [24] which have been designed for nonlinear systems in the triangular canonical form are robust against larger perturbations but more sensitive with respect to measurement noise. An improved version of the HG-EKF has been developed in [25] by using an adaptive high gain design parameter to reduce the sensitivity to the measurement noise. When using Kalman filtering in our case, the unknown parameter should be considered as an additional state. Unfortunately, the EKF may not be applied to solve the problem of joint states and unknown parameters estimation in our case because the observability condition is actually not satisfied. Moreover, the HG-EKF design is not applicable to the self-balancing robot model for which the classical canonical form is not satisfied (x1 and x2 are not scalar in our case). The adaptive high gain observer that we consider in this paper is addressed to a particular class of nonlinear systems in the block triangular canonical form subject to nonlinear functions with a triangular structure with respect to the subblocks xk (k∈1,2 in our case) which includes several mechanical systems and particularly the self-balancing robot system. The minimum phase assumption and the observer-matching condition are not needed in our adaptive high gain estimation approach, and the unknown parameters appear nonlinearly in the state model (we do not need to consider the unknown parameter as an additional state in our approach). The main drawback of adaptive high gain observers is their sensitivity to the measurement noise whose the effect is amplified when using large values of the design parameters. The effect of measurement noise may be reduced by well adjusting the high gain parameter θ and applying appropriate law-pass filters to the noisy output signals. Some recent design methods have been addressed in the literature of high gain observers to the problem of sensitivity to measurement noise (see References [26, 27]). It is also worth noticing that a common hypothesis used for all the above adaptive design methods including the adaptive observer used in this paper is the persistency of excitation assumption which means that the considered system is sufficiently rich in frequencies and which leads to the statement of necessary and sufficient conditions for asymptotic stability and parametric convergence.


## 3.3. Adaptive Observer-Based Output Feedback Control for the Self-Balancing Robot

The output feedback adaptive controller is obtained by the replacement of the speed states (x˙, ψ˙, δ˙ ), which are not accessible to the measurement, and the unknown parameter ρ=Mp for the two-wheeled self-balancing robot by their estimates generated by the adaptive observer (17) as it is shown in Figure 1.Figure 1
Synoptic diagram of the proposed method.The state feedback control law incorporating the adaptive observer is given by(20)ux^,ρ^=g˜x^r,ρ^+x^˙2r−f˜x^r,ρ^+ve^,where(21)ve^=−Kcλ2CS¯−1TΔλe^,where x^r represents the trajectory estimated for xr and it is calculated as in (11) by replacing ρ by ρ^ and e^∈ℝn refers to the estimate of the state tracking error which is defined as e^=x^−x^r. The matrices Δλ and S¯ are, respectively, defined as in (14) and (15). First of all, to prove the convergence of the estimated tracking error based on the control laws (20) and (21) one must show that the observation error x˜ and the adaptation error ρ˜ converge exponentially to zero, and this follows directly from Theorem 3.1 in [16], in which the authors showed that by considering the Lyapunov function V0t=ηtTS¯ηt+ρ˜TtP−1tρ˜t with ηt=x¯t−ϒtρ˜t and x¯t=Δθx^−x, one has(22)V˙0≤−θ−K11−k22θθ−k1V0,and by choosing θ such that(23)1−k22θθ−k1>0,the inequality (22) leads to(24)V0η,ρ˜≤e−θ−k1/2V00.Next, we are going to show the convergence of the estimated tracking error, starting with an appropriate Lyapunov function.Let us consider both tracking errore˜ and observation error x˜ as follows: e^=x^−x^r and x˜=x^−x.Using equations (43), (13), and (17), one can obtain(25)e^˙=Ae^+g˜x^,ρ^−g˜x^r,ρ^ur+g˜x^,ρ^ve^+f˜x^,ρ^−f˜x^r,ρ^−θΔθ−1S¯−1+ϒPϒTCTKCx˜.Sete¯=λ2Δλe^ and x¯=Δθx˜. Referring to the identity (21) and taking into account that ΔλAΔλ−1=λA and CΔθ=C, we get(26)e¯˙=λAe¯+λ2Δλg˜x^,ρ^−g˜x^r,ρ^ur−λ2Δλg˜x^,ρ^KcCS¯−1Te¯+λ2Δλf˜x^,ρ^−f˜x^r,ρ^−λ2ΔλθΔθ−1S¯−1+ϒPϒTCTKCx˜.Now, we consider the Lyapunov functionVc:e¯⟼Vce¯=λ−4e¯TS¯e¯, and its total derivative along the trajectories of (26) is given by(27)V˙c=λ−3e¯TS¯A+ATS¯e¯+2e¯TS¯λ−2Δλg˜x^,ρ^−g˜x^r,ρ^ur−2λ−2e¯TS¯Δλg˜x^,ρ^KcCS¯−1Te¯+2λ−2e¯TS¯Δλf˜x^,ρ^−f˜x^r,ρ^−2λ−2e¯TS¯ΔλθΔθ−1S¯−1+ϒPϒTCTKCx¯.Hence, according to (15), one can obtain(28)V˙c=−λVc+λ−3e¯TCCTe¯+2e¯TS¯λ−2Δλg˜x^,ρ^−g˜x^r,ρ^ur−2λ−2e¯TS¯Δλg˜x^,ρ^KcCS¯−1Te¯+2λ−2e¯TS¯Δλf˜x^,ρ^−f˜x^r,ρ^−2λ−2e¯TS¯ΔλθΔθ−1S¯−1+ϒPϒTCTKCx¯.Letgmax=supg˜x^,ρ^ and urmax=supur. Using the mean value theorem, one has(29)Δλg˜x^,ρ^−g˜x^r,ρ^ur=Δλ∂g˜∂xξ,ρ˜urx^−x^r=Δλ∂g˜∂xξ,ρ˜ure˜=1λ2Δλ∂g˜∂xξ,ρ˜urΔλ−1e¯.Given thatg˜ is globally Lipschitz in X and continuously differentiable in X, the matrix(30)∂g˜∂xξ,ρ˜=∂g˜1∂x1ξ,ρ˜03∂g˜2∂x1ξ,ρ˜∂g˜2∂x2ξ,ρ˜is bounded. Taking into account the triangular structure of g˜, then(31)Δλ∂g˜∂xξ,ρ˜urΔλ−1=∂g˜1∂x1ξ,ρ˜ur031λ∂g˜2∂x1ξ,ρ˜ur∂g˜2∂x2ξ,ρ˜urdepends only on 1/λ.So for large values ofλλ≫1, Δλ∂g˜/∂xξ,ρ˜urΔλ−1≤a1, with a1 is independent of λ. As a consequence, one can obtain(32)2e−TS¯λ−2Δλg˜x^,ρ^−g˜x^r,ρ^ur≤2λ−2e−TS¯1λ2Δλ∂g˜∂xξ,ρ˜urΔλ−1e¯≤2λ−4λmaxS¯Δλ∂g˜∂xξ,ρ˜urΔλ−1e¯2≤2λmaxS¯λminS¯Δλ∂g˜∂xξ,ρ˜urΔλ−1Vc≤k0Vc,where λ≥1,θ≥1, and k0=2λmaxS¯/λminS¯a1.We proceed in the same way forf˜, and Δλ∂f˜/∂xξ,ρ˜Δλ−1≤a2 is obtained, for λ>1 and a2 is independent of λ.As a result, we obtain(33)2λ−2e¯TS¯λ2Δλf˜x^,ρ^−f˜x^r,ρ^≤2λmaxS¯λminS¯Δλ∂f˜∂xξ,ρ˜Δλ−1Vc≤k1Vc,where k1=2λmaxS/λminS¯a2. In addition, we have(34)λ−3e¯TCCTe¯≤λ−3CCTe¯2≤λ−11λminS¯CCTVc≤k2Vc,with k2=λ−1b1 and b1=1/λminS¯ since C=I3,03 and CCT=1. Now, using that Δλg˜x^,ρ^=1/λg˜x^,ρ^, one can obtain(35)2λ−2e¯TS¯Δλg˜x^,ρ^KcCS¯−1Te¯≤2λ−3e¯TS¯g˜x^,ρ^CS¯−1Te¯≤2λ−3λmax2S¯gmaxCTe¯2≤2λ−1λmax2S¯λminS¯gmaxCTVc≤k3Vc,with k3=λ−1b2 and b2=2λmax2S¯/λminS¯gmaxCT.Applying condition (18), one can easily obtain the following inequality:(36)2λ−2e¯TS¯ΔλθΔθ−1S¯−1CTKCx¯≤2λ−2e¯TS¯ΔλθΔθ−1S¯−1CTCx¯≤2λmax2S¯θλ−2ΔλΔθ−1CCTx¯e¯≤2λmax2S¯λminS¯θΔλΔθ−1CCTV0Vc≤k4V0Vc,with k4=2λmax2S¯/λminS¯θΔλΔθ−1CCT.It is to be noticed thatΔλ is calculated as in (14) and it depends only on 1/λ. As a result, Δλ=1 for a large value of λ (λ>1). Similarly, since P is bounded, one can obtain(37)2λ−2e¯TS¯ΔλθΔθ−1ϒPϒTCTKCx¯≤2λ−2e¯TS¯ΔλθΔθ−1ϒPϒTCTCx¯≤2λmaxS¯λ−2ϒPϒTCTCx¯e¯≤2λmaxS¯λminS¯ϒPϒTCTCV0Vc≤k5V0Vc.It is to be noticed thatϒt is bounded. Indeed, considering the dynamics of ϒt in system (17) and using the fact that the matrix A−S¯−1CTC is Hurwitz and that Δθ∂g˜/∂ρx^,ρ˜u and Δθ∂f˜/∂ρx^,ρ˜ are bounded (according to Assumption (A2) and with the triangular structure of g˜ and f˜), it exists a positive constant ϒmax such that for all t≥0, ϒt≤ϒmax.As a result,k5=2λmaxS¯/λminS¯ϒmax2PCTC. Moreover, by combining the previous inequalities (32)–(37), one can obtain(38)Vc˙≤−λ−1λb1+b2−c1Vc+c2V0Vc,where c2=k4+k5 and c1=k0+k1.This allows us to conclude the asymptotic convergence of the estimated tracking error:(39)Vce¯≤e−λ−1/λb1+b2−c1/2tVce¯0+2c2θ−k1−2λ+1/λb1+b2+c1e−λ−1/λb1+b2−c1t−e−θ−k1/4t.It is important to notice that our adaptive high gain observer-based output feedback control approach guarantees the global asymptotic convergence of both estimation and tracking errors unlike many local control methods used in the literature of under-actuated control systems. The tracking problem considered in this paper consists in maintaining the unactuated variable (the pitch angle) in the unstable equilibrium position and to force the actuated variables (the linear displacement) to track a reference trajectory. The only assumption required for the desired trajectoryyrt is to plan sufficiently smooth trajectories. Indeed, in order to generate the input reference trajectories urt, it is required to calculate a second time derivative of the reference output yrt. The latter signal may be made sufficiently smooth by using a second-order filtered trapezoidal profile.


## 4. Numerical Simulations

In this section, the simulation results are realized to highlight the performances of the proposed observer and the effectiveness of the tracking control scheme applied on the two-wheeled self-balancing robot. Furthermore, in order to validate the ability of the proposed composite adaptive observer-based controller in real-world conditions and taking into account to practical considerations, additional numerical simulations are carried out to highlight the robustness of our proposed approach in the presence of additive disturbances, measurement noise, and computational delays.Table1 contains the physical parameters of the two-wheeled self-balancing robot.Table 1
Parameters of the two-wheeled self-balancing robot.
Symbol
Name
Value (unit)
M
p
Body weight including the loads
20.82 (kg)
M
r
Mass of wheel
0.420 (kg)
M
2
Mass of the chassis and wheels
15 (kg)
D
Distance between the contact patches of the wheels
0.438 (m)
L
0
Length of the stem
0.715 (m)
R
Radius of wheel
0.09 (m)
g
Gravity constant
9.8 (ms−2)We choose the following initial conditions:x0=00.50.3100T. Now, we apply the adaptive observer (17) introduced in Section (3.2) for the two-wheeled self-balancing robot with the initial conditions x^0=0.10.2400.50.50.5T, ρ0=20.82, P is a scalar such that P0=1, and ϒ0=000000T. The design parameters of the adaptive observer are choosen as θ=5 and K=1. The design matrix S¯−1CT are selected such that the Hurwitz condition (15) is satisfied:(40)S¯−1CT=3100013000132380004000022,and the matrice Δθ is choosen as follows:(41)Δθ=1000000100000010000000.20000000.20000000.2.To control the self-balancing robot, we apply the control law cited in (13) with(42)Kc=1,λ=4,CS¯−1T=100200010020001002,Δλ=1000000100000010000000.250000000.250000000.25.The simulation results of the output feedback adaptive controller are illustrated in Figures2–9.Figure 2
Linear displacement.Figure 3
The pitch angle response.Figure 4
The yaw angle response.Figure 5
Linear speed.Figure 6
Angular speed corresponding to the pitch angle.Figure 7
Angular speed corresponding to the yaw angle.Figure 8
Mass estimation under the proposed observer.Figure 9
The control inputs.The tracking control result under the adaptive high gain control with output feedback is on view in Figure2. In fact, the self-balancing robot follows the desired trajectories in Figures 2–4 although keeping the zero requirement of the pitch angle. From Figure 2, we can conclude that the tracking objective of displacement is achieved. Indeed, it is shown that the estimated trajectory tracks well the desired one with quasi-null error even in the reference variation. Most of the results arise from the trajectory of the linear speed which tracks well a trapezoidal profile (Figure 5). Figures 6 and 7 illustrate, after the transient, a good agreement between angular speeds and their estimates. In Figure 8, it is easy to see the efficiency and the robustness of the proposed adaptive observer to estimate the unknown parameter Mp. The control input vector, U = Cθ,CδT is shown in Figure 9. It is worth noticing that the estimation of the moments of inertia Jp=1/3MpL2 and Jδ=1/12MpD2 as well as the estimation of the height of the center of the mass L=L0cosψ1−M2/Mp may be deduced by using the estimate of the unknown parameter Mp and the estimate of the pitch angle ψ. Accordingly, Figures 10(a) and 10(b) illustrate the estimation of the moment of inertia Jp and the estimation of the height of the center of the mass L, respectively. Accordingly, Figures 10(a) and 10(b) illustrate that the moment of inertia Jp (15) and the height of the center of the mass L are well reconstructed by the proposed adaptive estimation approach.Figure 10
Estimation of (a) the moment of inertiaJp and (b) the height of the center of mass L.
(a)
(b)In a more sophisticated and realistic scenario, additional constraints and practical considerations are taken into account. In a first new run of simulation, we consider the model of the two-wheeled self-balancing robot subject to disturbances and measurement noise:(43)x˙t=Axt+gxt,ρtut+fxt,ρt+Dt,yt=Cxt+Gwt=x1t+Gwt,where Dt represents all unknown time-varying perturbations that may occur in practice such as external disturbances, actuator failures, and model uncertainties. For simulations, we assume as in (1) that Dt=000d1td2td3tT, where d1t=−0.2sin0.6t, d2t=−0.5cos0.8t, and d3t=−0.3sin0.5t. G=111T, and wt is a white noise of power equal to 10−9.The simulation results of the output feedback adaptive controller are illustrated in Figures11–13.Figure 11
Tracking and estimation of linear and angular positions in the presence of disturbances and measurement noise. (a) The linear position. (b) The pitch angle.
(a)
(b)Figure 12
Mass estimation in presence of disturbances and noise for (a)θ = 6 and (b) θ = 9.
(a)
(b)Figure 13
The control inputs in the presence of disturbances and measurement noise. (a) The torqueCθ. (b) The torque Cδ.
(a)
(b)It is shown that the tracking performances are preserved from Figure11, whereas we recorded a more fluctuated signal on the control inputs (Cθ, Cδ) as it can be seen in Figure 13. Figure 12 shows that the estimation of the unknown parameter is sensitive to measurement noise and external disturbances.The comparison between Figures12(a) and 12(b) proves that the measurement noise effect increases while increasing the observer gain θ.In light of this, we deduce that our high-gain adaptive observer-based tracking control method has satisfactory tracking performances in the presence of disturbances and noise, but adaptive estimation is clearly sensitive to measurement noise.In this context, when using high gain observers for nonlinear systems subject to external bounded unknown disturbances and measurement noise, the observation error converges to a compact set with a radius proportional to the upper boundKD on the disturbance signal Dt which may be reduced by choosing sufficiently large values of the high gain design parameter θ. However, large values of θ may increase the effect of the measurement noise wt since the radius of the compact set depends also on the upper bound Kw on the measurement noise. Hence, an optimal choice of the high gain design parameter is necessary to ensure the best convergence performances and reduce the sensitivity to measurement noise. Note that in the disturbances and measurement noise free case, the estimation error converges exponentially to zero. For more details about the influence of disturbances and measurement noise on the performances of high gain observers, refer to Theorem 2.1 in [28] and Theorem 2.1 in [4].In the literature of automatic control, new design methods of high gain observers (in the unknown parameter free case) have been proposed to reduce the sensitivity to measurement noise: for instance, a high gain observer with a switched gain approach have been proposed in [26] and more recently a filtered high gain observer has been designed in [27] for nonlinear systems subject to measurement noise. The extension of these design methods to adaptive high gain observers for systems subject to unknown parameters and measurement noise is an important perspective that may be investigated from a theoretical viewpoint.On the contrary, additional simulations are carried out in order to analyze the performances of our adaptive observer-based output feedback control approach in the presence of delayed control inputs and delayed outputs. Indeed, in practice, control and observation algorithms are to be implemented using digital technologies where computational delays are unavoidable. The tracking and estimation performances are analyzed and discussed in the presence of a constant delayτ=0.02s corrupting both outputs and control inputs. The model of the two-wheeled self-balancing robot including input and output delays is given by(44)x˙t=Axt+gxt,ρtut−τ+fxt,ρt,yt=Cxt−τ.The simulation results of the output feedback adaptive controller are illustrated in Figures14–16.Figure 14
Tracking and estimation of linear and angular positions in the presence of delayed inputs and delayed outputs. (a) The linear position. (b) The pitch angle.
(a)
(b)Figure 15
Mass estimation in the presence of delayed inputs and delayed outputs.Figure 16
The control inputs in the presence of delayed inputs and delayed outputs. (a) The torqueCθ. (b) The torque Cδ.
(a)
(b)According to Figure14, it is shown that the tracking performances are quasi-insensitive to the considered computation small delays. Indeed, it is clear that the self-balancing robot ensures the desired tracking and that the equilibrium at the upright position is established. The estimation of the mass, as shown in Figure 15, is weakly influenced: it is illustrated that the proposed adaptive observer ensures the unknown parameter estimation even with small delays. The control input vector, U=Cθ,CδT, is shown in Figure 16.It is worth noticing that when computational delays are more important, the adaptive observer structure should be modified and a set of cascaded adaptive observers may be designed to deal with large values of computational delays as it has been demonstrated in [29].


## 5. Conclusion

An adaptive high gain control method has been proposed for the two-wheeled self-balancing robot in this paper. The use of the adaptive observer ensures the joint estimation of the state and the unknown parameter (unknown body mass). The convergence of the output feedback controller based on the adaptive observer was carried out by a Lyapunov analysis. The simulation results illustrate the performance of the proposed observer as well as the tracking control scheme applied on the two-wheeled self-balancing robot. In a future work, we will take into account that the self-balancing robot dynamics is also corrupted by unknown time-varying disturbances and we will improve more the robustness of our control method.



---

*Source: 5162172-2020-01-29.xml*