Sunteți pe pagina 1din 20

Simulation Modelling Practice and Theory 81 (2018) 31–50

Contents lists available at ScienceDirect

Simulation Modelling Practice and Theory


journal homepage: www.elsevier.com/locate/simpat

Linear motor driven double inverted pendulum: A novel


mechanical design as a testbed for control algorithms
Xianmin Chen a,1,2, Rongrong Yu b,1,2, Kang Huang b, Shengchao Zhen b,∗,
Hao Sun b, Ke Shao b
a
University of Science and Technology of China, Hefei, Anhui 230027, PR China
b
School of Mechanical Engineering, Hefei University of Technology, Hefei, Anhui 230009, PR China

a r t i c l e i n f o a b s t r a c t

Article history: The inverted pendulum is a classic experimental facility that is widely used as a bench-
Received 17 July 2016 mark for testing control algorithms. One of the difficulties, however, with the traditional
Revised 22 November 2017
inverted pendulum is that it is not a very challenging problem to compare modern control
Accepted 30 November 2017
techniques. In addition, it is usually driven by a rotary motor and transmission system that
Available online 7 December 2017
introduces mechanical friction forces as well as periodic and aperiodic disturbances which
Keywords: result in the pendulum performance not as repeatable as desired. In particular, this lack
Double inverted pendulum of repeatability, which is very difficult to model, makes the use of this traditional control
Linear motor testbed less desirable for developing and comparing various modern control techniques.
LQR controller Therefore, it is the purpose of this paper to describe a more repeatable but more com-
Cspace plicated inverted pendulum system as a benchmark system for testing control strategies.
Control algorithm testbed The proposed system includes the use of a linear drive motor to eliminate the difficulties
associated with the rotary transmission. In addition, a second inverted pendulum is added
to create a richer control space and thus be a more effective benchmark for controller
evaluation.
© 2017 Elsevier B.V. All rights reserved.

1. Introduction

The inverted pendulum system is one of the classic mechanical systems in control systems that has attracted a great deal
of attention from researchers and robotics enthusiasts in the last few decades due to its special features, such as high order,
instability, multivariable, nonlinearity, strong coupling and under-actuation [1]. Besides, it can effectively reflect a lot of the
key performance of the control algorithm, such as robustness, stabilization and traceability [2–4]. The inverted pendulum
system is a classic example to research control algorithms in the control field [5], for the performance of the system can be
reflected by the angle of the pendulum and the displacement of the cart directly. Therefore, the inverted pendulum system
is widely used to test and compare the features between them [6]. The control technology of inverted pendulum can applied
in many industrial and engineering products such as high-precision control of the robot posture [7], one or two wheeled
self-balancing vehicle control [8,9], stabilization control of launching rocket and attitude control of satellite, etc.


Corresponding author.
E-mail addresses: rongala91@163.com (R. Yu), zhenshengchao@qq.com (S. Zhen).
1
These two authors contributed equally to this work and should be considered co-first authors.
2
The George W. Woodruff School of Mechanical Engineering, Georgia Institute of Technology, Atlanta, GA, 30332, USA.

https://doi.org/10.1016/j.simpat.2017.11.009
1569-190X/© 2017 Elsevier B.V. All rights reserved.
32 X. Chen et al. / Simulation Modelling Practice and Theory 81 (2018) 31–50

In general, the control of inverted pendulum system by classical methods is difficult. This is mainly because the cart-
inverted pendulum is an under-actuated nonlinear system, with only one control input applied to the cart but more than
two outputs (cart position and pendulum angle) [10]. In 1966, Schaefer and Canon stabilized a crankshaft to an inverted
position based on the Bang-Bang control theory. Subsequently, the concept of the inverted pendulum is proposed. In 1969,
Lindorff [11] successfully controlled the single inverted pendulum system. In 1972, Sturgeon and Loscutoff [12] achieved the
control of double inverted pendulum. Furuta completed the attitude control of a triple inverted pendulum successfully in
1984 [13]. Li [14] achieved stable control of quadruple inverted pendulum in 2002. In 2014, Weaver et al. [15] determined
the degree of inverted pendulum model which is suitable for stooping and crouching postures control.
There are also many control algorithms applied to the multi-stage inverted pendulum, such as PID control [16], fuzzy
control [17,18], LQR control [19], sliding control [20–23], neural network control [24], adaptive control [25], fault-tolerance
control [26], et al, and even the combination of control algorithms [27,28]. But all these proposed novel control algorithms
need a repeatable testbed to verify its effectiveness.
Therefore, many different experimental platforms are designed by researchers to verify the reliable of control algorithms.
Furuta et al. [29] used microcomputer to control double inverted pendulum, and then they realized the control of a dou-
ble inverted pendulum on an inclined guide rail in 1978. Wakuya et al. [30] constructed an on-line training model for
self-turning control algorithm whose effectiveness was investigated through control an inverted pendulum in 2007. Chee
et al. [31] designed a robust sensor fault reconstruction applied in an inverted pendulum to test real-time results. Cong
et al. [32] compared the actual real-time experiment control results of the single inverted pendulum system with the pole-
placement method, the optimization strategies of LQR and the LQY methods. Many control algorithms of inverted pendulum
are based on the linearization model of the inverted pendulum as in reference [33–35]. Xu et al. [36] submitted a fuzzy
control algorithm based on variable structure, and have successfully finished the stability control.
However, the cart of the above-mentioned inverted pendulum systems is driven by a rotary motor and by mechanical
transmission components to keep the balance of the inverted pendulum [37]. With this kind of configuration, the transmis-
sion frictions as well as the periodic and aperiodic disturbances are included in the system. Especially, most of the traditional
inverted pendulums use belt conveyor for linear motion while the conveyor belt will produce vibration, extension, and de-
lay. All the disturbing signals are inevitable for the system. The presence of these will lead to the lack of repeatability, which
is very difficult to model, makes the use of this traditional control testbed less desirable for developing and comparing var-
ious modern control techniques. Up to now, how to implement the real-time control of an inverted pendulum is still very
difficult, so decrease the disturbing signals is beneficial for the real-time control of the inverted pendulum.
To exploit a more accurate and repeatable experimental platform with less disturbing signals (such as transmission fric-
tion, interval, thrust fluctuation, periodic and aperiodic disturbances for control theory research) for testing and evaluating
control algorithms of the inverted pendulum system, an innovative linear motor driven double inverted pendulum (LMD-
DIP) system is designed. To avoid long time programming and debugging, Cspace which is based on the TMS320F2812DSP
control card and MATLAB/Simulink is designed to realize the real-time control of the system. Chen and Cao [38–40] used
linear motor on the design of inverted pendulum, and expressed the characteristics are superior to rotary motors. But these
references lack of systemic. In this paper, the hardware and software platform we designed is not only applicable to the
double inverted pendulum, but also can verify the repeatable of the testbed by different control algorithms.
This paper aims to describe a more repeatable but more complicated inverted pendulum system as a benchmark system
for testing control strategies, which include hardware platform and software platform. This paper is organized as follows.
Section 2 describes the hardware platform design, including the novel LMDDIP system and the design of the hardware
control platform. Section 3 presents the software platform design (Cspace, rapid controller prototyping system) of the system
in detail. Section 4 is the application of the platform. In this section, we first derive the mathematical model and the state
equation of the designed system (more details of the derivations are given in Appendix). Second, experimental tests by
using LQR and sliding mode control algorithms are carried out respectively. And during the LQR control algorithm, we also
simulate the system by MATLAB. Finally, there is some summary in Section 5.

2. Hardware platform design

2.1. Linear motor driven double inverted pendulum

