Abstract
This paper presents a control design method for implementing planar turning motion of a two-wheeled inverted pendulum with an input delay. The control task requires that the inverted pendulum is kept stabilized during the whole turning motion process along a pre-settled curve. Firstly, by using the theory of planar curve, key observations about the motion law of the two-wheeled mobile chassis are made and they are used to set up a dynamical trajectory tracking target. Then, by adjusting the parameters in the tracking target and the weights in the quadratic performance criterion, the optimal integral sliding mode controller based on a linear quadratic regulator is designed for keeping the vehicle body stabilized and tracking a circular path for the two-wheeled inverted pendulum. An illustrative example is given to demonstrate the validity of the theory with numerical simulation.
Similar content being viewed by others
1 Introduction
Two-wheeled inverted pendulum (TWIP, for short) is a general term for mechanical models driven by two wheels with a rod of pendulum mounted on the chassis. It is a self-balancing system and has some remarkable superiorities, such as simple structure, good dexterity, true zero turning radius, small footprint, low cost and low energy consumption [1]. Thus, it has been more and more widely used in human transporters and humanoid robots. However, the dynamics analysis and motion control design of TWIP systems are still challenging, because a TWIP is an essential nonlinear and under-actuated system, and the two wheels of the TWIP are subjected to nonholonomic constraints when the wheels move by rolling rather than slipping. The nonholonomic constraints of a TWIP are described by the motion equations of the mobile chassis, which not only restrain the motion displacement, but also the motion velocity that is not integrable. The flexibility of nonholonomic systems is superior to the holonomic ones, because the state of a mechanical system with nonholonomic constraints can be reached to any location in the displacement space. Thus, in some applications, nonholonomic structures are intentionally introduced to the manipulating device to implement intricate motion functions [2]. Usually, the nonholonomic systems are firstly transformed into chain normal forms. Then, different kinds of control methods, based on chain systems, can be used to design controllers for the original nonholonomic systems [3, 4]. In addition to the chain normal form, power form and Goursat normal form are two other kinds of normal forms, which can be also used to deal with nonholonomic systems [5, 6]. However, the designed controllers based on these kinds of normal forms are focused on speeds, rather than forces or moment of force, which are more aligned with an actual motion control problem of the nonholonomic mechanical system. Thus, the motion equations and dynamics equations of a nonholonomic mechanical system should be simultaneously considered in the control design for implementing a given motion task.
Stabilization of the inverted pendulum is a pre-requisite in many control applications of a TWIP, whereas the strong nonlinearity of the inverted pendulum is a major difficulty in the control design. For some nonlinear Lagrangian mechanical systems, the Chernousko’s decomposition method and its extension [7, 8] have been used for designing constrained feedback control to implement prescribed control objectives. Especially, for a pendulum-like system, a time-optimal feedback control with several switchings which is not greater than one for any initial condition was proposed in [9]. When the external disturbances and system uncertainties are taken into consideration, different kinds of robust control design methods have been designed to stabilize the TWIP, such as combined control with a decoupled LQR controller and two state variable controllers [10, 11]; nonlinear disturbance observer-based dynamic surface control [12]; sliding mode control [13, 14]; adaptive backstepping control [15] and so on. For the motion control design problem of the TWIP, most of the available works about controller design usually use the given longitudinal and yaw rotational speeds as tracking targets. Based on the dynamics equations of the TWIP, neural network-based control [16], fuzzy logic control [17] and adaptive control combined with some classical control methods have been proposed to design trajectory tracking controllers to track the given longitudinal and yaw rotational speeds target [18,19,20,21,22]. However, few works on the TWIP are devoted to design controllers for implementing a given motion trajectory curve in the Cartesian frame. The main difficulty for this motion control problem is that the relationship between the target trajectory curve and the forward and yaw rotation speeds of the TWIP is not clear. In [23, 24], for example, the forward and yaw rotational speeds are considered as the intermediate variables, which are denoted as the control input of the motion equations and the control output of the dynamics equations simultaneously. Then, a composite controller for implementing a given motion task is designed by using direct/indirect adaptive fuzzy control to track the trajectory path, plus a sliding mode control to render the stabilizing process of the vehicle body with strong robustness. In [25], two high gain observers are proposed for estimating the forward and yaw rotational speeds of a two-wheeled mobile robot without an inverted pendulum. Then, an adaptive output feedback tracking controller is designed to implement the circular motion by using the estimated velocities. In addition, time delays in controllers and uncertainties from modeling or measurement or perturbation are usually inevitable in real applications, but they are usually ignored in the literature [1]. The most popular methods to deal with input delay are related to the prediction-based compensation control strategy [26,27,28]. However, input delay is very important especially when some robust controls with high-frequency switching mechanism such as sliding mode controls are used, where the existence of input delay would lead to reversed control if the input delay is ignored. In fact, TWIP is a natural high-frequency vibration system, when the rod of pendulum is stabilized at the unstable equilibrium point. As shown in [27], a very small input delay may enlarge the vibration amplitude of the TWIP system remarkably in the trajectory tracking problem by using integral sliding mode control. Therefore, the input delay, although very small, is one of our major concerns in the control design of a TWIP.
In this paper, a controller design method for a TWIP to run along a given trajectory curve is proposed, for which the nonholonomic constraints must be considered. The design consists of two parts: One is the use of curvature theory to tracking the trajectory path precisely, and the other is the use of integral sliding mode control to stabilize the vehicle body robustly. Section 2 is the problem statement, Sect. 3 presents the key observations of the motion laws, Sect. 4 focuses on the controller design based on the observations, Sect. 5 demonstrates the main results with a numerical example, and finally, Sect. 6 ends with some concluding remarks.
2 Problem Statement
Figure 1 is a schematic diagram of the TWIP model, with the parameters and variables of the TWIP described in Table 1. Two kinds of equations are used to describe the motion of the TWIP: One is the equations featuring the motion of the chassis, and the other is the equations characterizing the dynamical behaviors of the whole TWIP.
Let \(\mathbf{q }=(x_o,y_o,\theta ,\varphi ,\theta _\mathrm{r},\theta _\mathrm{l})\) be the generalized coordinates of the TWIP. If the wheels run under the conditions of pure rolling and nonslipping, then, the motion equations are given by the following nonholonomic constraints
Let \(v_{T}\), v, \(\omega \) be the lateral speed, forward speed and yaw rotational speed of the mobile chassis, respectively. Then, \({\dot{x}}_o=v\mathrm{cos}\theta \), \({\dot{y}}_o=v\mathrm{sin}\theta \), and the motion equations, namely Eq. (1), are equivalent to the following equations
The dynamics equations of the TWIP model can be obtained by using the Euler–Lagrange equations for nonholonomic systems as done in our previous paper [28]:
where
\(u_1\) and \(u_2\) are the torque controllers acted on the wheels. Equation (3) is nonlinear, its control design is usually difficult by using the prediction-based control methods [26], especially when the input delay is taken into account. However, the control task requires that \(\varphi \) is small during the whole motion process, so the control design can be based on the linearized equation with respect to \(\varphi \) round \(\varphi =0\). Let \(\mathbf{X }=[x_1,x_2,x_3,x_4]^\mathrm{T}=[\varphi ,{\dot{\varphi }},x,v]^{\mathrm{T}}\) be the state vector, and
where \(\mathbf{A }_0(t)\) is time-variant due to the time-dependence of \(\omega (t)\). Then, the linearized equation is given by
if the input delay \(\tau >0\) is taken into account. Taking model uncertainty, linearization error and external disturbances into account, Eqs. (4), (5) are represented as
respectively, where \(\varvec{\sigma }_{1}^{0}(t)\) and \(\sigma _2(t)\) stand for the integration of the model uncertainty, linearization error and bounded external disturbances.
The control objective is to design a delayed controller \((u_1(t-\tau ),u_2(t-\tau ))\), so that the TWIP runs along a pre-settled pathway \(\varGamma (t)=(x_o(t),y_o(t))\) and keeps the tilt angle \(\varphi \) small enough.
3 Key Observations about Motion Equations
For clarity in presentation, the turning motion is made in a plane, and \(\dot{\theta _\mathrm{r}}>\dot{\theta _\mathrm{l}}>0\) is assumed to be true, so that the mobile chassis turns to the left in the plane, as shown in Fig. 2. A key observation of this paper is that a pair of known rotational speed \((\dot{\theta _\mathrm{r}},\dot{\theta _\mathrm{l}})\) of the two wheels determines uniquely a motion trajectory curve \((x_o(t),y_o(t))\) to the center point O, and conversely a known motion trajectory curve \((x_o(t),y_o(t))\) of the center point O determines uniquely a pair of rotational speed \((\dot{\theta _\mathrm{r}},\dot{\theta _\mathrm{l}})\) to the two wheels. More precisely, one has
Theorem 3.1
Let \((\dot{\theta _\mathrm{r}},\dot{\theta _\mathrm{l}})\) be the pair of rotational speed of the two wheels, \((x_o(t),y_o(t))\) be the coordinate of the motion trajectory curve to the center point O, \(k_o(t)\) be the relative curvature of the trajectory curve, v and \({\dot{\theta }}\) be the forward speed and yaw rotational speed of the mobile chassis, respectively. Then,
and
Proof
In a very small time interval \([t,~~t+\varDelta t]\), the movement distance of the two wheels can be approximated as \(\dot{\theta _\mathrm{l}}(t)r\varDelta t\) and \(\dot{\theta _\mathrm{l}}(t)r\varDelta t\), respectively. Thus, due to the effect of nonholonomic constraints, one has
where \(R_\mathrm{l},~R_\mathrm{r}\) are the turning radius of the two wheels, and \(R_\mathrm{r}=R_\mathrm{l}+d\). It follows that
due to Eq. (10). Therefore, the turning radius of the center point O is
and the corresponding relative curvature is
which depends on t, and can also be transformed to a function with respect to the length arc variable, described by
Under the assumption \(\dot{\theta _\mathrm{r}}>\dot{\theta _\mathrm{l}}>0\), one has \( {\dot{s}}(t)=\frac{r}{2} (\dot{\theta _\mathrm{r}}+\dot{\theta _\mathrm{l}})>0, \) which means that Eq. (13) defines an one-to-one mapping between the arc length variable and the time variable. Hence,
According to planar curve theory [29] and Eq. (14), the smooth function \({\hat{k}}_{o}(s)\) determines uniquely a smooth curve \(r(s)=(x_o(s),y_o(s))\). Substituting Eq. (13) into r(s), the trajectory curve \((x_o(t),y_o(t))\) can be easily calculated.
On the other hand, the required rotational speed of two wheels can also be obtained if the motion trajectory curve of the mobile chassis is given. Actually, \(k_o(t)\) can be expressed in the following formula
According to Eq. (12), it goes to
In addition, since
Then, by differentiation with respect to t, one has
Solving the rotational speed \((\dot{\theta _\mathrm{r}},\dot{\theta _\mathrm{l}})\) from Eqs. (16)–(18) gives Eq. (8), and substituting (8) to (2) gives (9). \(\square \)
Let \(\varGamma (s)=(x_o(s),y_o(s))~(s\in [0,l])\) be used for describing the pre-determined control pathway, where s is the arc length variable. Then, the tangent vector of \(\varGamma (s)\) must be an unit vector due to
Thus, the initial forward speed target would be a constant if \(\varGamma (t)=(x_o(t),y_o(t)),(s=t)\) is chosen as the trajectory tracking target. In this case, the initial speed error does not approach zero due to the fact that the initial velocity of the TWIP is zero. Thus, the actual location error of the TWIP would accumulate and becomes larger and larger due to the errors from the forward speed and the yaw rotation speed.
To reduce the initial speed error, an one-to-one smooth mapping \(s=\phi (t)\) is introduced. Then, the trajectory tracking target is given by \({\hat{\varGamma }}(t)=(x_o(\phi (t)),y_o(\phi (t))).\) It follows that
Thus, in order that the initial speed error is zero and without jumping, the function \(\phi (t)\) is required to satisfy
such a function can be chosen in different ways. For example, if the speed of the TWIP is expected to be zero, when the motion task is finished, the function \(\phi (t)\) can be chosen to satisfy \({\dot{\phi }}(t)=\alpha t \mathrm{e}^{-\beta t}\). In this case,
where \(\alpha>0,~\beta >0\) and \(\gamma >0\) are parameters to be determined from
Hence, \(\gamma =l,~~\alpha =l \beta ^2,\) and \({v}={\dot{\phi }}=l\beta ^2 t\mathrm{e}^{-\beta t}\). In this case, the smooth function \(s=\phi (t)\) is found to
Lemma 3.1
For a given motion task path \(\varGamma (s)=(x_o(s),y_o(s)),~s\in [0,l]\), the one-to-one smooth mapping (20) can be used for designing a trajectory tracking target \(\varGamma (t)=(x_o(\phi (t)),y_o(\phi (t)))\), which has zero initial velocity and zero terminal velocity.
4 Controller Design Based on Curvature Tracking and Optimal Control
The control problems of a TWIP can be roughly classified into two categories: trajectory planning and controller design, which are usually studied separately in the literature. In this section, trajectory planning plays a very important role in the controller design.
4.1 A Dynamical Trajectory Tracking Target
Note that the dynamics equation (3) merely described the relationship between the control variables and the forward speed and yaw rotation speed of the TWIP, and the position coordinate \((x_o(t),y_o(t))\) is implemented indirectly by the forward speed and yaw rotation speed. Therefore, any tracking error of position with two position coordinates \(x_o(t)\) and \(y_o(t)\) may cause inward movement or outward movement, and consequently, tracking \((x_o(t),y_o(t))\) may lead to large error of the position with the increases of the error accumulation. However, the smooth curvature function \(k_o(t)\) fully determines the shape of a trajectory curve \(\varGamma (t)=(x_o(t),y_o(t))\), the difference between two curve expressions with the same curvature is nothing but tangential speed. This means that when \(k_o(t)\) is tracked, \(\varGamma (t)\) is tracked accordingly no matter what the tangential speed is. Thus, for the trajectory tracking problem, it is very important to keep \(k_o(t)\) well tracked, while the speed v(t) of the TWIP can be either slow or not slow. Due to \(\omega (t)=k_o(t)v(t)\), the relationship among the actual yaw rotational speed, actual forward speed and the curvature of the actual motion trajectory curve, \(k_o(t)\) is tracked if the dynamical tracking target \({\tilde{\omega }}(t)=k_o(t)v(t)\) is tracked. Let \({\tilde{v}}={\dot{\phi }}(t)\) be chosen as a static tracking target of v(t) with a smooth function \(\phi (t)\) satisfying (19). Then, one has
Theorem 4.1
Let \(\varGamma (s)=(x_o(s),y_o(s)),~s\in [0,l]\) be a given trajectory curve, \(k_{o}(s)\) be the relative curvature of \(\varGamma (s)\), and v(t) be the actual forward speed of the TWIP. Then, the dynamical trajectory tracking target for implementing the motion task of walking along the given curve \(\varGamma (s)\) can be designed as
where \(s=\phi (t)\) is an one-to-one smooth mapping required in Lemma 3.1.
As a matter of fact, \({\tilde{v}}\) is a pre-determined tracking target, which can be pre-adjusted for better control effect in an actual problem. However, the so-called dynamics tracking target \({\tilde{\omega }}\) is state-dependent with the actual forward speed, which is varying dynamically from moment to moment.
4.2 Optimal Integral Sliding Mode Control Design
Because Eqs. (6) and (7) are decoupled, the controllers \(u_1(t-\tau )\) and \(u_2(t-\tau )\) can be designed separately.
The matrix \(\mathbf{A }_{0}(t)\) in Eq. (6) is time-variant and can be decomposed into \(\mathbf{A }_{0}(t)=\mathbf{A }+\varDelta \mathbf{A }\), where
The modeling error \(\varDelta \mathbf{A }\mathbf{X }(t)\) of the linearized system is
System (6) can be rewritten as the following equation if slow motion speed of the TWIP is considered
where the error part \(\varDelta \mathbf{A }\mathbf{X }(t)\) is combined into \(\varvec{\sigma }_1(t)\), and \(\varvec{\sigma }_1(t)=\varvec{\sigma }_{1}^{0}(t)+\varDelta \mathbf{A }\mathbf{X }(t)\).
Let \(\tilde{\mathbf{X }}=[{\tilde{x}}_1,{\tilde{x}}_2,{\tilde{x}}_3,{\tilde{x}}_4]^\mathrm{T}=[0,0,{\tilde{x}},{\tilde{v}}]^{\mathrm{T}}\) be the trajectory tracking target vector to be designed according to the given motion task, \(\mathbf{Y }(t)=\mathbf{X }(t)-\tilde{\mathbf{X }}(t)\) be the error vector of system (22), and \(\varvec{\eta }_{1}(t):=\mathbf{A }\tilde{\mathbf{X }}-\dot{\tilde{\mathbf{X }}}\). Then, system (22) governing the tracking error takes the form
In order to have a small tilt angle of the pendulum, so that the control design can be made on the basis of the linearized system, a quadratic performance criterion with large weight of the tilt angle is introduced as follows:
where \(\mathbf{Q }_{0},\mathbf{Q }_{1}\) are nonnegative definite symmetric matrices, \(\mathbf{R }\) is a positive definite symmetric matrix, and \(t_f\,(>2\tau )\) is the terminal time of the control. With a large weight of the tilt angle error in J, the tilt angle error can be forced to be small enough, when an optimal control is applied. Hence, the linearization error is small and can be considered as bounded. Moreover, for clarity, let \({\tilde{v}}={\dot{\phi }}(t)\) be the tracking target of the forward speed v(t) with \({\dot{\phi }}=l\beta ^2 t\mathrm{e}^{-\beta t}\). So v(t) becomes small if the target speed is small by using a small number \(\beta \). It follows that the yaw rotational speed \(\omega (t)\) is small enough, and consequently, \(\varDelta \mathbf{A }\mathbf{X }(t)\) becomes small enough, when the quadratic performance criterion (24) is minimized. In this way, there is a constant \(D_1 > 0\) such that
Usually, it is not an easy task to solve the Riccati differential equation for the LQR optimal control problem, when \(t_f>0\) in Eq. (24) is finite. For any given sufficiently small \(\varepsilon >0\), a real number \(\beta \) may be chosen to satisfy
This means that the controller can be designed simply by solving an algebraic Riccati equation if the performance criterion (24) is replaced by
Here, the trajectory tracking target design is very important in the turning motion control problem of the TWIP. According to Lemma 3.1, the designed trajectory tracking target with zero initial velocity and zero terminal velocity is in agreement with the actual problem in most cases. This leads to a small location error in the whole process and a simple algebraic Riccati equation to be solved. Moreover, small forward velocity of the trajectory tracking target can be designed to keep the tilt angle of the pendulum small enough by choosing a small parameter \(\beta \).
Now, it is in the position to design the controller by following the method proposed in [27]. Firstly, by introducing an integral transformation given by
the delayed system (23) is transformed into an equivalent delay-free system as follows:
where \(\mathbf{B }_0=\mathrm{e}^{-\mathbf{A }\tau }\mathbf{B }\), the new state \(\mathbf{Z }(t)\) and the error state \(\mathbf{Y }(t)\) satisfy the following relationship [27]
With \(\tilde{\mathbf{Q }}_{1}=\left( \mathrm{e}^{\mathbf{A }\tau }\right) ^{\mathrm{T}}\mathbf{Q }_{1}\mathrm{e}^{\mathbf{A }\tau },\,\tilde{\mathbf{Q }}_{0}=\left( \mathrm{e}^{\mathbf{A }\tau }\right) ^{\mathrm{T}}\mathbf{Q }_{0}\mathrm{e}^{\mathbf{A }\tau }\), the quadratic performance criterion can be rewritten as
where \(J_1=\frac{1}{2}\int _0^{\tau }\mathbf{Y }^\mathrm{T}(t)\mathbf{Q }_{1}\mathbf{Y }(t)\mathrm{d}t\) is fixed, because the control does not take effect when \(t\in [0,\tau [\).
The nominal system of (29) is given by
According to [27], the optimal control of system (32) that minimizes the quadratic performance criterion J is
where \(\mathbf{P }_z(t)\in {\mathbb {R}}^{n\times n}\) and \(\mathbf{b }_z(t)\in {\mathbb {R}}^{n}\) are the solutions of the following Riccati differential equations
In order to design a robust controller against the effect of \(\varvec{\sigma }_1(t+\tau )\), the optimal state of the normal system (32) is chosen as the integral sliding mode manifold. Let the sliding mode function be
where \(\mathbf{G }\in {\mathbb {R}}^{m\times n}\) is a constant matrix, and \(\mathbf{G }\mathbf{B }_0\) is assumed nonsingular, and \(\mathbf{Z }^{*}(0)\) is the initial value of the nominal system (32) described by
\(\varvec{\digamma }_1(\mathbf{Z }(t))=\mathbf{0 }\) is the sliding mode manifold, which is actually the optimal state of the nominal system (32). Thus, according to Eq. (30), the delayed robust optimal controller of system (23) is given by
where
and \(\bar{\mathbf{Y }}(t)\) is the predictor state of \(\mathbf{Y }(t)\) defined by
Similarly, for Eq. (7), assume that there is a constant \(D_2\) satisfying
and define the sliding mode function as
where \({\hat{g}}\ne 0\) is a constant, \({\tilde{\omega }}\) is the tracking target. Then, the delayed robust control of system (7) is designed by
where \(u_{10}(t-\tau )=\frac{\dot{{\tilde{\omega }}}}{B_2}\) is an open-loop control,
and \(B_2=\frac{rd}{\varOmega +2Ml^2 r^2}\), \({\bar{\omega }}(t)\) is the predictor state of \(\omega (t)\) defined by
The existence of the sliding mode motion and the accessibility within finite time of the sliding mode manifold can be proved in a similar way as in [27].
The optimal state of system (32) and the open-loop state of system (5) actuated by the open control \(u_{10}(t-\tau )\) are the optimal states for implementing the original turning motion task. The linearization errors and system uncertainties are dealt with using the switched control parts \(u_{21}(t-\tau )\) and \(u_{11}(t-\tau )\). Thus, the original turning motion control problem of the TWIP can be well implemented by using the proposed control method from a theoretical perspective.
In summary, the controller for the turning motion of a TWIP can be designed as follows.
Theorem 4.2
Let \(\varGamma (t)=(x_o(s),y_o(s)),~s\in [0,l]\) be a given smooth trajectory curve in the plane, in order to compel the TWIP move along the given trajectory curve, the delayed controller \((u_2(t-\tau ),~u_1(t-\tau ))\) can be designed by Eqs. (37) and (40), where \(k_{o}(s)\) is the relative curvature of \(\varGamma (s)\),
where \(\beta \) is a parameter to satisfy (26) for a given \(\varepsilon >0\), \({\bar{y}}_4\) is the fourth variable in the predictor state \(\bar{\mathbf{Y }}(t)\), and \(\phi (t)=-(\beta t+1)l \mathrm{e}^{-\beta t}+l\) is the one given in Lemma 3.1.
5 An Illustrative Example
In this section, numerical simulation is made for fixed parameter values and initial values: \(M=3\,\mathrm{kg},~M_\mathrm{w}=2\,\mathrm{kg},~~~~ I_\mathrm{B}=1\,\mathrm{kg\,m}^2,~I_\mathrm{w}=0.01\,\mathrm{kg\,m}^2, ~ I_z=0.01\,\mathrm{kg\,m}^2,~I_\mathrm{wd}=0.005\,\mathrm{kg\,m}^2,~l=0.5\,\mathrm{m}, ~r=0.1\,\mathrm{m},~d=0.2\,\mathrm{m},~g=9.8\,\mathrm{m/s}^2, \tau =0.01\,\mathrm{s}, ~ \mathbf{R }=1,~ \mathbf{Q }_{0}=\mathbf{0 }, ~\mathbf{Q }_{1}=\mathrm{diag}(10000,0,100,100),~ \varphi (0)=0,~ {\dot{\varphi }}(0)=0,~x(0)=0,~v(0)=0,~\omega (0)=0.\) The matrices \(\mathbf{A }\) and \(\mathbf{B }\) in system (22) become
and system (7) becomes \({\dot{\omega }}=-12.5u_{1}(t-\tau )+\sigma _2(t)\).
Let the task pathway be a circle defined by \(\varGamma (s)=(\mathrm{cos}s,~\mathrm{sin}s)\) for \(s\in [0,2\pi ]\). According to Sect. 4.1, with \(\beta =\frac{1}{2}\), the trajectory tracking target is given by
and the trajectory tracking target vector of system (22) is \(\tilde{\mathbf{X }}=[0,0,{\tilde{x}},{\tilde{v}}]^{\mathrm{T}},\) where \({\tilde{x}}=-(2\pi +\pi t) \mathrm{e}^{-\frac{1}{2}t}+2\pi \). Note that the time interval of the trajectory tracking target is converted to \([0,~+\infty [\), and the corresponding Riccati differential equation (34) becomes an algebra Riccati equation of the form
The MATLAB command lqr or MAPLE command CARE returns the solutions of (42) and (35) as follows
In the application of the proposed controller (37) and (40) for TWIP system with strong nonlinearity and an input delay, note that the main part of \(\varvec{\sigma }_1(t)\) and \(\sigma _2(t)\) is the overall errors between the linearized nominal system and the original system (3), and thus, from the linearized system (22) and (7), one has
where
Moreover, let \(\mathbf{G }=[0,1,0,1.8978],~{\hat{g}}=-\frac{1}{12.5}\), \(\mu _1=\mu _2=0.1,~D_1=D_2=0.51\), used in the above switched control. Then, all the quantities required in the delayed trajectory tracking controller (37) and (40) are available in hand. Now, the time histories of all the state variables can be simulated.
Figure 3 shows that the tilt angle of the pendulum becomes small enough and is stabilized after a short transient. Figures 4 and 5 present the time history of the tracking error of the forward speed and the yaw rotational speed, respectively. Figure 6 shows that the actual motion trajectory is extremely closed to the target trajectory curve, when the dynamical tracking target \({\tilde{\omega }}=k_o(t)v(t)\) is applied, and the location error is very large if the rotational speed target is chosen as a nondynamic target \({\tilde{\omega }}=\frac{{\dot{x}}_{o}\ddot{y}_{o}-\ddot{x}_{o}{\dot{y}}_{o}}{{\dot{x}}_{o}^2+{\dot{y}}_{o}^2}\). The so-called nondynamic target is pre-designed by using the pre-determined trajectory curve, which cannot be varied with the state variable. In this case, the cumulative error becomes larger and larger and cannot be reduced. The simulation results indicate that a given turning motion task of the TWIP is well achieved by using the proposed control method, and the vibration amplitudes of the state variables would be magnified obviously if the small input delay is ignored in designing controllers.
6 Conclusions
A special feature of this paper is the application of the theory of planar curve in designing the controller. Two major points can be deduced from the proposed control design. One is that in order to keep the TWIP walking along the target trajectory curve accurately, it is important to have the curvature of the target trajectory curve well tracked. Thus, the product of the curvature of the target curve and the forward speed of the TWIP is chosen as a dynamic yaw rotational target. When the dynamical yaw rotational target is designed in such a way, the tracking error of the position can be greatly reduced compared with the use of nondynamical tracking target. The other is that there are almost no limits to the forward speed target if one does not mind the amount of the motion speed in the whole motion process. The use of the forward speed as a target enables that the accumulative error caused by the initial speed error can be reduced dramatically, and the LQR-based optimal trajectory controller is easily determined simply by solving Riccati algebraic equations. Numerical simulations show that with the designed controller, not only the given trajectory curve is well tracked, but also the inverted pendulum is well stabilized.
References
Chan, R.P.M., Stol, K.A., Halkyard, C.R.: Review of modelling and control of two-wheeled robots. Annu. Rev. Control. 37(1), 89–103 (2013)
Chung, W.: Nonholonomic Manipulators. Springer, Berlin (2004)
Murray, R.M., Li, Z.X., Sastry, S.S.: A Mathematical Introduction to Robotic Manipulation. CRC Press, Boca Raton (1994)
Huang, J., Chen, J., Fang, H., Dou, L.H.: An overview of recent progress in high-order nonholonomic chained system control and distributed coordination. J. Control Decis. 2(1), 64–85 (2015)
Li, H., Yan, W., Shi, Y.: A receding horizon stabilization approach to constrained nonholonomic systems in power form. Syst. Control Lett. 99, 47–56 (2017)
Tilbury, R., Murray, R.M., Sastry, S.S.: Trajectory generation for the n-trailer problem using goursat normat form. IEEE Trans. Autom. Control 40(5), 802–819 (1995)
Reshmin, S.A.: The decomposition method for a control problem for an underactuated Lagrangian system. J. Appl. Math. Mech. 74(1), 108–121 (2010)
Ananevskii, I.M., Reshmin, S.A.: Decomposition-based continuous control of mechanical systems. J. Comput. Syst. Sci. Int. 53(4), 473–486 (2014)
Reshmin, S.A., Chernousko, F.L.: Properties of the time-optimal feedback control for a pendulum-like system. J. Optim. Theory Appl. 163(1), 230–252 (2014)
Da Silva Jr, A.R., Sup IV, F.C.: A robotic walker based on a two-wheeled inverted pendulum. J. Intell. Robot. Syst. 86(1), 17–34 (2017)
Halperin, I., Agranovich, G., Ribakov, Y.: Optimal control of a constrained bilinear dynamic system. J. Optim. Theory Appl. 174(3), 803–817 (2017)
Huang, J., Ri, S., et al.: Nonlinear disturbance observer-based dynamic surface control of mobile wheeled inverted pendulum. J. Intell. Robot. Syst. 23(6), 2400–2407 (2015)
Guo, Z.Q., Xu, J.X., Lee, T.H.: Design and implementation of a new sliding mode controller on an underactuated wheeled inverted pendulum. J. Frankl. Inst. 351(4), 2261–2282 (2014)
Liu, R.J., Li, S.H.: Suboptimal integral sliding mode controller design for a class of affine systems. J. Optim. Theory Appl. 161(3), 877–904 (2014)
Cui, R.X., Guo, J., Mao, Z.Y.: Adaptive backstepping control of wheeled inverted pendulums models. Nonlinear Dyn. 79(1), 501–511 (2015)
Yang, C.G., Li, Z.J., et al.: Neural network-based motion control of underactuated wheeled inverted pendulum models. IEEE Trans. Neural Netw. Learn. 25(11), 2004–2016 (2014)
Huang, J.G., Ri, M.H., Ri, S.: Interval type-2 fuzzy logic modeling and control of a mobile two-wheeled inverted pendulum. IEEE Trans. Fuzzy Syst. PP(99), 1–1 (2017)
Shojaei, K., Shahri, A.M., Tarakameh, A.: Adaptive feedback linearizing control of nonholonomic wheeled mobile robots in presence of parametric and nonparametric uncertainties. Robot. Comput. Integr. Manuf. 27(1), 194–204 (2011)
Al-Araji, A.S., Abbod, M.F., Al-Raweshidy, H.S.: Applying posture identifier in designing an adaptive nonlinear predictive controller for nonholonomic mobile robot. Neurocomputing 99, 543–554 (2013)
Chen, N.J., Song, F.Z., Li, G.P., Sun, X., Ai, C.S.: An adaptive sliding mode backstepping control for the mobile manipulator with nonholonomic constraints. Commun. Nonlinear Sci. Numer. Simul. 18(10), 2885–2899 (2013)
Li, Z.J., Zhang, Y.N.: Robust adaptive motion/force control for wheeled inverted pendulum. Automatica 46(8), 1346–1353 (2010)
Che, J.X., Santone, M., Cao, C.Y.: Adaptive control for systems with output constraints using an online optimization method. J. Optim. Theory Appl. 165(2), 480–506 (2015)
Yue, M., An, C., Da, Y., Sun, J.Z.: Indirect adaptive fuzzy control for a nonholonomic/underactuated wheeled inverted pendulum vehicle based on a data-driven trajectory planner. Fuzzy Sets Syst. 290, 158–177 (2016)
Yue, M., Wang, S., Sun, J.Z.: Simultaneous balancing and trajectory tracking control for two-wheeled inverted pendulum vehicles: a composite control approach. Neurocomputing 191, 44–54 (2016)
Huang, J., Wen, C.Y., Wang, W., Jiang, Z.P.: Adaptive output feedback tracking control of a nonholonomic mobile robot. Automatica 50(3), 821–831 (2014)
Diagne, M., Bekiaris-Liberis, N., Krstic, M.: Compensation of input delay that depends on delayed input. Automatica 85, 362–373 (2017)
Zhou, Y.S., Wang, Z.H.: Robust motion control of a two-wheeled inverted pendulum with an input delay based on optimal integral sliding mode manifold. Nonlinear Dyn. 85(3), 2065–2074 (2016)
Zhou, Y.S., Wang, Z.H.: Motion controller design of wheeled inverted pendulum with an input delay via optimal control theory. J. Optim. Theory Appl. 168(2), 625–645 (2016)
Do Carmo, M.P.: Differential Geometry of Curves and Surfaces. Birkhauser, Boston (2006)
Acknowledgements
The authors thank the financial support of NSF of China under Grants 11802065, 11372354, the Science and Technology Program of Guizhou Province ([2018]1047), and thank the anonymous reviewers for their valuable comments that help much in improving the presentation of the manuscript.
Author information
Authors and Affiliations
Corresponding author
Additional information
Communicated by Felix L. Chernousko.
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
OpenAccess This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
About this article
Cite this article
Zhou, Y., Wang, Z. & Chung, Kw. Turning Motion Control Design of a Two-Wheeled Inverted Pendulum Using Curvature Tracking and Optimal Control Theory. J Optim Theory Appl 181, 634–652 (2019). https://doi.org/10.1007/s10957-019-01472-4
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10957-019-01472-4