# Discrete Dynamics-Based Parameter Analysis and Optimization of Fuzzy Controller for Inverted Pendulum Systems Based on Chaos Algorithm

Authors: Xingguo Xia; Jianwei Xia; Mingyi Gang; Qingfeng Zhang; Jing Wang
Journal: Discrete Dynamics in Nature and Society
 (2020)

---

## Abstract

In order to reduce the difficulty in the selection of the quantization factor and the proportion factor in the general fuzzy controller, a controller with the novel algorithm based on the Logistic chaotic variable is proposed in this paper. By introducing the chaotic variable factor into the global search, the suboptimal solution can be obtained and the optimization interval reduced. The global optimal solution is obtained in the vicinity of the suboptimal solution under an integrated performance index. Finally, the control scheme is applied to the control of a double inverted pendulum model. The simulated results show the effectiveness of the proposed method.


---

## Body

## 1. Introduction

The inverted pendulum is a class of systems, which are a common platform and can be used to test the correctness and feasibility of control methods. Control objects in many actual fields, such as aircrafts and intelligent balancing vehicles, are related to the balance control problem of the inverted pendulum. Therefore, research studies on the controller design of the inverted pendulum have particularly important engineering significance [1–3].It is noted that, in the previous research of control techniques, the precise mathematical model of nonlinear systems should be provided, which is hard to realize in practice [4–6]. However, as an important branch of intelligent control strategies, the fuzzy control can perform well in the nonlinear systems as well as the unstable control objects with the guidance of fuzzy rules and fuzzy membership functions [7–10], and this motivates our study in fuzzy control. Dynamic performances of the fuzzy controller, including the fuzzy rule, membership function, and proportion factor, are important indexes to evaluate the quality of the fuzzy controller [11]. However, the effective design and adjustment methods for the parameters of the fuzzy controller (quantification factor, ratio factor, etc.) are limited. In practice, the tuning work relies on the experience and repeated debugging of operators. It takes a lot of energy and time, and obtaining their optimal values is still a difficult issue. In [12], the genetic algorithm was used to optimize the parameters of the fuzzy controller, but it can only optimize the shape and position of the membership function. However, fuzzy sets that directly affect the completeness of the fuzzy rules cannot be chosen. As the number of variable increases, the system will be paralyzed. With the numerical analysis, we propose a method to optimize the scaling factor, but the optimization of the quantification factor and proportion factor cannot be achieved simultaneously. In [13], a random optimization method based on the simulated annealing algorithm was proposed, which can avoid the local minimum problem. The rate of the convergence is still too slow. Based on the nonlinear dynamic characteristics of chaos, such as ergodicity, randomness, and regularity, the developed chaos optimization algorithm has been widely concerned by many scholars [14, 15].In this paper, the issues of discrete dynamics-based parameter analysis and optimization of the fuzzy controller for inverted pendulum systems based on a chaos algorithm are investigated. The main contributions can be concluded as follows. (1) Taking the fuzzy control scheme into the implementation of the control for the two-stage inverted pendulum system. Moreover, different chaotic sequences generated by logistic mapping are introduced into the parameter domain of the fuzzy controller in this work. (2) Through using chaotic variables to construct the global rough search method, the optimal solution is obtained. Based on this, the local fine search is proposed in the minimal range near the suboptimal solution to optimize the parameters of the fuzzy controller automatically via optimizing the global search technique by reducing the search space and coefficient. (3) A robust control scheme is used to control an inverted pendulum experiment system model under stochastic disturbance, which shows that the controller with optimized parameters can make the double pendulum rod staying in the straight position and has a fast dynamic response.


### 1.1. Model Description

To simplify the modeling, it is necessary to ignore the air and the external friction of the inverted pendulum system. The system can be abstracted into a model consisting of a small cart and two uniform pendulum rods. The double inverted pendulum is a typical rigid body motion system to facilitate the modeling of the system. The structure of the double inverted pendulum system is shown in Figure1 [16]. Moreover, its specific parameters are shown in Table 1.Figure 1
Motion analysis sketch of two-stage inverted pendulum.Table 1
Introduction of symbols used in the double inverted pendulum system [17].
ParametersValuesSignificancex−1,1 mDisplacements of a cartθ1−0.25,0.25 radThe angle between the inverted pendulum 1 and the vertical directionθ2−0.15,0.15 radThe angle between the inverted pendulum 2 and the vertical directionm01.096 kgEquivalent mass of the cartm10.13 kgThe quality of the inverted pendulum 1m20.05 kgThe quality of the inverted pendulum 2J10.0002 kg·m·mThe moment of inertia of an inverted pendulum 1J20.0034 kg·m·mThe moment of inertia of an inverted pendulum 2l10.0775 mThe half length of the inverted pendulum 1l20.25 mThe half length of the inverted pendulum 2L10.155 mThe length of the inverted pendulum 1f010.1403 N·m/sFriction coefficient of the cartf10.003415 N·m/sFriction coefficient of the inverted pendulum 1f20.003224 N·m/sFriction coefficient of the inverted pendulum 2g9.8 m/s2Gravitational accelerationSelectx,θ1,θ2,x˙,θ˙1,andθ˙2 as the system state variables. Based on the Lagrange equation in analytical mechanics, the mathematical model of the double inverted pendulum system is derived, and the linear treatment is finished near the unstable equilibrium point [18], which is replaced by the known parameters in Table 1. The equation of the state for a linear double inverted pendulum system can be obtained as follows:(1)X˙=AX+Bu,Y=CX,where(2)A=000100000010000001000000086.69−21.620000−40.3139.45000,B=00016.64−0.088T,C=100000010000001000.


