# H∞ Time-Delayed Fractional Order Adaptive Sliding Mode Control for Two-Wheel Self-Balancing Vehicles

Authors: Han Xue; Qionglin Fang; Jifeng Zhong; Zhe-ping Shao
Journal: Computational Intelligence and Neuroscience
 (2020)

---

## Abstract

In this paper, a time-delayed fractional order adaptive sliding mode control algorithm is proposed for a two-wheel self-balancing vehicle system. The closed-loop system is proved based on the Lyapunov-Razumikhin function. The switching function is designed to make the system robust when facing uncertainties and external disturbances. It is designed to avoid monotonically increasing gains and can handle state-dependent uncertainties without a prior bound. The two-wheel self-balancing vehicle used in the experiment consists of a gyroscope MPU-6050 and accelerometer, a motor driving circuit composed of a motor driving chip TB6612FNG, and STM32F103x8B that is selected as the control core. The experimental results show that the time-delayed fractional order adaptive sliding mode control algorithm can make the vehicle achieve autonomous balance and quickly restore its stable state while appropriate disturbance is introduced.


---

## Body

## 1. Introduction

The movement principle of a two-wheel self-balancing vehicle is based mainly on the basic principle of dynamic stability. The gyroscope and acceleration sensor inside the vehicle are used to detect the changing attitude of the vehicle. The control system is used to precisely adjust the motor to maintain the balance of the system. At present, two-wheel self-balancing vehicles are widely used in transportation, rescue, and other fields. They have provided an effective solution to environmental pollution and energy crisis. Two-wheel self-balancing vehicles have the characteristics of high order, nonlinearity, strong coupling, and underactuation. However, some uncertainties, such as mechanism friction, ground friction, changing payload, and road gradient still need to be dealt with. At present, the control algorithms used in two-wheel self-balancing vehicles include PID, neural network, mode predictive control,O control, and so on.Sliding mode control is a branch of variable structure control that was proposed in the 1950s. It belongs to a nonlinear control that is realized through a switching function. It is insensitive to parameter changes and has the capability of rejecting interference. There are many methods to deal with the considered external disturbance. Li investigated the problem of induced L2 disturbance attenuation control design for T-S fuzzy delta operator systems with time-varying delays via the IO approach [1]. The time delay was handled by the IO approach to facilitate the establishment of the feedback interconnection system. Based on the feedback interconnection system, a sufficient condition of asymptotical stability was obtained for the closed-loop system. The desired DOF controller was designed to guarantee the closed-loop system to be asymptotically stable with an induced L2 disturbance attenuation performance. Liu studied the finite-time H∞ control of a fractional order HTGS [2]. Based on the generalized T-S fuzzy model, the fractional order fuzzy model of a HTGS was presented. By combining finite-time control and H∞ control theory, a finite-time H∞ state feedback control was proposed for the HTGS. The control is based on the fractional order stability theorem. Gao presented a novel descriptor SMO to formulate accurate estimations of both plant states and actuator fault deviation [3]. The stability of error dynamics was analyzed and a developed stability criterion was established. The developed criterion gave a solvable solution to obtain the observer gains using convex optimization algorithm. A linear sliding surface and integral sliding surface were designed. A new SMC law was formulated with a discontinuous control input and an equivalent control to guarantee that the finite-time convergence of the plant trajectories. Liu proposed an ESO-based cascade controller for regulating the oxygen excess ratio of the PEMFC air-feed system to its desired value, using the sliding mode technique [4]. The control objective was to avoid oxygen starvation during sudden load changes. The designed cascade controller consists of oxygen excess ratio tracking outer loop and compressor flow rate regulation inner loop. The ESO was used to reconstruct the oxygen excess ratio. The outer control loop using the estimated oxygen excess ratio provided the compressor flow rate reference for the inner loop based on the STA. A simple SMC law consisting of a linear term and a switching term was designed for the inner loop.In recent years, sliding mode control has developed rapidly in the field of two-wheel self-balancing robots. Abeygunawardhana proposed a second-order sliding mode controller based on the disturbance observer [5]. Rafael established a reference model based on a dual-relay controller for tracking control problems of a wheel pendulum. [6] Guo proposed a sliding mode controller for an underactuated system consisting of a pendulum and two wheels. [7] Based on the nonlinear dynamic model, Yue divided the whole system into three subsystems: rotational motion, longitudinal motion, and zero dynamics. [8] Within these subsystems, the inclined angle of the vehicle was treated as zero dynamics, the longitudinal acceleration was used as control input, and the sliding mode control technology was used to stabilize the zero dynamic subsystem. Li established a physical model of a two-wheel self-balancing vehicle and designed a sliding mode controller based on Newtonian mechanics. [9] Dai used the sliding mode control to achieve self-balance and pitch angle control of a double-wheel inverted pendulum robot with friction compensation. [10] Ali used a set of highly coupled nonlinear differential equations to represent the motion model of two-wheel self-balancing robots [11]. Zhou proposed a robust integral sliding mode controller based on bounded system uncertainties with linearization error and input delay [12]. Nasim used back-stepping sliding mode to solve the problem of balancing and trajectory tracking of a two-wheel balanced mobile robot [13]. Chen proposed a robust tracking control based on a nonlinear disturbance observer for self-balanced mobile robots with unknown external disturbances [14]. Wang proposed a model-free fractional order sliding mode control based on an extended state observer, providing a framework that considered nonlinearity of friction, parameter variation, and external disturbance [15].Designing robust controllers for uncertain time-delay systems has become a key problem. The robustness of sliding mode variable structure control makes it insensitive to the model error, changing parameters, and external disturbance. Therefore, variable structure control has become an effective control method for time-delay systems. With the development of variable structure control theory, some research is available on variable structure control of time-delay systems [16, 17]. Roy solved the long-standing problem of consistent stability analysis and control design in continuous time for time-delay control (TDC). Based on its newly proposed structure of TDE error, a more robust control law was formulated [18]. Roy made a number of significant contributions: proposing a novel adaptive sliding mode control (ASMC) methodology that does not require a priori bounded uncertainty [19], a novel ASMC strategy that overcomes underestimation and overestimation problems commonly observed in conventional ASMC [20], and a hybrid control methodology called a time-delay sliding mode control for accurate path tracking of nonholonomic wheeled mobile robots [21].In this paper, an adaptive time-delay fractional order sliding mode control algorithm is proposed to control the motion of a two-wheel self-balancing vehicle. The stability of the closed-loop system is proved based on the quadratic Lyapunov function. The influence of control parameters on control performance is analyzed based on a simulation. The physical experiment of the two-wheel self-balancing vehicle is carried out to verify the effectiveness of the control algorithm. The technique contribution of the presented control method is summarized as follows:(1)
A time-delay control (TDC) algorithm is proposed. The TDC approximates the system uncertainty by using control input and state information of the immediate past time instant.(2)
A fractional order sliding mode control is designed. Fractional order sliding mode has a memory effect and better stability. Its parameter selection range is wider and more flexible. Fractional calculus operator can obtain faster speed and higher control accuracy. It not only makes the system converge in finite time but also effectively weakens the chattering of traditional integer order sliding mode controller.(3)
Adaptive switching gain of the sliding mode control is designed.


