<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">WJET</journal-id><journal-title-group><journal-title>World Journal of Engineering and Technology</journal-title></journal-title-group><issn pub-type="epub">2331-4222</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/wjet.2016.42026</article-id><article-id pub-id-type="publisher-id">WJET-66673</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Chemistry&amp;Materials Science</subject><subject> Engineering</subject></subj-group></article-categories><title-group><article-title>
 
 
  Simulation of a Triple Inverted Pendulum Based on Fuzzy Control
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>ei</surname><given-names>Chen</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Nkurunziza</surname><given-names>Theodomile</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib></contrib-group><aff id="aff1"><addr-line>School of Mechanical Engineering, Jiangsu University, Zhenjiang, China</addr-line></aff><pub-date pub-type="epub"><day>29</day><month>04</month><year>2016</year></pub-date><volume>04</volume><issue>02</issue><fpage>267</fpage><lpage>272</lpage><history><date date-type="received"><day>18</day>	<month>January</month>	<year>2016</year></date><date date-type="rev-recd"><day>accepted</day>	<month>20</month>	<year>May</year>	</date><date date-type="accepted"><day>23</day>	<month>May</month>	<year>2016</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
  The inverted pendulum is a classic problem in dynamics and control theory and is widely used as a benchmark for testing control algorithms. This paper studies the use of fuzzy control method to study the stability control problem of a triple inverted pendulum system. By the linear model of the system, the feedback weight matrix of the LQR optimal control and the feedback parameters of the linear optimal control are designed to determine the parameters of the fuzzy controller. The simulation results show that the proposed method can achieve the stability control of the three stage inverted pendulum, and has good dynamic performance with simple parameter selection.
 
