Research Article  Open Access
Han Xue, Qionglin Fang, Jifeng Zhong, Zheping Shao, " TimeDelayed Fractional Order Adaptive Sliding Mode Control for TwoWheel SelfBalancing Vehicles", Computational Intelligence and Neuroscience, vol. 2020, Article ID 4529131, 12 pages, 2020. https://doi.org/10.1155/2020/4529131
TimeDelayed Fractional Order Adaptive Sliding Mode Control for TwoWheel SelfBalancing Vehicles
Abstract
In this paper, a timedelayed fractional order adaptive sliding mode control algorithm is proposed for a twowheel selfbalancing vehicle system. The closedloop system is proved based on the LyapunovRazumikhin 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 statedependent uncertainties without a prior bound. The twowheel selfbalancing vehicle used in the experiment consists of a gyroscope MPU6050 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 timedelayed 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.
1. Introduction
The movement principle of a twowheel selfbalancing 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, twowheel selfbalancing vehicles are widely used in transportation, rescue, and other fields. They have provided an effective solution to environmental pollution and energy crisis. Twowheel selfbalancing 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 twowheel selfbalancing vehicles include PID, neural network, mode predictive control, 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 TS fuzzy delta operator systems with timevarying 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 closedloop system. The desired DOF controller was designed to guarantee the closedloop system to be asymptotically stable with an induced L2 disturbance attenuation performance. Liu studied the finitetime H∞ control of a fractional order HTGS [2]. Based on the generalized TS fuzzy model, the fractional order fuzzy model of a HTGS was presented. By combining finitetime control and H∞ control theory, a finitetime 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 finitetime convergence of the plant trajectories. Liu proposed an ESObased cascade controller for regulating the oxygen excess ratio of the PEMFC airfeed 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 twowheel selfbalancing robots. Abeygunawardhana proposed a secondorder sliding mode controller based on the disturbance observer [5]. Rafael established a reference model based on a dualrelay 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 twowheel selfbalancing vehicle and designed a sliding mode controller based on Newtonian mechanics. [9] Dai used the sliding mode control to achieve selfbalance and pitch angle control of a doublewheel inverted pendulum robot with friction compensation. [10] Ali used a set of highly coupled nonlinear differential equations to represent the motion model of twowheel selfbalancing robots [11]. Zhou proposed a robust integral sliding mode controller based on bounded system uncertainties with linearization error and input delay [12]. Nasim used backstepping sliding mode to solve the problem of balancing and trajectory tracking of a twowheel balanced mobile robot [13]. Chen proposed a robust tracking control based on a nonlinear disturbance observer for selfbalanced mobile robots with unknown external disturbances [14]. Wang proposed a modelfree 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 timedelay 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 timedelay systems. With the development of variable structure control theory, some research is available on variable structure control of timedelay systems [16, 17]. Roy solved the longstanding problem of consistent stability analysis and control design in continuous time for timedelay 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 timedelay sliding mode control for accurate path tracking of nonholonomic wheeled mobile robots [21].
In this paper, an adaptive timedelay fractional order sliding mode control algorithm is proposed to control the motion of a twowheel selfbalancing vehicle. The stability of the closedloop 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 twowheel selfbalancing 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 timedelay 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 origin . The moving direction of the vehicle is set as the 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 axis. The motion model of the twowheel selfbalancing vehicle is shown in Figure 1.
If we denote as the mass of vehicle, as the mass of wheel, as the radius of wheels, as the distance from the centroid of the vehicle to the origin, as the moment of inertia of the vehicle, as the moment of inertia of wheel, as the angle of inclination of the vehicle, and as the displacement of vehicle, then the kinetic energy of the vehicle is expressed as follows:
The kinetic energy of wheels is
The potential energy of system is given as follows:
The Lagrange function is constructed as follows:
Defining as the control input of the system, we obtain the following using the EulerLagrange formula:
Substituting (4) into (5), we obtain
Substituting (4) into (6), we obtain
By simplifying and linearizing (6) and (7), we obtain
The state variables are given as follows:
Define
Define the input matrix as follows:
Thus, the state space can be written as follows:
Considering the existence of external disturbance d, the system dynamics can be written as follows:
If we definethen (15) can be written as follows:
3. TimeDelayed 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 RiemannLiouville (RL) fractional differintegral is one of its most common definitions. For a function x that is defined in [t_{0}, t], the RL fractional integrator is defined as follows [22]:where is the fractional order, is the integral variable, and is the gamma function that is defined as follows:
The RL fractional derivative is defined as follows:where and is a positive integer near .
3.2. The Proposed Algorithm
Let be the desired state and be the state error:
Then, the following sliding mode surface function can be constructed:where .
Taking the derivative of formula (23) yields
Substituting (22) into (24), one can obtain
Substituting (21) into (25), one can obtain
Denote h 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:
The adaptive control law is constructed as follows:
The switching gain satisfieswhere .
3.3. Stability Analysis
Theorem 1. Based on the Lyapunov’s stability theory, considering the kinematics equation (14) of a twowheel selfbalancing 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. DefineConstruct a LyapunovKrasovsky functional as follows:where .
Taking the derivative of formula (33), one can obtainSubstituting (26) into (34), one can obtainSubstituting (28) into (35), one can obtainThe approximation error is assumed to be bounded bywhere .
Substituting (29) into (34), one can obtainSubstituting (30) and (31) into (38), one can obtainSubstituting (37) into (39), one can obtainUsing the definition of in (33), condition (40) can be simplified to the following:where .
It can be deduced that when , .
V(E, t) will enter inside the ball in a finite time. From (41), it can be deduced that selecting small can reduce the size of the ball.
Therefore,Based on the Lyapunov stability theory, 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 index J is defined as follows: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 twowheel selfbalancing vehicles with input delay, the main parameters of the twowheel selfbalancing vehicle used for testing are listed in Table 1.