## 2. Mathematical Model of TWIP

The coordinate system is established as follows: the midpoint of the line segment connecting the centroids of two wheels is set as the originX. The moving direction of the vehicle is set as the Y axis. The line connecting the centroids of the two wheels is set as the axis. The vertical upward direction through the origin is set as the Z axis. The motion model of the two-wheel self-balancing vehicle is shown in Figure 1.Figure 1
Model of a two-wheel self-balancing vehicle.If we denoteM as the mass of vehicle, m as the mass of wheel, R as the radius of wheels, l as the distance from the centroid of the vehicle to the origin, J as the moment of inertia of the vehicle, Jw as the moment of inertia of wheel, θ as the angle of inclination of the vehicle, and xm as the displacement of vehicle, then the kinetic energy K of the vehicle is expressed as follows:(1)K=12Mx˙m+lθ˙cosθ2+lθ˙sinθ2+12Jθ˙2.The kinetic energy of wheelsKw is(2)Kw=12mx˙m2+12Jwx˙mR2.The potential energy of system is given as follows:(3)P=Mglcosθ.The Lagrange function is constructed as follows:(4)L=K+Kw−P=12Mx˙m+lθ˙cosθ2+lθ˙sinθ2+12Jθ˙2+12mx˙m2+12Jwx˙mR2−Mglcosθ.Definingu as the control input of the system, we obtain the following using the Euler-Lagrange formula:(5)ddt∂L∂θ˙−∂L∂θ=−u,(6)ddt∂L∂x˙m−∂L∂xm=uR.Substituting (4) into (5), we obtain(7)ddt∂L∂θ˙−∂L∂θ=ddtMx˙m+lθ˙cosθlcosθ+Jθ˙+Ml2θ˙sin2θ+Mx˙m+lθ˙cosθlθ˙sinθ−Ml2θ˙2sinθcosθ−Mglsinθ=Mx¨mlcosθ−Mx˙mlsinθθ˙−2Ml2sinθcosθθ˙2+Ml2θ¨cos2θ+Jθ¨+Ml2θ¨sin2θ+2Ml2θ˙2sinθcosθ+Mx˙m+lθ˙cosθlθ˙sinθ−Ml2θ˙2sinθcosθ−Mglsinθ=Mx¨mlcosθ+Jθ¨+Ml2θ¨−Mglsinθ=−u.Substituting (4) into (6), we obtain(8)ddt∂L∂x˙m−∂L∂xm=ddtMx˙m+lθ˙cosθ+mx˙m+Jwx˙mR2=M+m+JwR2x¨m+Mlθ¨cosθ−Mlθ˙2sinθ=uR.By simplifying and linearizing (6) and (7), we obtain(9)θ¨=MlgJw+mR2+MR2θJJw+R2mJ+JR2M+Ml2Jw+R2Ml2m−Jw+mR2+MR2+RMlJJw+R2mJ+JR2M+Ml2Jw+R2Ml2mu,(10)x¨m=−M2l2R2gθ+JwR+MlR2+Ml2RuJJw+R2mJ+JR2M+Ml2Jw+R2Ml2m.The state variables are given as follows:(11)x=θ,xmT.Define(12)f=MlgJw+mR2+MR2θJJw+R2mJ+JR2M+Ml2Jw+R2Ml2m−M2l2R2gθJJw+R2mJ+JR2M+Ml2Jw+R2Ml2m.Define the input matrix as follows:(13)B=−Jw+mR2+MR2+RMlJJw+R2mJ+JR2M+Ml2Jw+R2Ml2mJwR+MlR2+Ml2RJJw+R2mJ+JR2M+Ml2Jw+R2Ml2m.Thus, the state space can be written as follows:(14)x¨t=ft+But.Considering the existence of external disturbanced, the system dynamics can be written as follows:(15)x¨t=ft+dt+But.If we define(16)ξt=ft+dt,(17)τt=But,then (15) can be written as follows:(18)x¨t=ξt+τt.