### 1.2. Fuzzy Control Design

In view of the linear model of (1), the Lyapunov theory is applied to analyze its stability [19]. The characteristic root of the system is solved according to matrix A as 10.04385.0262−10.0438−5.026200.It is obvious that the system has two poles located on the right half plane ofS. Based on the stability criterion, the double inverted pendulum system is a naturally unstable system.According to the controllability criterion [20, 21], N-order linear continuous system is X˙=Ax+Bu. The condition that the state is fully controllable is if and only if the energy criterion of the system is full rankS=BABA2B⋯An−1B, that is, rankS=n.After calculating, one has(3)rankctrbA,B=rankBABA2BA3BA4BA5B=6.It can be seen that the system is controllable near the equilibrium point, which means it is possible to design a controller maintaining the stability of the system.


#### 1.2.1. The Input and Output Variables of a Fuzzy Controller

For a typical double inverted pendulum system with multiple inputs, if the six state variables are used as input variables of the fuzzy controller, the fuzzy rule explosion will inevitably lead to the difficulty in the optimization of fuzzy parameters [22–24]. The output information of the linear system can be fused directly, and six state variables are weighted into two input variables; thus, the problem of fuzzy rule explosion is solved to simplify the design of the fuzzy controller.(1) Design State Feedback Matrix. According to the strategy based on the linear quadratic optimal theory, a state feedback matrix K is designed for system (1):(4)K=KxKθ1Kθ2Kx˙Kθ.1Kθ.2.Using state feedback matrixK to construct fusion function f1⋅,(5)f1⋅=KxK2Kθ1K2Kθ2K2000000Kx˙K2Kθ˙1K2Kθ˙2K2,K2=Kx2+Kθ12+Kθ22+Kx˙2+Kθ˙12+Kθ˙22.After calculation, take(6)K=17.3312116.5826−194.613418.57593.5457−31.4390.(2) Dimensionality Reduction. Two input variables are obtained by dimensionality reduction: the synthesis error E is synthesized by weighting the position state variables and the comprehensive error rate EC is synthesized by weighting the speed state variables:(7)EEC=f1⋅xθ1θ2x˙θ˙1θ˙2.In view of the abovementioned statement, a two-dimensional Mamdani-type fuzzy controller with two inputs and one output is designed, and the system structure diagram is shown in Figure2.Figure 2
The structure chart of fuzzy control.In Figure2, Ke and Kec are the quantitative factors of the system error and the rate of error change, respectively. The input variables are converted from the basic domain to the corresponding fuzzy set theory domain, and Ku is the output proportional factor, which converts the fuzzy set domain of the input variable into the exact value.


### 1.3. Controller Design

#### 1.3.1. Fuzzy Control Rules

In the process of design,E, EC, and U all define with seven fuzzy subsets: NB, NM, NS, Z, PS, PM, and PB. After dividing the fuzzy linguistic variables into the input and output domains, the total number of fuzzy control rules designed is 49. Rule 1: if E is NB and EC is NB, then U is NB; Rule 2: if E is NB and EC is NM, then U is NB; …; Rule 49: if E is PB and EC is PB, then U is PB. The fuzzy control rule is set up, as shown in Table 2.Table 2
Fuzzy rules list.
EECUNBNMNSZPSPMPBNBNBNBNBNMNMNSZNMNBNBNMNMNSZPSNSNBNMNMNSZPSPMZNMNMNSZPSPMPMPSNMNSZPSPMPMPBPMNSZPSPMPMPBPBPBZPSPMPMPBPBPB


#### 1.3.2. Membership Function

In fuzzy systems and control, the membership functions are commonly selected as triangle membership function, trapezoid membership function, and Gauss type membership function. In this paper, the input and output variables of the fuzzy controller are designed by the triangular membership function, and the center of gravity method is used for defuzzification.


