Sunteți pe pagina 1din 5

- -

- hC C"m
h Fiulso, Calitorbi *Ju.e 192

TP6 - 17:20
Comparative Analysis of Control Design Techniques for a
Cart-Inverted-Pendulum in Real-Time Implementation
Chuan-Chang Hung and Benito Femarndez R.

NeuroEngineering Research & Development Laboratory


Mechanical Engineering Department
The University of Texas at Austin
Control (ESC) has a similar framework of knowledgebase control as fuzzy logic control. However, the control for expert system is performed by using symbolic
and numerical processors [7]. ESC reads the input information, the inference rules updates the knowledge
base with the current state of its knowledge base and
performs the required control action. Neural Network
Control (NNC) has been applied in the identification
and control of nonlinear dynamic plants [13]. Many
neural nets have the ability to learn from a series of
training data. Consequently, they learn the nonlinear
governig relationships to model unknown control sys-

Abatract- Conventional controllers such as PID


controllers have a long history of successful industrial
applications. However, in recent years, many nonlinear controllers have been applied to deal with nonlinear systems. Sliding mode control hs been successused for SISO non-linear systems and for certain
fully
m tivariable systems, fuzzy-logic has been successfully applied in many practical control systenm. Meanwhile, there has been interest in developig expert syspr
kltems for control that involve necDary
edge required for good control. Neural network control
has been used to determine adaptive laws for the adjustment of the control parameters. This paper will
evaluate and compare PD, sliding mode, fuzzy, expert
system, and neural network control methods in controlling the cart-inverted-pendulum. Performance is
evaluated in terms of control surface, system response,
stability, and robustness. Moreover the comparison of
these controllers is validated througli experimentation.
Strengths and weaknesses, in the real-time control are
indicated.

tem m an intelligent manner.

The inverted-pendulum has been used in the literature as a platform to study real world nonlinear control problems by using different control techniques [1,
10, 15, 16]. Although adaptive techniques [1, 10] are
currently under study at the NERDLab, in this paper
we restrict our comparison to PDC, SMC, FLC, ESC,
and NNC, in order to compare their performance. This

paper shows simulation and experinental results that


compare the controller performance. In the next section, the system's model is presented. Later, the five
controller designs are presented, and we compare their
performance in terms of transient response, robustness,
and sensitivity to disturbances using simulation. Finally, validation of the computer simulation results is
carried out through real-time implementation.

I. INTRODUCTION
PID control [11] is a major practical technology that

is widely used i industrial applications Necessary


and sufficent conditions for controlling linear timeinvariant systems and well-known design methods have
been established over the past century. Linear control methods such as Proportional-Derivative Control
(PDC) depend upon assumptions that the small range
of operation for the linear model to be valid, the system
model is indeed linearizable, and the parameters of the
system model are well known. However, if the operat
ing range of the control system is large, or hard nonlinearities exist, linear control may be inappropriate
for accurate system control. In the past three decades,
some nonlinear control methods have been developed
to predict and properly compensate for undesired behavior of the control systems due to nonlinearities and
unknown parameters of the systems. One of them,
Fuzzy Logic Control (FLC) [14] is a Imowledge-based
control in which membership functions of system variables are used to cope with uncertainty in the control
process. In FLC, linguistic description of human expertise in controlling a proc are represented as fuzzy
rules or relations, and the control action is caried out
by inference mechnisms [2]. Slding Mode Control
(SMC) [3, 9] provides an approach to the problem
of maintaining stability and consistent performance
in the presence of modeling imprecision. The system
trajectories are confined to a "sliding surface which
quantifies the tracking performance. Expert System

II. CONTROLLER DESIGN


The motor in the cart-inverted-pendulum system
drives the torque required to move the cart back and
forth in order to balance the pendulum. The system
model and the values of tuned parameters for each controller were described in [5] for details. Since this system is a non-minimum phase and there are some nonlinear terms such as friction and backlash, the system
is open-loop unstable. Choosing a suitable controller,
it is possible to obtain good performance balancing the
pendulum. Different controller designs are addressed
below.
2.1 PD Controller Design: PD controller is designed based on the linearized model. Using a linear
quadratic regulator (LQR) [16] with weights Q = I and
R L1
2.2 Sliding Mode Controller Design: A sliding
surface is defined as a differential operator on the error [10],
S ={xls(x)

1870

0}, S(t) = i(t) + Ae(t)

