You are on page 1of 11

Neural Comput & Applic (2013) 22:337–347

DOI 10.1007/s00521-011-0686-3

ORIGINAL ARTICLE

Friction compensation of double inverted pendulum


on a cart using locally linear neuro-fuzzy model
Atabak Nejadfard • M. J. Yazdanpanah •

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

2.2 Controller design

For implementation considerations, the model (3) is dis-


cretized at the sample interval of T, and zero-order hold is
used for both input and output of system. The discrete
representation is
Xðk þ 1Þ ¼ Ad XðkÞ þ Bd uðkÞ;
ð4Þ
YðkÞ ¼ CXðkÞ:

The system (Ad, Bd) is controllable, and by applying the


linear quadratic regulator (LQR) theory, an optimal
controller is designed for the system. In LQR theory, a
feedback gain is computed to minimize the cost function
X1  
Fig. 1 Double inverted pendulum on a cart JðuÞ ¼ X T ðkÞQXðkÞ þ Ru2 ðkÞ ; ð5Þ
k¼0
model should be linearized [17] around x = 0 in which x is
where Q is symmetric positive definite matrix, and R is a
a state matrix defined as
  positive scalar. In steady-state condition, the solution P of
x ¼ h0 h1 h2 h_ 0 h_ 1 h_ 2 : ð2Þ the Riccati equation
 1