The traditional straight-line motion is driven by rotary motor and transmitted by using ball or roller screws or belts
and pulley general. The problem of these structures is that the mechanical friction forces as well as periodic and aperiodic
disturbances which result in pendulum performance not as repeatable as desired. It is also hard to get high precision, high
speed and fast response based on these systems. While linear motor is a device that converts electric energy to mechanical
energy of linear movement directly. This way of driving with a linear motor is called “direct drive” or “gapless drive” . It
is often simply described as a rotary motor that has been rolled out flat, and the principles of operation are the same. It
has the distinct advantages over traditional mechanical systems with high speed, high acceleration and high accuracy, but
without mechanical friction. What’s more, its maximum stroke is unlimited. Most of the linear motors are linear induction
motors or linear synchronous motors. In this paper, an ironless permanent magnet linear synchronous motor is used to drive
the double inverted pendulum. Features of the linear motor are as follows (Table 1).
X. Chen et al. / Simulation Modelling Practice and Theory 81 (2018) 31–50 33

Table 1
Features of the linear motor.

Maximum velocity 3 m/s


Maximum acceleration 80 m/s2
Normal rated thrust force 80 N
Maximum thrust force 200 N
Resolution 5 μm

1. supporting seat 2. cart 3. linear motor 4. linear encoder


5. magnetic grid 6. bottom rotary encoder 7. connecting mechanism
8. bottom pendulum 9. top rotary encoder 10. link mechanism
11. top pendulum 12. drag chain

Fig. 1. Linear motor driven double inverted pendulum.

Based on the linear motor we designed, the LMDDIP platform is designed as shown in Fig. 1. The double inverted pen-
dulum system which driven by a linear motor is made up of a couple of a supporting seat, a linear motor, a cart, a bottom
pendulum, a top pendulum, the connecting mechanism between the bottom pendulum and the cart, the link mechanism
between the top pendulum and the bottom pendulum, a linear encoder, two rotary encoders and a drag chain. Fig. 2 shows
the construction of the linear motor which consists of linear motor stator cells and linear motor active. The linear motor
stator cells are uniform distribution on the upper and lower levels of the interior of the slot. One end of the linear motor
active is fixed on the cart and the other end is in the slot to cooperate with the linear motor stator cells.
Fig. 3 is the experimental photograph of the system. The connection between the cart and the active of the linear motor
is rigid without any transmission mechanism, and the friction from linear guide rail is quite small. Just as angle position
of the shaft can be got by the encoder of the rotary motor, the position information of the linear motor can be obtained
directly by using a linear encoder. The linear encoder is fixed on the cart which is rigid connected with the linear motor
active together. For these reasons, the disadvantages of traditional inverted pendulum systems’ transmission such as frictions,
intervals, periodic and aperiodic disturbances and thrust fluctuations can be overcome. So the double inverted pendulum
system driven by linear motor can greatly reduce the interference signals.
34 X. Chen et al. / Simulation Modelling Practice and Theory 81 (2018) 31–50

2. cart 31. linear motor stator cell 32. linear motor active
Fig. 2. Linear motor.

Fig. 3. Photograph of the linear motor driven double inverted pendulum.

2.2. Hardware design

The hardware architecture of the double inverted pendulum system driven by the linear motor is shown in Fig. 4. The
system includes a computer, a DSP control card [41], a servo driver, a linear motor, two rotary encoders, a linear encoder
and two inverted pendulums. The DSP control card acquires angle signals from rotary encoders and displacement signals
from the linear encoder. After the calculation of the DSP, six state variables of the system (x, φ 1 , φ 2 , x˙ , φ˙ 1 , φ˙ 2 ) are obtained.
According to the feedback matrix derived by simulation, we can realize the optimal control algorithm and obtain the control
variable by calculation. Analog control signal can be output through DA conversion which then amplified by the Elmo servo
driver to drive linear motor control the cart, so that the double inverted pendulum system is balanced.
The relationship between the input analog signal of the servo driver and the output force of the linear motor is quite
important. The servo driver used in this study has quite good linear relationship. The characteristics of dynamic, precision
and functionalities which are offered by servo driver are much superior to that of traditional servo drivers. It integrates
position loop, digital current loop and digital velocity loops, and all of which have auto tuning adjustment capabilities.
It is a smart digital servo driver that gives original equipment manufacture the flexibility of operating with DC brushed,
AC brushless and linear motor. It can take incremental encoder as feedback, and receive analog input signals as motion
command.
X. Chen et al. / Simulation Modelling Practice and Theory 81 (2018) 31–50 35

Monitor DSP Servo Linear Inverted


computer Control card driver motor pendulum

linear
encoder
Top pendulum angle
rotary
encoder
rotary Bottom pendulum angle
encoder

Fig. 4. Hardware architecture of the linear motor driven double inverted pendulum.

We use the auto tuning adjustment capabilities of the servo driver to tune the current loop of the linear motor, and set
the conductance as 0.3A/V after the tuning. The bandwidth of the current loop is larger than 3 KHz, which made the coil
current of the linear motor changes well followed with the input signals. Under no-load conditions, the output force of the
linear motor is proportional to the input signal, and the linear error is less than 0.1%.
The self-developed DSP control card is developed based on TMS320F2812DSP. It is used as the hardware part of the
control system and its instruction cycle is 6.67 ns. In general, serial communication block is used to communicate with
the monitor computer and two quadrature encoded pulses (QEP) blocks are used to collect two pendulums’ angle signals.
For the resources of TMS320F2812DSP is limited, DA block is added to produce ±10 V analog voltage signal to control the
linear motor and the third QEP is also added to receive the cart’s displacement signal. Thus, the self-designed DSP control
card have the function of collecting signals of one displacement and two angles, outputting the analog control signals and
communicating with the computer.

3. Software platform design

Traditional controllers are developed by the following three steps. First, design a controller. Second, manufacture the
controller based on what we designed. Finally, test and verify the performance of the controller. If the designed controller
is not qualified, continue to cycle according to the three steps above until the controller meets the requirements of the test.
For the development of traditional controllers is so complicated, rapid controller prototyping is appeared. Rapid controller
prototyping provides a highly efficient real-time control algorithm of the development platform [42].
To develop an easy-to-use and economic rapid controller prototyping to control the LMDDIP system, we take the advan-
tages of the Embedded Target toolbox for C20 0 0 DSP of MATLAB 7.0. The toolbox can integrate the algorithms developed
by graphic scheme in Matlab/Simulink with Texas Instrument sXpress DSP platform and C20 0 0 DSP processor which al-
lows code automatically generated online, rapid prototyping, and the development of embedded systems. According to the
file requirements of the CCS project, C code required by TIDSP is generated. After the compilation in CCS, the C code can
be downloaded to the DSP target board and run to verify and real-time implement of algorithms, which provides great
convenience for the development and application of users.
But the Embedded Target toolbox for C20 0 0 DSP resources of Matlab/Simulink is limited. There are only two QEP blocks
without DA block, the third QEP block and serial communication block. We developed the third block and the serial commu-
nication block, and then add them to the Embedded Target toolbox for C20 0 0 DSP, therefore the rapid control prototyping
system is constructed. Based on the works we done above, the double pendulum control can all realized by the way of using
graphical programming in Matlab/Simulink.
The obvious advantages of the Cspace control system are as follows. First, Cspace is developed in the basis of Matlab
environment, and it only need users to understand the simple knowledge of Matlab and Simulink. Second, it can modify
10 variables online and real-time display 4 variables in the operational interface. What’s more, the number of variables is
unlimited, the control interface can automatically identify the settings which are set by users. Third, the interface is simple
and clear and has only six operation steps, thus it is convenient for users to use. Fourth, the real-time displayed variable
data can be automatically saved to the current working directory of Matlab in the form of TXT, so that it can makes full use
of the function of Matlab to analyze and process historical data.
The process of using Cspace platform is as follows. Initially, Matlab/Simulink and the TMS320F2812DSP should be pre-
pared. When the file of controller algorithm is opened, the interface will appeared as shown in Fig. 5. Click on the button
of “WM Model Build”, it begins to compile, link, download and the code generated by the file of algorithm is executed on
the DSP control card. After complete the compile of file, click on the button of “WM Model Run”, the control interface of
Cspace can be appeared automatically. The display interface is shown in Fig. 6. On the right side of the interface, users can
input 10 variables and can be modified on-line. After input the variable values, click on the “Download” button, 4 variables
can be real-time displayed in the form of graph.
36 X. Chen et al. / Simulation Modelling Practice and Theory 81 (2018) 31–50

