Anti-Swing and Position Control of Double Inverted Pendulum (DIP) on Cart Using Hybrid Neuro-Fuzzy Controllers

Автор: Ashwani Kharola

Журнал: International Journal of Information Technology and Computer Science(IJITCS) @ijitcs

Статья в выпуске: 7 Vol. 8, 2016 года.

Бесплатный доступ

This paper illustrates a comparison study for control of highly non-linear Double Inverted Pendulum (DIP) on cart. A Matlab-Simulink model of DIP has been built using Newton's second law. The Neuro-fuzzy controllers stabilizes pendulums at vertical position while cart moves in horizontal direction. This study proposes two soft-computing techniques namely Fuzzy logic reasoning and Neural networks (NN's) for control of DIP systems. The results shows that Fuzzy controllers provides better results as compared to NN's controllers in terms of settling time (sec), maximum overshoot (degree) and steady state error. The regression (R) and mean square error (MSE) values obtained after training of Neural network were satisfactory. The simulation results proves the validity of proposed techniques.

Еще

DIP, MF's, Fuzzy logic reasoning, Neural networks, MSE, Matlab, Simulink, FLC's

Короткий адрес: https://sciup.org/15012506

IDR: 15012506

Текст научной статьи Anti-Swing and Position Control of Double Inverted Pendulum (DIP) on Cart Using Hybrid Neuro-Fuzzy Controllers

Published Online July 2016 in MECS

Inverted Pendulum (IP) is one of the complex, highly non-linear and multi-variable system [1], [2]. It is widely used as laboratory model for practical implementation and demonstration of various control systems. Various Soft computing techniques "Ref. [3]" have been used for Stabilization of IP systems. Chen et al. [4] designed a neural network controller based on two stage chaos optimization algorithm for DIP system. The controller was able to solve local minimum problem one of the disadvantage of Back-propagation (BP) neural networks. Xiu-fen at al. [5] proposed a controller based on BP algorithm of Artificial neural network (ANN) having 4 input and 3 layer structure for IP system. The ANN controller was further compared with fuzzy logic controller. J. Yu et al. [6] proposed a LQR controller for control of Linear double flexible inverted pendulum system. The LQR controller was further used to design an efficient neural network controller based on Sugeno-type fuzzy inference system. The simulation results proved that neural controller was better as compared to LQR controller in terms of speed, stability and accuracy.

Yi-Jen and Min [7] designed an Adaptive terminal sliding mode recurrent fuzzy neural network (ATSRFNN) to control a coupled DIP system. The ATSRFNN controller was composed of a recurrent fuzzy neural network (RFNN) and an adaptive terminal sliding (ATS) controller. The RFNN controller was designed to mimic an ideal controller and ATS controller controls the external disturbances. Fujinaka et al. [8] proposed a Neuro-PID control architecture to stabilize DIP system. The gain parameters of PID controller were tuned using neural networks. The simulation results shows the effectiveness of the proposed control architecture. Sang at al. [9] performed the control of DIP with improved BP algorithm of ANN. The BP network of 6-10-1 structure was used for learning. In "Ref. [10]" a locally linear neuro fuzzy (LLNF) approach for building an inverse model for friction compensation of DIP has been proposed. Sang et al. [11] proposed an artificial neural network (ANN) with improved BP algorithm for balance control of double inverted pendulum system. The training data for ANN was acquired from three-loop PID algorithm. The BP network of 6-10-1 structure with Tansig function in the hidden layer and Purelin function in the outer layer was used.

