Você está na página 1de 5

8

th
International Scientic Technical Conference PROCESS CONTROL 2008
June 9 12, 2008, Kouty nad Desnou, Czech Republic
STABILIZATION OF AN INVERTED PENDULUM VIA
FUZZY EXPLICIT PREDICTIVE CONTROL
HERCEG MARTIN, KVASNICA MICHAL, AND FIKAR MIROSLAV
Institute of Information Engineering, Automation and Mathematics,
Slovak University of Technology, Radlinsk eho 9, 81237 Bratislava, Slovakia
email: { martin.herceg, michal.kvasnica, miroslav.fikar } @stuba.sk
Abstract: In this work we compare the explicit predictive control based on a Takagi-Sugeno model
with nonlinear control on the inverted pendulumexample. Since the inverted pendulumrepresents an
unstable and nonlinear system, it is often considered as a benchmark example for control. To make
the problem more difcult, input and state constraints are added to the control problem. Simulation
results presented at the end show that the explicit controller based on a Takagi-Sugeno model can
handle these difculties well.
Keywords: Takagi-Sugeno fuzzy model, piecewise afne model, explicit predictive control, nonlin-
ear control
1 INTRODUCTION
Fuzzy modelling methods are attractive, because they can be developed from real process data
with or without expert knowledge [Vasi ckaninov a and Bako sov a, 2006, 2007], and their interpretation
is very close to human reasoning. Recent developments in control of Takagi-Sugeno fuzzy models
by Herceg et al. [2007] show in general that it is possible to stabilize such a system in the classic sense
by deterministic optimization, even in the presence of input/state constraints. The procedure rst trans-
forms the Takagi-Sugeno (TS) model into piecewise afne (PWA) model with additive uncertainty where
the uncertainty models the overlapping parts of the fuzzy membership functions. By this way some con-
servatism is introduced into the PWA model but it can be effectively handled by minimum-time approach
in the explicit predictive schemes [Rakovi c et al., 2004; Grieder et al., 2005].
In this paper we aim to test the general method, as proposed in [Herceg et al., 2007] to a particular
example, namely an inverted pendulum. The inverted pendulum is a well-known process frequently used
to test new methods of control, as for instance in Baumann and Rugh [1986]; Wang et al. [1996]; Khaber
et al. [2005]. It exhibits unstable nonlinear behavior and is difcult to control using standard control
techniques. Based upon the full nonlinear model we will describe this process using Takagi-Sugeno
fuzzy rules and consequently apply the predictive controller. Additionally, we will include input and
state constraints to the control problem and observe the overall performance of the controller.
The structure of the paper is given as follows. In the section two we will briey outline the
principles of the fuzzy predictive controller. Subsequently, in the section three, the full nonlinear and
fuzzy model will be reviewed. The concrete calculations are shown in section four and the closed loop
simulation results are presented in section ve.
2 EXPLICIT PREDICTIVE CONTROL BASED ON A TAKAGI-SUGENOMODEL
In this section we briey outline the principles of the explicit predictive controller but for a
detailed description we refer to [Herceg et al., 2007]. Basically, the TS model is rstly transformed into
an uncertain PWA model and then the predictive controller is synthesized.
The class of TS models is given as
x
k+1
=
r

i=1

i
(x
k
)(A
i
x
k
+B
i
u
k
). (1)
in the discrete-time domain where x
k
R
n
is the state vector, u
k
R
m
the input vector, A
i
R
nn
,
B
i
R
nm
are matrices representing the system dynamics. The parameter
i
(x
k
) depends non-linearly
C021 b 1
8
th
International Scientic Technical Conference PROCESS CONTROL 2008
June 9 12, 2008, Kouty nad Desnou, Czech Republic
on the state and the exact shape of this function results from fuzzy rules applied in membership functions.
However, the precise knowledge of this parameter is not necessary, since it varies between 0 and 1.
Hence, in the worst case, we can distinguish consecutive models by dening crisp boundaries and the TS
model (1) can be transformed into PWA model given as
x
k+1
= A
i
x
k
+B
i
u
k
+f
i
+w if x P
i
(2)
where f
i
R
n
is the afne term and w

c, c R > 0 is the disturbance bound. The term P


represents a polytope, i.e.
P
i
:= {x R
n
H
i
x K
i
} (3)
where H
i
, K
i
are matrices of suitable dimensions. If the PWA model is available, one may use the
procedure published by Rakovi c et al. [2004]. It rstly looks for a stabilizing target set S
0
around origin
in which there exist a stabilizing state feedback law of the form
u
k
= F
0
x
k
+G
0
(4)
such that the successor states x
k+1
, . . . , x
k+N
remain in S
0
for all time k > 0 despite all possible
disturbances w