### 1.4. Chaos Optimization

The fuzzy controller parameters (quantification factorsKe and Kec and proportion factor K−u) play an important role in the fuzzy control of the double inverted pendulum system [25]. Selection is usually achieved by means of experience and trials, which contains subjectivity and seriously affects the effectiveness of the control. Therefore, we combine the fuzzy control with the chaos optimization algorithm, which makes full use of the chaos algorithm to optimize the quantitative factor and proportion factor of the fuzzy controller. The optimized parameters will improve the effectiveness of the fuzzy control.


#### 1.4.1. Selection of Performance Index

For the double inverted pendulum system with nonlinearity and multiple inputs, it is necessary to select a performance index to measure the control effect. The index can reflect not only the dynamic characteristics of the control system but also its steady-state characteristics. Therefore, select the performance index function (8); r, θ1, and θ2 are unified by expression, and its performance index functions with different parameters are(8)Ji=minwi,1∑k=0iekk/maxek+wi,2δi=1,2,3,where δ represents the percentage of overshoot, wi,1 and wi,2 are selected as the user according to the actual situation, and l represents the number of cycles to be set.In the control of the double inverted pendulum system, the key is that the two pendulums cannot be reversed, and the cart can move back and forth within a certain range. A comprehensive performance index is introduced in the paper as follows:(9)J=aJ1+bJ2+cJ3,s.t.0<c<b<a<1,a+b+c=1,where the performance of the cart and the double inverted pendulum bars are expressed by Jii=1,2,3; the weight coefficients are expressed as a, b, and c, and the selection is made according to the actual situations. The priority of the control for the cart and two inverted pendulum bars is considered comprehensively, the requirements for the dynamic characteristics and stability performance of the system are satisfied. Combined with the algorithm of prechaotic optimization, the parameters of the fuzzy controller Ke, Kec, and Ku are adjusted and the minimum performance index J is finally obtained.


#### 1.4.2. The Steps of Chaos Optimization

In the paper, the logistic mapping is selected as follows:(10)xn+1=μxn1−xn,n=0,1,…,N,where μ is the control variable which satisfies μ=4, and when 0<xn<1, formula (11) is completed in chaos. Since the chaotic state is very sensitive to the initial value, we choose different initial values of small differences to get chaotic variables of different trajectories. The N-order fixed formula (10) can not be selected here; otherwise, chaos cannot be generated.Considering the parameter domain of the fuzzy control, the following set of iterative equations can be considered:(11)xn+1=4xn1−xn,xn=x1,n,x2,n,x3,n,n=0,1,…,N,0<x0<1,(12)ke,n∗=kp∗×x1,n,(13)kec,n∗=kp∗×x2,n,(14)ku,n∗=kp∗×x3,n.Thekp∗ in formulas (12)–(14) can be properly amplified and converted. In the interval (0-1), three different initial values are taken into the Logistic mapping; then, three different chaotic variable trajectories can be generated. They are also used in the parameters of the fuzzy controller to calculate the target function J according to formula (9), and then the optimal value is selected.The steps of the chaos optimization algorithm are as follows:Step 1 (initialization): in the random interval (0-1), three initial values of different small differences are selected and replaced into the Logistic mapping, and different chaotic locus variables can be obtained as the search space of the fuzzy controller parameterske∗, kec∗, and ku∗. Then, formula (8) is used to calculate the system performance index of the trolley and the two swing lever Jii=1,2,3.Step 2: in formula (9), select appropriate values for parameters a, b, and c. Using formula (10) to calculate the comprehensive performance index J, the minimum of the target function in the N comprehensive performance index J is found as Jmin. The corresponding fuzzy control parameter value is the approximate optimal solutions ke∗, kec∗, and ku∗ of the chaotic rough search method.Step 3: letn=1.Step 4: in order to make the system find the global optimal value quickly, the chaotic local fine search is introduced to reduce the range of the variables so as to improve the precision of the control system. The approximate optimal solutionske∗, kec∗, and ku∗ obtained in Step 2 are substituted in the following expressions (15)–(17), respectively:(15)k^e,n∗=ke∗×ztxn,n=0,1,…,N,(16)k^ec,n∗=kec∗×ztxn,n=0,1,…,N,(17)ku∗×ztxn,n=0,1,…,N.Three new chaotic trajectory variablesk^e,n∗, k^ec,n∗, and k^u,n∗ are generated, which are used for local fine search of chaos. According to formula (9), the corresponding system performance index Jii=1,2,3 is calculated.Step 5: calculate the comprehensive performanceJ based on formula (9).Step 6: chaotic search is carried out in the left and right neighborhood of the approximate optimal solution obtained from the chaotic rough search. The time-varying factorzt is calculated according to the formula as follows:(18)zt+1=1−λzt,0<λ<1,whereλ is the attenuation factor of zt.Step 7:t=t+1. Again, the chaotic search space is reduced as in Step 4.Step 8: compare the value of comprehensive performance index function in the search process, and findJmin. Terminate the search. The global optimal solutions k^e,n∗, k^ec,n∗, and k^u,n∗ are the fuzzy controller parameters corresponding to Jmin.In the Matlab software, the module of the double inverted pendulum control system is built, and the sampling time is selected as 5 ms. The parameters of the fuzzy controller after the chaos optimization are applied to the simulation control of the system. The simulation result of the experiment is shown in Figure3.Figure 3
2 angle simulation curves of the pendulum rod.Figure3 shows the curves of θ2 with the initial states x0=0, θ10=θ20=0.1rad. From the curves, we can see that the system responds quickly and returns to the equilibrium position within 3-4 seconds. The simulation result also shows the effectiveness of the designed fuzzy controller.


