Control of Different-Axis Two-Wheeled Self-Balancing Vehicles

This paper investigates the controls of straight running and turning of a different-axis two-wheeled self-balancing (DATWSB) vehicle. The inverted pendulum system (IPS) with gyroscopic effect is used to describe the uncertainty caused by the working conditions. Based on the generalized coordinate systems, the nonlinear mathematical model of the IPS is established according to Lagrange equation. The sliding mode controller (SMC) and adaptive sliding mode controller (ASMC) are respectively designed to control the system, in which the roll angle feedback is used. The simulation results of three models with/without the controllers are presented, which indicate that the ASMC can make the IPS recover upright faster in straight running, and better achieve the desired roll angle in turning compared with the SMC. Bikesim, a commercial software, is used to build a two-wheeled vehicle model with self-balancing function in combination with Matlab/Simulink. The results show that the ASMC can guarantee the anti-interference and turning abilities of the DATWSB vehicle.


I. INTRODUCTION
In recent years, two-wheeled self-balancing (TWSB) vehicles have begun to be welcomed by more and more green-travel enthusiasts because they are not only energy-saving and environmentally friendly, but also have the advantages of simple structure, flexible operation, and portability [1].
In 1986, Yamato Gaoqiao, professor of Tokyo Electric Communication University, designed a small electric vehicle with two wheels placed left and right, due to the limitation of sensor technology and computer technology at that time, the self-balance control effect of this vehicle was not good, so it had not received much attention [2]. In 2002, the first real TWSB vehicle in the world, Segway, was successfully produced [3]. And a concept TWSB vehicle called PUMA, which added two traditional car seats compared with the Segway, was successfully developed in 2009. With the popularization of coaxial TWSB vehicles, people began to transfer their inspiration to TWSB vehicles with two wheels placed front The associate editor coordinating the review of this manuscript and approving it for publication was Feiqi Deng . and rear. In 2012, the first DATWSB electric vehicle named Lit Motors C1 was born in the world.
Up to now, there are two kinds of the TWSB vehicle, one is the coaxial TWSB vehicle with two wheels placed left and right (shown in Fig. 1), the other is DATWSB vehicle with two wheels placed front and rear (shown in Fig. 2). At the same time, many researchers are devoted to the stability analysis and control of the coaxial TWSB vehicles.
Various control methods, such as the closed-loop PID, fuzzy PID, linear feedback control (LFC) and adaptive control, were used in the control of TWSB vehicles. A lowcost hardware platform was developed and the closed-loop PID controllers were designed to maintain the balance of the TWSB vehicle [4]. Authors in [5] designed a double closed-loop PD controller to stabilize the tilt angle of the TWSB vehicle model, but the classical input-output feedback cannot eliminate the influence of the coupling term, and cannot effectively control the precession angle back to zero. A fuzzy PID algorithm was designed to realize the self-balancing of a TWSB vehicle. The PID parameters were estimated by the fuzzy algorithm, and the cross entropy optimization method was used to optimize the parameters  of the fuzzy controller. The simulation results showed that the performance of fuzzy PID was better than that of the traditional LFC [6].
The displacement and velocity of the TWSB vehicle as the input variables were controlled by fuzzy PD controller, and the PD controller was designed to control the tilt angle and angular velocity, the simulation results showed that the system had good robustness [7]. LFC was used to track the TWSB vehicle's path and reduce the vibration, which can effectively maintain the vehicle's stability in straight-line driving, turning and climbing [8]. In addition, Yang C et al.
proposed an optimized adaptive control to realize the trajectory tracking of TWSB vehicles [9]. Petrov proposed an adaptive motion controller to realize the self-balancing control and turning control of TWSB vehicles [10]. The authors in [11] proposed an adaptive inversion control algorithm and the anti-interference performance of the TWSB vehicle was verified by simulation. In [12], an incremental PID algorithm was used to form a closed-loop control system for TWSB vehicles, and a Kalman filter was used to compensate for the disadvantage of the instability of the accelerometer output and the drift of the gyroscope during the motion. Literature [13] proposed a common Actor-Critic algorithm, composed of an adaptive search network and an adaptive review network, to control TWSB vehicles in continuous domain. However, the above mentioned methods were based on accurate mathematical models, which were lack of robustness to model errors and external disturbances.
Two sliding mode controllers (SMCs) were proposed for the coaxial TWSB vehicle, and simulation results verified that the controller can guarantee the effectiveness and robustness of the balance control and the speed tracking control [14]. The trajectory tracking control of the coaxial TWSB vehicle was realized by the SMC, and its parameters were estimated adaptively to improve the anti-interference performance of the system [15]. A SMC was used in the balance control for the coaxial TWSB vehicle, a nonlinear coupling term was added to the mathematical model, the simulation results showed that the controller had better trajectory tracking ability than the controller derived from the traditional system equation [16].
In summary, the aforementioned researches focused on the modeling and control of the coaxial TWSB vehicles and aiming to control them to achieve balances. However, the DATWSB vehicles can take at least two persons, and more importantly, they have closed bodies. Furthermore, they have the advantages of portability, long battery life and good acceleration performance, etc., compared with four-wheeled vehicles. Therefore, it is necessary to use the DATWSB vehicles as a convenient transportation for people instead of the bulky four-wheel vehicles in special areas. However, the research on DATWSB vehicles had not been reported in the literatures.
In fact, the working principles of coaxial TWSB vehicles and DATWSB vehicles are quite different from each other. For the former, the upright under impact disturbances when the vehicle goes straight and the steering of the vehicle are controlled by the acceleration and differential speed of the wheels, respectively. However, for the latter, they are controlled by the precession of the gyroscopes. In addition, a DATWSB vehicle requires a stable roll angle under the centrifugal force of turning. In this study, the gyroscopic effect is applied to design an assistant system for DATWSB vehicles that can actively stabilize the vehicle in cases with and without centrifugal forces.
The innovations of this paper are as follows: (1) The research object is the DATWSB vehicle with two gyroscopes, which is quite different from the coaxial TWSB vehicle widely studied at present; (2) In the process of dynamic modeling, the DATWSB vehicle with gyroscopes is simplified to an IPS with gyroscope effect, and Lagrange equation is used to carry out the mathematical modeling; (3) Considering the nonlinearity, parameter uncertainty and disturbance of the system, the SMC and adaptive sliding mode controller (ASMC) are designed to control the balances of the DATWSB vehicle in straight running and turning; (4) The SMC and ASMC of the DATWSB vehicles are simulated, and the response curve, required effective torque and robustness are compared; (5) Combined with Bikesim and Matlab/Simulink, a TWSB vehicle model is established. The straight running and turning conditions of the vehicle are The organizational structure of this paper is as follows: Section I is the introduction, which is also a summary of the current research status of the DATWSB vehicles. The working principle of a DATWSB vehicle is introduced, and the reasonable simplified system is modeled in Section II. Section III states the problems. The SMC and ASMC are designed in Section IV. In Section V, the control effect of ASMC is compared with that of SMC, and the experimental results are presented. Section VI puts forward the conclusion.

