Sie sind auf Seite 1von 13

MECHATRONICS

PERGAMON Mechatronics 8 (1998) 241-253

Position control of a pneumatic cylinder using


fuzzy PWM control method
Ming-Chang Shih*, Ming-An Ma
Department of Mechanical Engineering, National Cheng-Kung University, 700, Tainan, Taiwan
Received 19 September 1995; revised 2 April 1997; accepted 4 December 1997

Abstract

The purpose of the paper is to apply the fuzzy control technology and modified differential
PWM control method to control the position of a pneumatic rodless cylinder. The experimental
results show that the pneumatic system has the advantages both good performance and low
cost with the proposed controller. © 1998 Elsevier Science Ltd. All rights reserved.

1. Introduction

The pneumatic control systems play very important roles in the industrial auto-
mation systems owing to the following a d v a n t a g e s - - l o w cost of the components, easy
to keep clean to the working environments, easy in power transfer, and so on [1].
Conventionally, a linearized mathematical model of a pneumatic servo control system
must be built up, and then, the control system can be analyzed and a controller can
be designed. In fact, the pneumatic system is a nonlinear and time variant system
because of the compressibility of air, the friction force between the piston and the
cylinder, the air mass flow rate through the servo valve, etc. It is very difficult to get an
accurate and linearized mathematical model, therefore, the fuzzy control technology is
applied in the paper. Instead of using a servo valve, two cheap high speed solenoid
valves are used in the system. Noritsugu has used the P W M method and solenoid
valve to control the velocity and the position of a pneumatic cylinder [2, 3]; besides,
M u t o has used differential P W M method to control a hydraulic actuator [4]. In the
paper, a fuzzy modified differential P W M controller is designed and implemented in
a microcomputer to control the position of a pneumatic cylinder.

* Corresponding author.

0957-4158/98 $19.00 © 1998 Elsevier Science Ltd. All rights reserved.


PII:S0957 4158(98)00005-1
242 M.-C. Shih. M.-A. Ma,,Mechatronics ~ 11998) 241- 253

2. Layout of the experimental devices

The layout of the experimental devices of the pneumatic rodless cylinder position
control system is shown in Fig. 1. An IBM 32 bit compatible microcomputer is applied
as a controller and to get the experimental data. The displacement of the cylinder is
measured by a pulse scale, the air pressures are also measured and fed back to the
computer. The microcomputer calculated control signal can be changed into pulse
width modulated signal through the designed software, and the control signal is sent
to control the solid state relay (SSR) and the high speed solenoid valves #1 and #2;
and then, the air mass flow rate can be regulated and the position of the cylinder can
be controlled. The frequency of the valves in the paper is 100 Hz, which are made by
the company MAC, U.S.A.

2.

4.
D.

6.

-_/
6,

' ~ Pictmcnt
I I

~ Ca~J~

I. Pneumatic Cylinder 2.Pulse Scale


3. High Speed Valves 4. Decoder
5. Interface Card 6.Microcomputer
7. Solid State Relay 8.Power Supply
9. Filter-Pressure Regulater 10.compressed Air
-Lubrication Unit
11.Load Cylinder 13. Proportional
12.Pressure Sensor Pressure Valve

Fig. I. Layout of the experimental devices.


M.-C. Shih, M.-A. Ma/Mechatronics 8 (1998) 241-253 243

~ ~ Leflwa~

t i,,Lju L., l"2 >0

Fig. 2. Scheme of motion control of a pneumatic cylinder with high speed solenoid valves.

3. Differential P W M and modified differential P W M controller

3.1. Principle of the P W M control method

The pulse width modulated signal can be produced using a comparator to modulate
the high frequency carrier wave to the desire modulated wave. In the paper, both the
carrier wave and the modulated wave are periodic tooth wave with the same period
T< [5]. And, the duty ratio v (or pulse width ratio) is defined as the ratio of the time
of the " o n " state to that of the period. Figure 2 shows that the pneumatic rodless
cylinder is controlled by two solenoid valves. After switching the valves #1 and #2
according to the preset values of the duty ratios, the air flow rate through the valves
can be regulated. If the desired motion of the cylinder is rightward, then the difference
of the duty ratio should be larger than zero, i.e. Az = z,-'if2, it could be zl > 0, ~'2 = 0;
similarly, if the desired motion of the cylinder is leftward, then the PWM control
signal should have a negative duty ratio, Az < 0; it could be Zl = 0, z2 > 0. After the
pressure difference of the two chambers of the cylinder is built up according to the
differential duty ratio control, the motion of the cylinder can be controlled.

3.2. Differential P W M and modified differential P W M method