Fig. 5. The control interface of Cspace.

Fig. 6. The display interface of Cspace.


X. Chen et al. / Simulation Modelling Practice and Theory 81 (2018) 31–50 37

Fig. 7. Schematic drawing of LMDDIP.

Table 2
Parameters description of the designed system.

Parameter Description of parameters Parameter Description of parameters

M Mass of the cart m1 Mass of the bottom pendulum


m2 Mass of the top pendulum m3 Mass of link mechanism
l1 Distance between the rotational center and the l2 Distance between the rotational center and the
mass center of the bottom pendulum mass center of the top pendulum
φ1 Angle between bottom pendulum and the vertical φ2 Angle between top pendulum and the vertical
F Control action effect on the system

Remark. We can see clearly that in Fig. 6 users can input and modify 10 variables on the right side of the interface. How-
ever, in Fig. 5 only six variables can be found. This is because, for a double inverted pendulum, we only need to input and
modify 6 variables (x, φ 1 , φ 2 , x˙ , φ˙ 1 , φ˙ 2 ) which can be introduced in the following section. The other four variables are
useless for this system, but they are useful for other systems which need to input more variables.

4. Application of the platform

4.1. Model description of the platform

Ignoring the air resistance, viscous friction incurred from the cart sliding along the track and the friction from the two
shafts, it is regarded that the double inverted pendulum consists of a cart, a bottom pendulum, a top pendulum and a link
mechanism that connects top pendulum and bottom pendulum. The schematic drawing of the LMDDIP is shown in Fig. 7.
The parameters associated with the designed system are described in Table 2.
From the schematic drawing of LMDDIP in Fig. 7, using Lagrange equations, the following dynamic equations of the
system are derived (details of the derivations are given in Appendix):
 
6m2 l2 φ˙ 22 sin (φ1 − φ2 ) + 4 m1 + 3(m2 + m3 )l1 φ̈1
 
− 3 −2m2 l2 φ̈2 cos (φ2 − φ1 ) + (m1 + 2(m2 + m3 ) )(g sin φ1 + ẍ cos φ1 ) = 0, (1)

−3g sin φ2 − 6l φ˙ 12 sin (φ1 − φ2 ) + 4l2 φ̈2 + 6l1 φ̈1 cos (φ2 − φ1 ) − 3ẍ cos φ2 = 0. (2)
Linearization (1) and (4) in the equilibrium position, the following differential equations can be obtained:
φ̈1 = K12 φ1 + K13 φ2 + K17 ẍ, (3)
φ̈2 = K22 φ1 + K23 φ2 + K27 ẍ, (4)
where
3g(−2m1 − 4m2 − 4m3 )
K12 = ,
2(−4m1 − 3m2 − 12m3 )l1

2 g( m 1 + 2 ( m 2 + m 3 ) )
K22 = ,
4m2 l2 − 16
9
( m1 + 3 ( m2 + m3 ) )l2
38 X. Chen et al. / Simulation Modelling Practice and Theory 81 (2018) 31–50

Table 3
Variables definition.

State variable Physical quantity State variable Physical quantity State variable Physical quantity

x1 x x3 φ2 x5 φ˙ 1
x2 φ1 x4 x˙ x6 φ˙ 2

Table 4
Physical parameters of the designed system.

Parameter Value(kg) Parameter Value(kg) Parameter Value(kg)

M 0.38 m1 0.047 m2 0.049


m3 0.253 l1 0.1 l2 0.172

9m2 g
K13 = ,
2(−4m1 − 3m2 − 12m3 )l1

3(−2m1 − m2 − 4m3 )
K17 = ,
2(−4m1 − 3m2 − 12m3 )l1

4g( m1 + 3 ( m2 + m3 ) )
K23 =  ,
3 4m2 l2 − 16
9 (m1 + 3(m2 + m3 ))l2
2(m1 + 2(m2 + m3 ) ) − 43 (m1 + 3(m2 + m3 ) )
K27 = .
4m2 l2 − 16
9 (m1 + 3(m2 + m3 ))l2
Suppose the input of the system is the acceleration, the controller action u is obtained as
u = ẍ. (5)
The state variables are defined in Table 3:
From (3), (4) and (5), the state equations can be obtained as
⎡ ⎤ ⎡ ⎤⎡ ⎤ ⎡ ⎤
x˙ 1 0 0 0 1 0 0 x1 0
⎢x˙ 2 ⎥ ⎢0 0 0 0 1 0⎥⎢x2 ⎥ ⎢0 ⎥
⎢x˙ 3 ⎥ ⎢0 0 0 0 0 1⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥=⎢ ⎥⎢x3 ⎥ + ⎢0 ⎥u (6)
⎢x˙ 4 ⎥ ⎢0 0 0 0 0 0⎥⎢x4 ⎥ ⎢1 ⎥
⎣˙ ⎦ ⎣ ⎦⎣ ⎦ ⎣ ⎦
x5 0 K12 K13 0 0 0 x5 K17
x˙ 6 0 K22 K23 0 0 0 x6 K27
The parameter values used in the LMDDIP system are presented in Table 4.
Substituting the values of the physical quantities into the above equation, the result is given by
⎡ ⎤ ⎡ ⎤⎡ ⎤ ⎡ ⎤
x˙ 1 0 0 0 1 0 0 x1 0
⎢x˙ 2 ⎥ ⎢0 0 0 0 1 0⎥⎢x2 ⎥ ⎢0 ⎥
⎢x˙ 3 ⎥ ⎢0 0 0 0 0 1⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥=⎢ ⎥⎢x3 ⎥ + ⎢0 ⎥u (7)
⎢x˙ 4 ⎥ ⎢0 0 0 0 0 0⎥⎢x4 ⎥ ⎢1 ⎥
⎣˙ ⎦ ⎣ ⎦⎣ ⎦ ⎣ ⎦
x5 0 62.14 −11.82 0 0 0 x5 5.13
x˙ 6 0 −54.19 53.04 0 0 0 x6 −0.12
In the front of the paper, the self-designed LMDDIP platform has been developed, including the hardware platform and
the software platform. The model of the platform has also been designed in the previous subsection. In order to verify the
reliability of the platform, experiments and simulation are done based on the platform in the following.

4.2. Simulation and real-time experiment of the platform with LQR controller

Suppose that the state equation of the linear time-invariant system is:

x˙ (t ) = Ax(t ) + Bu(t )
(8)
y(t ) = Cx(t ) + Du(t )

The optimal control performance index is to design an input u(t) to minimize the parameter J which is as the following
equation

1
J= xT (t )Q (t )x(t ) + uT (t )R(t )u(t ) d (t ). (9)
2 0
X. Chen et al. / Simulation Modelling Practice and Theory 81 (2018) 31–50 39

Fig. 8. LQR controller for the simulation of LMDDIP.

