0% found this document useful (0 votes)
14 views19 pages

Turning Motion Control Design of A Two-Wheeled Inverted Pendulum Using Curvature Tracking and Optimal Control Theory

This paper presents a control method for implementing turning motion of a two-wheeled inverted pendulum along a preset curved trajectory while keeping the pendulum stabilized. The method first uses curvature theory to establish a dynamical tracking target based on observations of the vehicle's motion law. Then an optimal integral sliding mode controller based on linear quadratic regulator is designed to track the curved path and stabilize the vehicle body by adjusting tracking target parameters and performance criterion weights. Numerical simulations demonstrate the validity of using curvature tracking and optimal control theory for motion control of the two-wheeled inverted pendulum.

Uploaded by

std xiaoliang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views19 pages

Turning Motion Control Design of A Two-Wheeled Inverted Pendulum Using Curvature Tracking and Optimal Control Theory

This paper presents a control method for implementing turning motion of a two-wheeled inverted pendulum along a preset curved trajectory while keeping the pendulum stabilized. The method first uses curvature theory to establish a dynamical tracking target based on observations of the vehicle's motion law. Then an optimal integral sliding mode controller based on linear quadratic regulator is designed to track the curved path and stabilize the vehicle body by adjusting tracking target parameters and performance criterion weights. Numerical simulations demonstrate the validity of using curvature tracking and optimal control theory for motion control of the two-wheeled inverted pendulum.

Uploaded by

std xiaoliang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Journal of Optimization Theory and Applications (2019) 181:634–652

https://doi.org/10.1007/s10957-019-01472-4

Turning Motion Control Design of a Two-Wheeled Inverted


Pendulum Using Curvature Tracking and Optimal Control
Theory

Yusheng Zhou1 · Zaihua Wang2 · Kwok-wai Chung3

Received: 20 April 2018 / Accepted: 11 January 2019 / Published online: 28 January 2019
© The Author(s) 2019

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.

Keywords Two-wheeled inverted pendulum · Input delay · Curvature tracking ·


Optimal control · Dynamical tracking target

Communicated by Felix L. Chernousko.

B Zaihua Wang
zhwang@nuaa.edu.cn
Yusheng Zhou
sands1119@126.com
Kwok-wai Chung
makchung@cityu.edu.hk

1 Key Laboratory of Public Data of Guizhou Province, School of Mathematics and Statistics,
Guizhou University, Guiyang 550025, China
2 State Key Laboratory of Mechanics and Control of Mechanical Structures, Nanjing University of
Aeronautics and Astronautics, Nanjing 210016, China
3 Department of Mathematics, City University of Hong Kong , 83 Tat Chee Avenue, Kowloon Tong,
Hong Kong SAR, China

123
Journal of Optimization Theory and Applications (2019) 181:634–652 635

Mathematics Subject Classification 49N05 · 49N35

1 Introduction

Two-wheeled inverted pendulum (TWIP, for short) is a general term for mechani-
cal 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 con-
trol 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 manipulat-
ing device to implement intricate motion functions [2]. Usually, the nonholonomic
systems are firstly transformed into chain normal forms. Then, different kinds of con-
trol 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 nonholo-
nomic 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 applica-
tions 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 consider-
ation, 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-

