# Force Control for a Pneumatic Cylinder Using Generalized Predictive Controller Approach

Authors: Ahmad ’Athif Mohd Faudzi; Nu’man Din Mustafa; Khairuddin Osman
Journal: Mathematical Problems in Engineering
 (2014)

---

## Abstract

Pneumatic cylinder is a well-known device because of its high power to weight ratio, easy use, and environmental safety. Pneumatic cylinder uses air as its power source and converts it to a possible movement such as linear and rotary movement. In order to control the pneumatic cylinder, controller algorithm is needed to control the on-off solenoid valve with encoder and pressure sensor as the feedback inputs. In this paper, generalized predictive controller (GPC) is proposed as the control strategy for the pneumatic cylinder force control. To validate and compare the performance, proportional-integral (PI) controller is also presented. Both controllers algorithms GPC and PI are developed using existing linear model of the cylinder from previous research. Results are presented in simulation and experimental approach using MATLAB-Simulink as the platform. The results show that the GPC is capable of fast response with low steady state error and percentage overshoot compared to PI.


---

## Body

## 1. Introduction

Pneumatic actuator has been implemented in various applications such as robotics and research tools. However, by using pneumatic actuator, there are several nonlinearities involved such as valve flow rate, compressibility of air, and dead band. In robotics force control is important. It is to ensure that the device is not broken due to the high force exerted. Most researchers used different control algorithm in order to achieve high performance in control. For example, Faudzi implemented PI controller to the pneumatic actuator to achieve better force control [1]. From the result presented, the author manages to prove it. However, the result shows low accuracy force tracking and quiet large steady state error [1].Then by using same plant as in [1], AbdelRahman used PI neuro-fuzzy controller to control the pneumatic cylinder [2]. The author started by obtaining the force model for the cylinder and used it to design the proposed controller. Then the author presented two results obtained from the simulation and real time experiment. The author then compared both results for fast response and force tracking. As a result, the pneumatic cylinder manages to do force tracking with high accuracy and fast response [2].On the other hand, Hikmat implemented RHC (receding horizon controller) to the pneumatic cylinder [3]. The author also designed an observer in order to implement the controller in the real time experiment. Both results in simulation and experiment then are compared and validated. From the result, the RHC manages to do force tracking with high accuracy and fast response [3].Xiangrong and Goldfarb used multi-input multioutput SMC (sliding mode controller) to do force control on a pneumatic robot [4]. Although, in the paper presented mainly about controlling stiffness and force independently, the author manages to show good experimental result for force control, the result shows the effectiveness of the proposed controller in controlling the force as well as the stiffness [4].Another related research is regarding pressure control using GPC approach [5]. In this paper, the author shows that the GPC manages to eliminate the overshoot in the open loop. Pressure and force are related to each other which is force equal to pressure divide by the effective area. Therefore, same control approach used in [5] is used in this proposed research.This paper’s objective is to design generalized predictive controller (GPC) for pneumatic cylinder force control. In order to compare and analyse the result obtained, PI controller from the previous research will be used. The controllers are compared using a few criteria which are transient response and accuracy. The GPC also will be analysed on the capability of the controller to improve the result obtained from the previous research using PI controller. This paper is organized as follows. Section1 is the introduction for another related controller to the pneumatic force control. Then, Section 2 is about the plant and model of the plant used. Section 3 is the controller designs which are GPC and PI controller. Section 4 is the result and discussion. Lastly is the conclusion.


## 2. Model of the Plant

A modified double-acting pneumatic cylinder is used as the plant for this experiment. The cylinder consists of a pair of on offsolenoid valves, pressure sensor, optical encoder, and guide rod [6, 7] as shown in Figure 1. This actuator has an accuracy of 0.169 mm and can be extended from 0 to 200 mm in length. The actuator working pressure is 0.6 MPa. Because of the high pressure and actuator diameter, the pulling and pushing force are 700N and 120N respectively. This pneumatic cylinder is different from the conventional pneumatic cylinder in the market. This is because this cylinder is controlled by using only one chamber whereas the second chamber is fixed at a constant pressure of 0.6 MPa. Due to the design of the plant, the operation of the cylinder movement is as follows:(1)
Valve 1-off, valve 2-off—no movement,
(2)
Valve 1-off, valve 2-on—contraction,
(3)
Valve 1-on, valve 2-off—extraction,
(4)
Valve 1-on, valve 2-on—no movement.Figure 1
Pneumatic cylinder parts.


