Trajectory Design and Tracking Control for Nonlinear Underactuated Wheeled Inverted Pendulum

1 School of Mathematics and Statistics, Linyi University, Linyi, Shandong 276005, China 2School of Automation and Electrical Engineering, Linyi University, Linyi, Shandong 276005, China 3School of Engineering, Tokyo University of Technology, Hachioji, Tokyo 192-0982, Japan 4Key Laboratory of Complex Systems and Intelligent Computing in Universities of Shandong, Linyi, Shandong 276000, China 5School of Automation, China University of Geosciences, Wuhan, Hubei 430074, China


Introduction
There are many complex dynamic systems in nature.The nonlinear system is an important type of natural system.Since this kind of system can more accurately reflect the essential characteristics of natural systems, they have been attracting more and more attention in the past few decades.Researchers have carried out intensively study on the dynamic analysis and control problem for the nonlinear systems [1][2][3][4][5][6][7][8].
Recently, the control of the nonlinear underactuated mechanical system (UMS) is a hot issue in the engineering area.A UMS has fewer actuators than degrees of freedom (DOF) [9].There are many examples of the UMS in our daily life.Those include a surface vessel [10], a VTOL aircraft [11], a bridge crane [12], an underwater vehicle [13], and a helicopter [14].The reduction of actuators makes the UMS have light weight, low energy consumption, flexible movement, and other features.It has wide application prospects in many fields.
However, the control problems presented by the UMS are not easy to solve because of the following two reasons.First, the UMS usually has complex nonlinear dynamics and does not be strict feedback linearized [15].Second, the UMS has nonholonomic constraints due to the reduction of actuators [16].This means that the state variables of UMS are located in an uncontrollable manifold in the configuration space.The control of the UMS is a challenging problem in the nonlinear control area.
In order to conveniently study the control theory of the UMS, some experimental models of the UMS have been built in a lab environment (e.g., Acrobot [17], Furuta pendulum [18], Beam-ball [19], and TORA [20]).Based on these models, many nonlinear control methods have been developed, for example, an equivalent input disturbance (EID) method in [21], an energy-based and nonsmooth Lyapunov function method in [22], a reduced-order control method in [23], and a PID passivity-based method in [24].
An underactuated wheeled inverted pendulum (UWIP) is a recent presented lab model of the UMS [25].This mechanical system has a wheel and an inverted pendulum (see Figure 1).An actuator drives the wheel to move in a horizontal plane.And the inverted pendulum can freely rotate in a vertical plane.The UWIP is a 2-DOF complex nonlinear system that is not strict feedback linearizable.It has a second-order nonholonomic constraint and has an uncontrollable passive DOF.All these make the motion control of the UWIP system be difficult to solve.So far, there are no research results about the motion planning of the system.This inspires the study in this paper.We solve this difficult problem in this study.First, the dynamic properties of the UWIP system are analyzed.Based on these properties, a method of constructing a motion trajectory for this mechanical system is developed.The trajectory starts from the straight-down equilibrium point and ends at the straight-up equilibrium point.After that, a tracking control law is designed to quickly track the constructed trajectory.This enables the stabilizing control of the UWIP between two equilibrium points to be achieved along a reference trajectory.Compared to a local stabilizing control method for the UWIP in [25], our presented strategy uses a single control law to achieve the stabilizing control of the UWIP in its whole motion space.Moreover, we can predict the movement process and transient characteristics of the UWIP in advance.It is very useful to guarantee the operation of the control system to be safe.The validity of the theoretical results is demonstrated by numerical simulation experiment.

Model of Underactuated Wheeled Inverted Pendulum
The model of the UWIP is shown in Figure 1, where  1 ,  1 ,  1 , and  1 () are the mass, the moment of inertia, the radius, and the rotational angle of the wheel, respectively;  2 ,  2 ,  2 , and  2 () are the mass, the moment of inertia, the distance from the endpoint to the center of mass, and the rotational angle of the pendulum, respectively; () is the input torque applied on the wheel;  = 9.80665 / 2 is the gravitational acceleration.
It follows from the derivations in [25] that the kinetic and potential energy of the UWIP system is where The Euler-Lagrange motion equations of the system are where (, θ ) = (, θ )−() is the Lagrangian of the system.Equation ( 3) is equivalent to The state variables of (4) are selected to be This gives the state-space form of (4) as

Dynamic Properties of the UWIP System
The UWIP system (6) has the following dynamic properties.
Theorem 1.If the control law for ( 6) is designed to be then the closed-loop control system has two equilibrium points where  and  * 1 are constants.Moreover,  *  is a stable equilibrium point while  *  is not.
Proof.Substituting ( 7) into ( 6) yields the closed-loop control system The equilibrium points of the system (9) satisfy It follows from ( 5) and ( 10) that  3 () =  4 () = 0,  1 () =  * 1 , and sin  2 () = 0.By considering the fact that  2 () =  2 () is a cyclic variable with a period 2, it is easy to get  2 () = 0 or  from sin  2 () = 0. So, the equilibrium points of the closedloop control system are  *  and  *  .In order to determine the stability of the equilibrium points  *  and  *  , we approximately linearize the nonlinear system (9) around them.It gives the following two approximate linearization matrices: Both  *  and  *  have the same form where   ( = 3, 4,  = 2, 3) are constants.The characteristic polynomial of the matrix  * is where  is a variable symbol and  4 is a 4×4 identity matrix.By using Routh-Hurwitz stability criterion [26], it is not difficult to obtain the stability conditions for  * as Since   > 0 ( = 1, 2, 3, 4) and  1  3 −  2 2 > 0, a simple verification gives that  *  satisfies ( 14) and  *  does not.So, the equilibrium point  *  is stable and  *  is unstable.The proof is completed.
The above analysis results tell us that  3 () =  4 () = 0 and sin  2 () = 0 from V() = 0.By using LaSalle's theorem [15], we know that the closed-loop control system (6) and (7) asymptotically converges to the largest invariant set in Since  *  is an unstable equilibrium point of the closed-loop system ( 6) and (7), the system asymptotically converges to  *  when  * 0 ̸ =  *  .The proof is completed.
Remark 3. The point  *  means that the pendulum of the UWIP is stabilized at the straight-up position while the wheel does not spin.Similarly, the meaning of  *  is that the pendulum is stabilized at the straight-down position while the wheel does not spin.The physical models of  *  and  *  are shown in Figure 2. Note that  3 () = θ 1 () is the velocity variable of the wheel.So, the control law () designed in (7) can be considered as a virtual friction torque for the UWIP system.Under the operation of this torque, the UWIP asymptotically converges to  *  from any initial position  * 0 ̸ =  *  .This property will be used to design a trajectory for the UWIP in its whole motion space below.

