# Cylinder Position Servo Control Based on Fuzzy PID

Authors: Shibo Cai; Shunlei Wu; Guanjun Bao
Journal: Journal of Applied Mathematics
 (2013)

---

## Abstract

The arbitrary position control of cylinder has always been the hard challenge in pneumatic system. We try to develop a cylinder position servo control method by combining fuzzy PID with the theoretical model of the proportional valve-controlled cylinder system. The pressure differential equation of cylinder, pressure-flow equation of proportional valve, and moment equilibrium equation of cylinder are established. And the mathematical models of the cylinder driving system are linearized. Then fuzzy PID control algorithm is designed for the cylinder position control, including the detail analysis of fuzzy variables and domain, fuzzy logic rules, and defuzzification. The stability of the proposed fuzzy PID controller is theoretically proved according to the small gain theorem. Experiments for targets position of 250 mm, 300 mm, and 350 mm were done and the results showed that the absolute error of the position control is less than 0.25 mm. And comparative experiment between fuzzy PID and classical PID verified the advantage of the proposed algorithm.


---

## Body

## 1. Introduction

In 1956, Shearer [1] first developed the pneumatic servo control system, using the high temperature and high pressure gas (500°C, 20~30 MPa) from the aerospace craft and missile propulsion as the working media. This pneumatic servo control system was successfully applied in the position, orientation, and stable flying control for aerospace crafts and missiles. In the subsequent period of time, efforts are contributed to investigate the pneumatic servo technology parallel with the hydraulic servo technique. But the early study made slow progress and there were few achievements that could be used, because of the difficulty in mathematic system models and lack of powerful analysis and calculating tools.With the development of computer technology and modern control technique, the pneumatic servo control problem was revisited by scholars. Scavanda et al. [2] and Liu and Bobrow [3] broadened the linear model to several working points adopting the state-space method. But the influence of nonlinear factors such as mechanical friction is neglected. Baoren [4], Yunbo [5], and Guoliang et al. [6, 7] identified the system model based on experimental data, which can reflect the pneumatic system characteristics more accurately than the former methods. But it is not suitable for cases such as long cylinder journey, large parametric variation, or heavy friction. Lee et al. [8] established a nonlinear model for pneumatic system and verified the model with experiments. Still, the model is complicated and requires rigid application conditions.In this paper, we investigated a proportional valve-controlled cylinder system and developed a position control method. Firstly, nonlinear mathematic model of the cylinder is established in Section1. Then Section 2 gives the mathematic model of the whole pneumatic cylinder system. In Section 3, we designed a fuzzy PID controller for the proposed pneumatic position system, including all the detailed information. Experiments for different positions and comparison with classical PID were carried out, which are deeply discussed in Section 4. Finally, Section 5 summaries the main contribution and meaning of our work.


## 2. NonLinear Mathematic Model of Cylinder

The dynamic characteristics of cylinder are mainly described by three equations: the pressure differential equation of cylinder, pressure-flow equation of proportional valve and moment equilibrium equation of cylinder.The flowing state of air inside the pneumatic system is extremely complicated. To simplify the system mathematical model, we use the following hypothesis.(1)
The working media (here refers to air) in the system is taken as ideal gas.(2)
The flowing state while the air runs through the valve port or other chokes is taken as the isentropic and adiabatic process.(3)
The lumped parameter model is adopted, ignoring the influences on the system from the distributed resistance in the air tube and flexibility of the pipeline.(4)
The air pressure and temperature inside the same chamber are equal everywhere.(5)
There is no leakage of the cylinder, both inside and outside.(6)
The pressures of air source and atmosphere are constant.


### 2.1. Pressure Differential Equation of the Cylinder

We suppose that the flowing air inside the thermodynamic system has no energy exchange with the outside and the pressure changes slightly, during the fast inflating process from air source to cylinder chamber. And then, this flowing process can be taken as the isentropic and adiabatic process. According to the energy equation of adiabatic inflating process from constant pressure air source to limited volume, there are four kinds of energy changing processes inside the volume during the movement [9].(1)
The air will bring in or take out the energyqme itself during flowing in or out of the volume. Defining the internal energy of unit mass gas as u, kinetic energy as v2/2 and static energy as gz, we get
(1)qme=qm(u+v22+gz).(2)
The flowing work between the volume and the outside during the air runs in and out of the chamber isΔWf=qmpv, where p is the air pressure and v denotes the air specific volume.(3)
The thermoexchange between the chamber and the outside isΔQ.(4)
The work from the chamber to the outside during the piston movement isΔW=pΔV.If we ignore the leakage of cylinder and valve, according to the energy conservation principle, the total internal energyE of the chamber is
(2)dE1dt=qm1e1+qm1p1v1+dQ1dt-dWs1dt,dE2dt=qm2e2+qm2p2v2+dQ2dt-dWs2dt.Supposing that the gas is ideal air and disregarding the kinetic energy and static energy of the air, we can get(3)qme+qmpv=qm(u+pv)=qmh,
where h is the specific enthalpy of air, h=CpTs, Cp is the constant-pressure specific heat, and Ts is the air temperature at the valve port.As is well known, the internal energy of air isE=mCvT, where Cv is the constant-volume specific heat. According to the ideal air state equations, we have mT=pv/R, where R is the gas constant, with the value of 287.1 j/(kg*k) and R=Cp-Cv.Substituting the above equations by formula (2), we can get
(4)dp1dt=RCpCvTsqm1V1-CpCvp1V1dV1dt+RCvV1dQ1dt,dp2dt=RCpCvTsqm2V2-CpCvp2V2dV2dt+RCvV2dQ2dt.Generally, the rate of heat exchangedQ/dt is determined by the temperature difference between the inside and outside of the cylinder and the coefficient of heat conduction of the cylinder block.