## 3. Time-Delayed Fractional Order Adaptive Sliding Mode Control

### 3.1. Fractional Order Calculus

Fractional calculus is the operation of derivatives and integrals extended to the fractional order. It actually provides a more precise tool for describing physical systems. The Riemann-Liouville (RL) fractional differintegral is one of its most common definitions. For a functionx that is defined in [t0, t], the RL fractional integrator is defined as follows [22]:(19)Dt0tαxt=1Γα∫t0tt−τα−1xτdτ,where α is the fractional order, τ is the integral variable, and Γx is the gamma function that is defined as follows:(20)Γx=∫0∞e−ttx−1dt.The RL fractional derivative is defined as follows:(21)Dt0tαxt=dmdtn1Γm−α∫t0tt−τm−α−1xτdτ,where α∈m−1,m and m is a positive integer near α.


### 3.2. The Proposed Algorithm

Letxd be the desired state and x˜ be the state error:(22)x˜t=xdt−xt.Then, the following sliding mode surface function can be constructed:(23)st=x˜˙t+cDαx˜t,where 0<α<1,c>0.Taking the derivative of formula (23) yields(24)s˙t=x˜¨t+cDα+1x˜t.Substituting (22) into (24), one can obtain(25)s˙t=x¨dt−x¨t+cDα+1x˜t.Substituting (21) into (25), one can obtain(26)s˙t=x¨dt−ξt−τt+cDα+1x˜t.Denoteh as the time delay. The TDC approximates the system uncertainty by using control input and state information of the immediate past time instant. Then, (18) can be written as follows:(27)ξt−h=x¨t−h−τt−h.The adaptive control law is constructed as follows:(28)τt=x¨dt−ξt−h+cDα+1x˜t+ρtstst.The switching gain satisfies(29)ρt=K^0t+K^1txt,(30)K^˙0t=st−α0K^0t,(31)K^˙1t=st⋅xt−α1K^1t,where α0>0,α1>0,K^0t>0,K^1t>0.