## 1.1. Model Description

To simplify the modeling, it is necessary to ignore the air and the external friction of the inverted pendulum system. The system can be abstracted into a model consisting of a small cart and two uniform pendulum rods. The double inverted pendulum is a typical rigid body motion system to facilitate the modeling of the system. The structure of the double inverted pendulum system is shown in Figure1 [16]. Moreover, its specific parameters are shown in Table 1.Figure 1
Motion analysis sketch of two-stage inverted pendulum.Table 1
Introduction of symbols used in the double inverted pendulum system [17].
ParametersValuesSignificancex−1,1 mDisplacements of a cartθ1−0.25,0.25 radThe angle between the inverted pendulum 1 and the vertical directionθ2−0.15,0.15 radThe angle between the inverted pendulum 2 and the vertical directionm01.096 kgEquivalent mass of the cartm10.13 kgThe quality of the inverted pendulum 1m20.05 kgThe quality of the inverted pendulum 2J10.0002 kg·m·mThe moment of inertia of an inverted pendulum 1J20.0034 kg·m·mThe moment of inertia of an inverted pendulum 2l10.0775 mThe half length of the inverted pendulum 1l20.25 mThe half length of the inverted pendulum 2L10.155 mThe length of the inverted pendulum 1f010.1403 N·m/sFriction coefficient of the cartf10.003415 N·m/sFriction coefficient of the inverted pendulum 1f20.003224 N·m/sFriction coefficient of the inverted pendulum 2g9.8 m/s2Gravitational accelerationSelectx,θ1,θ2,x˙,θ˙1,andθ˙2 as the system state variables. Based on the Lagrange equation in analytical mechanics, the mathematical model of the double inverted pendulum system is derived, and the linear treatment is finished near the unstable equilibrium point [18], which is replaced by the known parameters in Table 1. The equation of the state for a linear double inverted pendulum system can be obtained as follows:(1)X˙=AX+Bu,Y=CX,where(2)A=000100000010000001000000086.69−21.620000−40.3139.45000,B=00016.64−0.088T,C=100000010000001000.


## 1.2. Fuzzy Control Design

In view of the linear model of (1), the Lyapunov theory is applied to analyze its stability [19]. The characteristic root of the system is solved according to matrix A as 10.04385.0262−10.0438−5.026200.It is obvious that the system has two poles located on the right half plane ofS. Based on the stability criterion, the double inverted pendulum system is a naturally unstable system.According to the controllability criterion [20, 21], N-order linear continuous system is X˙=Ax+Bu. The condition that the state is fully controllable is if and only if the energy criterion of the system is full rankS=BABA2B⋯An−1B, that is, rankS=n.After calculating, one has(3)rankctrbA,B=rankBABA2BA3BA4BA5B=6.It can be seen that the system is controllable near the equilibrium point, which means it is possible to design a controller maintaining the stability of the system.


### 1.2.1. The Input and Output Variables of a Fuzzy Controller

