SMC Paper Pendulum
SMC Paper Pendulum
SMC Paper Pendulum
&RQWURO $XWRPDWLRQ-XO\$WKHQV*UHHFH
Abstract—This paper presents sliding mode control of industrial applications and proves its effective
Rotary Inverted Pendulum. Rotary Inverted Pendulum is a performance. In this paper the sliding mode control design
nonlinear, unstable and non-minimum-phase system. technique is applied to the control of the rotary inverted
Designing sliding mode controller for such system is difficult pendulum.
in general. Here, first the desired performance is introduced This paper is organized as the following: section II
and based on this performance two sliding surfaces are introduces some basics of VSC control using sliding mode
designed, then system is controlled by proper definition of a and also its difficulties and restrictions are discussed. In
lyapunov function. The lyapunov function designed puts section III we will derive nonlinear equations of the plant
more emphasis on the control of the inverted pendulum and consider its state space equations and also the unstable
rather than the control of the motor.
nature of the system is considered. In addition, it will be
shown that the system is a non-minimum-phase system. In
Rotary Inverted Pendulum, Non-Minimum-Phase, Sliding
Mode, Nonlinear Control
section IV the sliding mode control of rotary inverted
pendulum is considered and also simulation results are
provided there.
I. INTRODUCTION
The Rotary Inverted Pendulum is a widely investigated II. SLIDING MODE FUNDAMENTALS
nonlinear system due to its static instability. A version of Essentially, VSC utilizes a high-speed switching
this system is used as a simplified model for the control of control law to drive the nonlinear plant’s state trajectory
rider-motorcycle systems in circular motion on paths of onto a specified and user-chosen surface in the state space
different radii [1]. This paper deals with a rotary inverted (called the sliding or switching surface), and to maintain
pendulum system (see Fig. 1), which is composed of the the plant’s state trajectory on this surface for all
following components: a rotating arm, which is driven by subsequent time. This surface is called the switching
a motor with a pendulum mounted on its rim. The surface because if the state trajectory of the plant is
pendulum moves as an inverted pendulum in a plane “above” the surface a control path has one gain and a
perpendicular to the rotating arm. Essentially the control different gain if the trajectory drops ”below” the surface.
of this system is difficult because this system has two The plant dynamics restricted to this surface represent the
degrees of freedom and only one control input. Also this controlled system’s behavior [8]. The sliding mode
system is a non-minimum–phase system. A non- controller design has two fundamental steps [8]. The first
minimum-phase system is a system whose internal or zero step is to select the sliding surface such that the system
dynamics are unstable [2]. Such systems restrict exhibits the desired behavior in the sliding mode and the
application of nonlinear controller design techniques, such second step is to determine control laws to guarantee the
as feedback linearization and sliding mode controller reaching and sliding mode conditions [9]
design [3].
To guarantee the convergence to the sliding mode
In this paper a variable structure controller is developed surface a lyapunov function V (S ) is defined as a positive
to control the Rotary Inverted Pendulum. Variable
structure control (VSC) with sliding mode control was function of sliding surface (S ) and then the control
first proposed and elaborated in the early 1950’s in the signals are calculated in such a way that: V < 0 this would
Soviet Union by Emelyanov and several co researchers [4- guarantee that V → 0 and also by proper definition of
6]. Since then, VSC has developed into a general design lyapunov function as a function of S ,. S → 0 . Then the
method being examined for a wide spectrum of system performance of the system is determined by equation
types including nonlinear systems, multi-input/multi- S = 0 . Design of sliding surface is very important since
output systems, discrete-time models, large-scale and after reaching the sliding surface, this surface determines
infinite-dimensional systems, and stochastic systems. In the performance of the system under control. Using output
addition, the objectives of VSC have been greatly feedback linearization approach, systems can be described
extended from stabilization to other control functions such
in a canonical form consider following dynamical system:
as tracking, model following etc. The most distinguished
feature of VSC is its ability to result in very robust control
systems; in many cases invariant control systems result x ( n ) = F (x ) + G (x )u
[7]. This method is now tested on variety of different (1)
y =x
3URFHHGLQJVRIWKHWK0HGLWHUUDQHDQ&RQIHUHQFHRQ 7
&RQWURO $XWRPDWLRQ-XO\$WKHQV*UHHFH
The sliding mode controller design for such system is direction, the velocity of the point mass in the y direction
quite easy and straightforward. The sliding surface and the rotating pendulum about its center of mass:
considered for this system can be [10]:
T = K .E .Hub + K .E .V x + K .E .V y + K .E .Pendulum (6)
n −1
d
s = +λ e (2)
dt The moment of inertia of a rod about its center of mass
is:
The lyapunov function considered here is simply:
1 MR 2
JCM = 12 (7)
1
V = s2 (3)
2 Here R=2L and (L) is the length of the pendulum. So
.
x1 = x 2
.
x 2 = F1 (X ) + G1 (X )u
(15)
.
x3 = x 4
.
x 4 = F2 (X ) + G 2 (X )u
Where:
2
−b sin(2x 1 ) x 22 − G b x 4 cos(x 1 ) + a d sin(x 1 )
F1 (X ) = 2
a c − b 2 cos 2 x 1
Figure 1. Top view of Rotary Inverted Pendulum ηm η g k t k g b
G1 (X ) = cos(x 1 )
(
R m a c − b 2 cos 2 x 1 )
cF1 (X ) − d sin(x 1 )
F2 (X ) = (16)
b cos(x 1 )
ηm η g k t k g c
G 2 (X ) =
(
R m a c − b 2 cos 2 x 1 )
In [1] a feedback linearization method for obtaining the
canonical form of the Rotary Inverted Pendulum is
proposed. Also in [12] another mathematical approach to
approximated feedback linearization using splines is
proposed, where the Rotary Inverted Pendulum is used as
a benchmark to show the procedure used. But the input of
the system considered in both papers is the torque of the
motor or any actuator applied to the rotary arm and those
approaches can’t be applied here. The input of the system
considered here is motor voltage.
Here the feedback linearization of the system is
considered. Consider x 1 as the output of the system, so
we have:
Figure 2. Side View of Rotary Inverted Pendulum
y = h (X ) = x 1 (17)
a = J eq + mr 2 Then we have:
b = mLr
4 L g h (X ) = 0 (18)
c = mL2
3
d = mgL (14)
L g Lf h (X ) = G1 (X ) (19)
E = ac − b 2
ηm η g K t K m K g2 + B eq R m In which L g h (X ) represents Lie derivative of h (X )
G =
Rm with respect to g . So the relative degree of the system is
So that the state equations of the system would be: r = 2 and 2 modes of the system are unobservable. Also:
Lf h (X ) = y = x 2 (20)
Then:
In addition, the feedback input to linearize the system IV. SLIDING MODE CONTROL OF THE ROTARY
is: INVERTED PENDULUM
ηm η g k t k g c V
G 2 (X * ) = (28) V = −α sat ( ) (35)
(
R m ac − b 2 ) Φ
Using equations (16) the zero dynamics of the system Where sat (V ) is the saturation function, which is
will be obtained as follows: defined as in (36). This function reduces chattering very
much.
d 2x 3 Gc Gc
=− x4 − (29) V
dt 2
ac − b 2
a c −b 2 V if Φ <|V |
sat ( ) = Φ (36)
Φ sgn(V ) otherwise
The obtained zero dynamic of the system are unstable.
So, the analysis above shows that if α is considered as the
plant output, feedback linearization approach can’t Also in (35) α is a positive number, which determines
stabilize the system and the θ and its derivative which are the rate at which V approaches zero. Using the proposed
two unobservable state variables show unstable response. lyapunov function, we need the control signal to be as
As θ represents angle of the motor, the motor will not stop follows:
rotating. Finding a sliding surface for the system is not
straightforward [2].
3URFHHGLQJVRIWKHWK0HGLWHUUDQHDQ&RQIHUHQFHRQ 7
&RQWURO $XWRPDWLRQ-XO\$WKHQV*UHHFH
u = [ −α sat (V / Φ ) − (λ1x 2 + F1 (X ))sgn(s1 ) would be unstable and the motor would keep on rotating.
Better performance with less chattering in voltage input
− λ2 (λ3 x 4 + F2 ( X ))sgn(s 2 )] (37) could be designed but the voltage of the motor would be
[G1 ( X )sgn(s1 ) + λ2G 2 ( X )sgn(s 2 )]−1 much more than the applicable voltage.
VI. CONCLUSION
V. SIMULATION RESULTS In this study, sliding mode control of the Rotary
The values of plant parameters are as follows [11]: Inverted Pendulum was considered. It was shown that:
this system is a non-minimum-phase system and finding a
TABLE II. VALUES OF THE PARAMETER USED IN SIMULATION
sliding surface for the system is not so easy. Two sliding
surfaces were defined. By proper definition of the
Parameter Value Parameter value lyapunov function as a combination of two sliding
Kt 0.00767 N .m m 0.125 Kg surfaces, the system was controlled and satisfactory
Km 0.00767V /(rad / s ) ηm 0.69 results obtained.
Figure 3. The angle of the inverted pendulum ( α ) Figure 4. The angle of the motor ( θ )
3URFHHGLQJVRIWKHWK0HGLWHUUDQHDQ&RQIHUHQFHRQ 7
&RQWURO $XWRPDWLRQ-XO\$WKHQV*UHHFH