### 3.3. Stability Analysis

Theorem 1.
Based on the Lyapunov’s stability theory, considering the kinematics equation (14) of a two-wheel self-balancing vehicle system with input delay and the adaptive sliding mode controller (28)–(31), the tracking error of the system converges and the system becomes uniform ultimate bounded.Proof.
Define(32)E=x˜x˜˙.
Construct a Lyapunov-Krasovsky functional as follows:(33)VE,t=12sTtst+12∑i=01K^it−Ki∗2,where Ki∗t>0.
Taking the derivative of formula (33), one can obtain(34)V˙E,t=s˙Ttst+∑i=01K^it−Ki∗K^˙it.
Substituting (26) into (34), one can obtain(35)V˙E,t=x¨dt−ξt−τt+cDα+1x˜tTst+∑i=01K^it−Ki∗K^˙it.
Substituting (28) into (35), one can obtain(36)V˙E,t=x¨dt−ξt−x¨dt+ξt−h−cDα+1x˜t−ρtstst+cDα+1x˜tTst+∑i=01K^it−Ki∗K^˙it=−ξt+ξt−h−ρtststTst+∑i=01K^it−Ki∗K^˙it=−ξt−ξt−hTst−ρtst+∑i=01K^it−Ki∗K^˙it.
The approximation error is assumed to be bounded by(37)ξt−ξt−h≤δst,where δ>0.
Substituting (29) into (34), one can obtain(38)V˙E,t=−ξt−ξt−hTst−K^0t+K^1txtst+∑i=01K^it−Ki∗K^˙it=−ξt−ξt−hTst−∑i=01K^itxtist+∑i=01K^it−Ki∗K^˙ist≤−ξt−ξt−hTst−∑i=01K^it−Ki∗xtist+∑i=01K^it−Ki∗K^˙it=−ξt−ξt−hTst−∑i=01K^it−Ki∗xtist−K^˙it.
Substituting (30) and (31) into (38), one can obtain(39)V˙E,t≤−ξt−ξt−hTst−∑i=01K^it−Ki∗⋅xtist−st⋅xti+αiK^it=−ξt−ξt−hTst−∑i=01K^it−Ki∗αiK^it=−ξt−ξt−hTst−∑i=01αiK^it−Ki∗2+∑i=01αiKi∗2.
Substituting (37) into (39), one can obtain(40)V˙E,t≤−δsTtst−∑i=01αiK^it−Ki∗2+∑i=01αiKi∗2.
Using the definition ofVE,t in (33), condition (40) can be simplified to the following:(41)V˙E,t≤−λVE,t+∑i=01αiKi∗2=−σVE,t−λ−σVE,t+∑i=01αiKi∗2,where λ=2minδ,α0,α1,0<σ<λ.
It can be deduced that whenVE,t≥∑i=01αiKi∗2/λ−σ, V˙E,t≤−σVE,t.
V(E, t) will enter inside the ball in a finite time. From (41), it can be deduced that selecting small α0,α1 can reduce the size of the ball.
Therefore,(42)VE,t≤maxV0,∑i=01αiKi∗2λ−σ,∀t≥0.
Based on the Lyapunov stability theory,VE,t will enter inside the ball in finite time. The system is uniform ultimate bounded and independent of initial conditions.
A performance index is proposed to evaluate the parameters of the controller. It consists of the integration of the input and the error between the expected state and the output state. The integral interval should be large enough. The performance indexJ is defined as follows:(43)J=1tf∫0tfxdt−xt2+τ2tdt.
Adjust the appropriate control parameters to reduce the performance index as much as possible.


