Abstract
The chapter first presents a linearized model of the WIP system, then PD, LQR, H ∞ and backstepping controllers have been implemented. The pole placement method has been employed to design a PD controller, allowing the designer to specify the response of the closed loop system. Comparisons were made between the performance of an LQR controller and PD controller. The LQR controller is found to perform better when subject to the situation where the parameters vary with time. Finally, H ∞ and backstepping controllers are also developed.
4.1 Introduction
Although WIP systems are intrinsically nonlinear and their dynamics are described by nonlinear differential equations, it is often possible to obtain a linearized model of the system. Furthermore, if the system operates around an operating point, and the signals involved are small, a linear model that approximates the nonlinear system in the region of operation can be obtained. Several techniques for the design of controllers and analysis of nonlinear systems through linearization were applied before.
In [59], motion control was proposed using linear state–space model. In [56], dynamics were derived using a Newtonian approach and the control was design by the equations linearized around an operating point. In [106], the dynamic equations were studied, with the pendulum pitch and the rotation angles of the two wheels as the variables of interest, and a linear controller was designed for stabilization under the consider of its robustness in [107]. In [19], a linear stabilizing controller was derived by a planar model without considering vehicle yaw. However, the above control laws are designed on the linearized dynamics which only exhibits desirable behavior around the operating point, and do not have global applicability. In [75], the exact dynamics of two-wheeled inverted pendulum were investigated, and linear feedback control was developed on the dynamic model. In [103], a two-level velocity controller via partial feedback linearized and a stabilizing position controller were derived, however, the controller design is not robust with respect to parameter uncertainties.
Wheeled inverted pendulums are intrinsically nonlinear and their dynamics will be described by nonlinear differential equations. The presence of nonlinearities in systems complicates analysis. Despite this, for the case of controller design, it is often possible to obtain a linearized model of the system. If the system operates around an operating point, and the signals involved are small signals, a linear model that approximates the nonlinear system in the region of operation can be obtained. In this chapter, we first derive the linearized dynamic model. Then several techniques for the design of controllers and analysis techniques for linear systems can then be applied. The control methods applied here are the PID control and the Linear Quadratic Regulator optimization method used for obtaining an optimal feedback gain. Since the approach of H ∞, optimal control has been widely discussed for robustness and its capability of disturbance attenuation in nonlinear systems. Therefore, by linearizing the dynamics of wheeled inverted pendulum and obtaining a precise knowledge of the structure of the entire plant model, robust H ∞ controls, including Riccati-like H ∞, and LMI-based H ∞, are applied to the linearized model with a small perturbation. The corresponding simulation examples are presented for each approach.
4.2 Linearization of the WIP Dynamics
Before the design of either controller, linear mathematical models must first be obtained. The linearization may be done by expanding the nonlinear function into a Taylor series about the operating point and neglecting the higher order terms of the expansion [100].
The nonlinear state space equations of the WIP can be written as
where x∈ℝ5, u∈ℝ2, and y∈ℝ5.
Considering (4.1), the equilibrium point of the system may be found by solving
The equilibrium points are found to be at (x 0,u 0)=(0,0). This is followed by doing a Taylor series expansion of (4.1) about the equilibrium point, which results in
The partial derivatives are evaluated at the operating point, and neglecting the higher order derivatives yields
It is noted that the matrix C in Eq. (4.3) is already constant and it therefore does not need to be linearized. The resulting linearized state space representation of the system is given by
where A and B are constant matrices defined as
Following the linearization of the system, the controllability and observability matrices of the resulting system given by M=(B AB A 2 B … A 4 B) and O=(C CA CA 2 … CA 4)T are calculated using MATLAB. Both the matrices are found to have full rank of 4. This implies that the linearized system is both controllable and observable.
Using the dynamics model presented in Chap. 3, the dynamic model of the vehicle is linearized around the point \(\alpha=\dot{\alpha}=0\), \(\theta=\dot{\theta}=0\). Ignoring the nonholonomic constraints (x 0, y 0), we define the following 5-dimensional vector of state variables
Using the dynamic model, the linearized vehicle model can be expressed in the following state space form
where
The coefficients in the matrices in (4.12) are constant but known. The state–space model (4.12) of the vehicle consists of two decoupled subsystems—the first of these which comprises the first three equations is a “pendulum”-type system, and the second is rotation system. We assume that the state variables are measured and available for feedback control.
4.3 PD Control Design
Consider the linearized state system (4.7), let the desired state x d , and the actual state x, and define e=x d −x, consider the control as
The control law is given by
where K is designed coefficient. A PD controller is used for each displacement and displacement rate pair of the WIP system, and the block diagram of the closed loop system is shown in Fig. 4.1.
Introducing the control (4.13), the closed loop state space equation can be rewritten as
and the closed loop characteristic equation is
Therefore, for the closed loop system with poles at the desired pole locations defined by Eq. (4.15), the elements of K must be chosen such that the desired poles location is within the negative plane. Two conditions must be satisfied for the successful placement of all the closed loop poles. The first requires the ability to measure all the state variables in the system, or the capability of estimating certain states with the use of a state observer. The other requirement is for the system to be completely state controllable. This condition would allow the arbitrary placement of the closed loop poles. For the linear wheeled inverted pendulum system, it had been shown earlier that the system is both controllable and observable. This satisfies both of the conditions stated above.
4.4 LQR based Optimal Control Design
In the design of Linear Quadratic Regulator (LQR) controllers [100], it is necessary to be able to select appropriate values for the gain matrix K in the linear control law, such that a cost function is minimized. The control law and cost function for a system with real vectors are
The cost function can be described as
The cost function is a function of the matrix of states, e∈ℝn×1, and the matrix of inputs, u∈ℝm×1, in the MIMO case. Q∈ℝn×n and R∈ℝm×m are symmetric positive definite matrices. Matrices Q and R are chosen depending on the amount of cost the designer wants to attribute to each element of state or input. Allocating a larger cost for certain parameters (e and u) would imply that their performance would be placed at a higher priority over the others. For example, if the input is allocated a high relative cost factor, the controller would be optimized in a way such that the control task is attained with as little input as possible.
To solve for the matrix K, the following reduced matrix Riccati Equation is solved for the matrix P∈ℝn×m
where P is a positive definite matrix that always exists when the closed loop system is stable (i.e., the matrix (A−BK) is stable), and R is positive matrix. With the solution for P, which, the matrix K may be obtained from
Then, the we can design the control from the above equation.
4.5 H ∞ Control
H ∞ is a robust control, which can realize disturbance attenuation. For the system (4.12), we can rewrite as
where ω is external disturbance vector, z is the performance signal, and D 1=0.
The objective of the control is list as follows:
(1) If x=0 is the close loop operation point, and for any initial state x(0)∈ℝ5, x(t)→0; (2) for any disturbance \(\omega \in L^{2}_{\infty}\), the close loop can realize disturbance attenuation, that is,
where q i ≥0, i=1,…,6, and p>0 is coefficient, let
which is equivalent to
If we define the transfer function as T ω (s) for ω and z as
then the disturbance attenuation performance is equivalent to ∥T ∞∥∞<1.
4.5.1 Riccati-Based H ∞ Control
Theorem 4.1
Consider the system (4.12), the control law is designed as follows:
where the symmetric positive definite matrix P satisfies the following Riccati-like equation
where γ is the attenuation levels, Q=Q T>0 is a prescribed weighting matrix and R is a gains matrix. Then the proposed control law can guarantee the global stability and robustness of the closed-loop system and achieve the following H ∞ tracking performance:
where λ min(Q) is the minimal eigenvalue of Q.
Proof
Choose a Lyapunov function as
The time derivative of V along the error trajectory is
In summary, by completing the squares and using the control input in (4.27) and the Riccati-like equation in (4.28) the derivative \(\dot{V}\) can be bounded as
Integrating the above inequality (4.32) yields
Since V(t)≥0, we obtain the following L 2 criterion:
The knowledge that Q is a positive definite matrix and the fact that λ min(Q)x T x≤x T Qx imply
Using Barbalat’s lemma, one can see that the tracking error converges to zero in an infinite time. □
Remark 4.2
The inequality (4.33) reveals that the integrated squared error of x is less than or equal to the sum of V(0) and the integrated squared error of x. Since the V(0) is finite, if x is squared integrable then we can conclude that x will approach to zero.
Remark 4.3
From (4.34), if the systems starts with the initial condition V(0)=0, i.e., x(0)=0, the L 2 gain must satisfy
where \(\|x\|^{2}=\int_{0}^{t} x^{T}x\, dt\) and \(\|\omega\|^{2}=\int_{0}^{t}\|\omega\|^{2} \,dt\). Inequality (4.35) indicates that when smaller attenuation levels γ is specified, a better tracking performance can be achieved.
4.5.2 LMI-Based H ∞ Control
The H ∞ state-feedback control objective is a synthesis of a state-feedback that renders the underlying system L 2-gain <γ. For this, we design the state-feedback controller of the form
where the gain matrix K is yet to be determined. Using (4.37) in (4.12), the closed-loop system admits the following
A solution to the tracking problem within the H ∞ control context amounts now to the determination of a gain matrix K which is stabilizing (internally) the closed-loop system, and in addition, achieves L 2-gain <γ.
The attenuation of external disturbances is guaranteed considering the H 1 performance related to the state x(t) as follows
The control law is based on the classical structure as
where K are gain matrices with appropriate dimension.
Theorem 4.4
Assume there is a gain-matrix K such that the closed-loop system (4.38) is dissipative with respect to the supply rate γ 2∥ω∥2−∥z∥2, with the energy function given by (4.31), that is,
Then the closed-loop system (4.38) is globally asymptotically (internally, i.e., ω=0) stable, and it has L 2-gain <γ.
Proof
Consider the following candidate Lyapunov function:
with P=P T>0, The stability of the closed-loop model (4.38) is satisfied under the H ∞ performance (4.39) with the attenuation level γ if
The condition (4.43) leads to
or equivalently
□
4.6 Backstepping
Considering the linearized model (4.12), we can decouple the state–space model (4.12) into the rotation subsystem, which composes of the first two equations, and the pendulum-type subsystem, which consists of the left three equations. First, a control for the pendulum part of the system is designed. Consider the pendulum-subsystem of (4.12) for the tilt angle α as
where f(x 1) and b are known coefficients from (4.12). The control objective is to regulate the tilt angle α to zero. The procedure of backstepping control is design as:
Step 1
Define the state error as
where z d is reference signal. Then
Define a virtual signal as
where c 1>0. Define z 2=x 2−α 1. Choose the Lyapunov function candidate as
Then, we have
Substitute (4.50) into (4.52), we have
If z 2=0, then \(\dot{V}_{1}\leq 0\).
Step 2
Define Lyapunov function as
Since
then
In order to \(\dot{V}_{2}\leq 0\), we choose
where c 2>0, then we have
The stability properties of (4.58) follows from (4.54). Since V 2 is positive definite and \(\dot{V}_{2}\) is negative semidefinite, we have that z 1, z 2 uniformly bounded, and also that z 1→0, z 2→0 as t→∞. Using (4.57), we conclude that the control (4.57) is also bounded. From (4.46) and (4.47), it follows that x 1 and x 2 are also bounded and converge to zero.
Remark 4.5
Once the tilt angle α has been stabilized, in order to drive the vehicle with a desired velocity v d , the vehicle speed can be stabilized, by completing the control (4.57) with an additional term, as follows
where K 1 is positive gains.
Remark 4.6
For the rotation subsystem, in order to drive the vehicle with a desired direction angle θ d , the vehicle rotation speed can be stabilized, the control input u 2 can be designed as
where K 2 is positive gains.
4.7 Simulation Studies
4.7.1 PD Control
From the model described previously, there are a number of dynamic parameters in the system, which will result in variations of the state matrices. To include the influences of parameter uncertainty into simulation. The linearized WIP with the initial conditions α(0)=−10 degree, \(\dot{\alpha}(0)=0\), v(0)=0, \(\theta(0)=\dot{\theta}(0)=0.0\), and M=10 kg, m w =0.5 kg, m=5.0 kg, 2l=0.5 m, d=0.5 m, r=0.5 m, I p =2.0 kg m2, it is easy to have the linear state equation as
In the simulation, A and BK are 6×6 matrices, there should be 6 poles, if we choose the pole point as [10−10i,−10+10i,−10,−20,−10,−20], it is easy to obtain K=[−1.0592×1.0e 4,−0.1723×1.0e 4,−1.8027×1.0e 4,−0.4507×1.0e 4,400,60]T, the initial condition of x(0)=[−10/57.3,0,0.20,0,0.5,0]T, then, we can obtain the response of the system output shown in Figs. 4.2–4.6.
From the simulation plots, it was observed when matrices A and B are constants over time, the system is stable and able to follow the reference inputs despite the longer settling time. However, it is obvious that the system will be stable only when the uncertainties vary over a small range of values, and the stability of the controller to perform according to the desired specifications will then depend on whether the uncertainties stay within certain bounds.
4.7.2 LQR Control
A controller based on LQR design is used for the linearized WIP, with the initial conditions α(0)=−10 degree, \(\dot{\alpha}(0)=0\), v(0)=0, \(\theta(0)=\dot{\theta}(0)=0.0\), and M=10 kg, m w =0.5 kg, m=5.0 kg, 2l=0.5 m, d=0.5 m, r=0.5 m, I p =2.0 kg m2, the friction coefficient μ=0.005. In order to examine the effects of having different performance indices on the system response, the simulation is performed for Q and R, using LQR design, we select \(Q = \operatorname{diag}[100, 10 ,1 ,1, 1, 1 ]\), R=0.1, using (4.19), we have K=[−352.4578,−58.3972,−3.1623,−11.6735,3.1623,4.7591]T. The response of the system to each set of Q and R’s are shown in Figs. 4.7–4.11.
4.7.3 H ∞-Like Riccati Control
For the linearized WIP, with the initial conditions α(0)=30 degree, \(\dot{\alpha}(0)=0.2~\mbox{degree/s}\), v(0)=0, \(\theta(0)=\dot{\theta}(0)=0.0\), and M=4 kg, m w =0.5 kg, m=2.0 kg, 2l=0.5 m, d=0.5 m, r=0.5 m, I p =2.0 kg m2. From (4.23), we choose q 1=q 2=⋯=q 6=1.0, and p=1. For solving Riccati equation (4.28), we choose B=[B 1,B 2], and
and \(R=\operatorname{diag}[-1,1,-1,1]\), we can obtain the gain as K=[185.1260,2.0189,31.0858,11.7312,−0.7217,−1.8783]T, then the corresponding responses are listed in Figs. 4.12–4.16.
4.7.4 LMI-Based H ∞ Control
For the linearized WIP, with the initial conditions α(0)=30 degree, \(\dot{\alpha}(0)=0.2~\mbox{degree/s}\), v(0)=0, \(\theta(0)=\dot{\theta}(0)=0.0\), and M=10 kg, m w =0.5 kg, m=5.0 kg, 2l=0.5 m, d=0.5 m, r=0.5 m, I p =2.0 kg m2. From the system parameters chosen above, we can solve (4.45) using the LMI toolbox in the MATLAB and obtain K=[1175.8,10.8,192.4,55.5,−1.0258,−1.9419], therefore the system output are listed in Figs. 4.17–4.21.
4.7.5 Backstepping Control
Consider the linearized WIP (4.12), choose the desired trajectory of α as z d =0.1sin(πt), the control parameters c 1=c 2=35, using the control (4.57), we can achieve the following output in Figs. 4.22–4.25.
4.8 Conclusion
In this chapter, we first present the linear model of wheel inverted pendulum, then PD, LQR, H ∞ and backstepping controllers have been implemented for WIP. There are several ways to design a PD controller. In this chapter, the pole placement method was used. This technique allows the designer to specify the response of the closed loop system, but lacks the insight into robustness performance of the system. The response of the single WIP system is also examined for the case when its dynamics parameters vary with time. Comparisons are made between the performance of an LQR controller and PD controller. Finally, H ∞ and backstepping controllers are employed to verify the effectiveness of the linear control approaches.
References
Blankespoor, A., Roemer, R.: Experimental verification of the dynamic model for a quarter size self-balancing wheelchair. In: American Control Conference, Boston, MA, June 2004, pp. 488–492 (2004)
Grasser, F., Arrigo, A., Colombi, S., Rufer, A.C.: JOE: a mobile, inverted pendulum. IEEE Trans. Ind. Electron. 49(1), 107–114 (2002)
Ha, Y.S., Yuta, S.: Trajectory tracking control for navigation of the inverse pendulum type self-contained mobile robot. Robot. Auton. Syst. 17, 65–80 (1996)
Kim, Y., Kim, S.H., Kwak, Y.K.: Dynamic analysis of a nonholonomic two-wheeled inverted pendulum robot. J. Intell. Robot. Syst. 44, 25–46 (2005)
Ogata, K.: Modern Control Engineering. Prentice Hall, New York (1997)
Pathak, K., Franch, J., Agrawal, S.K.: Velocity and position control of a wheeled inverted pendulum by partial feedback linearization. IEEE Trans. Robot. 21(3), 505–513 (2005)
Salerno, A., Angeles, J.: On the nonlinear controllability of a quasiholonomic mobile robot. In: Proc. IEEE Int. Conf. Robotics and Automation, pp. 3379–3384 (2003)
Salerno, A., Angeles, J.: The control of semi-autonomous two-wheeled robots undergoing large payload-variations. In: Proc. IEEE Int. Conf. Robotics and Automation, pp. 1740–1745 (2004)
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag London
About this chapter
Cite this chapter
Li, Z., Yang, C., Fan, L. (2013). Linear Control. In: Advanced Control of Wheeled Inverted Pendulum Systems. Springer, London. https://doi.org/10.1007/978-1-4471-2963-9_4
Download citation
DOI: https://doi.org/10.1007/978-1-4471-2963-9_4
Publisher Name: Springer, London
Print ISBN: 978-1-4471-2962-2
Online ISBN: 978-1-4471-2963-9
eBook Packages: EngineeringEngineering (R0)