123
636 Journal of Optimization Theory and Applications (2019) 181:634–652

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–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–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 nat-
ural 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 q = (xo , yo , θ, ϕ, θr , θ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

123
Journal of Optimization Theory and Applications (2019) 181:634–652 637

Fig. 1 Schematic diagram of the


TWIP

Table 1 The parameters and variables of the TWIP

Notation Definition

Tl , Tr Torques provided by wheel actuators acting on left and right wheels


θl , θr Rotational angels of the left and right wheels
xo , yo The coordinates of point O in X –Y plane
ϕ Tilt angle of the pendulum
θ Heading angle of the TWIP
x Movement distance of the TWIP
Mw Mass of the wheel
r Radius of the wheel
M Mass of the intermediate body
g Gravity acceleration
l Distance from the point O to the center of gravity of the intermediate body
H Height of the intermediate body
d Distance between the two wheels along the axle center
Iw Moment of inertia of the wheel along the wheel axis direction
Iwd Moment of inertia of the wheel about the Z -axis through the center of wheel
IB Moment of inertia of the intermediate body along the wheel axis direction
IZ Moment of inertia of the intermediate body about the Z -axis through point O
v The forward speed of the TWIP, and ẋ = v
ω The yaw rotational speed of the TWIP, and θ̇ = ω

−ẋo sinθ + ẏo cosθ = 0,


θ̇
ẋo cosθ + ẏo sinθ + d − r θ˙r = 0,
2
θ̇
ẋo cosθ + ẏo sinθ − d − r θ˙l = 0. (1)
2

123
638 Journal of Optimization Theory and Applications (2019) 181:634–652

Let vT , v, ω be the lateral speed, forward speed and yaw rotational speed of the mobile
chassis, respectively. Then, ẋo = vcosθ , ẏo = vsinθ , and the motion equations, namely
Eq. (1), are equivalent to the following equations

vT = −ẋo sinθ + ẏo cosθ = 0,


r
v = ẋo cosθ + ẏo sinθ = (θ˙r + θ˙l ),
2
r
ω = θ̇ = (θ˙r − θ˙l ). (2)
d

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]:

1 ⎪
ϕ̈ = [−Ml(θ̇ 2 lcosϕ + g)(Mr 2 sinϕ ⎪

Δ + M l 2 r 2 cos2 ϕ
2 ⎪




+ 2Iw sinϕ + 2Mw r sinϕ) + M l r ϕ̇ sinϕcosϕ] ⎪
2 2 2 2 2




Mr + 2Iw + 2Mw r + Mlr cosϕ
2 2 ⎪

+ , ⎪

u 2 ⎪

Δ + M l r cos ϕ
2 2 2 2 ⎪



1
v̇ = [M 2 2 2
l r sinϕcosϕ( θ̇ 2
lcosϕ + g) (3)
Δ + M 2 l 2 r 2 cos2 ϕ ⎪



− M 2 l 3 r 2 ϕ̇ 2 sinϕ − IB Mlr 2 ϕ̇ 2 sinϕ] ⎪





Mlr 2 cosϕ + Mrl 2 + IBr ⎪

− u , ⎪

Δ + M l r cos ϕ
2 2 2 2 2 ⎪





2Mr l θ̇ ϕ̇sin2ϕ
2 2 rd ⎪

θ̈ = + u 1 , ⎭
Ω + 2Ml r cos ϕ
2 2 2 Ω + 2Ml r cos ϕ
2 2 2

where

Δ = −M 2 l 2 r 2 − 2Ml 2 Iw − 2Ml 2 Mw r 2 − IB Mr 2 − 2IB Iw − 2Mw r 2 IB ,


Ω = −Mw d 2 r 2 − 4Iwd r 2 − 2I Z r 2 − d 2 Iw − 2Ml 2 r 2 , u 1 = Tl − Tr , u 2 = Tl + Tr ,

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 ϕ is small during the whole motion process, so the control design
can be based on the linearized equation with respect to ϕ round ϕ = 0. Let X =
[x1 , x2 , x3 , x4 ]T = [ϕ, ϕ̇, x, v]T be the state vector, and
⎡ ⎤ ⎡ ⎤
0 1 0 0 0
⎢ −Ml(ω2 l+g)(Mr 2 +2I w +2Mw r 2)
0⎥ ⎢ Mr 2 +2I
w +2Mw r 2 +Mlr ⎥
⎢ Δ+M 2 l 2 r 2
0 0 ⎥ ⎢ Δ+M 2 l 2 r 2 ⎥
A0 (t) = ⎢ ⎥, B = ⎢ ⎥.
⎣ 0 0 0 1⎦ ⎣ 0 ⎦
M 2 l 2 r 2 (ω2 l+g) 2 +Mrl 2 +I r
Δ+M 2 l 2 r 2
0 0 0 − MlrΔ+M 2l 2r 2
B

123
Journal of Optimization Theory and Applications (2019) 181:634–652 639

Fig. 2 The turning motion to the


left of the mobile chassis

where A0 (t) is time-variant due to the time-dependence of ω(t). Then, the linearized
equation is given by

Ẋ(t) = A0 (t)X(t) + Bu 2 (t − τ ), (4)