### 2.1. Force Model

Figure2 shows the experimental setup for the force experiment. The experiment setup is set up so that the pneumatic cylinder end effector is fixed at a certain position. This is because the pressure sensor needs to read the pressure inside chamber 1 and convert it to force value in the MATLAB-Simulink. Therefore by doing this the desired force can be achieved and controllable. The setup consists of a PC (personal computer), a pneumatic cylinder, and a NI PCI 6221 DAQ card. In order to design the controllers a workable model is needed. The model is obtained using a system identification technique as used in [8]. The platform used is MATLAB-Simulink. The NI PCI 6221 DAQ card is used as the interface between the computer and the plant. In order to obtain more and better data the sampling time of t
s
=
0.01 s. Thus, the obtained model is an ARX model as in
(1)
B
A
=
0.3225
z
-
1
+
0.102
z
-
2
+
0.2824
z
-
3
1
-
0.4483
z
-
1
+
0.2323
z
-
2
-
0.3406
z
-
3
.Figure 2
Force experiment setup.


## 2.1. Force Model

Figure2 shows the experimental setup for the force experiment. The experiment setup is set up so that the pneumatic cylinder end effector is fixed at a certain position. This is because the pressure sensor needs to read the pressure inside chamber 1 and convert it to force value in the MATLAB-Simulink. Therefore by doing this the desired force can be achieved and controllable. The setup consists of a PC (personal computer), a pneumatic cylinder, and a NI PCI 6221 DAQ card. In order to design the controllers a workable model is needed. The model is obtained using a system identification technique as used in [8]. The platform used is MATLAB-Simulink. The NI PCI 6221 DAQ card is used as the interface between the computer and the plant. In order to obtain more and better data the sampling time of t
s
=
0.01 s. Thus, the obtained model is an ARX model as in
(1)
B
A
=
0.3225
z
-
1
+
0.102
z
-
2
+
0.2824
z
-
3
1
-
0.4483
z
-
1
+
0.2323
z
-
2
-
0.3406
z
-
3
.Figure 2
Force experiment setup.


## 3. Controller Designs

### 3.1. GPC Algorithm