4.2. Simulation Results
The experiments were carried out on Intel (R) Core (TM) i34150T CPU @ 3.00 GHz 3.00 GHz, a 64bit operating system with 4.00 GB memory and an x64based 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.
Figure 2 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.
(a)
(b)
Figure 3 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.
(a)
(b)
Figure 4 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.
(a)
(b)
Figures 2–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.
Figure 5 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.
(a)
(b)
Figure 6 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.
(a)
(b)
Figure 7 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.
(a)
(b)
Figures 5–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, set d = 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.
(a)
(b)
Figure 9 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.
(a)
(b)
Figure 10 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.
(a)
(b)
Figures 8–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 MPU6050 and accelerometer constituted a vehicle attitude detection device for a twowheel selfbalancing 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, humancomputer 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. Figure 11 is a photo of the twowheel selfbalancing 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.
Figure 12 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/s^{2}.
Figure 13 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 14 shows acceleration, rotation angular velocity, and filtering curve. The horizontal axis represents time in seconds. The red line represents the acceleration in m/s^{2}. The green line represents the angular velocity in °/s. The blue line represents the Klaman filtered acceleration in m/s^{2}.
Figures 12 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 timedelayed fractional order adaptive sliding mode control algorithm for a twowheel selfbalancing vehicle system with input delay is proposed, and the stability of the closedloop 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 twowheel selfbalancing vehicle.
Data Availability
All data, models, or codes generated or used during the study are available from the corresponding author by request. Most data and models generated or used during the study appear in the submitted article.
Conflicts of Interest
The authors declare that they have no financial and personal relationships with other people or organizations that can inappropriately influence this work. There is no professional or other personal interest of any nature or kind in any product, service, and company that could be construed as influencing the position presented in the manuscript.
Acknowledgments
This work was supported by the Fujian Provincial Natural Science Foundation Projects (2018J05085) and the high level research and cultivation fund of transportation engineering discipline in Jimei University (202003).
References
 H. Li, Y. Gao, P. Shi, X. Zhao, and X. Zhao, “Outputfeedback control for TS fuzzy delta operator systems with timevarying delays via an inputoutput approach,” IEEE Transactions on Fuzzy Systems, vol. 23, no. 4, pp. 1100–1112, 2015. View at: Publisher Site  Google Scholar
 L. Liu, B. Wang, S. Wang, Y. Chen, T. Hayat, and F. E. Alsaadi, “Finitetime Hinfinity control of a fractionalorder hydraulic turbine governing system,” IEEE Access, vol. 6, pp. 57507–57517, 2018. View at: Publisher Site  Google Scholar
 Y. Gao, J. Liu, G. Sun, M. Liu, and L. Wu, “Fault deviation estimation and integral sliding mode control design for Lipschitz nonlinear systems,” Systems & Control Letters, vol. 123, pp. 8–15, 2019. View at: Publisher Site  Google Scholar
 J. Liu, Y. Gao, X. Su, M. Wack, and L. Wu, “Disturbanceobserverbased control for air management of PEM fuel cell systems via sliding mode technique,” IEEE Transactions on Control Systems Technology, vol. 27, no. 3, pp. 1129–1138, 2019. View at: Publisher Site  Google Scholar
 P. K. W. Abeygunawardhana, M. Defoort, and T. Murakami, “Selfsustaining control of twowheel mobile manipulator using sliding mode control,” in Proceedings of the 11th IEEE International Workshop on Advanced Motion Control, pp. 792–797, March 2010, Nagaoka, Japan. View at: Publisher Site  Google Scholar
 R. Iriarte, L. T. Aguilar, and L. Fridman, “Second order sliding mode tracking controller for inertia wheel pendulum,” Journal of the Franklin Institute, vol. 350, no. 1, pp. 92–106, 2013. View at: Publisher Site  Google Scholar
 Z.Q. Guo, J.X. Xu, and T. H. Lee, “Design and implementation of a new sliding mode controller on an underactuated wheeled inverted pendulum,” Journal of the Franklin Institute, vol. 351, no. 4, pp. 2261–2282, 2014. View at: Publisher Site  Google Scholar
 M. Yue, X. Wei, and Z. Li, “Adaptive slidingmode control for twowheeled inverted pendulum vehicle based on zerodynamics theory,” Nonlinear Dynamics, vol. 76, no. 1, pp. 459–471, 2014. View at: Publisher Site  Google Scholar
 L. Li, Design and Application of Sliding Mode Variable Structure Control for TwoWheeled SelfBalancing Vehicle System, Wuhan University of Science and Technology, Wuhan, China, 2015.
 F. Dai, X. Gao, S. Jiang, W. Guo, and Y. Liu, “A twowheeled inverted pendulum robot with friction compensation,” Mechatronics, vol. 30, pp. 116–125, 2015. View at: Publisher Site  Google Scholar
 A. Ghaffari, A. Shariati, A. H. Shamekhi, and Shamekhi, “A modified dynamical formulation for twowheeled selfbalancing robots,” Nonlinear Dynamics, vol. 83, no. 12, pp. 217–230, 2016. View at: Publisher Site  Google Scholar
 Y. Zhou and Z. Wang, “Robust motion control of a twowheeled inverted pendulum with an input delay based on optimal integral sliding mode manifold,” Nonlinear Dynamics, vol. 85, no. 3, pp. 2065–2074, 2016. View at: Publisher Site  Google Scholar
 N. Esmaeili, A. Alfi, and H. Khosravi, “Balancing and trajectory tracking of twowheeled mobile robot using backstepping sliding mode control: design and experiments,” Journal of Intelligent & Robotic Systems, vol. 87, no. 34, pp. 601–613, 2017. View at: Publisher Site  Google Scholar
 M. Chen, “Robust tracking control for selfbalancing mobile robots using disturbance observer,” IEEE/CAA Journal of Automatica Sinica, vol. 4, no. 3, pp. 458–465, 2017. View at: Publisher Site  Google Scholar
 H. P. Wang, G. I. Y. Mustafa, and Y. Tian, “Modelfree fractionalorder sliding mode control for an active vehicle suspension system,” Advances in Engineering Software, vol. 115, pp. 452–461, 2018. View at: Publisher Site  Google Scholar
 Y. Wang, K. Zhu, F. Yan, and B. Chen, “Adaptive supertwisting nonsingular fast terminal sliding mode control for cabledriven manipulators using timedelay estimation,” Advances in Engineering Software, vol. 128, pp. 113–124, 2019. View at: Publisher Site  Google Scholar
 Y. Zhao, J. Wang, F. Yan, and Y. Shen, “Adaptive sliding mode faulttolerant control for type2 fuzzy systems with distributed delays,” Information Sciences, vol. 473, pp. 227–238, 2019. View at: Publisher Site  Google Scholar
 S. Roy, J. Lee, and S. Baldi, “A new continuoustime stability perspective of timedelay control: introducing a statedependent upper bound structure,” IEEE Control Systems Letters, vol. 3, no. 2, pp. 475–480, 2019. View at: Publisher Site  Google Scholar
 S. Roy, S. Baldi, M. Leonid, and Fridman, “On adaptive sliding mode control without a priori bounded uncertainty,” Automatica, vol. 111, Article ID 108650, 2020. View at: Publisher Site  Google Scholar
 S. Roy, S. B. Roy, J. Lee, and S. Baldi, “Overcoming the underestimation and overestimation problems in adaptive sliding mode control,” IEEE/ASME Transactions on Mechatronics, vol. 24, no. 5, pp. 2031–2039, 2019. View at: Publisher Site  Google Scholar
 S. Roy, S. Nandy, R. Ray, and S. Nath Shome, “Time delay sliding mode control of nonholonomic wheeled mobile robot: experimental validation,” in Proceedings of the 2014 IEEE International conference on robotics & automation (ICRA), pp. 2886–2892, Hong Kong, China, May 2014. View at: Publisher Site  Google Scholar
 J. K. Hale, Theory of Functional Differential Equation, SpringerVerlag, Berlin, Germany, 1977.
Copyright
Copyright © 2020 Han Xue et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.