II. VEHICLE MODELS
In this section, we will first analyze the working principle of a DATWSB vehicle with two gyroscopes, and then simplify it into an IPS with gyroscope effect. Finally, we establish kinematic coordinate systems and derive the vehicle's dynamic model according to the Lagrange equation.

A. WORKING PRINCIPLE
The self-balance function of a DATWSB vehicle is realized by two gyroscopes with gyroscopic effect. As shown in Fig. 3, the two gyroscopes are respectively carried by the two gimbal frames, which are fixed on the chassis of the vehicle. Therefore, when the gimbal frames are rotated by the two DC motors, the gyroscopes will rotate the same angles, β 1 and β 2 . There are other two motors used to power the gyroscopes to rotate at angular velocities,φ 1 andφ 2 . These four DC motors are not shown in Fig. 3.
For a single gyroscope, take the right gyroscope in Fig. 3 as an example (shown in Fig. 4), when the precession angular velocityβ is controlled by the DC motor, a torque will generate along the x axis and its direction and magnitude can be defined as: where I is the mass moment of inertia. At the precession angle β, the generated torques around the horizontal and vertical axes are:  where T H is the torque that can help stabilize the vehicle in the horizontal axis, T V is the torque that may cause the yaw motion of the vehicle in the vertical axis. In order to maximize the effective torque in the horizontal axis, the two gyroscopes rotate in the opposite direction at the same speed. Therefore, the torques on the vertical axis of two gyroscopes will cancel each other, and the maximum effective torque acting on the vehicle body is the sum of each gyroscope, which can be expressed as: It can be concluded from (4) that with the increase ofφ 1 anḋ ϕ 2 , the gyroscopes will be able to generate a larger reaction torque. This means that the DATWSB vehicle can achieve stability under a larger initial tilt angle or in the presence of larger disturbances.