## 3.1. Fractional Order Calculus

Fractional calculus is the operation of derivatives and integrals extended to the fractional order. It actually provides a more precise tool for describing physical systems. The Riemann-Liouville (RL) fractional differintegral is one of its most common definitions. For a functionx that is defined in [t0, t], the RL fractional integrator is defined as follows [22]:(19)Dt0tαxt=1Γα∫t0tt−τα−1xτdτ,where α is the fractional order, τ is the integral variable, and Γx is the gamma function that is defined as follows:(20)Γx=∫0∞e−ttx−1dt.The RL fractional derivative is defined as follows:(21)Dt0tαxt=dmdtn1Γm−α∫t0tt−τm−α−1xτdτ,where α∈m−1,m and m is a positive integer near α.


## 3.2. The Proposed Algorithm

Letxd be the desired state and x˜ be the state error:(22)x˜t=xdt−xt.Then, the following sliding mode surface function can be constructed:(23)st=x˜˙t+cDαx˜t,where 0<α<1,c>0.Taking the derivative of formula (23) yields(24)s˙t=x˜¨t+cDα+1x˜t.Substituting (22) into (24), one can obtain(25)s˙t=x¨dt−x¨t+cDα+1x˜t.Substituting (21) into (25), one can obtain(26)s˙t=x¨dt−ξt−τt+cDα+1x˜t.Denoteh as the time delay. The TDC approximates the system uncertainty by using control input and state information of the immediate past time instant. Then, (18) can be written as follows:(27)ξt−h=x¨t−h−τt−h.The adaptive control law is constructed as follows:(28)τt=x¨dt−ξt−h+cDα+1x˜t+ρtstst.The switching gain satisfies(29)ρt=K^0t+K^1txt,(30)K^˙0t=st−α0K^0t,(31)K^˙1t=st⋅xt−α1K^1t,where α0>0,α1>0,K^0t>0,K^1t>0.


## 3.3. Stability Analysis

Theorem 1.
Based on the Lyapunov’s stability theory, considering the kinematics equation (14) of a two-wheel self-balancing vehicle system with input delay and the adaptive sliding mode controller (28)–(31), the tracking error of the system converges and the system becomes uniform ultimate bounded.Proof.
Define(32)E=x˜x˜˙.
Construct a Lyapunov-Krasovsky functional as follows:(33)VE,t=12sTtst+12∑i=01K^it−Ki∗2,where Ki∗t>0.
Taking the derivative of formula (33), one can obtain(34)V˙E,t=s˙Ttst+∑i=01K^it−Ki∗K^˙it.
Substituting (26) into (34), one can obtain(35)V˙E,t=x¨dt−ξt−τt+cDα+1x˜tTst+∑i=01K^it−Ki∗K^˙it.
Substituting (28) into (35), one can obtain(36)V˙E,t=x¨dt−ξt−x¨dt+ξt−h−cDα+1x˜t−ρtstst+cDα+1x˜tTst+∑i=01K^it−Ki∗K^˙it=−ξt+ξt−h−ρtststTst+∑i=01K^it−Ki∗K^˙it=−ξt−ξt−hTst−ρtst+∑i=01K^it−Ki∗K^˙it.
The approximation error is assumed to be bounded by(37)ξt−ξt−h≤δst,where δ>0.
Substituting (29) into (34), one can obtain(38)V˙E,t=−ξt−ξt−hTst−K^0t+K^1txtst+∑i=01K^it−Ki∗K^˙it=−ξt−ξt−hTst−∑i=01K^itxtist+∑i=01K^it−Ki∗K^˙ist≤−ξt−ξt−hTst−∑i=01K^it−Ki∗xtist+∑i=01K^it−Ki∗K^˙it=−ξt−ξt−hTst−∑i=01K^it−Ki∗xtist−K^˙it.
Substituting (30) and (31) into (38), one can obtain(39)V˙E,t≤−ξt−ξt−hTst−∑i=01K^it−Ki∗⋅xtist−st⋅xti+αiK^it=−ξt−ξt−hTst−∑i=01K^it−Ki∗αiK^it=−ξt−ξt−hTst−∑i=01αiK^it−Ki∗2+∑i=01αiKi∗2.
Substituting (37) into (39), one can obtain(40)V˙E,t≤−δsTtst−∑i=01αiK^it−Ki∗2+∑i=01αiKi∗2.
Using the definition ofVE,t in (33), condition (40) can be simplified to the following:(41)V˙E,t≤−λVE,t+∑i=01αiKi∗2=−σVE,t−λ−σVE,t+∑i=01αiKi∗2,where λ=2minδ,α0,α1,0<σ<λ.
It can be deduced that whenVE,t≥∑i=01αiKi∗2/λ−σ, V˙E,t≤−σVE,t.
V(E, t) will enter inside the ball in a finite time. From (41), it can be deduced that selecting small α0,α1 can reduce the size of the ball.
Therefore,(42)VE,t≤maxV0,∑i=01αiKi∗2λ−σ,∀t≥0.
Based on the Lyapunov stability theory,VE,t will enter inside the ball in finite time. The system is uniform ultimate bounded and independent of initial conditions.
A performance index is proposed to evaluate the parameters of the controller. It consists of the integration of the input and the error between the expected state and the output state. The integral interval should be large enough. The performance indexJ is defined as follows:(43)J=1tf∫0tfxdt−xt2+τ2tdt.
Adjust the appropriate control parameters to reduce the performance index as much as possible.