For a typical double inverted pendulum system with multiple inputs, if the six state variables are used as input variables of the fuzzy controller, the fuzzy rule explosion will inevitably lead to the difficulty in the optimization of fuzzy parameters [22–24]. The output information of the linear system can be fused directly, and six state variables are weighted into two input variables; thus, the problem of fuzzy rule explosion is solved to simplify the design of the fuzzy controller.(1) Design State Feedback Matrix. According to the strategy based on the linear quadratic optimal theory, a state feedback matrix K is designed for system (1):(4)K=KxKθ1Kθ2Kx˙Kθ.1Kθ.2.Using state feedback matrixK to construct fusion function f1⋅,(5)f1⋅=KxK2Kθ1K2Kθ2K2000000Kx˙K2Kθ˙1K2Kθ˙2K2,K2=Kx2+Kθ12+Kθ22+Kx˙2+Kθ˙12+Kθ˙22.After calculation, take(6)K=17.3312116.5826−194.613418.57593.5457−31.4390.(2) Dimensionality Reduction. Two input variables are obtained by dimensionality reduction: the synthesis error E is synthesized by weighting the position state variables and the comprehensive error rate EC is synthesized by weighting the speed state variables:(7)EEC=f1⋅xθ1θ2x˙θ˙1θ˙2.In view of the abovementioned statement, a two-dimensional Mamdani-type fuzzy controller with two inputs and one output is designed, and the system structure diagram is shown in Figure2.Figure 2
The structure chart of fuzzy control.In Figure2, Ke and Kec are the quantitative factors of the system error and the rate of error change, respectively. The input variables are converted from the basic domain to the corresponding fuzzy set theory domain, and Ku is the output proportional factor, which converts the fuzzy set domain of the input variable into the exact value.


## 1.2.1. The Input and Output Variables of a Fuzzy Controller

For a typical double inverted pendulum system with multiple inputs, if the six state variables are used as input variables of the fuzzy controller, the fuzzy rule explosion will inevitably lead to the difficulty in the optimization of fuzzy parameters [22–24]. The output information of the linear system can be fused directly, and six state variables are weighted into two input variables; thus, the problem of fuzzy rule explosion is solved to simplify the design of the fuzzy controller.(1) Design State Feedback Matrix. According to the strategy based on the linear quadratic optimal theory, a state feedback matrix K is designed for system (1):(4)K=KxKθ1Kθ2Kx˙Kθ.1Kθ.2.Using state feedback matrixK to construct fusion function f1⋅,(5)f1⋅=KxK2Kθ1K2Kθ2K2000000Kx˙K2Kθ˙1K2Kθ˙2K2,K2=Kx2+Kθ12+Kθ22+Kx˙2+Kθ˙12+Kθ˙22.After calculation, take(6)K=17.3312116.5826−194.613418.57593.5457−31.4390.(2) Dimensionality Reduction. Two input variables are obtained by dimensionality reduction: the synthesis error E is synthesized by weighting the position state variables and the comprehensive error rate EC is synthesized by weighting the speed state variables:(7)EEC=f1⋅xθ1θ2x˙θ˙1θ˙2.In view of the abovementioned statement, a two-dimensional Mamdani-type fuzzy controller with two inputs and one output is designed, and the system structure diagram is shown in Figure2.Figure 2
The structure chart of fuzzy control.In Figure2, Ke and Kec are the quantitative factors of the system error and the rate of error change, respectively. The input variables are converted from the basic domain to the corresponding fuzzy set theory domain, and Ku is the output proportional factor, which converts the fuzzy set domain of the input variable into the exact value.


## 1.3. Controller Design

### 1.3.1. Fuzzy Control Rules

In the process of design,E, EC, and U all define with seven fuzzy subsets: NB, NM, NS, Z, PS, PM, and PB. After dividing the fuzzy linguistic variables into the input and output domains, the total number of fuzzy control rules designed is 49. Rule 1: if E is NB and EC is NB, then U is NB; Rule 2: if E is NB and EC is NM, then U is NB; …; Rule 49: if E is PB and EC is PB, then U is PB. The fuzzy control rule is set up, as shown in Table 2.Table 2
Fuzzy rules list.
EECUNBNMNSZPSPMPBNBNBNBNBNMNMNSZNMNBNBNMNMNSZPSNSNBNMNMNSZPSPMZNMNMNSZPSPMPMPSNMNSZPSPMPMPBPMNSZPSPMPMPBPBPBZPSPMPMPBPBPB


### 1.3.2. Membership Function

In fuzzy systems and control, the membership functions are commonly selected as triangle membership function, trapezoid membership function, and Gauss type membership function. In this paper, the input and output variables of the fuzzy controller are designed by the triangular membership function, and the center of gravity method is used for defuzzification.


## 1.3.1. Fuzzy Control Rules

In the process of design,E, EC, and U all define with seven fuzzy subsets: NB, NM, NS, Z, PS, PM, and PB. After dividing the fuzzy linguistic variables into the input and output domains, the total number of fuzzy control rules designed is 49. Rule 1: if E is NB and EC is NB, then U is NB; Rule 2: if E is NB and EC is NM, then U is NB; …; Rule 49: if E is PB and EC is PB, then U is PB. The fuzzy control rule is set up, as shown in Table 2.Table 2
Fuzzy rules list.
EECUNBNMNSZPSPMPBNBNBNBNBNMNMNSZNMNBNBNMNMNSZPSNSNBNMNMNSZPSPMZNMNMNSZPSPMPMPSNMNSZPSPMPMPBPMNSZPSPMPMPBPBPBZPSPMPMPBPBPB