B. DYNAMIC MODLE
Assuming that the wheels of the DATWSB vehicle are rolling discs with point contact on the road surface where has no longitudinal or lateral sliding, the body roll angle is fixed at a constant value, α, the vehicle can be simplified into an IPS with gyroscope effect as shown in Fig. 5.
There are four coordinate systems, where the (O-XYZ) fixed on the ground is the reference coordinate system, the VOLUME 8, 2020 is mounted on the inverted pendulum at the point O, and the (o-x gi y gi z gi ) (i = 1, 2) on the gimbal's revolute jionts o gi (i = 1, 2), respectively. For the (o-x b y b z b ), it can be referred to as the position after the (O-XYZ) rotated by α angle around the X axis. The cosine matrix corresponding to the rotation is: And for the (o-x g1 y g1 z g1 ) and (o-x g2 y g2 z g2 ), both of them can be regarded as the coordinate systems after the (o-x b y b z b ) rotated by β 1 and β 2 about the y b axis, and the z g1 and z g2 axes are the rotation axes of gyroscopes. The cosine matrix corresponding to the rotation is: The angular velocities of the inverted pendulum, gimbal frames and gyroscopes, ω b , ω gi , and ω fi (i = 1, 2), can be expressed as The linear velocities of the inverted pendulum, gimbal frames, and gyroscopes are calculated as The kinetic energy of the IPS is the sum of linear and rotational kinetic energy of each part. According to (7) - (12), it can be obtained by where b, g i and f i (i = 1, 2) are the centroids of the inverted pendulum, gimbal frames and gyroscopes, respectively; h b , h gi and g fi (i = 1, 2) are the centroid heights of the three parts from the ground, respectively; m b , m gi , and m fi (i = 1, 2) are the masses of the inverted pendulum, gimbal frames and gyroscopes, respectively; and I bx is the moment of inertia of the inverted pendulum about the X axis, I gix , I giy , I giz (i = 1, 2) are the moment of inertia of the ist gimbal frame about the x gi , y gi , and z gi axes, respectively; and ω gix , ω giy , and ω giz (i = 1, 2) are the components of the angular velocity of the ist gimbal frame along the x gi , y gi , and z gi axes, respectively; I fix , I fiy , I fiz (i = 1, 2) are the moments of inertia of the ist gyroscope about the x fi , y fi , and z fi axes, respectively; and ω fix , ω fiy , and ω fiz (i = 1, 2) are the components of the ist gyroscope's angular velocity along the x fi , y fi , and z fi axes, respectively. The total potential energy of the system can be expressed as where U b , U gi and U fi (i = 1, 2) are the potential energy of the inverted pendulum, gimbal frames and gyroscopes, respectively.
By applying the Lagrange equation for (16) and (17), the mathematical model of the system can be obtained.
where L is a Lagrange function and is the generalized force corresponding to each generalized coordinate.
Then L can be expressed as Lagrange's equation about α, β i can be expressed as Bring (19) into (20) and (21), we can get the acceleration of vehicle body inclination and gyroscope precession angles β 1 = I f 1zαφ1 cos β 1 + I g1z + I f 1z α 2 sin β 1 cos β 1 − I g1x + I f 1x α 2 sin β 1 cos β 1 / I g1y + I f 1y (23) It can be seen from (22) that the precession motions of gyroscopes play an important role in upright stability of the DATWSB vehicle.

