You are on page 1of 6

Proceedings of the 2001 IEEE International

Conference on Control Applications


September 5-7,2001 Mexico City, Mexico

Friction Compensation for a Double Inverted


Pendulum
Lei Fang", Wei Ji Chen and Sek Un Cheang
*ECE Dept., U. of Conn. FST, U. of Macau
Stons, CT 06269-2157 P.O. Box 3001, Macau
lei-fang @usa.net fstwjc @umac.mo, fst .joe @umac.mo

Abstract-The inverted pendulum system exhibits non- drawbacks such as controller saturation [4, 91. With the
negligible nonlinearities due to its dynamic structure and progressive understanding of friction phenomena, it is
friction forces, which cause large l i t cycles. The limit cycles possible to accurately predict and compensate for friction
are well predicted by the nonlinear simulation model with by using friction models [4]. Good friction models are also
Coulomb and viscous friction. To compensate the cart-on-rail useful to analyze stability, predict limit cycles and perform
friction, a friction compensator based on modified first-order
simulations,etc.
Dahl model is implemented. The experiment results show that
the amplitudes of the limit cycles are substantially reduced by This paper reports the results of an experimental study,
friction compensation. In particular, the friction compensator conducted on a double inverted pendulum, to evaluate the
works quite well without accurate velocity signals. The study performances of the model-based friction compensation
will thus be of value to a variety of system for compensating
friction without extra velocity sensors.
technique. With two under-actuated links, the double
inverted pendulum is more suitable than conventional servo
Zndex Terms-Inverted pendulum, linear quadratic regulator systems to study the effects of active friction compensation
design, friction model, friction compensation.
methods because of the strong coupling effects between
I. INTRODUCTION force control and the system stabilization. The main
element of the controller is a state feedback control
Friction is a common phenomenon in mechanical
designed using linear-quadratic regulator (LQR) theory.
systems. The inverted pendulum is such an unstable,
The friction compensator is based on the modified first-
multivariable system that exhibits non-negligible non-
order Dahl model [lo]. Experimental results show that both
linearities due to its dynamic structure and friction forces
good steady-state and dynamic performances are obtained
[l, 21. Friction is responsible for the inability of the system
and the controller with friction compensator outperforms
to achieve low values of steady-state errors and may limit
more traditional linear controllers. Conclusions are given at
the closed-loop bandwidth to avoid limit cycling. In
last.
particular, it is shown that viscous in the joints of a
quadruple inverted pendulum-cart system may destroy the 11. SYSTEM DESCRIPTION
controllability of the linearized state-space model [3]. As schematically shown in Fig.1, the double inverted
Therefore, friction is an important characteristic of the pendulum system consists of a cart moving along a short
inverted pendulum system and should be considered early rail (0.75 m), a drive mechanism (DC motor, power
at the system design stage to reduce it as much as possible. amplifier and pulley-belt transmission) and two links.
Strong engineering needs in a wide range of industries from Potentiometers are fixed to the hinges and the pulley to
disc drives to cars drive the studies of friction. measure the angle of lower link, the relative angle of upper
While compensating for friction is important for many link and the cart position.
mechanical systems, such as robot manipulators, it is not an
MicroComputer
easy task because of highly non-linear characteristics of
friction. There are several ways to compensate for friction.
Classical dither signals were introduced to reduce the
amplitude of the limit cycles caused by Coulomb friction
and stiction [4]. Van der Linden and Lambrechts [5]
designed an H , controller to reduce the effects of
Coulomb friction between the cart and rail. Ostertag et al.
[6] proposed a fuzzy friction compensator to compensate, to
some extent, both the Coulomb and viscous components of
the friction. When the friction was treated as one kind of \ \I II I I

disturbances to the system, a functional disturbance


observer [7] and a robust reduced-order observer [8] were "-. . I

developed to attenuate the effects of these disturbances.


Without explicitly modelling friction, however, the Pot1 Belt
observer-based compensation techniques have some
Fig. 1. Double inverted pendulum system

0-7803-6733-2/01/$10.000 2001 IEEE 908


The potentiometers are connected to an 80486 PC via
an data acquisition board, which includes 12-bit bipolar
A/D and D/A converters (+lOV). The A/D conversion time
is 35ps for each signal. The control signal is generated
through the D/A converter, which has a settling time lps
including zero order hold. The actuator is an AIRPAX@
linear servomotor driven by the servo power amplifier The eigenvalues of the system are
(OPA541). Under normal circumstances, the motor with
amplifier has a linear behavior, with a high bandwidth (well &A) = [-12.0167 -7.3948 -4.0437 0
above the eigenfrequencies of the mechanical part). The ... 4.7482 11.23641
control program is written in C language and the
appropriate sampling rate is set by using the internal When the system is sampled at a sampling interval of T
programmable timer 8253 in the computer. and zero-order holds are used on the inputs and outputs
during each sampling period, (2) has a discrete
111. PRELIMINARY
CONTROLLER
DESIGN representation given by
A. System Modeling x(k + 1) = m ( k ) + r u ( k )
The mathematical model for the double inverted (3)
Y(k) =W k)
pendulum is constructed using the Lagrange method under
assumptions similar to those of Eltohamy et al. [ l 13. The The system (a,r> is controllable and discrete-time linear-
friction between the cart and rail and between the links is quadratic regulator (LQR)theory can be used to design the
modeled as a combination of Coulomb friction and viscous state feedback regulator u ( k ) = - K x ( k ) , by minimizing the
frictions. The nonlinear model, including the motor drive quadratic cost function
unit, is given by (motor inductance is neglected)
m

J ( u ) = C[x*(k>Qx(k)+ Ru2(k)]
k=O

where R is a positive scalar and Q is chosen to be a


where diagonal matrix with positive entries. Q and R must be
chosen with caution based on extensive simulation and

I 1
M +nil +ni2 (m,ll + m , L , ) c o s ( ~ , ) m21, cos(8,) experiments so as to ensure system stability. LQR has
F(q)= (mill +ni2L,)cos(6',) I, + m , l : +m2G m21,L, cos(@,-0,)
many desirable properties. Among them are good stability
m,l, cos@,) m,l,L, cOs(e, -e,) I, +& margins and sensitivity properties. Asymptotic stability of
- rri212 sin(8, H2

1
-(will, + m2L, )sin(@,@,

i
c, LQR can still be maintained when some delay of the form
G(q,q)= 0 CI +c2 -m,12L, sin(0, -el)i2-c2 e-Jwris inserted in the loop or when there are certain sector
0 m212L,sin(8, - 0, 9l- c2 c2 type time-varying nonlinearities inserted at the input of the
plant [12]. These good properties make LQR controller

I
0 K,u - Sgn(4/*,Nr
H ( q ) = - g ( m l l , +m,L,)sin(O,)
-gm,12 sin@,) ] L(q,u)=
[ 1,
-sgn 0, &NI
- sgn(e!l N ]
,)p2
very effective in stabilizing the double inverted pendulum.

as
In steady state, a constant gain vector K is determined
The nomenclature and parameter values are given in the
Appendix. The system parameters are determined by direct
measurements or derived from experimental data. The
Coulomb and viscous friction coefficients are estimated by
K = ( r T p r+ R ) - l r T P Q
(4)
P=~TP~+Q-~.Tpr(rrpr+R)-lrTp~
}
constant velocity experiments repeated at several torque
levels and by experiments of small natural oscillations of The final state feedback has been chosen as a compromise
links [2,5]. between small steady-state errors, smooth and fast
responses to tracking inputs and disturbances, and the
B. Controller Design

1;
realizability of physical system. The actual values are
To find a stabilizing controller for the pendulum, the
Q=diag[25 100 1000 0 110 0
equations of motion ( I ) are linearized about the vertical
position. Since the Coulomb frictional terms are not R=0.1
linearizable, they are neglected during this step. K =[9.43 - 368.10 497.21 13.82 (5)
Afterwards, they are added and utilized in the model to ... -5.99 57.961,
examine the closed-loop system behaviors. The linearized
model is represented in state space form as follows T = 8ms

909
0 2 4 6 8 10 0 2 4 6 8 10
0.oq I 0.1 I

-0.ok I -0.i I
--0.07 2 4 6 8 10
I =i
0.oq
2 4 6 8 10
I

s-
-0.ot I
0 2 4 6 8 10
I

I -1 d I
0 2 4 6 8 10 0 2 4 6 8 10
Time [SI Time Is]
(a) (b)
Fig. 2. Closed-loop system behavior with Coulomb and viscous friction: (a) Simulation. (b) Experimental results.

C. Effects of Friction To estimate the velocities with small time delay, the
cart velocity and two link angular velocities are constructed
If the state feedback K in (5) is applied to the nonlinear
by a direct difference approximation of position signals. As
simulation model (1) with Coulomb and viscous friction,
a consequence of not using an observer, the sampling rate
the closed-loop system with initial states can be adjusted more freely. Before computing velocities,
~ ' ( 0=[0.15
) 0 0 0 0 01 all the position signals are smoothed by prefilters. The
small computation time of a direct difference
will have an oscillatory response as shown in Fig. 2(a). approximation also provides a fast response to unknown
Here small neighborhoods of zero velocity are introduced in disturbances or measurements errors and thus better
the simulation to avoid slow numerical integration problem regulation of the desired outputs.
while maintaining accurate results [ 131. Fig. 2(b) shows the COMPENSATION
IV. FRICTION
experimental results when the same state feedback control
law is applied to the actual pendulum. Velocity signals are As shown in the previous section, failure to account for
reconstructed for feedback since only position the effects of friction can lead to steady-state errors and/or
measurements are available. Comparing Fig. 2(a) with Fig. oscillations. Control strategies that intend to compensate
2(b), we can find that the nonlinear simulation model with for the effects of friction without resorting to high gain
Coulomb and viscous friction predicts limit cycles as have control loops, require a suitable friction model, in order to
been experimentally observed, only with minor differences predict and to compensate for it. These types of schemes
due to unmodeled uncertainties and dynamics. Both are therefore named model-based friction compensation
simulation and experimental results indicate that the techniques. Particularly, in this study a term intended to
nonlinear friction is an important aspect of the double cancel the friction force between the cart and the rail will be
inverted pendulum and has a significant effect on system included in the control law U = -Kx ,i.e.,
dynamics.
u=-Kx+F (6)
D.Estimation of Velocity Signals
Kalman filter (LQG technique) seems to be a good where k is the estimated friction force. If the estimate is
choice to estimate the inaccessible states from noise- accurate, the feedback control will all but cancel the actual
corrupted measurements. The major problem with the LQG friction. Because the friction of the cart on its rail is
solution was lack of robustness. Reduced-order observer dominant, friction forces between link joints are not
can also be used to reconstruct the cart velocity and two considered in (6).
link angular velocities. Although reduced-order observer For simplicity, fiction is often modeled as constant
has its own advantages in the real time control, no observer times the sign of velocity, which basically represents the
will be used in the implementation of the controller. Coulomb friction model. The simulation results shown in
Because of the oscillatory behavior of the physical inverted Fig. 2(a) are obtained based on a combination of Coulomb
pendulum system in the presence of friction, the estimation and viscous frictions. The Coulomb friction model has
errors between the actual states and the estimated states of often been used for friction compensation.
an observer will be large due to the finite convergence of
reduced-order observer.

910
Due to the fact that friction does not have an
instantaneous response on a change of velocity, state
variable models are better adapted to describe and hence to
compensate for friction. They better reflect the fact that
friction is a continuous function of time. Therefore, the
second friction model considered is a modified version of
the Dah1 model [lo]. The static relation between friction
force and relative velocity is chosen as to include Coulomb
friction, viscous friction and a Stribeck effect. The time
constant in the dynamics is proportional to 1/1 i-1 (where i
is the cart velocity). This model is described by the
following set of equations, where z should be understood as
an “internal” friction state, and F, describes the friction
force,
Ei = - 1 i 1 z + $(i)
Ff =z+a,r (7)

with >(a, + qe-[‘’’o)’ 1


f(i= (8)
where E is a “time constant”, iodescribes the “rate” of the Fig. 3. The double inverted pendulum.
Stribeck effect and (q,a], are positive constants. They
can be interpreted as: ai, = Coulomb friction level, (q+ a]) E in (9) is a time constant in inverse proportion to the

= Break-away friction force and q = viscous friction. The stiffness coefficient. High machine stiffness can be
friction parameters (q,q , q)can be determined off-line obtained because the length of the belt almost does not
change during the experiment. vo is the characteristic
VI. velocity of the Stribeck friction, which approximately
The modified first-order Dah1 model captures most ranges from 0.00001 m/s up to 0.1 m / s [4]. It is important
phenomena that are of interest for feedback control. The not to over-compensate the friction, since this may lead to
most important thing in connection with control design is instability. The friction compensator used in the
that this model enjoys dissipativity, which can be explicitly experiments is tuned with the following parameters: q =
exploited during the control design of double inverted 1.5, CY] = 1.5, E = 0.001, vo = 0.04. q is selected as sixty
pendulum system leading to an explicit determination of the per cent of its experiment value to avoid over-
compensator that renders the feedback loop stable. compensation. On the other hand, a1 is set to be greater
V. EXPERIMENTAL
RESULTS than the corresponding experiment value considering the
low velocity resolution. Parameters E and vo are determined
The double inverted pendulum is shown in Fig. 3. Fig. by trail and error.
2(b) shows results of an experiment without friction Fig. 4 shows the cart velocity and the friction estimated
compensation. A limit cycle caused by the friction is by the friction compensator with a sample period T = 8 ms.
clearly visible. In this section, the friction between the cart The experimental data are recorded by using HP digital
and rail will be compensated using a model-based friction oscilloscope 54603B. Coulomb friction and Stribeck effect
compensation technique, while the viscous friction between are clearly shown in Fig. 4. When the cart has zero velocity
links can be linearized and taken into account in LQR crossings, the stiction is strongest and will deteriorate
design. system performance if not compensated. The friction
The friction compensator is based on the modified first- compensator predicts the stiction effectively, although no
order Dah1 (MD) model described in Section IV. For fast accurate cart velocity signal is available. Experiment
sampling, (7) and (8) can be rewritten in the discrete time results of stabilizing the double inverted pendulum with
domain as friction compensation are illustrated in Fig. 5. The close-
i(k + l ) = ( l - -Tl v ( k ) J ) i ( k ) +1~ v ( k ) f ( v ( k ) )
E 1 loop system remains stable after friction compensation.
Moreover, a factor of two improvement is obtained in
maximum steady-state errors. At the same time, the control
energy has four times reduction, which is sometime
meaningful to the practical control systems. We want to
point out that it is hard to further improve the system
performance with the control energy currently consumed
where k(k) is the friction estimated by compensator at because of the limitations on the hardware system, such as
time instant t = kT and T, the sample period of digital low sensor resolution, the friction at the pin connections of
control system. the links, and system noise.

911
Sample Period T = 8 m s
1

-0.4 2 4 6 8
I
10
0.51
I
B o
E
-0.4 l

-0.21 I
J 0 2 4 6 8 10
0 2 4 6 8 10 12 -7 I
Time [SI
Fig. 4. Cart Velocity and Estimated Friction

without friction compensation with friction compensation


2 4 6 8 10
Time [SI
Fig. 6 System response to maximum tolerable upper link
disturbance without friction compensation.

-0.l " " I ' " ' I


0 1 2 3 4 5 6 7 8 9 10
-'I ' ' ' ' : ' ' ' I

2 4 6 8 10

-0.40 "
1 2
"
3 4
I
5
'
6
"
7 8
'
9
I
10

0 1 2 3 4 5 6 7 8 9 10
20, I I I I ! I I I . I
E o
A
-

-0.21 I
2 4 6 8 10
20

-2
0 1 2 3 4 5 6 7 8 9
I
10
Time [SI
Fig. 5. Regulation experiment with friction compensation -. 0
based on the MD model with sample period T = 8ms. 2 4 6 8 10
Time [SI
Fig. 7. System response to maximum tolerable upper link
disturbance with friction compensation based on the MD model.
Fig. 7 shows the system's ability to tolerate the
disturbances with friction compensation. Compared with
Fig. 6, it can be found that system dynamic performance is
not deteriorated. During the transient process, numerical VI. DISCUSSIONS
AND CONCLUSIONS

problems may arise when trying to compute internal state of Inverted pendulums are well suited to investigate
the compensator (9). Indeed, it can be observed that the friction phenomena and friction compensation because the
control program will occur overflow error when the cart effects of friction are so clearly noticeable. Although dither
velocity is "high" (v > 15~~).For greater velocities it is can be used to improve the regulation performance of the
advisable to stop the computation of ?(k)and to use its single inverted pendulum, it has serious inherent
steady state value: is,( k ) = a,sign(v(k - 1)) . The digital disadvantages. A friction compensator based on modified
first-order Dah1 model is implemented. The design is based
controller can switch between different states of
on passivity and system stability is ensured only using
compensator according the estimated cart velocity without
position measurements. The controller is non-smooth, but
delay. With careful tuning of the parameters of
the stabilization does not rely on the generation of sliding
compensator it is possible to obtain even better results as
regimes. After friction compensation, we have a factor of
shown in Figs. 5 and 7. In this case the limit cycle is
two reduction in maximum steady-state errors and maintain
reduced to the sensor resolution. In practice, adaptive
friction compensation can also be used [ 14,15, 161. good stability margins and sensitivity properties of LQR.

912
*_[
Oper-loop system matrices
03x3 13x3
0 -1.9784 0.1323 -7.4732 0.0048 -0.0018
0 71.0024 -27.3516 28.0102 -0.2304 0.1244
0 -95.5541 85.3554 -6.5444 0.4367 -0.2940
B = (0 0 0 3.3503 -12.5573 2.9339)T

REFERENCES
C.l<20.0cm digital [I] P.J. Larcombe, “On the control of a two-dimensional multi-link
NIA encoder inverted pendulum: the form of the dynamic equations from choice of
9.83x105 No Ieilc 10.00, c4.00 sensors co-ordinate system,” Int. J. Syst. Sri., vol. 23, pp. 2265-2289, 1992.

I
6 7 . 6 8 ~ 1 0 ~Friction
11
. c 1.2cm
p,l<1.30, < 0.80
pll=19.0”
= 9.50
with
friction
rnmn
I (21 L. Fang, “Control of a double inverted pendulum with nonlinear
friction,” Master Thesis, FST, U. of Macau, Macao, July 1999.
[3] P.J. Larcombe, “Towards the theoretical controllability of a friction
damped multi-link inverted pendulum: the quadruple link system, N-
Table 1. Brief comparison with other experimental studies. 1: Furuta et link inferences,” in Proc. 4th IEEE lnt. ConJ Contr., Coventry, UK,
al. 1978 [17], 2 Feng et al. 1987 [18], 3: Steinmetz 1987 [19], 4 Liang et 1994, pp. 81-84.
al. 1987 [20], 5 : Eltohamy et al. 1997 [21], 6: Fang 1999 [2]. [4] B. Armstrong-Helouvry, P. Dupont, and C. Canudas de Wit, “A
survey of models, analysis tools and compensation methods for the
control of machines with friction,” Automatica, vol. 30, no. 7, pp. 1083-
Our experimental results with those from other 1138, 1994.
experimental studies using linear quadratic regulators are [5] G.-W. Van der Linden and P. F. Lambrechts, “ H , control of an
compared in Table 1, where R, is the controllability matrix experimental inverted pendulum with dry friction,’’ IEEE Contr. Sysr.
and is the angle between low link and upper link. It Magazine, vol. 13, pp. 44-50, 1993.
shows that the designed controller with friction [6] E. Ostertag and M.J. Carvalho-Ostertag, “Fuzzy control of an
inverted pendulum with fuzzy compensation of friction forces,” Int. J.
compensator has desirable property of good stability Sysr. Sri., vol. 24, no. 10, 1915-1921, 1993.
margins and outperforms more traditional linear controllers. [7] E. Ostertag, N. Bakri, and N. Becker, “Functional disturbance
In particular, the friction compensator works quite well observer for simultaneous control and dry friction compensation,” 1st
without accurate velocity signals. The study will be of IFAC Symp. on Adv. Info. Processing in Automat. Contr., AIPAC’89,
Nancy, France, 1989.
value to a variety of systems for compensating friction [SI G.A. Medrano-Cerda, “Robust stabilization of a triple inverted
without extra velocity sensors. pendulum-cart,” Int. J. Contr., vol. 68, no. 4, pp. 849-865, 1997.
[9] Y.P. Yang and J.S. Chu, “Adaptive velocity control of DC motors
As comparison, the nonlinear observer approach for with Coulomb friction identification,” ASME J. Dynamic Syst., Measur.
friction compensation developed in [15] was also tested. and Contr., vol. 115, pp. 95-102, 1993.
Although better steady-state errors can be obtained, the [IO] C. Canudas de Wit, H. Olsson, K.J. AstriJm and P. Lischinsky,
“Dynamic friction models and control design,” Proc. of rhe 1993
observer has a small stability margin and was sensitive to American Contr. ConJ. San Francisco, California, pp. 1920-1926, 1993.
disturbances because only where the dry friction force acts [ 1 I] K.G. Eltohamy and C.-Y. Kuo, “Nonlinear generalized equations of
on the plant was emphasized. The knowledge of the motion for multi-link inverted pendulum systems,” Inr. J. Sysr. Sci.,
feedback nature of dry friction is lost. In this case, rather vo1.30, no. 5 , pp. 505-513, 1999.
[I21 B.D.O. Anderson and J.B. Moore, Oprimal Control: Linear
than design the controller and friction compensator Quadratic Methods, Prentice-Hall, 1989.
separately, it is suggested to augment (1) or (2) with [13] D. Kamopp, ‘Computer simulation of stick-slip friction in
additional observer states to design a stabilizing controller. mechanical dynamic systems,” ASME J. Dynamic Syst., Measur. and
Contr., vol. 107, no. 1, pp. 100-103, 1985.
[I41 B. Friedland and Y.-J.Park, “On adaptive friction compensation,”
APPENDJX: NOMENCLATURE AND PARAMETER VALUES IEEE Tans. Automat. Contr.. vol. 37, no. 10, 1992.
[15] J. Amin, B. Friedland, and A. Hamoy, “Implementation of a friction
M equivalent mass of the cart system 2.44 Kg estimation and compensation technique,” IEEE Contr. Syst. Magazine,
mI mass of the lower link 1 0.308 Kg vol. 17, pp. 71-76, 1997.
m2 mass of the upper link 2 0.253 Kg [I61 C. Canudas de Wit and P. Lischinsky, “Adaptive friction
1, distance from the lower hinge compensation with partially known dynamic friction model,” Int. J. of
Adapt. Control and Signal Process., vol. 11, no. I, pp. 65-80, 1997.
to the c.g. of the link 1 0.181 m [ 171 K. Furuta, T. Okutani and H. Sone, “Computer control of a double
Z2 distance from the lower hinge inverted pendulum,” Conip. & Electr. Engg., 5 , 67-84, 1978.
to the c.g. of the link 2 0.153m [18] 2.-R. Feng, 2.-Q. Yin and H.-T. Chen, Microprocessor-based
L1 total length of the link 1 0.317m controller for double inverted pendulum, Pror. the 10th IFAC Triennial
World Cong., Munich, 237-240. 1987
11 mass moment of inertia of the link 1 0.0036 Kg.m2 [I91 T. M. Steinmetz, “As the jointed double inverted pendulum swings:
12 mass moment of inertia of the link 2 0.0024 Kg.m2 optimal control of this naturally unstable system,” Master Thesis, Dept.
c, equivalent viscous friction coefficient 19.0 N d m of EE, Michigan Technological University, 1989.
[20] R.-Q. Liang, S. Zhao, Y. Tang and Y.-S. Zhao, “Digital controller
c1 viscous friction coefficient of the link 1 0.002 N.ms design for a double inverted pendulum,” Contr. Theory and App., vol
c2 viscous friction coefficient of the link 2 0.001 N.ms .4, no. 1 , 115.124, 1987 (in Chinese).
U. Coulomb friction coefficient between the cart and the [21] K. G. Eltohamy and C. Y. Kuo, “Real-time stabilization of a triple
link inverted pendulum using single control input,” IEE Proc. Contr.
track Theory App., vol. 144, no. 5,498-504, 1997.
p, Coulomb friction coefficient of the ithlink

913

You might also like