## 1.3.2. Membership Function

In fuzzy systems and control, the membership functions are commonly selected as triangle membership function, trapezoid membership function, and Gauss type membership function. In this paper, the input and output variables of the fuzzy controller are designed by the triangular membership function, and the center of gravity method is used for defuzzification.


## 1.4. Chaos Optimization

The fuzzy controller parameters (quantification factorsKe and Kec and proportion factor K−u) play an important role in the fuzzy control of the double inverted pendulum system [25]. Selection is usually achieved by means of experience and trials, which contains subjectivity and seriously affects the effectiveness of the control. Therefore, we combine the fuzzy control with the chaos optimization algorithm, which makes full use of the chaos algorithm to optimize the quantitative factor and proportion factor of the fuzzy controller. The optimized parameters will improve the effectiveness of the fuzzy control.


### 1.4.1. Selection of Performance Index

For the double inverted pendulum system with nonlinearity and multiple inputs, it is necessary to select a performance index to measure the control effect. The index can reflect not only the dynamic characteristics of the control system but also its steady-state characteristics. Therefore, select the performance index function (8); r, θ1, and θ2 are unified by expression, and its performance index functions with different parameters are(8)Ji=minwi,1∑k=0iekk/maxek+wi,2δi=1,2,3,where δ represents the percentage of overshoot, wi,1 and wi,2 are selected as the user according to the actual situation, and l represents the number of cycles to be set.In the control of the double inverted pendulum system, the key is that the two pendulums cannot be reversed, and the cart can move back and forth within a certain range. A comprehensive performance index is introduced in the paper as follows:(9)J=aJ1+bJ2+cJ3,s.t.0<c<b<a<1,a+b+c=1,where the performance of the cart and the double inverted pendulum bars are expressed by Jii=1,2,3; the weight coefficients are expressed as a, b, and c, and the selection is made according to the actual situations. The priority of the control for the cart and two inverted pendulum bars is considered comprehensively, the requirements for the dynamic characteristics and stability performance of the system are satisfied. Combined with the algorithm of prechaotic optimization, the parameters of the fuzzy controller Ke, Kec, and Ku are adjusted and the minimum performance index J is finally obtained.


### 1.4.2. The Steps of Chaos Optimization

In the paper, the logistic mapping is selected as follows:(10)xn+1=μxn1−xn,n=0,1,…,N,where μ is the control variable which satisfies μ=4, and when 0<xn<1, formula (11) is completed in chaos. Since the chaotic state is very sensitive to the initial value, we choose different initial values of small differences to get chaotic variables of different trajectories. The N-order fixed formula (10) can not be selected here; otherwise, chaos cannot be generated.Considering the parameter domain of the fuzzy control, the following set of iterative equations can be considered:(11)xn+1=4xn1−xn,xn=x1,n,x2,n,x3,n,n=0,1,…,N,0<x0<1,(12)ke,n∗=kp∗×x1,n,(13)kec,n∗=kp∗×x2,n,(14)ku,n∗=kp∗×x3,n.Thekp∗ in formulas (12)–(14) can be properly amplified and converted. In the interval (0-1), three different initial values are taken into the Logistic mapping; then, three different chaotic variable trajectories can be generated. They are also used in the parameters of the fuzzy controller to calculate the target function J according to formula (9), and then the optimal value is selected.The steps of the chaos optimization algorithm are as follows:Step 1 (initialization): in the random interval (0-1), three initial values of different small differences are selected and replaced into the Logistic mapping, and different chaotic locus variables can be obtained as the search space of the fuzzy controller parameterske∗, kec∗, and ku∗. Then, formula (8) is used to calculate the system performance index of the trolley and the two swing lever Jii=1,2,3.Step 2: in formula (9), select appropriate values for parameters a, b, and c. Using formula (10) to calculate the comprehensive performance index J, the minimum of the target function in the N comprehensive performance index J is found as Jmin. The corresponding fuzzy control parameter value is the approximate optimal solutions ke∗, kec∗, and ku∗ of the chaotic rough search method.Step 3: letn=1.Step 4: in order to make the system find the global optimal value quickly, the chaotic local fine search is introduced to reduce the range of the variables so as to improve the precision of the control system. The approximate optimal solutionske∗, kec∗, and ku∗ obtained in Step 2 are substituted in the following expressions (15)–(17), respectively:(15)k^e,n∗=ke∗×ztxn,n=0,1,…,N,(16)k^ec,n∗=kec∗×ztxn,n=0,1,…,N,(17)ku∗×ztxn,n=0,1,…,N.Three new chaotic trajectory variablesk^e,n∗, k^ec,n∗, and k^u,n∗ are generated, which are used for local fine search of chaos. According to formula (9), the corresponding system performance index Jii=1,2,3 is calculated.Step 5: calculate the comprehensive performanceJ based on formula (9).Step 6: chaotic search is carried out in the left and right neighborhood of the approximate optimal solution obtained from the chaotic rough search. The time-varying factorzt is calculated according to the formula as follows:(18)zt+1=1−λzt,0<λ<1,whereλ is the attenuation factor of zt.Step 7:t=t+1. Again, the chaotic search space is reduced as in Step 4.Step 8: compare the value of comprehensive performance index function in the search process, and findJmin. Terminate the search. The global optimal solutions k^e,n∗, k^ec,n∗, and k^u,n∗ are the fuzzy controller parameters corresponding to Jmin.In the Matlab software, the module of the double inverted pendulum control system is built, and the sampling time is selected as 5 ms. The parameters of the fuzzy controller after the chaos optimization are applied to the simulation control of the system. The simulation result of the experiment is shown in Figure3.Figure 3
2 angle simulation curves of the pendulum rod.Figure3 shows the curves of θ2 with the initial states x0=0, θ10=θ20=0.1rad. From the curves, we can see that the system responds quickly and returns to the equilibrium position within 3-4 seconds. The simulation result also shows the effectiveness of the designed fuzzy controller.