III. PROBLEM FORMULATION
Due to the gyroscopic effect, the IPS equipped with double gyroscopes can have a certain anti-interference ability. However, the ability is too limited. When the external moment acting on the IPS is large, the sum of the effective moments generated by the two gyroscopes on the horizontal axis will not be enough to ensure the balance of the IPS. In addition, when the DATWSB vehicle is turning, it is necessary to keep the roll angle stable. Therefore, an extra controller should be used.
The IPS is an unstable, multivariable and coupled system, which is also affected by a series of factors such as the nonlinearity, parameter uncertainty and un-modeled dynamics. For this reason, a SMC, which is not sensitive to the unmodeled dynamics and noise disturbances, is designed to stabilize the vehicle in cases with and without centrifugal forces. In addition, an ASMC algorithm is also proposed to compare with the SMC. The diagram of control design is depicted in Fig. 6.

IV. CONTROLLER DESIGN
Considering SMC is not sensitive to the parameter changes and noise disturbances, it may be a more appropriate method to deal with the uncertain TWSB vehicle system. In this section, SMC and ASMC are designed to make the IPS have the anti-interference ability and steering ability.

A. DESIGN OF SMC
The two gyroscopes on the IPS, which have the same parameters and rotate the same angle in the opposite direction around their vertical axes, aim to produce the maximum effective torque.
Define ϕ = ϕ 1 = ϕ 2 , after the linearization of (22), the following can be obtained can be expressed by the following state space model.
Hence, the roll angle can be expressed as Define the state error between the actual roll angle and its ideal one as To determine the gain of the SMC, the following surface equation is considered where c 1 > 0. The derivative of the surface equation can be expressed aṡ we can get The system will be globally asymptotically stable when the following reachability condition is satisfied.
Therefore, the following selected control gains [17] will satisfy the reachability condition and guarantee conditions.

B. DESIGN OF ASMC
Adaptive control is a control method which can modify its own characteristics to adapt to the dynamic characteristics of the object and disturbance. Robust control means that the control system can maintain some performance characteristics under certain parameter perturbation. By using adaptive robust sliding mode control method, the control system can achieve better performance. Define u =β 1 , we can rewrite (27) as In order to realize the adaptive control without physical model, the physical parameters are arranged according to the following formula Then (35) can be expressed as It can be seen that the physical parameters of the IPS are included in φ 1 and φ 2 . Let x 1 = α, x 2 =α and the disturbance be dt, then (37) can be described as The error state e 2 between the actual value of the roll angle and its ideal one can be expressed as and the sliding mode function is where c 2 is a positive number. The Lyapunov function can be expressed as where γ i > 0, andφ i is the estimate of φ i . Then, Let V 1 = φ 1 s 2ṡ2 , the following equation can be obtaineḋ The control law can be designed as Submit (44) into (43), we can geṫ The adaptive law can be designed as According to the LaSalle invariance principle [18], the closed-loop system is asymptotically stable, i.e., when t → ∞, s 2 → 0.

V. RESULT ANALYSIS
In this section, three models, i.e., the IPS without controller, IPS with SMC and IPS with ASMC, are simulated by Matlab/Simulink. Then, the commercial software Bikesim and the Matlab/Simulink are used to establish a DATWSB vehicle model which is consistent with the IPS response for real-time simulation. The parameters involved in the simulation are shown in Table 1. The simulation results are described in the following sections.

