Modeling and Control of Anti-Rolling Gyro System to Stabilize Single-Track Vehicle

Abstrak—Two-wheeled vehicle has many advantages such as small size, more efficient, and more maneuverable. These advantages come at the lack of stability and safety. To improve the stability and safety of a two-wheeled vehicle, the Control Moment Gyroscopic Stabilization is considered. This system is composed to generate counteracting roll stabilizing torque. In this study, the system of gyroscopic stabilizer is simulated and validated to be implemented into a two-wheeled vehicle. Proportional-IntegralDerivative (PID) controller is designed to control the gimbal for generating the balancing torque. The performance of the proposed controller is evaluated through simulation for non-linear cases. The result of the non-linear model confirms a good balance in terms of rapid response.


I. INTRODUCTION
INGLE-track vehicle is physically an unbalance non-linear system. Due to this problem, the system has become an interesting research topic to some technical fields such as system dynamics and control systems. Researchers have been searching for different ways to balance the two-wheeled vehicle. There are some ways to stabilize a two-wheeled vehicle such as steering balancing [1][2][3], moving center of mass [4][5], and gyroscope effect based on Control Moment Gyroscopic (CMG) stabilization [6][7][8]. Gyroscopic balancer produces large torque with fast responses, but it consumes more energy and weight. It consists of a motor-driven rotor and gimbal [8]. The CMG caused the balancing torque that perpendicular to the interaction between the spinning flywheel and the gimbal [9].
Maybe the first single-track gyroscopic vehicle was developed by Louis Brennan [10]. Pyotr Shilovsky implemented a gyroscopic stabilization name mono trackvehicle [11]. Over the last decade, much progress using CMG stabilized single-track vehicle has been performed. Stephen and Anouck derived the mathematic model for both single and double gyro single-track vehicle [8]. They studied the stability of the linearized systems. Chu and Chen proposed the design of the Model Predictive Control (MPC) for a Gyroscopic Inverted Pendulum (GIP) [7]. They achieved the performance control strategies of MPC in three cases: straight running, circular motion, and path following.Thanh and Parnich proposed a structure-specified mixed H2/H∞ controller design using particle swarm optimization (PSO) for balancing gyroscope controlled bicycle [12]. Developed the fuzzy logicbased controller for GIP, and the simulation results indicate that the proposed system works well.
In this study, a single-track vehicle with double gyroscopes is considered. We begin by developing the equation of motion for a double-gyroscope, both flywheels spin in the opposite direction at the same speed, and the precession angles are reverse. We then linearize the model about its equilibrium points. Proportional-Integral-Derivative (PID) controller is proposed to control each gimbal of the flywheels to produce stabilizing torque. Modeling of the gyroscopic two-wheeled vehicle is done using MATLAB/Simulink. Simulations are implemented to check the response and robustness of the proposed controller.
The paper is arranged as follows. Section 2 describes the mathematic model of the linearized gyroscopic two-wheeled vehicle. Section 3 presents the design of the controller using the cascade PID. Section 4 consists of the modeling and validation of the simulation. Finally, the conclusions summarized in Section 5.

II. DYNAMIC MODEL
In this study, the design of the gyroscopic two-wheeled vehicle consists of two brushless DC motor to spin the flywheel and a single DC motor to drive each gimbal by the transmission system.

A. Non-Linear Dynamic Model
For convenience, the gyroscopic two-wheeled vehicle is arranged into three parts: the main body (B), two gimbals (G), and two flywheels (F). As shown in Figure 1, there are four degree-of-freedom functioning as the vehicle angle , two flywheel rotational angles 1 and 2 , and the gimbal rotational angle 1 and 2 driving by a single DC motor. To attain the non-linear model, the Euler-Lagrange approach is considered.
Modeling and Control of Anti-Rolling Gyro System to Stabilize Single-Track Vehicle where = ( , 1 , 2 ) due to the performance of the vehicle and the two gimbals, is the kinetic energy, is the potential energy, and are the external forces. The total kinetic energy and total potential can be expressed as: The kinetic energy of each body can be written as: where is the mass of the main body, are the mass of the gimbal frame,  are the mass of the flywheel,  ,  ,  , , , , and are the mass moment inertia for the main body, gimbal frame, and flywheel ( = 1,2), respectively.
The potential energy of each part of the inverted pendulum can be expressed as the following: where , , and are the height of each part measured from the vehicle's pivot point to the center of gravity. By applying the kinetic energy and potential energy of the system to the Lagrange motion equations, we solve the Lagrange's equation for 1 = , 2 = 1 , and 3 = 2 : where 1 = 0 is the horizontal disturbance, and 2 = 1 and 3 = 2 represented the torque generated for gimbal 1 and gimbal 2.

