Research Article | Open Access
Khanh G. Tran, Nam H. Nguyen, Phuoc D. Nguyen, "Observer-Based Controllers for Two-Wheeled 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
Observer-Based Controllers for Two-Wheeled Inverted Robots with Unknown Input Disturbance and Model Uncertainty
In this paper, two controllers with a compound disturbance observer are proposed for a two-wheeled 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 closed-loop control systems is proved; (iii) our proposed methods are simulated and compared with the existing methods.
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 , fractional PID , fuzzy control [16, 17], model predictive control , and nonlinear disturbance observer-based control .
In , 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 , both model uncertainty and exogenous disturbance were addressed, but the proposed controller was complicated. In , 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 , 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 , a nonlinear state transformation-based controller was proposed without considerations of model uncertainty and disturbance. A state-dependent nonlinear model-based LQR controller was designed in , which was robust to external disturbances but not dealing with model uncertainty. In , a passivity-based controller using the two-rule Takagi–Sugeno fuzzy model was proposed for the TWIR. In , a controller using the state-dependent Riccati equation was designed. A combination of two PD controllers and a time-delayed controller for fast movement of TWMR was proposed in , where the first PD controller was designed for the pitch angle, the other PD controller was applied for the orientation, and the time-delayed controller was synthesised for the position. In , a proposed control scheme consists of local controller and a global planner for the TWIR-based personal transportation vehicle, in which the local controller contains three PID controllers for the pitch angle, the yaw angle, and the position. In , 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 system-based controllers  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 , an optimal H-infinity 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  and . In , 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 observer-based high gain controller was proposed in . It requires a lot of integral calculations to estimate state variables and TWIR’s parameters. In , a hierarchical sliding mode control was proposed for controlling longitudinal and balancing motions of TWIR only. A control moment gyro  was used for keeping a small TWIR-balanced 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  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  are represented as in equations (1), (2), and (3):
Let us define state variables and inputs as follows:respectively. Then,where , , , , , and where with
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 .
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 ) is presented and applied for system (14). By using the Euler method, we have an approximate discrete-time 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
Define a cost function . Then, an optimal estimate of is
Theorem 1. (see ). If system (18) has , the measured state from system (18) is exactly represented by the following discrete-time model:with being suitably selected, the estimated disturbance (21) will satisfy that
Proof. The proof was given in . 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 . 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 , 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 . 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 , 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 , 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  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:
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 . 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  under the same desired trajectory type (circle, test 3 ), the proposed tracking controller (39) is better than the controller in the work  in terms of steady-static error and smoothness of control signals, since there was impulse type of control signal and there exists steady-static error of the tilt angle in .
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 closed-loop 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  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  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.
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.
This research was funded by the Hanoi University of Science and Technology (HUST) under project number T2018-PC-052.
- 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 two-wheeled robots,” Annual Reviews in Control, vol. 37, no. 1, pp. 89–103, 2013.
- N. N. Son and H. P. H. Anh, “Adaptive backstepping self-balancing control of a two-wheel electric scooter,” International Journal of Advanced Robotic Systems, vol. 11, no. 10, p. 165, 2014.
- N. Esmaeili, A. Alfi, and H. Khosravi, “Balancing and trajectory tracking of two-wheeled mobile robot using backstepping sliding mode control: design and experiments,” Journal of Intelligent & Robotic Systems, vol. 83, no. 3-4, pp. 601–613, 2017.
- F. Dai, X. Gao, S. Jiang, W. Guo, and Y. Liu, “A two-wheeled inverted pendulum robot with friction compensation,” Mechatronics, vol. 30, pp. 116–125, 2015.
- M. Yue, S. Wang, and J.-Z. Sun, “Simultaneous balancing and trajectory tracking control for two-wheeled inverted pendulum vehicles: a composite control approach,” Neurocomputing, vol. 191, pp. 44–54, 2016.
- M. Nikpour, L. Huang, and A. M. Al-Jumaily, “Stability and direction control of a two-wheeled robotic wheelchair through a movable mechanism,” IEEE Access, vol. 8, pp. 45221–45230, 2020.
- R. M. Brisilla and V. Sankaranarayanan, “Nonlinear control of mobile inverted pendulum,” Robotics and Autonomous Systems, vol. 70, pp. 145–155, 2015.
- K. Sangtae and J. K. Sang, “Nonlinear optimal control design for underactuated two-wheeled inverted pendulum mobile platform,” IEEE Trans. on Mechatronics, vol. 22, no. 6, pp. 2803–2808, 2017.
- R. Liu, J. Wu, and D. Wang, “Sampled-data fuzzy control of two-wheel inverted pendulums based on passivity theory,” International Journal of Control, Automation and Systems, vol. 16, no. 5, pp. 2538–2548, 2018.
- L.-G. Lin and M. Xin, “Nonlinear control of two-wheeled robot based on novel analysis and design of SDRE scheme,” IEEE Transactions on Control Systems Technology, vol. 28, no. 3, pp. 1140–1148, 2020.
- S. T. Cho and S. Jung, “Combining two control techniques for the fast movement of a two-wheel mobile robot,” International Journal of Humanoid Robotics, vol. 12, no. 2, Article ID 1550020, 2015.
- H. W. Kim and S. Jung, “Control of a two-wheel robotic vehicle for personal transportation,” Robotica, vol. 34, no. 5, pp. 1186–1208, 2016.
- J. Dong, B. He, C. Zhang, and G. Li, “Open-closed-loop PD iterative learning control with a variable forgetting factor for a two-wheeled self-balancing mobile robot,” Complexity, vol. 2019, Article ID 5705126, 11 pages, 2019.
- H. O. Erkol, “Optimal controller design for two wheeled inverted pendulum,” IEEE Access, vol. 6, 2018.
- M. Yue, C. An, Y. Du, and J. Sun, “Indirect adaptive fuzzy control for a nonholonomic/underactuated wheeled inverted pendulum vehicle based on a data-driven trajectory planner,” Fuzzy Sets and Systems, vol. 290, pp. 158–177, 2016.
- J. Huang, M. H. Ri, D. Wu, and S. Ri, “Interval type-2 fuzzy logic modeling and control of a mobile two-wheeled inverted pendulum,” IEEE Transactions on Fuzzy Systems, vol. 26, no. 4, pp. 2030–2038, 2018.
- 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.
- J. Huang, S. Ri, L. Liu, Y. Wang, J. Kim, and G. Pak, “Nonlinear disturbance observer-based dynamic surface control of mobile wheeled inverted pendulum,” IEEE Transactions on Control Systems Technology, vol. 23, no. 6, pp. 2400–2407, 2015.
- 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.
- 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.
- I. Jmel, H. Dimassi, S. H. Said, and F. M. Sahli, “Adaptive observer-based output feedback control for two-wheeled self-balancing robot,” Mathematical Problems in Engineering, vol. 2020, Article ID 5162172, 16 pages, 2020.
- L. Chen, H. Wang, Y. Huang et al., “Robust hierarchical sliding mode control of a two-wheeled self-balancing vehicle using perturbation estimation,” Mechanical Systems and Signal Processing, vol. 139, 2020.
- 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.
- S. Jeong and T. Hayashi, “Development of a wheeled inverted pendulum mobile platform with a four-bar parallel mechanism,” Advanced Robotics, vol. 32, no. 4, pp. 1–11, 2018.
- C. He, K. Huang, X. Chen, Y. Zhang, and H. Zhao, “Transportation control of cooperative double-wheel inverted pendulum robots adopting Udwadia-control approach,” Nonlinear Dynamics, vol. 91, no. 4, pp. 2789–2802, 2018.
- K. M. Goher and S. O. Fadlallah, “Control of a two-wheeled machine with two-directions handling mechanism using PID and PD-FLC algorithms,” International Journal of Automation and Computing, vol. 16, no. 4, pp. 511–533, 2019.
- S. Kim and S. Kwon, “Dynamic modeling of a two-wheeled inverted pendulum balancing mobile robot,” International Journal of Control, Automation, and Systems, vol. 13, no. 4, pp. 926–933, 2015.
- P. D. Nguyen and N. H. Nguyen, “Some control methods for mechanical systems using Euler-Lagrange model with uncertainties,” in Proceedings of the 1st National conference on Dynamics and Control, Danang, Vietnam, July 2019.
- 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.
- D. O. A. Brian and B. M. John, Optimal Control: Linear Quadratic Methods, Prentice-Hall International, Inc., Upper Saddle River, NJ, USA, 1989.
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.