For the pulse width modulation (PWM) control, the on/off switching actions are
operated instantly, but, the actual motion of the solenoid valves are delayed and even
have only half-opening due to the magnetic hysteresis and the mechanical motion of
the spool valve; the time responses of the control signal u and the displacement x of
a solenoid valve are shown in Fig. 3. The time t, is equal to the summation of tl and
t2, t~ is the required time of the electromagnetic response and t2 is the required full
open motion time of the spool valve. And, the time tr can be divided into the time of
the magnetic action t3 and the closing time of the spool valve t4. To avoid the above
nonlinear characteristics, one must find a suitable switching time of the solenoid valve
244 M.-C. Shih, M.-A. Ma/Mechatronics 8 f 1998) 241 253

x
U /,

"xT o !
<
b t

tj
Fig. 3. Time responseof an on:off solenoid valve.

and the duty ratio to compensate it. In this paper, a modified differential PWM (M-
D-PWM) is applied [6] to improve the nonlinear characteristics. Figures 4 and 5 have
shown that the switching diagram of the D-PWM and the M-D-PWM method. For
the D-PWM control law, the modified time tp is added to the "oW' state of the switch
S~ and reduced from the " o n " state of the switching $2; e.g. if tp is equal to zero, then
the duty ratio difference A~ is also equal to zero. If the switching time S~ is the
summation of Tot, and t,,, t,, > O, and $2 is the difference of Ton and lp, then the
difference of the duty ratio A~ is larger than zero. To apply the method is very simple,
but, the parameters of the control method are T, and tp; which should be chosen
carefully. The nonlinear characteristic happens due to the D-PWM control law, if the
values of IA~[ are larger, as Fig. 6 shows. By using M-D-PWM control law, one must
find the suitable time t, and tl to achieve the on/off switching action completely; the
time t,, must be larger than the time from state "ofF' to "on"; and the value of t~ must
be larger than the switching time from the state " o n " to "otF'. Besides, the valves #1
and #2 must be switched to the state " o n " at the end of every period simultaneously.
Therefore, the operation time of the state " o n " must satisfy the following condition
t,, < Ton < (T, - ! 3 . (1)
In this way, one can insure that the on/off switching action of the valves #1 and #2
can be completed. And A~ is defined as

Ar = ~, _ L T,-t,,-t, T,_t[~--t,- J 100%. (2)

In the Fig. 7, one can see the relationship between Ap and Ar of the M-D-PWM
control method.

3.3. Realization o f M - D - P W M with sol?ware

Generally, the PWM control signal can be realized with both hardware and
software. The latter can be realized by the microcomputer, the chip 8254 (time counter)
and the interruption process. To find the linear relationship between the control signal
and the duty ratio, a tooth wave is chosen as the carrier wave. If the period of the
sampling and the carrier wave are the same, then the control signal u(k) can be
changed to be the pulse width signal and control the opening time of the high speed
M.-C. Shih, M.-A. Ma/Mechatronics 8 (1998) 241 253 245

Si l_ re = 50%
I

s.
i
r', ~.

S t - Sz A r --- 0 %

(a) A r = O

Si rl> 50%

" I [,11 i'"]


I ri < 50%

s,_s,H,n Hi. ~. rc J

(b) A t > 0
Fig. 4. Control signal of differentialPWM.

solenoid valve. Assume the maximum value of the control signal u . . . . which is also
the maximum amplitude of the carrier wave; to compensate the delay time of the
solenoid valve, the time t, and ts, must be reduced from the period T,.. Figure 8 has
shown the time compensated PWM signal, which relations can be explained as follows:
Ton(k) -- t, u(k)
z(k) - T , . - t , - - ts Uma x (3)

4. Fuzzy control theory

The basic structure of the fuzzy control is shown in Fig. 9 [7]-[9], which includes
four parts: fuzzification inference, knowledge base, decision logic and defuzzification.
246 M.-('. Shih, M.-A. Ma/Mechatronic+s 8 (1998) 241 253

7"ou t/
r: +<~.
St

Tc :
Tt ~ r 2
IM
Ar;~0

$2

(a) A t > 0

tn

S,

To~ If Ar<0

$2
I/j \ ,
/"
L Tc I
)!

(b) A t < 0
Fig. 5+Control signal of modified differential PWM.

Fuzzy control is similar to the mankind thinking method, using the fuzzy reasoning
and logic to think and to get the control signal. In the article, Mamdani control rules
and m a x i m u m - m i n i m u m algorithm are applied, and, the centroid of the area (COA)
method is used to defuzzify and to get the accurate control signal [10].

5. Controller design

The key point of a PWM controller design is to determine the value of Az, which
is decided by the chosen control low.

5.1. Choice o[s)'stem parameters

The air supply pressure of the system is set to be 5 bar. According to the modified
differential PWM control method, if the period of the carrier wave T,. is too large,
M.-C. Shih, M.-A. Ma/Mechatronics 8 (1998) 241-253 247

Tc = 20ms

t~

-5
II I

100 50 0 50 1(7)0
Z" 2

A'/" (%)
Fig. 6. Relationships between pressure difference and duty ratio with D-PWM control.

Tc ---20ms
"" 5
t~

, °

-5 . . . . . . . . . . • . . . . . .
i
,a . . . . . ~, . . . . . . . . . . .

100 50 0 50 100

A~" (%)
Fig. 7. Relationships between pressure difference and duty ratio with M-D-PWM.

then the system o u t p u t is stepwise; a n d if the p e r i o d o f the c a r r i e r wave T, is t o o


small, then the time response o f the system is t o o slow. T o satisfy the r e q u i r e m e n t o f
the time response, the p e r i o d o f the carrier wave is c h o s e n to be 20 ms in the system
due to the characteristic o f the high speed solenoid valve 100 Hz, t, --- 7 ms a n d t t = 3
ms. T h e s a m p l i n g time T, is chosen to be the same as the p e r i o d T, (20 ms), the
m a x i m u m c o n t r o l signal Umaxis equal to 1.0.
248 M.-C. Shih, M.-A. Ma/Mechatronics8 (1998) 241-253
-- : C_~ITICr w a v e
: signal wave
rc=Ts
U kt
max u(l) A i

0 Tc 2Tc 3Tc
Fig. 8. Scheme of the signal with time compensated M-D-PWM control.

Knowledge
database or 1

Feedback I Control
Signal {Fuzzifi-~ Decision~ Defuzzifi-} Signal~
-- ' cation Logic cation
Fig. 9. Structure of fuzzy control system.

5.2. Design of ajuzzy P W M controller

The b l o c k d i a g r a m o f the p n e u m a t i c cylinder fuzzy P W M c o n t r o l system is shown


in the Fig. 10. The design process is as follows:

(1) D e t e r m i n e the b o u n d a r y values o f two m o d e c o n t r o l

.o

' ~ "1 4 4 ° 1 u,,


[el .<EM ~e ~9

--c~ ' 'cu

, ~i/s t
rl
Y
PLANT 2,-2

Fig. 10. Block diagram of fuzzy PWM control system.


M.-C. Shih, M.-A. Ma/Mechatronics 8 (1998) 241-253 249

If EM represents the boundary values of two mode control and e is the position
error, if tel/> EM, then the control signal is chosen to be UM or -- UM; where UM is the
maximum control signal and equal to 1.0 in the paper; the on/off switching action is
applied; if [el < EM, then the fuzzy control law is applied. The choice of the value EM
is according to the requirement of the rise time and the limit of overshooting. The
value of eM in the paper is chosen to be 1.0.
(2) Choice of the state variables
The state variables of the pneumatic cylinder fuzzy control system are the position
error e and the error change Ae, which are the input signals; and the output signal is
u(k); i.e. it's a two input one output control system.
(3) Determine the membership functions
The triangular membership function is chosen for the fuzzy control system. Five
linguistic variables are defined for the fuzzification, which are positive big (PB),
positive small (PS), zero (ZO), negative small (NS) and negative big (NB). Therefore,
there are 25 fuzzy rules. The error signal e(t), the error change Ae(t) and the control
output signal u(t) are divided into the same above five linguistic subsets. The mem-
bership functions of e(t), Ae(t) and u(t) are shown in Figs 11 and 12, respectively.

NB NS ZO PS PB

-1.0 -0.5 0.0 0.5 1.0


e, Ae
Fig. 11. Membershipfunctions of input variables e and Ae.

/a
NB NS ?~o PS PB

" u(t)
-1.0 -0.35 0.0 0.35 1.0
Fig. 12. Membershipfunctions of control signal u.
250 M.-C. Shih, M.-A. Ma/Mechatronics 8 (1998) 241 253

Table 1
Fuzzy control rules

de e NB NS ZO PS PB

NB NB NB NB NS ZO
NS NB NB NS ZO PS
ZO NB NS ZO PS PB
PS NS ZO PS PB PB
PB ZO PS PB PB PB

(4) Determine the fuzzy rules and fuzzy reasoning

In the article, the Mamdani fuzzy reasoning and m a x i m u m - m i n i m u m algorithm


are applied, because they are similar to the mankind thinking method. From the
characteristic of the pneumatic position control system, the fuzzy rules are shown in
Table 1.

(5) Defuzzification

Through the defuzzification process, once can get the control signal u(k); the
centroid of area (COA) method is used in the paper.

(6) Adjustment of the normalization factors

The normalization factors G,,, G, and G,, have the effects on the fuzzy rules, the
steady state error and the transient response, which must be adjusted by trial and
error method. To reduce the steady state error, the fuzzy controller is combined with
the integrator, so that the control signal becomes:

u(t) = uv,.,,>(t) + kiZe, Y,. (4)

Through trial and error method, the values of G,,, G,, and k,, and G,,, are adjusted to
be 1.5, 0.7, 0.001 and 1, respectively.

6. Experimental results

(1) Square wave input

In the experiment, the reference inputs are set to be 15 cm from the time 0.0 2.5 s,
and changed to be 10 cm from 2.5 5.0 s. The experimental results have shown that
the steady state error is about 0.075 mm, the rise time t,. is 0.36 s and the settling time
M.-C. Shih, M.-A. Ma/Mechatronics 8 (1998) 241-253 251
Position Resl)onse of the Rodless Cylinder
25
I Cylinder Position •
Reference Input .... I
20

o
tr=0.36 (sec) ts=0.46 (sec)
O
.,a
Ess = -0.075 (nun)
o
O~
10
tr--O.14 (sec) ts=0.22 (sec)

Ess = -0.015 (ram)


5

0 * ~ i i i i i i

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5

l i m e .(sec)
Fig. 13. Time responses of the system with square wave input.

t~ is 0.46 s for the square wave input 15 cm, one can also see the time response o f the
d o w n w a r d step signal, which are shown in Fig. 13.
(2) L o a d i n g effect
Figure 14 shows the system responses with the loading effect. I f the system is under
control, then, at the time instant 2.5 s, a sudden load pressure 0.5 bar is acted; the
position o f the cylinder can be adjusted to the steady state value very quickly, and
the steady state error is 0.1 m m i.e. the robustness o f the control system is very g o o d
under such a fuzzy controller.

7. Conclusions
In the paper, the fuzzy P W M control m e t h o d is applied to control the position of
a pneumatic cylinder with high speed solenoid valves successfully. F r o m the exper-
imental results, one can make conclusions as follows:
(1) The controller is designed with software, which is easier to maintain than that
with hardware P W M controller.
(2) Instead o f using the expensive servo valve, two high speed cheap solenoid valves
are used for the system.
252 M.-C. Shih, M.-A. Ma,'Mechatronics b; (1998) 241- 253

PosiLion Response of the Rodless Cylinder


2.5
"Cylinder Position : J
Reference Input: Z~-J
Load Pressure :-.-.- J 2
20
~o

15 ..... 1.5
O

c-, tr=0.38 (sec) ts=0.48 (sec) Ess = +0.100 (ram)


O

/
..g
O IO 13
::.'.,

i . . . . 0.5

. . ,

' 0
0.5 I I .5 2 2.5 3 3.5 4 4.5 5

time (see)
Fig. 14. Time responses of the system with loading change.

(3) The control accuracy of the pneumatic cylinder is always under 0.1 mm, i.e. the
control performance with or without loading effect is satisfactory.

Acknowledgement
The support provided by National Science Control of R.O.C. (NSC 86-2212-E006-
031) is greatly appreciated.

References
[l] Anderson BW. Analysis and design of pneumatic Systems• John Wiley and Sons, New York, 1967.
[2] Noritsugu T. Development of PWM mode electro-pneumatic servomechanism, Part I: speed control
of a pneumatic cylinder• Journal of Fluid Control 1986;17(1):65 80.
[3] Noritsugu T. Development of PWM mode electro-pneumatic servomechanism, Part II: position
control of a pneumatic cylinder. Journal of Fluid Control 1987; 17(2):7 31.
[4] Muto T, Kato H, Yamada H, Suematsu Y. Digital control of an HST system with load cylinder
operated by differential pulse width modulation. Proceedings of the 2nd JHPS International Sym-
posium on Fluid Power, 1993, pp, 321 6.
[5] MeCloy D, Martin HR. Control of Fluid Power, 2nd edn. Ellis Horwood, 1980.
[6] Shih MC. Hwang CG. Fuzzy PWM control positions of a pneumatic robot cylinder using high speed
M.-C. Shih, M.-A. Ma/Mechatronics 8 (1998) 241-253 253

solenoid valves. The Fourth JHPS International Conference on Fluid Power, Yokohama, Japan.
November 1996.
[7] Zadeh LA. Fuzzy sets. Information and Control 1965;8:338 53.
[8] Lee CC. Fuzzy logic in control systems: fuzzy logic controller Part I. IEEE Transactions SMC
1990;20(2):404~ 18.
[9] Lee CC. Fuzzy logic in control system: fuzzy logic controller--Part II. IEEE Transactions SMC
1990;20(2):419-35.
[10] Mamdani E. Application of fuzzy algorithm for control of simple dynamic plant. Proceedings of the
IEEE 1974;121(12):1585-8.

Das könnte Ihnen auch gefallen