In order to derive the GPC algorithm, a CARIMA model as in (2) is used:
(2)
A
(
z
-
1
)
y
(
t
)
=
B
(
z
-
1
)
z
-
d
u
(
t
-
1
)
+
C
(
z
-
1
)
e
(
t
)
Δ
,
where A, B, and C are the polynomials with backward shift operator (
z
). e
(
t
) is the disturbance and d is the dead time [9].GPC objective is to minimize a multistage cost function as in (3) by applying a certain control sequence [9]:
(3)
J
(
N
1
,
N
2
,
N
3
)
=
∑
j
=
N
1
N
2
δ
(
j
)
[
y
^
(
t
+
j
∣
t
)
-
w
(
t
+
j
)
]
2
+
∑
j
=
1
N
u
λ
(
j
)
[
Δ
u
(
t
+
j
-
1
)
]
2
,
where u is the control input, N
u is the control horizon, w is the reference value, y
^ is the plant prediction on data up to time t, N
1 is the minimum costing horizon, N
2 is the maximum costing horizon, and λ is the control weighting.Then, consider the following Diophantine equation [9]:
(4)
C
(
z
-
1
)
=
E
j
(
z
-
1
)
A
~
(
z
-
1
)
+
z
-
j
F
j
(
z
-
1
)
.PolynomialsE
j
(
z
-
1
) and F
j
(
z
-
1
) can be expressed as in (4) with j and n which are integer numbers. Consider
(5)
F
j
(
z
-
1
)
=
f
j
,
0
+
f
j
,
1
z
-
1
+
⋯
+
f
j
,
n
a
z
-
n
a
,
E
j
(
z
-
1
)
=
e
j
,
0
+
e
j
,
1
z
-
1
+
⋯
+
e
j
,
j
-
1
z
-
(
j
-
1
)
.
For the purpose of simplicity, C polynomial is chosen as one. Therefore (4) can be written as
(6)
1
=
E
j
(
z
-
1
)
A
~
(
z
-
1
)
+
z
-
j
F
j
(
z
-
1
)
.
Then multiply (2) with Δ
E
j
(
z
-
1
)
z
j and take into consideration (6). Thus (7) is obtained:
(7)
y
(
t
+
j
)
=
F
j
(
z
-
1
)
y
(
t
)
+
E
j
(
z
-
1
)
B
(
z
-
1
)
×
Δ
u
(
t
+
j
-
d
-
1
)
+
E
j
(
z
-
1
)
e
(
t
+
j
)
.
Rearrange (7). Thus, the best prediction y
(
t
+
j
) is as follows:
(8)
y
(
t
+
j
)
=
F
j
(
z
-
1
)
y
(
t
)
+
G
j
(
z
-
1
)
Δ
u
(
t
+
j
-
d
-
1
)
,
where
(9)
G
j
(
z
-
1
)
=
E
j
(
z
-
1
)
B
(
z
-
1
)
.Next step is to obtain the control increment equation.Simplify (8) as in [9]; therefore (10) is obtained:
(10)
y
=
G
u
+
f
,
where
(11)
y
=
[
y
^
(
t
+
d
+
1
)
y
^
(
t
+
d
+
2
)
⋮
y
^
(
t
+
d
+
N
)
]
G
=
[
g
0
0
…
0
g
1
g
0
…
0
⋮
⋮
⋮
⋮
g
N
-
1
g
N
-
2
…
g
0
]
u
=
[
Δ
u
(
t
)
Δ
u
(
t
+
1
)
⋮
Δ
u
(
t
+
N
-
1
)
]
f
=
[
f
(
t
+
1
)
f
(
t
+
2
)
⋮
f
(
t
+
N
)
]
.
Simplify (3) with δ
(
j
) being equal to one and λ
(
j
) a constant value. Consider
(12)
J
=
(
y
-
w
)
T
(
y
-
w
)
+
λ
u
T
u
.
Simplifying (12) further,
(13)
J
=
1
2
u
T
H
u
+
b
T
u
+
f
0
,
where
(14)
H
=
2
(
G
T
G
+
λ
I
)
,
b
T
=
2
(
f
-
w
)
T
G
,
f
0
=
(
f
-
w
)
T
(
f
-
w
)
.
Consider that J is equal to zero. Thus, this leads to the projected control increment vector as below:
(15)
u
~
=
k
(
w
-
f
)
,
where
(16)
u
~
=
Δ
u
,
k
=
(
G
T
G
+
λ
I
)
-
1
G
T
,
w
=
[
w
(
t
+
d
+
1
)
w
(
t
+
d
+
2
)
⋮
w
(
t
+
d
+
N
)
]
,
with
(17)
w
(
t
+
d
+
k
)
=
α
*
w
(
t
+
k
-
1
)
+
(
1
-
α
)
r
(
t
+
k
)
,
where α is an adjustable value in range 0 to 1. r
(
t
+
k
) is the input reference for the system.


### 3.2. PI Controller

An ideal PID controller is as in (18):
(18)
U
(
t
)
=
K
p
e
(
t
)
+
K
i
∫
0
τ
e
(
τ
)
d
τ
+
K
d
d
d
t
e
(
t
)
.
From (18), for PI controller K
d is consider zero. Therefore (19) is obtained:
(19)
U
(
t
)
=
K
p
e
(
t
)
+
K
i
∫
0
τ
e
(
τ
)
d
τ
+
K
d
d
d
t
e
(
t
)
,
where e
(
t
i
) is the error of the continuous time system at ith sampling time interval. K
p and K
i are the tuning parameters.


### 3.3. Controller Implementation in MATLAB-Simulink

The platform used in this research is MATLAB-Simulink. Figure3 shows the Simulink block diagram for force simulation. In this figure, the controller block consists of GPC algorithm or PI controller and the force model is as in (1). Meanwhile Figure 4 is the Simulink block diagram for the real time experiment setup. As mentioned before, a DAQ card is used in order to act as a bridge from the PC to the plant. Therefore a block for DAQ setup is also included in the block diagram. There are two types of input given which are the step and multistep input. For both simulation and real time experiments, same input of step and multistep is used.Figure 3
Simulink block diagram for force simulation.Figure 4
Simulink block diagram for force experimental setup (real time).


## 3.1. GPC Algorithm

