## Mathematical Theories and Applications for Nonlinear Control Systems

View this Special IssueResearch Article | Open Access

Shuli Gong, Ancai Zhang, Jinhua She, Xinghui Zhang, Yuanyuan Liu, "Trajectory Design and Tracking Control for Nonlinear Underactuated Wheeled Inverted Pendulum", *Mathematical Problems in Engineering*, vol. 2018, Article ID 6134764, 10 pages, 2018. https://doi.org/10.1155/2018/6134764

# Trajectory Design and Tracking Control for Nonlinear Underactuated Wheeled Inverted Pendulum

**Academic Editor:**Ju H. Park

#### Abstract

An underactuated wheeled inverted pendulum (UWIP) is a nonlinear mechanical system that has two degrees of freedom and has only one control input. The motion planning problem for this nonlinear system is difficult to solve because of the existence of an uncontrollable manifold in the configuration space. In this paper, we present a method of designing motion trajectory for this underactuated system. The design of trajectory is based on the dynamic properties of the UWIP system. Furthermore, the tracking control of the UWIP for the constructed trajectory is also studied. A tracking control law is designed by using quadratic optimal control theory. Numerical simulation results verify the effectiveness of the presented theoretical results.

#### 1. 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–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.

#### 2. Model of Underactuated Wheeled Inverted Pendulum

The model of the UWIP is shown in Figure 1, where , , , and are the mass, the moment of inertia, the radius, and the rotational angle of the wheel, respectively; , , , and 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; is the gravitational acceleration.

It follows from the derivations in [25] that the kinetic and potential energy of the UWIP system iswhere , ,The Euler-Lagrange motion equations of the system arewhere is the Lagrangian of the system. Equation (3) is equivalent toThe state variables of (4) are selected to beThis gives the state-space form of (4) as

#### 3. 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 bethen the closed-loop control system has two equilibrium pointswhere and are constants. Moreover, is a stable equilibrium point while is not.*

*Proof. *Substituting (7) into (6) yields the closed-loop control systemThe equilibrium points of the system (9) satisfyIt follows from (5) and (10) that , , and . By considering the fact that is a cyclic variable with a period , it is easy to get or from . So, the equilibrium points of the closed-loop 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 formwhere are constants. The characteristic polynomial of the matrix is where is a variable symbol and is a identity matrix. By using Routh-Hurwitz stability criterion [26], it is not difficult to obtain the stability conditions for asSince and , a simple verification gives that satisfies (14) and does not. So, the equilibrium point is stable and is unstable. The proof is completed.

Theorem 2. *The closed-loop control system (6) and (7) asymptotically converges to the equilibrium point if the initial condition is different from .*

*Proof. *For the closed-loop control system (6) and (7), a Lyapunov function is designed to beThen, we getLetting gives . Combining and the third equation of (4) yieldsIn addition, means that is a constant. It follows from and thatNote that (17) meansorCombining (18) and (19) yields that is a constant. The second equation of (6) gives . From (19), we get . Furthermore, it follows from and (6) that . It is in conflict with . So, (19) does not hold.

The above analysis results tell us that and from . By using LaSalle’s theorem [15], we know that the closed-loop control system (6) and (7) asymptotically converges to the largest invariant set inSince is an unstable equilibrium point of the closed-loop system (6) and (7), the system asymptotically converges to when . 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 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 . This property will be used to design a trajectory for the UWIP in its whole motion space below.

#### 4. 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 bewhere 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 , 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 bewhere is the stabilization time that is defined to beEquation (24) means that approximately holds when .

*Step 2. *Based on and , we constructNote that and are the position variables, and and are the velocity variables of the UWIP system. Thus, is a reverse trajectory of during . And the initial and final positions of areLet . Since and satisfy (6), we getThis means that and satisfy (6).

*Step 3. *Since the constant is very small, is very close to the equilibrium point . It enables us to introduce a time period and to defineThe 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 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).

#### 5. Design of Tracking Control Law

The design of tracking control law for the trajectory is concerned in this section. Denote the error variables to beFrom (6), we get the nonlinear error dynamic equations aswhereIn 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 gives the following linear approximation model:whereAssume that is controllable. So, the time-variant Ricatti matrix equationhas a positive definite solution , where is a positive definite matrix and is a positive constant. Based on the quadratic optimal control theory, the control lawstabilizes 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.