A. SIMULATION OF STRAIGHT RUNNING
In this simulation, the IPS without controller, the IPS with SMC and the IPS with ASMC are simulated with the same initial roll angle (5.7 • ), and the simulation results are shown in Fig. 7. Fig. 7(a) shows the roll angles of the three models. It can be seen that the roll angle of the IPS without controller is always 5.7 • , which indicates that the IPS cannot recover upright only under the gyroscopic effect of two gyroscopes, and an additional control is needed to resist the external interference. In fact, the other two curves in Fig. 7(a) show that the roll angle of the IPS with SMC and that of the IPS with ASMC can be restored to zero in a short time, and then always be zero. However, the ASMC can make the IPS stand upright in an even shorter time, which demonstrates that it can guarantee the self-balance performance of the IPS more effectively.
The gimbal angle, corresponding control input and gimbal torque of the three models are illustrated in Figs. 7(b), 7(c), and 7(d).
For the IPS without controller, the gimbal angle grows with straight-line from zero (shown in Fig. 7(b)), the control input fluctuates around 0.1rad/s during this period (shown in Fig. 7(c)), and the gimbal torque generated by the gyroscope effect vibrates around 100Nm and its maximum value is 200Nm (shown in Fig. 7(d)), which is too small to make the IPS stand upright.
For the IPS with SMC, the gimbal angle remains unchanged after increasing from 0 • to 2.3 • (shown in Fig. 7(b)), the control input decreases after increasing to 0.23rad/s, then oscillates around 0rad/s, and remains 0rad/s after 1.4s. (shown in Fig. 7(c)), and the gimbal torque vibrates nearby 0Nm and keeps 0Nm from 1.4s after changing from 0Nm to −500Nm (shown in Fig. 7(d)).
For the IPS with ASMC, the gimbal angle increases from 0 • to 6.4 • , then decreases to 3.9 • and remains constant (shown in Fig. 7(b)), the control input decreases rapidly from 1rad/s to -0.06rad/s, then increases to 0rad/s slowly and remains unchanged (shown in Fig. 7(c)), and the gimbal torque changes from -2000Nm to 125Nm, then decreases gradually and reaches 0Nm after 0.8s (shown in Fig. 7(d)).
From the above analysis, it can be concluded that the control effect of ASMC on the IPS is better because it can produce a larger gimbal torque and make the IPS recover upright faster.
In order to better illustrate the performances of the controllers designed, three models with a larger initial roll angle (28.7 • ) are also simulated. Fig. 8 shows the results of the three models. Fig. 8(a) is the roll angle curves of the three models, and it can be concluded that when there is no controller applied, the roll angle of the IPS remains unchanged at 28.7 • in 2s, the reason is that the gimbal torque produced by the precession of gyroscopes is not large enough to restore the IPS to upright position. Therefore, an additional controller is needed to resist the external interference. From the other two curves in Fig. 8(a), it can be seen that under the actions of SMC and ASMC, the roll angles of the IPSs can be restored to zero within 2s, and then remain unchanged, which indicates that the controllers designed can effectively guarantee the self-balance performance of the IPS even when the initial roll angle is increased. However, the control time of the IPS with SMC is relatively longer. Therefore, the ASMC can effectively improve the anti-interference ability of the IPS.
The gimbal angles β 1 of the three models are shown in Fig. 8(b). It can be concluded that due to the precession of gyroscopes, the gimbal angle of the IPS without controller increases continuously, and those of the other two models maintain constant values after short period of changes. As shown in Fig. 8(c), the control inputs of the IPS with SMC and IPS with ASMC change rapidly at the beginning, then for the IPS with SMC, its control input remains 0rad/s after oscillation around that value, while for the IPS with ASMC, the control input gradually increases from −0.3rad/s to 0rad/s. As shown in Fig. 8(d), the maximum values of gimbal torques for the three models are 960Nm, 2620Nm and 3133Nm, respectively. In fact, the gimbal torque of the IPS without controller is too small to make it stand upright, while those of the IPSs with SMC and ASMC are large enough to resist the disturbance so as to restore the IPS. However, the ASMC can better meet the self-balance requirement of the IPS under different initial roll angles.