Design of Motion Trajectory
In this section, a motion trajectory of the UWIP between the equilibrium points  *  and  *  is designed.The design process of the trajectory has the following three steps.
Step 1.The initial condition of the closed-loop system ( 6) and ( 7) is selected to be where  > 0 is a very small constant.The physical meaning for (22) is that the UWIP starts to move from the position  *  with a small velocity in the wheel.Since  * 0 ̸ =  *  , it follows from the Theorem 2 that the UWIP asymptotically converges to the equilibrium point  *  .This motion trajectory and its accompanied control input are denoted to be where  is the stabilization time that is defined to be Equation ( 24) means that   () =  *  approximately holds when  ≥ .
Step 3. Since the constant  is very small, x * 0 is very close to the equilibrium point  *  .It enables us to introduce a time period Δ and to define The diagram of the trajectory   () is shown in Figure 3.Note that   () is a motion trajectory of the UWIP between the equilibrium points  *  and  *  .By comparing   () to  *  , we find that the element  3 () in   () suffers from a very small step change at  = .Furthermore, it is not difficult to verify that   () and   () also satisfy (6) because   () and   () satisfy (6).

Design of Tracking Control Law
The design of tracking control law for the trajectory   () is concerned in this section.Denote the error variables to be From ( 6), we get the nonlinear error dynamic equations as where In order to make the UWIP track the trajectory   (), we need to design a stabilizing control law () for (30) such that () converges to the origin quickly.Note that (30) is a complex nonlinear control system for ().An approximate linearization method is used to design the stabilizing control law here.Linearizing (30) around () = 0 gives the following linear approximation model: where ,  1 () = ẋ 4 () sin  2 () +  2 4 () cos  2 () ,  2 () =  2 ẋ 3 () sin  2 () +  4 cos  2 () .has a positive definite solution (), where  ∈ R 4×4 is a positive definite matrix and  is a positive constant.Based on the quadratic optimal control theory, the control law stabilizes the error dynamic equation (32) at the origin quickly.As a result, the control law () = () +   () enables the UWIP quickly to track the trajectory   ().This guarantees the control objective of swing the UWIP up from  *  and stabilizing it at  *  to be achieved.

Numerical Example
This section presents a numerical example to verify the validity of the above theoretical analysis results.
The physical parameters of the UWIP in [25] were chosen for simulations And the parameters in (7) and (22) were selected to be  = 0.25,  * 1 = 0,  = 0.001. (37) The sampling period for simulations was chosen to be 0.001 s.From the design process in Step 1 of Section 4, we got the trajectory   () (see Figure 4).The simulation result shows that the UWIP starts to move from the position  * 0 in (22) and is stabilized at the position  *  in (8).The stabilizing motion process of the UWIP is smooth.And the stabilization time is  = 10 s.This demonstrates the effectiveness of the Theorem 2.
The time period Δ in (28) was taken to be 1 s.From the design process in Steps 2 and 3 of Section 4, the trajectory   () was obtained in Figure 5 based on   (), (25), and (28).The simulation results in Figure 5 show that   () is a motion trajectory of the UWIP from  *  to  *  .To design a control law of tracking this trajectory, the parameters in (34) were chosen to be  = 0.5 4 and  = 5.And the MATLAB function  was used to solve (34).The tracking control results for the desired trajectory   () are shown in Figure 6.Note that the UWIP quickly and exactly tracks the   () by the operation of our designed tracking control law.As a result, the stabilizing control of the UWIP from  *  to  *  is achieved along the trajectory   ().In order to show the applicability of the presented strategy under realistic conditions, its robustness needs to be verified.To do that, we took the parameter  1 to be 5% smaller and  2 to be 5% larger than their nominal values, added white noise disturbances to the measured variable (peak value: ±0.1), and set the saturation range of input to be [-3.5, 3].Simulation results show that our developed method is still effective in that case (see Figure 7).

Conclusion
This paper addressed the trajectory design and tracking control problems for an underactuated wheeled inverted pendulum (UWIP).A new motion planning strategy was developed for this underactuated system.First, the dynamic properties of the UWIP system were analyzed.And then, the analysis properties were used to construct a trajectory of the UWIP between two equilibrium points.After that, a control law was designed to make the UWIP track the constructed trajectory.This ensured the motion control of the UWIP between two equilibrium points to be achieved.Finally, numerical simulation results demonstrated the validity of our theoretical results.In the future, we will further explore how to extend the main idea of our presented method to the control of other nonlinear systems.

Figure 6 :
Figure 6: Tracking control of the UWIP for the trajectory   ().

Figure 7 :
Figure 7: Simulation results of tracking   () when considering parameter uncertainties, external disturbances, and input saturation.