Sei sulla pagina 1di 120

Fuzzy Control for an under-actuated Robotic

Manipirlator: Pendubot
Xiao Qing Ma
A Thesis
in
The Department
of
Mechanical Engineering
Presented in Partiai Ful f hent of the Requirements
For the Degree of Master of Appiied Science at
Concordia University
Montreal, Quebec, Canada
Aupst 200 1
O Xao Qing Ma, 2001
Acquisitions and Acquisiiions et
Bibliographie Services senrices bibriraphiques
The author has granted a non- L'auteur a accord une licence non
exclusive licence dowing the exclusive permettant la
National Li'brary of Canada to Bibliothque nationale du Canada de
reproduce, loan, distribute or sei reproduire, prter, distniuer ou
copies of this thesis in microform, vendre des copies de cette thse sous
paper or electronic formats. la forme de microfiche/film, de
reproduction sur papier ou sur format
lectronique.
The author retains owneship of the L'auteur conserve la proprit du
copyxight in this thesis. Neither the droit d'auteur qui protge cette thse.
thesis nor substantial extracts h m it Ni la thse ni des extraits substantiels
may be printed or otherwise de ceNe4 ne doivent tre imprims
reproduced without the author's ou autrement reproduits sans son
permission. autorisation.
Abstract
Fuzzy Control of an Under-actuated Ro bo tic Maoipulator:
Pendubot
Xiao Qing Ma
Control of under-actuated mechanicd systerns (robots) represents an important cIass
of control problem. This thesis studies severai relateci control problems associated with
an under-actuated robot, Pendubot, h m the point view of fuPy logic control. To swing
up the Pendubot fiom a rest position to the upright confi -don, a fuzzy aigorithm is
proposed fiom non-complete sets of linguistic d e s that Iink some mechanism states to
the sign of a singe conno1 action. Therein, a simpiifed Tnikamoto's reasoning method
and quasi-hear-mean aggregating operators are used to denve and anaiyze the controlIer
input-out rnappings. in order to balance the Pendubot at the unstable upright top
configuration after swinghg up, another simple fuzzy controiier is derived according to
its joint states. This combining fuzzy aigorithm for swin-eing-up md baiancing is
successfuiiy applied to the Pendubot. This thesis also investigates the case t bt the
Pendubot tracks a desired signai and a corresponding fuzzy scheme is proposed, which
combines the iinear reguiator theory with the Takagi-Sugeno hz q methodolog. The
stability and stability conditions for this f uzq scheme are analyzed. Numericd
simuiations for ai l the above controers are carried out to validate the theoreticai anaiysis
by using SIMULIMC F y , the hardware experiments in the Pendubot have
successfully been conducted in the Robotics and Mechatronics Laboratory.
.--
Ill
Acknowledgements
The author dedicates this thesis to the thesis supervisor Associate Professor Dr. Chun-
Yi Su, for his invaluable guidance and consistent encouragement through out the course
of this research and looks forward for his guidance in ai i future endeavors.
The author would like to express her appreciation to h k Z. Cai, whose enthusiasm to
build and set up the whole system and elp me perfom the experiments played a
significant roIe in the deveIopment of this project.
The author wodd Iike to express her sincere thanks to Mr. Z. L. Liu for the useful
discussions with the author.
1 would like to thank my entire f d y for their love and support throughout my
graduate school days. They and especiaily my husband, KangZe Zheng, gave me the
encouragement to compIete this work
Table of Contents
List of Figures
.-.
v u
Chapter 1
1.1
13
1.3
1.4
Chspter 2
2.1
2.2
2.3
2.4
2.5
Chapter 3
3.1
3 .?
3.3
3 -4
Chapter 4
4.1
4.2
Introduction
Overview
Objectives
Thesis Organization
Contribution
Basic Knowledge
Introduction of Robot
Review of Robouc Control
Fu; n Logic Conml and Reasoning
Introduction of Digitai Conml
Description of Pendubot
Pendubot Mode1
The Dynamics
introduction of Identification
The Equilibrium ManifoId
Controiiability
Swing Up Control
A Two-Rule-Based Fuzzy ControiIer
A Two-Rule-Si@-Based Strategy for the Pendubot
Chapter 5
Chapter 6
Chapter 7
7.1
7.2
Chapter 8
8.1
8 -2
8.3
8.4
8 -5
Chapter 9
9.1
9 3
9.3
9.4
Andysis of the Controt Law
Bdancing Control
System Analysis
Conml Law
Shbity Anaiysis of Fuzy Trajectory Tncking Controiier
Fuzzy Control Aigorithm
Stabiiity Adys i s
Combining the Controllers
Combining in the Simulation
Combining in the implementation
Simulation
Simulation Pendubot Model
Swing-Up Simulation Mode[
The Balancidg Simulation Model
The Final SimuIation Mode1
Simuiation Resuits
8.51 The Simuiation Resuits for the Continuou System
8.5.2 The Simdation ResuIts for the Discrete System
Red-time Experimentd Tests
introduction
Flow Chart
Experimentai Results for Swinging-up and BaIancing
Photographs of Experiments
Chapter 10 Conclusions and Recommendrtions for Future Work
10.1 Discussion
10.2 Conclusions
10.3 Recornmendations for Future Work
References
Append A Linearized equations
List of Figures
Figure 2.1
Figure 23
Figure 23
Figure 2.4
Figure 2.5
Figure 3.1
F i p 3.2
Fi_- 3.3
Figure 4.1
Figure 5.1
F i p 5.1
Fi-- 5.3
F i p e 8.1
Figure 8.2
Figure 8.3
Figure 8.4
Fi_- 8.5
Figure 8.6
Figure 8.7
Fuzzy System
Function tanh(t)
Structures for a digital control Ioop
Front and side perspective drciwings of the Pmdubot
Pictorial of the Pendubot's interface with its conmuer
Coordinate description of the Pendubot
Equiiibrium configuration
Uncontrollable configurations
he two situations
The BaIancing corifiguration at the top position
The link one on the right side arouud the equiIr'brum point
The iink one on the left side around the equiIr'bnum point
S wing-up and baiancing controI
Subsystem 1: Pendubot mode1
Subsystem 2: swing-Up controllet
Subsystem 3: baiancing controller
Swinghg up simdation
Balancing simulation
Subsystem 4: switching block
Figure 8.8 The whole simulation system
Figure 8.9 Discrete-tirne Pendubot madel
F i p 8.10 TheOutputofq,
Figure 8.1 1 The Output of q,
Figure 8.12 The Output of torque r
Figure 8.1 3 The angular velocity for one
Figure 8-14 The angular velocity for Iiak two
Figure 8.15 The Output of s oust swinghg up)
Figure 8.16 The Output of q, (just mvinging up)
Figure 8.1 7 The Output of q2 (jus swinghg up)
Figure 8.18 The Output of q,
Figure 8.1 9 The Output of q,
Figure 8.20 The Output of torque r
Figure 8.2 1 The angular veiocity for Iink one
Figure 8.22 The angdar veiocity for hk two
Figure 8.23 The Output of r Cjust swinghg up)
Figure 8.24 The Output of q, oust swinghg up)
Figure 8.2s The Output of q, Gust swinging up)
How Chart
Figure 9.1 Effect of torque
Figure 9.2 Effect of agi e for Link one
Figure 93 Effect of angie for Iink two
Figure 9.4
Effect of mgdar vetocity for iink one
Fi mm 9.5 Effect of angular velocity for link two
Figure 9.6 The Pendubot at the rest configuration
Figure 9.7 BaIancing at the top configuration
Figure 9.8 The Pendubot on the left side
Figure 9.9 The Pendubot on the right side
Chapter 1
Introduction
In ment yevs the control of underdctuated mechi cai systerns has aracted
pwi ng attention and is a topic of great interest [2][3][1 I][I5][10]. As yet, there is no
comprehensive theory for underactuated robot manipdators, Le., manipdators having
fewer acntators than degrees of Wo m . Examples of such synems are ilIustrated, for
examp[e in [2] [16][7[ 11 [5] [a. Frequentiy cited appIications inciude saving weight and
energy by using fewer actuators and gaining M t tolerance to actuator failure.
The challenge of s o h g control probiems associated with this class of systems WU
stimuiate new results in robot control theory in the years ro corne, interest in studying the
under-actuated mechanical systems is aiso motivated by their role as a class of strongly
nonlinear .stems where cornpiex i n t d dynamics, nonhoIonomic behavior, and lack of
feedback IinearizabiIity are ofien exhiiited, for which traditionai nonluiear control
mettiods are insriffcient and new approaches mus be developed
Tho@ dynamics of the under-actuated mechanical systems is well uuderstood, the
difficulty of the control problem for under-actuaed mechanism is obviously due to the
reduced dimension of the input space. The literame on the conm~l of under-actuated
systems is rnahiy ment [2] 141 [5] [13] [12], and the discussion mainiy focuses on two-
degeesf-fieedom exarnples [3] 1151 [a] [59]. Eririier work that deais with control of
under-actuated robotic systems is described in [jq [Sq. Under-actuated mechanicd
systems have also ke n investigated h m nonholonimc constraint point of view [13] [lq,
where, for instance, Oriolo and Nakamura [57] and Wichlund [58] established the
conditions for partid integrability of secondsrder nonholonomic constrahts and
discussed control problems.
WhiIe some interesthg techniques and fesults have been presented in the mentioned
above publications, the conmi of such systems stiii remains an open problem. For
example, most of the control schemes mentioned above either faiIed to provide a
thorou& analysis of the overd system stability or assumed that gravitation forces didn't
act on the passive joints. Fusthemore, the precise knowkdge of dynamic mode1 is
generalIy required.
Fuz q bgi c conmi techniques were origindy advocated by Zadeh and Mamdani as a
means of both coiiecting human knowiedge and experience and dealing with
unceaainties in the control process, It has become a very popular tooI in control
engineering [8][7I[lO][lI]. Fuzzy control systems have the advantages that no formai
mathematicai modelr are needed and the systern uncertainties c m be coped wilh.
Therefore, aimine at the mentioned above control prublems for such under-actuated
mechanid nonhear systems, this thesis wiII investigate severai reIated conml
pmblems, associated with an under-actuated robot-Pendubof fiom the point view of the
fuzzy bgic control.
The Pendubot (PenduIum robot) is a benchmark system for under-actuated robot
manipulators, coasisthg of a double penddum with an actuator at only the second joint.
Using the Pendubot, one can rnainly investigate the set-point regdation, inctuding
swingkg up and balancing, and trajectory tracking.
The pmblem of swinghg the Pendubot h m the open' loop stable coofiguration
q, = - K I 2. q, = O to any of the inverted equilibria is an interesting problem because of
the strong nonlinearity and dynamic coupling between the W. Many dserent control
algorithm could bave been used to perfonn the swing up. in the classic control field
Spong [2] and Block (1) applied smaii partial feedback linearization to swing up the nvo
k h m hanging straight down to standing straight up. Yoshida [6] used energy-based
methods to complete the swing-up control of an inverted penduIum. in addition, some
mearchers proposed the robust adaptive control algorithm or hybrid algorithni to control
the two-link under-actuated robots [3] [SI. In the fuzzy control field, Sanchez [15] and
Vidolov [IO] designed a MIMO fuzzy PD controller to swing up an underactuated robot
Sousa and Madrid [I Il- proposed a control strategy based on genetic algorithm and
Takagi-Sugeno fuzzy methodoIogy to control the Pendubot- However, the genetic
aigorithm is not easy to implement because it depends on the number of de s . Some
other fuzzy controt schemes are just implemented in the simdation system, and they
didn't give the experimentai resuits.
Once both links are m g up, the problem of baIancing the Peadubot about an open
loop unstabIe equilibrium should be investigated. he Pendubot possesses infinitdy
many confi-pations at which it can be baianced Spong [2] and BIock [Il proposed a
baiancing controller, using iinear quadratic optimal control theory to bdance the
Pendubot at top or mid configurations. Furthemore, the robust daptive control
algorithm or hybrid algorithm has &O been proposed, but they are not fidiy general,
Besides the above-mentioned probIem associated with the Pendubot, trajectory
tracking for nonlinear systerns aIso can be achieved in the Pendubot, Berkemeier [4]
denved a surprising set of exact trajectories of the nonIinear equations of motion. which
involve inverted periodic motions. Moceover, Begovich and Sanchez [I4] combined
Iinear regulator theory with the Takagi-Sugeno fuzzy methodology a new algorithm to
get a nover approach to achieve trajectory tracking for the Pendubot. However, they
didn't anaiyze the stability of the whole control system. in this thesis, nodinear system
trajectory tracking has been analyzed and impiemented in red tirne in the Pendubot.
1.2 Objectives
The objective of this research is to develop a di@ controiier based on fuzzy logical,
approximate reasoning, and quasi-iinear-mean aggegating operators, to swing up and
balance the imder-actuated Robot - the Pendubot, Noniinear system trjectory tracking
wiil ais0 be anaiyzed, based on the linear regufator theory and the Take-Sugeno (TS)
fuzzy methodology. important issues for the under-actuated robotic controiier design are
to develop the fuzzy logic aigorithms and impiement them, The motivation is to make an
effort tomrds applying fuzzy controlling methods to the actual robot 1 will build a
completed and feasible simularion mode1 and mite a digital controuer program.
The Pendubot is Uistalled in the Robotics and Mecbtronics Labontory, led by Dr%
It is a typicai under-actuated penddum robot which is an electro-mechanicd system
consisting of two rigid links interconnected by revohte joints.
Chapter 2 rnainly coiisists of ttiree main parts. The rst part is a brief introduction to
robotic control. The second part is a description of fuPy logic theory and fuzn control.
The third part is a description of the Pendubot
Chapter 3 discusses the dynamics of the Pendubot, introduces the equilibrium
manifold and identxcation of the iink inertia parameters, and discusses the controllability
of this system. in this chapter? I provide the mathemaricd mode1 bat c m be used to
derive various controiiers and to simulate the response of the system. It serves as the base
for the whole research.
Chapter 4 denves a two-de-based fuzzy controI scheme fiom a simpiified
Tsukamoto's reasoning method and quasi-hez-mean qgegat hg operators to swing-up
the Pendubot h m its rest position. The fuzzy scheme is derived fiom non-comptete sets
of linpuistic d e s thrit Link some mechanism states to the sign of a singie control action.
At the end of this chapter, I analyze the coatrd law and give the principie of control
parameters' tuning.
Chapter 5 dispIays a fuPy control dgorithm for baiancing the Pendubot at unstable
open-loop equilibriurn states. This scheme is aiso obtained based on the fuzzy mie base,
but contrary with the d g - u p ' s d e base, because their control gods are dierent.
Chapter 6 anaiyzes the stabiiity of a fuzzy scherne for ajectory tracking of the
nonhear system: Pendubot. There are two steps: the first one is the stability anaiysis of
the fuPy control systern, consisting of a nonlinear plant and a fzzy controller, the
second one is to give the condition of applying Iinecu regdation theory in the nodi nar
system that consists of each local Iinear system by using the fupy methodology.
Chapter 7 displays the switching aigorithm both in the simulation and in the
experiment since the mode1 of the Pendubot in the simulation is different from the actual
model. These ciifferences display not only in the parameter adjusting but aiso in the
controller combining. This chapter wiIl point out ail these detas.
Chapter 8 is the simuIation of the whole control process using the SIMULINK. 1 start
h m the Pendubot mode1 founding, and then buiId the swing-up controller and balancing
controiier respectively, hal i y comect them with the switching controUer. In this chapter,
I also e.xpIain the tuning of controllers and give the simulation results for bath
continuou-tirne and discrete-time systems.
Chapter 9 presents the implementai method and resuits. I design a digital controller
according to the fuzzy controt scheme (given in the above chapters) using Mimsofi C
7.0 Ianguage. 1 present the design ciue through flow chart and give the implementai
results using digitai photopphs and the response of joints.
Surnmary, coaclusions, the recommendations for future work, and reference are
presented in the next parts. Fmaily, Appendk A gives the linearization equations used in
Chapter 6.
2.4 Contributions
The approach in this thesis is partiy sirniIar to the work of [1][16][14], but there are
significant diierences as well, which are exactiy my contributions.
1) A simpiifed Tsukamoto's reasoning method and quasi-Iinear-mean aggregating
opentors are used to derive and anaiyze the swing-up control input-output
rnappings. I appiy this fuzzy controi scheme to swing up the Pendubot h m the
rest position ( q, =- 812, q, =O) to the unstable top position
(4, q* =O)-
2) According to the Pendubot's joints states and fuzy control rule, 1 design another
fuzzy controller to balance the Pendubot at the top position. Through a l ogi d
svitching algorithm, 1 combine the swing-up controller with this baiancing
controiler.
3) Based on the deveIoped T-S fuzzy trajectory tracking scheme on the baiancing
Pendubot, 1 give the stability analysis of this TakagiSugeno fuzzy scheme;
4) 1 have combined the fuPy swing-up controlIer with the T-S fuzzy trajectory-
tracking controller to generate a novel control scherne. 1 implemented it in the
real tirne Pendubot;
5) Al1 of the above are impternented in the Pendubot Mode1 P-3 in our laboratory,
and the simulations of 1) and 2) are achieved using SIMLILIPX.
Chapter 2
Basic KnowIedge
2.1 Introduction of Robot
As many books reIated to robots are introduced robots are basicalIy positionhg and
hancilhg devices [34]. A usefd robot is one that is able to control its movement and the
force it applies to its environment [35]. Presentiy dif3erent aspects of robotics research
are cmied out by e.qerts in various fields that are r n e c ~ c a i manipulation, locomotion.
cornputer contml, and artifciai intelIigence. The major devant fieIds are rnechanics,
control theory, and cornputer science. Ornitting the accessorid parts, robot actuaiiy is the
mdti-Iink mechanics device. Thus, my resemh object is limited to this device and how
to contml it.
To controi robot requires the knowledge of a mathematicai model and of sorne sort of
intelligence to act on the model. The mathematicai model is obrained h m the basic
physicd laws governing the robot's dynamics. intelligence requires sensory capabiiities
and means for acting and teacting to the sensed variables, Therefore, there are two main
steps for simple induda1 robot: the 6rst step is about the mechanics of mechanical
manipuIators and its dynamics; the second step is to appiy the control theory to moriift
the actions and reactions of the robot to different stimuli. The partidar controiier used
wiii depend on the complexity of the mathematical model, the application at tan& the
availabie resources, and a host of other criteria
Step 1: Modeiing
For servo-control design purpom, and to design better con~ollers, it is necessary to
reveal the dynarnic behavior of the robot via a mathematicai model obtained from basic
physicai Iaws. I begin the development with the generd Lapnge equations of motion
[38]. Consider then Lagrange's equations for a conservative system as given by
where q is an n-vector of genenlized coordinates q,, r is an n-vector of generalized
force r,, and the Lagrangian L is the diffe~nce between the kinetic and potentid
energies
L = K - P (2.2)
It can then be s how [34] that the robot dynamics are given by
D( q) q + C(q, 4) +
+ eh) + rd = f
(2.3)
where D(q) is a symmetric, positive-dennite inertia matrix, C(q,q) is a vector
containing the effects of the Coriolis and centripetai toque, G(q) is an n-vector of
grave toques, F(q) represents fiiction, ana rd represents extemai disturbances.
Step 2: Control
A usefiil robot is one whose ajectory in its workspace may be specified, and the
forces it exerts on its environment may be controtled, Looking back at equation (2.3), my
control objectives wiI1 d l y fdl into one of the foilowing categories:
1. Motion Con~ol . Given a desired trajectory, specified by the vector time functions
qd ( t ) and q, (t) , design and implement a controlIer whose output s(t) wiU drive the
a d ajectory { q(t), q( t ) ) to { q, (t ), qd ( t ) } asymptoticdly. Note tbat the desired
ajectory is usually specified in the task space and some ~reprocessing is required to
obtain a desired joint space tnjectory. The alternative wodd be to obtain the
dynamics of the robot in the task space where the desired ajectoty is specified- The
Fine motion control is then accomplished using precision movements of the end-
effector.
2. Force Conrrol. Whn the robot cornes in contact with its environ ment^ the contact
forces and reactions of the robot need to be reguiated. The force control requkments
are specifTed by a desired force vector &(t ) in the task space. h s force vector is
the ajectory in the force space that the endeffector should follow, when a force
controik is propaly designed.
3. Motion and Force Conh-ol. In some cases, the robot is required to follow a desired
motion trajectory while exerting a certain force on i t . environment. In this case, both
previous control objectives are combined to design a suitable controller.
2.2 Review of Robotic Control
From equation (2.3), 1 know the dynamic mode1 of a robot is described as a set of
hi-dy nonlinear md coupled differential equation. That mems the robot system is a
compiicated n o f i e u system. There are many control methods for such a nodinear
system. I wiI1 discuss them as following.
Firstly, a common approach is to linearize the dyamics and apply linear conml
theol. However. the operating region of a linearized design is limitecl; so the method of
partial feedback linearization applying to the nonlinear systems is very limited [1][2]p9].
Secondly, the deveiopments in the theory of geometric nonhem control provide
powef i methods for controuer design for a Iarge cIass of noniinear qstems [29][40].
However, it requires the exact knowiedge of the system, which is seldom met for mbotic
system. W l y , to overcome this drawback, the adaptive control schemes have k e n
used for the robotic systems [41][42]. The adaptive control approach is only applicable to
the fidi-actuated robots, but for the under-actuated dynamic systems [G], it remains an
open problem. Fourthiy, with development of the fuzzy IoPjc and fuzzy conmI, more and
more cesearchers would- Like to apply this control method to ded wih the uncertain
nonlinear systw. For exampIe, Marcio developed a genetic algorithm to coatrol the
under-actuated dynamic systerns [f 11; Edgar proposeci a fiizzy PD scheme to swing-up
the Pendubot [151; Edgar and Ofelia ais0 developed a nodinea. systern trajectocy
tncking scheme [14]; Micheal [473 extended the ciassicd Lyapunov synthesis method to
the domain of computing wi th words to fonn a adaptive fiizzy controiler.
From the above survey on the robotic control systern, particularly for the under-
actuated robot or dynamic systems, we can see bar the fmy controI approach may be
more suitabte for the cornplex uncertain nonlinear systems. Next, 1 will introduce the
fuzzy Io& and fuzzy control.
The ability to control a system in uncertainty or h o w n environments is one of the
most important chancteristics of any interligent controt system. Fuzzy Uiference
procedures are becoming, therefore, inreasingiy crucial to the process of managing
uncenaiaty. Fuzzy sets theory provides a qstematic fiamework for deaihg with different
mesof unceTtainty within a singe conceptuai he wo r k [Ml.
A fuu_v controller works simila- to conventionai controllers [4q. Tt takes a set of
input values, performs some caiculations, and generates a set of output vaiues. Figure 2.1
illustrates a typicd fiizzy system. According to this fi_preII 1 wiU iutroduce the steps of
desi mg a fuzzy controiier.
Cnsp inputs Fded inputs Fuzzy conclusions Crisp outputs
l 7
01 Li
I
i y l
i -
I
Mechanisrn
I
uZ i Fd c a t i o n Defwzification Y2
7.
I !
c.
i t
f ! ! !
i !
Un i
Rule-Base ! f ,
Ym
- :
Figure 2.1 Fuzzy system
Step 1: Fuzzification
Fupitication is a mapping iom the observed input to the fuzzy sets defined in the
comsponding universes of discourse [45]. Therefore* fuzzification is a mnpping h m
UER" to the unit hypernibe [O, lIM. Fuzq sets were inmduced by Zadeh to
incorponte concepts such as vapueness into cornputer ystems [48]. In conventional set
theory an eiement either belongs to a set or does not, but in normal hurnan decision
making this sharp distinction does not normdy exist
A f 5z q set "Ay is charrctexized by a membership function, whose elements x of X a
r d member p,(x) is in the interval [O, 11, and pA(.r) representing the _ d e of
mernbership of element x in the fuzzy set A. Here? ttre membership function can be
chosen &ou& many ways, including mathematic function, self-defined, or a simple
refletion relation.
I shodd especidly out thac in our swing-up control algoritha the f k q sets are
given by:
- e-'
where tanh(t) = , whose curve is illustrated in the Fi-me 2.2 Thus this
et +e-'
dennition is coincident with the definition of fii7zy set.
Figure 2.2 Function tanh(t)
Step 2: RuleBase
A fuzn d e is defined as a Iinguist logic relation between the input and output. It is
smply expressed as:
IF ...... THEN ......
Rule base means ai i mies for the controUing system, which consists of each simple d e .
The translation of this d e base system into 2 fzzy relation is done by construcMg the
fzq relation R, for each d e r, and combining these retations into a singie fiizzy
relation R. This combining of fuzzy d e s into a fuzzy relation is cailed aggregation.
Therefore, in order to express the d e base by mathemathion, we shouId aggregate dI
d e bases (supposeci number=q) by using mathematic method, in the process of
qgregating, the weight A, ( ~ ( t ) ) i = 12, ...q of each firing rule is considered. This weight
depends on the importance of that nriag d e .
Step 3: Inference
Merence is dso cdled fuzn reasoning. Reasoning is the process by which we c m
conclude about new facts from already existing facts and causai links. Therefore, fuz.
reasoning refers to processes by which fiizzy conclusions about fuzy facts are obtained
h m fuzzy mie base or hq relations. In other words, infemce process is a decision-
making logic which determines fuzzy outputs corresponding to Wf i e d inputs. with
respect to the hzq des. Thus, we should speciQ kinds of operators such as irnplicatioq
conjunction, aggregation; and reasoning operator.
Step 4: De f d~ c a t i o n
A conclusion is obtained fiom each d e for a certain observation, and then these
conclusions are agpgated to obtain one conclusion. The resultant conclusion is a fuzzy
set that can be defumned to obtain a crisp output Hence, defimification produces a
non-fuzzy output or a crisp output, using one of some usuaf methods [4q or particdar
method [20]- The results of deizz3cation is the nnal results of the whole fmq system
that is composed of four main parts.
Fuzzy algorithm represents a powerful concept which can be used to provide fllPy
models and fuzzy controllers for controt engineering. Such dgorithms are essentially a
collection of "IF' and ''THEN" statements which use the input/output fuzzy sets, and
relations dehed, to deduce the control signal necessary to achieve the desired response.
2.4 Introduction of Digai Corttrot
In a typicai conol system. several control loap are present. Each is designed to
perform some particulru task. The following procedure must take place in a digital
control loop:
S tep 1: M e m system output and compare with the desired value to give an error.
Step 2: Use the error, via a controi taw, to cornpute an actuating signal,
Step 3: AppIy this corrective input to the system.
Step 4: Wait for the next sampIing instant.
Step 5: Go to Step 1.
The Ioop structure which achieves this cm take many forms, but two of the most
common arrangements are shown in Figure 23. In my project, 1 utilized the second
structure (b).
Digital Ref. in
T
output
Ib)
Figure 2 3 Structures for a digitai control loop
System
2.5 Description of Pendubot
The Pendubot, short for Pendulum Robot, is an electro-mechanical (or Mechatronic)
system consisting of two rigid links interconnected by revoIute joints. The nrst joint is
actuated by a DC-motor and the second joint is unactuated. Thus the second link may be
thought of as a simple pendulum whose motion can be conmiied by actuation of the fint
link. The Pendubot is sirniIar in spirit to the classicai inverted penduium on a cart
However, the nature of the dynamic couphg between the two links of the Pendubot
resuits in some interesting properties not found in these other devices.
DIA Cornputer A/D
Therefore, the Pendubot is simple robot consisting of two rgid links. Because it also
is an undsr-actuated rnechanism, it is a nonlinear system. That mens we can control it
using various conml methods suitable for noniinear system. On the other haad as a
benchmark robo~ now 1 just study its motion controIt such as set-point regdation and
Figure 2.4 Front and side perspective drawings of the Pendubot.
The Pendubot is shown schematically in Figure 2.4. The acruated joint is driven by a
hi& toque 90VDC permanent magnet motor without gear reduction. To give joint one
direct drive contrai, we designed the Pendubot to hng off the side of a tabIe couphg
link one directiy to the shaft of the motor. The mount and bearings of the motor are then
the support for the entire system, Link ooe also inciudes the karing housing which
aiiows for the motion of joint two. NeedIe d e r bearings riding on a ground sh& were
used to construct this revolute joint for joint two. The shaft extends out both directions of
the housing alIowing couphg to both Iink two and au optical encader mounted on link
C
one. This opticai encoder produces he position feedback of iink two. The design gives
both links MI 360' of motion. Link o i however, cannot continuously rotate due to the
encoder cable for lii?lr two. Links have no constraint on continuous revolutions.
Two links are !4 inch (0.635 cm) thick Iength duminum. Link 1 is 6 inches (1524 cm)
long and is directly coupled to the sh& of a 90V permanent magnet DC motor mounted
on the supporting base. Link 2 is 9 inches (22.86 cm) iong and contains a coupling that
attaches to the shaft of joint two.
The final componeat of the Pendubot's hardware is its controller. See Fi,we 2.5 for a
pictoriai description of the interface between the Pendubot and the controlIer. Two
Dynamics Research Corporation 1250 countdrev resolution optical encoders, one
attached at the elbow joint and the other attached to the motor, and are used as the
feedback mechanism for the joint angies. An Advanced Motion Control's 25A8 Pm1
servo amplifier is used to drive the motor- in the control aigorithm this amplifier can be
thought of as just a gain, in the case of the Pendubot we setup the amplifier in torque
mode and adjused it for a gain of 1 V=I .2Amps.
in an attempt to si mpw the controer for the Pendubot and minimize its cos4 we
implemented our control algorithm using only the microprocessor in our PC Mead of
purchasin- an additional DSP card. We used a 486DX2/50 IBM compatible PC with a
D/A c a d and an encoder interface card. The CIO-DAC-02 w d fiom computer Boards,
Inc. is used for digital to analog conversion and a Dynarnics Research Corporation opticd
encoder card is used to intedice with the optical encoders, Controller timing is provided
by a timer board of Cornputer Boards, hc. that utilizes the 9513 tirner chip. Using the
standard s o h we Iibrary routines suppiied with the interface cards together with our own
drives we are able to program controI aigorithms directly in Microsoft C 7.0.
Figure 2.5 Pictorid of the Pendubot's interface with its controller
The range of sample period is from 0.001 second to 0.0 16 second. The smple period i
choose is 0.005 second. This control design worked very weii. As we know, the
parameters of the controiler are changing with different sample tirne, and the d e r
sample period, the more simiIar as the continuous time controIler. However, we shodd
realize that we shouldn't onIy pursue the smaii sample penod, A 5 ms sampng period
was used in my controllers in order to diow cornputer to Save response data whiie the
conaolIer was operating.
Chapter 3
Pendubot Mode1
in this chapter 1 discuss the dynamics of the Pendubot. The nonlinear equations of
motion are described first. This provides a mathematicai mode1 that can be used to denve
various controllers and to simuiate the response. Since the device is a two links robot
(with ody one actuator), its dynamic equations can easiiy be derived using the so-caiied
Euler-Lagrange equations and cm be found in numerous robotics textbooks. In
additional, the inertia parameters of the Pendubot have been provided by the Mechiltronic
Systems, inc.
Figure 3.1 Coordinate description of the Pendubot. 1, is the
length of link one, l,, and le, are the distances to the center
of mass of the respective links and q, and q, are the joint
andes of the respective links.
3.1 The Dynamics
Consider first a dynamic system defined on a configuration manifoId Q. Let
(q? q) = (ql,..., q", ql , . . . ?qn) denote Iocd coordinates on the tangent bundIe M=TQ, We
refer to q,q, and Q as the vectors of generaiized coordinates, generalized velocities, and
generaiized acceleration, respectively. Let the system be under the action of m<n, e l ,
independent control forces andior torques, Le., there are fewer conml inputs than degrees
of fkedom. Also let r E Ra denote the vector of control variables. Thus, the actuated
degrees of Eeedom are m , and the unactuated de pe s of fkeedom are n - m. in o u
device-Pendubot, there are just two links and one motor (see Figure 3.1). Derived h m
equation (3.3). we omit the fnction F( q) , and the external disturbances rd, so the
equations of motion for the Pendubot can be simply written in matrix:
where,
D(q) is symmetric and positive dehite, and
d, l = rn,~:~ + m,(l,' + 1:: + 21,1,, cos q,) + Il + i2
d,, = 4, = ~ ( 1 : ~ + 111,1 cos qJ + 1,
2
dz = mJCz + I2
C(q, q ) hm been chosen nieh that D - 2C is skew symmetric.
Note the O in the vector on the right side of equation 3.1, indicating the absence of
an actuator at the second joint. The symboI r i s the vector of torque applied to the links
and q is the vector of jo&t angle positions.
Other,
4, =(m,l,, +m,l,)gcosq, +mJ,,gcos(q, +q2)
42 = m, gL cos(% + 92
ml : the totd mass of link one.
1, : the lengh of link one (See Figure 3.1).
ICI : the distance to the center of ma s of Iink 1 (See Figure 3.1).
1, : the moment of inertia of iink one about its centroid.
m, : the total mass of link two.
l2 : the len@ of iink two (See Figure 3.1).
i,, : the distance to the center of ma s of link 2 (See Figure 3 -1).
& : the moment of inertia of iiuk one about its centroid
g : the acceleration of pvity.
From the above equations it is observed ttiat the seven dynamic parameters cm be
grouped into the following five parameters equations
Substituthg these panmeters (3.5) into the equations (3 2)--(3 -4) leaves the folIowing
matrices
8, + 8, + 28, COS q2 B2 + 8, COS qz
8, + 8, cos q,
4
Finaiiyt using the invemrTiIe property of the mass matrix D(q) , the state equations are
given by
[ P i ] = 9~ - DW-Q.M - w-w
Qz
3.2 Introduction of Idenl~@cah~on
For a control design that neglects fiction, these 6ve panmeters are al1 needed. There
is no reason to go a step Me r and fhd the individuai parameters since the conwl
eqlliitions can be written with only the five parameters. Mechatronic Systems, hc.
performed on-Iine identification experiments using the HamiItonian based energy
equation method. The frst step in ttiis approach is to write the totai energy as the sum of
the kinetic energy and potentiai energy as
where D(q) is the inertia ma& deked in (3.1) and V( q ) represents the potential
energy due to gravity. The totd energy E is he m in the inertia parameters and so may
be written as
E = W( q, q)8 (3.12)
where 8 is the pafametrization dehed in (3.5). Using the well-known passivity or skew-
swimetry ProPertY
E = grr (3.13)
we have that, between any two times t = T and t = T + dT
Equation (3.14) cm be used with a standard ieast squares aigorithm to identib the
parameter vector 8 by applying an open Ioop signal r + s(t) and recording 7, q, q over
a given time interval. Carrying out this identification procedure using a step input to
excite the Pendubot resdted in the followhg parameter values,
3.3 The Equilibrium Manifold
Figure 3 2 Equil%rium configuration
Un d e r - a c ~ d mechmicd systems generally have equilibria thai depend on both
their kinematic and d p mi c parameters; see, for example, the Pendubot if the Pendubot
is mounted so that the joint axes are perpendicuiar to gravity, then the= wiii be a
continuum of equiiibrium canfigurations, as shown in Figure 3.2, =ch corresponding to a
constant value, F , of the input toque r . Examining the equation (3.1) we see the
equihrium configurations are determined by
0,g cos(q, 1 + 4g cos(q, + qq,) =
(3. 15)
It is easily seen that, applying a constant toque ?, the Pendubot will balance at a
configuration (q, , q,} such that
The nodinear -stem Pendubot may be iinearized about an operating point
(expressed in 3-18]. Aithou& these cont&udons are unstable, the whole system is
controUabIe by using kir& of control aigorithms. The motion range of h k one is 360":
and in the eqdiirium manifold, there exists:
However, we can dso eady undersand physicaiiy how the linerirized systern becomes
uncontroUabIe at q, = 0, k K as iiiustnted in Figure 3.3. Note that the zero or reference
position for q, is horizontal. As the Pendubot approaches these unstabie and
uncontrollable configurations, the controilability matrix of the linearized approximation
becomes increasingly iU-conditioned
Figure 33 Uncontroiiable configurations
r
Actuaiiy, fiom eqyition (3.17), q, =cos-'(-) + We can ako h d if and ody if
4g
7 = 0, q, = O, +K. However, a constant value, 7, of the input toque r is impossible
equd to zero to make the second iink keep upward equiliirium. nius, the configurations
(q, = O7 +a), shown as Figure 33, are mcontroiiable. In addiaonal, the doser to these
uncontroIIable configurations the Pendubot is, the poorer the controiiabiiity of the
Pendubot is.
Chapter 4
Swing Up Control
As introduced by L.Zadeh in its seminal papers [22], fuzzy logic and approxhate
rexoning provide a h e wo r k for fonnalizing intuition and cornmon sense knowledge.
In the field of process control, these basic tools have been used to fomalize experienced
operator knowledge into fuzzy d e bases (FRB) giving rise to fuzzy logic controllers via
the h z q machinery or the fuzzy associative memory model. The FRB proposed in the
literature to describe a mdtipk-input-multipwut (MIMO) plant controUer are
usuaily stated as a coIlection of if"Then d e s such as:
If x, is &', x7is 4', ..., andx,is F,',
Then v,is G{ , v, is q, ..., and v, is G,/
with j=I2, ..., M, the x, and v, denote the linguistic input and output variabLes
respectively, whiie Fj J and G,' stand for their Iinguistic qualincations which are
associated with bz y subsets. In such a knowIedge representation, each if-part of a rde
can be viewed as a description of a particular process state to which a collection of
linguisticdly specified control actions is associated Therefore, the number of d e s
depends- directly upon the number of couples {process state, controt actions) an
experienced operator c i enmerate.
DEerent methods have been proposed to establish and justify such FRB: tpy-
model-based control, verbaikation of expert experience, observational control [El.
However, because they are based on expert knowledge andfor input-output records made
on a plant, such methods are useless when the plant is not physicaily avaiiable nor
manually controlled. On the other hanci, even when a plant is manuaiiy controlled, the
d e verbdization process itseif can be a difncuit task This is due to the existence of
cross-coupng effects benveen the different variables. Besides these facts. the
irnplementation of a MIMO controller deriving fiom a standard FRB is much more
complicated than the im'plementation of a MI S 0 controllet [ XI . Ever though there are
some theoretical results coaceming the decomposition of muhivariable control d e s [ XI
or distributed fuPy control of muhivariable systems [2q, they do not lead to a reduchon
of the size of the FRB.
in this thesis, 1 present how difXerent basic principles of fzn logic can be used to
cope with the cross-couplhg effects which constructing srnaIl FRB for SIMO and MM0
plants. The approach 1 propose is a set in the context of feasibility studies of controllers
when no experienced operator knowledge is available. Provided they sati*
completeness, srnall FRB are attractive because they lead to easy-to-implement
controilers. To deai with the Iack of experienced operator 1 propose to use qualitative
common sense knowledge about the p h to be controued. This qualitative knowledge
conesponds to few particular process states for which the qualification of the controk
actions is easy to denve-
In this part, a fuzzy logic controller (FLC) was designed by the authos in [18] and
1191 will be described. Under the assurnption of a positive causaiity link between the
comol input and the pl& output, a joint linguistic variable (plant-state) = (E, RE) is
constnicted &t to represent the plant state [27J, the atomic variables E and RE denoting
the error and the rate of change of enor respectively. Based on the qualitative knowledge
of the cause-ef3ect relationship, and because of the lack of the plant dynamics knowledge
ody wo pIant states are stated:
E is Positive And RE is Positive,
and
E is Negative And RE is Negafive.
Using the notion ofjoint variabIe these two propositions muslate to
plant-srare is P,
and
plant-stare k N,
where P and N are respectively defked h m the Cartesian prociuct of the fuPy subsets of
the atomic variable which makes up the joint variable. Then, using the avaiiable
knowledge about the plant, two control d e s are derived which correspond to the two
situations depicted in figure 4.1:
If plant-sate is P Then controI action is P
if plant-state is N Then controI action is N
Set Point
e, (k - 1)
Figure 4.1 The two s i d o n s
In these d e s , the variable "control action" rnay stand either for the control input of
the plant or its rate of change. Note that in these two siNations the si@ of the controi
action can be defined without any ambiguity. The subsets associated with the conclusions
are primarily defmd over the unit interva1 such as:
where f is chosen to be an automorphimi of the unit interval. To guaranty the
completeness of the controller, it is sufficient that the support of each of the four input
fuzn subsets associated with the atomic variables cover the corresponding base set
enei y. For instance, let X denotes either E or RE, these input nibsets c m be dehed
such as:
P ( x ) + ,W(x) = 1 vx E X (4.3)
XP(x) = (1 + tanh(a,x)) 12 a, > O (4-4)
The degree of Eirng a,, i = 13 of a d e is defmed via the algebmic product hence a, is
a monotone increrising fiinction of the crisp variables e and r e, whiie al is monotone
d d g . The fuay reasoning method is a simpiified version of the Tsukamoto's
method which le& to a crisp control action a :
v=lf-' (a,)-f2' (az)I o = ~ v ; G> O (4.5)
Since f is an automorphism, we conchde that for Ve c O, re < O (e > O, re > 0) the
value of v is negative {v < O}, also v = O o a,e + a,re = O . A relationship between rhis
controiier and classical Pt or PD controiiers can be derived, and results concerning the
stability of closed Ioops systems have been proved for the class of LTI-SISO plant
modeIs and some non-lineac Euler-Lagrange modeIs.
4.2 A Two-RuIeSign-Based Strategy for the Pendubot
From the above section 4.1, we can derive a novel two-de-sign-based f k q control
scheme for the Pendubot. in the Pendubot, the second link may be thought of as a simple
penddum whose motion can be controiied by the torque applied to the h t joint.
However, the nature of dynamic coupling between the two links resuits in properties not
fotmd m the cm-pole system. Specifcay, in the Pendubot there is a continuum of
equilriurn con6gurations, each corresponding to a constant value of the torque.
The control problern we consider is stated as follows: the Pendubot being in the
downward stable configuration (q, = -RIS; q, = O), the contrai god is to find a
suitable control law that will swing up the Pendubor at the inverted unstable
configuration (q, = ICI 2; q2 = 0) and successflllIy switch to the balance controiler,
The first joint is calIed the shouider (S)- connect with link one, and the other the
eibow (E)- connect wvith link two. Now we separateiy discuss the joint variable of two
joints.
SS represents the shoulder state that is made up with SE and RSE, that is
SS=(SE, RSE). (4-6)
The anguiar shouider error (SE), is defined as
The tate of change of SE (RSE), at tirne t, is defined as
where his the sarnpiing period ( in our experiment, the sampling period used to
approximate the rate of changes of the output variables is set to 0.005s).
ES represents the eibow state that is made up with EE and REE, that is
ES={EE, REEf.
The angular eibow enor (EE), is defhed as:
The rate of change of EE 0, at time t, is dehed as
(4.1 1 )
Not ody for the shoulder state (SS) but &O for the eIbow staa (ES), they are
separarety made up with MO atomic variables the an-dar emr (se or ee ) and its rate of
change (rse or t ee). Each of these atomic variabIes is associated with bvo fuzzy sets that
are Iabeied positive and negaiive.
Let ): denotes one of these atomic variables, then, h m the equations (4.3)-(4.4) in
the section 4.1, for any x E R , its reiated fuPy sets are @ven by:
Now we consider the joint shoulder as an example to derive the fuzzy control Law.
Any red value of se (resp. rse ) is @en a non zero grade of rnembership to botb input
fuzzy se&. A controI strategy for the higbest priority god is srated as:
Rulel: IF "SS is SSP* THEN force r is Positive
Rule 2: IF "SS is SSN" THEN force z is Negative
The fuzzy sets SSP and SSN of SS are defined using a quasi-linear-mean aggregating
opentor [BI, that is the membership grade of any pair (se, rse) to SSP and SSN is given
by :
SP(se, rse) = psSEP(se) + ( 1 - p, ) RSEP(rse) (4.14)
SSX(se, rse) = psSEN(se) i (1 - ps)RSEN(rse) (4.15)
where the weighting parameter ps E [0,1] is dram ikom the unit interval. It is used to
&e more or less importance to one of the two variables. These two des, having
-
preconditions that cover any range of sensor readings, are given the same meaning: the
more me the precondition the more positive (resp. negative) the conclusion. Therefore,
accordiig to the equation (4.1)-(4.2) in section 4.1, we use the foIIowing output fuzn
sets as the system output:
where is related to the apptied force, r , by a scaling factor G, such that r = G,C , and
a slight modification of the reasoning method orginaiiy proposed by Tsukamoto [2O] the
defuzpned out put is simpIy given by:
r(se, rse) = G,c = G, [SSP(se, rse) - SSN(se, me)]
(4.1 8)
Using equations (4.12) - (4.15), we cmget:
S(se, rse) = S(se, , se, )
= SSP(se, rse) - SSN(sez rse)
in the above equation (4.19), se,, + stand for k,se, k+e. The joint variable SS is
reIated to two fuay labels, SSP and SSNI fiom equations (4.12)-(4.19, ive aIso cm write
as:
SSP(se, me) + SSV((se, rse) = 1 V(se, rse) E R '
(420)
SSP(se, rse) = p,SEP(se) + (1 - pz ) RSEP(rse)
( 4 3 1 )
SimiIarly, the defition of tbe eibow emir dom to dehe two categories of elbow
states, ESP (positive) and ESN (negative), cortesponding to saes where the second Iink
is falling to the ri& or to ttie Iek Using the same basic membership functions, given by
equation (4.12)-(4- G), and the same kind of aggregation operators (4.14)-(4.23, the
fuzzy sets related to ESP and ESN are such that:
ESP(ee,ree) + ESN(ee, ree) = 1 V(ee, ree) E R '
ESP(ee,ree) = peEEP(ee) + (1 - pe)REEP(ree)
Therefore, same as the derivation of (4. I9), we can ais0 get:
E(ee,ree) = E(ee,, ee,) = BP(ee, ree) - ESN(ee, ree)
= pt tanh(k,ee)' + (1 - pt ) tanh(k,ree)
= Pt t awee, + ( 1 - PJ t d ( e e , )
where eel , ee, stand for k,ee , k,ree .
in order to swing up the Pendubot anci let the two links arrive at the goal position (top)
at the same t he? we shodd use the foIbwing swing-up coatrol phase:
IF "SS is SSPn ALSO IF "ES is ESPn 'EEN torque is Positive;
-
IF "SS is SSN" ALSO IF "ES is ESN" THEN torque is Negative,
Where the Iogical connective "ALSO" is used to expiicitly give more importance to the
joint variable SS than to the joint variable ES in this swing-up controiler. Here "ALSO"
is again a quasi-linear-mean operator, with A. > 0.5 as its parameter. The mie firing
strengths are thus given by:
OS. = ASSP(se,rse) + ( 1 - A) ESP(ee,ree) (4.25)
OSN = SSN(se, rse) + (1 - A) ES1V(ee, ree)
(4.26)
where OS is o v e d joint variabie used to describe the qs km state including the
shouIder joint states and the elbow joint states.
Thus as the mentioned before around equation (4.18), using the already given
reasoning method to combine the heo joint mites, and k y sets for the torque variable,
the control torque is given by:
r = G ~ S P - OSNI
= G[A(SSP(se, rse) - SN( s e , me)) + ( 1 - R)(ESP(ee, ree) - ESN(ee, ree))]
= G[AS(se,, se,) + (1 - A)E(ee, ,ee,)]
(437)
where S(se, , se2), E(ee, , ee,) are defined as equations (4.19) and (4.34).
4.3 Anaiysfs of the Conho1 Law
Both mappings S(q, se,), E(ee,, ee,) are R' + (-II), they are continuous and
nondecreasing with respect to their arguments. The control torque is thus continuous and
bounded. Given (4.19)- (4.24), and (4.23, it is easy to see that using
( S(se,,se,), E(ee,, ee,) ) as a coordinate system, the control torque changes its sign on a
straight 1i.e whose dope is - ( 4 1 - A)) where, in accordance with the chosen highest
priority goal, R > 0.5 should be chosen caretlly.
It should be noted that this single fuzzy f D-scheme rrquires a very fine tuning to be
successful in swinghg up and iet both Iinks access to the top unstable configuration. As
we see above, k,, k,& ,k, correspond the two atomic variabIes the anguIar error and its
rate of change in the kternal field, which depend on he priariiy control goal. For
instance, for tbe swing up conmller, the priorify control god is to swing link one and
Iink two to the upward inverted configuration, so k,,k, reIated with the anguIar enor
should be set close to 1. On the other hand k,, k+ reIated with the angular velocity of two
links should be set ma& certainly, k,,k, k,,k, E [0,11.
The parameters ps,p, are used to give more or t es importance to one of the two
variables h m the extemal fietd. In ttris swing-up conwller, both of p3,pC are chosen
0.5. It means the anguIar error and its rate of change are considered as the equai
importance.
Findly, let us study the scding hctor Gin the equation (4.27), whicti is the saine
meanhg as G, in equation (4.18). h this fuzzy contrd aIgorithm, the defuzzification is
very simpIe, which is a slight modification of the reasoning method, shown in (4.27) and
(4. i 8). From the equations (4.1 9) and (4.24), we can reake that:
Because the function ''tauh3 such as tanh(se,) , ta&&) , tanh(ee,) , tanh(ee,) is dram
fTom the interval [-IJ], and the parameters p,, pe dso belong to the unit interval [0,1].
Hence, the abdute value of part [nS(se,,se,) + (1 - A)E(ee, ,ee,)] is less than or e@
to 1. That means the scaling factor G shouid be chose relative bigger. During the process
of our implement. 1 find this factor plays an important pole in whole concrol algorithm.
and its iittle chan_&g dso affects the output.
In the Chqten 8 and 9, when 1 simulate and implement our control aigorithm. 1 cm
adjust the coatroller's parameters based on the above anaiysis. 1 can conchde that there
exists ciifference between the continuous-tirne system and the discrete-the system, and
between the simulation and the actuai experiment. AIthough, the control aigorithm is
same, the tuning is important and different.
Chapter 5
Balancing Control
The conml for balancing the Pendubot is very similar to the classicd cm-pole
inverted pendulurn problem. A baIaucing configrnation is defined to be any configuration
where Ise1 i 0 and [eel E O. The highest priority goal is now to keep the second link
balanced ar the top position. Figure 5.1 illustrates the baiancing configuration at the top
position. in order to irnplement this goal. we design a PD-like fuPy balancing connalier.
The d e base is almost contnry to the swing-up controller's d e base because the goais
of both conuolIers are dif3erent.
Figure 5.1 The bdancing configuration at the top position
Baiancing the Pendubot is snilar to the action in acrobaties. in order to keep both
links baiancd at the unstable configuration, the motor should provided the appropriate
torque with the correct diiection and magnitude aithough this torque is too srnaII to close
ta zero. At the top unstable position, there are four possible situations for the two links,
iflustrated in Fi-pre 5.2 and Figure 53.
Figure 5.2 Th link one on the right side around the equilibrium point
in the Figure 5.2 (a),
q, ~ ~ 1 2 , 5 se=l rl , -q, > O,
2 <O, ee=l rl 2- ( q, +q2) >OT
but the control torque has to be sufncientiy negative so that the second link start to Ml to
the l e4 tbat is,
rcO.
Next, in the Figure 5.2 (b), the subsequent attempt to keep a balancing configuration wilI
require a positive torque to move both Iinks toward the inverted upright configuration.
Figure 5 3 The link one on the left side around the equilibrium point
Snilarly, in the Figuration 5.3 (a),
q, > ~ / 2 , 3 s e = ~ / 2 - q , <O,
but the controI torque has to be sdlicientiy positive so h t the second link start to faII to
the right, that is,
Next, in the Figure 5.3 (b), the subsequwt attempt to keep a baiancin configuration ~vill
require a negative toque to move both k toward the inverted upright configuration.
5.2 Coni d Law
As we defined in the Ckpter 4, the ht joint is called the shoulder (S), and the other
the elbow (E). The @ar shouIder ermr (SE), is defined as: se = K 12 - q, ; the anguiar
elbow e mr (EE), is defined as: ee = al2 -(qI + q2) . The joint variabIe ES, describing
the elbow state is made up with EE and REE (rate of change of EE), whereas SS
(shoulder state) is made up with SE and RSE. The deinition of the elbow error allows to
defme two categories of eIbow state, ESP (positive) and ESN (negative), curresponding
to -tes where the second link is f a b g to the right or the left.
in the control system, there are two kinds of inputs: the e mr signals se, ee and theu
rate of change rse, ree ; there is ody one output, the toque s actuated Iink one. in fact,
fiom the Chapter 4,1 can get:
Hence, 1 just put two scaluig factors to hem, that is,
k,,se, k,,rse and k,,ee, k,,ree
which are Iike to the PD controller. Me r the e mr and the rate of change, such as se and
rse , are conespond with each other by the scaling factors k,, , k,, , we can simply depict
the "SSP" and "SSN" as:
IF "se is Positive" AND IIF "rse is Positive" THEN "SS is SSP"
IF "se is Negative" AND IF "rse is Negative" THEN "SS is SSW
Here, "ANDn is the Zadeh's Iogicai "AND. As the d u e s of se and rse are ml
numbers, we cm use mathematic form to express these des, such as:
SS = kplse + k, pe ,
which has included both d e s "SSP" and "SSW. Similady, the elbow states can aiso
eqressed as the following:
ES = k,,ee + k , p e
Because isl the baIancing control the highest priority goal is to keep the second link
baianced, the elbow &tes are more important than the houider states. Thus, the
following IWO d e s are used to design a fuzzy PD-iike balancing controlier:
IF "ES is E W ALSO IF "SS is SSN" THEN torque is Positive
IF "ES is ESP" ALSO IF "SS is SSP" TBEN toque is negative
where the logicai connective "ALSO" is used to give more importance to the joint elbow
variabIe "ESn than to the joint shouider variable "SS". Here, "ALSO" is again a quasi-
linear-mean operator, with A > 0.5 as its parameter. As the discussion in Chapter 8, 1
chose 0.75 for the A.
herefare, the bdmcing control law is:
r=+us+(t-~)sq
= -A(kPlee + Spe ) - (1 - A)(k,,se i k p e )
Chapter 6
Stability Anabsis of Fwzy Trajectory Tracking
ControIler
The paper [14] displays a fuzzy trajectory tracking control scherne, which has been
appIied to the Pendubot in our laboratory by Sheng Cai. This aigorithm is derived h m
combining Iinear regulator theory with the Takagi-Sugeno (T-S) fuzzy methodology.
Zheng Cai illusirate the application of this algoritm, by forcing the Pendubot to track in
real-time a sinusoiciai signai of significative amplitude, around an unstable equilibrim
point. Therefore, the implernent shows the feasibility of this aigorithm. However, the
author of [I4] failed to provide the stability dy s i s , which is very basic requirement for
the control aigorithm. In this chapter, 1 will andyze its stability.
6.1 Fuyy Control Algorithm
In the chapter 3, the dynamic ma& equation of motion for the Pendubot is $en by
equation (3.1). If the state variables are defmed as equation (3.9), the state equation of the
Pendubot can be written as:
A
x( r ) = f (x) + g(x)u(t) = F(x(r), Nt), t ) (6.1)
where x = [q, y tj,, %, q2 1' is the state vector and u( t ) = [r, O]' is the input vector. The
output is y(t) = qz .
A linear model for a speciflc equiliirium point can be obtaining using Taylor series.
For the Pendubot every equilibrium point must s a t e q, + q2 = al 2. Thus hearization
of equation (6.1) by Taylor series is @en as:
da = F, (t)& + F, (t)&
(6.2)
where
x,, u, are the vaiues of x and u for the specific equilibrium point. Refer to Appendix A
for a f d I denvation of these partiai derivation terms.
Delking x := &; A := F (t); B > F, ( r ) , we have
x( t ) = Ax(t) + Bu(t)
(6.5)
In the T-S fuzzy methodology 1301 [31], nodineas systems are approximated by a set
of linear local models, which is described by a set of fiizzy "IF-THEN" mies, with fuay
sets in the antecedents and locd Iinear time invariant systems in the consequents. Every i-
th d e of a T-S fuzzy model has the folIowvhg fom:
i" ~ u l e
Il? q ( t ) is M,, ,.-.! z, ( t ) is A4 ,,,..., z q ( t ) is MT
Where i = 1 ,..., r with r the number of des ; the z,u = 1 ,..., q) are the prernise
variables, which may be functions of the States or another variables; the M,, are the
fuzzy sets; x E Rn is the state vector; u E Rm is the input vector, y E RP is the output
vector; 4, BI , andC, are matrices of adequate dimension. Therefore, the final state and
output of the fuzzy system is inferred as foIIows:
where,
W. ( ~ ( t ) ) = 1, W, (i(t)) E [OJ] for ail i, is a known nonlinear function of x(t ) and
y is the membership function of r, (t ) in M, .
Now Iet's consider the Iinear reguIator theory (LRT) [29] [?Il. Given a he a r system:
x(t ) = Ax(t) + Bu([) + Po( r )
b( t ) = SW(I) (6.9)
e( t ) = Gr([) + Qw(t)
where w is a vector containing extenial disturbances andor references and e is the
tracking m r . Accordingly, st& feedback and error feedback controiiers c m be
desinged as
u(t) = k.r(f) + Lm([) (6.1 O)
Although Iinear regdation theory cornes fiom hear system, many researchers have
successhlly used it in the nonIinear systern and verifed its possibility and stability [291
[32]. Here we have lhearized the nonlineiir system (6.1) at each equiiibnum point, so we
can. use LRT and T-S fuPy methadology to control the noniinear system.
For the nonlinear system (Pendubot), we cm Iinearize it at each chosen eguilibrium
point, and then we design tocal control laws based on the LRT, for each local tinear
rnodel. The fuzzy trajectory tracking control dgorithm is described as the folIowings.
iF z, ( t ) is M z,(t) is M ,,,..., zq(r) is MT
Hence, the output of the fuzzy controUer is given as:
33
Stepl:
Let o ( t ) = 0 , the fuPy trajectory tracking control aigoritbm is simpIified a fii;T2y
state feedback closed-loop controf aigorithm [33]. Accordingly, the funy control
system becomes,
w = x-, w1 ( m 4 W + Xml {Y (WM xl w, (m~ml
= x.l w' ( W) A, X( ~) + x-l x.l {W. ( : ( t P 1 W) ) B, K, x W}
= -1 14 Iw1 ( m w , ( m[ 4 + B,Kl lm
= zml zl ( w Y , ~ , x ( r ) ~ (6.15)
where H,, = A, + B,K,, i, j = 1,2 ,..., r , IV, = w, (s(t )) , and w, = w, ( ~ ( t ) ) .
To investigate the stability of (6.19, 1 empIoy the foilowing Lyapunov functioa in
quadratic form [43],
where (.)' denotes the transpose of a vector or matrix, P E Rn'"' is a symrnetric positive
definite matrix. DSerentiaiing (6.163, we have,
From (6.15) and (6.17), we get,
where O, = -(Hi P + PH,,)
design the membership fiuictions 4 (~(t)) in (6.8) as foilows,
othenvise
(6.20)
If we a s m e Zi-, w,l k ( t ) ' ~ = ~ w,~,x(r)) 1 t 0, rubstitute the above nvo equatioa for
ml into (6.1 8), we have,
We can conciude that,
EquaIities bold when x(t) = 0.
Therefore, the above derivation has verined the stabity of the fuzzy state feedback
contro t algorithm.
Step2:
Let w(t ) # O , we should show the conditions for the solvability of this nonlinear
system (the Pendubot).
For a linear system dscriid in equation (6.9), the state feedback and enor fkedback
controiiers can be designed as equation (6.10). The Iinear regulator theory is based the
following three assumptions (accordhg to 131 1):
Al : O($) c clos(^+) = {A E c R~[ A] Z
.a: the pair (A, B) is stabilizable;
A3: the pairs [C O], and i] ir deiectabk.
The first assumption does not involve a Ioss of generality because asymptoticaIly stabIe
modes in the exosystem do not affect the regdation of the output, The second assumption
is indeed necessary for aqmptotic stabiiization of the cIosed Ioop via either state or emr
feedback. h e third one is stmnger than the assumption of detectability of the pair
( C, A) , which would be necessary for aymptotic stabilizarion of the closed Ioop via
error feedback.
Suppose Assumptions Al, A2, and A3 hold, and then the linear state feedback
reguiator problem is soIvable if and ordy if there exist matrices i and I' which soIve the
Iinear ma& equations
. w = A ~ + B ~ + P (6.22)
CTl+Q=CI (6.23)
As a matter of fact, conditions (6.22) and (6.23) are exactly the conditions which the
matrices II and r should fiilfill so that the folIowing Iinear mappings hold
~ ( t ) = nw(t) (6.24)
~ ( t ) = ru([) (6.29
if and ody if the conditions (6.24) and (6.15) hold, the tracking error, will approach to
zero, e( t ) + O as r -+ m , which can be shown as the follows.
e(t) = Gr(t) + Qw( t )
= Cnw(r) + Qc(t)
=(CrIsQ)w(t) = O (6.26)
in the fupy mjectury tracking control aigorith, the nonlinear systern Pendubot is
regarded as sweral local linear model around each equilibrium point. The d e s for the
plant and controlIer are expressed in equations (6.1 1)-(6.12). Then, we can write the
tracking emr of the whole system as:
dl ) = z W, ( ~[ ) [ c, L( o + QP<O] (6.27)
where w, (z(t)) is defined in (6.18), which is reIated with the weight of i-th Iocal hear
modet. As each local conml law is desi gd based on the linear re-dation theory, each
tracking error ei ( t ) + O .if and only if t hnc exist matrices I, and T, (for i-th locai bear
system) which solve the linear matrix equations
iI,S = A,n, + B,T, +<
C'nt + Q, = O
That also can be written as:
~ ( t ) = n,o(t)
Substituting to (6.27), we can get the tracking error e(t) = 0.
Chapter 7
Combining the Controllers
The control scheme 1 proposed is to use a s o d e d logic based switching control:
design a f k z q PD-Iike controuer 1 (Chapter 4) to swing up the Iink one and link two to
the top configuration at the almost same t he , then switch to another fuzzy PD-ke
controller II (Chapter .S) to keep the iinks balanced at the unstable position
(q, = ~ 1 2 , qi =O) , or switch to another trajectory tracking controiier iii (Chapter 6,
implemented by Zheng Cai) to handle the Pendubot to track the desire trajectory. This
switching aigorithm witl connect each both controller together.
7.1 Combining in the Simulaion
With both the swing up controiier and the balancing controiier complete, an dgorithm
is needed to comect them. At first, I separatety designed tbe controUers using
SIMULINK, and then designed a switching function to combine them together. tu the
whoie research process, 1 finish the parameters adjusting in the simulation and apply its
resuIts to the Pendubot. hi t i dy when working with only cornputer simulations of the
Pendubot, the controllers were switched by Merent switching functions in the
simulation of the discrete mode1 and the continuous model. Let's show the two switching
function as the followings.
In the simulation of continuous model, the switching function is same as the actuai
control dgorithm, which consists of the e mr between the current states and the goal
states (both links' position in the top configuration, that is, q, =a/2, q, =O).
Observhg the output of the torque, we cm fZnd the controihg results of the simulation
are very smooth and stable. There is no big jump for the torque during the whole
simulation. Me r the switching function was determined, 1 use the muitiport switching
biock to connect the two controiiers and the witching function. he details about this
part are illustrated in the Chapter 8. The switching funetion is chosen as:
Switching - Funcrion
where
@l = 4,
421 = q2
& & is the logicai "AND" collation operarion
abs is the function of absolute value.
in the simuiation of the discrete model, the switching between the swing-up controIIer
and the baIancing was determined by the simdation time. When 1 change the model fiom
the continuous mode1 to the discrete model, the parameters of the controiiers has been
changed. However, this kind of controIIer is closed to the actuai digitai controller because
1 chose the same sampling h e . That means the tuning of the parameters is suitable for
the reai digital controIler whose original code is C Prograrn. The mritching time was
determined by observing when the swing-up control had brought the links almost to rest
at the desired equ%'brium position. Moreover, the current simulation time is calcdated by
the "clock" bIock that records the current simdation t he. Because this switching method
is sudden and compelling, the curve of the torque dispIays a little dithering in the two
links. AIthough this method worked weii for the simulation but behaved poorly when
reaiized on the actuai Pendubot. The reason is that the simulations are exactly repeatabie
but the actuai runs are susceptible to dif3erent initial conditions and computational noise
making them unable to repeat reliably. In addition, the simuiation mode1 doesn't consider
the fiction of the whole system and other actud factor. Al1 in dl , the switching t h e is
set at 0.7 second, the switching function simply is:
Swithing - Function = 1 + (u[l J > 0.7)
where u[l] is the curren~simdation time.
7.2 Combining in the Impiementution
The foiiowing algorithm was used instead to give the Pendubot more intelligence and
switch the control by watching the States of the system.
if (!catch) ( /* if links have not corne in range to baIance */
If (fabs(x1 k-HALFPI) < -10 (
If (fabs(x3k) < 20) (
F..... /* bdancing controI or trajectory tracking controI */
f(fabs(u) < 6) ( /* ifbaiancing control check is not too l q e */
-
pd = 0;
/* switch h m swing up control to ba hc e */
catch = 1;
1 /* endif*/
} /* endif*/
1 /* endif */
1 /* endif */
if (pd) (
/* if swing up control is sti in use */
. . . . . . /* swing up controiier */
1
else {
. . . . . . /* balancing controiler or trajectov tracking controiier */
1 /* endif */
This algorithm wai i for iink one to arrive within 0.1 radians of its equilibrium
position and then checks iink two. If Iink two is also within 020 radians of its
eq&brium position, the baIancing control is calculated. if the control output is less then
6 volts, 9.95 volts being the maximum DAC output for the Pendubot, the conml is
switched to the baiancing mode. Otherwise the Iinks are passing too quickly through the
equilibrium point and the swing up control remains intact.
Another implementation issue that arises in the controller design of the Pendubot is
the approximation of the joint velocities. There is oniy position feedback in the system so
a finite approximation is used to estimate the velocity. To h d the velocity 1 simply used
the finite ciifference method,
x2k = (x 1 k-x 1 old) / SAMPLE; /* xI=q, , x2=q, */
x4k = (xj kdol d) / SAMPLE; I* x3=q2 , x4= (ir */
This method creates numericd e mr or noise in the caicuIation of the control effort,
though, due to the finite resolution of the optical encoders. Then 1 simpIy take the
average of the last three velocities heiped to Bter and decrease this noise, shown as the
next program.
/* fiIter vel~city with an average */
x2k = (x2k+x2oId1+~201d2) / 3.0; /* average last 3 velocities to get */
x4k = (x4k+x4ddI+x401d2) / 3.0; /* rid of quantization noise *!
A dither signai was dso needed IO he1p balance the links in the top position. Due to
fxiction and the increased effect of gravity on the links in the top position, the balancing
control was not able to hold the links motionless.
Chapter 8
Simulation
Tbis chapter displays the simulation r edi s found when simulating the Pendubot with
the SIMULINK 3.0 in MATLAB 6.0-1 start to found the Pendubot mode1 according to
the dynamic equation. The second step is to build the swing-up controiier based on the
fuay swing-up aigorithm (see chapter 4) and adjust the control parameters in order to
reach the desired results. The third step is the same as the second step to get the
simuiation mode1 of balancing controlier. in succession, I combine the above two
controlIers together using the suitable switching function to complete the whole
simdation system.
Figure 8.1 Swing-up and baiancing control
65
As we know, the control task is to bring the Pendubot fiom a straight-down resMg
position to a baianced straight-up verticai position (as s how in Figure 8.1). Initial and
goal positions are ( q, = -K / 2, 9, = O ) and ( q, = a / 2, q, = O ), respectively.
8.i SUndation Pendubot Mode1
As we know fiom chapter 3, the dynamic equations of Pendubot conskt of the angies
(ql , q2) , angular velocities ( q,, q2), and angular acceleration ( 9, ,q2), so 1 shouid derive
the reIationship between them to build up the simulation model. We sirnulate the mode1
(3.1) using SIMLTLINK, and the derivation is shown as the following part.
Recaii the equation (3.9):
1 can cornpute and get
Therefore, connecting the three part (8.2), (8.3), and (8.4), 1 have
Figure 8.2 Subsystem 1: Pendubot mode1
in my simdation model, the function of "qlddot" is expressed as equation (8.9, and
the hmction of "Qddot" is equation (8.6). As far the torquer or T, it depends on the
feedback value computed by the controI law. he real simulation block about the
Pendubot model is illustrated in Figure 8.2, which is dehed as subsystem 1.
8.2 Swing-Up SimuIation Modei
At the begimhg of the simuiating swing-up controiier, 1 just found it based on the
swing-up control Iaw, which is the equation (4.27),
r = G[ X( s e , , se, ) + (I - R)E(ee, , ee,)]
(8-7)
where
W e , 9 se2 1 = Pr t a w e , 1 + (1 - ps 2,) M( s e 2 )
(8.8)
E(ee, 9 ee2 1 = Pt t awe e , + (1 - / Je) tanh(ee2)
(8.9)
These fiinctions were introduced in Chapter 4. Here, 1 should deai with the huiings such
as the weight parameters pJ, pt , h, the defimification parameter G , and the scding
factors k, , k,, k3 , k, , which are defned as:
se, = k,se , se, = k p e ,
ee, = k3ee, ee, = k p e
Firstiy, we chose the suitable scaiing factors k,,k&, k, by triai and error based on
the main goaI is to swing up two links to the top position and let them arrive there at the
same t h e as possible. The important problem that we should pay attention to is that the
angular veIocities (q,,q,) can't be too high when both Links are closed to the goal
position. Because during the balancing the Pendubot, the angular veIocities of Links are
alrnost equd to enor, the switcbg between two controiiers is not UIlStabIe if the anguiar
velocities (q, , q,) at the tirne of switching are very large. Therefore, 1 appIied the above
idea to choose the four factors, which are:
Secondiy, 1 consider the wei& parameters .us, pe, after the scaiing factors were
determined. 1 simply set pr, pe = 0.5, which means the importance of angies and angdar
velocities is same. Another parameter A displays the weight of two links during the
swing-up, and it depends on tbe main con~ol goal: swing up the Iink one frst, and make
the link two arrive at the goal position at the sarne t he. Thus > 0.5, we change it in the
continuous t h e mode1 simulation and the discrete mode1 simulation.
Finaily, G is related with the acruaI toque applied to the Pendubot. If it is too srnail,
the nk one will pass the tip position until the link two arrives there, or the accelerations
at the switching t h e is too large. if it is too big, there is not enough energy to swing up
wo links. According to our trial and error, the range of G is about 3 1-36.
Figure 8 3 Subs~stem 2: swing-up controlier
70
Figure 8.3 shows the subsystem 2 in the simulation model, where the function
S(se, , se,) cornes fiom equation (8.8), E(ee, , ee,) h m (8.9), and the function T - swing-
up cornes fiom (8.7).
8.3 The Bafancing Simulation Model
Chapter 5 has given the balancing aigonthm, and now we recall the equation (5.1)
' = -A(k,,ee + k,,ree) - ( 1 - A)(k,,se + k,,rse) . (8.10)
Where ee, ree,se,rse are dehed in chapter 4 and in section 8.2 of this chapter. What we
shouid do is to determine the conhot parameters k,, , k,, , k,, . k,, and the weight factor
rt . Because the pnority control goal in the balancing is to keep the unactuated Iink two
upright, the weight 1 of elbow joint is Iarge than 30% and we chose il =0.75. As for tbe
other four controi parameters, we andyzed the data of controller designed by LQR
method in order to decide our control parameters. Finally, 1 have
k,, = 21 -65, kdl = 2.75
kpz = 0.88, kdZ = 4.25
ql-in
b
Ku)
b f orque-balanung
TJalanung
qldot-in
q2dot-in
Figure 8.4 Subsystem 3: baiancing controller
Figure 8.4 illustrate the simulation block of Mancing controer, and the function
T-balancing is corne fiom equation (8.10).
8.4 The Final Simulation Mode1
Step 1 :
After completing system modei, swing-up model, and balancing modeI, 1 began with
comecting system mode1 witti swing-up mode1 and get the swiging-up simulation
results (see Section 8.5). Figure 8.5 shows the d g - u p simulation block.
Figure 8.5 Swinging up simulation
Step 2:
I just adjust the &dancing controIIer by connecting the system model and the
balancing mode[, sbown in Figure 8.6. Because the initiai condition is set based on the
anaiysis of rhe swing-up simuiation r d & , the baIancing simdation resuits are not very
important, Thus we dddt show them separately.
Figure 8.6 Balancing simulation
Step 3:
1 design the switching funcrion (see chapter 7) and build a mritching subsystem that is
iiiustrated in Figure 8.7.
(a) Using in the continuous tirne model (b) Using in the discrete time model
Figure 8.7 Subsystem 4: switching block
Step 4:
Connect al1 subsysterns to simulate the swinging-up and balancing the Pendubot.
Figure 8.8 shows the whole simulahg biock. The simulation r edt s are in Section 8.5.
Figure 8.8 The whole simuiation system
Step 5:
1 first simtdate the continuous time mode1 and the section 8.5.1 shows the simulation
results. Then 1 replace the htegrator biock of continuous system with the Discrete-Time
Integrator and change the swtching block Figure 8.9 shows discrete-the system modeI,
where the sarnpiing time is equal to 0.005 seconds, same as the actuai digital controUer.
Of course, we shotdd adjust the conml parameters such as A, G, k etc. Finally, Ive
simdate the discrete-time system and get ttie simulation d t s (se section 8.52).
Figure 8.9 Discrete-tirne Pendubot mode1
8.5 Simulation Resulis
There are two kinds of simulation model: one is the continuous time modeI; the other
is the discrete time model. Thus, we present the results of both of them. Since we use the
digital controller in experiments, the sampIing period is the same as that in the discrete
time simulation mdel, Their control parameters are aIso approximate. Section 8.5.1
illustrates the simulation results for the continuous system. Section 8.52 iiiustrates the
simulation resuits for discrete system. AI1 results indude the positions of two links,
their anguiar velocities, and the torque r .
8.5. I The Simulafibit Resuis for the Continuou Sysem
Part 1: the swinging up and balancing the Pendubot
q, (radian)
Figure 8.10 The output of q,
Time t (second)
Figure 8.11 The output of q,
Figure 8.12 The output of torque r
2t
15
18
5
a
5
-1t
q, (radian l s)
..........................................................................
- .......................... <.............................:............-
t
............... .............. : ............................ : .............-
-.y
.............. ............. i... ........... : ............. : .............. ;
T i e t (second)
t 1 2 3 4 5
T i e t (second)
Figure 8.13 The an-dar velocity for Link one
q2 (radian 1s)
T i e t (second)
Figure 8.14 The an-dar velocity for link two
Part 2: Swinging up the Pendubot
r (N. m)
21 , f
15 -
................. ................................ L...............
............................... .............. ;.................A..
.................................................... ................. 1
.... : ................. ; ................. L ...............
Tie t (second)
Figure 8.15 The output of r Cjust swinging up)
Time t (second)
Figure 8.16 The output of q, oust swin-ing up)
q2 (radian)
-
-
!
-7 1
O
1
1.5 1 1.5 2
Tme t (second)
Figure 8.17 TIie output of qz oust swinghg up)
8.5.2 The Simulatron ResiuZts for he Dkweie System
Part 1 : the swinghg up and balancing the Pendubot
q, (radian)
2
-1 5 -. .. - .- . . - . . . .:. . . ... . . , . . . . .: .. .. . . . .. . .. . :. . . .. . .- -.. .-. ;. . . . .. . . . . . . .-
-2
I t 2 3 4 5
T e t (second)
Figure 8.18 The output of q,
q2 (radian)
2 3 4 5
Time t (second)
Figure 8.19 The output of q,
T i e t (second)
Figure 8.20 The output of torque r
q, (radian l s)
Time t (second)
Figure 8.21 The angular velocity for iink one
Tune t (second)
Figure 822 The anguiar velocity for link two
Part 2: Swinging up the pendubot
1.5 2
T i e t (second)
Figure 833 The output of r (just swinghg up)
q, (radian)
2
T i e t (second)
Figure 824 The output of q, (just swinging up)
q, (radian)
I 1.5 1 1.5 2
T i e t (second)
Figure 8.25 The output of q2 (just swinghg up)
Chapter 9
Real-time Experimental Tests
9.1 Introduction
This chapter presents the reai-time experiment results of the fuzzy controilers, using
the Pendubot Mode1 P-2 as the test machine. The controller is the digitai conmIIer
designed by the algorithms proposed in the above related chapters. In addition, we use a
graphical user interface (GUI), named MSDEVEXE, supplied by Mechaironic Systems,
Inc., to simpl* the task of m i n g controIIers, outputthg the data file.
in our cornputer, we have instdled Microsoft C t t 7.0 in the C:\MSI directory. 1 *te
the C program origind code for our controller, and then we use command "~nsmake
<filename" to compile i t ConsequentIy, 1 get the executive fies named the same with
"fiename". F i l y , I nin r d tirne controllers in the Widows 3.1 environments. In
Widows 3.1 we mat e a PIF file for our controlIers. Use the PIF file editor ta create a pif
file that
1. indicates the name of our executable,
2. NI~S in a fui1 screen DOS box (Display Usage: Fui1 Screen),
3. nms in exclusive mode (Ekecution: Exclusive) and
4. sets as the Start-Up Directory the directory where the executable is located.
In our experiment, 1 adjusted the controlliing parameters in tbe controlling program.
We find there is a little clifference cornparing with those in the simulation. However, this
result show the diffrence between the actuai Pendubot and the simuIation mode], and
this is aiso discussed in the next chapter.
he experiment is divided to two pm. The irst part is to design the winging-up and
balancing controuer in order to swing up the Pendubot f?om the rest configuration
( q, = -x 12,
q', = 0 ) and to baiance it at the unstable position (q, = K 13,
q2 = O 1.
The second part is to combine our swing up controller with the trajectory tracking
controIIer (this controller is designed by Zheng Cai). The clifference of switchin;
algorithm between the two parts is just using the different limited value of (q, - x / 2 )
. . . .*.
Section 9.2 is the flow chart of our conrroller. Section 9.3 describes the experirnental
results of the frst part; plotted by MdIe according to the output data. Section 9.4
describes the photographs of experiment for two parts.
9.2 FIow Cliart
The next five pages is the flow chart of my cont robg program.
Exit and End
t
Conuol Circulation
Calcufate raw velocity
x2k<xI k-XI old)/SAMPLE;
Filter vchcity with an averag
.*(x2k+~ldl+x2oIdtyj.O;
x4k(x4k+x401dl+x4oIPy3.0;
f
I
\
CacuIate Swingkg up Contm t Toque
Sfunuio W... By quaion (4.19)
haion=- By equiuion (4.24)
IF- By qwbn (4.27')
CaIculatt Baiamhg Control
Toque By Fiption (5.1)
in Chaptcr 5
output and save the
/ .-.YI /
Output &a fi&
P
9.3 Eiperimentd Ra& for Swngingq and B d ~ c i n g
From the flow chart in the above section 92, we can see that, in each loop, the system
torque ( r ), and cunent Ume (t), and then output these states to the data file. When the
digital controller stops, the system output the data me. Hereby, we can get one data file
after we operate the controller one t h e . This data file is saved as M-file of MA?ZAB.
Finaiiy, we reprogram this data file and run it to pIot the effect of each variable such as
Figure 9.1-9.5 shows the experimental resuIts for swinging-up and balancing.
Comparing with the simuIation resuits of discrete system, shown in Figure 8.1 8-8.22, the
torque of the system is close but not equal to zero; both links actually have a little dither,
and the controller keeps them balancing at the unstable position.
Fignre 9.1 Effect of torque
Figure 9 3 mect of angle for iink two
- Figure 92 Effect of angle for link one
Figure 9.4 Effect of angular velocity for link one
Figure 9.5 Effect of angdar veIocity for link two
Figure 96 iIlustmtes the Pendubot itt the rest configuration. Fimm 9.7 illustrates the
Pendubot balancing at the top UILStab1e configuration. Figure 9.8 and 9.9 illustrate two
positions whiie the Pendubot is tracking a desirrd irajectory.
Figure 9.6 The Pendubot at the rest conti,oution
Figure 9.7 Balancing at the top configuration
94 -
Figure 9.8 The Pendubot on the left side
Figure 9.9 The fendubot on the right side
Chapter 10
Conchsions and Recommendations
for Future Work
The study of under-ainiated mechanisms is a topic of current research in the control
community. These systems are characterized by the fact that they have fewer independent
control actuators than degrees of fixedom to be controiled, Different control schemes,
derived fkom noniinear systems theory 121 [49], classical control techniques [3] [SI, or
intelligent control methodologies [I I ] [501, have been proposed. From the recent research
papers, we can find that the fuPy control method attracts many researchers because of its
robust characteristic.
In brief, the fuzzy control method used in the Pendubot, can be divided into severai
cases. First, the practicai techniques based on genetic algorithms (GA), are introduce for
the automatic tuning [50] [I 11. The second case is to design a fiizzy PD controlIer for the
under-actuated robot swing-up control (151 [SI], and this method can automaticay
change the membership fimctions of the fuay PD scherne. The third case is to convert
the noniinear system to a set of linear Iocd system rnodel at each equiiibrium point. based
on the Takagi-Sugeno fuzzy methodology [I4], and then they applied the liear control
method to control the systern based on the fuzzy mie base. Comparing to the above
methods, the thesis presents a two-de-base fiizzy control scheme based on quasi-Iinear-
mean aggregating operator and Tsukamoto's reasoning.
From another point of view, the research to the under-actuated mechanism inchdes
the foliowing aspects:
1 . Identification. There are off-he or on-line, fuzzy method or classicai method,
energy method or optimization met hd
2. Swing up and Balonce. This is a set-point regdation, and I can design various
controllers using various control methods, such as passivity or energy method,
heuristic, fuPy logic, partial feedback Iinearization, machine leamhg etc.
3. Switching Con~ol . So-cal1ed Iogic based mvitching control is widely proposed:
the logic condition may be the error of angle or the distance to the goal position
[15]. 1 use the e mr of angle or use the switching time as the switching
parameters.
4. Trajectory Tracking. This is a new study direct for the under-actuated mechanism.
There is a IittIe contribution besides the paper [14] [4].
10.2 Conclusions
in my study, a fzq scheme for swing-up controI is proposed and implemented in
the actuai under-actuated mechanisni - the Pendubot, Comparing with the previous
partial feedback Iinearization method, I find that, the swing-up speed is faster and the
stability is certainly good. This.method is simpler than the classicai conrol method;
however, the timing is a Little dfi cui t for the simulation or the experiment, The
proposai method qresents a new class of fuzzy controls. The real-the
irnplementation also shows the success of the application and feasibiiity of the fiiPy
control method to the nodhear system.
In my simulation, we start with the continuous time systern, and then change it
into the discrete time m m . We conclude that the control parameters are different
for these two control systems although the sampling Ume is 0.005. We also realize
that the smaller the sampIing time is, the more approximate the two different systems
are. Comparing with the actual experimeatd model, the simulation model is ody a
mathematization model that ignores some existin; factors such as friction and
extemal disturbance.
-4nother importance part is the stabiiity analysis of the fupy scheme for the
Pendubot trajectory tracking. 1 verified the possibiiity and vaiidity of a fuzzy state
feedback control scheme and a f b y noniinear regdation control method. The
stability proof gives us the suggestion that we can appIy Iinear control theory and
fuzzy control method to sudy the noniinear system.
Finaliy, in our experiment, digital computer pIays the role of di8;ta.i contmlier.
From our experiment, 1 conclude that, for controlhg systems with slow dynamics
this wiii be indistinguishable fiom the performance give by a continuous controiier,
-but for systems that respond at higher fiequencies 1 may encounter problems in
achiewig control. Therefore the cycle speed, or the sampling penod, pIays an
-important roIe in the design of the digitai controIIer:
10.3 Recommendations for Future Work
1. Generaluation
The fiizzy contra[ scheme developed in this thesis has been successfily
applied to the Pendubot, The Pendubot is an example of the under-actuated
mechanics. Therefore, the future work is to generate this fuzzy control method to
general under-actuated system. Furthermore, in order to generalize this controI
method, we should design an automatic method to complete the controller's
parameters tuning; for example, using cornputer program to search a best set of
controI parameters.
As we know, ive start our research from the simulation using SIMCILINK, and we
can also program M-file code to simulate the control system. Furthermore, it is better
for the discrete time system. According to the expianation of function of MATLAB
[53] [54], M-hies can be directly changed to the execute fiIes. Therefore, we cm use
the M-fies to SimuIate the control system and directiy to conml the actual modeI:
the Pendubot.
3. Trajectoy Tracking
For the noniiiear system, trajectory tracking is a Little more dfacult than the set-
point regulation. he research results [32] 1291 for this aspect are limited, and the
application to the Pendubot is vars [I4]. Thesefore, we are invetigating to apply
other modem control methods, except the linear regdation theory and T-S fuPy
methodology, to force the Pendubot to ack a desired trajectory.
References
[l] Daniel Jerome BIock, "Mechanical Design and Control of the Pendubot", M.S.
Thesis, Department of GeneraI Engineering, University of iliinois at Urbana-
Champaign, 1996.
121 Mark W.Spong, "The Swing Up Control ProbIem For The Acrobot", IEEE on
. Control Systems Magazene, pp. 49-55, February 1995.
[3]
Lsabelle Fantoni, Rogelio Lozano, and Mark W-Spong, "Passivity based control of
the Pendubot", Proceedings of the American Control Conference San Diego,
California, June 1999.
[4]
Matthew D.Berkerneier and Ronald S-Fearing, 'Tracking Fast Inverted Trajectories
of the Underactuated Acrobot", IEEE Transactions on Robotics and Airromation,
vol. 15,110.4, August 1999.
[5] Rafael Fierro, Frank LLewis, and Andy Lowe, "Hybnd Control for a CIass of
Underactuated Mechanicd Systems", LEEE Transaction on S'stem, Man and
C ybernetics-Part A: S ysterns and Humans, vo129, no.6. November 2 999.
[a
Kanmobu Yoshida, "Swing-Up ControI of an inverted Pendulum by Energybased
Methods", Proceedings of the Americun Control CorIference, San Diego,
California, June 1999.
[q Marcelo CM., Teixeira, Stanislaw and HZ& "Stabibng Controller Design for
Uncertain Nonlinear Systems Using Fuzzy Models", IEEE Transactions on Frqy
S'stem, vol. 7, no2, ApS 1999.
[8] HX.Lam, F.H.F.LRung, and P.K.S.Tarn, "Fuzzy State Feedback Coatroller for
Nonlinear Systerns: Stability Analysis and Design", IEEE International FL"~
Sysrems Conference Proceedings, 2000.
[9]
HKLam, F.H,F.Leung, P.K.S.Tarn, "An improved Stability Andysis and Design
of Fuzzy Cantrol Systems", IEEE Inrern~rional F q Systems Conference
Proceedings, 1 999.
[IO] Borislav Vidolov, Christian Melin, "An Approach to the design of MIMO F m
Controllers in Cases of Incomplete Expert KnowIedge7', IEEE Inrernational FLZZ
Sysfems Conference Proceedings, 1 998.
[Il ] Marcio A.T.de Sousa, and Marconi K.Mad.rid, "ptimization of Takagi-Sugeno
F w q ControlIers Using a Genetic Aigorithm", IEEE Inrernational F- System
Confrence Proceedings, 2000.
[12] Jianqiang Yi, Naoyoshi YUBAUKJ, and Kaom HIROTA, "Systematicdy
Constnrcting Stabiliiration Fuzzy Controllers for Single and Double Penduium
Systems", IEEE Inrernational Fmzy S'stem ConBrence, 2000.
[13] Ju-Jang Lee, -Robust Adaptive Control of an Underactuated Free-flying Space
Robot under a Non-holonomic Structure in Joint Space". Inremc~tional Journal of
Systems Science. vol. 27, n0.11, pp 1 1 13-1 121,1996.
[14] Ofelia Begovich, Edgar NSanchez and Marcos Maidonada, "Takagi-Sugena Fu;rzy
Scheme for Real-T'me Trajectory Tracking of an Underactuated Robot", IEEE
Transactions on Contrul Systems Techology, November 1999.
[15] Edgar Sancheg Luis A.Nuno, Ya-Chan Hsu, and Guanrong Chen, "Fuzzy PD
Scheme for Underachiated Robot Swing-up Contrai", lEEE Internatl*unal FUIZZ
S'stems Conference Proceedings, 1998.
[lq Christian Melin, Bunslav VidoIov, "A Fuzy PD-Iike Scheme for Two
Underactuated PIanar Mechanisms", iEEE International FLZ Systerns Conference
Proceedings, 2000.
[17] Chun-Yi Su, and Yury ~tepkenko, "Slidhg Mode Control of Nonholonomic
Mechanicd Systems: Under-actuated Manipulator Case", Nonlinear Contrd Syxtem
Design Symposiums (NOLCOSJ, FAC Prepringts, Tahac ciiy, pp 609-6 13. 1993.
[18] B.Vidolov, C.Melin, "Fuzzy Conml: ControlIers Based on Two Rules",
internarional F r q Systems and Intelligent ConrroE Confrence, IFSICC -93,
LouimilIe KY-USA, 1993.
(191 B.Vidolov, C.Melin, "Fuzzy Controllers Based on Two Rules - Study and
Applications", Froc. Journees Nationales sur les Applications des Ensembles
Flous, Nimes, 1993.
[20] Y.Tsukamoto, "An approach to fuzzy reasoning method", Ahrances in F c y Set
Theory and Applications, MM Gupta, RK.Ragade, and R.R.Yager Eds.,
Amsterdam, North-HoiIamd, 1979.
[2 1 j B AFrancis, "The hear muitivariabie regdator problem", S M J . Control.
pimization, vol.15, pp 486405,1977 .
[22] Zadeh L. A., " A theory of approximate reasoning", Machine Intelligence
Mogmhe, vol. 9, Halsead Press, New York, pp 149-194,1979.
[23] R.Kruse, J.Gebhardt, FXlawonn, "Foufldatious of Fuzzy Systems", John fiIey &
Sons Ltd., 1993.
[24] MMGupta, J.Bkiszka, G.M.Trojan, "Multivariable Structure of Fuzzy Control
Systems", IEEE vol. SMC- 16, no. 5, SeptembertOctober 1986.
[25] C.W.de SiIva, "A Criterion for Knowledge Base Decoupling in Fuq- Logi c
Control Systems", IEEE vol. SMC-24, no.10, October 1994.
[36] Gegov A, "Distributed Fuzzy Control of Multivariable Systems". Kluwer
Academic Publicarion, 1996.
(271 R.R.Yager, and D.P.Filev "EssentiaIs of F u q Modeling and Control", John WiZey
& Sons, Inc., 2994.
[28] J.Fodor, and Mhubens, " F q Preference Modeling and Multiaiteria Decision
Support", K h e r Academk Publishers, 1994.
[29] A.lsidori, Wodinear Control Systems", 3"' cd Springer-Verlag, 1995.
[30] T.Takagi and M-Sugeno, "Ftrirzy identification of systems and its applications to
modeling and contrai", IEEE Trans. Systems, Man and Cybernetics, vol-15. no.1.
pp 116-132,1985.
[3 II K-Tanaka and M.Sugeno, "StabiIity analysis and design of fuzzy conml system",
F q Sers Systern Magazine, voIA5, no.& pp 133456,1992.
[32] A. Isidori, Christopher 1. Bymes, Thtput Regdation of Nonlinear Systems", IEEE
Transactions On Automatic Confrol, voI.35, no.2, February 1990.
[33] H.O.Wang, K. Tanaka, and M.F.Grifnn, "An approach to fuzzy controI of nonlinear
systems: stabiiity and the desigu issues", EEE Tram FLE System, vol. 4, no. 4,
pp 14-23, Febniary 1996.
[34] John J.Craig, "Introduction to Robotics Mechanics and Controi", Second Edition.
Copyright @ 1989,1986 by Addison- Wesley Publishing Company, Inc., 1989.
[XI Mark W.Spong, F.L.Lewis, C.TAbdailah, "Robot Controi: Dynamics, Motion
. Planning and Andysis", lSBN 0-7803-0401-7, O 1992 by the Institute of Electrical
and Electronics Engineers, IEEE Order Numbec PC0299-8, 1992.
[XJ M.W.Spong and M-Vidyasagar, "Robot Dynamics and Control", New York Wiley,
1989.
[3TJ K.Kreutz, "On manipulator control by exact Iinearization", IEEE Tram Auto.
Cont., vol.34, no.7, pp 763-767, Juiy 1989.
[38] H. GoIdstein, "Classical Dynamics", MA: Addison-Wesley, 1950.
[39] Nazareth S. Bedrossian, 'Tioniinear Conno1 of an Underactuated Two-Link
Manipdator", Proceedings of the American Conrrol Confeence, San Francisco,
California, June 1 993.
[40] John Hauser, Richard M. Murray, 'Woniinear controllers for non-integrable
systems: the Acrobot exampIe", lEEE Transactions on Automatic Conrrol, WP
65:00,1993.
[41] You-Liang Gu, "A Direct Adaptive Control Scheme for Under-Actuated Dynamic
Systems", IEEE Transactions on Automatic Control, Proceedings of the 33rd
Conference on Decision and Conrrol, December 1993.
[42] Y.L.Gu and Y.S Xu, "A no- Form Augmentation Approach to Adaptive ControI
of Space Robot Systems*, Proc. 1993 IEEE Internationai Conference on Robotics
anddufornation, pp 73 1-13?, Atlanta, GA, May 1993.
[43] Yann Blanco, Wilfiid Perruquetti, and Piene Borne, "ReIaxed stability conditions
for Takagi-Sugenozs fuzzy models", IEEE International FL"~ Systems Conference
Proceedings, 2000.
1441 Lotfi A. Zadeh, Abraham Kandel, and Gideon Langholz, "Fuzzy Control Systems",
ISBN 0-8193-4496-1, O1994 by CRC Press, Inc, 1994.
[45] Witold Pedrycz, " F u q Control and F u ~ y Systems", Second Edirion, ISBN 0471-
934755, QI993 by Resemch Studies Press Ltd, 1993.
4 Kudret DemirIi, ''Notes of Fuzzy Sets & Fuzzy Logic". Deparment of Mechanical
Engineering, Concordia University, 1999.
[471 Michael Margaot and Gideon LanghoIz, "Adaptive Fuzzy ControHer Design via
Fuzzy Lyapunov Synthesis", IEEE International FL"~ Systems Coni enw
Proceedings, 1998:
1481 G.S.Virk, "Digital Cornputer Control Systems", ISBN 0-O7-U67jl 2-0, Fitsr
published 199 1 by Macmillan Educution Ltd, 01991 by G.S. PX, 199 1.
[49] L.E.Ramos, B.Castil1o-Toledom, and J. AIvmz, 'Woniinear Reguiation of an
underactuated robo", Proc. 1997 LEEE IntZ. Confrence in Robotics and
Automation, pp 3288-3293, Albuquerque, New Mexico, USA, ApriI 1997.
[SOI MALee, and M.H.Smith, "Automatic Design and Tuuing of a Fuzzy System for
Controlhg the Acrobot using Genetic Algorithrns, DSFS, and Meta-Rule
Techniquesn, Proc. WI PS' 9 1 , San Antonio, Texas, December 1994.
[5 11 Y. Hsu, G.Chen, nd E.N.Sanchg "A Fuzzy PD conroller for mdti-link robot
control: Stability Andysis", Proc. 1997 IEEE Inti. Conference in Robotics and
Automation, pp 1412-1417, Albuquerque, New Mexico, USA, April1997.
[52] RJ.Schiliing, "Fundamentais of Robotics: Analysis and Control", Engiewood
Cliffs. NNJ: Prentice-Hall, 1990.
1531 WeiGou Cheng, "The Guide to the Application of MATLAB 5.3", ISBN 7-115-
08268-5TPP l43Oyl999.
[54] Wei Gou Cheng, "Programming and Advanced Appiication of MATLAB 5.3",
ISBPlr 7-1 11-08012-2,2000.
[ S I H.Arai and S.Tachi, "Position control of a manipulator with passive joints using
dynamic coupling", IEEE Tram On Robotics and Automation, vol.?, pp 328-534,
1991.
[56] H.Arai, "Controilability of a 3-DOF manipulator with a passive joint under a
nouhoIonomic constraint", Proc. of the 2996 IEEE Int. Con$ on Roborics aad
Azrromation, pp 3707-2713, 1996.
[Sv G.Oxiolo and Y-Nakamura, "Control of Mechanicd Systems with Second-order
Nonholonomic Constraiuts: Under-actuated Manipuiators", Proc. of rhe Wh Cor$
on Decision and Connol, pp 23983403,1991.
[SS] K.Y.Wichlund, O.J.SordaIen, and OEgeland, "Control Properties of Under-
actuated VehicIes", Proc. of IEEE Int. Con$ on Robotics and Automafion, pp 2009-
2014,1994.
1593 N.S.Bedrossian, 'Wonlinear ConmI of an Under-actuated Two-link Manipulator",
P roc. of the 32"d Conjerence on Decision and Control, pp 734-338, I993.
Appendix A: Linearized equations
(A. 10)

Potrebbero piacerti anche