c. Secondly, this set is used in the following optimization problem


min
u
k
u
T
k
Ru
k
+x
T
k
Qx
k
+x
T
k+1
Px
k+1
(5a)
subj.to x
k+1
= f
PWA
(x
k
, u
k
, w) (5b)
x
k+1
S
k
(5c)
u
k
U (5d)
w

c (5e)
where the equation (5b) refers to (2), (5d) are the input constraints and Q, R, P are weighing matrices.
If one solves the problem (5) in the multi-parametric programming fashion [Suard et al., 2004] then the
solution is given as
u
k
= F
i
x
k
+G
i
if x
k
S
i
. (6)
Proceeding in the iterative way, the algorithm produces the set of states S
1
, . . . , S
r
, each associated with
the state-feedback law (6) which pushes the states towards the initial stabilizing set S
0
. Actually, the
state is driven from the set S
i+1
to the set S
i
in one time step, hence the overall number of sets r denotes
the time needed to reach the origin. Therefore is the strategy referred as minimum-time approach.
3 FULL NONLINEAR AND FUZZY MODEL OF THE INVERTED PENDULUM
In this section we will introduce two models of balancing the inverted pendulum on a cart, as
given in [Wang et al., 1996]. The rst will have an attribute full which refers to a system described by
ordinary differential equations of motion, given by
x
1
= x
2
(7)
x
2
=
g sin(x
1
) amlx
2
2
sin(2x
1
)/2 a cos(x
1
)u
4l/3 aml cos
2
(x
1
)
(8)
where x
1
denotes the angle (rad) from the vertical and u is the external force (N) applied to the cart.
Other constants are dened as follows: m = 2 kg mass of the pendulum, M = 8 kg mass of the cart,
2l = 1 m length of the pendulum, g = 9.8 kg/m/s
2
acceleration of gravity, a =
1
m+M
. The second model
is represented by two fuzzy rules
x =
_
A
1
x +B
1
u if x
1
is about 0
A
2
x +B
2
u if x
1
is about

2
(9)
C021 b 2
8
th
International Scientic Technical Conference PROCESS CONTROL 2008
June 9 12, 2008, Kouty nad Desnou, Czech Republic
where the matrices are given by
A
1
=
_
0 1
g
4l/3aml
0
_
, B
1
=
_
0

a
4l/3aml
_
, (10)
A
2
=
_
0 1
2g
(4l/3aml
2
)
0
_
, B
2
=
_
0

a
4l/3aml
2
_
(11)
with parameter = cos(88

). The fuzzy rules (9) are depicted in Fig. 1. Actually, the description (9) is
an approximation of the full nonlinear model and it has been simplied to obtain as minimum number of
fuzzy rules as possible.
Figure 1 Membership functions for the inverted pendulum.
4 CONVERSION TO PWA MODEL AND CALCULATION OF THE CONTROLLER
In this section we apply the transformation procedure, given in Herceg et al. [2007] to the TS
model of the inverted pendulum (9) example. Because the controller is synthesized in the discrete time,
the state-update matrices (10) are discretized with sampling time 0.05 s. We impose constraints on the
inputs/states to in order to establish the transformation as follows
|u
k
| 500, |x
1
|

2
, |x
2
| 100 (12)
and the uncertain PWA model is obtained
x
k+1
=
_

_
A
1
x
k
+B
1
u
k
+f
1
+w
k
if

4
x
1

2
A
2
x
k
+B
2
u
k
+f
2
+w
k
if

2
x
1
0
A
3
x
k
+B
3
u
k
+f
3
+w
k
if 0 x
1


2
A
4
x
k
+B
4
u
k
+f
4
+w
k
if

4
x
1


2
(13)
where the matrices are given by
A
1
= A
4
=
_
1.0217 0.0504
0.8710 1.0217
_
, B
1
= B
4
=
_
0.0002
0.0089
_
, (14)
A
2
= A
3
=
_
1.0117 0.0502
0.4698 1.0117
_
, B
2
= B
3
=
_
0.0066
0.2628
_
10
3
, (15)
C021 b 3
8
th
International Scientic Technical Conference PROCESS CONTROL 2008
June 9 12, 2008, Kouty nad Desnou, Czech Republic
the afne terms
f
1
=
_
0.0059
0.2363
_
, f
2
=
_
0.0020
0.0788
_
, f
3
=
_
0.0020
0.0788
_
, f
4
=
_
0.0059
0.2363
_
, (16)
and the disturbance bound is w
k

_
0.0640
2.7335
_
. Based upon the PWA model, we can set up the explicit
fuzzy controller. First, a target set S
0
is obtained by solving optimal control problem with terminal state
constraint for local model 1 (which is valid around origin) and we obtain
S
0
:=
_

