04793202.pdf

5
TP6 - 17:20 - - - hC C"m h Fiulso, Calitorbi *Ju.e 192 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 Abatract- Conventional controllers such as PID controllers have a long history of successful industrial applications. However, in recent years, many nonlin- ear controllers have been applied to deal with nonlin- ear systems. Sliding mode control hs been success- fully used for SISO non-linear systems and for certain m tivariable systems, fuzzy-logic has been success- fully applied in many practical control systenm. Mean- while, there has been interest in developig expert sys- tems for control that involve necDary pr kl- edge required for good control. Neural network control has been used to determine adaptive laws for the ad- justment of the control parameters. This paper will evaluate and compare PD, sliding mode, fuzzy, expert system, and neural network control methods in con- trolling 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. I. INTRODUCTION PID control [11] is a major practical technology that is widely used i industrial applications Necessary and sufficent conditions for controlling linear time- invariant systems and well-known design methods have been established over the past century. Linear con- trol 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 non- linearities 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 be- havior 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 vari- ables are used to cope with uncertainty in the control process. In FLC, linguistic description of human ex- pertise 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 Control (ESC) has a similar framework of knowledge- base control as fuzzy logic control. However, the con- trol for expert system is performed by using symbolic and numerical processors [7]. ESC reads the input in- formation, 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- tem m an intelligent manner. The inverted-pendulum has been used in the litera- ture as a platform to study real world nonlinear con- trol 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 sec- tion, 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. Fi- nally, validation of the computer simulation results is carried out through real-time implementation. 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 con- troller were described in [5] for details. Since this sys- tem is a non-minimum phase and there are some non- linear 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 de- signed based on the linearized model. Using a linear quadratic regulator (LQR) [16] with weights Q = I and R L 1 2.2 Sliding Mode Controller Design: A sliding surface is defined as a differential operator on the er- ror [10], S = {xls(x) = 0}, S(t) = i(t) + Ae(t) (1) 1870

Upload: mohit-soni

Post on 18-Jul-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 04793202.pdf

TP6 - 17:20- -

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

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 DepartmentThe University of Texas at Austin

Abatract- Conventional controllers such as PIDcontrollers have a long history of successful industrialapplications. However, in recent years, many nonlin-ear controllers have been applied to deal with nonlin-ear systems. Sliding mode control hs been success-fully used for SISO non-linear systems and for certainm tivariable systems, fuzzy-logic has been success-fully applied in many practical control systenm. Mean-while, there has been interest in developig expert sys-tems for control that involve necDarypr kl-edge required for good control. Neural network controlhas been used to determine adaptive laws for the ad-justment of the control parameters. This paper willevaluate and compare PD, sliding mode, fuzzy, expertsystem, and neural network control methods in con-trolling the cart-inverted-pendulum. Performance isevaluated in terms of control surface, system response,stability, and robustness. Moreover the comparison ofthese controllers is validated througli experimentation.Strengths and weaknesses, in the real-time control areindicated.

I. INTRODUCTIONPID control [11] is a major practical technology thatis widely used i industrial applications Necessaryand sufficent conditions for controlling linear time-invariant systems and well-known design methods havebeen established over the past century. Linear con-trol methods such as Proportional-Derivative Control(PDC) depend upon assumptions that the small rangeof operation for the linear model to be valid, the systemmodel is indeed linearizable, and the parameters of thesystem model are well known. However, if the operating range of the control system is large, or hard non-linearities exist, linear control may be inappropriatefor accurate system control. In the past three decades,some nonlinear control methods have been developedto predict and properly compensate for undesired be-havior of the control systems due to nonlinearities andunknown parameters of the systems. One of them,Fuzzy Logic Control (FLC) [14] is a Imowledge-basedcontrol in which membership functions of system vari-ables are used to cope with uncertainty in the controlprocess. In FLC, linguistic description of human ex-pertise in controlling a proc are represented as fuzzyrules or relations, and the control action is caried outby inference mechnisms [2]. Slding Mode Control(SMC) [3, 9] provides an approach to the problemof maintaining stability and consistent performancein the presence of modeling imprecision. The systemtrajectories are confined to a "sliding surface whichquantifies the tracking performance. Expert System