## 4. Simulation Studies

### 4.1. Example Introduction

In order to verify the control effect of the adaptive sliding mode control algorithm for two-wheel self-balancing vehicles with input delay, the main parameters of the two-wheel self-balancing vehicle used for testing are listed in Table1.Table 1
Main parameters of two-wheel self-balancing vehicle.
ParameterValueUnitM9kgm5kgl0.95mR0.2mJ12kg·m2Jw0.13kg·m2τ10.1S


### 4.2. Simulation Results

The experiments were carried out on Intel (R) Core (TM) i3-4150T CPU @ 3.00 GHz 3.00 GHz, a 64-bit operating system with 4.00 GB memory and an x64-based processor. The initial inclination angle of the system was 45。. The initial angular velocity was 0 degrees/s. The initial displacement was 0.2 m. The initial velocity was 0 m/s. The desired inclination angle was set to be 0 degrees. The desired angular velocity was 0 degrees/s. The desired displacement was 0 m. The desired velocity was 0 m/s.Figure2 shows the response curve of inclination angle and vehicle position. The horizontal axis represents time in seconds. The longitudinal axis in the upper half of the figure represents the inclination angle of the vehicle in degrees. The longitudinal axis in the lower half of the figure represents the vehicle position in meters.Figure 2
Response curve of inclination angle and vehicle position.
(a)(b)Figure3 shows the inclination angle velocity and vehicle body velocity. The horizontal axis represents time in seconds. The longitudinal axis in the upper half of the figure represents the inclination angle velocity in °/s. The longitudinal axis in the lower half of the figure represents the vehicle body velocity in m/s.Figure 3
Inclination angle velocity and vehicle body velocity.
(a)(b)Figure4 shows the speed response curve of control input. The horizontal axis represents time in seconds, and the longitudinal axis represents the control input in N·m.Figure 4
Control input curve.
(a)(b)Figures2–4 show that the adaptive sliding mode control can make the vehicle achieve autonomous balance.


### 4.3. Performance Comparison of Different Algorithms

In order to verify the effectiveness of the proposed algorithm, the control effects of the proposed algorithm are compared with other algorithms. The remaining parameters remain unchanged.Figure5 shows the response curve of inclination angle and vehicle position of different algorithms. The horizontal axis represents time in seconds. The longitudinal axis in the upper half of the figure represents the inclination angle of the vehicle in degrees. The longitudinal axis in the lower half of the figure represents the vehicle position in meters.Figure 5
Inclination angle and vehicle position of different algorithms.
(a)(b)Figure6 shows the inclination angle velocity and vehicle body velocity of different algorithms. The horizontal axis represents time in seconds. The longitudinal axis in the upper half of the figure represents the inclination angle velocity in °/s. The longitudinal axis in the lower half of the figure represents the vehicle body velocity in m/s.Figure 6
Inclination angle velocity and vehicle body velocity of different algorithms.
(a)(b)Figure7 shows the speed response curve of control input of different algorithms. The horizontal axis represents time in seconds, and the longitudinal axis represents the control input in N·m.Figure 7
Control input of different algorithms.
(a)(b)Figures5–7 show that, compared with other algorithms, the proposed algorithm can achieve less adjustment time and require less control input.