rd
θ̈ = ω̇ = u 1 (t − τ ), (5)
Ω + 2Ml 2 r 2

if the input delay τ > 0 is taken into account. Taking model uncertainty, linearization
error and external disturbances into account, Eqs. (4), (5) are represented as

Ẋ(t) = A0 (t)X(t) + Bu 2 (t − τ ) + σ 01 (t), (6)


rd
ω̇ = u 1 (t − τ ) + σ2 (t), (7)
Ω + 2Ml 2 r 2

respectively, where σ 01 (t) and σ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 − τ ), u 2 (t − τ )), so
that the TWIP runs along a pre-settled pathway Γ (t) = (xo (t), yo (t)) and keeps the
tilt angle ϕ small enough.

3 Key Observations about Motion Equations

For clarity in presentation, the turning motion is made in a plane, and θ˙r > θ˙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
(θ˙r , θ˙l ) of the two wheels determines uniquely a motion trajectory curve (xo (t), yo (t))
to the center point O, and conversely a known motion trajectory curve (xo (t), yo (t))
of the center point O determines uniquely a pair of rotational speed (θ˙r , θ˙l ) to the two
wheels. More precisely, one has

123
640 Journal of Optimization Theory and Applications (2019) 181:634–652

Theorem 3.1 Let (θ˙r , θ˙l ) be the pair of rotational speed of the two wheels, (xo (t), yo (t))
be the coordinate of the motion trajectory curve to the center point O, ko (t) be the
relative curvature of the trajectory curve, v and θ̇ be the forward speed and yaw
rotational speed of the mobile chassis, respectively. Then,

1 d ẋo ÿo − ẍo ẏo 1 d ẋo ÿo − ẍo ẏo
θ˙r = ẋo2 + ẏo2 + , ˙l =
θ ẋo2 + ẏo2 − , (8)
r 2r ẋo2 + ẏo2 r 2r ẋo2 + ẏo2

and

ẋo ÿo − ẍo ẏo
v= ẋo2 + ẏo2 , θ̇ = = ko (t)v(t). (9)
ẋo2 + ẏo2

Proof In a very small time interval [t, t + Δt], the movement distance of the two
wheels can be approximated as θ˙l (t)r Δt and θ˙l (t)r Δt, respectively. Thus, due to the
effect of nonholonomic constraints, one has

θ˙l r Δt θ˙r r Δt
= , (10)
Rl Rr

where Rl , Rr are the turning radius of the two wheels, and Rr = Rl + d. It follows
that

d θ˙l d θ˙r
Rl = , Rr = ,
˙
θr − θ˙l ˙
θr − θ˙l

due to Eq. (10). Therefore, the turning radius of the center point O is

d θ˙r + θ˙l
Ro = , (11)
2 θ˙r − θ˙l

and the corresponding relative curvature is

1 2 θ˙r − θ˙l
ko (t) = = , (12)
Ro d θ˙r + θ˙l

which depends on t, and can also be transformed to a function with respect to the
length arc variable, described by
t
r r
s(t) = (θ˙r + θ˙l )dξ = (θr + θl ). (13)
2 0 2

Under the assumption θ˙r > θ˙l > 0, one has ṡ(t) = r2 (θ˙r + θ˙l ) > 0, which means
that Eq. (13) defines an one-to-one mapping between the arc length variable and the
time variable. Hence,

123
Journal of Optimization Theory and Applications (2019) 181:634–652 641

dθr dθl dθr ds dθl ds dθr dθl


2 dt − dt 2 ds dt
− 2
ds dt = ds

ds = k̂ (s).
ko (t) = = o (14)
d dθr dθl d dθr ds dθl ds d dθr dθl
+ + +
dt dt ds dt ds dt ds ds