Where Q and R respectively denote the weighting matrix of state variable and input variable. If this system is subjected
to interference from zero state, the control u(t) should be applied to make the system come back to zero state and J has a
minimum at the same time. Here, the control u(t) is called optimal control. The control signal is:
u(t ) = −R−1 BT P (t )x(t ) = −Kx(t ), (10)
where P(t) is the solution of the Riccati equation:
PA + AT P − P BR−1 BT P + Q = 0, (11)
K is the linear optimal feedback gain matrix, and it is given as
K = R−1 BT P. (12)
According to the optimal control theory, the key design problem of the LQR controller of the LMDDIP is to obtain Q and
R weighting matrixes. There is no straightforward way of obtaining these matrixes and they are usually obtained through
an iterative process either in simulation or experiment. Q and R are generally diagonal matrices. The state weighting matrix
Q is chosen to emphasize the response of certain states, while the input weighting matrix R is chosen to determine how
much control effort u is used to solve the optimization problem. If the input signal is expected to be small, then R should
be large; if the state variable xj is expected to be small, then accordingly the values of the elements in column j of Q should
be large. For example, when Q is fixed but R reduces, the transmission time and the overshoot time will reduce, rise time
and steady state error will increase. When R is fixed but Q increases, the transmission time and the overshoot will reduce,
so is the change of the angle, but rise time and steady state error will increase at the same time [43].
For the LMDDIP system, the quadratic performance index of LQR controller should make the pendulums not deviating
from the control area and as far as possible within the scope of linear of the system. According to the characteristics of the
double inverted pendulum, the angle of top pendulum is more important than the angle of bottom pendulum, and the angle
of bottom pendulum is more important than the displacement of the cart. So we can obtain Q and R weighting matrixes by
some simulation, and let them be
Q = diag[40, 100, 200, 0, 0, 0], R = [1]. (13)
Using Matlab function K = lqr (A, B, Q, R) to solve the optimal problem, the vector K can be obtained as
K = [6.32, 111.11, −150.16, 7.94, 4.7, −20.57 ], (14)
which determine the feedback control law.
Now, we did the simulation by the LQR controller which is presented in Fig. 8 in MATLAB/Simulink. K (including six
values K1, K2, K3, K4, K5 and K6) are the values of the feedback matrix obtained by simulation. The step response curves
are shown in Fig. 9.
Fig. 9 shows the step response of cart’s position, bottom pendulum’s angle and top pendulum’s angle respectively. After
the 0.1 N step signal being applied in 8 s, the pendulums’ angles turn large and the top pendulum’s angle is larger than bot-
tom pendulum’s. The top pendulum’s angle ranges between −7° and 2° while the bottom pendulum’s angle ranges between
40 X. Chen et al. / Simulation Modelling Practice and Theory 81 (2018) 31–50

Fig. 9. Step response of the double inverted pendulum in numerical simulation.

Fig. 10. LQR controller for the real-time experiment of LMDDIP.

−5° and 2°. The adjusting time for this system is about 2 s after the 0.1 N step signal is applied. The cart can track the input
signal and there is a small overshoot. Fig. 9(a)–(c) are the numerical simulation results of the designed platform by using
LQR controller.
Then, we use the same LQR controller to conduct the real-time experiment. As is shown in Fig. 10, “encoder_2”, “en-
coder_4” and “encoder_3” are three QEP blocks which are used to collect the signals of the displacement of the cart, the
angle of the bottom pendulum and the angle of the top pendulum respectively. It should be noted that the angle of the
top pendulum is the sum of the values of “encoder_4” and “encoder_3”. “DAC_1” is the digital-to-analog conversion block.
“Serial-communication” is the serial communication block. “Position” is the pulse equivalence of the linear encoder, while
“Angle_div1” and “Angle_div2” are the pulse equivalence of the rotary encoders. K1, K2, K3, K4, K5 and K6 are the values
of the feedback matrix K which is the same with the K in simulation. Then the value calculated by the LQR algorithm is
passed to “D/A Conversion” block.
The values of the blocks of “Position”, “Angle_div1” and “Angle_div2” are 0.0 0 0 0 05, 0.0 0157 and 0.00157 (the number of
pulse per revolution of the rotary encoder is 10 0 0) respectively. So the “Position” block’s output physical unit is meter, while
the “Angle_div1” and “Angle_div2” blocks’ units are radian, which is the same with the state variables of the LMDDIP’s state
equation.
Based on the LQR controller which is shown in Fig. 10, C-language real-time implementation of control algorithm for DSP
control card is generated. The generated code is automatically compiled, linked, downloaded, and executed on the control
card.
X. Chen et al. / Simulation Modelling Practice and Theory 81 (2018) 31–50 41

Fig. 11. Step response of the double inverted pendulum in real-time experiment.

Fig. 12. Step response of the double inverted pendulum in simulation and real-time experiment. (For interpretation of the references to colour in this
figure legend, the reader is referred to the web version of this article.)

Table 5
Feedback matrix K of LQR controller used in reference [44].

K1 K2 K3 K4

Simulation −28.6065 −5.3274 −4.0 0 0 0 −9.9734


Real-time Experiment −30 −6 −7 −10

For the 0.1 N step signal being applied in 8 s, the step response curve experimental results are shown in Fig. 11. Curve (a)
is the step response of the cart’s displacement. The cart can be stabilized at the position of 80 cm after approximately 2 s
and the position ranges from 50 cm to 140 cm. Curve (b) is the step response of the bottom pendulum’s angle. After about
2 s, the pendulum starts an oscillation around the vertical position (φ = 0). The angle ranges between −4° and +3° relative
to the vertical position. Curve (c) is the step response of the top pendulum’s angle. The top pendulum begins to balance
after about 2 s and the angle relative to the vertical position stays small, ranges between −3° and +1°. The experimental
results show that LQR controller can be implemented well on the self-designed platform. Thus, the platform is an applicable
platform to verify LQR algorithm.
In order to clearly show the consistency of the results of simulation and real-time experimental, the comparison of these
results is shown in Fig. 12. The green curve represents the simulation results and the blue curve represents the real-time
results.
Now, we analyze results between the numerical simulation and the real-time experiment of the self-designed platform
by using LQR controller. All results can be summarized as follows:
1. The feedback matrix K of LQR controller which is used in simulation can be used directly in real-time experiment by
the platform.

Remark. In many papers, inverted pendulum systems are traditionally driven by rotary motor, the feedback matrix K ob-
tained by simulation cannot be directly used in real-time control. The value of feedback matrix K should be adjusted to
gain better control performance, for the state feedback controller relies on precise mathematical model, while traditional
inverted pendulum systems are influenced by friction, interval of transmission mechanism and also by thrust fluctuation.

For example, reference [44] designed a LQR controller for traditional inverted pendulum. The feedback matrix K in sim-
ulation and real-time experiment is shown in Table 5.
42 X. Chen et al. / Simulation Modelling Practice and Theory 81 (2018) 31–50

Table 6
Feedback matrix K of LQR controller used in reference [45].

K1 K2 K3 K4 K5 K6

Simulation 10.0 14.1 114.5 3.7 −202.6 −35.7


Real-time Experiment 15 14 95 2 −200 −30

Reference [45] designed a LQR controller for traditional double inverted pendulum and the feedback matrix K in simula-
tion and real-time experiment is shown in Table 6.
Values in Tables 5 and 6 are significantly different between simulation and real-time experiment due to the presence of
disturbing signals in traditional inverted pendulum systems.
However, based on the LMDDIP we designed, the feedback matrix K obtained in theoretical analysis (simulation) can be
used directly in real-time experiment of LMDDIP system and satisfactory control results are obtained. For the double in-
verted pendulum is driven by linear motor, there is no rotary-to-linear mechanical transmission components, so the disad-
vantages of the transmission friction, interval and thrust fluctuation in traditional inverted pendulum are overcome. Besides,
the servo driver makes sure that the linear motor output force is proportional to the input signal and the linearity error is
less than 0.1%. All of these will conductive to reduce disturbing signals and non-linear factors in the system. Therefore, the
feedback matrix K of LQR controller obtained in theoretical analysis (simulation) can be used in real-time control directly
and the experimental results are consistent with the simulation.
2. For the step response of the designed platform, the response time and the values of cart’s position and pendulums’
angles in simulation are in accord with those in real-time experiment. This verifies that the designed platform is feasible
and repeatable.