### 2.2. Pressure-Flow Equation of Proportional Valve

In the proportional valve-controlled cylinder system, the air mass flow running into and out of the cylinder chamber is controlled by the port area of the proportional valve. And the air mass flowQm running through the valve port is determined by the effective port area of the valve Ae and the upstream and downstream air pressure Pu and Pd, that is,(5)Qm={AePu2RTukk-1(PdPu)2/k-(PdPu)(k+1)/k0.528<pdPu≤1AePukRTu(2k+1)(k+1)/2(k-1)0≤pdPu≤0.528,where Ae is the effective port area of the valve, m2; Tu represents the stagnation temperature of the orifice upstream, K; Qm denotes the air mass flow running through the valve port, Kg/s.


### 2.3. Force Equilibrium Equation of Cylinder

We can obtain the kinetic equilibrium between the cylinder and load by the force analysis for the system(6)A1p1-A2p2=md2ydt2+bdydt+FL+Fesign(e),
where A1 and A2 are the pressure working areas inside the two chambers of the cylinder, respectively; m means the mass load; b is the viscous damping coefficient between the piston and load; FL denotes the external load; Fe represents the Coulomb friction and e is the displacement deviation.Combining the Coulomb friction and external load asF and linearizing the force equilibrium equation, we can get
(7)A1p1-A2p2=ms2y+bse+F.


## 2.1. Pressure Differential Equation of the Cylinder

We suppose that the flowing air inside the thermodynamic system has no energy exchange with the outside and the pressure changes slightly, during the fast inflating process from air source to cylinder chamber. And then, this flowing process can be taken as the isentropic and adiabatic process. According to the energy equation of adiabatic inflating process from constant pressure air source to limited volume, there are four kinds of energy changing processes inside the volume during the movement [9].(1)
The air will bring in or take out the energyqme itself during flowing in or out of the volume. Defining the internal energy of unit mass gas as u, kinetic energy as v2/2 and static energy as gz, we get
(1)qme=qm(u+v22+gz).(2)
The flowing work between the volume and the outside during the air runs in and out of the chamber isΔWf=qmpv, where p is the air pressure and v denotes the air specific volume.(3)
The thermoexchange between the chamber and the outside isΔQ.(4)
The work from the chamber to the outside during the piston movement isΔW=pΔV.If we ignore the leakage of cylinder and valve, according to the energy conservation principle, the total internal energyE of the chamber is
(2)dE1dt=qm1e1+qm1p1v1+dQ1dt-dWs1dt,dE2dt=qm2e2+qm2p2v2+dQ2dt-dWs2dt.Supposing that the gas is ideal air and disregarding the kinetic energy and static energy of the air, we can get(3)qme+qmpv=qm(u+pv)=qmh,
where h is the specific enthalpy of air, h=CpTs, Cp is the constant-pressure specific heat, and Ts is the air temperature at the valve port.As is well known, the internal energy of air isE=mCvT, where Cv is the constant-volume specific heat. According to the ideal air state equations, we have mT=pv/R, where R is the gas constant, with the value of 287.1 j/(kg*k) and R=Cp-Cv.Substituting the above equations by formula (2), we can get
(4)dp1dt=RCpCvTsqm1V1-CpCvp1V1dV1dt+RCvV1dQ1dt,dp2dt=RCpCvTsqm2V2-CpCvp2V2dV2dt+RCvV2dQ2dt.Generally, the rate of heat exchangedQ/dt is determined by the temperature difference between the inside and outside of the cylinder and the coefficient of heat conduction of the cylinder block.


## 2.2. Pressure-Flow Equation of Proportional Valve

In the proportional valve-controlled cylinder system, the air mass flow running into and out of the cylinder chamber is controlled by the port area of the proportional valve. And the air mass flowQm running through the valve port is determined by the effective port area of the valve Ae and the upstream and downstream air pressure Pu and Pd, that is,(5)Qm={AePu2RTukk-1(PdPu)2/k-(PdPu)(k+1)/k0.528<pdPu≤1AePukRTu(2k+1)(k+1)/2(k-1)0≤pdPu≤0.528,where Ae is the effective port area of the valve, m2; Tu represents the stagnation temperature of the orifice upstream, K; Qm denotes the air mass flow running through the valve port, Kg/s.


## 2.3. Force Equilibrium Equation of Cylinder

We can obtain the kinetic equilibrium between the cylinder and load by the force analysis for the system(6)A1p1-A2p2=md2ydt2+bdydt+FL+Fesign(e),
where A1 and A2 are the pressure working areas inside the two chambers of the cylinder, respectively; m means the mass load; b is the viscous damping coefficient between the piston and load; FL denotes the external load; Fe represents the Coulomb friction and e is the displacement deviation.Combining the Coulomb friction and external load asF and linearizing the force equilibrium equation, we can get
(7)A1p1-A2p2=ms2y+bse+F.


## 3. Mathematic Model of the Pneumatic Position Servo System

From the above dynamic characteristics basical equations, it is clear that the system is nonlinear. So we linearize the system near the cylinder equilibrium point based on the linear system theory.Generally, the spool opening area of proportional servo valve can be taken as the linear function of the controlling voltage; that is, the spool displacement is directly proportional to the controlling signal:(8)Ae=kau,
where ka is the voltage proportional coefficient.Linearizing the flow equation of the proportional valve and applying the Laplace transform, we can get(9)Qm1=Kq1u-Kp1p1,Qm2=Kq2u-Kp2p2,
where Kq1 and Kq2 are the flow gains at the working point of the controlling valves for the cylinder chambers, Kq=∂qm/∂U; Kp1 and Kp2 are the flow pressure coefficients of the controlling valves for the cylinder chambers, KP=∂qm/∂p.Linearizing the pressure differential equations of the cylinder chambers (2) and applying the Laplace transform, we can get
(10)p1=kRTqm1Vk11s-kpk1A1Vk1e,p2=kRTqm2Vk21s-kpk2A2Vk2e.The force equilibrium equation (6) can be transformed as
(11)A1p1-A2p2=ms2y+bsy+fe.From the above analysis, the cylinder position servo control diagram can be drawn as Figure1.Figure 1
Cylinder position servo control diagram.If0≤u<5, then
(12)p1=kRTKq1uVk1s+kRTKp1-kpk1A1esVk1s+kRTKp1,p2=-kpk2A2esVk2s+kRTKp2.Substituting the above equations into (11) produces
(13)e=(Vk2s+kRTKp2)A1kRTKq1uC,
where
(14)C=mVk1Vk2s4+(mVk1kRTKp2+mVk2kRTKp1+bVk1Vk2)s3+(mk2R2T2Kp2Kp1+bVk1kRTKp2+bVk2kRTKp1)s2+(fVk1Vk2+kpk1A12Vk2+kpk2A22Vk1)s2+(bk2R2T2Kp1Kp2+fVk1kRTKp2+fVk2kRTKp1)s+(k2pk1A12RTKp2+k2pk2A22RTKp1)s.


## 4. Fuzzy PID Control Algorithm

PID algorithm is the most used and useful control technique in mechatronics system. But the classical PID algorithm has its inherent shortcomings in practice because of the fixed parameters. For example, the fixed parameters cannot take into account the dynamic features and control requirements in both transient process and stable period. It often fails to achieve the ideal integrated control quality. So, in practice, PID algorithm is usually combined with other parameter adjusting methods, such as fuzzy logic and artificial neuro network.We integrate the classical PID algorithm and fuzzy logic, using fuzzy logic to adjust the PID control parameters according to the deviation and its gradient between the output and target. Thus we can control the cylinder position precisely. The basical control principle is shown in Figure2.Figure 2
Fuzzy PID control principle.


### 4.1. Fuzzy Variables and Their Domain

The PID control input is(15)e(t)=r(t)-y(t).
And the output of the control module can be written as
(16)u(t)=KPe(t)+KI∫e(t)dt+KDde(t)dt.The deviatione(dis0-dis) between the target position dis0 and the actual displacement dis of the cylinder and its gradient ec(de/dt) are the input variables for fuzzy logic. And the variations ΔKP, ΔKI, and ΔKD of PID control parameters KP, KI, and KD are the output variables of the fuzzy logic. The cylinder position deviation e and its gradient ec are sampled and calculated in real time. And the output variables ΔKP, ΔKI, and ΔKD are extracted from the fuzzy matrix table based on the fuzzy rules and reasoning. The PID control parameters are adjusted using ΔKP, ΔKI, and ΔKD, in order to realize the real-time dynamic control of the cylinder displacement. According to the cylinder position control requirement, the domain of the displacement deviation e is set as (−0.5, 0.5), and the domain of the ec is (−0.1, 0.1). The domains of ΔKP, ΔKI, and ΔKD for PID parameters are (−1.2, 1.2), (−0.1, 0.1), and (−0.05, 0.05), respectively.


### 4.2. Fuzzy Logic Rules

The triangle membership function is adopted, and the membership function forΔKP is shown in Figure 3. The fuzzy logic rules are deduced, as listed in Tables 1, 2, and 3. In these tables, NB, NM, NS, ZO, PS, PM, PB represent negative big, negative medium, negative small, zero, positive small, positive medium, and positive big, respectively.Table 1
Fuzzy logic rule forΔKP.
e
c
e
NB
NM
NS
ZO
PS
PM
PB
NB
PB
PB
PB
PM
PS
PS
ZO
NM
PB
PB
PM
PM
PS
ZO
NS
NS
PB
PM
PM
PS
PS
ZO
NS
ZO
PM
PM
PB
PS
PS
ZO
NM
PS
PM
PS
PS
ZO
ZO
NS
NM
PM
PS
PS
ZO
ZO
NS
NM
NB
PB
PS
ZO
ZO
NM
NS
NB
NBTable 2
Fuzzy logic rule forΔKI.
e
c
e
NB
NM
NS
ZO
PS
PM
PB
NB
NB
NB
NM
NM
NS
NS
ZO
NM
NB
NM
NM
NS
NS
ZO
ZO
NS
NB
NM
NS
ZO
ZO
PS
PS
ZO
NM
NM
NS
ZO
PS
PM
PM
PS
NM
NS
ZO
PS
PS
PM
PB
PM
ZO
ZO
PS
PS
PM
PM
PB
PB
ZO
ZO
PS
PM
PM
PM
PBTable 3
Fuzzy logic rule forΔKD.
ec
e
NB
NM
NS
ZO
PS
PM
PB
NB
PS
NS
NB
NB
NM
NM
PS
NM
PS
NB
NB
NM
NM
NS
ZO
NS
ZO
NS
NM
NM
NS
NS
ZO
ZO
ZO
NS
NS
NS
NS
ZO
NS
PS
ZO
PM
PS
ZO
ZO
PS
ZO
PM
PS
PB
PS
PS
PB
PB
PS
PB
PB
PM
PM
PS
PB
PS
PSFigure 3
Membership function forΔKP.Using the above fuzzy logic rules, the PID control parameters can be adjusted as(17)KP(n+1)=KPn+ΔKP,KI(n+1)=KIn+ΔKI,KD(n+1)=KDn+ΔKD.Define(18)Rl=(eandec)⟶KP=∫e×ec×KPu(e)Λu(ec)Λu(KPn)2,Rm=(eandec)⟶KI=∫e×ec×KIu(e)Λu(ec)Λu(KIn)2,Rn=(eandec)⟶KD=∫e×ec×KDu(e)Λu(ec)Λu(KDn)2,
where l,m,n=1,2,3,…,25.Then the fuzzy relations ofKP, KI, and KD are
(19)RKP=⋃l=125Rl,RKI=⋃m=125Rm,RKD=⋃n=125Rn.


### 4.3. Defuzzification

The outputs of the fuzzy logic rules are also fuzzy set. In practical digital control system, the parameters must be defuzzified, that is, converting the fuzzy set into exact values according to an appropriate algorithm.We use conventional gravity center method to realize the defuzzification:(20)y*=∫Yyuc(y)dy∫Yuc(y)dy,
where y* is the center of the covered region by membership function uc(y) of fuzzy set C.It is obvious that the calculating process needs certain time, which makes it difficult to be used in real-time control system. So, the calculating process is executed off-line in advance. Then the produced defuzzification decision tables are stored in the memory of the controller. In this way, the instantaneity of the control process can be enhanced.


### 4.4. Stability Analysis

Chen and Ying [10] theoretically proved the stability of nonlinear fuzzy PI controller, based on their previous work on fuzzy control theory [11]. After that, they continued to investigate the stability of nonlinear fuzzy PI + D controller [12]. Their work offers a quite convenient and practical method to explore the stability of similar control algorithms.As described in Section2, the target cylinder system can be taken as a classical second order system. To interpret the stability of the proposed nonlinear system, we need to reconsider the fuzzy PID control principle shown in Figure 2, which can be rearranged as Figure 4 in discrete-time form, where T is the sampling period, T>0. This diagram expresses the same meaning as Figure 2 and shows the simplified structure as a figure in [12].Figure 4
Discrete-time Fuzzy PID controller.The stability of the fuzzy PI controller and the fuzzy PD controller has been analyzed in [10, 13], respectively, according to the small gain theorem [14]. In our case, if we disconnect the fuzzy D control component from Figure 4, we have the fuzzy PI control system, whose stability is completely proved in [10]. The stability conditions are as follows.Theorem 1.
A sufficient condition for the nonlinear fuzzy PI control system to be globally bounded-input and bounded-output (BIBO) stable is that(1)
the given nonlinear system has a bounded norm (gain)∥N∥<∞;(2)
the parameters of the fuzzy PI controllerKP, KI, and KuPI satisfy
(21)KuPI(γKP+KI)LT(2L-KM)∥N∥<1,
whereL is the domain boundary of fuzzy logic parameters, γ=max{1,T} and KM=max{KPMP,KIMc}, with MP=supn≥0|e(nT)| and Mc=supn≥0|ec(nT)|≤(2/T)MP.In the same way, by disconnecting the fuzzy PI controller from Figure4, we reduce the fuzzy PID control system to a simple fuzzy D controller. This fuzzy D control system is a special or simplified case of the fuzzy PD control system studied in [13], and hence its stability condition can be derived from that obtained in [13] by removing the fuzzy P controller or just setting the output of fuzzy P component as zero. The stability conditions can be derived as follows.Theorem 2.
A sufficient condition for the fuzzyD control system to be BIBO stable is that the given process has a bounded norm (gain) ∥N∥<∞ and the parameters of the fuzzy D controller KD and KuD satisfy
(22)γKDKuD2T(L-KD(MD+|r|))∥N∥<1,
where γ=max{1,L}.Till now, we are sure that the fuzzy PI controller and fuzzyD controller are stable according to Theorems 1 and 2, respectively. Then, we need to verify that the combined fuzzy PID controller is stable.Again, the Fuzzy PID controller shown in Figure2 can be redrawn as Figure 5. The fuzzy PID control systems shown in Figures 2, 4, and 5 are the same thing but in different forms, just for analysis convenience. In Figure 5(a), let the system model be denoted by S1 and the fuzzy PID controller together be denoted by S2, resulting in the new structure in Figure 5(b). Then, as discussed in [10, 13], we can obtain a sufficient condition for the BIBO stability of the overall fuzzy PID equivalent closed-loop control system from the bounds:
(23)∥S1(uPID)∥≤M1+L1∥uPID∥,∥S2([ye])∥≤M2+L2∥[ye]∥,where M1, M2, L1, L2 are constants, and L1L2<1.Equivalent closed-loop control system for the fuzzy PID controller.
(a)
Another form of the fuzzy PID controller
(b)
Equivalent structure of the controller


## 4.1. Fuzzy Variables and Their Domain

The PID control input is(15)e(t)=r(t)-y(t).
And the output of the control module can be written as
(16)u(t)=KPe(t)+KI∫e(t)dt+KDde(t)dt.The deviatione(dis0-dis) between the target position dis0 and the actual displacement dis of the cylinder and its gradient ec(de/dt) are the input variables for fuzzy logic. And the variations ΔKP, ΔKI, and ΔKD of PID control parameters KP, KI, and KD are the output variables of the fuzzy logic. The cylinder position deviation e and its gradient ec are sampled and calculated in real time. And the output variables ΔKP, ΔKI, and ΔKD are extracted from the fuzzy matrix table based on the fuzzy rules and reasoning. The PID control parameters are adjusted using ΔKP, ΔKI, and ΔKD, in order to realize the real-time dynamic control of the cylinder displacement. According to the cylinder position control requirement, the domain of the displacement deviation e is set as (−0.5, 0.5), and the domain of the ec is (−0.1, 0.1). The domains of ΔKP, ΔKI, and ΔKD for PID parameters are (−1.2, 1.2), (−0.1, 0.1), and (−0.05, 0.05), respectively.


## 4.2. Fuzzy Logic Rules

The triangle membership function is adopted, and the membership function forΔKP is shown in Figure 3. The fuzzy logic rules are deduced, as listed in Tables 1, 2, and 3. In these tables, NB, NM, NS, ZO, PS, PM, PB represent negative big, negative medium, negative small, zero, positive small, positive medium, and positive big, respectively.Table 1
Fuzzy logic rule forΔKP.
e
c
e
NB
NM
NS
ZO
PS
PM
PB
NB
PB
PB
PB
PM
PS
PS
ZO
NM
PB
PB
PM
PM
PS
ZO
NS
NS
PB
PM
PM
PS
PS
ZO
NS
ZO
PM
PM
PB
PS
PS
ZO
NM
PS
PM
PS
PS
ZO
ZO
NS
NM
PM
PS
PS
ZO
ZO
NS
NM
NB
PB
PS
ZO
ZO
NM
NS
NB
NBTable 2
Fuzzy logic rule forΔKI.
e
c
e
NB
NM
NS
ZO
PS
PM
PB
NB
NB
NB
NM
NM
NS
NS
ZO
NM
NB
NM
NM
NS
NS
ZO
ZO
NS
NB
NM
NS
ZO
ZO
PS
PS
ZO
NM
NM
NS
ZO
PS
PM
PM
PS
NM
NS
ZO
PS
PS
PM
PB
PM
ZO
ZO
PS
PS
PM
PM
PB
PB
ZO
ZO
PS
PM
PM
PM
PBTable 3
Fuzzy logic rule forΔKD.
ec
e
NB
NM
NS
ZO
PS
PM
PB
NB
PS
NS
NB
NB
NM
NM
PS
NM
PS
NB
NB
NM
NM
NS
ZO
NS
ZO
NS
NM
NM
NS
NS
ZO
ZO
ZO
NS
NS
NS
NS
ZO
NS
PS
ZO
PM
PS
ZO
ZO
PS
ZO
PM
PS
PB
PS
PS
PB
PB
PS
PB
PB
PM
PM
PS
PB
PS
PSFigure 3
Membership function forΔKP.Using the above fuzzy logic rules, the PID control parameters can be adjusted as(17)KP(n+1)=KPn+ΔKP,KI(n+1)=KIn+ΔKI,KD(n+1)=KDn+ΔKD.Define(18)Rl=(eandec)⟶KP=∫e×ec×KPu(e)Λu(ec)Λu(KPn)2,Rm=(eandec)⟶KI=∫e×ec×KIu(e)Λu(ec)Λu(KIn)2,Rn=(eandec)⟶KD=∫e×ec×KDu(e)Λu(ec)Λu(KDn)2,
where l,m,n=1,2,3,…,25.Then the fuzzy relations ofKP, KI, and KD are
(19)RKP=⋃l=125Rl,RKI=⋃m=125Rm,RKD=⋃n=125Rn.


## 4.3. Defuzzification

The outputs of the fuzzy logic rules are also fuzzy set. In practical digital control system, the parameters must be defuzzified, that is, converting the fuzzy set into exact values according to an appropriate algorithm.We use conventional gravity center method to realize the defuzzification:(20)y*=∫Yyuc(y)dy∫Yuc(y)dy,
where y* is the center of the covered region by membership function uc(y) of fuzzy set C.It is obvious that the calculating process needs certain time, which makes it difficult to be used in real-time control system. So, the calculating process is executed off-line in advance. Then the produced defuzzification decision tables are stored in the memory of the controller. In this way, the instantaneity of the control process can be enhanced.


## 4.4. Stability Analysis

Chen and Ying [10] theoretically proved the stability of nonlinear fuzzy PI controller, based on their previous work on fuzzy control theory [11]. After that, they continued to investigate the stability of nonlinear fuzzy PI + D controller [12]. Their work offers a quite convenient and practical method to explore the stability of similar control algorithms.As described in Section2, the target cylinder system can be taken as a classical second order system. To interpret the stability of the proposed nonlinear system, we need to reconsider the fuzzy PID control principle shown in Figure 2, which can be rearranged as Figure 4 in discrete-time form, where T is the sampling period, T>0. This diagram expresses the same meaning as Figure 2 and shows the simplified structure as a figure in [12].Figure 4
Discrete-time Fuzzy PID controller.The stability of the fuzzy PI controller and the fuzzy PD controller has been analyzed in [10, 13], respectively, according to the small gain theorem [14]. In our case, if we disconnect the fuzzy D control component from Figure 4, we have the fuzzy PI control system, whose stability is completely proved in [10]. The stability conditions are as follows.Theorem 1.
A sufficient condition for the nonlinear fuzzy PI control system to be globally bounded-input and bounded-output (BIBO) stable is that(1)
the given nonlinear system has a bounded norm (gain)∥N∥<∞;(2)
the parameters of the fuzzy PI controllerKP, KI, and KuPI satisfy
(21)KuPI(γKP+KI)LT(2L-KM)∥N∥<1,
whereL is the domain boundary of fuzzy logic parameters, γ=max{1,T} and KM=max{KPMP,KIMc}, with MP=supn≥0|e(nT)| and Mc=supn≥0|ec(nT)|≤(2/T)MP.In the same way, by disconnecting the fuzzy PI controller from Figure4, we reduce the fuzzy PID control system to a simple fuzzy D controller. This fuzzy D control system is a special or simplified case of the fuzzy PD control system studied in [13], and hence its stability condition can be derived from that obtained in [13] by removing the fuzzy P controller or just setting the output of fuzzy P component as zero. The stability conditions can be derived as follows.Theorem 2.
A sufficient condition for the fuzzyD control system to be BIBO stable is that the given process has a bounded norm (gain) ∥N∥<∞ and the parameters of the fuzzy D controller KD and KuD satisfy
(22)γKDKuD2T(L-KD(MD+|r|))∥N∥<1,
where γ=max{1,L}.Till now, we are sure that the fuzzy PI controller and fuzzyD controller are stable according to Theorems 1 and 2, respectively. Then, we need to verify that the combined fuzzy PID controller is stable.Again, the Fuzzy PID controller shown in Figure2 can be redrawn as Figure 5. The fuzzy PID control systems shown in Figures 2, 4, and 5 are the same thing but in different forms, just for analysis convenience. In Figure 5(a), let the system model be denoted by S1 and the fuzzy PID controller together be denoted by S2, resulting in the new structure in Figure 5(b). Then, as discussed in [10, 13], we can obtain a sufficient condition for the BIBO stability of the overall fuzzy PID equivalent closed-loop control system from the bounds:
(23)∥S1(uPID)∥≤M1+L1∥uPID∥,∥S2([ye])∥≤M2+L2∥[ye]∥,where M1, M2, L1, L2 are constants, and L1L2<1.Equivalent closed-loop control system for the fuzzy PID controller.
(a)
Another form of the fuzzy PID controller
(b)
Equivalent structure of the controller


## 5. Experiments and Analysis

### 5.1. Experimental System Design

The experimental system is composed of pneumatic servo control actuating mechanism, feedback units, loading module, and controller. The pneumatic servo control actuating mechanism is symmetrical cylinder system controlled by proportional flow valve. The feedback units include displacement transducer and the pressure transducer for the cylinder chambers. The whole controller for the system includes industrial personal computer (shorted as IPC), A/D, and D/A board cards for data acquisition and output. The experimental system schematic diagram is shown in Figure6 and the experimental platform is shown in Figure 7. The instruments used in the experiment are listed in Table 4.Table 4
Experimental instruments.
Name
Model
Specification
Brand
Main cylinder
CA2WL40-500
Φ
32 mm, range: 500 mm
SMC
Flow proportional valve
MPYE-5-1/8-010B
Max flow: 700 L/min, response: 3 ms, lag: 0.3%
Festo
Pressure proportional valve
MPPE-5-1/8-010B
Max flow: 820 L/min, response: 3 ms, lag: 0.3%
Festo
Displacement transducer
MTS-500
Range: 500 mm, resolution: 5 us,  repeatability: ±0.001% FS
MTS
Pressure transducer
JYB-KO-HVG
Accuracy: 0.25% FS, range: 0-1 Mpa, response: 30 ms, nonlinearity: ±0.2% FS, repeatability: ±0.1% FS
Kunlun Coast
Force transducer
BK-1
Range: 1500 N, accuracy: 0.05% FS, nonlinearity: 0.05% FS, repeatability: 0.05% FS
Kunlun CoastFigure 6
Pneumatic servo control system principle.Figure 7
Experimental system.The control software was developed based on MATLAB and LabVIEW. All the fuzzy logic and PID control algorithms were realized in MATLAB simulink toolbox and then compiled into real-time control program using RTW technique.RTW is an important supplementary functional module for MATLAB graphic modeling and simulation module Simulink. Optimized, portable, and personalized codes can be directly generated from Simulink model with RTW tools. According to the specific target preparation, the generated codes can be compiled into program for a different rapid prototype real-time environment. RTW ensures us to focus on the model establishment and system design and release from the boring programming work. This kind of developing pattern is very suitable for laboratory experimental system design.RTW technique has the following features: (1) it supports continuous, discrete, and hybrid time system, including conditioned executing system and nonvirtual system; (2) RTW seamlessly integrates the Run-Time Monitor with the real-time target, which provides an excellent signal monitor and parameters adjusting interface. The flow diagram of real-time control program developing using RTW technique is shown in Figure8.Figure 8
Working flow with RTW.LabWindows/CVI is adopted to create the control program frame and user interface, shown in Figure9.Figure 9
LabVIEW control program diagram.


### 5.2. Target Position Control Experiments

On the experimental platform, we set the target position of the cylinder as 250 mm, 300 mm, and 350 mm, respectively. And the control results are shown in Figures10, 11, and 12.Figure 10
Response of target position 250 mm.Figure 11
Response of target position 300 mm.Figure 12
Response of target position 350 mm.The rising times of the three experiments are 2.65 s, 4.3 s, and 3.2 s, respectively, which indicates that long displacement does not mean long corresponding time. During the motion, the proposed fuzzy PID controller can adjust the control parameters and change the behavior of the system to achieve the best performance. Also, the overshoots in Figures10, 11, and 12 are 0.49 mm, 0.04 mm, and 0 mm, respectively. Consulting the stable errors listed in Table 5, we can see that when the displacement becomes longer, the system hysteresis shows greater influence on the final error. To be more frank, long displacement has no overshoot but big negative error, while short displacement has big overshoot and positive error.Table 5
Control errors of cylinder position (mm).
Initial
Target
AE
RE
100
250
0.2441
0.20%
100
300
0.20
0.07%
100
350
0.2441
0.09%
AE represents absolute error and RE denotes relative error.From the experimental data, three significant features can be drawn as follows.(1)
Dynamic quality: the proposed method has fuzzy logic virtues in the earlier stage of control that can actuate the cylinder to approximate the target position rapidly. And during the late stages of control, it has virtues of PID algorithm, which means that the PID parameters are adjusted to execute the cylinder to quickly reach the target position without overshoot.(2)
Stable quality: the analysis of stable error is listed in Table5. From the error analysis, it can be seen that the proposed theoretical model, control method, and experimental system can guarantee that the absolute control error is around 0.24 mm. In addition, the error is independent of the target position. The robust of the control method is quite well.(3)
No creeping phenomenon: when the cylinder runs with quite low speed or stops in the middle, there will be creeping phenomenon because of the air pressure in both the chambers and friction. From the response data in Figures10, 11, and 12, it can be concluded that the proposed method can control the cylinder to stay at any position without creeping phenomenon.


### 5.3. Compared with Classical PID

To show the advantages of the proposed cylinder position servo control method, an experiment was done to compare the classical PID controller and the developed one in this paper, with the target position 300 mm.The stable state data and error data are shown in Figures13 and 14. From the above two comparing data curves, it can be seen that the classical PID controller can achieve the destination, but has bigger error, error range, and overshoot, which are 0.78 mm, 0.25 mm, and 0.78 mm, respectively. However, the proposed fuzzy PID controller has relative smaller error, error range, and overshoot, which are 0.20 mm, 0.24 mm, and 0.04 mm, respectively.Figure 13
Stable data of comparing experiment.Figure 14
Error of comparing experiment.


## 5.1. Experimental System Design

The experimental system is composed of pneumatic servo control actuating mechanism, feedback units, loading module, and controller. The pneumatic servo control actuating mechanism is symmetrical cylinder system controlled by proportional flow valve. The feedback units include displacement transducer and the pressure transducer for the cylinder chambers. The whole controller for the system includes industrial personal computer (shorted as IPC), A/D, and D/A board cards for data acquisition and output. The experimental system schematic diagram is shown in Figure6 and the experimental platform is shown in Figure 7. The instruments used in the experiment are listed in Table 4.Table 4
Experimental instruments.
Name
Model
Specification
Brand
Main cylinder
CA2WL40-500
Φ
32 mm, range: 500 mm
SMC
Flow proportional valve
MPYE-5-1/8-010B
Max flow: 700 L/min, response: 3 ms, lag: 0.3%
Festo
Pressure proportional valve
MPPE-5-1/8-010B
Max flow: 820 L/min, response: 3 ms, lag: 0.3%
Festo
Displacement transducer
MTS-500
Range: 500 mm, resolution: 5 us,  repeatability: ±0.001% FS
MTS
Pressure transducer
JYB-KO-HVG
Accuracy: 0.25% FS, range: 0-1 Mpa, response: 30 ms, nonlinearity: ±0.2% FS, repeatability: ±0.1% FS
Kunlun Coast
Force transducer
BK-1
Range: 1500 N, accuracy: 0.05% FS, nonlinearity: 0.05% FS, repeatability: 0.05% FS
Kunlun CoastFigure 6
Pneumatic servo control system principle.Figure 7
Experimental system.The control software was developed based on MATLAB and LabVIEW. All the fuzzy logic and PID control algorithms were realized in MATLAB simulink toolbox and then compiled into real-time control program using RTW technique.RTW is an important supplementary functional module for MATLAB graphic modeling and simulation module Simulink. Optimized, portable, and personalized codes can be directly generated from Simulink model with RTW tools. According to the specific target preparation, the generated codes can be compiled into program for a different rapid prototype real-time environment. RTW ensures us to focus on the model establishment and system design and release from the boring programming work. This kind of developing pattern is very suitable for laboratory experimental system design.RTW technique has the following features: (1) it supports continuous, discrete, and hybrid time system, including conditioned executing system and nonvirtual system; (2) RTW seamlessly integrates the Run-Time Monitor with the real-time target, which provides an excellent signal monitor and parameters adjusting interface. The flow diagram of real-time control program developing using RTW technique is shown in Figure8.Figure 8
Working flow with RTW.LabWindows/CVI is adopted to create the control program frame and user interface, shown in Figure9.Figure 9
LabVIEW control program diagram.


## 5.2. Target Position Control Experiments

On the experimental platform, we set the target position of the cylinder as 250 mm, 300 mm, and 350 mm, respectively. And the control results are shown in Figures10, 11, and 12.Figure 10
Response of target position 250 mm.Figure 11
Response of target position 300 mm.Figure 12
Response of target position 350 mm.The rising times of the three experiments are 2.65 s, 4.3 s, and 3.2 s, respectively, which indicates that long displacement does not mean long corresponding time. During the motion, the proposed fuzzy PID controller can adjust the control parameters and change the behavior of the system to achieve the best performance. Also, the overshoots in Figures10, 11, and 12 are 0.49 mm, 0.04 mm, and 0 mm, respectively. Consulting the stable errors listed in Table 5, we can see that when the displacement becomes longer, the system hysteresis shows greater influence on the final error. To be more frank, long displacement has no overshoot but big negative error, while short displacement has big overshoot and positive error.Table 5
Control errors of cylinder position (mm).
Initial
Target
AE
RE
100
250
0.2441
0.20%
100
300
0.20
0.07%
100
350
0.2441
0.09%
AE represents absolute error and RE denotes relative error.From the experimental data, three significant features can be drawn as follows.(1)
Dynamic quality: the proposed method has fuzzy logic virtues in the earlier stage of control that can actuate the cylinder to approximate the target position rapidly. And during the late stages of control, it has virtues of PID algorithm, which means that the PID parameters are adjusted to execute the cylinder to quickly reach the target position without overshoot.(2)
Stable quality: the analysis of stable error is listed in Table5. From the error analysis, it can be seen that the proposed theoretical model, control method, and experimental system can guarantee that the absolute control error is around 0.24 mm. In addition, the error is independent of the target position. The robust of the control method is quite well.(3)
No creeping phenomenon: when the cylinder runs with quite low speed or stops in the middle, there will be creeping phenomenon because of the air pressure in both the chambers and friction. From the response data in Figures10, 11, and 12, it can be concluded that the proposed method can control the cylinder to stay at any position without creeping phenomenon.


## 5.3. Compared with Classical PID

To show the advantages of the proposed cylinder position servo control method, an experiment was done to compare the classical PID controller and the developed one in this paper, with the target position 300 mm.The stable state data and error data are shown in Figures13 and 14. From the above two comparing data curves, it can be seen that the classical PID controller can achieve the destination, but has bigger error, error range, and overshoot, which are 0.78 mm, 0.25 mm, and 0.78 mm, respectively. However, the proposed fuzzy PID controller has relative smaller error, error range, and overshoot, which are 0.20 mm, 0.24 mm, and 0.04 mm, respectively.Figure 13
Stable data of comparing experiment.Figure 14
Error of comparing experiment.


## 6. Conclusions

(1)
The nonlinear mathematical models of cylinder and its valve-control pneumatic system, that is, pressure differential equation, pressure-flow equation, and moment equilibrium equation, are proposed.
(2)
The cylinder position servo controller based on the mathematical models and fuzzy PID algorithm is established and proved to be stable under specified conditions.
(3)
Experimental results show that the absolute control error is less than 0.25 mm and the proposed fuzzy PID controller has better performance than classical PID. The dynamic and stable qualities of the controller are quite well.



---

*Source: 375483-2013-11-14.xml*