(1)

Ge -90(t). hrorn the necsayand sufwhere, c(t) O(t)


ficient condition for the existence of the sliding mode,
the time derivative of the sliding surface is set to:

s(t) = -7tanh(!452)

producing the appropriate mappin. For training, the

network will learn better when it is trained by good


data. Since the performance of fuzzy controller is much
more satisfactory than the other controllers, it is appropriate to use fuzzy controller data to train the neural network. The fuzzy controller generates each training sample (zI,z2,r3,Z4, u) at each iteration of the
pendulum controlling process. 1000 training sample
vectors are used to train the controller network. After the weights have been trained, the forward network

(2)

where, q is a strictly positive constant, and b is the


thickness of the boundary layer used to eliminate
"chatteringe control about s = 0.
2.3 Expert System Controller Design: The eapert system controller consists of control algorithm and
symbolic process unit [7, 12]. In the symbolic processor, the rule base tnes to extract knowledge from

can compute the next state from this control law.


m

j=1

i=l

u = F(wj x Tanhj[ZE xi x wij + by] + b)

the process in order to perform certain high-level control actions. Rule testmg is guided by the data-driven
forward-chaining [6]. If a rule premise is true when
tested, its action is executed. If it s not true it keeps
searching until it finds a premise that is., Then, the
expert system allows the execution of the numerical
procedure to get the control value. However, if any
premis cannot be found to be true in the whol ru
ase, a new rule has to be added. For comparison purpose, we use the same rules as fuzzy ruls and quantize input and output domains the expert system as
those m the fuzzy controller. The control action is obtained from the linear combination of input variables
such as u = hi x zx + xzx 2. The h, and k2 are
determined according to what kind of control action is
executed in the output domaim. The value of u is a
"crisp" value. The knowledge-base rules are shown in
Fig. 1.
2.4 Fussy Controller Design: As a knowledgebased decision making strategy, the fuzzy controller
develops a rule base using linlguistic descriptions of
human experts. The rule base relates fuzzy quantities which present decision criteria and decision actions
(see Fig. 1). Fuzxy linguistic terms such as small, positive small, high , etc. are represented as fuzzy sets
that do not -have a crisp boundary in the universe of
discourse. In fuzzy nature, there s a vagueness associated with the membership functions in a fuzzy set,
which can take on any value in the interval [0,11. Furthermore, given measured values of the inputs, the appropriate decision action can be computed using the
compositional rule of inference which is mar - mn
operations from fuzzy logic [14].. Actual process measurements are crisp, i.e., non-fuzzy. Hence, they are
fuzzified in order to apply the compositional rule of
inference. Conversely, the decision action has to be a
crisp value. Hence, each decision action inference is
defuzzified so that it could be used to determine the
real output value. Several mthods are available to
perform this operations [2].
The domain of the input variables zi and X2 and
control variable are quantized as Positive age Positive Small, Negative Large, Negative Small, ad Zero.
Common sense and engineering judgment indicate the
possible rules to balance an inverted pendulum. Therefore, the 15 rules as shown in Fig. 1 can be chosen
based on this knowledge and be applied to -control the
pendulum.
2.5 Neural Network Controller Design: The neural control system of the cart-inverted-pendulum consists of a three layer perceptron neural network trained
with an Adaptive BackPropagation (ABP) algorithm
[4]. The neurocontroller network is fully connected

(3)

where, w is the weight connected between two units,


z is the activation of input unit, Tanh is a hyperbolic
threshod function, and b is the bias of unit.
III. SIMULATION RESULTS
The simulation progra are implemented in Mathematica. The procedure for comparison is divided into:
control surface, transient response, and robustness.
3.1 Control Surface: In order to visualize these controlers, we plot the control surface of each controller.
The control surface shows the control u corresponding
to all combination of values of the two input state variabks error and error rate. Figure. 5 shows the resulting control surface of each controller. The fuzzy, expert
system, and sliding mode control surfaces show structured (rule-like) type of control process. This implies
that the fuzzy and expert system controllers can directly encode structured knowledge and input-output
relationship can be interpreted from a rule. However,
the difference of the control process between these two
AI controllers is that the expert system is based on
searching one rule to fire in one control action, and
does not combine all rules to 4et the output. The sliding mode surface airm to achieve
a trade-off between
roumstness
and performance. The neural network control surface displays the unstructured nature of supervised learing and a smooth interpolative function
mapping. The Pg1 control surface is a flat surface, that
is, its control process reflects the characteristic of a linear controller.
3.2 Transient Response and Robustness Analysis: Each controller has its own particular property
to control the system. It is important to compare the
control effect using the same criteria and conditions.
First, Fi;. 2 shows the pendulum response for the
same nitial conditions, values of systems parameters,
and the same initial magnitude of control torce (which
is the output torque of motor without noise). The PD
controller displays a faster response than the others.
The expert system control shows slower response. In
order to test the robustness of the controller, the same
control is used as in the previous test. We change the
values of system parameter to 5 times the initial mass
of the pendulum, 2 times the initial length of the pendulum and 10 times the initial friction. The results
are shown in Fig. 3.-The neural network controller is
more sensitive to the change of the system parameters.
Finally, we input noise to the system and test the sensitivty of the system to disturbances. The noise is in the
form of a random number between 0 and 1. The result
is shown in Fig. 4. Fuzzy and Sliding mode controllers
1871

The speed of calculating the control output from the


forward network for the neural control system is slow.
Moreover, the fuzzy and sliding mode controllers have
similar computation time that are acceptable.

are less sensitive to the noise. In the PD, expert system, and neural network controllers, the steady error

increaes.

TV. EXPERIMENTAL VALIDATION


4.1 Experimental Setup: It is critical to validate
the performance of nonlinear systems through realtime implementation. Since from the results of the
simulation we are not able t completely quantify the
performance of the controller. Therefore, we implemrent the real-time control program using the Lab Vew
package from National Instruments, Inc. to compare
the controllers performance. For acquisition, we use a
hig-resolution audio fequency range analog I/O NBA2100 board for the Macintosh II family of computers. This board has 16-bit, simultaneously-sampled
analog input with 64-times ogverampling, deltasigma
modulating ADCs, and digital antaiaig filtrs for
extremely high-accuracy data acquistion. The sensor
for measuring the angle of the pendulum is a potentiometer. Al the controllers are designed by using the
utilities in LabView and Think-C.
4.2 Experimental Results: The first step is to investigate the system response of the real time control.
From the results of the real time control implementation, it is obvious that the performance i quite different from that anticipated from the simulation. Fig. 6
shows the stable history (about 15 seconds) of the pendulum controlled about the equilibrium point. The PD
controller is more unstable. Te fuzzy controller can
perform better than the other ctrollers m ;ng the
pendulum stand longer at the reference position. Sliding mode control leads to more chattering. Although
expert system controls can keep the pendulum stable
and have less initial average error, it quickly becomes
unstable. The neural network controller performs very
small steady error and is more stable at the begning,
but it also diverges.
The second step is to test their robustnem for the

V. CONCLUSIONS
From the view pomt of designing a controller, a PD
is easier to implement than the other controllers. In
section 3, the simulation results show that the PD controller performs well when finely tuned. However, in
real time control, a PD lose its stability due to the
effect of disturbances and is senitivity to the change
in the plant parameters. This verifies the fact it is
hard to control a nonlinear system with a linear controller. Based on the experimental results, the fuzzy
controller has high capability to solve the nonlimearity and uncertainty problems i the control system.
The membership function plays a very critical role in
this control process. Once one define a good membership function, the performance of a fuzzy controller
will be very robust in the face of system unertainty.
control lacis
However, a weakness is that the
formal synthesis and analysis techniques. The control
procesm depends upon the experence of human operators whose qualitative rules of thumb can be described
as fuzzy decision rules. Sliding mode controller has
the capability to handle modelin imprecion and disturbances. However, it may excite high-frequency dy-

namics and its desig i more elaborate. Expert system control uses the same rule as a fuzzy control, but
it can't predict all the possibilities of the system uncertainty according to its searching algorithm. Using
more rules in the expert system's rule base can isprove the performance, however it becomes expensie
computationally. Training the neural network control
system is time-conming due to the backpropagation
algorithm requiring a long time to-train the controller
network. However, the result of neural network control
shows its learning capability from traig the trajectory of fussy controer with the sm robustness as
that of the fuy controller around the rderence position. Moreover, it perform very ble at the reference
position in a short . How to keep the system stawith the neural network controlkr
ble for a longer
depends on the training data and time. Good training
data that reprents faithfuly the system respone can
result in better performance.
The simulations and experiments show the- performance of each controller. ESC, FLC, and NNC are
function approximations of either rules or nonlinear
mapping lie SMC. There is not enough evidence to
conclude that one controller could replace the others. However, this paper indicates the weaknesses and
strengths of each controller and provides a basic idea
to choose a controller for real-time application. In
using gain
prinaple all controllers (except PD, u
scheduling) could perform similarly. Ease of design and
implementation would be the dding criteria Tor selection as wel as familiarit with the tool. Familiarity
with the tool (control) ai system are two requisites

changes of the plant parameters without changng the


parameters for each controller. The mass of the pendulum is changed to two times the original mm. Fig.
7 shows the fursy and neural network control perform
more robustly in the control proes. the performance
of a PD controller is obviously influenced by the change
in the plant parameters. It is a distinctly different result from the simulation im the previous section. Additionally, sliding mode and expert system controllers
become unstable quicker.
Basically, when dealing with real-time control processes, the effect of the disturbance should be taken
into account. The nonlinear controllers are more tolerant to external noise. Linear controllers can not adapt
to the effect of nolse. Table I lists the result of thge
performance of the real time implementation, and lists
the result of the performance with the change of the
mass of the pendulum.
Additionally, the effect of computation time for system stability is inevitable. The longer computation
time, the more unstable the system response will be.
We count the time required to calculate the control

for the succes of any controller design.

output for each controller. Table 1. lists the results.


The PD controller takes lesser time to calculate the
output. However, it still can not perform well due
to its linear characteristic. The expert system takes
longer time to execute, since it needs to search the
rule base from top-level until it finds the a propriate
rule to fire. Therefore, it becomes unstable quicker.

REFERENCES

[1] A. G. Barto, "Neuronlike Adaptive Elements


That Can Solve Difficult Learning Control Problems', IEEE Transaction on Systems, Man, and
Cybernetic, VOL, SMC-1S, No. 5, (Sept-Oct.
1987).

1872

[2] Bait Koskof'Neural Networks and Fussy


Systems", (Prentice Hall, Englewood Cliffs,
N107632, 1992).
[3] Benito FernAndez Ft, J. Karl Hedrick, "Control
of Multivariable Non-linear Systems by Slidmng
Mode Method", Int. J. Control, VOL. 46, N(
3, pp. 1019-1040, 1987.
"Tools for ANN learning",
[4]. Benito Fernandez
Artificial Neural Network in Enginering, (ASME
Press, Nov. 1991).
[5] C. C. Hung and Benito Fernandez Ri "Comparative Analysis of Control Design Techniques for a
Nonlinear System ArtficiaLNesml Network in
Engineering, (ASME Press, Nov. 1992).
[6] C. V. Negoita.,"Expert Systems and Fuzzy
Systems", (Mass.:Benjamin/Cummings Publishing, 1984).
[7] D. A. Handelnan and .R F. Stengel, "Combining
Expert System and Analytical Redundancy Concepts for Fault-Tolerant Flight Control", AIAA
Journal of Guidance, Control, and Dynamics,
Vol. 12, Number 1, pp.39-45, (Jan-Feb. 1989).
(8] D. Nguyen, and B. Widroi, "The Truck BackerUpper: An Example of Self-Learning in Neural Networks", Proceedings of International Joint
Conference on Neurul Networks (IJCNN-89), vol.
II, pp. 357-363, (June 1989).
[9) G. W. Bae, Benito Fernandez R., and L. J. Everet,
"Robust Impedance Control of Robot Manipulators", DSC-Vol. 26-, Robotics Research-1990,
(ASME 1991).
[10] H. R. Berenji, Y. Y. Chen, C. C. Lee, J. S. Jang,
and S. Murugesan. "A Hierarchical Approach
to Designing Approxinate Reasoning-Based Controllers for Dnamic Physical Systems". In Sixth
Conference on Uncertainty in Artificial Intelligence, pp. 362-369, 1990.
[(1 1] Katsuhiko Ogata, "Modern Control Engineering", (Prentice Hall, Inc. 1970).
[12] K. E. Arien, "Use of Expert Systens in Closed
Loop Feedback C-ontrol", Proceedings of the 1986
American Control Conference, Seattle, pp. 140145,(May 1986).,'
[13] Kumpati S. Narendra and Kannan Parthasarathy,
"Identification and Control of Dynamical Systems
Using Neural Networks", IEEE transaction on
Neural Networks. voL 1. No. 1, (March 1990).
[14] M. M. Gupta and T. Yamnakawa, "Fuzzy Logic
in Knowledgee-Based Systems, Decision and
Control", (North-Holland, 1988).
[15] Takeshi Yamakawa, "Analog Fuzzy Hardware System and Its Application torFuzzy Logic Control",
The 1st International Workshop on Industrial Application of Fuzzy Control and intelligent System,
(Nov., 1991).[16] W. L. Brogan, "Modern Control Theory",
Third Edition, (Prentice Hall, Inc. 1991).

AA LAt
-UNLOM ir--.SMMIL
lS
*1

IN

I
N.116

4-a-

444

_.t

L&A AkAk

n
-a

ML

A_L

&k

Ns

adn
-

ML
N.

3. FN

it,

usM

Fs

FL

PS

M.

CL I*
adkw

Mm d

k.

rn

upo

uwdie

eyW
Ohe Icmu S(r
idamT"
'0l'#- fuNI
* (OO
mdw

2. FineO

*kL s
he --c aud ied.o
Thurdwe,shinfum.(

pN

icpnQM9

FHO4 sZIS.4.isEaeDu is
EL sDoas.
*U ,TIM uskix

0k2

Figure 1: The rule-baseed fuzzy system


and expert system

Compr

Fiur 2-

'-><n of-anl respons

-0.01
Si

X~~~~~~~~~~

Figure 2.

O@

@4

........

Comparison

eO.OS~

OS|

...........' '.

of angle

response

~~~ ............,,

set

change
0-*-

of

the

F-

plant's

parameters

'

P*,O
-uEatMod

__ aw

.l * ,W_ ~~~~~~~~~............

........... ..

,.

NX

L.

C2

...
0.4

sec

-...i

&

" "::. --: I

. .

0.5

Figure 4: Comparison of angle


with disturbances
873

04

response

EXC
NNIC
PDC I FLC I SM-C
13 ods 11 ond .9 t ecnd
C ~ne 1IaJFiyFm :Eff07rad 50T0r7 :+50T0 *O&0frd tO.01 rad
e
10 iseamn
7 secods 415 secods
L3 seconds 13 s
Stab Eco
Mtw
rad *00
ra
I0.01 d
Chane
rad- *.0 rad :tO.02
Stmdy
0.0163
0.01879
ion
0.01683
0.0185
o.0185
Computa-

r ~ ~~

7
Befor ~StabeTine

Time

seconds

seconds

seco

ds

seconds

Table 1. The performance of the controller before and after parameter changes
?iY Osatrel

Su"dtigEd. eatrewhn

sMU.

bwtl htnrh

Expert Jyste coatrsi swfun

oeatrel swhse

Figure 5: Control Surface


am mom -. 9- 0.0

-.

.1i
rl.-.

PIM Sam .

-1, -0

PI=

-no bep

" ;;a

M-.

M IV-ftg= Oa la..Pft

L-Mmlmi.

r=

IN

-a

1-

Figure 7: Comparison of angle response with


the change of the plantis parameter in
real-tine control process

Figure 6: Comparison of angle response mn


the real-time control process

1874

S-ar putea să vă placă și