_
_
_
_
_
_
_
_
_
1 0.05
1 0.15
1 0
1 0.05
1 0.15
1 0
_
_
_
_
_
_
_
_
x
_
_
_
_
_
_
_
_
0.68
0.78
0.72
0.68
0.78
0.72
_
_
_
_
_
_
_
_
_

_
. (17)
The set S
0
is then consequently used in the minimum-time algorithm which produces the explicit con-
troller depicted in Fig. 2. Note that all colored regions are associated with a state feedback law (6) which
steers the states towards the origin.
Figure 2 Explicit controller for the inverted pendulum.
5 SIMULATION RESULTS
The closed loop simulation is shown in Fig. 3 for the initial condition x
0
= [

4
, 0]
T
which
lies within the feasible area of the explicit controller, as illustrated in Fig. 2. The controller immediately
generates maximum possible input -500 N and stabilizes the system in less than one second. It is clearly
the consequence of the minimum-time approach.
One may notice that the controller is not dened over the whole possible are of initial conditions,
as shown in Fig. 2. This is due to the constraints (12) imposed and as a result of including model
uncertainty into the control problem. The higher the uncertainty is, the smaller the feasible area is.
Although the robust minimum-time approach is a bit conservative it can stabilize the system described
by a TS model while satisfying input/state constraints which is the big advantage of this control design.
Acknowledgment
The author is pleased to acknowledge the nancial support of the Scientic Grant Agency of
the Slovak Republic under grants No. 1/3081/06, 1/4055/07 and within the framework of the Euro-
C021 b 4
8
th
International Scientic Technical Conference PROCESS CONTROL 2008
June 9 12, 2008, Kouty nad Desnou, Czech Republic
pean Social Fund (PhD Students for Modern Industrial Automation in SR, JPD 3 2005/NP1-047, No
13120200115).
0 0.2 0.4 0.6 0.8 1
1
0
1
2
3
4
samples (s)
s
t
a
t
e
s
x
1
x
2
0 0.2 0.4 0.6 0.8 1
500
0
500
samples (s)
i
n
p
u
t
Figure 3 A closed loop simulation from the initial point x
0
= [

4
, 0]
T
.
References
BAUMANN, W.; RUGH, W. 1986. Feedback Control of Nonlinear Systems by Extended Linearization.
IEEE Transactions on Automatic Control, AC31, 1, 4046.
GRIEDER, P.; KVASNICA, M.; BAOTIC, M.; MORARI, M. 2005. Stabilizing low complexity feedback
control of constrained piecewise afne systems. Automatica, 41, issue 10, 16831694.
HERCEG, M.; KVASNICA, M.; FIKAR, M. 2007. Stabilizing Predictive Control of Fuzzy Systems
Described by Takagi-Sugeno Models. In J. MIKLE

S, M. F.; KVASNICA, M., editors, Proceedings


of the 16th Int. Conf. on Process Control, 223f.pdf. Slovak University of Technology in Bratislava.
KHABER, F.; ZEHAR, K.; HAMZAOUI, A. 2005. State Feedback Controller Design via Takagi-Sugeno
Fuzzy Model: LMI Approach. International Journal of Computational Intelligence, 2, 3.
RAKOVI

C, S.; GRIEDER, P.; KVASNICA, M.; MAYNE, D.; MORARI, M. 2004. Computation of
Invariant Sets for Piecewise Afne Discrete Time Systems subject to Bounded Disturbances. In
Proceeding of the 43rd IEEE Conference on Decision and Control, 14181423. Atlantis, Paradise
Island, Bahamas.
SUARD, R.; L

OFBERG, J.; GRIEDER, P.; KVASNICA, M.; MORARI, M. 2004. Efcient Computation
of Controller Partitions in Multi-Parametric Programming. In IEEE Conference on Decision and
Control. Bahamas.
VASI

CKANINOV

A, A.; BAKO

SOV

A, M. 2006. Fuzzy modelling and identication of the chemical


technological processes. In KREJ

I, S., editor, Proc. 7. Int. Scientic-Tehnical Conf. Process Control


2006.
VASI

CKANINOV

A, A.; BAKO

SOV

A, M. 2007. Fuzzy model-based predictive control of a chemical re-


actor. In Proceedings of European Congress of Chemical Engineering (ECCE6), CDROM 1407.pdf.
Copenhagen: EFCE.
WANG, H. O.; TANAKA, K.; GRIFFIN, M. F. 1996. An Approach to Fuzzy Control of Nonlinear
Systems: Stability and Design Issues. IEEE Transactions on Fuzzy Systems, 4, 1.
C021 b 5

Você também pode gostar