4.3. Comparison of sliding mode controller and LQR controller real-time experiment in the platform

Consider the following system

x˙ (t ) = Ax(t ) + B(u(t ) + d (t )), (15)

where d(t) ∈ R is a nonlinear perturbation with known upper bound d0 , i.e., |d(t)| ≤ d0 .
The control vector Bu(t) and disturbance vector Bd(t) are collinear. So the matching condition of sliding mode control
technique is satisfied. Thus, sliding mode control scheme can be used for system (15).
In general, the first step of designing a sliding mode controller is to select a suitable sliding surface such that certain
desired dynamic characteristics can be acquired once the system enters the sliding surface. The second step is the synthesis
of the control law in such a way that any state outside the sliding surface is forced to reach the desired sliding manifold in
finite time and stay on it.
Use the state feedback, the sliding surface is given by

S = Mx(t ), (16)

where M ∈ Rn . Here, in order to guarantee the states converging to the equilibrium when reaching the sliding surface, the
matrix M is chosen by using Ackermann’s formula [23]. And then it gets

M = eT P (A ), (17)

where
eT = [0, 0, 0, 0, 0, 1][B, AB, A2 B, A3 B, A4 B, A5 B]−1 ,
P(A ) = (A − λ1 )(A − λ2 )(A − λ3 )(A − λ4 )(A − λ5 )(A − λ6 ).

Theorem 1. Consider the time-invariant linear system (15), design the control signal u(t) as follows

u(t ) = −(MB )−1 [MAx(t ) + kS + ε sgn(S )], (18)

where k, ɛ ≥ d0 are positive scalars, and sgn( · ) is the sign function.


The selection of parameter k is mainly based on dynamic characteristics of reaching the modal requirements, the larger value
of k the faster of the system reaching the sliding mode surface. The selection of ɛ is mainly in order to restrain the system friction,
the model error caused by approximate linearization and other factors, so that the system can reach the sliding mode surface in
the presence of these factors. Then, the system can be stabilized.

Proof. Choose a Lyapunov function candidate of the form

V = 0.5S 2 . (19)
X. Chen et al. / Simulation Modelling Practice and Theory 81 (2018) 31–50 43

Fig. 13. Sliding mode controller for the simulation of LMDDIP.

Fig. 14. Step response of the double inverted pendulum in numerical simulation, k = 5, ε = 0.1.

With the controller (18), the time derivative of V along the trajectory of the controlled system of (15) is given by
V˙ = SM[Ax(t ) + B(u(t ) + d (t ))]
≤ −kS2 − ε |S| + d0 |S|
≤ −kS2 . (20)
As a result, all the system states can reach the sliding surface. Moreover, the choice of sliding surface further guarantees
that all the conditions converge to the system equilibrium. To compare the LQR algorithm with the sliding mode algorithm,
we set 0.1 N step signal as disturbance.
In order to obtain the optimal parameters, we use the sliding mode controller which is presented in Fig. 13 to conduct
simulation with several different parameters. The selection of k and ɛ have more influences for the controller. We show
three results with different representative parameters as in Figs. 14–16.
From Figs. 14–16, we can derive the optimal parameters are k = 10, ε = 0.01. With this set of parameters, the oscillation
of the system is the smallest when enter the 0.1 N step signal.
Now, we use the sliding mode controller which is presented in Fig. 17 to conduct real-time experiment. To better im-
plement the sliding mode controller (18), the control gains are chosen as: k = 10, ε = 0.01 based on the above simulation.
When the system moves into sliding mode surface, for the increased constraint s = 0, only five desired closed-loop poles
can be configured as λ1 = −3, λ1 = −20, λ1 = −3 − 2i, λ1 = −3 + 2i, λ1 = −25.
The experimental results are shown in Fig. 18. As we can see clearly in Fig. 18(a), the cart displacement ranges from
−120mmm to −20 mm, while the angle of bottom pendulum ranges from −10° to +6° as it is shown in Fig. 18(b). Further-
more, the angle of top pendulum is stabilized from −4° to 1.5° as shown in Fig. 18(c). The results verify that the designed
platform performs well with sliding mode algorithm (18).
To implement the LQR controller (10), the control gains K1-K6 are designed as −13, −7, −111, −1.8, 170 and 20. The
experimental results are shown in Fig. 19, the closed-loop system is stabilized. The cart displacement is from −120 mm to
44 X. Chen et al. / Simulation Modelling Practice and Theory 81 (2018) 31–50

Fig. 15. Step response of the double inverted pendulum in numerical simulation, k = 10, ε = 0.01.

Fig. 16. Step response of the double inverted pendulum in numerical simulation, k = 50, ε = 0.1.

Fig. 17. Sliding mode controller for the real-time experiment of LMDDIP.

−70 mm, as shown in Fig. 19(a). The bottom pendulum is within 4°, while the angle of top pendulum is within 2°, as we
can see from Fig. 19 (b,c). The results verify that the designed platform performs well with LQR algorithm (10).
Comparing the results of LQR controller (10) with sliding mode controller (18), we can find that in Figs. 18(a) and 19(a),
the cart displacement of sliding mode controller (from −120 mm to −40 mm) is larger than that of LQR controller (from
−120 mm to −70 mm). In Figs. 18 (b, c) and 19 (b, c), pendulums’ angles of sliding mode controller (from −10° to 7° and
from −4° to 2°) are also larger than that of LQR controller (from −1° to 4° and from −0.5° to 2°). However, when enter the
step signal in 8 s, the robustness of sliding mode controller is higher than that of LQR controller. The disturbance has little
effect on the sliding mode controller, for the system is still move in the previous form. While the disturbance has great
effect on the LQR controller for the vibration amplitude become larger and the amplitude will be reduced after about 15 s.
This is due to sliding mode controller has a good robustness, but has the phenomenon of oscillation [1].
X. Chen et al. / Simulation Modelling Practice and Theory 81 (2018) 31–50 45

Fig. 18. Experimental results with sliding mode controller.

Fig. 19. Experimental results with LQR controller.

The experimental results show that sliding mode controller and LQR controller can be implemented well on the self-
designed testbed. On account of the experiments above, we can expand to say, based on our designed testbed, other control
algorithms can be verified and compared to get their merits and drawbacks.

5. Conclusion

Inverted pendulum is an under-actuated and unstable system for its mass is above its pivot point. Therefore, it’s a classic
experimental facility in the field of dynamics and control and is widely used as a benchmark for testing control algorithms.
The traditional inverted pendulum is usually driven by a rotary motor and transmission system that introduces mechanical
friction forces as well as periodic and aperiodic disturbances. The presence of rotary motor and transmission system will
result in the lack of repeatability, which makes the use of this traditional control testbed less desirable for developing and
comparing various modern control techniques. Thus rotary motor and transmission system are not conducive to the design
of inverted pendulum system.
In this paper, a novel double inverted pendulum testbed driven by a linear motor is designed. The hardware platform and
software platform of the double inverted pendulum system are set up respectively. This software platform including a rapid
controller prototyping named Cspace designed by us, which can modify 10 variables online and real-time display 4 variables
in the operating interface. Cspace saves long time programming and debugging. Based on the designed platform, LQR and
sliding mode controllers are experimentally tested respectively. The research results verify the repeatable and effectiveness
of the designed testbed. Moreover, based on the testbed, other control approaches can be verified and compared to get their
merits and drawbacks.
Using this system, the design of electrically controlled unit is efficient. The designers can place more focus on creative
solution of control algorithms or engineering problems rather than the implementation of the software and hardware of
control algorithms.
46 X. Chen et al. / Simulation Modelling Practice and Theory 81 (2018) 31–50

Acknowledgments