According to planar curve theory [29] and Eq. (14), the smooth function k̂o (s) deter-
mines uniquely a smooth curve r (s) = (xo (s), yo (s)). Substituting Eq. (13) into r (s),
the trajectory curve (xo (t), yo (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, ko (t) can be
expressed in the following formula

ẋo ÿo − ẍo ẏo


ko (t) = 3
. (15)
(ẋo2 + ẏo2 ) 2

According to Eq. (12), it goes to

2 θ˙r − θ˙l ẋo ÿo − ẍo ẏo


= . (16)
d θ˙r + θ˙l 3
(ẋo2 + ẏo2 ) 2

In addition, since
t t
r
s(t) = (θ˙r + θ˙l )dξ = ẋo2 + ẏo2 dξ. (17)
2 0 0

Then, by differentiation with respect to t, one has



r
(θ˙r + θ˙l ) = ẋo2 + ẏo2 . (18)
2

Solving the rotational speed (θ˙r , θ˙l ) from Eqs. (16)–(18) gives Eq. (8), and substituting
(8) to (2) gives (9). 


Let Γ (s) = (xo (s), yo (s)) (s ∈ [0, l]) be used for describing the pre-determined
control pathway, where s is the arc length variable. Then, the tangent vector of Γ (s)
must be an unit vector due to
     
 dΓ (s)  dxo 2 dyo 2
 = + = 1.
 ds  ds ds

Thus, the initial forward speed target would be a constant if Γ (t) = (xo (t), yo (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.

123
642 Journal of Optimization Theory and Applications (2019) 181:634–652

To reduce the initial speed error, an one-to-one smooth mapping s = φ(t) is intro-
duced. Then, the trajectory tracking target is given by Γˆ (t) = (xo (φ(t)), yo (φ(t))).
It follows that

 2  2
|Γ˙ˆ (t)| =
dxo dxo
+ |φ̇(t)| = |φ̇(t)| .
ds ds

Thus, in order that the initial speed error is zero and without jumping, the function
φ(t) is required to satisfy

lim φ̇(t) = 0, φ̇(0) = 0, (19)


t→0

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 φ(t) can
be chosen to satisfy φ̇(t) = αte−βt . In this case,

(βt + 1)αe−βt
φ(t) = − + γ,
β2

where α > 0, β > 0 and γ > 0 are parameters to be determined from

+∞
φ̇(t)dt = l, φ(0) = 0.
0

Hence, γ = l, α = lβ 2 , and v = φ̇ = lβ 2 te−βt . In this case, the smooth function


s = φ(t) is found to

φ(t) = −(βt + 1)le−βt + l. (20)

Lemma 3.1 For a given motion task path Γ (s) = (xo (s), yo (s)), s ∈ [0, l], the one-
to-one smooth mapping (20) can be used for designing a trajectory tracking target
Γ (t) = (xo (φ(t)), yo (φ(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: tra-
jectory planning and controller design, which are usually studied separately in the
literature. In this section, trajectory planning plays a very important role in the con-
troller design.

123
Journal of Optimization Theory and Applications (2019) 181:634–652 643

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 (xo (t), yo (t)) is implemented indirectly by the forward speed
and yaw rotation speed. Therefore, any tracking error of position with two position
coordinates xo (t) and yo (t) may cause inward movement or outward movement, and
consequently, tracking (xo (t), yo (t)) may lead to large error of the position with the
increases of the error accumulation. However, the smooth curvature function ko (t)
fully determines the shape of a trajectory curve Γ (t) = (xo (t), yo (t)), the difference
between two curve expressions with the same curvature is nothing but tangential speed.
This means that when ko (t) is tracked, Γ (t) is tracked accordingly no matter what the
tangential speed is. Thus, for the trajectory tracking problem, it is very important to
keep ko (t) well tracked, while the speed v(t) of the TWIP can be either slow or not slow.
Due to ω(t) = ko (t)v(t), the relationship among the actual yaw rotational speed, actual
forward speed and the curvature of the actual motion trajectory curve, ko (t) is tracked if
the dynamical tracking target ω̃(t) = ko (t)v(t) is tracked. Let ṽ = φ̇(t) be chosen as a
static tracking target of v(t) with a smooth function φ(t) satisfying (19). Then, one has
Theorem 4.1 Let Γ (s) = (xo (s), yo (s)), s ∈ [0, l] be a given trajectory curve, ko (s)
be the relative curvature of Γ (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 Γ (s) can be designed as

ṽ = φ̇(t), ω̃ = ko (φ(t))v(t). (21)

where s = φ(t) is an one-to-one smooth mapping required in Lemma 3.1.

As a matter of fact, ṽ 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 ω̃ 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 − τ ) and u 2 (t − τ ) can
be designed separately.
The matrix A0 (t) in Eq. (6) is time-variant and can be decomposed into A0 (t) =
A + ΔA, where

⎡ ⎤
0 1 0 0
⎢ −Mlg(Mr 2 +2Iw +2Mw r 2 ) 0⎥
⎢ Δ+M 2 l 2 r 2
0 0 ⎥
A=⎢ ⎥,
⎣ 0 0 0 1⎦
M 2l 2r 2 g
Δ+M 2 l 2 r 2
0 0 0

123
644 Journal of Optimization Theory and Applications (2019) 181:634–652

⎡ ⎤
0 0 0 0
⎢ −Mlω2 l(Mr 2 +2I w +2Mw r 2)
0⎥
⎢ Δ+M 2 l 2 r 2
0 0 ⎥
ΔA = ⎢ ⎥.
⎣ 0 0 0 0⎦
M 2 l 2 r 2 ω2 l
Δ+M 2 l 2 r 2
0 0 0

The modeling error ΔAX(t) of the linearized system is

 T
−Mlω2 l(Mr 2 + 2Iw + 2Mw r 2 ) M 2 l 2 r 2 ω2 l
0, θ, 0, θ .
Δ + M 2l 2r 2 Δ + M 2l 2r 2

System (6) can be rewritten as the following equation if slow motion speed of the
TWIP is considered

Ẋ(t) = AX(t) + Bu 2 (t − τ ) + σ 1 (t), (22)

where the error part ΔAX(t) is combined into σ 1 (t), and σ 1 (t) = σ 01 (t) + ΔAX(t).
Let X̃ = [x̃1 , x̃2 , x̃3 , x̃4 ]T = [0, 0, x̃, ṽ]T be the trajectory tracking target vector
to be designed according to the given motion task, Y(t) = X(t) − X̃(t) be the error
vector of system (22), and η1 (t) := AX̃− X̃. ˙ Then, system (22) governing the tracking
error takes the form

Ẏ(t) = AY(t) + Bu 2 (t − τ ) + σ 1 (t) + η1 (t). (23)

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:
tf  
1 1
J = YT (t f )Q0 Y(t f ) + YT (t)Q1 Y(t) + u T2 (t − τ )Ru 2 (t − τ ) dt,
2 2 0
(24)

where Q0 , Q1 are nonnegative definite symmetric matrices, R is a positive definite


symmetric matrix, and t f (> 2τ ) 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 ṽ = φ̇(t) be the tracking target of
the forward speed v(t) with φ̇ = lβ 2 te−βt . So v(t) becomes small if the target speed
is small by using a small number β. It follows that the yaw rotational speed ω(t) is
small enough, and consequently, ΔAX(t) becomes small enough, when the quadratic
performance criterion (24) is minimized. In this way, there is a constant D1 > 0 such
that

σ 1 (t) ≤ D1 . (25)

123
Journal of Optimization Theory and Applications (2019) 181:634–652 645

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 ε > 0, a real number β may be chosen to satisfy
tf
φ̇(t)dt = l − ε. (26)
0

This means that the controller can be designed simply by solving an algebraic Riccati
equation if the performance criterion (24) is replaced by
+∞  
1
J= YT (t)Q1 Y(t) + u T2 (t − τ )Ru 2 (t − τ ) dt. (27)
2 0

Here, the trajectory tracking target design is very important in the turning motion con-
trol 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 β.
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
t
Z(t) = Y(t) + e−A(ρ−t+τ ) [Bu 2 (ρ) + η1 (ρ + τ ) + σ 1 (ρ + τ )]dρ, (28)
t−τ

the delayed system (23) is transformed into an equivalent delay-free system as follows:

Ż(t) = AZ(t) + B0 u 2 (t) + e−Aτ η1 (t + τ ) + e−Aτ σ 1 (t + τ ), (29)

where B0 = e−Aτ B, the new state Z(t) and the error state Y(t) satisfy the following
relationship [27]

Y(t + τ ) = eAτ Z(t). (30)


 T  T
With Q̃1 = eAτ Q1 eAτ , Q̃0 = eAτ Q0 eAτ , the quadratic performance criterion
can be rewritten as
τ
1
J = J1 + J2 = YT (t)Q1 Y(t)dt
2 0
1
+ ZT (t f − τ )Q̃0 Z(t f − τ )
2

1 t f −τ  T 
+ Z (t)Q̃1 Z(t) + u T2 (t)Ru 2 (t) dt, (31)
2 0

123
646 Journal of Optimization Theory and Applications (2019) 181:634–652


where J1 = 21 0 YT (t)Q1 Y(t)dt is fixed, because the control does not take effect
when t ∈ [0, τ [.
The nominal system of (29) is given by

Ż(t) = AZ(t) + B0 u 2 (t) + e−Aτ η1 (t + τ ). (32)

According to [27], the optimal control of system (32) that minimizes the quadratic
performance criterion J is

u ∗2 (t) = −R−1 BT0 [Pz (t)Z(t) + bz (t)], (33)

where Pz (t) ∈ Rn×n and bz (t) ∈ Rn are the solutions of the following Riccati differ-
ential equations

P˙z = −Pz A − AT Pz + Pz B0 R−1 BT0 Pz − Q̃1 , Pz (t f − τ ) = Q̃0 , (34)


ḃz = −[A − B0 R−1 BT0 Pz ]T bz − Pz e −Aτ
η1 (t + τ ), bz (t f − τ ) = 0. (35)

In order to design a robust controller against the effect of σ 1 (t + τ ), the optimal


state of the normal system (32) is chosen as the integral sliding mode manifold. Let
the sliding mode function be
t
 1 (Z(t)) : = G[Z(t) − Z∗ (0)] − G [(A − B0 R−1 BT0 Pz )Z(ρ)
0
− B0 R−1 BT0 bz (ρ) + e −Aτ
η1 (ρ + τ )]dρ, (36)

where G ∈ Rm×n is a constant matrix, and GB0 is assumed nonsingular, and Z∗ (0) is
the initial value of the nominal system (32) described by
τ τ
∗ −Aτ Aτ −Aρ
Z (0) = e (e Y(0) + e Aτ
e η1 (ρ)dρ) = Y(0) + e−Aρ η1 (ρ)dρ,
0 0

 1 (Z(t)) = 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

u 2 (t − τ ) = u 20 (t − τ ) + u 21 (t − τ ), t ∈ [τ, t f ], (37)

where

u 20 (t − τ ) = −R−1 BT0 [Pz (t − τ )e−Aτ Ȳ(t) + bz (t − τ )],


u 21 (t − τ ) = −(GB0 )−1 (μ1 + D1 Ge−Aτ Ȳ(t)) · sgn(
1 (e−Aτ Ȳ(t))),

and Ȳ(t) is the predictor state of Y(t) defined by


t
Ȳ(t) := eAτ Y(t − τ ) + eA(t−ρ) [Bu 2 (ρ − τ ) + η1 (ρ)]dρ. (38)
t−τ

123
Journal of Optimization Theory and Applications (2019) 181:634–652 647

Similarly, for Eq. (7), assume that there is a constant D2 satisfying

σ2 (t) ≤ D2 , (39)

and define the sliding mode function as


t
2 (ω(t)) := ĝ[ω(t) − ω(0)] − ĝ ˙
ω̃(ρ)dρ,
0

where ĝ
= 0 is a constant, ω̃ is the tracking target. Then, the delayed robust control
of system (7) is designed by

u 1 (t − τ ) = u 10 (t − τ ) + u 11 (t − τ ), t ∈ [τ, t f ], (40)

ω̃˙
where u 10 (t − τ ) = B2 is an open-loop control,

u 11 (t − τ ) = −(ĝ B2 )−1 (μ2 + ĝ D2 |ω̃ − ω̄|) · sgn(2 (ω̄(t))),

and B2 = rd
Ω+2Ml 2 r 2
, ω̄(t) is the predictor state of ω(t) defined by

t
ω̄(t) := ω(t − τ ) + B2 u 1 (ρ − τ )dρ.
t−τ

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 − τ ) 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 − τ ) and u 11 (t − τ ). 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 Γ (t) = (xo (s), yo (s)), s ∈ [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 −τ ), u 1 (t −τ )) can be designed by Eqs. (37) and (40), where
ko (s) is the relative curvature of Γ (s),

ṽ = φ̇(t), ω̃ = ko (φ(t))( ȳ4 + ṽ), (41)

where β is a parameter to satisfy (26) for a given ε > 0, ȳ4 is the fourth variable in the
predictor state Ȳ(t), and φ(t) = −(βt + 1)le−βt + l is the one given in Lemma 3.1.

123
648 Journal of Optimization Theory and Applications (2019) 181:634–652

5 An Illustrative Example

In this section, numerical simulation is made for fixed parameter values and ini-
tial values: M = 3 kg, Mw = 2 kg, IB = 1 kg m2 , Iw = 0.01 kg m 2 , Iz =
0.01 kg m , Iwd = 0.005 kg m , l = 0.5 m, r = 0.1 m, d = 0.2 m, g =
2 2

9.8 m/s2 , τ = 0.01 s, R = 1, Q0 = 0, Q1 = diag(10000, 0, 100, 100), ϕ(0) =


0, ϕ̇(0) = 0, x(0) = 0, v(0) = 0, ω(0) = 0. The matrices A and B in system (22)
become
⎡ ⎤ ⎡ ⎤
0 1 0 0 0
⎢ 11.194 0 0 0⎥ ⎢ −1.9900 ⎥
A=⎢

⎥, B=⎢ ⎥,
0 0 0 1⎦ ⎣ 0 ⎦
−1.8657 0 0 0 1.5755

and system (7) becomes ω̇ = −12.5u 1 (t − τ ) + σ2 (t).


Let the task pathway be a circle defined by Γ (s) = (coss, sins) for s ∈ [0, 2π ].
According to Sect. 4.1, with β = 21 , the trajectory tracking target is given by

π −1t
ṽ = te 2 , ω̃ = ko (t)( ȳ4 + ṽ), t ∈ [0, + ∞[,
2

and the trajectory tracking target vector of system (22) is X̃ = [0, 0, x̃, ṽ]T , where
1
x̃ = −(2π + π t)e− 2 t + 2π . Note that the time interval of the trajectory tracking target
is converted to [0, + ∞[, and the corresponding Riccati differential equation (34)
becomes an algebra Riccati equation of the form

0 = −Pz A − AT Pz + Pz B0 R−1 BT0 Pz − Q̃1 . (42)

The MATLAB command lqr or MAPLE command CARE returns the solutions of
(42) and (35) as follows
⎡ ⎤
2096.1 530.04 325.74 557.30
⎢ 530.04 264.72 157.49 308.74 ⎥
Pz = ⎢
⎣ 325.74
⎥,
157.49 218.43 190.74 ⎦
557.30 308.74 190.74 371.60
⎡ ⎤
(219.13t − 353.60)e−0.5t
⎢ (149.59t − 224.08)e−0.5t ⎥
bz (t − τ ) = ⎢
⎣ (59.454t
⎥.
− 120.77)e−0.5t ⎦
(178.76t − 267.51)e−0.5t

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 σ 1 (t) and σ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

123
Journal of Optimization Theory and Applications (2019) 181:634–652 649

0.16
- ignoring input delay
- considering input delay
Tilt angle of the pendulum
0.12

0.08

0.04

0.00

-0.04
0 3 6 9 12 15
Time(s)
Fig. 3 Tilt angle of the pendulum

0.4
The forward speed error of the TWIP

0.0

-0.4

-0.8

-1.2 - ignoring input delay


-1.6 - considering input delay
0 3 6 9 12 15
Time(s)
Fig. 4 The forward speed tracking error of the TWIP

σ 1 (t) = [0, E 2 , 0, E 4 ]T ,
2Mr 2 l 2 θ̇ ϕ̇sin2ϕ
σ2 = = −18.75ωϕ̇sinϕcosϕ,
Ω + 2Ml 2 r 2

where
1 
E2 = −Ml(ω2 lcosϕ + g)(Mr 2 sinϕ + 2Iw sinϕ
Δ + M 2l 2r 2
+ 2Mw r 2 sinϕ) + M 2 l 2 r 2 ϕ̇ 2 sinϕcosϕ

+ Mlg(Mr 2 ϕ + 2Iw ϕ + 2Mw r 2 ϕ) + Mlr (cosϕ − 1)u 2 (t − τ )
= 0.5597ω2 sinϕcosϕ + 11.194sinϕ − 0.1866ϕ̇ 2 sinϕcosϕ
− 11.194ϕ − 1.2438cosϕu 2 (t − τ ) + 1.2438u 2 (t − τ ),

123
650 Journal of Optimization Theory and Applications (2019) 181:634–652

1.2
- ignoring input delay

The yaw rotational speed of the TWIP


- considering input delay
1.0

0.8

0.6

0.4

0.2

0.0

-0.2
0 3 6 9 12 15
Time(s)
Fig. 5 The yaw rotational speed of the TWIP

- dynamical target
2.5
- trajectory target curve

- non-dynamical target
2.0

1.5
Y

1.0

0.5

0.0

-1.5 -1.0 -0.5 0.0 0.5 1.0


X
Fig. 6 The actual motion trajectory of the TWIP under the proposed controller

1 
E4 = M 2 l 2 r 2 sinϕcosϕ(ω2 lcosϕ + g) − M 2 l 3r 2 ϕ̇ 2 sinϕ
Δ + M 2l 2r 2

− IB Mlr 2 ϕ̇ 2 sinϕ − M 2 l 2 r 2 ϕg − Mlr 2 (cosϕ − 1)u 2 (t − τ )
= −0.0933ω2 sinϕcos2 ϕ − 1.8657sinϕcosϕ + 0.2177ϕ̇ 2 sinϕ
+ 1.8657ϕ + 0.1244cosϕu 2 (t − τ ) − 0.1244u 2 (t − τ ).

Moreover, let G = [0, 1, 0, 1.8978], ĝ = − 12.5 1


, μ1 = μ2 = 0.1, D1 = D2 =
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

123
Journal of Optimization Theory and Applications (2019) 181:634–652 651

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 ω̃ = ko (t)v(t) is applied, and the location error is very
large if the rotational speed target is chosen as a nondynamic target ω̃ = ẋo ẋÿo2 − ẍo ẏo
2 . The
o + ẏo
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.

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 anony-
mous reviewers for their valuable comments that help much in improving the presentation of the manuscript.

Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 Interna-
tional 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.

References
1. 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)
2. Chung, W.: Nonholonomic Manipulators. Springer, Berlin (2004)
3. Murray, R.M., Li, Z.X., Sastry, S.S.: A Mathematical Introduction to Robotic Manipulation. CRC
Press, Boca Raton (1994)
4. 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)

123
652 Journal of Optimization Theory and Applications (2019) 181:634–652

5. 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)
6. 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)
7. Reshmin, S.A.: The decomposition method for a control problem for an underactuated Lagrangian
system. J. Appl. Math. Mech. 74(1), 108–121 (2010)
8. Ananevskii, I.M., Reshmin, S.A.: Decomposition-based continuous control of mechanical systems. J.
Comput. Syst. Sci. Int. 53(4), 473–486 (2014)
9. 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)
10. 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)
11. Halperin, I., Agranovich, G., Ribakov, Y.: Optimal control of a constrained bilinear dynamic system.
J. Optim. Theory Appl. 174(3), 803–817 (2017)
12. 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)
13. 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)
14. 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)
15. Cui, R.X., Guo, J., Mao, Z.Y.: Adaptive backstepping control of wheeled inverted pendulums models.
Nonlinear Dyn. 79(1), 501–511 (2015)
16. 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)
17. 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)
18. 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)
19. 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)
20. 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)
21. Li, Z.J., Zhang, Y.N.: Robust adaptive motion/force control for wheeled inverted pendulum. Automatica
46(8), 1346–1353 (2010)
22. 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)
23. 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)
24. 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)
25. Huang, J., Wen, C.Y., Wang, W., Jiang, Z.P.: Adaptive output feedback tracking control of a nonholo-
nomic mobile robot. Automatica 50(3), 821–831 (2014)
26. Diagne, M., Bekiaris-Liberis, N., Krstic, M.: Compensation of input delay that depends on delayed
input. Automatica 85, 362–373 (2017)
27. 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)
28. 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)
29. Do Carmo, M.P.: Differential Geometry of Curves and Surfaces. Birkhauser, Boston (2006)

Publisher’s Note Springer Nature remains neutral with regard to jurisdictional claims in published maps
and institutional affiliations.

123

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy