Research Article  Open Access
Khanh G. Tran, Nam H. Nguyen, Phuoc D. Nguyen, "ObserverBased Controllers for TwoWheeled Inverted Robots with Unknown Input Disturbance and Model Uncertainty", Journal of Control Science and Engineering, vol. 2020, Article ID 7205737, 12 pages, 2020. https://doi.org/10.1155/2020/7205737
ObserverBased Controllers for TwoWheeled Inverted Robots with Unknown Input Disturbance and Model Uncertainty
Abstract
In this paper, two controllers with a compound disturbance observer are proposed for a twowheeled inverted robot (TWIR) with model uncertainty and unknown input disturbance. First, an equivalent linear model of the TWIR with uncertainty and input disturbance is proposed using the Taylor series expansion for the nonlinear model of the TWIR at an equilibrium point, in which the nonlinear part of the Taylor series and the model uncertainty are combined with unknown input disturbance as compound input disturbance. Then, the compound input disturbance is estimated by using the Newton method and reference model. As the estimated compound disturbance is used to compensate for the compound disturbance, the equivalent linear system becomes closely definite without compound input disturbance. Finally, two controllers are proposed using the equivalent linear system. Stability analysis of the proposed control methods is also given. To illustrate the proposed methods, some simulations for the TWIR are performed and compared with the existing methods. The main contribution of this work includes the following: (i) simple controllers based on compound input disturbance observer for trajectory tracking and balancing of TWIRs with unknown input disturbance and model uncertainty are proposed; (ii) the stability of proposed closedloop control systems is proved; (iii) our proposed methods are simulated and compared with the existing methods.
1. Introduction
TWIRs were widely studied in the literature and applied as vehicles in practice [1, 2]. Their nature is an unstable, underactuated, and nonlinear system, so it is very difficult to control them. There have been many controllers designed for TWIRs such as backstepping [3, 4], sliding mode control [5–7], nonlinear control [8–11], PID control [12, 13], PD controller with iterative learning [14], fractional PID [15], fuzzy control [16, 17], model predictive control [18], and nonlinear disturbance observerbased control [19].
In [3], an adaptive backstepping controller combined with two PD controllers was proposed for an electric scooter with model uncertainty, but the input disturbance was not considered. In [4], both model uncertainty and exogenous disturbance were addressed, but the proposed controller was complicated. In [5], sliding mode controllers were applied to dealt with model uncertainty, and experimental data based friction compensation models were built for a TWIR, so this is an disadvantage in design. In [6], adaptive sliding mode control in combination with direct fuzzy control was applied for balancing and trajectory tracking of the TWIR; however, no disturbance was considered. In [8], a nonlinear state transformationbased controller was proposed without considerations of model uncertainty and disturbance. A statedependent nonlinear modelbased LQR controller was designed in [9], which was robust to external disturbances but not dealing with model uncertainty. In [10], a passivitybased controller using the tworule Takagi–Sugeno fuzzy model was proposed for the TWIR. In [11], a controller using the statedependent Riccati equation was designed. A combination of two PD controllers and a timedelayed controller for fast movement of TWMR was proposed in [12], where the first PD controller was designed for the pitch angle, the other PD controller was applied for the orientation, and the timedelayed controller was synthesised for the position. In [13], a proposed control scheme consists of local controller and a global planner for the TWIRbased personal transportation vehicle, in which the local controller contains three PID controllers for the pitch angle, the yaw angle, and the position. In [16], an indirect adaptive fuzzy controller based on the trajectory planner was proposed for the TWIR with model uncertainty. Four interval type 2 fuzzy logic inference systembased controllers [17] were designed using the Takagi–Sugeno model for the TWIR with uncertainty and disturbance, but the controller is dependent on solving linear matrix inequalities. In [20], an optimal Hinfinity controller was proposed by using Taylor series approximation at operating point, so it requires a lot of computations. Trajectory tracking control and control for obstacle avoidance of the TWIR with certain model and no disturbance were proposed in [18] and [21]. In [19], a nonlinear disturbance observer based dynamic surface controller was proposed, in which the observer is a complex differential equation to solve and the designed controller was also complicated when using a global change of coordinates and dynamic surface control technique and filters. This controller can only stabilize the pitch and yaw angles of the TWIR. Recently, an adaptive observerbased high gain controller was proposed in [22]. It requires a lot of integral calculations to estimate state variables and TWIR’s parameters. In [23], a hierarchical sliding mode control was proposed for controlling longitudinal and balancing motions of TWIR only. A control moment gyro [24] was used for keeping a small TWIRbalanced independence of moving control; this allows to perform the trajectory tracking problem separately from the balancing problem. Some new application directions of TWIRs were recently developed in [25–27].
Most of the mentioned above methods have not dealt with model uncertainty and unknown input disturbances; only few methods had done that, but they were very complicated for design and implementation. This motivates us to propose a simpler controller based on an input disturbance observer to concurrently overcome both model uncertainty and unknown input disturbance. In this work, our main contributions are to (a) convert the nonlinear model of TWIRs into an equivalent linear model, in which the uncertainty of nonlinear model and the unknown input disturbance are lumped as compound input disturbance, (b) prove the stability of the proposed TWIR control system, and (c) compare the proposed method with other existing methods through numerical simulations.
The remaining part of the work is organized as follows. The next section revisits a mathematical model of the TWIR and builds an exact linear model of TWIR with model uncertainty and unknown input disturbance by introducing the compound input disturbance. Two controllers with the disturbance observer are proposed for the TWIR and stability analysis is also provided in Section 3. In Section 4, some numerical simulations are carried out to illustrate the proposed method and compare it with the existing methods. The final section provides conclusions and future works.
2. Mathematical Model of TWIR
In this work, a mathematical model of TWIR in [28] is used for the controller design and simulation. The schematic diagram of a TWIR is shown in Figure 1. The notations and parameters of the TWIR are shown in Table 1, where , , , and . The motion equations of the TWIR [28] are represented as in equations (1), (2), and (3):