This research was supported by National Natural Science Foundation of China (No. 51505116), Natural and Sci-
ence Foundation of Anhui Province(No. 1508085SME221), the Fundamental Research Funds for the Central Universi-
ties(JZ2016HGTB0716) and China Postdoctoral Science Foundation (2016M590563).

Appendix. Detailed model of the designed testbed

To obtain the dynamic model of the linear motor driven double inverted pendulum, the following assumptions are made.
Assumptions:

1. The system starts in a state of equilibrium (the initial conditions are assumed to be zero).
2. The air friction and the friction between pendulum and connecting mechanism are neglected.

The Lagrange equation is used to derive the system’s equations of motion [18]. The Lagrange equation is:

L(q, q˙ ) = T (q, q˙ ) − V (q, q˙ ) (21)


where L is Lagrangian, q is generalized coordinate of the system, T is system kinetic energy, V is system potential energy. By
generalized coordinate qi and Lagrangian operator L, the Lagrangian equation becomes:
d ∂L ∂L
− = fi (22)
dt ∂ q˙ i ∂ qi
where i = 1, 2, 3, . . . , n, fi is acting force along generalized ordinate direction.
In the system, three generalized coordinates are x, φ 1 and φ 2 . There are no acting forces along generalized coordinate
direction φ 1 and φ 2 . Then the following equations can be obtained,
d ∂L ∂L
− = fi (23)
dt ∂ x˙ i ∂ xi
d ∂L ∂L
− =0 (24)
dt ∂ φ1
˙ ∂ φ1

d ∂L ∂L
− =0 (25)
dt ∂ φ2
˙ ∂ φ2
Kinetic and potential energy of the system are given by sum of energies of the individual components (a cart, mass, and
two pendulums):

P = PM + Pm1 + Pm2 + Pm3 (26)

T = TM + Tm1 + Tm2 + Tm3 (27)

where
PM = 0 (potential energy of the cart)
Pm1 = m1 gl1 cos φ 1 (potential energy of the bottom pendulum)
Pm2 = m2 g(2l1 cos φ1 + l2 cos φ2 ) (potential energy of the top pendulum)
Pm3 = 2m3 gl1 cos φ 1 (potential energy of the mass)
TM = 12 Mx˙ 2 (Kinetic energy of the cart)

Tm1 = Tm 1 + Tm1 (Kinetic energy of the bottom pendulum)

Tm2 = Tm 2 + Tm2 (Kinetic energy of the top pendulum)
 
Tm1 and Tm1 are the translational energy and rotational energy of the bottom pendulum, while Tm 2 and Tm2 are the

translational energy and rotational energy of the top pendulum respectively, where
 2  2 
1 d (x − l1 sin φ1 ) d (l1 cos φ1 ) 1 1
T
m1 = m1 + = m1 x˙ 2 − m1 l1 x˙ φ˙ 1 cos φ1 + m1 l12 φ˙ 12
2 dt dt 2 2

1 1 1
 2 1

Tm1 = J1 ω12 = m1 l12 φ˙ 12 = m1 l12 φ˙ 12
2 2 3 6
The kinetic energy of the bottom pendulum Tm1 becomes
1 2
Tm1 = Tm 1 + Tm1 = m1 x˙ 2 − m1 l1 x˙ φ˙ 1 cos φ1 + m1 l12 φ˙ 12 (28)
2 3
X. Chen et al. / Simulation Modelling Practice and Theory 81 (2018) 31–50 47


In the same way, Tm2 , Tm 2 and Tm2 can be derived as
 2  2 
1 d (x − 2l1 sin φ1 − l2 sin φ2 ) d (2l1 cos φ1 + l2 cos φ2 )
T
m2 = m2 +
2 dt dt

1 1 1
 2  1
Tm2 = J2 ω22 = m2 l22 ω2 = m1 l12 φ˙ 12
2 2 3 6
1  2 1  2
= m2 x˙ − 2l1 φ˙ 1 sin φ1 − l2 φ˙ 2 sin φ2 − m2 2l1 φ˙ 1 sin φ1 + l2 φ˙ 2 sin φ2
2 2
1   
Tm2 = Tm 2 + T  m2 = m2 x˙ 2 − 2x˙ 2l1 φ˙ 1 cos φ1 + l2 φ˙ 2 cos φ2
2
1
 4

+ m2 4l1 φ1 + l22 φ˙ 22 + 4l1 l2 φ˙ 1 φ˙ 2 cos (φ2 − φ1 )
2 ˙2
(29)
2 3
 2  2 
1 d (x − 2l1 sin φ1 ) d (2l1 cos φ1 ) 1
Tm3 = m3 + = m3 x˙ 2 − 2m3 l1 x˙ φ˙ 1 cos φ1 + 2m3 l12 φ˙ 12 (30)
2 dt dt 2

Total potential energy of the system can be obtained as

P = PM + Pm1 + Pm2 + Pm3


= m1 gl1 cos φ1 + m2 g(2l1 cos φ1 + l2 cos φ2 ) + 2m3 gl1 cos φ1 (31)
Total kinetic energy of the system can be written as

T = TM + Tm1 + Tm2 + Tm3


1 1 2 1   
= Mx˙ 2 + m1 x˙ 2 − m1 l1 x˙ φ˙ 1 cos φ1 + m1 l12 φ˙ 12 + m2 x˙ 2 − 2x˙ 2l1 φ˙ 1 cos φ1 + l2 φ˙ 2 cos φ2
2 2 3 2
1
 4
 1
+ m2 4l12 φ˙ 12 + l22 φ˙ 22 + 4l1 l2 φ˙ 1 φ˙ 2 cos (φ2 − φ1 ) + m3 x˙ 2 − 2m3 l1 x˙ φ˙ 1 cos φ1 + 2m3 l12 φ˙ 12 (32)
2 3 2
The Lagrangian equation can be expressed as

L = T −V
1 1 2 1   
= Mx˙ 2 + m1 x˙ 2 − m1 l1 x˙ φ˙ 1 cos φ1 + m1 l12 φ˙ 12 + m2 x˙ 2 − 2x˙ 2l1 φ˙ 1 cos φ1 + l2 φ˙ 2 cos φ2
2 2 3 2
1
 4
 1
+ m2 4l12 φ˙ 12 + l22 φ˙ 22 + 4l1 l2 φ˙ 1 φ˙ 2 cos (φ2 − φ1 ) + m3 x˙ 2 − 2m3 l1 x˙ φ˙ 1 cos φ1 + 2m3 l12 φ˙ 12
2 3 2
− m1 gl1 cos φ1 + m2 g(2l1 cos φ1 + l2 cos φ2 ) + 2m3 gl1 cos φ1 (33)
By substituting (33) into (24) and (25), the following equations can be obtained

6m2 l2 φ˙ 22 sin(φ1 − φ2 ) + 4(m1 + 3(m2 + m3 )l1 φ̈1 )


− 3(−2m2 l2 φ̈2 cos(φ2 − φ1 ) + (m1 + 2(m2 + m3 ) )(g sin φ1 + ẍ cos φ1 )) = 0 (34)

−3g sin φ2 − 6l φ˙ 12 sin (φ1 − φ2 ) + 4l2 φ̈2 + 6l1 φ̈1 cos (φ2 − φ1 ) − 3ẍ cos φ2 = 0 (35)

Taking φ̈1 and φ̈2 as dependent variables while x, φ1 , φ2 , x˙ , φ˙ 1 , φ˙ 2 as independent variables, φ̈1 and φ̈2 can be expressed
as