B. SIMULATION OF TURNING
When the DATWSB vehicle turns on a curve with a radius, r, and at a certain longitudinal speed, v, it can be considered that the vehicle is performing a circular motion. In this case, the moment balance condition of the vehicle at the point that contacts with the ground can be expressed as In order to make the vehicle turn stably, it is necessary to tilt the vehicle at a roll angle to the inner side of the corner. With this roll angle, the gravitational force becomes the counteracting force to the centrifugal force, which prevents the vehicle from being pulled out of the track.
The centrifugal force, F c , acting on the vehicle is According to (49) and (50), the required reference roll angle expression can be obtained In practical applications, the centrifugal force can be determined by measuring the lateral acceleration with a sensor or by measuring the instantaneous turning radius of the longitudinal velocity using a global positioning system (GPS). Therefore, the centrifugal force and the corresponding reference roll angle α ref can be calculated by (50) and (51).
When the vehicle speed is 25km/h and the turning radius is 57.86m, the centrifugal force acting on the vehicle calculated by (50) is 302.36N, and reference roll angle obtained by (51) is 5 • . At the same speed, the calculated centrifugal force and reference roll angle are respectively 1344.88N and 20.7 • when the turning radius is 13m. The simulation results of the three models under these two turning conditions are shown in Figs. 9 and 10.
When the reference roll angle is 5 • , for the IPS without controller, the roll angle is always 0 • (shown in Fig. 9(a)), which means the IPS doesn't turn at all. And the gimbal angle increases linearly from zero (shown in Fig. 9(b)), the control input oscillates near 0.07rad/s during this period (shown in Fig. 9(c)), the maximum gimbal torque generated by the gyroscope effect is 125Nm (shown in Fig. 9(d)), which cannot make the IPS achieve the ideal turning effect. Therefore, additional controllers are required.
In Fig. 9(a), the roll angle of the IPS with SMC can reach the reference roll angle (5 • ) at 1.5s and then keeps constant, while it only needs about 0.3s to reach the reference roll angle for the IPS with ASMC. For the IPS with SMC, the gimbal angle keeps increasing (shown in Fig. 9(b)), the control input grows from 0rad/s to 0.15rad/s (shown in Fig. 9(c)), and the gimbal torque changes from 0Nm to -300N (shown in Fig. 9(d)). However, for the IPS with ASMC, at the very beginning, the gimbal angle changes greatly (shown in Fig. 9(b)), and then increases uniformly, the control input oscillates around 0.09rad/s after a short period of change (shown in Fig. 9(c)), the maximum gimbal torque acting on the IPS reaches 5681Nm (shown in Fig. 9(d)).
It can be concluded from the above analysis that when the reference roll angle is small, both SMC and ASMC can ensure that the IPS can reach the required roll angle value, while the ASMC can provide a larger torque for the IPS to turn, and the adjusting time needed is shorter. Fig. 10 shows the control results of the three IPSs when the α ref is 20.7 • . Fig. 10(a) is the roll angles of three models, which can be seen that for the IPS without controller, the roll angle is 0 • and unchanged. However, the other two curves in Fig. 10 (a) show that the roll angles of the IPSs with SMC and ASMC can quickly reach 20.7 • and then remain unchanged. Therefore, the designed controllers can effectively ensure the turning function of the IPS when the reference roll angle is large.
In Fig. 10(b), for the IPS without controller, the gimbal angle keeps growing to 33 • from 0 • in 2s, the control input oscillates between 0rad/s and 0.52rad/s (shown in Fig. 10(c)), and the gimbal torque generated by the gyroscope effect is around 500Nm, which is not enough for the IPS to reach the reference roll angle when steering.
For the IPS with ASMC, the variation range of the gimbal angle is larger than that of the IPS with SMC (shown in Fig. 10(b)), and its control input is much larger than that of the IPS with SMC at the beginning (shown in Fig. 10(c)). Finally, the control inputs of the IPSs with SMC and ASMC are 0.6rad/s and 0.4rad/s respectively, and remain unchanged. Fig. 10(d) shows the corresponding gimbal torques. For the IPS with SMC, the gimbal torque changes from 0Nm to -1000Nm in 2s. However, for the IPS with ASMC, the gimbal torque finally becomes -600Nm after the rapid change from 23700Nm to -31500Nm in 0.2s, which is why the roll angle can quickly increase from 0 • to 20.7 • in a short time.
To sum up, when the IPS adopts controllers, the gimbal frame can rotate at a larger angle, and can provide enough torque to ensure that the IPS turns at the reference roll angle. The adjustment time of ASMC in the process of realizing the IPS stable steering is shorter. Therefore, the ASMC has the higher adjustment efficiency.