Let us define state variables and inputs as follows:respectively. Then,where , , , , , and where with
System (5) is used to build a linear model with compound disturbance in Section 3.
3. Proposed Controllers with Compound Disturbance Observer
3.1. Exact Linear Model with Compound Disturbance
Let be an equilibrium point of system (5), then is the solution to the equation . Thus, , where “” are any values of and , which are the desired position and heading angle of the TWIR. Without loss of generality, it is assumed that “” is zero; this means .
Since , , and are linear functions, the first derivatives of first three variables can be expressed as follows:where , and .
Because the matrices and are constant, system (7) is certain and , , and are virtual inputs. In addition, since the matrix , system (7) is not directly affected by both the input and unknown input disturbances.
Since , , and are nonlinear functions, by using Taylor series expansion, they can be represented exactly as follows:where , having a size of , is the remainder of Taylor series for the functions , and at , and , in which , , , , , , , , and .
Since , the inverse of the matrix exists. So, can be rewritten as follows:where . In other words, is in the image space of .
As parameters of the TWIR are uncertain, system (8) can be represented as
This is equivalent towhere .
Similarly, we havewhere . In this case, also lies in the image space of .
From equations (7), (11), and (12), we obtainwhere , , and .
Thus, the uncertainty of system (13), also combined uncertainty of system (7) and system (11), is . Then, since . This means that . So, is in the image space of . It implies that the uncertainty of system (5) can be described as uncertain input disturbance .
As unknown input disturbance is applied to the TWIR, system (13) becomeswhere . Thus, the compound disturbance represents both the unknown input disturbance and the model uncertainty. System (14) is a linear model exactly representing the nonlinear system (5). In Section 3.2, the compound disturbance will be estimated.
3.2. Compound Disturbance Observer
In this section, an input disturbance observer (a proposal in [29]) is presented and applied for system (14). By using the Euler method, we have an approximate discretetime model of system (14) as follows:where , , and is the sampling time. A reference model will be used to estimate the disturbance as follows:where is the estimated disturbance at time instance . Then, system (15) with disturbance compensation is presented asand system (14) with approximated disturbance compensation becomes
Subtracting equation (16) from equation (17), we get
So, there exists a difference in equation (19), which is also the approximation error of equation (15) due to discretization process as follows:
Define a cost function . Then, an optimal estimate of is
Theorem 1. (see [29]). If system (18) has , the measured state from system (18) is exactly represented by the following discretetime model:with being suitably selected, the estimated disturbance (21) will satisfy that
Proof. The proof was given in [29]. So, it is skipped here.
For the reference model (16), it is possible to choose for . So, equation (21) becomesThe correct value of the compound disturbance is . So, the estimation error isHowever, is proportional to because of the local truncation error [30]. Thus, the estimation error can be made as small as possible by decreasing the sampling time .
The estimated compound disturbance is used to complement system (14) as in equation (18), where and . Keep in mind that the estimated compound disturbance looks like a series of step functions.
In summary, the compound disturbance observer is implemented as follows:(1)Initialization: choose is sufficiently small. Assign . Measure the state of system (5) at time . Assign .(2)Perform the following calculations in forward order for :(a)Measure the state of system (5) at time .(b)Compute from equation (16) and calculate from equation (24).(c)Assign , go back to step .System (18) is applied to design state feedback and trajectory tracking controllers using the disturbance observer (24) in Section 3.3.
3.3. Stability Analysis
In this section, the stability of system (18) with a state feedback controller is analyzed. Some assumptions are given as follows: Assumption 1. is continuous and is bounded. Assumption 2. There exists a state feedback controller satisfying that the matrix is Hurwitz (all real part of eigenvalues is negative).
Lemma 1. With assumption 1, system (18) with a state feedback controller satisfying the assumption 2 is input to state stable (ISS).
Proof. Let for and for . From equations (25) and (26), one gets . Since is proportional to due to the local truncation error [30], it is bounded. In addition, the compound disturbance and its first derivative are also bounded by assumption 1, and then, is bounded.
Let , where is a window function with for , , and for . Then, is also bounded.
Substituting and the controller into equation (18), we obtainDenote Since is Hurwitz by assumption 2, for and , the Lyapunov equationalways has a unique solution , which is symmetric positive definite. By using a Lyapunov function as follows,one haswhere denotes norm and is the smallest eigenvalue of the matrix .
As long as lies outside the domain , , thus containing the origin. Hence, system (27) is input to state stable [31]. This means that system (18) is ISS.
In conclusion, the state feedback controller with disturbance observer iswhere the gain matrix can be designed using existing methods in the literature such as LQR control, pole placement method, or even . The proposed controller is simple not only in design but also implementation. In addition, it can cope with model uncertainty and input disturbance of TWIRs. In Section 3.4, we propose a trajectory tracking controller for TWIRs with model uncertainty and input disturbance.
3.4. Tracking Control for TWIR
Let be the desired trajectory for the TWIR. Define be tracking error of the TWIR. Taking the first derivative of the tracking error and using equation (18), we obtainwhere is previously defined in the proof of Lemma 1.
Theorem 2. The tracking error holds that under the following control law:where satisfies the condition that is Hurwitz.
Proof. Since , . In addittion, the matrices and have special forms as in equation (13), so ; this lies in the image space of . Thus, , where is unique due to . So, system (32) can be represented as follows:Substituting equation (33) into equation (34), we getThis system is similar to system (27), but the variable is in place of . Define a Lyapunov function aswhere . Then,where , , and is the minimum eigenvalue of the matrix . This means that whenever . Hence, is bounded.
Take the second derivative of to getwhere . Since is bounded, and are also bounded according to Lemma 1, is bounded. Using Barbalat’s Lemma, one gets .
In summary, the tracking controller isFor disturbance estimation, equations (16) and (24) will be applied, where is a constant matrix, which is previously computed one time. This is also true for computing the matrix Thus, the calculation of control signal involves only matrix/vector multiplication and addition, so it is simple to implement. This is an advantage of the proposed method in comparison with other methods in the literature such as works in [6, 20]. In [6], several integral computations involving adaptive laws have to be calculated to obtain control signals, and no input disturbance is mentioned in design process and simulation. In [20], the model linearization and Riccati equation solving are performed to obtain the control gain matrix at every sampling instance, so the computational load is very huge for implementation.
4. Numerical Simulation
To illustrate the proposed method, a state feedback controller is designed using LQR method. However, there have been several other methods in the literature for designing the state feedback controller, thus the proposed method is very flexible in design. The linear model (18) is applied to design a LQR controller [32] such that the following cost function is minimum:where is a symmetric positive definite matrix and is a symmetric nonnegative definite matrix. The controller, which satisfies the cost function (40), is , whereand is the solution to the Riccati equation:
In this paper, the values of the TWIR’s parameters are given as follows: , , , , , , and and the sampling time is . Thus, following matrices are obtained:
The matrices of the cost function are chosen as and . From equations (41) and (42), the gain matrix of the LQR controller is obtained as follows:
Remark 1. Since the input to the LQR controller consists of state variable pairs , , and , the LQR output is similar to the sum of the three PD controllers’ output as in works [3, 12, 13], in which each state variable pair is the input to one PD controller.
For performance comparison, four cases are considered as follows:(i)Case 1: the model is certain, and there is no input disturbance(ii)Case 2: the model is certain, and there is unknown input disturbance, where(iii)Case 3: the model is uncertain, and there is unknown input disturbance, in which the unknown input disturbance is the same as in case 2; the model uncertainty is given as follows: , , , , and .(iv)Case 4: use the same simulation conditions as Case 3, but the desired trajectory is a circle with , , and , and the controllers (31) and (39) with the same matrix are applied.For the first three cases, setpoints for position, tilt angle, and heading angle are , , and , respectively. The initial values for position, tilt angle, and heading angle are , , and , respectively. The nonlinear model (5) is used to simulate the TWIR and the LQR controller with disturbance observer (31) being applied for these three cases. The disturbances and their estimated disturbances are shown in Figures 2(a), 2(b), 3(a) and 3(b).
It can be seen that for the case 1 the estimated disturbances are nonzero for a short time interval. This is caused by the Taylor approximation error in equation (8). For the case 2, it takes a little bit longer time for the estimated disturbances converging to the disturbances in comparison with the case 1. But for the case 3, it takes about 2 seconds for convergence with a small error. The position, tilt angle, and heading angle of robot are shown in Figures 4(a)–4(c). When there is unknown input disturbance, the proposed controller still guarantees the same performance as that in the case 1. This performance is little bit different as both unknown input disturbance and model uncertainty are applied. Thus, the proposed controller maintained well the control performance even though there were model uncertainty and unknown input disturbance. As the LQR controller is used without the compound disturbance observer, the control performance becomes worse than the proposed method, because there are oscillations of position and tilt angle and the divergence of the heading angle from the setpoint (see Case 3 without observer in Figure 4). So, the standard LQR controller fails to control the TWIR in the presence of model uncertainty and input disturbance.
For the fourth case, the nonlinear model (5) is also used to simulate the TWIR, and the tracking controller (39) and the state feedback controller (31) are compared to those in the work in [20]. Simulation results are displayed in Figures 5 and 6. It shows that all the tracking errors by the two proposed methods for position, tilt angle, heading angle, and their derivatives converge to zero quickly, the TWIR follows the desired trajectory closely, and control signals (provided by the tracking controller) are smooth. The tracking controller (39) provides better performance than that of the state feedback controller (30).
In comparison with [20] under the same desired trajectory type (circle, test 3 [20]), the proposed tracking controller (39) is better than the controller in the work [20] in terms of steadystatic error and smoothness of control signals, since there was impulse type of control signal and there exists steadystatic error of the tilt angle in [20].
(a)
(b)
(a)
(b)
(a)
(b)
(c)
(a)
(b)
(c)
(d)
(a)
(b)
(c)
(d)
5. Conclusions and Future Works
In this work, the state feedback controller with compound disturbance observer (31) and the trajectory tracking controller with compound disturbance observer (39) were proposed for TWIRs with model uncertainty and unknown input disturbance, and the stability of the closedloop control system with the proposed controller was also proved. The proposed controllers have advantages of simplicity in implementation and flexibility in design for the feedback gain matrix.
Numerical simulations were taken to illustrate the proposed methods and compare with the existing method in [20] and the classical LQR controller. The results show that the control performance was well maintained under model uncertainty and unknown input disturbance by using the proposed control methods, whereas the control performance becomes worse as the classical LQR controller was applied. The proposed tracking controller (39) provided better performance than the controller in [20] for the circular trajectory type, the state feedback controller (31), and also the LQR controller.
Future works focus on controller design methods for the exact linear model of TWIR (14) using different techniques and other existing observers and the further extension to other systems in the Lagrangian form.
Data Availability
No data were used to support this study.
Conflicts of Interest
The authors declare that there are no conflicts of interest regarding the publication of this paper.
Acknowledgments
This research was funded by the Hanoi University of Science and Technology (HUST) under project number T2018PC052.
References
 Z. Li, C. Yang, and L. Fan, Advanced Control of Wheeled Inverted Pendulum Systems, Springer, Berlin, Germany, 2013.
 P. M. C. Ronald, A. S. Karl, and H. Roger, “Review of modelling and control of twowheeled robots,” Annual Reviews in Control, vol. 37, no. 1, pp. 89–103, 2013. View at: Google Scholar
 N. N. Son and H. P. H. Anh, “Adaptive backstepping selfbalancing control of a twowheel electric scooter,” International Journal of Advanced Robotic Systems, vol. 11, no. 10, p. 165, 2014. 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. 83, no. 34, pp. 601–613, 2017. View at: Publisher Site  Google Scholar
 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
 M. Yue, S. Wang, and J.Z. Sun, “Simultaneous balancing and trajectory tracking control for twowheeled inverted pendulum vehicles: a composite control approach,” Neurocomputing, vol. 191, pp. 44–54, 2016. View at: Publisher Site  Google Scholar
 M. Nikpour, L. Huang, and A. M. AlJumaily, “Stability and direction control of a twowheeled robotic wheelchair through a movable mechanism,” IEEE Access, vol. 8, pp. 45221–45230, 2020. View at: Publisher Site  Google Scholar
 R. M. Brisilla and V. Sankaranarayanan, “Nonlinear control of mobile inverted pendulum,” Robotics and Autonomous Systems, vol. 70, pp. 145–155, 2015. View at: Publisher Site  Google Scholar
 K. Sangtae and J. K. Sang, “Nonlinear optimal control design for underactuated twowheeled inverted pendulum mobile platform,” IEEE Trans. on Mechatronics, vol. 22, no. 6, pp. 2803–2808, 2017. View at: Google Scholar
 R. Liu, J. Wu, and D. Wang, “Sampleddata fuzzy control of twowheel inverted pendulums based on passivity theory,” International Journal of Control, Automation and Systems, vol. 16, no. 5, pp. 2538–2548, 2018. View at: Publisher Site  Google Scholar
 L.G. Lin and M. Xin, “Nonlinear control of twowheeled robot based on novel analysis and design of SDRE scheme,” IEEE Transactions on Control Systems Technology, vol. 28, no. 3, pp. 1140–1148, 2020. View at: Publisher Site  Google Scholar
 S. T. Cho and S. Jung, “Combining two control techniques for the fast movement of a twowheel mobile robot,” International Journal of Humanoid Robotics, vol. 12, no. 2, Article ID 1550020, 2015. View at: Publisher Site  Google Scholar
 H. W. Kim and S. Jung, “Control of a twowheel robotic vehicle for personal transportation,” Robotica, vol. 34, no. 5, pp. 1186–1208, 2016. View at: Publisher Site  Google Scholar
 J. Dong, B. He, C. Zhang, and G. Li, “Openclosedloop PD iterative learning control with a variable forgetting factor for a twowheeled selfbalancing mobile robot,” Complexity, vol. 2019, Article ID 5705126, 11 pages, 2019. View at: Publisher Site  Google Scholar
 H. O. Erkol, “Optimal controller design for two wheeled inverted pendulum,” IEEE Access, vol. 6, 2018. View at: Publisher Site  Google Scholar
 M. Yue, C. An, Y. Du, and J. Sun, “Indirect adaptive fuzzy control for a nonholonomic/underactuated wheeled inverted pendulum vehicle based on a datadriven trajectory planner,” Fuzzy Sets and Systems, vol. 290, pp. 158–177, 2016. View at: Publisher Site  Google Scholar
 J. Huang, M. H. Ri, D. Wu, and S. Ri, “Interval type2 fuzzy logic modeling and control of a mobile twowheeled inverted pendulum,” IEEE Transactions on Fuzzy Systems, vol. 26, no. 4, pp. 2030–2038, 2018. View at: Publisher Site  Google Scholar
 M. Yue, C. An, and J. Z. Sun, “An efficient model predictive control for trajectory tracking of wheeled inverted pendulum vehicles with various physical constraints,” International Journal of Control, Automation and Systems, vol. 16, no. 1, pp. 265–274, 2018. View at: Publisher Site  Google Scholar
 J. Huang, S. Ri, L. Liu, Y. Wang, J. Kim, and G. Pak, “Nonlinear disturbance observerbased dynamic surface control of mobile wheeled inverted pendulum,” IEEE Transactions on Control Systems Technology, vol. 23, no. 6, pp. 2400–2407, 2015. View at: Publisher Site  Google Scholar
 G. Rigatos, K. Busawon, J. Pomares, and M. Abbaszadeh, “Nonlinear optimal control for the wheeled inverted pendulum system,” Robotica, vol. 38, no. 1, pp. 29–47, 2019. View at: Publisher Site  Google Scholar
 N. Yigao, Y. Ming, Y. Lu, and H. Xiaoqiang, “A trajectory planning and tracking control approach for obstacle avoidance of wheeled inverted pendulum vehicles,” International Journal of Control, 2018. View at: Publisher Site  Google Scholar
 I. Jmel, H. Dimassi, S. H. Said, and F. M. Sahli, “Adaptive observerbased output feedback control for twowheeled selfbalancing robot,” Mathematical Problems in Engineering, vol. 2020, Article ID 5162172, 16 pages, 2020. View at: Publisher Site  Google Scholar
 L. Chen, H. Wang, Y. Huang et al., “Robust hierarchical sliding mode control of a twowheeled selfbalancing vehicle using perturbation estimation,” Mechanical Systems and Signal Processing, vol. 139, 2020. View at: Publisher Site  Google Scholar
 K. Tanaka and S. Nagasawa, “Posture stability control of a small inverted pendulum robot in trajectory tracking using a control moment gyro,” Advanced Robotics, vol. 34, no. 9, pp. 610–620, 2020. View at: Publisher Site  Google Scholar
 S. Jeong and T. Hayashi, “Development of a wheeled inverted pendulum mobile platform with a fourbar parallel mechanism,” Advanced Robotics, vol. 32, no. 4, pp. 1–11, 2018. View at: Publisher Site  Google Scholar
 C. He, K. Huang, X. Chen, Y. Zhang, and H. Zhao, “Transportation control of cooperative doublewheel inverted pendulum robots adopting Udwadiacontrol approach,” Nonlinear Dynamics, vol. 91, no. 4, pp. 2789–2802, 2018. View at: Publisher Site  Google Scholar
 K. M. Goher and S. O. Fadlallah, “Control of a twowheeled machine with twodirections handling mechanism using PID and PDFLC algorithms,” International Journal of Automation and Computing, vol. 16, no. 4, pp. 511–533, 2019. View at: Publisher Site  Google Scholar
 S. Kim and S. Kwon, “Dynamic modeling of a twowheeled inverted pendulum balancing mobile robot,” International Journal of Control, Automation, and Systems, vol. 13, no. 4, pp. 926–933, 2015. View at: Publisher Site  Google Scholar
 P. D. Nguyen and N. H. Nguyen, “Some control methods for mechanical systems using EulerLagrange model with uncertainties,” in Proceedings of the 1st National conference on Dynamics and Control, Danang, Vietnam, July 2019. View at: Google Scholar
 J. C. Butcher, Numerical Methods for Ordinary Differential Equations, vol. 66, John Wiley & Sons, Hoboken, NJ, USA, 2008.
 E. D. Sontag, “Smooth stabilization implies coprime factorization,” IEEE Transactions on Automatic Control, vol. 34, no. 4, pp. 435–443, 1989. View at: Publisher Site  Google Scholar
 D. O. A. Brian and B. M. John, Optimal Control: Linear Quadratic Methods, PrenticeHall International, Inc., Upper Saddle River, NJ, USA, 1989.
Copyright
Copyright © 2020 Khanh G. Tran 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.