### 4.4. Disturbance

In order to verify the effectiveness of the proposed algorithm under disturbance, setd = 0.2 × sin(3.5 × t). The remaining parameters remain unchanged. Figure 8 shows the response curve of inclination angle and vehicle position under disturbance. The horizontal axis represents time in seconds. The longitudinal axis in the upper half of the figure represents the inclination angle of the vehicle in degrees. The longitudinal axis in the lower half of the figure represents the vehicle position in meters.Figure 8
Inclination angle and vehicle position curve under disturbance.
(a)(b)Figure9 shows the inclination angle velocity and vehicle body velocity under disturbance. The horizontal axis represents time in seconds. The longitudinal axis in the upper half of the figure represents the inclination angle velocity in °/s. The longitudinal axis in the lower half of the figure represents the vehicle body velocity in m/s.Figure 9
Velocity curve with disturbance.
(a)(b)Figure10 shows the speed response curve of control input under disturbance. The horizontal axis represents time in seconds, and the longitudinal axis represents the control input in N·m.Figure 10
Control input curve with disturbance.
(a)(b)Figures8–10 show when appropriate disturbance is introduced, the vehicle can adjust itself and quickly restore its stable state.


## 4.1. Example Introduction

In order to verify the control effect of the adaptive sliding mode control algorithm for two-wheel self-balancing vehicles with input delay, the main parameters of the two-wheel self-balancing vehicle used for testing are listed in Table1.Table 1
Main parameters of two-wheel self-balancing vehicle.
ParameterValueUnitM9kgm5kgl0.95mR0.2mJ12kg·m2Jw0.13kg·m2τ10.1S


## 4.2. Simulation Results

The experiments were carried out on Intel (R) Core (TM) i3-4150T CPU @ 3.00 GHz 3.00 GHz, a 64-bit operating system with 4.00 GB memory and an x64-based processor. The initial inclination angle of the system was 45。. The initial angular velocity was 0 degrees/s. The initial displacement was 0.2 m. The initial velocity was 0 m/s. The desired inclination angle was set to be 0 degrees. The desired angular velocity was 0 degrees/s. The desired displacement was 0 m. The desired velocity was 0 m/s.Figure2 shows the response curve of inclination angle and vehicle position. The horizontal axis represents time in seconds. The longitudinal axis in the upper half of the figure represents the inclination angle of the vehicle in degrees. The longitudinal axis in the lower half of the figure represents the vehicle position in meters.Figure 2
Response curve of inclination angle and vehicle position.
(a)(b)Figure3 shows the inclination angle velocity and vehicle body velocity. The horizontal axis represents time in seconds. The longitudinal axis in the upper half of the figure represents the inclination angle velocity in °/s. The longitudinal axis in the lower half of the figure represents the vehicle body velocity in m/s.Figure 3
Inclination angle velocity and vehicle body velocity.
(a)(b)Figure4 shows the speed response curve of control input. The horizontal axis represents time in seconds, and the longitudinal axis represents the control input in N·m.Figure 4
Control input curve.
(a)(b)Figures2–4 show that the adaptive sliding mode control can make the vehicle achieve autonomous balance.


## 4.3. Performance Comparison of Different Algorithms

In order to verify the effectiveness of the proposed algorithm, the control effects of the proposed algorithm are compared with other algorithms. The remaining parameters remain unchanged.Figure5 shows the response curve of inclination angle and vehicle position of different algorithms. The horizontal axis represents time in seconds. The longitudinal axis in the upper half of the figure represents the inclination angle of the vehicle in degrees. The longitudinal axis in the lower half of the figure represents the vehicle position in meters.Figure 5
Inclination angle and vehicle position of different algorithms.
(a)(b)Figure6 shows the inclination angle velocity and vehicle body velocity of different algorithms. The horizontal axis represents time in seconds. The longitudinal axis in the upper half of the figure represents the inclination angle velocity in °/s. The longitudinal axis in the lower half of the figure represents the vehicle body velocity in m/s.Figure 6
Inclination angle velocity and vehicle body velocity of different algorithms.
(a)(b)Figure7 shows the speed response curve of control input of different algorithms. The horizontal axis represents time in seconds, and the longitudinal axis represents the control input in N·m.Figure 7
Control input of different algorithms.
(a)(b)Figures5–7 show that, compared with other algorithms, the proposed algorithm can achieve less adjustment time and require less control input.