φ̈1 = f1 (x, φ1 , φ1 , x˙ , φ˙ 1 , φ˙ 1 , ẍ )
= (3(−2gm1 sin φ1 − 4m2 g sin φ1 − 4m3 g sin φ1 + 3m2 g cos(φ2 − φ1 ) sin φ1
+ 6m2 l1 cos(φ1 − φ2 ) sin(φ1 − φ2 )φ˙ 12 + 4m2 l1 sin(φ1 − φ2 )φ˙ 22 − 2m1 ẍ cos φ1 − 4m2 ẍ cos φ1 − 4m3 ẍ cos φ1
+ 3m2 ẍ cos(φ1 − φ2 ) cos φ2 ))/(2l1 (−4m1 − 12m2 − 12m3 + 9m2 cos2 (φ1 − φ2 ))) (36)

φ̈2 = f1 (x, φ1 , φ1 , x˙ , φ˙ 1 , φ˙ 1 , ẍ )
4
= −(− m2 (m1 + 3(m2 + m3 ))l12 l2 (−3g sin φ2 − 6l1 φ˙ 12 sin(φ1 − φ2 ) − 3ẍ cos φ2 )
9
2
+ m2 l12 l2 cos(φ1 − φ2 )(6m2 l2 sin(φ1 − φ2 )φ˙ 22
3
16
− 3(m1 + 2(m2 + m3 ))(g sin φ1 + ẍ cos φ1 )))/(− m2 (m1 + 3(m2 + m3 ))l12 l22 + 4m22 l12 l22 cos2 (φ1 − φ2 )) (37)
9
48 X. Chen et al. / Simulation Modelling Practice and Theory 81 (2018) 31–50

For the double inverted pendulum, the balance position is


(x, φ1 , φ2 , x˙ , φ˙ 1 , φ˙ 2 , ẍ ) = (0, 0, 0, 0, 0, 0, 0 )
Expanding (36) in Taylor series at the balance position, then linearizing the expanded equation, the results are

∂ f1 
K11 = =0
∂ x x=0,φ =0,φ =0,x˙ =0,φ˙ =0,φ˙ =0,ẍ=0
1 2 1 2

∂ f1  3(−2gm1 − 4gm2 − 4gm3 )
K12 = =
∂ φ1 x=0,φ =0,φ =0,x˙ =0,φ˙ =0,φ˙ =0,ẍ=0 2(−4m1 − 3m2 − 12m3 )l1
1 2 1 2

∂ f1   9m2 g
K13 = =
∂ φ2 x=0,φ =0,φ =0,x˙ =0,φ˙ =0,φ˙ =0,ẍ=0 2(−4m1 − 3m2 − 12m3 )l1
1 2 1 2

∂ f1 
K14 = =0
∂ x˙  x=0,φ1 =0,φ2 =0,x˙ =0,φ˙ 1 =0,φ˙ 2 =0,ẍ=0

∂ f1 
K15 = =0
∂ φ˙ 1 x=0,φ1 =0,φ2 =0,x˙ =0,φ˙ 1 =0,φ˙ 2 =0,ẍ=0

∂ f1 
K16 = =0
∂ φ˙ 2 x=0,φ1 =0,φ2 =0,x˙ =0,φ˙ 1 =0,φ˙ 2 =0,ẍ=0

∂ f1  3(−2m1 − m2 − 4m3 )
K17 = =
∂ ẍ x=0,φ =0,φ =0,x˙ =0,φ˙ =0,φ˙ =0,ẍ=0 2(−4m1 − 3m2 − 12m3 )l1
1 2 1 2

After linearization, (36) can be presented as


φ̈1 = K12 φ1 + K13 φ2 + K17 ẍ (38)
In the same method, Eq. (37) is expanded in Taylor series at the balance position, then the expanded equation is lin-
earized. The result is

∂ f2 
K21 = =0
∂ x x=0,φ =0,φ =0,x˙ =0,φ˙ =0,φ˙ =0,ẍ=0
1 2 1 2

∂ f2  2g(m1 + 2(m2 + m3 ))
K22 = =
∂ φ1 x=0,φ =0,φ =0,x˙ =0,φ˙ =0,φ˙ =0,ẍ=0 4m2 l2 − 169 (m1 + 3(m2 + m3 ))l2
1 2 1 2

∂ f2  4g(m1 + 3(m2 + m3 ))
K23 = =
∂ φ2 x=0,φ =0,φ =0,x˙ =0,φ˙ =0,φ˙ =0,ẍ=0 3(4m2 l2 − 169 (m1 + 3(m2 + m3 ))l2 )
1 2 1 2

∂ f2 
K24 = =0
∂ x˙ x=0,φ =0,φ =0,x˙ =0,φ˙ =0,φ˙ =0,ẍ=0
1 2 1 2

∂ f2 
K25 = =0
∂ φ˙ 1 x=0,φ1 =0,φ2 =0,x˙ =0,φ˙ 1 =0,φ˙ 2 =0,ẍ=0

∂ f2 
K26 = =0
∂ φ˙ 2 x=0,φ1 =0,φ2 =0,x˙ =0,φ˙ 1 =0,φ˙ 2 =0,ẍ=0