In order to derive the GPC algorithm, a CARIMA model as in (2) is used:
(2)
A
(
z
-
1
)
y
(
t
)
=
B
(
z
-
1
)
z
-
d
u
(
t
-
1
)
+
C
(
z
-
1
)
e
(
t
)
Δ
,
where A, B, and C are the polynomials with backward shift operator (
z
). e
(
t
) is the disturbance and d is the dead time [9].GPC objective is to minimize a multistage cost function as in (3) by applying a certain control sequence [9]:
(3)
J
(
N
1
,
N
2
,
N
3
)
=
∑
j
=
N
1
N
2
δ
(
j
)
[
y
^
(
t
+
j
∣
t
)
-
w
(
t
+
j
)
]
2
+
∑
j
=
1
N
u
λ
(
j
)
[
Δ
u
(
t
+
j
-
1
)
]
2
,
where u is the control input, N
u is the control horizon, w is the reference value, y
^ is the plant prediction on data up to time t, N
1 is the minimum costing horizon, N
2 is the maximum costing horizon, and λ is the control weighting.Then, consider the following Diophantine equation [9]:
(4)
C
(
z
-
1
)
=
E
j
(
z
-
1
)
A
~
(
z
-
1
)
+
z
-
j
F
j
(
z
-
1
)
.PolynomialsE
j
(
z
-
1
) and F
j
(
z
-
1
) can be expressed as in (4) with j and n which are integer numbers. Consider
(5)
F
j
(
z
-
1
)
=
f
j
,
0
+
f
j
,
1
z
-
1
+
⋯
+
f
j
,
n
a
z
-
n
a
,
E
j
(
z
-
1
)
=
e
j
,
0
+
e
j
,
1
z
-
1
+
⋯
+
e
j
,
j
-
1
z
-
(
j
-
1
)
.
For the purpose of simplicity, C polynomial is chosen as one. Therefore (4) can be written as
(6)
1
=
E
j
(
z
-
1
)
A
~
(
z
-
1
)
+
z
-
j
F
j
(
z
-
1
)
.
Then multiply (2) with Δ
E
j
(
z
-
1
)
z
j and take into consideration (6). Thus (7) is obtained:
(7)
y
(
t
+
j
)
=
F
j
(
z
-
1
)
y
(
t
)
+
E
j
(
z
-
1
)
B
(
z
-
1
)
×
Δ
u
(
t
+
j
-
d
-
1
)
+
E
j
(
z
-
1
)
e
(
t
+
j
)
.
Rearrange (7). Thus, the best prediction y
(
t
+
j
) is as follows:
(8)
y
(
t
+
j
)
=
F
j
(
z
-
1
)
y
(
t
)
+
G
j
(
z
-
1
)
Δ
u
(
t
+
j
-
d
-
1
)
,
where
(9)
G
j
(
z
-
1
)
=
E
j
(
z
-
1
)
B
(
z
-
1
)
.Next step is to obtain the control increment equation.Simplify (8) as in [9]; therefore (10) is obtained:
(10)
y
=
G
u
+
f
,
where
(11)
y
=
[
y
^
(
t
+
d
+
1
)
y
^
(
t
+
d
+
2
)
⋮
y
^
(
t
+
d
+
N
)
]
G
=
[
g
0
0
…
0
g
1
g
0
…
0
⋮
⋮
⋮
⋮
g
N
-
1
g
N
-
2
…
g
0
]
u
=
[
Δ
u
(
t
)
Δ
u
(
t
+
1
)
⋮
Δ
u
(
t
+
N
-
1
)
]
f
=
[
f
(
t
+
1
)
f
(
t
+
2
)
⋮
f
(
t
+
N
)
]
.
Simplify (3) with δ
(
j
) being equal to one and λ
(
j
) a constant value. Consider
(12)
J
=
(
y
-
w
)
T
(
y
-
w
)
+
λ
u
T
u
.
Simplifying (12) further,
(13)
J
=
1
2
u
T
H
u
+
b
T
u
+
f
0
,
where
(14)
H
=
2
(
G
T
G
+
λ
I
)
,
b
T
=
2
(
f
-
w
)
T
G
,
f
0
=
(
f
-
w
)
T
(
f
-
w
)
.
Consider that J is equal to zero. Thus, this leads to the projected control increment vector as below:
(15)
u
~
=
k
(
w
-
f
)
,
where
(16)
u
~
=
Δ
u
,
k
=
(
G
T
G
+
λ
I
)
-
1
G
T
,
w
=
[
w
(
t
+
d
+
1
)
w
(
t
+
d
+
2
)
⋮
w
(
t
+
d
+
N
)
]
,
with
(17)
w
(
t
+
d
+
k
)
=
α
*
w
(
t
+
k
-
1
)
+
(
1
-
α
)
r
(
t
+
k
)
,
where α is an adjustable value in range 0 to 1. r
(
t
+
k
) is the input reference for the system.