## 4.4. Disturbance

In order to verify the effectiveness of the proposed algorithm under disturbance, setd = 0.2 × sin(3.5 × t). The remaining parameters remain unchanged. Figure 8 shows the response curve of inclination angle and vehicle position under disturbance. The horizontal axis represents time in seconds. The longitudinal axis in the upper half of the figure represents the inclination angle of the vehicle in degrees. The longitudinal axis in the lower half of the figure represents the vehicle position in meters.Figure 8
Inclination angle and vehicle position curve under disturbance.
(a)(b)Figure9 shows the inclination angle velocity and vehicle body velocity under disturbance. The horizontal axis represents time in seconds. The longitudinal axis in the upper half of the figure represents the inclination angle velocity in °/s. The longitudinal axis in the lower half of the figure represents the vehicle body velocity in m/s.Figure 9
Velocity curve with disturbance.
(a)(b)Figure10 shows the speed response curve of control input under disturbance. The horizontal axis represents time in seconds, and the longitudinal axis represents the control input in N·m.Figure 10
Control input curve with disturbance.
(a)(b)Figures8–10 show when appropriate disturbance is introduced, the vehicle can adjust itself and quickly restore its stable state.


## 5. Experiment Results

In this experiment, gyroscope MPU-6050 and accelerometer constituted a vehicle attitude detection device for a two-wheel self-balancing vehicle. A motor driving circuit was composed of a TB6612FNG chip. Fusion of the gyroscope data and accelerometer data was completed using a Kalman filter. The system used STM32F103x8B as the control core and completed processing of a sensor signal, realization of a filtering algorithm, body control, human-computer interaction, and so on. The vehicle could achieve autonomous balance without any intervention. When introducing appropriate disturbance, the vehicle could adjust itself and quickly restore its stable state. The vehicle could also complete basic movements, such as forward, backward, left turn, and right turn. Figure11 is a photo of the two-wheel self-balancing vehicle system.Figure 11
Two-wheel self-balancing vehicle system.The control circuit included ARM, three attitude sensors, filtering circuits, power circuit, power supply voltage conversion, and voltage stabilization. Its acceleration was measured by accelerometer, and the rotation angular velocity was measured by gyroscope. The motor used 7.4V DC.Figure12 shows the acceleration curve measured with an acceleration sensor. The horizontal axis represents time in seconds, and the longitudinal axis represents the acceleration in m/s2.Figure 12
Acceleration curve.Figure13 shows the angular velocity of rotation measured by a gyroscope. The horizontal axis represents time in seconds, and the longitudinal axis represents the angular velocity in ° /s.Figure 13
Angular velocity of rotation.Figure14 shows acceleration, rotation angular velocity, and filtering curve. The horizontal axis represents time in seconds. The red line represents the acceleration in m/s2. The green line represents the angular velocity in °/s. The blue line represents the Klaman filtered acceleration in m/s2.Figure 14
Acceleration, rotation angular velocity, and filtering curve.Figures12 to 14 show that the vehicle can adjust itself and restore its stability rapidly with the introduction of appropriate disturbance.


## 6. Conclusion

In this paper, a time-delayed fractional order adaptive sliding mode control algorithm for a two-wheel self-balancing vehicle system with input delay is proposed, and the stability of the closed-loop system is proved. The experimental results show that the adaptive sliding mode control algorithm can make the car achieve autonomous balance. When appropriate disturbance is introduced, the vehicle can adjust itself and quickly restore its stable state.The next step in research should be to improve the control algorithm to better control accuracy and robustness of the two-wheel self-balancing vehicle.



---

*Source: 4529131-2020-08-10.xml*