Control (ESC) has a similar framework of knowledge-base control as fuzzy logic control. However, the con-trol for expert system is performed by using symbolicand numerical processors [7]. ESC reads the input in-formation, the inference rules updates the knowledgebase with the current state of its knowledge base andperforms the required control action. Neural NetworkControl (NNC) has been applied in the identificationand control of nonlinear dynamic plants [13]. Manyneural nets have the ability to learn from a series oftraining data. Consequently, they learn the nonlineargovernig relationships to model unknown control sys-tem m an intelligent manner.The inverted-pendulum has been used in the litera-

ture as a platform to study real world nonlinear con-trol problems by using different control techniques [1,10, 15, 16]. Although adaptive techniques [1, 10] arecurrently under study at the NERDLab, in this paperwe restrict our comparison to PDC, SMC, FLC, ESC,and NNC, in order to compare their performance. Thispaper shows simulation and experinental results thatcompare the controller performance. In the next sec-tion, the system's model is presented. Later, the fivecontroller designs are presented, and we compare theirperformance in terms of transient response, robustness,and sensitivity to disturbances using simulation. Fi-nally, validation of the computer simulation results iscarried out through real-time implementation.

II. CONTROLLER DESIGN

The motor in the cart-inverted-pendulum systemdrives the torque required to move the cart back andforth in order to balance the pendulum. The systemmodel and the values of tuned parameters for each con-troller were described in [5] for details. Since this sys-tem is a non-minimum phase and there are some non-linear terms such as friction and backlash, the systemis open-loop unstable. Choosing a suitable controller,it is possible to obtain good performance balancing thependulum. Different controller designs are addressedbelow.

2.1 PD Controller Design: PD controller is de-signed based on the linearized model. Using a linearquadratic regulator (LQR) [16] with weights Q = I andR L12.2 Sliding Mode Controller Design: A slidingsurface is defined as a differential operator on the er-ror [10],

S ={xls(x) = 0}, S(t) = i(t) + Ae(t) (1)

1870

Page 2: 04793202.pdf

where, c(t) GeO(t) -90(t). hrorn the necsayand suf-ficient condition for the existence of the sliding mode,the time derivative of the sliding surface is set to:

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

where, q is a strictly positive constant, and b is thethickness of the boundary layer used to eliminate"chatteringe control about s = 0.2.3 Expert System Controller Design: The ea-pert system controller consists of control algorithm andsymbolic process unit [7, 12]. In the symbolic pro-cessor, the rule base tnes to extract knowledge fromthe process in order to perform certain high-level con-trol actions. Rule testmg is guided by the data-drivenforward-chaining [6]. If a rule premise is true whentested, its action is executed. If it s not true it keepssearching until it finds a premise that is., Then, theexpert system allows the execution of the numericalprocedure to get the control value. However, if anypremis cannot be found to be true in the whol ruase, a new rule has to be added. For comparison pur-

pose, we use the same rules as fuzzy ruls and quan-tize input and output domains the expert system asthose m the fuzzy controller. The control action is ob-tained from the linear combination of input variablessuch as u = hi x zx + xzx 2. The h, and k2 aredetermined according to what kind of control action isexecuted in the output domaim. The value of u is a"crisp" value. The knowledge-base rules are shown inFig. 1.