#### 6. 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 simulationsAnd the parameters in (7) and (22) were selected to beThe 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 in (22) and is stabilized at the position in (8). The stabilizing motion process of the UWIP is smooth. And the stabilization time is 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 and . 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 to be 5% smaller and to be 5% larger than their nominal values, added white noise disturbances to the measured variable (peak value: ), 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).

#### 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.

#### Data Availability

The simulation data used to support the findings of this study are available from the corresponding author upon request.

#### Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this article.

#### Acknowledgments

This work was supported in part by National Natural Science Foundation of China under Grants nos. 61773193, 61703194, and 61873348, by the program of JSPS (Japan Society for the Promotion of Science) International Research Fellows under Grant no. 17F17791, and by the project of Young Teacher Growth Program of Shandong Province.

#### References

- X. Hao, L. Liu, and Y. Wu, “Existence and multiplicity results for nonlinear periodic boundary value problems,”
*Nonlinear Analysis: Theory, Methods & Applications*, vol. 72, no. 9-10, pp. 3635–3642, 2010. View at: Publisher Site | Google Scholar | MathSciNet - Y. Han, X. Zhang, L. Liu, and Y. Wu, “Multiple Positive Solutions of Singular Nonlinear Sturm-Liouville Problems with Carathéodory Perturbed Term,”
*Journal of Applied Mathematics*, vol. 2012, Article ID 160891, 23 pages, 2012. View at: Publisher Site | Google Scholar | MathSciNet - X. Hao, L. Liu, and Y. Wu, “Positive solutions for nonlinear fractional semipositone differential equation with nonlocal boundary conditions,”
*Journal of Nonlinear Sciences and Applications. JNSA*, vol. 9, no. 6, pp. 3992–4002, 2016. View at: Publisher Site | Google Scholar | MathSciNet - B. Zhu, L. Liu, and Y. Wu, “Local and global existence of mild solutions for a class of nonlinear fractional reaction-diffusion equations with delay,”
*Applied Mathematics Letters*, vol. 61, pp. 73–79, 2016. View at: Publisher Site | Google Scholar - W. Qi, J. H. Park, J. Cheng, Y. Kao, and X. Gao, “Anti-windup design for stochastic Markovian switching systems with mode-dependent time-varying delays and saturation nonlinearity,”
*Nonlinear Analysis: Hybrid Systems*, vol. 26, pp. 201–211, 2017. View at: Publisher Site | Google Scholar | MathSciNet - L. Liu, H. Li, C. Liu, and Y. Wu, “Existence and uniqueness of positive solutions for singular fractional differential systems with coupled integral boundary conditions,”
*The Journal of Nonlinear Science and its Applications*, vol. 10, no. 1, pp. 243–262, 2017. View at: Publisher Site | Google Scholar | MathSciNet - Y. Sun, L. Liu, and Y. Wu, “The existence and uniqueness of positive monotone solutions for a class of nonlinear Schrödinger equations on infinite domains,”
*Journal of Computational and Applied Mathematics*, vol. 321, pp. 478–486, 2017. View at: Publisher Site | Google Scholar | MathSciNet - W. Qi, G. Zong, and H. R. Karim, “Observer-Based Adaptive SMC for Nonlinear Uncertain Singular Semi-Markov Jump Systems With Applications to DC Motor,”
*IEEE Transactions on Circuits and Systems I: Regular Papers*, vol. 65, no. 9, pp. 2951–2960, 2018. View at: Publisher Site | Google Scholar - A. Zhang, X. Lai, M. Wu, and J. She, “Stabilization of underactuated two-link gymnast robot by using trajectory tracking strategy,”
*Applied Mathematics and Computation*, vol. 253, pp. 193–204, 2015. View at: Publisher Site | Google Scholar | MathSciNet - W. Dong and Y. Guo, “Global time-varying stabilization of underactuated surface vessel,”
*IEEE Transactions on Automatic Control*, vol. 50, no. 6, pp. 859–864, 2005. View at: Publisher Site | Google Scholar | MathSciNet - X. Wang, J. Liu, and K. Cai, “Tracking control for a velocity-sensorless VTOL aircraft with delayed outputs,”
*Automatica*, vol. 45, no. 12, pp. 2876–2882, 2009. View at: Publisher Site | Google Scholar | MathSciNet - N. Sun and Y. Fang, “Nonlinear tracking control of underactuated cranes with load transferring and lowering: theory and experimentation,”
*Automatica*, vol. 50, no. 9, pp. 2350–2357, 2014. View at: Publisher Site | Google Scholar | MathSciNet - D. A. Mercado Ravell, M. M. Maia, and F. J. Diez, “Modeling and control of unmanned aerial/underwater vehicles using hybrid control,”
*Control Engineering Practice*, vol. 76, pp. 112–122, 2018. View at: Publisher Site | Google Scholar - I. Meza, L. Aguilar, A. Shiriaev, L. Freidovich, and Y. Orlov, “Periodic motion planning and nonlinear H
_{∞}tracking control of a 3-DOF underactuated helicopter,”*International Journal of Systems Science*, vol. 42, no. 5, pp. 829–838, 2011. View at: Publisher Site | Google Scholar | MathSciNet - H. Khalil,
*Nonlinear Systems*, Prentice-Hall, New Jersey, NJ, USA, 3rd edition, 2002. - G. Oriolo and Y. Nakamura, “Control of mechanical systems with second-order nonholonomic constraints: Underactuated manipulators,” in
*Proceedings of the 30th IEEE Conference on Decision and Control (Part 1 of 3)*, pp. 2398–2403, December 1991. View at: Google Scholar - X. Xin and M. Kaneda, “Analysis of the energy-based swing-up control of the Acrobot,”
*International Journal of Robust and Nonlinear Control*, vol. 17, no. 16, pp. 1503–1524, 2007. View at: Publisher Site | Google Scholar | MathSciNet - M. Ramírez-Neria, H. Sira-Ramírez, R. Garrido-Moctezuma, and A. Luviano-Juárez, “Linear active disturbance rejection control of underactuated systems: the case of the Furuta pendulum,”
*ISA Transactions®*, vol. 53, no. 4, pp. 920–928, 2014. View at: Publisher Site | Google Scholar - M. K. Choudhary and G. Naresh Kumar, “ESO based LQR controller for ball and beam system,”
*IFAC-PapersOnLine*, vol. 49, no. 1, pp. 607–610, 2016. View at: Publisher Site | Google Scholar - F. Celani, “Output regulation for the TORA benchmark via rotational position feedback,”
*Automatica*, vol. 47, no. 3, pp. 584–590, 2011. View at: Publisher Site | Google Scholar | MathSciNet - J. She, A. Zhang, X. Lai, and M. Wu, “Global stabilization of 2-DOF underactuated mechanical systems—an equiavlent-input-disturbance approach,”
*Nonlinear Dynamics*, vol. 69, no. 1-2, pp. 495–509, 2012. View at: Publisher Site | Google Scholar | MathSciNet - X. Lai, J. She, S. X. Yang, and M. Wu, “Comprehensive unified control strategy for underactuated two-link manipulators,”
*IEEE Transactions on Systems, Man, and Cybernetics, Part B: Cybernetics*, vol. 39, no. 2, pp. 389–398, 2009. View at: Google Scholar - X. Xin and Y. Liu, “Reduced-order stable controllers for two-link underactuated planar robots,”
*Automatica*, vol. 49, no. 7, pp. 2176–2183, 2013. View at: Publisher Site | Google Scholar | MathSciNet - J. G. Romero, A. Donaire, R. Ortega, and P. Borja, “Global Stabilisation of Underactuated Mechanical Systems via PID Passivity-Based Control,”
*IFAC-PapersOnLine*, vol. 50, no. 1, pp. 9577–9582, 2017. View at: Publisher Site | Google Scholar - Y. Ge, A. Zhang, J. Huo, S. Duan, L. Wang, and J. Kang, “Modeling and stabilizing control of wheeled acrobatic robot,”
*Application in Automation*, vol. 2017, no. 3, pp. 101–103, 2017. View at: Google Scholar - J. Huang,
*Automatic Control Principles and Applications*, Higher education press, Beijing, China, 2nd edition, 2009.

#### Copyright

Copyright © 2018 Shuli Gong 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.