C. EXPERIMENT OF IPS WITH ASMC
In order to implement and test the designed ASMC, the commercial software Bikesim and Matlab/Simulink are used, and a sports bike is selected as the DATWSB vehicle model, which is called Bikesim model for short. Considering that the function of the two gyroscopes is to produce the gimbal torque to balance the vehicle, we define a roll moment acting on vehicle centroid as the import channel, which can provide the gimbal torque generated by the gyroscopes to the model, and a roll angle as the output channel respectively. When we provide the gimbal torque of the IPS without controller to the Bikesim model, the responses of the IPS model without controller and the Bikesim model without controller with the initial roll angle (5.7 • ) are shown in Fig. 11.
It can be seen from Fig. 11 that the responses of the two models are almost the same, and their maximum offset is only 0.016 • , which shows that the Bikesim model can accurately describe the IPS model and can be used to simulate the realtime dynamic behavior of the system.
Form the aforementioned analysis, we have come to a conclusion that the ASMC has better control effect on the IPS under straight running and turning conditions. Therefore, the Bikesim model with ASMC under the same conditions with the IPS model is carried out to test the designed controller. The control results are shown in Fig. 12.
It can be seen from Figs. 12(a) and 12(b) that when the Bikesim models with different initial roll angles are in straight running, their roll angles can quickly return to 0 • under the control of the ASMC and then remain unchanged. The roll angle curves of the Bikesim models are very close to those of the IPS models, which indicate that the ASMC can ensure the self-balancing function of the DATWSB vehicle in straight running.
Figs 12(c) and 12(d) show the roll angle curves of the two models when the reference roll angle are 5 • and 20.7 • respectively. It can be seen that the roll angles of the Bikesim models with ASMC can quickly increase from 0 • to the reference value and then keep constant, so as to ensure the vehicle can turn steadily. And the results also show that the response of the Bikesim model under the turning condition is the same as that of the IPS model, so the ASMC can effectively guarantee the turning ability of the DATWSB vehicle.

VI. CONCLUSION
In this paper, the controls of straight running and turning of DATWSB vehicles are studied. The DATWSB vehicle is simplified to the IPS with gyroscopic effect, which is modelled by Lagrange equation. Simulation results show that the SMC and ASMC can make the gyroscopes produce larger effective torques to ensure the balance and stability of the IPSs. However, when the vehicle goes straight, the ASMC can make the IPS recover from tilt to upright state faster, and better maintain the balance of the system. When the vehicle is turning, compared with the SMC, the ASMC can make the roll angle of the IPS reach the reference value in a shorter time, which can better ensure the turning requirements of the vehicle. In addition, a DATWSB vehicle model with self-balancing function is established by combining Bikesim and Matlab/Simulink. And the experiment results also show that the ASMC can ensure the anti-interference ability and stable turning ability of the vehicle. In the future, we will make a prototype to further test the control effect of ASMC.