2.4 Fussy Controller Design: As a knowledge-based decision making strategy, the fuzzy controllerdevelops a rule base using linlguistic descriptions ofhuman experts. The rule base relates fuzzy quanti-ties which present decision criteria and decision actions(see Fig. 1). Fuzxy linguistic terms such as small, pos-itive small, high , etc. are represented as fuzzy setsthat do not-have a crisp boundary in the universe ofdiscourse. In fuzzy nature, there s a vagueness asso-ciated with the membership functions in a fuzzy set,which can take on any value in the interval [0,11. Fur-thermore, given measured values of the inputs, the ap-propriate decision action can be computed using thecompositional rule of inference which is mar - mnoperations from fuzzy logic [14].. Actual process mea-surements are crisp, i.e., non-fuzzy. Hence, they arefuzzified in order to apply the compositional rule ofinference. Conversely, the decision action has to be acrisp value. Hence, each decision action inference isdefuzzified so that it could be used to determine thereal output value. Several mthods are available toperform this operations [2].The domain of the input variables zi and X2 and

control variable are quantized as Positive age Posi-tive Small, Negative Large, Negative Small, ad Zero.Common sense and engineering judgment indicate thepossible rules to balance an inverted pendulum. There-fore, the 15 rules as shown in Fig. 1 can be chosenbased on this knowledge and be applied to-control thependulum.2.5 Neural Network Controller Design: The neu-ral control system of the cart-inverted-pendulum con-sists of a three layer perceptron neural network trainedwith an Adaptive BackPropagation (ABP) algorithm[4]. The neurocontroller network is fully connected

producing the appropriate mappin. For training, thenetwork will learn better when it is trained by gooddata. Since the performance of fuzzy controller is muchmore satisfactory than the other controllers, it is ap-propriate to use fuzzy controller data to train the neu-ral network. The fuzzy controller generates each train-ing sample (zI,z2,r3,Z4, u) at each iteration of thependulum controlling process. 1000 training samplevectors are used to train the controller network. Af-ter the weights have been trained, the forward networkcan compute the next state from this control law.

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

j=1 i=l(3)

where, w is the weight connected between two units,z is the activation of input unit, Tanh is a hyperbolicthreshod function, and b is the bias of unit.

III. SIMULATION RESULTSThe simulation progra are implemented in Mathe-matica. The procedure for comparison is divided into:control surface, transient response, and robustness.3.1 Control Surface: In order to visualize these con-trolers, we plot the control surface of each controller.The control surface shows the control u correspondingto all combination of values of the two input state vari-abks error and error rate. Figure. 5 shows the result-ing control surface of each controller. The fuzzy, expertsystem, and sliding mode control surfaces show struc-tured (rule-like) type of control process. This impliesthat the fuzzy and expert system controllers can di-rectly encode structured knowledge and input-outputrelationship can be interpreted from a rule. However,the difference of the control process between these twoAI controllers is that the expert system is based onsearching one rule to fire in one control action, anddoes not combine all rules to 4et the output. The slid-ing mode surface airm to achieve a trade-off betweenroumstness and performance. The neural network con-trol surface displays the unstructured nature of su-pervised learing and a smooth interpolative functionmapping. The Pg1 control surface is a flat surface, thatis, its control process reflects the characteristic of a lin-ear controller.3.2 Transient Response and Robustness Anal-ysis: Each controller has its own particular propertyto control the system. It is important to compare thecontrol effect using the same criteria and conditions.First, Fi;. 2 shows the pendulum response for thesame nitial conditions, values of systems parameters,and the same initial magnitude of control torce (whichis the output torque of motor without noise). The PDcontroller displays a faster response than the others.The expert system control shows slower response. Inorder to test the robustness of the controller, the samecontrol is used as in the previous test. We change thevalues of system parameter to 5 times the initial massof the pendulum, 2 times the initial length of the pen-dulum and 10 times the initial friction. The resultsare shown in Fig. 3.-The neural network controller ismore sensitive to the change of the system parameters.Finally, we input noise to the system and test the sensi-tivty of the system to disturbances. The noise is in theform of a random number between 0 and 1. The resultis shown in Fig. 4. Fuzzy and Sliding mode controllers

1871

Page 3: 04793202.pdf

are less sensitive to the noise. In the PD, expert sys-tem, and neural network controllers, the steady errorincreaes.

TV. EXPERIMENTAL VALIDATION4.1 Experimental Setup: It is critical to validatethe performance of nonlinear systems through real-time implementation. Since from the results of thesimulation we are not able t completely quantify theperformance of the controller. Therefore, we imple-mrent the real-time control program using the LabVewpackage from National Instruments, Inc. to comparethe controllers performance. For acquisition, we use ahig-resolution audio fequency range analog I/O NB-A2100 board for the Macintosh II family of comput-ers. This board has 16-bit, simultaneously-sampledanalog input with 64-times ogverampling, deltasigmamodulating ADCs, and digital antaiaig filtrs forextremely high-accuracy data acquistion. The sensorfor measuring the angle of the pendulum is a poten-tiometer. Al the controllers are designed by using theutilities in LabView and Think-C.4.2 Experimental Results: The first step is to in-vestigate the system response of the real time control.From the results of the real time control implementa-tion, it is obvious that the performance i quite differ-ent from that anticipated from the simulation. Fig. 6shows the stable history (about 15 seconds) of the pen-dulum controlled about the equilibrium point. The PDcontroller is more unstable. Te fuzzy controller canperform better than the other ctrollers m ;ng thependulum stand longer at the reference position. Slid-ing mode control leads to more chattering. Althoughexpert system controls can keep the pendulum stableand have less initial average error, it quickly becomesunstable. The neural network controller performs verysmall steady error and is more stable at the begning,but it also diverges.The second step is to test their robustnem for the

changes of the plant parameters without changng theparameters for each controller. The mass of the pen-dulum is changed to two times the original mm. Fig.7 shows the fursy and neural network control performmore robustly in the control proes. the performanceof a PD controller is obviously influenced by the changein the plant parameters. It is a distinctly different re-sult from the simulation im the previous section. Ad-ditionally, sliding mode and expert system controllersbecome unstable quicker.

Basically, when dealing with real-time control pro-cesses, the effect of the disturbance should be takeninto account. The nonlinear controllers are more toler-ant to external noise. Linear controllers can not adaptto the effect of nolse. Table I lists the result of thgeperformance of the real time implementation, and liststhe result of the performance with the change of themass of the pendulum.

Additionally, the effect of computation time for sys-tem stability is inevitable. The longer computationtime, the more unstable the system response will be.We count the time required to calculate the controloutput for each controller. Table 1. lists the results.The PD controller takes lesser time to calculate theoutput. However, it still can not perform well dueto its linear characteristic. The expert system takeslonger time to execute, since it needs to search therule base from top-level until it finds the a propriaterule to fire. Therefore, it becomes unstable quicker.

The speed of calculating the control output from theforward network for the neural control system is slow.Moreover, the fuzzy and sliding mode controllers havesimilar computation time that are acceptable.

V. CONCLUSIONSFrom the view pomt of designing a controller, a PDis easier to implement than the other controllers. Insection 3, the simulation results show that the PD con-troller performs well when finely tuned. However, inreal time control, a PD lose its stability due to theeffect of disturbances and is senitivity to the changein the plant parameters. This verifies the fact it ishard to control a nonlinear system with a linear con-troller. Based on the experimental results, the fuzzycontroller has high capability to solve the nonlimear-ity and uncertainty problems i the control system.The membership function plays a very critical role inthis control process. Once one define a good mem-bership function, the performance of a fuzzy controllerwill be very robust in the face of system unertainty.However, a weakness is that the control lacisformal synthesis and analysis techniques. The controlprocesm depends upon the experence of human opera-tors whose qualitative rules of thumb can be describedas fuzzy decision rules. Sliding mode controller hasthe capability to handle modelin imprecion and dis-turbances. However, it may excite high-frequency dy-namics and its desig i more elaborate. Expert sys-tem control uses the same rule as a fuzzy control, butit can't predict all the possibilities of the system un-certainty according to its searching algorithm. Usingmore rules in the expert system's rule base can is-prove the performance, however it becomes expensiecomputationally. Training the neural network controlsystem is time-conming due to the backpropagationalgorithm requiring a long time to-train the controllernetwork. However, the result of neural network controlshows its learning capability from traig the trajec-tory of fussy controer with the sm robustness asthat of the fuy controller around the rderence posi-tion. Moreover, it perform very ble at the referenceposition in a short . How to keep the system sta-ble for a longer with the neural network controlkrdepends on the training data and time. Good trainingdata that reprents faithfuly the system respone canresult in better performance.The simulations and experiments show the- perfor-

mance of each controller. ESC, FLC, and NNC arefunction approximations of either rules or nonlinearmapping lie SMC. There is not enough evidence toconclude that one controller could replace the oth-ers. However, this paper indicates the weaknesses andstrengths of each controller and provides a basic ideato choose a controller for real-time application. Inprinaple all controllers (except PD, u using gainscheduling) could perform similarly. Ease of design andimplementation would be the dding criteria Tor se-lection as wel as familiarit with the tool. Familiaritywith the tool (control) ai system are two requisitesfor the succes of any controller design.

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

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

1872

Page 4: 04793202.pdf

[2] Bait Koskof'Neural Networks and FussySystems", (Prentice Hall, Englewood Cliffs,N107632, 1992).

[3] Benito FernAndez Ft, J. Karl Hedrick, "Controlof Multivariable Non-linear Systems by SlidmngMode Method", Int. J. Control, VOL. 46, N(3, pp. 1019-1040, 1987.

[4]. Benito Fernandez it, "Tools for ANN learning",Artificial Neural Network in Enginering, (ASMEPress, Nov. 1991).

[5] C. C. Hung and Benito Fernandez Ri "Compara-tive Analysis of Control Design Techniques for aNonlinear System ArtficiaLNesml Network inEngineering, (ASME Press, Nov. 1992).

[6] C. V. Negoita.,"Expert Systems and FuzzySystems", (Mass.:Benjamin/Cummings Publish-ing, 1984).

[7] D. A. Handelnan and .R F. Stengel, "CombiningExpert System and Analytical Redundancy Con-cepts for Fault-Tolerant Flight Control", AIAAJournal of Guidance, Control, and Dynamics,Vol. 12, Number 1, pp.39-45, (Jan-Feb. 1989).

(8] D. Nguyen, and B. Widroi, "The Truck Backer-Upper: An Example of Self-Learning in Neu-ral Networks", Proceedings of International JointConference 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 Manip-ulators", 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 Approachto Designing Approxinate Reasoning-Based Con-trollers for Dnamic Physical Systems". In SixthConference on Uncertainty in Artificial Intelli-gence, pp. 362-369, 1990.

[(1 1] Katsuhiko Ogata, "Modern Control Engineer-ing", (Prentice Hall, Inc. 1970).

[12] K. E. Arien, "Use of Expert Systens in ClosedLoop Feedback C-ontrol", Proceedings of the 1986American Control Conference, Seattle, pp. 140-145,(May 1986).,'

[13] Kumpati S. Narendra and Kannan Parthasarathy,"Identification and Control of Dynamical SystemsUsing Neural Networks", IEEE transaction onNeural Networks. voL 1. No. 1, (March 1990).

[14] M. M. Gupta and T. Yamnakawa, "Fuzzy Logicin Knowledgee-Based Systems, Decision andControl", (North-Holland, 1988).

[15] Takeshi Yamakawa, "Analog Fuzzy Hardware Sys-tem and Its Application torFuzzy Logic Control",The 1st International Workshop on Industrial Ap-plication of Fuzzy Control and intelligent System,(Nov., 1991).-

[16] W. L. Brogan, "Modern Control Theory",Third Edition, (Prentice Hall, Inc. 1991).

-UNLOM ir--.S lS *1 adn- I a4-a- -a 4N.116444

. PS

ML Ns N.

3.FNFL Fs usM

Mm d : L * y upo rn k. uwdie r k

2. FineO pN eyW Ohe Icmu S(r *kL s he --c aud ied.omdw icpnQM9 Thurdwe,shinfum.(

'0l'#- fuNIidamT"* (OO

FHO4 sZIS.4.isEaeDu isEL sDoas.

*U ,TIM uskix 0k2

Figure 1: The rule-baseed fuzzy systemand expert system

-0.01

Fiur 2- Compr'-><n of-anl respons

X~~~~~~~~~~ ...........' '.........

eO.OS~ ~~~ ............,,

Si @4 O@ OS|

set

Figure 2. Comparison of angle response

change of the plant's parameters

0-*-

I

- F- IP*,O-u__ Mod

' awEat

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

NX

C2 0.4 0.5sec

04

Figure 4: Comparison of angle response

with disturbances

873

: ... I -...iL. i & . . " "::. --: I

I v

0L&A AkAkMM AA LAt _.t &k A_L . _

-

IN IL I n

ML

CL I* M.adkw

Page 5: 04793202.pdf

r ~ ~~ PDC I FLC I SM-C EXC NNICBefor ~StabeTine7 13 ods 11 ond .9 t ecnd

C£ ~ne 1IaJFiyFm :Eff07rad 50T0r7 :+50T0 *O&0frd tO.01 radMtw Stab e L3 seconds 13 s 10 iseamn 7 secods 415 secodsChane Stmdy Eco rad- *.0 rad :tO.02 rad *00 ra I0.01 d

Computa--ion 0.0163 0.01683 0.0185 o.0185 0.01879Time seconds seconds seco ds seconds

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

?iY Osatrel sMU.

Expert Jyste coatrsi swfun

Su"dtigEd. eatrewhn

bwtl htnrh oeatrel swhse

Figure 5: Control Surface

Figure 7: Comparison of angle response withthe change of the plantis parameter in

real-tine control process

1874

I _

Figure 6: Comparison of angle response mnthe real-time control process

am mom -. 9- 0.0 -.

.1iPIM Sam . rl.-.

-1, -0

PI= -no bep " ;;a

M-.

MIV-ftg= Oa la..Pft r=

L-Mmlmi. IN

-a1-