## 3.2. PI Controller

An ideal PID controller is as in (18):
(18)
U
(
t
)
=
K
p
e
(
t
)
+
K
i
∫
0
τ
e
(
τ
)
d
τ
+
K
d
d
d
t
e
(
t
)
.
From (18), for PI controller K
d is consider zero. Therefore (19) is obtained:
(19)
U
(
t
)
=
K
p
e
(
t
)
+
K
i
∫
0
τ
e
(
τ
)
d
τ
+
K
d
d
d
t
e
(
t
)
,
where e
(
t
i
) is the error of the continuous time system at ith sampling time interval. K
p and K
i are the tuning parameters.


## 3.3. Controller Implementation in MATLAB-Simulink

The platform used in this research is MATLAB-Simulink. Figure3 shows the Simulink block diagram for force simulation. In this figure, the controller block consists of GPC algorithm or PI controller and the force model is as in (1). Meanwhile Figure 4 is the Simulink block diagram for the real time experiment setup. As mentioned before, a DAQ card is used in order to act as a bridge from the PC to the plant. Therefore a block for DAQ setup is also included in the block diagram. There are two types of input given which are the step and multistep input. For both simulation and real time experiments, same input of step and multistep is used.Figure 3
Simulink block diagram for force simulation.Figure 4
Simulink block diagram for force experimental setup (real time).


## 4. Result and Discussion

In this research, the selected parameters for the GPC areN
1
=
1, N
2
=
6, N
u
=
2, α
=
0.95, and λ
=
0.9. Meanwhile for PI controller the selected parameters are based on a research done by Faudzi [1] which are K
p
=
2 and K
i
=
1. Figure 5 is the step response for PI versus GPC force control in simulation. It can be seen from the figure that both results exhibit zero percentage overshoot and steady state error. However GPC achieved the desired target faster compared to PI. Meanwhile Figure 6 is the multistep response for PI versus GPC force control in simulation. The objective of the multistep input is to test the responsiveness and tracking ability of the controller. As can be seen in Figure 6, GPC shows better tracking ability with fast response and high accuracy. This is also shown in Table 1 where the rise time and settling time for GPC are lower compared to PI controller.Table 1
Analysis table for PI versus GPC in simulation.
Criteria
PI
GPC
Rise time (T
r)
2.0956
0.4366
Settling time (T
s)
6.2387
0.7940
Percent overshoot (%OS)
0
0
Percent steady state error (%ess)
0.01
0.001Figure 5
Step responses for PI versus GPC force control in simulation.Figure 6
Multistep responses for PI versus GPC force control in simulation.Figure7 is the step response for PI and GPC force control in real time experiment. Here, the GPC controller shows better performance compared to PI controller with fast response and low percentage overshoot. From the figure also, the PI controller overshoot can be seen saturated at certain force value. This is because the maximum force the cylinder can produce while extracting is 120 N as mentioned in Section 2. Figure 8 shows the multistep response for PI versus GPC force control in real time experiment. It is clearly observed that GPC control has the ability to do force tracking compared to the PI controller. GPC controller also can do the force tracking with fast response and low percentage overshoot as shown in Table 2.Table 2
Analysis table for PI versus GPC in real time experiment.
Criteria
PI
GPC
Rise time (T
r)
0.9398
0.3169
Settling time (T
s)
3.9377
0.4902
Percent overshoot (%OS)
20.9822
11.6868
Percent steady state error (%ess)
1
1Figure 7
Step response for PI versus GPC force control in real time experiment.Figure 8
Multistep responses for PI versus GPC force control in real time experiment.


## 5. Conclusions

In this experiment, both controllers show good control performance whether in simulation or real time experiment when tested with step input. However, when multistep input is used, clearly GPC has the advantage over PI controller with faster response and lower steady state error and percentage overshoot. This result is important as a validation tool for other controllers and as motivation for the next stage in this research area.



---

*Source: 261829-2014-04-22.xml*