## 1.4.1. Selection of Performance Index

For the double inverted pendulum system with nonlinearity and multiple inputs, it is necessary to select a performance index to measure the control effect. The index can reflect not only the dynamic characteristics of the control system but also its steady-state characteristics. Therefore, select the performance index function (8); r, θ1, and θ2 are unified by expression, and its performance index functions with different parameters are(8)Ji=minwi,1∑k=0iekk/maxek+wi,2δi=1,2,3,where δ represents the percentage of overshoot, wi,1 and wi,2 are selected as the user according to the actual situation, and l represents the number of cycles to be set.In the control of the double inverted pendulum system, the key is that the two pendulums cannot be reversed, and the cart can move back and forth within a certain range. A comprehensive performance index is introduced in the paper as follows:(9)J=aJ1+bJ2+cJ3,s.t.0<c<b<a<1,a+b+c=1,where the performance of the cart and the double inverted pendulum bars are expressed by Jii=1,2,3; the weight coefficients are expressed as a, b, and c, and the selection is made according to the actual situations. The priority of the control for the cart and two inverted pendulum bars is considered comprehensively, the requirements for the dynamic characteristics and stability performance of the system are satisfied. Combined with the algorithm of prechaotic optimization, the parameters of the fuzzy controller Ke, Kec, and Ku are adjusted and the minimum performance index J is finally obtained.


## 1.4.2. The Steps of Chaos Optimization

In the paper, the logistic mapping is selected as follows:(10)xn+1=μxn1−xn,n=0,1,…,N,where μ is the control variable which satisfies μ=4, and when 0<xn<1, formula (11) is completed in chaos. Since the chaotic state is very sensitive to the initial value, we choose different initial values of small differences to get chaotic variables of different trajectories. The N-order fixed formula (10) can not be selected here; otherwise, chaos cannot be generated.Considering the parameter domain of the fuzzy control, the following set of iterative equations can be considered:(11)xn+1=4xn1−xn,xn=x1,n,x2,n,x3,n,n=0,1,…,N,0<x0<1,(12)ke,n∗=kp∗×x1,n,(13)kec,n∗=kp∗×x2,n,(14)ku,n∗=kp∗×x3,n.Thekp∗ in formulas (12)–(14) can be properly amplified and converted. In the interval (0-1), three different initial values are taken into the Logistic mapping; then, three different chaotic variable trajectories can be generated. They are also used in the parameters of the fuzzy controller to calculate the target function J according to formula (9), and then the optimal value is selected.The steps of the chaos optimization algorithm are as follows:Step 1 (initialization): in the random interval (0-1), three initial values of different small differences are selected and replaced into the Logistic mapping, and different chaotic locus variables can be obtained as the search space of the fuzzy controller parameterske∗, kec∗, and ku∗. Then, formula (8) is used to calculate the system performance index of the trolley and the two swing lever Jii=1,2,3.Step 2: in formula (9), select appropriate values for parameters a, b, and c. Using formula (10) to calculate the comprehensive performance index J, the minimum of the target function in the N comprehensive performance index J is found as Jmin. The corresponding fuzzy control parameter value is the approximate optimal solutions ke∗, kec∗, and ku∗ of the chaotic rough search method.Step 3: letn=1.Step 4: in order to make the system find the global optimal value quickly, the chaotic local fine search is introduced to reduce the range of the variables so as to improve the precision of the control system. The approximate optimal solutionske∗, kec∗, and ku∗ obtained in Step 2 are substituted in the following expressions (15)–(17), respectively:(15)k^e,n∗=ke∗×ztxn,n=0,1,…,N,(16)k^ec,n∗=kec∗×ztxn,n=0,1,…,N,(17)ku∗×ztxn,n=0,1,…,N.Three new chaotic trajectory variablesk^e,n∗, k^ec,n∗, and k^u,n∗ are generated, which are used for local fine search of chaos. According to formula (9), the corresponding system performance index Jii=1,2,3 is calculated.Step 5: calculate the comprehensive performanceJ based on formula (9).Step 6: chaotic search is carried out in the left and right neighborhood of the approximate optimal solution obtained from the chaotic rough search. The time-varying factorzt is calculated according to the formula as follows:(18)zt+1=1−λzt,0<λ<1,whereλ is the attenuation factor of zt.Step 7:t=t+1. Again, the chaotic search space is reduced as in Step 4.Step 8: compare the value of comprehensive performance index function in the search process, and findJmin. Terminate the search. The global optimal solutions k^e,n∗, k^ec,n∗, and k^u,n∗ are the fuzzy controller parameters corresponding to Jmin.In the Matlab software, the module of the double inverted pendulum control system is built, and the sampling time is selected as 5 ms. The parameters of the fuzzy controller after the chaos optimization are applied to the simulation control of the system. The simulation result of the experiment is shown in Figure3.Figure 3
2 angle simulation curves of the pendulum rod.Figure3 shows the curves of θ2 with the initial states x0=0, θ10=θ20=0.1rad. From the curves, we can see that the system responds quickly and returns to the equilibrium position within 3-4 seconds. The simulation result also shows the effectiveness of the designed fuzzy controller.