The linear model is P ¼ ATd PAd þ Q  ATd PBd BTd PBd þ R BTd PAd ; ð6Þ
(
x_ ¼ Ax þ Bu is used to calculate the feedback gain
ð3Þ
y ¼ Cx  1
K ¼ BTd PBd þ R BTd PAd : ð7Þ
By substituting the parameters, the matrices A, B, and C
in the experimental system become Q and R should be chosen to satisfy both the small steady-
0 1 state error and fast response by trial and error. It is
0 0 0 1 0 0 important to notice that this controller is not necessarily the
B0 0 0 0 1 0C
B C best controller for the DIPC system; it is just used to
B0 0 0 0 0 1C
A¼B B C; demonstrate the efficiency of the proposed friction com-
C
B 0 4:9797 0:0488 48:0187 0 0 C pensation technique.
@ 0 41:6587 6:2002 114:7470 0 0 A
0 31:1682 32:9157 5:6551 0 0
B ¼ ð 0 0 0 1:2005 2:8687 0:1414 ÞT ; 3 Friction compensation outline
0 1
1 0 0 0 0 0
A realization of the practical DIPC system is depicted in
C ¼ @ 0 1 0 0 0 0 A:
Fig. 2. As it is shown, the classical controller computes the
0 0 1 0 0 0
net force U as an input to the system. However, U must be
As is clear, the ideal model of the DIPC is used without provided by a DC motor; Moreover, the output torque of
considering the friction and motor dynamics. The next motor goes through a nonlinear friction block, and at last,
design stage is to derive an inverse model of motor and the distorted force signal Fo reaches DIPC. The first
friction dynamics to compensate for the lack of perfect problem arises where the motor apply desired force U. To
model of the entire plant. Indeed, using the ideal model, we control the output torque of the motor, one should apply
could generally use the typical control design approaches voltage to the motor as an input signal. Therefore, there
to stabilize the DIPC, and by using the inverse model of the should be another missing controller, which generates the
friction and motor subsystem, the controlling signal could voltage signal to make motor torque output track the
be implemented on the real plant. In this way, the identi- desired force. The other problem is to consider the friction
fication of whole system could be bypassed, and it is effect. Friction acts as a load, and it works like a resisting
possible to combine a priori knowledge of mathematical torque over motor. Hence, the so-called controller may also
model with the information derived from the identification estimate the friction force, so that it can deliver the net
approach to design better and complete controller. force to the ideal DIPC system.

123
340 Neural Comput & Applic (2013) 22:337–347

Fig. 2 Practical DIPC closed


loop system

Fig. 3 NN compensator for


practical DIPC θ0
U Fo θ1
θ0 θ2

Model G-1

Quantizer

As it is discussed above, the practical implementation


imposes model G to the system (see Fig. 2). This model’s
inputs and outputs are voltage V and Fo, respectively. We wish
to design a controller to eliminate the effect of G. It is assumed
that Fo is a function of velocity and the external force Fi,
regardless of any friction model. By inspecting the motor
dynamics, it is clear that its output torque is a function of its
voltage and rotation speed. Considering these facts, it is clear
that Fo is a function of cart velocity h_ 0 and motor voltage V. All
other variables can be calculated by these two states.
The MLP and LLNF networks are trained as a second Fig. 4 The designed neural network
controller to act as an inverse model of G. This new
structure is depicted in Fig. 3. The model G-1 is not an
W ¼ ð w11 w12    w15 Þ:
exact inverse of G, but it works as its pseudo-inverse.
These networks calculate the proper voltage to apply the The input vector z and the output vector O is defined as
desired force U to DIPC.  T
Z p ¼ U p h_ p0 signðh_ p0 Þ 1 ;
Op ¼ voltage
4 Data-driven models
where superscript p is the pattern index. The neural
4.1 Multilayer perceptron network network does the nonlinear mapping z ! o; it consists of
mapping within a mapping, or
The multilayer feed-forward neural network is depicted in O ¼ C½W C½V Z : ð8Þ
Fig. 4. The weight matrices for first and second layers are
represented, respectively where the internal mapping is
0 1
v11 v12 v13 v14 Y ¼ C½V z: ð9Þ
B v21 v22 v23 v24 C
B C In which Y and O are the output of the first and second
V ¼ B .. .. .. .. C;
@ . . . . A layers, respectively, and the nonlinear diagonal operator
v51 v52 v53 v54 C½: is

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Þ

To speed up the training process, a momentum window is


used. The modified updating rule becomes
X
N
DwðtÞ ¼ g an rEðt  nÞ: ð16Þ
n¼0

The number of hidden layer neurons is determined by


trial and error in order to make a trade-off between small
training error and fewer numbers of parameters and also to
avoid the over-fitting of the network. Fig. 5 Structure of LLNF model

123
342 Neural Comput & Applic (2013) 22:337–347

 T separated into two halves with an axis orthogonal split.


x ¼ x10    x1p x20    x2p    xM0    xMp ð20Þ
Divisions with respect to all dimensions are checked,
and the associated regression matrix X for N training and for each of the p divisions, the following steps are
patterns is carried out:
X ¼ ½X 1 X 2    X M ; ð21Þ a. Construction of the multi-dimensional validity
2 3 functions for both generated hypercubes.
/i ðuð1ÞÞ u1 ð1Þ/i ðuð1ÞÞ    up ð1Þ/i ðuð1ÞÞ
6 /i ðuð2ÞÞ 7 b. Local estimation of the rule consequent parame-
6 7 ters for both newly generated neurons.
Xi ¼ 6 .. .. .. 7;
4 . . . 5 c. Calculation of the total performance index for the
/i ðuðNÞÞ  up ðNÞ/i ðuðNÞÞ current overall model.
ð22Þ
4. Validate the best division: Step 3 gives the best axis
therefore, among all p input dimension axes. If the overall
performance index is reduced, the associated validity
y^ ¼ X x;
^ ð23Þ functions and neurons will be updated, the number of
 1 neurons is incremented M = M ? 1 and the algorithm
x^ ¼ X T X X T y: ð24Þ
continues from step 2; otherwise, the learning algo-
For training the rule premise parameters, a tree-based rithm is terminated.
learning algorithm is developed. In each iteration, the one
The first four iteration of LOLIMOT training algorithm
locally linear neuron with the worst performance is
is demonstrated in Fig. 6 for two-dimensional input space
subdivided. In p dimensional input space, for all possible
(P = 2).
orthoaxial sets of subdivisions, the performance index is
In comparison with other training techniques such as
calculated and the one with best performance is selected.
[21], the LOLIMOT algorithm has the advantages of fast
Hence, the LLM neuron becomes divided into two equal
training time and the interpretability of the network
halves on the selected input dimension. Based on such a
structure and parameters in physical sense. Nevertheless,
division, the centers cij and standard deviations rij of the
the number of training parameters is more than other neural
two new neurons are computed and the fuzzy validity
networks, although it is shown in [22] that the optimization
functions are updated. The centers of new validity
is more robust against overfitting by introducing a regu-
functions are the centers of the new hypercubes. The
larization effect.
standard deviation determines the support area for
Gaussian validity functions. Each division of input space
is assigned as support area for the corresponding validity
5 Training results
function as well. Therefore, the standard deviations for two
subdivided neurons are calculated such that the validity
value on the border of the subdivided area becomes 0.7. The inputs to NN and LLNF model are U and h_ 0 . We add
The algorithm is as follows [14], [16]: Sign(h_ 0 ) as another input or functional link. This additional
input helps NN to model the friction easier and also it
1. The initial model: Initially, train a single LLM neuron, eliminates the need for jump functions. The output of NN
which gives a globally optimal least-squares linear is the normalized motor voltage (V). To collect training
model of the system over its entire input space with data, a sinusoidal voltage was applied to the motor. While
/1 ðuÞ ¼ 1, and M = 1.
2. Find the worst neuron: Compute a local performance
index for each of M neurons, and find the worst
performing neuron. In this experiment, the cost
function is normalized mean square error, which is
defined as
Pn
ðy  y^Þ2
NMSE ¼ Pi¼1 n
: ð25Þ
i¼1 ðy  yÞ2
where y, y^, and y are observed data, predicted data, and
average of observed data, respectively.
3. Check all divisions: Consider the worst neuron to be
divided. The validation hypercube of this neuron is Fig. 6 First four iteration of LOLIMOT training algorithm

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;

Fig. 8 a Evaluation results of MLP for 2,000 test pattern samples.


b Evaluation results of MLP for 5,000 test pattern samples

thus p = 3. By means of LOLIMOT algorithm, both the


number of neurons and the parameters of LLMs are trained.
The training and test data sets and the stop condition are
the same as in the MLP training procedure.
The learning procedure of LLNF is depicted in Fig. 9. It
is clear that the evaluation error stops decreasing for more
than five neurons; therefore, the best choice for network
size is M = 5. The learning results of estimation of motor
voltage with LLNF network for the same test data of Fig. 8
Fig. 7 The collected training data samples are illustrated in Fig. 10.

123
344 Neural Comput & Applic (2013) 22:337–347

time. However, in the present application, the overall size


of both the networks is small, so we are not concerned with
computational time.

6 Experimental results

The DIPC system installation is shown in Fig. 11. In this


experiment, Q and R for LQR controller is determined to
be
Q ¼ Diagð 10 20 20 50 700 700 Þ;
Fig. 9 Mean square error in training procedure of LLNF network R ¼ 1:
The resulted feedback gain is
The LLNF network has more parameters (50 parame-
ters) in comparison with those of MLP network (19 K ¼ ð 0:0316 0:7201 1:1763 0:0281 0:0200 0:2104 Þ
parameters), so that it results in the smaller test error and it  103 :
is much easier to train. By comparing Fig. 10 with Fig. 8, it
is obvious that the LLNF network has better performance The controller keeps the pendulums in the vicinity of
for friction compensation. For instance, when velocity equilibrium point as shown in Fig. 12b and c with small
changes its direction in Fig. 8a, NN’s response displays a deviations of ±58 and ±38 for the first and second
big spike and large tracking error, but for LLNF, these pendulum angles, respectively. These deviations are caused
phenomena are declined in Fig. 10a. However, MLP net- by phenomena such as disturbances, low sampling rate,
work is more convenient for real-time applications due to quantization error, and mostly by friction. However, the
its smaller size and number of parameters. In more com- cart dispositions are largely due to small deflections of
plicated tasks, in order to reach small training error, LLNF pendulums. In order to keep the cart near the middle of the
usually need much more neurons and it actually slows tracks, usually an extra PI controller is necessary. This
down the controller and enforces the longer computational controller applies additional disturbance, like force, to keep
the cart around middle point, though increasing the
pendulums deflections and resulting in poor regularization.
Friction compensation technique is an attempt to
decrease the oscillations and increase the steady-state

Fig. 10 a Evaluation results of LLNF for 2,000 test pattern samples.


b Evaluation results of LLNF for 5,000 test pattern samples Fig. 11 The DIPC system installation

123
Neural Comput & Applic (2013) 22:337–347 345

local nonlinearity of friction dynamics when the velocity


changes its direction. Training procedure of MLP results in
a network, which has better performance with over all data
set not considering the local nonlinearities of input space;
on the other hand, LLNF is based on locally partitioning
the input space until reaching the desired performance;
therefore, the LOLIMOT training could distinguish the
local nonlinearities and general linear subsystems. Indeed,
due to the locally linear structure of LLNF, this model
obtains better performance and generalization than MLP
for friction compensation.
Both networks also smooth down the input voltage
peaks and consequently achieve better optimization. To
demonstrate the improvement of system regularization, the
cost function in (5) is calculated for 80 s for both com-
pensated and not compensated cases and is presented
among other results in Table 2 for comparison.
LLNF also results in more reduction of cost function
than MLP network. Consequently, the experiment proves
the efficiency of friction compensation technique and also
demonstrates the supremacy of LLNF network over MLP
in the inverse modeling of the friction and motor dynamics.

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

You might also like