Professional Documents
Culture Documents
DOI 10.1007/s00521-011-0686-3
ORIGINAL ARTICLE
Iraj Hassanzadeh
Received: 10 February 2011 / Accepted: 25 June 2011 / Published online: 14 July 2011
Ó Springer-Verlag London Limited 2011
Abstract Double inverted pendulum on a cart (DIPC) is a Keywords Double inverted pendulum Friction
highly nonlinear system. Due to its complex dynamics, it is compensation Locally linear neuro-fuzzy model
widely used as a test-bed plant for the verification of newly LOLIMOT Inverse modeling
designed controllers. In DIPC, two pendulums are kept
upward by linear movements of cart. Because of this linear Abbreviations
motions and frequent switching of velocity directions, DIPC Double inverted pendulum
another nonlinearity caused by friction becomes dominant LLNF Locally linear neuro-fuzzy
around the equilibrium point. Friction introduces limit LOLIMOT Locally linear model tree
cycles to the system and results in a poor steady-state MLP Multilayer perceptron
response. To eliminate these negative effects, the locally
linear neuro-fuzzy (LLNF) approach is used to build an
inverse model for friction compensation. This model is
compared with multilayer perceptron network in order to
demonstrate the better performance of LLNF. To stabilize 1 Introduction
DIPC, a common optimal controller is used, and despite its
limited performance, experimental results show that the Double inverted pendulum on a cart (DIPC) is a compli-
application of inverse modeling for friction compensation cated nonlinear system. In DIPC, the pendulums are kept in
improves the steady-state response outstandingly. Up–Up position by applying input force to the cart. The
cart slides on a rail, and its velocity is controlled by input
force. Due to this linear motion, friction becomes an
important challenge. As was investigated in [1], friction
introduces limit cycles and large steady-state tracking
A. Nejadfard (&) M. J. Yazdanpanah
errors in the system response. During stabilization of DIPC,
School of Electrical and Computer Engineering,
University of Tehran, North Kargar St., Tehran, Iran the cart has slow motion and it changes its direction fre-
e-mail: a.nejadfard@ece.ut.ac.ir quently; therefore, the stick-slip friction nonlinearity
M. J. Yazdanpanah becomes dominant.
e-mail: yazdan@ut.ac.ir Several techniques have been studied by researchers for
friction compensation. Friction was modeled in [2] as main
A. Nejadfard M. J. Yazdanpanah
plant parameters, and a nonlinear observer was used to
Control and Intelligent Processing Center of Excellence,
University of Tehran, P.O. Box 14395/515, estimate the friction. Other methods used in [3] and [4]
North Kargar St., Tehran, Iran focused on the exact modeling of friction. Most of these
methods rely on static and dynamic mathematical models
I. Hassanzadeh
and often require the force sensor to measure friction.
IEEE, Advanced Robotics Laboratory, ECE Department,
University of Tabriz, Tabriz, Iran Besides, they lead to the complicated design, which also
e-mail: izadeh@tabrizu.ac.ir makes it hard for real-time applications and hardware
123
338 Neural Comput & Applic (2013) 22:337–347
implementation. Data-driven models are also common for motor’s current sensor becomes necessary for motor torque
friction estimation as in [5] where fuzzy clustering was control. An inverse mapping could be incorporated into the
applied for constructing a fuzzy rule based upon gathered controller to map the calculated force into motor’ input
data from a DC motor and then the parameters were fine- voltage, so that in addition to the compensation of the
tuned by the genetic algorithm. Adding the adaptive tech- nonlinear effects of motor and friction, the desired force is
niques as in [6–8] to these model-free approaches makes it applied to DIPC without any need for current sensors.
a powerful friction estimation strategy. Nevertheless, most In this paper, LLNF network is used for inverse mod-
of the researches have focused on improving the perfor- eling of the motor and friction dynamics. The model is
mance of systems with simple dynamics like DC motor or compared with multilayer perceptron (MLP) network in
1 DOF linear mass system; Where the friction compensa- order to demonstrate the better performance of LLNF. The
tion could be encoded in the main elementary controllers training procedure is offline and also functional link is used
(such as PI) rather than developing an extra controller instead of augmenting jump functions. The inverse mod-
block to compensate for friction. In implementation of the eling can partially compensate for the friction effects. Its
DIPC system, the friction nonlinearity and DC motor design and implementation are straightforward as well. To
dynamics have to be considered in the controller design, verify the proposed method, the practical experiment is
while it is difficult to integrate these dynamics into DIPC’s carried out and the results prove the effectiveness of this
complex equations in order to derive one general approach.
controller.
Neural networks (NNs) have a powerful ability for
nonlinear modeling. In fact, due to their universal 2 DIPC model and controller
approximation property [9], NNs may approximate any
smooth nonlinear functions. And by augmenting the jump 2.1 DIPC model
functions, NNs can also approximate the piecewise con-
tinuous functions [10]. This property of NNs makes it a DIPC system is depicted schematically in Fig. 1. It is an
very useful tool for modeling any friction dynamics with- under-actuated system, and its dynamics are similar to a
out the exact knowledge of its nature. two-link robot arm. Its equations of motions are derived
Locally linear neuro-fuzzy (LLNF) models are a new using Lagrange equations. The procedure of developing a
extension of radial basis function (RBF) neural networks, mathematical model has been well treated in [17], [18]. Not
recently used for identification of nonlinear systems [11– taking into account the motor and friction dynamics, the
13] and also demonstrated as a great tool for estimation model of an ideal DIPC is given by:
purposes [14], [15]. For training LLNF network, locally
DðhÞ€h þ Fðh; hÞ
_ h_ þ GðhÞ ¼ H u; h ¼ ð h0 h1 h2 Þ:
linear model tree (LOLIMOT) algorithm [16] was applied.
LLNF model is based on divide-and-conquer strategy. It ð1Þ
partitions the input space into fuzzy locally linear models where
(LLMs) with RBF validity functions, and by means of 0 1
LOLIMOT algorithm, the parameters of both RBF and d1 d2 cos h1 d3 cos h2
LLMs are trained. Because of its locally linear modeling DðhÞ ¼ @ d2 cos h1 d4 d5 cosðh1 h2 Þ A;
scheme, this technique could perform efficiently for the d3 cos h2 d5 cosðh1 h2 Þ d6
systems that comprise linear subsystems and local nonlin- 0 1
earities like the friction-motor subsystem used in this 0 d2 sinðh1 Þh_ 1 d3 sinðh2 Þh_ 2
_ ¼ @0
Fðh; hÞ 0 d5 sinðh1 h2 Þh_ 2 A;
paper.
0 d5 sinðh1 h2 Þh_ 1 0
Here, the idea that both friction and motor dynamics are
coupled with each other is used; hence, in order to reach a 0 1
0
better identification result, these two dynamics should be GðhÞ ¼ @ f1 sin h1 A;
considered together. This concept could simplify the con- f2 sin h2
troller design. First, a typical controller, here LQR con-
troller, is designed. Subsequently, the inverse model of
motor-friction dynamics is used for implementing the H ¼ ð1 0 0 ÞT :
controlling signal. The main DIPC controller calculates the
input force, yet this force must be applied by means of a The nomenclature and parameter values are given in the
DC motor, which has the friction as an extra load; hence, a ‘‘Appendix’’.
second controller is needed to adjust motor’s output torque It was shown in [19] that D(h) is nonsingular and
via its input voltage. Consequently, the employment of symmetric. For designing a linear controller, this nonlinear
123
Neural Comput & Applic (2013) 22:337–347 339
123
340 Neural Comput & Applic (2013) 22:337–347
Model G-1
Quantizer
123
Neural Comput & Applic (2013) 22:337–347 341
0 1
f ð:Þ 0 0 4.2 Locally linear neuro-fuzzy with model tree
B .. C learning
B 0 f ð:Þ . C
B C
C½: ¼ B C:
B .. .. C This approach is based on partitioning the input space into
@ . . 0 A
fuzzy subspaces with Gaussian membership or validity
0 0 f ð:Þ
functions, and for each input subspace, a locally linear
The activation function f (.) is chosen to be the sigmoid model (LLM) is assigned. The resulting model forms a
function as neuro-fuzzy network with one hidden layer. To perform
Sugeno fuzzy model reasoning, one output neuron calcu-
2 lates the weighted sum of the LLM neurons
f ðnetÞ ¼ 1; ð10Þ
1 þ expðknetÞ
y^i ¼ xi0 þ xi1 u1 þ xi2 u2 þ þ xip up ;
and k is an arbitrary coefficient and more often takes the X
M ð17Þ
value 1. The net value for a neuron is defined as the sum of y^ ¼ y^i /i ðuÞ:
all weighted inputs to that neuron. i¼1
The error back-propagation technique is used to train the
The LLM network is depicted in Fig. 5, where u ¼
MLP network. In this method, the error function for the T
designed NN, expressed for each pattern, is u1 ; . . .; up is the model input, M is the number of LLM
neurons, xij denotes the LLM parameters of the ith neuron,
1
Ep ¼ ðdp op Þ; ð11Þ and p is the size of input vector. For proper modeling, it is
2 necessary that the Gaussian validity functions be
where d is the target desired value for training and in this normalized.
experiment is the voltage of motor, and O may converge to l ð uÞ
d after training is finished. /i ðuÞ ¼ PM i ; ð18Þ
j¼1 lj ðuÞ
Starting with small random initial values for weight
matrices, the algorithm uses the gradient decent method to 2 ! !
1 ðu1 ci1 Þ2 up cip
adjust the weights in order to minimize the error function. li ðuÞ ¼ exp þ þ :
2 r2i1 r2ip
The procedure of developing the weight adjustment rules
were fully treated in [20]. ð19Þ
The update rules for weight matrices are
There are two sets of learning parameters: the rule
w0kj ¼ wkj þ Dwkj for k ¼ 1 and j ¼ 1; 2; . . .; 5 consequent parameters of the LLMs (xij s) and the rule
premise parameters of validity functions (cij s and rij s).
v0ji ¼ vji þ Dvji for j ¼ 1; 2; . . .; 5 and i ¼ 1; 2; 3; 4: Since the learning algorithm searches for locally linear
The equation for calculation of the weight increments are models, supposing that the cij s and rij s are known, the least
given by square technique is a reasonable choice for tuning the
LLMs parameters. The global parameter vector contains
1 M ðP þ 1Þ element:
dpo ¼ ðdp Op Þð1 Op Þ2 ; ð12Þ
2
1
dpy ¼ wTj dpo 1 y2j ; ð13Þ
2
DW p ¼ gdpo Y pT ; ð14Þ
DV p ¼ gdpy Z pT : ð15Þ
123
342 Neural Comput & Applic (2013) 22:337–347
123
Neural Comput & Applic (2013) 22:337–347 343
measuring the cart velocity, the frequency was swept from Table 1 Training parameters
0.3 to 10 Hz in 60 s. During this process, the pendulums Number of hidden layer neurons, J 5
were locked not to move, so that they did not introduce any Steepness factor, K 1
forces to the cart. Due to the linear motion of the cart, Fo is
Momentum constant, A 0.3
proportional to €h0 ; hence, the Fo can be calculated by the Momentum window size, N 10
derivation of cart velocity. This approach is straightforward Number of training epocs, M 1,000
and no force sensor is needed. The data samples are rep- Number of patterns for training, P 10,000
resented in Fig. 7. Final MSE error, EMSE 2.783 9 10-3
As it is clear in Fig. 7, when the velocity direction
changes a distinguishable spike occurs in acceleration
signal. This distortion is obviously due to stick-slip friction
effect, and the objective is to lessen its bad influence on the
system’s output response. The half of the collected data is
separated as a training set and the rest is taken as a test data
based on the collected time. In training procedure, the
training data are introduced to the system in a random
order, and this procedure continues till the test error stops
decreasing. This stop condition guarantees the generaliza-
tion of the trained network.
The training parameters for MLP network are listed in
Table 1.
The resulted trained weights are:
0 1
0:5497 2:5065 1:7979 0:0351
B 1:7358 1:7467 0:6905 0:2822 C
B C
V¼B B 1:0622 5:4189 3:0583 0:2533 C;
C
@ 0:6087 2:8325 0:9862 0:2531 A
0:0010 0:0009 0:0003 0:0005
W ¼ ð 0:8840 0:5420 0:4430 0:3760 0:0041 Þ
The trained NN’s output for two different set of test data
are depicted in Fig. 8.
For training the LLNF network, the input and output
pattern vectors are defined as
T
u ¼ U h_ 0 Sgnðh_ 0 Þ ;
y ¼ voltage;
123
344 Neural Comput & Applic (2013) 22:337–347
6 Experimental results
123
Neural Comput & Applic (2013) 22:337–347 345
7 Conclusions
Fig. 12 Steady-state response of experimental DIPC system with and One of the important challenges of controlling an experi-
without friction compensation. a Cart displacement, b first pendulum mental system is friction. Due to unique structure of double
deviation, and c second pendulum deviation through time
inverted pendulum on a cart, friction and other unmodeled
dynamics impose negative effects on the system behavior,
performance. This technique handles both motor dynamics which cannot be ignored. To solve this problem, unlike
and friction and belt nonlinearities and yields an out- other approaches, we consider the friction and motor
standing performance despite its intrinsic simplicity. The dynamics as a coupled subsystem, and the MLP and LLNF
experimental results for stabilization of DIPC are illus- networks are used for inverse modeling of these dynamics.
trated in Fig. 12. It is clear that both MLP and LLNF The practical experiment proves the efficiency of this
pseudo-inverse models improve the steady-state response. approach. Since the proposed approach is not model based,
For LLNF model, the first and second pendulum deviations it is applicable for compensation of any kind of DC motor
as shown in Fig. 12b and c are approximately ±18 and and friction dynamics in industry, especially in the case of
±0.68, respectively, compared with ±28 and ±1.58 for DC motors for which no precise model is available. One of
MLP network. The LLNF model is fairly better than MLP the advantages of this technique is that it does not need any
in reducing limit cycles magnitudes hence better modeling trial-and-error parameter adjustments. Also, for training
of friction. Indeed, LQR controller has poor regularization
of cart’s position, which could be easily observed in
Fig. 12a, and requires an extra PI controller to suppress this Table 2 Comparison between friction compensation approaches
problem. Yet, LLNF also remedied this problematic issue MLP LLNF No friction
significantly by reducing the cart’s deviation to 2 cm and compensation
eliminating the need for extra PI controller where MLP MSE for test data (910-3) 2.783 2.67 –
obviously failed. Therefore, the system response is more No. model par. 19 50 –
robust to the unmodeled dynamics and disturbances. Max. cart deviations (m) ±0.04 ±0.02 ±0.045
Motor and friction dynamics have linear characteristics
1st pend. dev. (deg) ±2 ±1 ±5
and so do their inverse model. This fact could explain why
2nd pend. dev. (deg) ±1.5 ±0.6 ±3
LLNF model is advantageous to MLP. In training, it is
Cost value (J) (9106) 6.74 4.93 9.49
important to have a network that could possibly model the
123
346 Neural Comput & Applic (2013) 22:337–347
data, only position sensors are required, and because the References
training procedure is offline, the other training signals can
be determined by prefiltering and derivation. This is also 1. Olsson H, Åström KJ (2001) Friction generated limit cycles.
IEEE Trans Control Syst Technol 9(4):629–636. doi:10.1109/
another reason that this approach is convenient for indus- 87.930974
trial applications. This approach could be developed by 2. Park D, Chwa D, HongWadsworth S (2006) An estimation and
using recurrent LOLIMOT algorithm to extent it into an compensation of the friction in an inverted pendulum. In: SICE-
adaptive approach. However, in that case, data gathering ICASE international joint conference, October, Bexco, Busan,
Korea. doi:10.1109/SICE.2006.315273
techniques have to be extended, and experimental issues 3. Armstrong B (1988) Friction: experimental determination, mod-
should be regarded. eling and compensation. In: Proceedings of the IEEE interna-
tional conference on robotics and automation, Philadelphia, PA
4. Rizos DD, Fassois SD (2009) Friction identification based upon
the LuGre and Maxwell slip models. IEEE Trans Control Syst
8 Appendix Technol 17(1):153–160
5. Teeter JT, Chow Mo-yuen, Brickley JJ Jr (1996) A novel fuzzy
8.1 Nomenclature and parameter values friction compensation approach to improve the performance of a Dc
motor control system. IEEE Trans Ind Electron 43(1):113–120
6. Huang SN, Tan KK, Lee TH (2000) Adaptive friction compen-
See Table 3. sation using neural network approximations. IEEE Trans Syst
Man Cybern C Appl Rev 30(4):551–557
8.2 Parameters of DIPC mathematical model 7. Wang Y, Wang D, Chai T (2011) Extraction and adaptation of
fuzzy rules for friction modeling and control compensation. IEEE
Trans Fuzzy Syst (99):1. doi:10.1109/TFUZZ.2011.2134104
X
d1 ¼ mi 8. Canudas de Wit C, Noël P, Aubin A, Brogliato B (1991) Adap-
tive friction compensation in robot manipulators: low velocities.
d2 ¼ m1 l1 þ m2 L2 Int J Robot Res 10(3):189–199
9. Hornik K, Stinchcommbe M, White H (1989) Multilayer feed
d3 ¼ m2 l2 forward networks are universal approximators. Neural Netw
2:359–366
d4 ¼ m1 l21 þ m2 L21 þ I1 10. Selmic RR, Lewis FL (2002) Neural-network approximation of
piecewise continuous functions: application to friction compen-
d5 ¼ m2 L1 l2 sation. IEEE Trans Neural Netw 13(3):745–751. doi:10.1109/
TNN.2002.1000141
d6 ¼ m2 l22 þ I2 11. Makaremi I, Fatehi A, Araabi NN, Azizi M, Cheloeian A (2009)
Abnormal condition detection in a cement rotary kiln with system
f1 ¼ ðm1 l1 þ m2 L1 Þg identification methods. J Process Control 19(9):1538–1545. doi:
f2 ¼ m 2 l2 g 10.1016/j.jprocont.2009.07.013
12. Hafner M, Schuler M, Nelles O, Isermann R (2000) Fast neural
networks for diesel engine control design. Control Eng Pract
8(11):1211–1221. doi:10.1016/S0967-0661(00)00057-5
13. Halfmann C, Nelles O, Holzmann H (1999) Modeling and
Table 3 Nomenclature and parameter values identification of the vehicle suspension characteristics using local
m0 Equivalent mass of the cart system 0.71 kg linear model trees. In: Proceedings of the IEEE international
conference on control application and IEEE international sym-
m1 Mass of first pendulum 0.35 kg posium on computer aided control system design, Kohala Coast,
m2 Mass of second pendulum 0.2 kg HI, August
l1 Distance from a pivot joint to the first pendulum 0.277 m 14. Koushki AR, Maraloo MN, Lucas C, Kalhor A (2009) Applica-
center of the mass tion of neuro-fuzzy models in short term electricity load forecast.
Int CSI Comput Conf, article number 5349434, pp 41–46
l2 Distance from a pivot joint to the second 0.176 m
15. Jalili-kharaajoo M, Ranji R, Bagherzadeh H (2003) Predictive
pendulum center of the mass
control of a fossil power plant based on locally linear model tree
L1 Total length of first pendulum 0.4 m (LOLIMOT). In: Proceedings of the IEEE conference on control
L2 Total length of second pendulum 0.35 m application, Istanbul, June, vol 1, pp 633–638
I1 Moment of inertia of first pendulum 0.0145 kg m2 16. Nelles O (2001) Nonlinear system identification. Springer, Berlin
17. Bogdanov A (2004) Optimal control of a double inverted pen-
I2 Moment of inertia of second pendulum 0.007 kg m2 dulum on cart technical report, CSE-04-006
h0 Wheeled cart position N/A 18. Fang L, Chen WJ, Cheang SU (2001) Friction compensation for a
h1 First pendulum angle N/A double inverted pendulum. In: Proceedings of the IEEE interna-
tional conference on control application, Mexico City, Septem-
h2 Second pendulum angle N/A
ber, pp 908–913
u Control force N/A 19. Zhong W, Rock H (2001) Energy and passivity based control of
g Gravity constant N/A the double inverted pendulum on a cart. In: Proceedings of the
T Sample time 0.0002 s IEEE international conference on control application, Mexico
City, September, pp 896–901
123
Neural Comput & Applic (2013) 22:337–347 347
20. Zurada JM (1992) Introduction to artificial neural systems. West 22. Murray-Smith R, Johansen TA (1995) Local learning in local
Publishing Company, St. Paul, pp 175–235 model networks. In: Proceedings of the international conference
21. Johansen TA, Foss BA (1995) Identification of non-linear system on artificial neural networks, Cambridge, UK, June
structure and parameters using regime decomposition. Automat-
ica 31(2):321–326
123