</p></abstract><kwd-group><kwd>Triple Inverted Pendulum</kwd><kwd> Fuzzy Control</kwd><kwd> LQR</kwd><kwd> Matlab Simulation</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>The inverted pendulum system is a typical nonlinear, strong coupling, multivariable, naturally unstable system [<xref ref-type="bibr" rid="scirp.66673-ref1">1</xref>] . In the control process, the inverted pendulum can effectively be used for studies key issues such as the quality of stability, robustness, mobility, tracking and that is why, it is the ideal model for testing various theories in control engineering [<xref ref-type="bibr" rid="scirp.66673-ref2">2</xref>] [<xref ref-type="bibr" rid="scirp.66673-ref3">3</xref>] . So far, it has been used in classical control, modern control and intelligent control for stability analysis with techniques such as LQR control [<xref ref-type="bibr" rid="scirp.66673-ref4">4</xref>] [<xref ref-type="bibr" rid="scirp.66673-ref5">5</xref>] fuzzy control method [<xref ref-type="bibr" rid="scirp.66673-ref6">6</xref>] , fuzzy neural network method [<xref ref-type="bibr" rid="scirp.66673-ref7">7</xref>] etc. When fuzzy control is used, the total number of fuzzy rules growth exponentially without the use of real-time processing [<xref ref-type="bibr" rid="scirp.66673-ref8">8</xref>] . Through the fusion of multiple variables, the input variables of the fuzzy controller are reduced, diminishing the difficulty of the design and improving the real-time performance of the system.</p><p>In this paper, the design of a fuzzy controller based on the fusion structure for the triple inverted pendulum system is analyzed; the fusion weights of the multi-variables are based on the linear model. The control method has the advantages of simple structure, stable control and better convergence.</p></sec><sec id="s2"><title>2. Triple Inverted Pendulum System Model</title><sec id="s2_1"><title>2.1. Physical Model</title><p>As shown in <xref ref-type="fig" rid="fig1">Figure 1</xref>, the triple inverted pendulum system is mainly controlled by the object, rails, motors, pulleys, belts and electrical measuring device component. The control object is composed of a trolley, a pendulum with two additional links that are connected by a bearing, and can freely rotate in x-y direction.</p></sec><sec id="s2_2"><title>2.2. Mathematical Model</title><p>In order to facilitate the study for the triple inverted pendulum system shown in <xref ref-type="fig" rid="fig1">Figure 1</xref>, assumptions of the following conditions are true [<xref ref-type="bibr" rid="scirp.66673-ref9">9</xref>] :</p><p>1) Friction torque and the relative speed of each part (angular velocity) are proportional;</p><p>2) There is no slip between the belt pulley and the drive belt;</p><p>3) Link 1, Link 2, or Link 3 can be regarded as a rigid body;</p><p>The nonlinear dynamic model of the three stage inverted pendulum system is:</p><disp-formula id="scirp.66673-formula527"><label>(1)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/15-1560269x6.png"  xlink:type="simple"/></disp-formula><p>The meaning of each parameter can refer to the literature [<xref ref-type="bibr" rid="scirp.66673-ref4">4</xref>] .</p><p>The system status is<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/15-1560269x7.png" xlink:type="simple"/></inline-formula>, because the sensor can only measure the relative rotation angle of two connected swing rods, so the measurement is<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/15-1560269x8.png" xlink:type="simple"/></inline-formula>.</p></sec></sec><sec id="s3"><title>3. Fuzzy Controller</title><sec id="s3_1"><title>3.1. Fuzzy Controller Structure Design</title><p>The fusion method is used to design a fuzzy controller for the triple inverted pendulum system. The eight input variables are divided into two groups: the direct quantity and the differential value and those 2 groups are a fused into two variables (see <xref ref-type="fig" rid="fig2">Figure 2</xref>).</p></sec><sec id="s3_2"><title>3.2. Parameter Setting of Fuzzy Controller</title><p>Fuzzy controller for the above structure set the parameters as follows:</p><p>1) Determine the input and output domain</p><p>For the E and EC domain can be selected as [−1, 1], the domain of Y is also selected as [−1, 1].</p><p>2) Determine the value of a variable membership function language</p><p>For E, EC and Y, are selected 7 language values, respectively, as NB, NM, NS, ZE, PS, PM, PB. And the “trimf” membership function is adopted [<xref ref-type="bibr" rid="scirp.66673-ref10">10</xref>] , in which the value of the core and the boundary value is the uniform distribution of Matlab by default.</p><p>3) Determine fuzzy rules</p><p>In accordance with the principles of linear fusion of fuzzy rules designed as shown in <xref ref-type="table" rid="table1">Table 1</xref>.</p><p>4) To determine the gain parameters (fusion factor, quantization factor and scale factor) the optimal state feedback matrix can be designed according to the linear model of the system.</p><p>K = [k1, K2, K3, K4, K5, K6, K7, k8], K00 = 5 can be set, the corresponding gain parameters can be obtained as follows:</p><p>K1 = k1/K00, K2 = k2/K00, K3 = k3/K00, K4 = k4/K00,</p><p>K5 = k5/K00, K6 = k6/K00, K7 = k7/K00, K8 = k8/K00, K0 = −2K00.</p><p>Using the best two performance indicators, taking Q = diag (10100100010000, 0, 0, 0, 0) and R = 1, using the LQR Matlab () function, the optimal linear control feedback coefficient matrix is</p><fig id="fig1"  position="float"><label><xref ref-type="fig" rid="fig1">Figure 1</xref></label><caption><title> Triple inverted pendulum physical system architecture diagram</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/15-1560269x9.png"/></fig><fig id="fig2"  position="float"><label><xref ref-type="fig" rid="fig2">Figure 2</xref></label><caption><title> Triple inverted pendulum fuzzy controller structure diagram system</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/15-1560269x10.png"/></fig><table-wrap id="table1" ><label><xref ref-type="table" rid="table1">Table 1</xref></label><caption><title> Fuzzy rules of the fuzzy controller of the triple inverted pendulum</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >E EC</th><th align="center" valign="middle" >NB</th><th align="center" valign="middle" >NM</th><th align="center" valign="middle" >NS</th><th align="center" valign="middle" >ZE</th><th align="center" valign="middle" >PS</th><th align="center" valign="middle" >PM</th><th align="center" valign="middle" >PB</th></tr></thead><tr><td align="center" valign="middle" >MB</td><td align="center" valign="middle" >NB</td><td align="center" valign="middle" >NB</td><td align="center" valign="middle" >NM</td><td align="center" valign="middle" >NM</td><td align="center" valign="middle" >NS</td><td align="center" valign="middle" >NS</td><td align="center" valign="middle" >ZE</td></tr><tr><td align="center" valign="middle" >NM</td><td align="center" valign="middle" >NB</td><td align="center" valign="middle" >NM</td><td align="center" valign="middle" >NM</td><td align="center" valign="middle" >NS</td><td align="center" valign="middle" >NS</td><td align="center" valign="middle" >ZE</td><td align="center" valign="middle" >PS</td></tr><tr><td align="center" valign="middle" >NS</td><td align="center" valign="middle" >NM</td><td align="center" valign="middle" >NM</td><td align="center" valign="middle" >NS</td><td align="center" valign="middle" >NS</td><td align="center" valign="middle" >ZE</td><td align="center" valign="middle" >PS</td><td align="center" valign="middle" >PS</td></tr><tr><td align="center" valign="middle" >ZE</td><td align="center" valign="middle" >NM</td><td align="center" valign="middle" >NS</td><td align="center" valign="middle" >NS</td><td align="center" valign="middle" >ZE</td><td align="center" valign="middle" >PS</td><td align="center" valign="middle" >PS</td><td align="center" valign="middle" >PM</td></tr><tr><td align="center" valign="middle" >PS</td><td align="center" valign="middle" >NS</td><td align="center" valign="middle" >NS</td><td align="center" valign="middle" >ZE</td><td align="center" valign="middle" >PS</td><td align="center" valign="middle" >PS</td><td align="center" valign="middle" >PM</td><td align="center" valign="middle" >PM</td></tr><tr><td align="center" valign="middle" >PM</td><td align="center" valign="middle" >NS</td><td align="center" valign="middle" >ZE</td><td align="center" valign="middle" >PS</td><td align="center" valign="middle" >PS</td><td align="center" valign="middle" >PM</td><td align="center" valign="middle" >PM</td><td align="center" valign="middle" >PB</td></tr><tr><td align="center" valign="middle" >PB</td><td align="center" valign="middle" >ZE</td><td align="center" valign="middle" >PS</td><td align="center" valign="middle" >PS</td><td align="center" valign="middle" >PM</td><td align="center" valign="middle" >PM</td><td align="center" valign="middle" >PB</td><td align="center" valign="middle" >PB</td></tr></tbody></table></table-wrap><p>K = [−3.1623, −57.2348300.8179, −383.7509, −11.5829, −3.8366, 5.3233, −51.9479].</p><p>The fusion factor of the fuzzy controller can be determined:</p><p>K1 = −0.6325, K2 = −11.4470, K3 = 60.1636, K4 = −76.7502, K5 = −2.3166, K6 = −0.7673, K7 = 1.0647, K8 = −10.3896, at the same time, it can be determined that the quantization factor is: KE = 1, KEC = 1; Scale factor KU = −10.</p><p>5) Fuzzy reasoning method using Mamdani fuzzy inference methods.</p><p>6) Determine the solution fuzzy method using the gravity method (COG) to solve the fuzzy.</p></sec></sec><sec id="s4"><title>4. Simulation and Analysis</title><p>Based on the Matlab environment, the triple inverted pendulum fuzzy control system simulation, the initialization code is shown below:</p><disp-formula id="scirp.66673-formula528"><graphic  xlink:href="http://html.scirp.org/file/15-1560269x11.png"  xlink:type="simple"/></disp-formula><p>Setting the initial state of the system X = [0.05, 0.08, 0.001, 0.008, 0, 0, 0, 0], the simulation run triple inverted pendulum fuzzy control system model and the results show the linear velocity and angular velocity of the three angles goes to zero.</p><p>As shown in <xref ref-type="fig" rid="fig3">Figure 3</xref>, the position curve can be seen that the triple inverted pendulum system is under the control of the fuzzy controller.</p><p>And that the displacement is 0, the angles of the 3 links go to zero, the swing rod is stable and upright, and the control effect is good.</p><p>The effect of quantization factor and scale factor on the control effect of fuzzy controller is further analyzed. Because the fuzzy controller is obtained by the linear state feedback controller, in order to maintain the approximate linear relationship between the control variables and the state variables, the value of the quantization factor and scale factor can be changed under the following conditions:</p><p>1) KE = KEC;</p><p>2) KEKU = 2K00 = −10;</p><p>So as long as the determination of KE, KEC, KU one of the other, the other two also identified. When KE = 1, the input of the fuzzy controller is E and EC, the peak value of E can be found to be −0.1 and 0.6, while the peak value of EC is −0.02 and 0.18. So we can increase the value of the quantization factor, and make the input variable cover the scope of the controller.</p><p>The results show that the control system is still in steady state when the KE = 1.5 is in. And when KE = 4, the output of the control system is divergent, and the system is not stable, as shown in <xref ref-type="fig" rid="fig4">Figure 4</xref>.</p><p>Therefore, when the range of KE is 1 - 1.5, the control effect can be obtained.</p><fig id="fig3"  position="float"><label><xref ref-type="fig" rid="fig3">Figure 3</xref></label><caption><title> Inverted pendulum fuzzy control simulation results</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/15-1560269x12.png"/></fig><fig id="fig4"  position="float"><label><xref ref-type="fig" rid="fig4">Figure 4</xref></label><caption><title> Fuzzy Control Simulation position curve (KE = 4)</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/15-1560269x13.png"/></fig></sec><sec id="s5"><title>5. Conclusion</title><p>In this paper, the used of fuzzy has facilitate the control of the triple inverted pendulum. Through the linear model of the system, the LQR optimal control feedback weight matrix was designed, and the fuzzy control parameters were designed based on the feedback parameters of the optimal linear control. The simulation results show that the method can realize the triple inverted pendulum system stability control and that fuzzy controller design method can also be applied to other multi variable and nonlinear system control problems.</p></sec><sec id="s6"><title>Cite this paper</title><p>Wei Chen,Nkurunziza Theodomile, (2016) Simulation of a Triple Inverted Pendulum Based on Fuzzy Control. World Journal of Engineering and Technology,04,267-272. doi: 10.4236/wjet.2016.42026</p></sec></body><back><ref-list><title>References</title><ref id="scirp.66673-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Liu, Y.M., Chen, Z., Xue, D.Y. and Xu, X.H. (2009) Real-Time Controlling of Inverted Pendulum by Fuzzy Logic. 2009 IEEE International Conference on Automation and Logistics, 1180-1183.  
http://dx.doi.org/10.1109/ical.2009.5262618</mixed-citation></ref><ref id="scirp.66673-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Gupta, M.K., Bansal, K. and Singh, A.K. (2014) Stabilization of Triple Link Inverted Pendulum System Based on LQR Control Technique. Recent Advances and Innovations in Engineering (ICRAIE), IEEE.</mixed-citation></ref><ref id="scirp.66673-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Muskinja, N. and Tovornik, B. (2006) Swinging up and Stabilization of a Real Inverted Pendulum. IEEE Transactions on Industrial Electronics, 53. http://dx.doi.org/10.1109/TIE.2006.870667</mixed-citation></ref><ref id="scirp.66673-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Li, Y.C., Zhu, X. and Zheng, X.K. (2006) LQ R Algorithm Control Simulation of the Inverted Pendulum System. North China University of Technology.</mixed-citation></ref><ref id="scirp.66673-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">El-Nagar, A.M., El-Bardini, M. and EL-Rabaie, N.M. (2014) Intelligent Control for Nonlinear Inverted Pendulum Based on Interval Type-2 Fuzzy PD Controller. Alexandria Engineering Journal, 53, 23-32.  
http://dx.doi.org/10.1016/j.aej.2013.11.006</mixed-citation></ref><ref id="scirp.66673-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Yeh, Z. and Li, K. (2003) A Systematic Approach for Designing Multistage Fuzzy Control Systems Fuzzy Sets and Systems.</mixed-citation></ref><ref id="scirp.66673-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Wang, L.X. (1997) A Course in Fuzzy Systems and Control. Prentice-Hall, Englewood Cliffs.</mixed-citation></ref><ref id="scirp.66673-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Yasunobu, S. and Mori, M. (1997) Swing up Fuzzy Controller for Inverted Pendulum Based on a Human Control Strategy. Proceedings of the Sixth IEEE International Conference of the Fuzzy Systems, 3, 1621-1625.  
http://dx.doi.org/10.1109/fuzzy.1997.619783</mixed-citation></ref><ref id="scirp.66673-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Krishen, J. and Becerra, V.M. (2006) Efficient Fuzzy Control of a Rotary Inverted Pendulum Based on LQR Mapping. IEEE International Symposium on Intelligent Control, 2701-2706. http://dx.doi.org/10.1109/ISIC.2006.285548</mixed-citation></ref><ref id="scirp.66673-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">Gu, D.-W., Petkov, P.H. and Konstantinov, M.M. (2013) A Triple Inverted Pendulum Control System Design. Robust Control Design with MATLAB&amp;reg;, Springer, London, 291-325. http://dx.doi.org/10.1007/978-1-4471-4682-7_15</mixed-citation></ref></ref-list></back></article>