∂ f2  2(m1 + 2(m2 + m3 )) − 43 (m1 + 3(m2 + m3 )
K27 = =
∂ ẍ x=0,φ =0,φ =0,x˙ =0,φ˙ =0,φ˙ =0,ẍ=0 4m2 l2 − 16
9
(m1 + 3(m2 + m3 ))l2
1 2 1 2

After linearization, (37) can be derived as


φ̈2 = K22 φ1 + K23 φ2 + K27 ẍ (39)
Taking acceleration of the cart as input of the system, the input of the system’s state equations is given by
u = ẍ (40)
X. Chen et al. / Simulation Modelling Practice and Theory 81 (2018) 31–50 49

The states of the system’s state equations are defined as follows:


Provided by Eqs. (38)–(40), the system’s state equation is modeled as
⎡x˙ ⎤ ⎡0 0 0 1 0 0
⎤⎡x ⎤ ⎡0 ⎤
1 1
⎢x˙ 2 ⎥ ⎢0 0 0 0 1 0⎥⎢x2 ⎥ ⎢0 ⎥
⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢x˙ 3 ⎥ ⎢0 0 0 0 0 1⎥⎢x3 ⎥ ⎢ ⎥
⎢ ⎥=⎢ ⎥⎢ ⎥ + ⎢0 ⎥u (41)
⎢x˙ 4 ⎥ ⎢0 0 0 0 0 0⎥⎢x4 ⎥ ⎢
⎥ ⎢ ⎥ ⎥
⎢ ⎥ ⎢ ⎢1 ⎥
⎣x˙ 5 ⎦ ⎣0 K12 K13 0 0 0 ⎦ ⎣x5 ⎦ ⎣K17 ⎦
x˙ 6 0 K22 K23 0 0 0 x6 K27

References

[1] M.S. Park, D. Chwa, Swing-up and stabilization control of inverted-pendulum systems via coupled sliding-mode control method, IEEE Trans. Ind.
Electron. 56 (9) (2009) 3541–3555.
[2] Z.J. Li, J. Luo, Adaptive robust dynamic balance and motion controls of mobile wheeled inverted pendulums, IEEE Trans. Control Syst. Technol. 17 (1)
(2009) 233–241.
[3] H.T. Cho, S. Jung, Balancing and position tracking control of an inverted pendulum on a x-y plane using decentralized neural networks, IEEE/ASME Int.
Conf. Adv. Intell. Mechatron. 1 (2003) 181–186.
[4] L.B. Prasad, B. Tyagi, H.O. Gupta, Optimal control of nonlinear inverted pendulum system using PID controller and LQR: performance analysis without
and with disturbance input, Int. J. Autom. Comput. 11 (6) (2014) 661–670.
[5] H. Heng, Inverted pendulum control and parameter optimization based on MATLAB [D], Wuhan Univ. Sci. Technol. (2008).
[6] A.A. Bature1, S. Buyamin, M.N. Ahmad, M. Muhammad, A comparison of controllers for balancing two wheeled inverted pendulum robot, Int. J. Mech.
Mechatron. Eng. 14 (3) (2014) 62–68.
[7] F. Grasser, A. Arrigo, S. Colombi, A.C. Rufer, JOE: a mobile, inverted pendulum, IEEE Trans. Ind. Electron. 49 (1) (2002) 107–114.
[8] Z. Li, J. Luo, Adaptive robust dynamic balance and motion controls of mobile wheeled inverted pendulums [J], IEEE Trans. Control Syst. Technol. 17 (1)
(2009) 233–241.
[9] C.G. Yang, Z.J. Li, J. Li, Trajectory planning and optimized adaptive control for a class of wheeled inverted pendulum vehicle models, IEEE Trans. Cybern.
43 (1) (2013) 24–36.
[10] M.M. Al Omari1, S.F. Al Ganideh, Swinging up a real-time inverted pendulum system, J. Mech. Eng. Autom. 1 (2011) 407–411.
[11] D.P. Lindorff, Relay control of systems with parameter uncertainties and disturbances, Automatica 5 (6) (1969) 755–762.
[12] W.R. Sturgeon, W.V. Loscutoff, Application of modal control and dynamic observers to control of a double inverted pendulum, in: Joint Automatic
Control Conference, 10, 1972, pp. 857–865.
[13] K. Furuta, T. Ochiai, N. Ono, Attitude control of a triple inverted pendulum, Int. J. Control 39 (6) (1984) 1351–1365.
[14] H.X. Li, Variable universe adaptive fuzzy control on the quadruple inverted pendulum, Sci. China 45 (2) (2002) 213–224.
[15] T.B. Weaver, M.N. Glinka, A.C. Laing, Moving beyond quiet stance: applicability of the inverted pendulum model to stooping and crouching postures,
J. Biomech. 47 (14) (2014) 3574–3579.
[16] J.J. Wang, Simulation studies of inverted pendulum based on PID controllers, Simul. Model. Pract. Theory 19 (2011) 440–449.
[17] C.H. Huang, W.J. Wang, C.H. Chiu, Design and implementation of fuzzy control on a two-wheel inverted pendulum, IEEE Trans. Ind. Electron. 58 (7)
(2011) 2988–3001.
[18] S. Kizir, Z. Bingul, C. Oysu, Fuzzy control of a real time inverted pendulum system, J. Intell. Fuzzy Syst. 21 (2010) 121–133.
[19] H.L. Wang, H.B. Dong, L.H. He, Y.L. Shi, Y. Zhang, Design and simulation of LQR controller with the linear inverted pendulum, in: International Confer-
ence on Electrical and Control Engineering, 2010, pp. 699–702.
[20] V.I. Utkin, Sliding Modes in Control and Optimization, Springer-Verlag, London, 1992 Chap. 1.
[21] C. Edwards, S.K. Spurgeon, Sliding Mode Control: Theory and Applications, Taylor & Francis, Ltd., London, 1998 Chap. 1.
[22] Y. Shtessel, C. Edwards, L. Fridman, L. Levant, Sliding Mode Control and Observation, Springer, New York, 2014 Chap. 1.
[23] J. Ackermann, V. Utkin, Sliding mode control design based on Ackermann’s formula, IEEE Trans. Autom. Control 43 (2) (1998) 234–237.
[24] S. Jung, S.S. Kim, Control experiment of a wheel-driven mobile inverted pendulum using neural network, IEEE Trans. Control Syst. Technol. 16 (2)
(2008) 297–303.
[25] C.H. Chiu, The design and implementation of a wheeled inverted pendulum using an adaptive output recurrent cerebellar model articulation controller,
IEEE Trans. Ind. Electron. 57 (5) (2010) 1814–1822.
[26] P. Cui, Z.X. Weng, P. Ron, Novel active fault-tolerant control scheme and its application to a double inverted pendulum system, J. Syst. Eng. Electron.
19 (1) (2008) 134–140.
[27] L.B. Prasad, B. Tyagi, H.O. Gupta, Optimal control of nonlinear inverted pendulum dynamical system with disturbance input using PID controller and
LQR, IEEE Int. Conf. Control Syst. Comput. Eng. (2011) 540–545.
[28] E.M. Jafarov, Variable Structure Control and Time-Delay Systems, WSEAS Press, Athens, Greece, 2009 Preface (Chap. 0).
[29] K. Furuta, T. Okutani, H. Sone, Computer control of a double inverted pendulum, Comput. Electr. Eng. 5 (1) (1978) 67–84.
[30] H. Wakuya, Y. Sankai, Y. Morita, Seasonal variation of neuro-controller training period observed in the control task of inverted pendulum, in: Interna-
tional Congress Series, 1301, 2007, pp. 114–118.
[31] C.P. Tan, M.K. Habib, Robust sensor fault reconstruction applied in real-time to an inverted pendulum, Mechatronics 17 (7) (2007) 368–380.
[32] S. Cong, D.J. Zhang, H.H. Wei, Comparative study on three control methods of the single inverted pendulum system, Syst. Eng. Electron. 23 (11) (2001)
47–49.
[33] S. Oh, S. Jung, W. Pedrycz, Design of optimized fuzzy cascade controllers by means of hierarchical fair competition-based genetic algorithms, Expert
Syst. Appl. 36 (9) (2009) 11641–11651.
[34] L. Chang, A. Lee, A hybrid controller design for bi-axial inverted pendulum system, Int. J. Robust Nonlinear Content 19 (5) (2009) 512–531.
[35] D. Robert, O. Sename, D. Simon, An H∞ LPV design for sampling varying controllers: experimentation with a T-inverted pendulum, IEEE Trans. Control
Syst. Technol. 18 (3) (2010) 741–749.
[36] H. Xu, Z. Sun, F. Sun, Studies of fuzzy neural sliding mode control based on double inverted pendulum, in: Proceedings of China Intelligent Automation
Conference, 2014.
[37] S. Vijayan, M. Mathews, Design of rotary inverted pendulum with LQR controller, Int. J. Electron. Electr. Comput. Syst. 4 (2015) 22–32.
[38] X.M. Chen, H.X. Zhou, R.H. Ma, F.C. Zuo, G.F. Zhai, M.L. Gong, Linear motor driven inverted pendulum and LQR controller design, in: IEEE International
Conference on Automation and Logistics, 2007, pp. 1750–1754.
[39] R.M. Cao, H.X. Zhou, R.H. Ma, Ang Su., Equipment design of linear motor driven inverted pendulum based on cSPACE, in: IEEE International Conference
on Information and Automation, 2011, pp. 760–763.
[40] R.M. Cao, H.X. Zhou, R.H. Ma, Experiment platform design cspace-based for a permanent magnet linear synchronous motor driven inverted pendulum,
Appl. Mech. Mater. 84-85 (2011) 452–456.
50 X. Chen et al. / Simulation Modelling Practice and Theory 81 (2018) 31–50

[41] S.E. Beid, S. Doubabi, DSP-based implementation of fuzzy output tracking control for a boost converter, IEEE Trans. Ind. Electron. 61 (1) (2014).
[42] K.H. Hong, W.S. Gan, Y.K. Chong, Rapid prototyping of DSP algorithms on VLIW TMS320C6701 DSP, Microprocess. Microsyst. 26 (2002) 311–324.
[43] C. Liu, Research on the stability control system of the double inverted pendulum, College of Astronautics, Northwestern Poly technical University,
2007.
[44] Z.M. Wang, J.J. Sun, H. Yue, Research on an inverted pendulum optima control system based on LQR, Ind. Instrum. Autom. 3 (2005) 6–9.
[45] S. Cong, H.F. Du, Z.Q. Qin, Real-time control of double inverted pendulum in simulink environment, Syst. Eng. Electron. 26 (4) (2004) 553–555.

S-ar putea să vă placă și