## 2. Robust Control of the Double Inverted Pendulum

To further verify the robustness, for the inverted pendulum system in the basic Simulink simulation block diagram, as shown in Figure4, the −80 dBW white Gaussian noise is applied, and the required signal is generated by wgn function in the simulation.Figure 4
Control block diagram of the double inverted pendulum.For the considered two-stage inverted cycloidal model system with parameters shown in Table1 [17], the initial value is given as 0,0,0,0.02,0,0. By employing the Matlab software, the corresponding simulation results are shown in Figures 5–7. The sampling period is taken as 0.001 s. In formula (18), the initial value of chaos rough search is z0=0.002. Termination conditions are zn≤10−3 and β=0.001. In formula (9), a=0.2, b=0.3, and c=0.5. It has gone through 692 steps of chaotic fine search, and the global optimal solution of fuzzy controller parameters is in the 357th step. Fuzzy controller parameters are Kc=9.00005, Kec=9.00131, and Ku=18.00026.Figure 5
Car displacement.Figure 6
Swing rod 1 angle.Figure 7
Swing rod 2 angle.Figures5–7 are the robust control curves of the car displacement, and the angle of the pendulum rod 1 and the angle of the pendulum rod 2 of the two inverted pendulums, respectively. The model is shown as Figure 1. The results show that the controller designed by the chaotic optimization method in this paper can effectively control the two-stage inverted pendulum. The displacement of the car and the angle of the pendulum rod are basically stable in the balanced position, and the control is effective.Remark 1.
It is worth noticing that the networked control system has been a high-profile topic during the past few decades. Correspondingly, the control issues of the networked control system subject to various network-induced phenomena, such as communication delays, packet dropouts, and fading channels, have obtained great research interest of scholars and abundant literature studies have been reported on these topics. Aiming at the network control system, the observer-based dissipative control and passivity-basedH∞ control have been proposed in [26, 27], respectively. Nonetheless, the proposed parameter analysis and optimization of the fuzzy control method in this paper can also be employed in the networked control system to further optimize the conservativeness with respect to the aforementioned mechanisms, which is one of the directions of our future work.


## 3. Conclusion

In the paper, the optimal control theory has been used to design the fusion function to reduce the dimension of the input variables of the fuzzy controller for a double inverted pendulum system. Then, the chaotic sequence variables have been introduced into the fuzzy control system. The chaotic global rough search and the chaotic fine search technique have been used to optimize the parameters of the fuzzy controller. After optimization, the time of adjusting the parameters has been reduced, and the performance of the double inverted pendulum system has been improved. Finally, the proposed method has been tested through an example. The effectiveness and capability of our approach have been proved by the simulation results. To further improve the practical application of the proposed parameter analysis and optimization of the fuzzy control technique, our future works will concentrate on other actual systems, such as stochastic switching systems, and this will be an interesting and challenging area.



---

*Source: 3639508-2020-05-18.xml*