Professional Documents
Culture Documents
net/publication/258193659
CITATIONS READS
25 1,166
3 authors, including:
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Gustavo Andres Medrano-Cerda on 07 June 2018.
Paper published in: Transactions of the Institue of Measurement and Control, Vol.17,
No.3, 1995, 143-154
Abstract
The design of robust computer control systems for balancing and attitude control of double and triple
inverted pendulums is considered in this paper. For the double inverted pendulum, a DC motor mounted at the upper
hinge is used to balance and control attitude of the upper link. For the triple inverted pendulum a DC motor mounted
at the middle hinge is used to control the middle link, whereas proportional position control applied to a motor at the
upper hinge is utilized to maintain the upper link in alignment with the middle link. In both cases the lower hinge is
left free to rotate. The controller designs are based on linearized discrete-time models of the inverted pendulums.
Each controller utilizes state feedback implemented via reduced order state observers. The relative stability
properties of the control systems are evaluated using Nyquist plots of suitably defined functions. The controllers are
designed using Matlab and implemented in a PC using C language. Experimental results showed satisfactory
performance.
1. Introduction
Control problems involving different configurations of inverted pendulums have been considered by many
researchers. A comprehensive review is given in (Larcombe, 1992). Such mechanisms can provide a test bench for
evaluation and comparison of different control techniques, e.g. modern linear control (Furuta, et. al., 1984), non-
linear control (Mori, et.al., 1976),neural network control (Anderson, 1989) and fuzzy control (Yamakawa, 1989,
1993). Some inverted pendulum systems have also been used as laboratory experiments for graduate/advanced
undergraduate courses in control systems (Ozguner, 1989) (Mansour, et.al., 1989). Furthermore, studies of inverted
pendulums provide valuable insight towards designing and controlling a walking biped robot: balancing a double
inverted pendulum is analogous to swaying the body to maintain balance of a biped robot standing on two feet
2
(Hemami, et.al., 1979) (Golliday, et.al., 1976), whereas control of a triple inverted pendulum corresponds to a biped
robot standing on one foot (Mita, et. al., 1984). This paper considers the design of robust computer control systems
for double and triple inverted pendulums. Robust stabilization and attitude control of a double inverted pendulum is
considered first. In this case torque is applied to the upper pendulum hinge via a DC motor/gearbox, while the lower
hinge is left free to rotate. The control system includes integral action and optimal state feedback implemented via a
reduced order observer. The relative stability of the control system is investigated using the Nyquist plot of the loop
gain at the plant input. Stabilization of a triple inverted pendulum is developed along similar lines. Two DC
motor/gearboxes are used to provide torques to the upper and middle pendulum hinges while the lower hinge is free
to rotate. In this case we only consider attitude control of the middle link while the upper link is kept in alignment
with the middle one. This alignment is achieved by proportional position feedback applied to the upper motor. The
control system for the middle motor includes integral action and optimal state feedback realized via a reduced order
observer. The relative stability of the control system is evaluated using suitable Nyquist plots. In both cases the
design is based on linearized discrete-time models of the inverted pendulums. The effects of neglecting anti-aliasing
filter dynamics are also investigated. We point out that attitude control of upper and middle links of a triple inverted
pendulum has been previously studied in (Furuta, et.al., 1984). In their work (Furuta, et.al., 1984) a linearized
continuous-time model was used to design a control system. The controller also included integral action and optimal
state feedback implemented via a functional observer. The observer was then discretized and the continuous state
feedback gains were used in the computer contoller implementation. A brief assessment of relative stability was
presented with respect to the effects of computational delays. Their implementation did not consider the effects of
anti-aliasing filters. Furthermore, in Furuta's triple inverted pendulum, large horizontal bars were attached to each
link to "improve" a controllability measure of the linearized model (ratio of largest to smallest singular value of the
controllability matrix). Using alternative controllability measures (Eising, 1984), (Boyle, 1987),(Gahinet, et.al.,
1992),(Tarokh, 1992), some preliminary results reported in (Cetin, 1994) suggest that only a large horizontal bar on
the uppermost link may yield improvements in controllability. The analysis in (Cetin, 1994) is not exhaustive and
hence the inverted pendulum configurations considered in this paper do not include horizontal bars. A brief
description of the experimental apparatus and model characteristics are given in Section 2. Section 3 presents a
summary of results regarding robustness properties of observer based controllers which are relevant in our designs.
The controller designs are presented in Section 4, while Section 5 shows experimental results. Conclusions are
summarized in Section 6.
3
The triple inverted pendulum is depicted in Fig 1 and schematic diagrams for both double and triple
pendulums are shown in Figs 2 and 3 respectively. The pendulum links are made of 50 mm diameter plastic tube
which is relatively rigid, cheap, easy to cut and weighing 0.343 kg/m. At both ends of each link, aluminium
components (3 mm in thickness) are attached to provide the structures for mounting sensors and actuators. The
lower hinge consists of a steel shaft mounted on ball bearings. At one end of the shaft a potentiometer is mounted to
measure the angle of the lower link, while at the other end a small DC tacho is used to measure angular velocity. The
hinges for the middle and upper links are split in two independent (suitably aligned) sections. One section is a short
steel shaft mounted on ball bearings and attached to a potentiometer which measures the relative angle between
adjacent links. The second section is the output shaft of a DC motor/gearbox. Planetary gearboxes with a rated
continuous load capacity of 4.5 Nm were chosen. Backlash in the gearboxes (about 0.05 rad) can become a problem
if the bandwidth of the controller is excessive, but the mechanical design avoids the use of timing belts and is
flexible enough to allow changes in the lengths of the links as well as adding mass to each pendulum.
link 3
link 2
link 1
pot 1 Tachometer
a2 θ2 m2 ,I2
T1
l1 θ1 m1 ,I
a1 1
a3
θ3
m3 , I3
l2 T2
a2 θ2 m2 ,I2
T1
l1
a1 θ1 m1 ,I
1
The mathematical models for both the double and triple inverted pendulums are derived via Lagrange
equations along the same lines in (Furuta ,et. al., 1984). Details and parameter values are given in Appendix A. The
linearized continuous-time models, in terms of generalized relative coordinates are given by:
0 0 1 0 0
0 0 0 1 0
x d = x + u
31.4752 3.0426 − 0.4107 96.7383 d − 24.8992
− 13.6919 9.4947 0.3349 − 165.0421 42.4797
(1)
5
θ 1 1 0 0 0
y d = θ 2 − θ 1 = 0 1 0 0 x d = C d x d
θ1 0 0 1 0
[
where x d = θ 1 θ 2 − θ 1 θ1 θ2 − θ1 ]T
and u is the input voltage to the motor ( u ≤ 9V ).
0 0 0 1 0 0 0 0
0 0 0 0 1 0 0 0
0 0 0 0 0 1 0 0
x t = xt + u
38.0067 − 1.6968 − 5.0736 − 0.3192 77.3017 1.5023 − 19.8965 − 5.6332
− 8.6299 24.6554 − 0.7257 0.2676 − 189.3350 3.4703 48.7324 − 13.0128
− 31.3701 − 9.5320 28.4993 0.1756 117.1553 − 10.9311 − 30.1543 40.9889
(2)
θ 1 1 0 0 0 0 0
θ − θ 0 1 0 0 0 0
yt =
1
2
= xt = C t x t
θ 3 − θ 2 0 0 1 0 0 0
θ 1 0 0 0 1 0 0
[
where xt = θ 1
T
]
θ 2 − θ 1 θ 3 − θ 2 θ1 θ2 − θ1 θ3 − θ2 , u = [u1 u2 ] , u1 and u2 are the input voltages
T
The system eigenvalues are [− 191.8383 − 12.2094 − 4.5134 5.0691 2.7602 0.1463] .
The block diagram of the experimental apparatus is shown in Fig 4. The controller is to be implemented in
a 386 DX/20MHz PC with a 12 bit A/D converter and multi-channel multiplexer. Two 12 bit D/A converters are
used to provide the inputs to the system. The computer and system interface consists of amplifiers and first order
filters. These filters reduce aliasing effects introduced by sampling the systems outputs and smooth the control
The control systems are to be designed using discrete-time representations of (1), (2), with a sampling time
interval of 10 ms. The filters are neglected in the controller design, but their effects are taken into account when
6
assessing the relative stability properties of the overall system. For such analysis the filters' dynamics are appended
to the corresponding models and the resulting systems discretized with a 10 ms sampling time interval.
Inverted
Power
Amplifiers Pendulum
Output
Amplifiers
Filters
Filters
Input
D/A A/D
Computer
It is well known that state feedback controllers implemented via state observers can produce designs which
have disappointing properties in terms of relative stability even when the state feedback and state observers exhibit
good stability robustness characteristics (Anderson, et.al., 1989), (Doyle, et.al., 1979), (Maciejowski, 1989),
(O'Reilly, 1983). Loop transfer recovery techniques provide relatively simple methods which allow full or
asymptotic recovery of relative stability properties at either the plant input (state-feedback recovery), or at the plant
output (state estimator or dual recovery). Using full order state observers, a sufficient condition for recovering state
feedback robustness properties is given in (Doyle, et. al., 1979), (O'Reilly, 1983). Such a condition is in general
difficult to satisfy and only asymptotic recovery may be possible for minimum phase, square systems which are
stabilizable and observable. Extensions to non-square and non-minimum phase systems are also discussed in
(Anderson, et.al., 1989), (Maciejowski, 1989). In this section we consider using reduced order observers to fully
recover the state feedback stability robustness properties at the plant input. The analysis is presented for discrete-
time systems but it is also applicable to continuous-time plants since the problems are algebraically equivalent. Also
we point out that the controller realizations in (Furuta, et.al, 1984) were based on functional observers rather than
7
reduced order observers. However, the relative stability properties of state feedback controllers implemented via
functional observers can be investigated using the results presented in this section with some minor modifications.
x( n + 1 ) = Ax( n ) + Bu( n )
(3)
y( n ) = Cx( n )
where (A , B) is controllable and (C , A ) is observable. A reduced order observer for the system (3) is given by
where x̂( n ) denotes the estimate of the state x( n ) , E is asymptotically stable and E , H , K , L1, L2 satisfy
TA − ET = KC (5)
H = TB (6)
−1
C
[L 1 L2 ] = (7)
T
The matrix T is a design parameter for which the inverse in equation (7) exists. The block diagram of a state
feedback controller u( n ) = − Fx( n ) implemented via a reduced order observer is shown in Fig 5 below.
ur u -1 y
_ X C ( zI - A ) B
F H
+ + +
L2 -1
( zI - E ) K
+
L1
G( z ) = C( zI − A ) −1 B (8)
[
P( z ) = I + FL2 ( zI − E ) −1 H ] F [L ( zI − E )
−1
2
−1
K + L1 ] (9)
Lemma. The return difference matrix at the plant input (loop broken at X) is given by
[
I + P( z )G( z ) = I + FL 2 ( zI − E ) −1 H ] [I + F ( zI − A ) B]
−1 −1
(10)
In particular if H = 0 then
I + P( z )G( z ) = I + F ( zI − A ) −1 B (11)
[ ]
The term I + F ( zI − A ) −1 B respresents the return difference matrix of the full state feedback controller.The
above lemma indicates that if H can be set to zero then the observer based controller will exhibit the same relative
stability properties as full state feedback. This suggests that it is worthwhile designing the matrix F to achieve good
stability robustness properties. Clearly there are cases for which H cannot be set to zero, forexample single input-
single output unstable systems which can only be stabilized by unstable controllers (O'Reilly,1983) and since E is
stable (by design) this can only be achieved by non-zero H , i.e. some eigenvalues of ( E − HFL2 ) are required to
[ ]
be unstable. Even when H is not zero the above lemma indicates how I + F ( zI − A )−1 B may be degraded by the
inclusion of a reduced order observer in the feedback loop. For systems with more outputs than inputs preliminary
studies suggest that it is possible to achieve reduced order observers with H = 0 without violating the invertibility
condition (7). We conclude this section with an outline on how Matlab is used to obtain a set of observer designs.
For a given E matrix and H = 0 equations (5)-(6) are re-written using Kronecker tensor products (Wonham, 1979).
Sα = 0 (12)
where α is a column vector constructed by arranging sequentially the rows of T and K and taking the transpose,
i.e.
9
α = [t1 t 2 ] T
.... t p k1 k2 .... k p
T = t1[ T
t2
T
.... t p ] , K = [k
T T
1
T
k2
T
.... k p ]
T T
I ⊗ AT − E ⊗ I A − IE ⊗ CT
S= E
I E ⊗ BT 0
where I E and I A denote identity matrices of sizes consistent with E and A respectively. All matrices T and K
satisfying (12) can be determined from an orthonormal basis for the null space of S. Any solutions for which the
4. Controller Design
The discrete-time models for a sampling time Ts = 10 ms are represented by (neglecting filter dynamics)
x d ( n + 1 ) = Ad x d ( n ) + Bd u( n )
(13)
yd ( n ) = C d xd ( n )
xt ( n + 1 ) = At xt ( n ) + Bt u( n )
(14)
y t ( n ) = Ct xt ( n )
The matrices Ad , Bd , At and Bt are computed using Matlab and it is also easy to verify that the discrete-time
models are both controllable and observable. The attitude control problem is, in principle, a servo control problem
in which the relative angle θ 2 − θ 1 tracks a constant reference signal. For both, double and triple inverted
w( n + 1 ) = w( n ) + Ts ( y r ( n ) − y 2 ( n )) (15)
10
here w denotes the state of the integrator, yr represents the reference signal ( yr = 0 for balancing, yr non-zero
y 2 ( n ) = θ 2 ( n ) − θ 1 ( n ) = [0 1 0]y d ( n ) (16)
y 2 ( n ) = θ 2 ( n ) − θ 1 ( n ) = [0 1 0 0]y t ( n ) (17)
When the integrator equations are appended to the dynamics of the corresponding discrete-time models, the state of
In the case of the triple pendulum, it is theoretically possible to balance the mechanism using one actuator only
(Furuta, et.al., 1984). This is certainly a more challenging control problem which would require larger power
sources than those available in our current experimental setup. In order to reduce the possibility of actuator
saturation the upper motor can be used to stabilize one of the unstable eigenvalues of the triple inverted pendulum.
This can be achieved by proportional position feedback applied to the upper motor
u 2 ( n ) = −k p ( θ 3 ( n ) − θ 2 ( n )) = −k p C p y t ( n ) (18)
where C p = [0 0 1 0] . The feedback (18) effectively brings into alignment the middle and upper links and for
0.7 < k p < 72.2 , (18) yields a system with two unstable eigenvalues. A root locus diagram for 5 of the eigenvalues
of ( At − Bt2 k p C p Ct ) is shown in Fig 6 (here Bt2 denotes the second column of Bt ) . The eigenvalue around
0.1468 is not shown, but it moves slightly towards 0.1488 for k p = 10 and 0.1508 for k p = 20. In our design k p is
set to a value of 10. The resulting model for the triple inverted pendulum is controllable and observable and only
xt ( n + 1 ) = At1 x t ( n ) + Bt1 u1 ( n )
(19)
y t ( n ) = Ct xt ( n )
where At1 = At − Bt2 k p C p Ct , Bt1 denotes the first column of Bt and u1 represents the input voltage applied to the
middle motor.
Imag
0.3
0.2 x k p = 10
x
0.1
0 x x x
-0.1
x
-0.2 Unit circle
-0.3
0.92 0.94 0.96 0.98 1 1.02 1.04 1.06
Real
The robust state feedback stabilization problem for both pendulums consists in designing feedback
matrices Fd and Ft1
u( n ) = − Fd x d ( n ) (20)
u1 ( n ) = − Ft1 xt ( n ) (21)
such that the corresponding return difference matrices at the plant input exhibit good relative stability. Since the
models are single input systems the Nyquist plots of the loop gains Fd ( zI − Ad )−1 Bd and Ft1 ( zI − At1 )−1 Bt1 are
used to assess the relative stability of a particular state feedback controller. To design Fd and Ft1 the discrete-time
Linear Quadratic Regulator approach is used, i.e. minimize with respect to u the quadratic criterion
We point out that continuous-time optimal regulators have impressive stability robustness properties but, in general,
discrete-time optimal regulators do no exhibit similar properties (Anderson, et. al., 1989).
Fig 7 shows a typical Nyquist diagram and for closed-loop stability the critical point(-1,0) should be enclosed twice
in an anticlockwise direction.
Imag
Real
-1
For the double inverted pendulum we select Q = diag ( [0.1 100 0 0.01 1]) and R=3.
Fig 8 shows the Nyquist plot of Fd ( zI − Ad )−1 Bd in the neighbourhood of the critical point ( solid line). The
reduced-order observer dynamics are chosen as E = 0.9. Setting H = 0 and computing a basis for the null space of S
where the scalars β1 and β 2 are chosen to satisfy invertibility condition (7). For β1 = 1, β 2 = 0 equation (7) yields
1 0 0 0
0 1 0 0
[L1 L2 ] =
0 0 1 0
(27)
− 2.087 10.0694 − 1.5862 − 10.5067
and for β1 = 0 , β 2 = 1
1 0 0 0
0 1 0 0
[L1 L2 ] =
0 0 1 0
(28)
49.5934 10.0737 − 1.9128 50.8661
v( n + 1 ) E 0 v( n ) H K 0
w( n + 1 ) = 0 1 w( n ) + 0 u( n ) + 0 − T yd ( n ) + yr ( n )
s 0 Ts
(29)
x̂d ( n ) L2 0 v( n ) L1
w( n ) = 0 +
1 w( n ) 0
yd ( n )
x̂ ( n )
u( n ) = − Fd d (30)
w( n )
Defining
−1
L ( zI − E )−1 H L2 ( zI − E )−1 K + L1
P( z ) = I + Fd 2 Fd −1 (31)
0 0 − Ts ( z − 1 ) 0
and G( z ) = Cd ( zI − Ad )−1 Bd , simple calculations and application of lemma in section 3 reveal that for these
observers the loop gain at the plant input is identical to Fd ( zI − Ad )−1 Bd . To investigate the relative stability of the
14
closed loop system including the filters dynamics, the loop gain at the plant input is now given by P( z )G f ( z ) ,
where G f ( z ) is the transfer function matrix including the filters. Fig 8 shows the Nyquist plots for the observer
(24),(27) (dashed line) and for the observer (25),(28) (dotted line). The observer for β1 = 0 , β 2 = 1 exhibits a
higher cross-over frequency and is less tolerant to increases in gain. In our implementation the observer for
β1 = 1, β 2 = 0 was used.
Imag
1.5
state feedback & observers for nominal system
state feedback & observer1 for system with filters
state feedback & observer2 for system with filters
1
Unit circle
0.32 Hz
0.5
0.34 Hz
0
1.79 Hz
0.31 Hz
-0.5
1.38 Hz
1.53 Hz
-1
-2.5 -2 -1.5 -1 -0.5 0 0.5
Real
Fig 8 Nyquist plots of loop gains at the plant input for the double pendulum
For the triple inverted pendulum we select Q = diag ( [0.1 250 0 1 1 1 0.001]) and R = 1
Since the triple pendulum is in fact a system with two inputs, investigation of relative stability requires some
additional anaysis. Let G( z ) = [g1( z ) g 2 ( z )], g i ( z ) being the transfer function matrix from input i (i=1,2).
15
u 1r u1
X g 1( z )
-
u 2r u2 + +
p1 (z ) XX g 2 (z )
- y
p (z)
2
p1( z )
The controller can then be written accordingly as P( z ) = . The feedback system in Fig 9 gives the
p2 ( z )
following
p1 g 2 p2 g1
rd1 ( z ) = 1 + p1 g1 − (33)
1 + p2 g 2
p2 g1 p1 g 2
rd 2 ( z ) = 1 + p2 g 2 − (34)
1 + p1 g1
Rd ( z ) = I + P( z )G( z ) (35)
Ft1 −1
P( z ) = , G( z ) = ( zI − At ) Bt
k p C p Ct 0
16
The solid line curve in Fig 10 is the Nyquist plot of ( rd1 ( z ) − 1 ) and this plot corresponds to the loop gain
Ft1 ( zI − At1 )−1 Bt1 . In Fig 11 the solid line shows the loop gain at input 2 ( rd 2 ( z ) − 1 ) . For this plot two
anticlockwise encirclements of the point (-1,0) are needed for closed loop stability. The solid line in Fig 12
corresponds to the multivariable Nyquist diagram det( I + P( z )G( z )) . In this case the critical point is the origin
but now three anticlockwise encirclements are required for closed loop stability (Fig 13 shows a full Nyquist plot for
this case). In Fig 14 the solid line corresponds to the smallest singular value of I + P( z )G( z ) . Figs 10, 11 and 12
indicate a reasonable degree of relative stability for full state feedback. The plot in Fig 14 is not too promising,
however the measure using the smallest singular value could be too conservative i.e. there is a small unstructured
perturbation for which the closed loop system becomes unstable , but there is no guarantee that such perturbation
actually arises in the physical system ( a structured perturbation analysis should be considered (Maciejowski,
1989)).
Imag
1.5
without filters
1 with filters
Unit circle
0.5
0.46 Hz
0
1.65 Hz
0.44 Hz
-0.5
-1
1.91 Hz
-1.5
-3 -2.5 -2 -1.5 -1 -0.5 0
Real
Imag
2
without filters
1.5 with filters
1 Unit circle
0.5 1.18 Hz
2.47 Hz
2.56 Hz
-0.5
0.91 Hz
-1
-4 -3.5 -3 -2.5 -2 -1.5 -1 -0.5 0 0.5
Real
Imag
1.2
1 without filters
with filters
0.8
0.6
0.4
0.2 2.28 Hz
-0.2
1.87 Hz
-0.4
-2 -1.5 -1 -0.5 0 0.5
Real
Imag
Real
0
dB
10
5 without filters
with filters
0
-5
-10
-15
-20
-25
-30
10 -3 10 -2 10 -1 10 0 10 1 10 2
Hz
The reduced-order observer dynamics are chosen as E = diag ( [0.9 0.9]) . Setting H = 0 and computing a basis
for the null space of S yields four linearly independent solutions to equations (5)-(6). Linear combinations of
18
these solutions which do not satisfy the invertibility condition (7) are discarded. In the case of the double
pendulum, different values of β 1 and β 2 produced substantially different results when the filters dynamics were
included (see Fig. 8). For the triple pendulum and the chosen observer dynamics, the matrices L1 and
L2 ( zI − E )−1 K are invariant, hence the frequency response plots with the filters included are identical (these
observations are not valid for E = diag ( [α β ]) and α ≠ β ) . A chosen set of values for T and K are
(36)
− 0.0243 0.0581 0.0327 − 0.0106
K =
0.0600 0.0006 0.0005 0.0056
1 0 0 0 0 0
0 1 0 0 0 0
0 0 1 0 0 0
[L1 ]
L2 = (37)
0 0 0 1 0 0
− 1600 10.014 6.6684e −2 8.0643 − 42.775 2647.3
−1
2985.9 1.2353e 9.9343 − 17.907 52.496 − 4940.9
The overall controller (observer and integrator) again takes the form given in (29) but with yt ( n ) and x̂t ( n ) in
place of y d ( n ) and x̂d ( n ) respectively. The feedback in terms of the estimated state x̂t ( n ) is
Ft1 −1
Defining P( z ) as in (31) but in place of Fd and G( z ) = Ct ( zI − At ) Bt we conclude (from
k p C p Ct 0
the lemma in section 3) that the return difference matrix at the inputs is identical to that of the full state feedback
case.
To take into account the filters dynamics, let G f ( z ) denote the system's transfer function matrix including the
filters. Using (33),(34),(35) with the obvious substitutions, the corresponding results are shown in Figs 10, 11, 12
19
and 14 (dashed curves). Figs 10, 11 and 12 show that the closed loop system remains stable, but the relative stability
of the closed loop system has been considerably reduced (Figs 11, 12, 14). Figs 10 and 11 suggest that the
degradation in relative stability is mainly due to the proportional feedback gain in (18). This is not unexpected since
the selection of k p was based on the root locus diagram shown in Fig 6.
5. Experimental Results
The software was implemented in a 386 DX/20MHz personal computer in C language. The overall program
includes code to capture experimental data and store this information in the hard disk. The program is compiled to
optimize execution speed but not memory requirements. All calculations are carried out in floating point arithmetic
using a maths co-processor. For the double pendulum the execution time for steps 1 to 5 is approximately 0.42 ms
and for steps 1 to 6, 0.76 ms. For the triple pendulum the execution times increase slightly to 0.56 ms and 1.0 ms
respectively.
In all experiments the observers were initialized by setting v( 0 ) = Tx( 0 ) assuming zero angular
velocities. The integrator initial conditions were set to zero. The startup was carried out by manually holding the
Comparisons between simulations and the actual operation of the inverted pendulums showed substantial
discrepancies which may be attributed to backlash in the gearboxes (simulations did not include backlash). Despite
these discrepancies the controllers successfully managed to balance the pendulums and control the relative angle
θ 2 − θ1 within the range of ± 0.3rad .The experimental transient behaviour of the triple pendulum is shown in
Figs 15a to 15d for y r = 0 . Fig 15a clearly shows that despite small initial angles the performance rapidly degrades
and large oscillations appear in all the angles. The average oscillation amplitude of θ 3 − θ 2 settles quickly within
20
the range ± 0.05rad but the oscillation amplitudes of θ 1 and θ 2 − θ1 continue to increase during the first seven
seconds of operation. These oscillations are then slowly reduced and a typical steady state operation is shown in
Figs 16a to 16d 30 seconds after the start up. These experimental results indicate that the controller successfully
stabilizes the triple pendulum but the system's performance is greatly degraded due to backlash in the gearboxes.
Also, the transient duration is influenced by small constant offsets in the measurements yt . Since the controller
incorporates integral action, the effects of constant offsets in the sensor readings (except offsets in θ 2 − θ1 ) will be
asymptotically eliminated. The integral gain is essentially given by the product of Ts =0.01 (eq.(15)) and the
corresponding feedback gain 0.0285 (eq.(32)). These small values yield long transients in the rejection of constant
measurement disturbances. The obvious solution to this problem is to suitably increase the effective integrator gain.
Additional experiments were carried out introducing small torque disturbances by gently pushing each pendulum
link. The system performance was more sensitive to disturbance torques acting on the upper link. Introducing large
disturbance torques eventually saturates the actuators and the triple pendulum collapses. At present the magnitude of
admissible torque disturbances has not been quantified. The double inverted pendulum exhibits a similar behaviour
but usually steady state operation is achieved after 10 seconds of the start up ( y r = 0 ). The experimental results for
6. Conclusion
Robust computer control systems for double and triple inverted pendulums were successfully designed
using a blend of state space and frequency domain methods. The performance of the controllers was satisfactory
despite neglected filters dynamics and substantial non-linearities due to backlash in the gearboxes. For the double
pendulum, the control system exhibits a reasonable degree of relative stability despite the filters dynamics. For the
triple pendulum, the relative stability of the control system is considerably degraded by the filters. This degradation
is mainly due to the feedback loop for the upper motor. Future work involves designing an optimal state feedback
controller for both motors and implement attitude control of both θ 2 − θ 1 and θ 3 − θ 2 . The use of reduced order-
observers to recover state feedback robustness at the plant inputs played an important role in the controller designs.
Further work is needed regarding the selection of observer dynamics and to explore the use of this methodology in
terms of disturbance/noise transmission properties in the closed loop system. Based on the results of this research,
current work involves the design and control of a walking biped robot.
21
0.2
0
0
θ3 - θ2
-0.1
-0.2
-0.2 θ2 - θ1 -0.4
-0.3 -0.6
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
Time in secs Time in secs
a b
Voltage applied to lower motor in volts Voltage applied to upper motor in volts
6 0.8
4 0.6
0.4
2
0.2
0
0
-2
-0.2
-4 -0.4
-6 -0.6
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
Time in secs Time in secs
c d
0.4
0.1
θ1 0.2
0.05
0
0
-0.2
-0.05
θ3− θ2 -0.4
-0.1
-0.6
-0.15
θ2− θ1 -0.8
-0.2 -1
30 31 32 33 34 35 36 37 30 31 32 33 34 35 36 37
Time in secs Time in secs
a b
8 Voltage applied to lower motor in volts 0.6 Voltage applied to upper motor in volts
0.4
6
0.2
4
0
2 -0.2
0 -0.4
-0.6
-2
-0.8
-4 -1
-6 -1.2
30 31 32 33 34 35 36 37 30 31 32 33 34 35 36 37
Time in secs Time in secs
c d
θ1
0.05
-0.05
-0.1
θ2 − θ1
-0.15
10 11 12 13 14 15 16 17 18
Time in secs
a
Measured velocity of lower link in rad/s
0.4
0.3
0.2
0.1
-0.1
-0.2
-0.3
-0.4
10 11 12 13 14 15 16 17 18
Time in secs
b
Control action applied to the motor in volts
3
-1
-2
-3
10 11 12 13 14 15 16 17 18
Time in secs
c
References
Anderson, B.D.O. and Moore, J.B., 1989, Optimal Control: Linear Quadratic Methods, Prentice-Hall, chapters 5
&8
Anderson, C.W., 1989, 'Learning to Control an Inverted Pendulum using Neural Networks', IEEE Control Systems
Magazine, 9, pp.31-37.
Boyle, D., 1987, 'Computing rank-deficiency of rectangular Matrix Pencils', Systems & Control Letters, 9, pp. 207-
214.
24
Cetin, M., 1994, Attitude Control of a Triple Inverted Pendulum, MSc. dissertation, Dept. Electronic &Electrical
Eng., University of Salford, U.K.
Doyle, J.C. and Stein, G., 1979, 'Robustness with Observers', IEEE Trans. on Automatic Control, AC-24, pp.607-
611.
Eising, R., 1984, 'Between Controllable and Uncontrollable', Systems & Control Letters, 4, pp. 263-264.
Furuta K., Ochiai T. and Ono N., 1984, 'Attitude Control of a Triple Inverted Pendulum', Int. J. Control, 39,
pp.1351-1365.
Gahinet, P. and Laub, A.J., 1992, 'Algebraic Riccati Equations and the distance to the nearest uncontrollable pair',
SIAM J. Control and Optimization, 30, pp. 765-786.
Golliday, C.L. and Hemami, H., 1976, 'Postural Stability of the two Degree of Freedom Biped by General Linear
Feedback', IEEE Trans. on Automatic Control, AC-21, pp.74-79.
Hemami, H. and Wyman, B.F., 1979, 'Modeling and Control of Constrained Dynamic Systems with Application to
Biped Locomotion in the Frontal Plane', IEEE Trans. on Automatic Control, AC-24, pp. 526-535.
Larcombe, P.J., 1992, 'On the Control of a two-dimensional multi-link inverted pendulum: The form of the
Dynamic Equations from choice of Co-ordinate System', Int. J. Systems Science, 23, pp.2265-2289.
Maciejowski, J.M., 1989, Multivariable Feedback Design, Addison-Wesley, chapters 3 & 5
Mansour, M. and Schaufelberger, W., 1989, 'Software and Laboratory Experiments using Computers in Control
Education', IEEE Control Systems Magazine, 9, pp.19-24.
Mita, T., Yamaguchi, T., Kashiwase, T. and Kawase, T., 1984, 'Realization of a High Speed Biped using
Modern Control Theory', Int. J. Control, 40, pp. 107-119.
Mori, S., Nishihara, H. and Furuta, K., 1976, 'Control of an Unstable Mechanism: Control of Pendulum', Int. J.
Control, 23, pp. 673-692.
O'Reilly, J., 1983, Observers for Linear Systems, Academic Press, chapter 8
Ozguner, U.,1989, 'Three-Course Control Laboratory Sequence', IEEE Control Systems Magazine, 9, pp.14-18.
Tarokh, M., 1992, 'Measures for Controllability , Observability and Fixed modes', IEEE Trans. on Automatic
Control, AC-37, pp. 1268-1273.
Wonham, W.M., 1979, Linear Multivariable Control: A Geometric Approach, Second Edition, Application of
Mathematics 10, Springer-Verlag, chapter 0.
Yamakawa, T., 1989, 'Stabilization of an Inverted Pendulum by a High-Speed Fuzzy Logic Controller Hardware
System', Fuzzy Sets and Systems, 32, pp. 161-180.
Yamakawa, T., 1993, 'A Fuzzy Inference Engine in Non-linear Analog Mode and its Application to a Fuzzy Logic
Control', IEEE Trans. on Neural Networks, 4, pp. 496-522.
Appendix A
Using the approach in (Furuta et. al., 1984), the following relation for the double inverted pendulum is derived
~ θ ~ θ ~ θ ~ 0
M 1 + N 1 + P 1 + Hu1 = (i)
θ 2
θ 2 θ 2 0
25
where
~ ~ ~
~ j +I l1M 2 − I p1 ~ C1 + C2 + c p1 − C2 − c p1 ~ M 1g 0 ~ G1
M = ~1 p1 ~ N= P = − ~ H =
l1 M 2 − I p1 j2 + I p1 − C2 − c p1 C2 + c p1 0 M2g − G1
~ ~
M 1 = m1a1 + m2l1 , M 2 = m2 a2
~ ~
j1 = I1 + m1a12 + m2 l12 , j2 = I 2 + m2 a22
[
The state equation in terms of the relative angle xd = θ 1 θ 2 − θ1
T
]
θ1 θ2 − θ1 is given by
02 I2 0 21
x d = ~ −1 ~ −1 ~ −1 ~ −1 xd + ~ −1 ~ u (ii)
− WM P W − WM NW − WM H
1 0
where W =
− 1 1
The triple inverted pendulum model derivation follows in a similar manner. The state equation in terms of
[
the relative angle xt = θ1 θ 2 − θ1 ]
θ 3 − θ 2 θ1 θ2 − θ1 θ3 − θ2 is given by
03 I3 032
xt = xt + u (iii)
A21 A22 B2
~ ~ ~ ~ ~ ~
A21 = −WM −1 P W −1 , A22 = −WM −1 NW −1 , and B2 = −WM −1 H
where
J +I l1 M 2 − I l1M 3
1 0 0 1 p1 p1
~
W = − 1 1 0, M = l1M 2 − I J2 + I +I l2 M 3 − I
p1 p1 p2 p2
0 − 1 1 l1M 3 l2 M 3 − I J3 + I
p2 p2
26
M1 g 0 0 G1 0
~ ~
P = − 0 M2g 0 , H = − G1 G2
0 0 M 3 g 0 − G2
C + C + c − C2 − c 0
1 2
p1 p1
~
N = − C2 − c C2 + C3 + c + c − C3 − c
p1 p1 p2 p2
0 − C3 − c C3 + c
p2 p2
Symbol Description
Table 1 Nomenclature
ai , I i Determined analytically
Ci Arms are swung freely , from the periods and the damping factor of their responses, the parameters are
determined
I pi ,c pi ,Gi Calculated from values given in technical data of the motor/gearboxes
27
Motor 1 Motor 2
c p1 (Nms) = 7.73 c p2 (Nms) = 1.9367e −1
I p1 (kgm 2 ) = 3.58e −2 I p2 (kgm 2 ) = 3e −3
G1 (Nm/V)= 2.00 G2 (Nm/V) = 8.6308e −1
k1 = 236 : 1 k 2 = 68 : 1
Link 1 Link 2
l1 (m) = 0.174
m1 (kg) = 0.7867 m2 (kg) = 0.5074
I1 (kgm 2 ) = 4.3e −3 I 2 (kgm 2 )= 3.05e −2
a1 (m) = 0.1291 a2 (m)= 0.217
−2
C1 (Nms)= 2.69e C2 (Nms) = 4.04e −2
Double Triple
θ1 21.92 Hz 33.86 Hz
θ 2 - θ1 21.92 Hz 33.86 Hz
θ3 - θ 2 ------- 33.86 Hz
θ 21.92 Hz 33.86 Hz
1
u1 6.05 Hz 10.26 Hz
u2 ------- 10.26 Hz
Table 5 Input and output filters cut-off frequencies for double and triple pendulums
e − k denotes x 10− k
28
Appendix B
Breaking the loop at X in Fig 5, the transfer function martix from y to u r is given by
[ ]
u r (z ) = − F L2 (zI − (E − HFL2 )) (K − HFL1 ) + L1 y (z )
−1
[ { (
= − F L2 (zI − E ) I + (zI − E ) HFL2)} (K − HFL ) + L ]y(z )
−1 −1
1 1
hence with P (z ) as defined in (9) we have u r (z ) = − P (z )y (z ) and the return difference at the plant input is given
by I + P (z )G (z ) , with G (z ) given by (8). To establish (10) we notice that equation (5) is equivalent to