B. Linearized Model
To simplify the study, the equations of motions are linearized about its equilibrium point. In this study, the equilibrium point of the system is the upright position = 0 and = 0. The angular velocity of the flywheels operated at a constant velocity, thus ̈= 0. The linear models are as follow: ̈1 = 1 where: To drive each gimbal, we attached one DC motor with a transmission system. The shaft motor connected with gear 1 while gear 6 and 7 connected to gimbal 1 and 2 as shown in Figure 2. The reaction force of the subsystem in the transmission system is detailed in the free-body diagram, as shown in Figure 3. The relation force of each gear can be expressed: where are the transmission gear inertia ( = 1, 2, … ,7), are the transmission gear ratio ( = 1, 2, … ,7), ̇ are the acceleration of the transmission gear ( = 1, 2, … ,7), 1 is the contact force between gear 1 and gear 2, 2 is the contact force between gear 2 and gear 3, are the pulley and belt contact  force ( = 1, 2, 3,4), and is the external force exerted on the gear.After combined the relation force of each gear, the full transmission system can be derived as follows: where R 2 /R 3 = 1, R 4 /R 6 = 1.5, R 5 /R 7 = 1.5, R 2 /R 1 = 2.36, and ̇3 =̇2 =̇1/2.36.
Assumed that the angular acceleration of gimbal 1 and 2 is equivalent to each driven gear 6 and 7. Substituted (15)  The input torque generates by the DC motor is requested to turn each gimbal. Therefore, the dynamic of the DC motor is considered. The models of motors are derived as follows:

III. CONTROL DESIGN
The cascade PID control strategy is designed to stabilize the two-wheeled vehicle. PID controller is a control loop feedback mechanism that consists of three basic coefficients proportional (Kp), integral (Ki), and derivative (Kd). Since many control systems using PID controller have proved satisfactory, it still has a wide range of applications in industrial control. The mathematical description of the PID controller is where ( ) is the input signal to the plant model, the error signal ( ) is defined as ( ) = ( ) − ( ), ( ) is the reference input signal, and ( ) is the measurement. In this study, our model has one input and multiple measurement signals. Figure 4 shows the control scheme for the system. Two PID controllers are used to stabilize the two-wheeled vehicle. The outer loop of the PID controller is used to minimize the roll angle . The inner loop is used to control the precession angle by DC motor. The parameters of the outer loop PID are 1 = 2, 1 = 35, and 1 = 3, and the inner loop are 2 = 22, 2 = 0.05, and 2 = 0.05.

IV. SIMULATION RESULT
In this section, we present the simulation results of the gyroscopic two-wheeled vehicle. The parameters of the gyroscopic two-wheeled vehicle are defined in Table 1. Since each angular velocity of the flywheel is constant and spins in the opposite direction, each gimbal is driven in a different direction. In this study, we observe the performance of the designed controller that brings a lean angle of the vehicle at 15 degrees to the equilibrium position. To verify the robustness of the designed controller, the obtained controller is applied to a non-linear model using Simscape Multibody. Figure 5 shows the time response of the vehicle angle and the vehicle angular velocity from an initial position of the vehicle. The design cascade PID controller initially drives each gimbal to produce stabilizing torque. When the vehicle tends to the upright position, the shaft motor still moves because of the numerical tolerance from error signals. After 1s, the vehicle gets to the desired equilibrium point with the steady-state error of 0.11°. Figure 6 illustrates the time response of the shaft motor angle and the shaft motor angular velocity. The numerical error is not absolute zero that why the output controller still gives input to the system. The maximum angular velocity of the motor is about 16 rad/s.

V. CONCLUSION
This paper proposed a method to design and control a gyroscopic two-wheeled vehicle. The mathematical model using the Lagrange equation of motion was derived to descript the behavior of the system. Cascade PID controller is designed to drive the gimbal to generate stabilizing torque. Simulation results show that the non-linear model has a good balance in terms of quick response. However, the motor shaft still rotates due to steady-state error. In the future, we will apply optimal control like LQR to improve the performance of an active stabilizing system for a two-wheeled vehicle.