In "Ref. [12]" an experimental study on decentralized neural network to control a 2-degree of freedom inverted pendulum on an x-y plane has been performed. The neural controllers were applied to control both angle and position of the cart. Fuyan Cheng et al. [13] designed a high accuracy and high resolution fuzzy controller to stabilize a DIP at upright position. They combined fuzzy control theory with optimal control theory to determine composition coefficients. Lee and Jung [14] proposed a Takagi-Sugeno (T-S) Neuro fuzzy control scheme to control IP system. The BP learning algorithm for the T-S neuro fuzzy network was derived for on-line learning and control. Xiao et al. [15] presented a motion mode control for double inverted pendulum system based on fuzzy logic and neural network. The parameter of neural controller were optimized by back propagation algorithm. Further, the motion modes of the system were defined and adjusted online. Experimental implementation and testing proved the validity of proposed methodology. This study shows a comparison analysis of two different soft-computing approaches for control of DIP on cart. Initially fuzzy logic controllers (FLC's) were used for the control of DIP systems. The data sets from FLC's were used for training of NN's controllers. The modeling and simulation of the complete system and sub-system were done in Matlab-Simulink. The results proved the validity of the proposed techniques.

Equation's of motion for Cart

̈= (F- -b ̇)

  • II.    DIP on Cart

DIP consists of two inverted pendulums mounted on cart which is free to move along horizontal direction. The cart has to be controlled by an input force F. A view of DIP is shown in fig.1. "Ref. [16]". It's dynamics represents a two-link kinematic joint for Robotic arm, robotic knee, multi-stage rocket etc "Ref. [17]". The objective is to control the DIP system such that angle of bottom pendulum ( ), angle of top pendulum ( ), and cart position (x) should be equal to zero. A view of various input parameters for DIP system are shown in table 1.

Fig.1. Double Inverted Pendulum on cart

Table 1. Input parameters of DIP system

Symbol

Parameter

Value

Unit

M

Mass of Cart

2

Kg

m -

Mass of Bottom Pendulum

1

Kg

m 2

Mass of Top Pendulum

0.5

Kg

L -

Length of Bottom Pendulum

0.1

m

L2

Length of Top Pendulum

0.1

m

I

Moment of inertia

0.006

kgm²

g

Acceleration due to gravity

9.8

m/s²

b

Coefficient of friction

0.1

Ns/m²

  • III.    Mathematical Equations

The Matlab-Simulink model for DIP was derived using Newton's Second law. The governing equations for subsystems were derived as follows.

Equation's of motion for Bottom Pendulum

= (     cos + sin -

̇ +     cos + sin )(2)

Pl = mL (- 0 1 L 1 cos 01 -0" 1L L sin 0L +g)

+ m2 (2 0^L 1 cos 01 -2 UlL 1 sin 0l -

022ccos02-02L 2COSH2+g)

=    ( ̈+ ̇ sin - ̈ cos ) + m 2 (x +20 c L Lsin0 l-20lL Lcos 0 l+

̇ sin - ̈ cos(4)

Equation's of motion for Top Pendulum

̈ =  (      cos + sin -    ̇ )(5)

P2 = mc (-2 0 c L 1 cos 01 -2 0 l L L sin 0 l -

0L2ccos0c-0cLccos0c+g)

=    ( ̈+2 ̇ sin -2 ̈ cos +

+0cL2sin02-02 Lccos0 2)(7)

  • IV.    Fuzzy Logic Control of Dip System

Fuzzy logic controller (FLC) is one of the most successful application of fuzzy set theory which involves the application of linguistic variables rather than numerical variables "Ref. [18]". The advantage of using FLC is that it substitute a fuzzy rule based system for a skilled human operator "Ref. [19]". This study used Mamdani fuzzy inference system (M-FIS) having gbell MF's for designing of FLC's. A total of seven linguistic variables were selected. A view of gbell MF's and if-then fuzzy rules for cart controller are shown in fig.2 and table 2 respectively.

Fig.2. MF's for Cart controller

Table 2. If-then fuzzy rules

FORCE

X

X Dot

NL

NM

NS

ZE

PS

PM

PL

NL

NL

NL

NL

NM

NS

ZE

NL

NL

NL

NM

NS

ZE

PS

NL

NL

NM

NS

ZE

PS

PM

NL

NM

NS

ZE

PS

PM

PL

NM

NS

ZE

PS

PM

PL

PL

NS

ZE

PS

PM

PL

PL

PL

ZE

PS

PM

PL

PL

PL

PL

Fig.5. Regression plot Validation data

  • V.    Neural Network Control of DIP System

The data sets for NN's controllers were considered from results of Fuzzy controller. A total of 302 data sets were collected which were randomly divided into training, validation and testing samples. The training was done using Levenberg-Marquardt back propagation algorithm and training performance was measured Mean squared error (MSE) method. Training automatically stops when generalization stops improving, as indicated by an increase in MSE of validation samples. A view of neural network control architecture for designing of cart controller is shown in fig.3. It consists of two inputs and one output with 25 neurons in the hidden layer and 1 neuron in the output layer.

Fig.3. Neural network architecture

The regression plots for training, validation and test data samples for cart controller are shown from fig.4 to fig.6.

Fig.4. Regression plot for Training data

Fig.6. Regression plot for Test data

The different values of R and MSE, for cart, bottom pendulum and top pendulum upto 4 decimal places are shown in table 3.

Table 3. Values of R and MSE for different controllers

Regression values (R)

Cart

Bottom pendulum

Top pendulum

Training

0.9996

0.9999

0.9970

Validation

0.9963

0.9863

0.9671

Test

0.9995

0.9852

0.9969

All

0.9743

0.9957

0.9907

MSE

2.27e-08

0.00413

0.0251

  • VI.    Simulink Modeling

The mathematical equations were used for developing Matlab-Simulink model of the DIP system. A DIP subsystem was built which was finally masked to give complete system. A view of Simulink of DIP sub-system and Simulink of DIP are shown in fig.7 and fig.8 respectively.

Fig.7. Simulink of DIP system

Fig.8. Simulink of DIP sub-system

The Simulation results for fuzzy and NN's controller were shown with the help of graphs and tables below.

Fig.9. Cart Position control

Table 4. Output responses for Cart position

Performance parameter

Fuzzy controller

NN's controller

Settling time (sec)

5sec

.....

Max. Overshoot (degrees)

60º

.....

Steady state error

0

.....

Fig.10. Cart Velocity control

Table 5. Output responses for Cart velocity

Performance parameter

Fuzzy controller

NN's controller

Settling time (sec)

1.2 sec

.....

Max. Overshoot (degrees)

-2.5 º

.....

Steady state error

0

.....

Fig.11. Bottom pendulum angle control

Table 6. Output responses for Bottom pendulum angle

Performance parameter

Fuzzy controller

NN's controller

Settling time (sec)

1.4 sec

3.8 sec

Max. Overshoot (degrees)

-3.3º

-3.7º

Steady state error

0

0

Table 7. Bottom pendulum angular velocity

Performance parameter

Fuzzy controller

NN's controller

Settling time (sec)

2 sec

4 sec

Max. Overshoot (degrees)

1.2º to -8.5º

3.5º to -9.8º

Steady state error

0

0

Fig.13. Top pendulum angle control

Table 8. Top pendulum angle

Performance parameter

Fuzzy controller

NN's controller

Settling time (sec)

1.5 sec

3.5 sec

Max. Overshoot (degrees)

0.1º to -3.2º

3.6º to -0.2

Steady state error

0

0

Table 9. Top pendulum angular velocity

Performance parameter

Fuzzy controller

NN's controller

Settling time (sec)

1.5 sec

4 sec

Max. Overshoot (degrees)

0.2º to -7.8º

4.5º to -3.2º

Steady state error

0

0

Fig.12. Bottom pendulum angular velocity

Fig.14. Top pendulum angular velocity control

  • VIII.    Conclusion

A comparison study for control of highly non-linear DIP system on cart has been proposed. A fuzzy logic controller was designed which controls the complete system within 2 sec and zero steady state error. The data sets from fuzzy controller were used to train the Neural network controllers using Levenberg-Marquardt method. The Regression and MSE values for NN's controllers were adequate. It was also observed that NN's controller was not able to control cart position and velocity but provides excellent results for pendulum controllers. The maximum overshoot for fuzzy controller were less as compared to NN's controllers. As an extension to future work other methodologies including Genetic Algorithm (GA), Particle swarm optimization (PSO) etc can also be incorporated and compared for control of non-linear systems.

Список литературы Anti-Swing and Position Control of Double Inverted Pendulum (DIP) on Cart Using Hybrid Neuro-Fuzzy Controllers

  • C.C Lee, "Fuzzy Logic Control Systems: Fuzzy Logic Controller -Part I & II", IEEE Transactions on Systems, Man and Cybernetics, 20(2), pp. 403-435, 1990.
  • M.M. Gupta and C.J. Qi, "Fusion of Fuzzy logic and Neural Network with Application to Decision and Control Problems", In Proc. of IEEE American Control conference, pp. 30-31, 26-28 June 1991, Bostan, MA, USA.
  • N.S. Bhangal, "Design and Performance of LQR and LQR based Fuzzy controller for Double Inverted Pendulum system", Journal of Image and Graphics, 1(3), pp. 143-146, doi: 10.12720/joig.1.3.143-146, 2013
  • W. Chen, Q. Li, and R. Gu, "Chaos optimization neural network control for the stability of double inverted pendulum", In Proc. of 2nd IEEE International conference on Industrial Mechatronics and Automation (ICIMA), pp. 491-494, 30-31 May 2010, Wuhan, China.
  • Y. Xiu-fen, D. Hai-bin, and G. Hua-jun, "Research for Inverted Pendulum control based on BP Algorithm of ANN", Measurement and Control Technique, 22(3), pp. 41-44, 2003.
  • J. Yu, L. Huang, and S. Zhou, "Fuzzy control of Linear flexible Double Inverted Pendulum system", In Proc. of IEEE International Conference on Control Engineering and Communication Technology (ICCECT), 7-9 Dec. 2012, Liaoning, pp. 342-345, doi: 10.1109/ICCECT.2012.48.
  • M. Yi-Jen, and L.C. Min, "Double Inverted pendulum decoupling control by adaptive terminal sliding mode recurrent fuzzy neural network", Journal of Intelligent and Fuzzy systems, 26(4), pp. 1723-1729, doi: 10.3233/IFS-130851, 2014.
  • T. Fujinaka, Y. Kishida, M. Yoshioka, and S. Omatu, "Stabilization of Double Inverted Pendulum with Self-tuning Neuro PID", In Proc. of IEEE International Joint conference on Neural Networks (IJCNN), pp. 43-45, 24-27 July 2000.
  • Y. Sang, Y. Fan, and B. Liu, "Double Inverted Pendulum control based on three loop PID and improved BP neural network", In Proc. of 2nd IEEE International conference on Digital Manufacturing and Automation (ICDMA), pp. 456-459, 7 Aug 2011, Zhangjiajie, Hunan.
  • A. Nejafard, M.J. Yazdanpanch, and I. Hassanzadeh, "Friction compensation of double inverted pendulum on a cart using locally linear neuro-fuzzy model", Neural Computing and Applications, 22(2), pp. 337-347, doi: 10.1007/s00521-011-0686-3, 2011.
  • Y. Sang, Y. Fan, and D. Liu, "Double Inverted Pendulum control based on three-loop PID and improved BP Neural network", In Proc. of IEEE 2nd International Conference on Digital Manufacturing and Automation (ICDMA), 5-7 Aug. 2011, Zhangjiajie, Hunan, pp. 456-459, doi: 10.1109/ICDMA.2011.118.
  • S. Jung, H.T. Cho, and T.C. Hsia, "Neural network control for position tracking of a two-axis Inverted Pendulum system: Experimental studies", IEEE Transactions on Neural Networks, 18(4), pp. 1042-1048, doi: 10.1109/TNN.2007.8991-28, 2007
  • F. Cheng, G. Zhong, Y. Li, and Z. Xu, "Fuzzy control of Double inverted pendulum", Fuzzy Sets and Systems, 79(3), pp. 315-321,doi:10.1016/0165-0114(95)00156-5, 1996.
  • G.H. Lee, and S. Jung, "Control of Inverted Pendulum system using a Neuro-fuzzy controller for Intelligent control education", In Proc. of IEEE International conference on Mechatronics and Automation (ICMA), pp. 965-970, 5-8 Aug 2008, Takamatsu.
  • J. Xiao, S. Zhang, J. Xiao, and N. Xi, "Motion mode control in Double Inverted Pendulum system", In Proc. of IEEE International Conference on Advanced Intelligent Mechatronics", 24-28 July 2008, pp. 831-836, Monterey, CA, doi: 10.1109/AIM.2005.1511112.
  • S. Qianlai, and S. Zhiyi, "Application of Multistage Fuzzy Control to Double Inverted Pendulum", In Proc. IEEE International Conference on Control and Automation (ICCA), pp. 2027-2030, December 9-11, 2009, Christchurch, New Zealand.
  • M. Nalavade, M.J. Bhagat, and V.V. Patil, "Balancing Double Inverted Pendulum on cart by Linearization Technique", International Journal of Recent Technology and Engineering (IJRTE), 3(1),pp. 153-157, 2014.
  • C.W. Ji, F. Lei, L.K. Kin, "Fuzzy logic controller for an inverted pendulum system", In Proc. of IEEE International Conference on Intelligent Processing Systems, 28-31 Oct. 1997, Beijing, pp 185-189, doi: 10.1109/ICIPS.1997.672762.
  • Y. Liu, Z. Chen, D. Xue, and X. Xu, "Real-time controlling of inverted pendulum by fuzzy logic", In Proc. of IEEE International Conference on Automation and Logistics, 5-7 Aug. 2009, Shenyang, pp 1180-1183, doi: 10.1109/ICAL.2009.5262618.
Еще
Статья научная