Professional Documents
Culture Documents
nm n z p pm
1
0.8
Degree of membership
0.6
0.4
0.2
3)After you complete the F-PD design using Fuzzy Logic Toolbox, select export to workspace
option before you insert the fis file into simulink.
4) My suggestion is that design the PD controller first and add the F-PD for comparison. You can
observe the response from scope initially. But for performace analysis you need to send the
results to a file to calculate the overshoot, rise time, steady-state error, etc.
5)You may choose any linear or nonlinear system to control. You may use transfer function
representation with a zero-order hold or discrete models if you like. The system model can be
chosen as given below by assigning numerical values.
K e Ls
G (s)
(T1s 1)(T2 s 1)
max 0.02933
MinMax Display2
1 0.5582
|u|
s
Abs Integrator Display
1 1
45 Scope1
Step Gain s2 +s+1
Gain2 Zero-Order Transfer Fcn1
Fuzzy Logic
Hold
Controller
du/dt .10
Derivative Gain1
Scope
1
PID hw3FPD.mat
s2 +s+1
PID Controller Zero-Order Transfer Fcn2
To File
Hold1
Scope2
1 0.9436
|u|
s
Abs1 Integrator1 Display1
max 0.0185
MinMax1 Display3
Figure 2. Simulink block diagram of the system controlled with both classical PD and F-PD
F-PD vs PD Controller
1.4
1.2
1
0.8
0.6
0.4
0.2
0 sec
0 1 2 3 4 5
Ref F-PD PD
Figure 3. The response after initial design for both classical-PD and PD-FC for linear system.
6) You may use a table to observe the performance for both controllers. You are required to
analyse the effect of sampling period. Type of performance measures are all optional. I can
suggest the following Performance Measures
Rise Time
Percent Overshoot
Steady-state error
Sum of Absolute Errors
7)Since controllers can not be tuned to give exactly the same numbers, performances of both
controllers should be close enough initially. Then work with the global and local tuning
parameters to improve the performance of F-PD. Investigate the effect of scaling coefficients.
NOTES:
1)Use export to workspace command from FL Toolbox before running simulink
2)Some of Matlab commands:
a = readfis('hw3PD');
getfis(a)
showfis(a)
Plotfis(a)
plotmf(a,'input',1)
REFERENCE:
Z.Woo, H.Chung, J.Lin, “A PID type fuzzy controller with self-tuning scaling factors”, Fuzzy
Sets and Systems 115 (2000) 321–326.
2017 – 2018 SPRING TERM
INDUSTRIAL APPLICATIONS OF FUZZY LOGIC
MAK 664E
HOMEWORK - I
İNİTİAL DESİGN
PrOtla..3 {ss,^-q ]Lu orr\- lrrp +d^skr tt"a
na is, l l l fun.X.^ "f [at" ralory seNo
)
gç
CıG) = s
4;
-,
Q-ro,ls)
4, a, co,^r*konal PD cnn\,olle-r
f". a closd-l.rç M ser,Jo lo3ive
?*3:
.Sry ti"^e to o :4 :"rr ,f O,r sea^J,. 7L. Jo""A İ7
:rr*-I^^al
' k' o.oun)' '5O".
p["ose-- ,."".r" .L...U
^u/n
:l4,8r} , &n -b,a 4 oJ
C> = tf G"- , J.^)
sisoLo( ( G )
R.ool Lac,s ğ"!tte,r (^, Ca, *T
It
l
L_
J
l
l
]
_]
' lZroü-
Jilş"]
Lour'6,
ts
tru a$o'ProL
ü,efne
ğk/ir-,"-.
|tll
0,L Dıı* g6 b/g 4 4,L l,ç -lT;^e
. .ulllao {i-e}o . -
P-L|.^L
q,1o.{,Jr.r..
vefle..
) J"'
55 ErıL
Pl"l
!p*
S3slj"ıs
CLo.a"kn].h.s
l(ulli*,&J Jr,7,
ı- 1,1rJ3",n*
Lıse
-
11
hıvıe_
SF."f,j =l"|e
fur
0,6 Ti*c
üUJ.,,u,^=
3dT =5
n*5
e 6-f,f^ J,-o^nJ,. HiL"
l_
l ]
__ __ .*J I
kJ,nlo" Pn,ş,^,zo alltqtı SeL.r<k S"}H3 T-e {
3<len
d.r*,« jii3or,,ıa;
----l
}.- D.'!" ?ı.Tt.-^e^t ı
-l rEl [x] l
EJı*o"
B
l
r:l '}' *,r J'-^f:i;"
{>u
S].-J:f^j,,^?,
<--=. 5tı.ı
a6,ı
ü,
Y .,v,aıji
qiry iı,ze_i.,e ıd*n- {*Ey..
E"
L1.1 |Z-oŞtJlLr Sa.llq:labılt<vı d
ş,ı{, .5,1*Yıl,n-,
Lrş,-r{, ..ql"ÜLıl,-<-, 4l", ^..,ar*n
|çTa, --l
arafl.n^ .so(
,^Çrr1
1-,.r..l, ,l"^j!"'ı,|55_
ı !,l
qJ*
a.
",'^ 4eı
' ..Yo'
3? ;l"X
:'r' ?,:',
.,l.,-,,İn 'a!(, 4
"LJ"^"lljla.
/
-g-
2"*( ar-is
u ;?1
,/ /l
,,=, l
,/ .JI
'"' ,'|
/.,,}
ıX ı x ,"' ,}
./ _i
,[ı l .,,İl
D
(
B" ,"fiLleLT "O " ,n ve iUj f..* LaL-ü" lle- o14a5- ra4Iü l6Li)
71zrle.i
ve
Ö
?, *o3T^)'Jğu,;^i 50"
1rrğ
f-tno İ_=' ^r,.::,3"!:^"^ ^A tY-,.
c,.ı1-
3a§rnne^r. Je-ceJcı3or.
v
"r-r" n.,., ,4e6 -
J,j"Jo4aglacotL Ü L;L |
..ı,ıe,ie
at*]Jo toort-._*Jçt'+
,, ıı ile._
q_ * _
çTt[
1o,i
5h"tl5-,.J9
se,c,ıe-
p'..^,. A.ta3i-n g. 5o- ,,*.i,r;;::5.-:*-'lı-e
3-o"l Lo-us EJcloc Ary].__ŞE kr*
I
a-
I
l,
o/
l
1*, +..*,
-|oo 5o q,
i+ı;tru .;H.ff* f;p.*til{ fş
Ze^l Axis
§'' ff
6,5 'ı,, olh.a Jiş+; - ı/
*İğ phase Aarqia G."15; ise .*şoQ,Jati
* {16 oau pr.,Llg,y,lq_ i-.le^e.,
P
J
[.^o." }-b,-Ş.. \ı So-' Loşr(,^ '..3l_İ.. i
--l
Dı
l hqse_
Qz,l
PM: Ç0. ı/
ı Faeo,-.en..a
1oa 4o' CJa/*)-
-T-ü""
t' Tıl.^"ler {o-o.-(o^.[|.}an :,o..ra.ı C_-*pensalor Çh*r)^ {,Lt"o.aL"
O1Fv^o* q !e_ Zo Jğ* Lu]ıA.ni-,
B"L
trı@
Pa" / 2u,.
L^ ,et^rte seçTlir,
Pr:t=
'EJrl Co*te^st-| .elr^esTnu {, lrJ^^Jr!-+r^ so^(ğ apa3,J^tl .*,e. L.ş,*,.o +L*
Co^y*r:r#.r EJi|-or
&""1.n s o|o.
C = llçZı-.1^ (4 t o,ozs )
4
|la"/ z-"L
D3aan.-,
l oc,a,lioa
:1-g,L
" EJrü- Co-p"nro{-r." seL*esi,'Le L.o2,c,nç|.,nn (3.-,' to*
lJr-_Jo =1J, ,{-o", I.{e"e-
L.lkr. Ç]." ' FJr+- C,ı>.,7en o+r.' s.Ü.=1., J"L- J"j.Ae, alğıJ^Li
şeLdJ" AJz^l"oeLl|i. ı
C*,1Xnvt . EJİo.
(a + QoZ-s)
1
D9 n a,,ti<_s
Tııçe L_o.o..ko"' Da-fınq trec,
L r-l A l l l
trcl-it SeJec[eJ D1.,a,ri6
J
Lr.a{.;,", 1-51-_1
)
Ç
P= 4+ \
f) ı O/2g /
) ol"^lc_
3Tal-,.lrJrc
Fuzzy Lo6ıc coNrROLLER (wırıı § ıe'r)
Fı..,
)
l-
ı-o_Jı<--
C"ntoll"r
efrbr*(e)
NM NM N N Z -4
N/4 N N Z N -4§
N
t:
Z P P 0
Je 1Je,i""S"" 4)
{'\j d+ \ 41rof /
P L P P P/4 q§
r
Z P ? ?u PM 1
r^
aUTPUT FÜZZY
5ET
-L _1
(wıTH ;ı /4Fs)
L{ror.(e-)
96366 4
NB
t
z
NB NİB NB NA Ns Z0 @
I
\6
Z0
§r\
NB NB NB N/4 N5 Ps
G
R
$
NB NB NM N5 Z0 P5 Pl4
(^)
t^'
td
Z
Ng Nı N5 Z0 P5 Plq PB 9 =cbf,ak,ıe
/ oi e-ıaı^
Je'
70
ş(, § E
NM Ns P5 PA Pg PB (^ı
ül
(ı,
\§
NJ Z0 P5 PA ?B PB PB
o.
ç\
§\
§\
Z0 Ps pü4 PB PB PB PB
(
ouTPu r Fü7 -Y
SET
}
MEMBERSHIP FUNCTIONS FOR 5MF’s CASE
MEMBERSHIP FUNCTIONS FOR 7MF’s CASE
INFERENCE RULE SURFACE FOR 5MF’s CASE
Conventional PD Fuzzy PD
Overshoot (%) 21.341 % 13.068 %
Undershoot (%) 2.210 % 3.043 %
Rise time 81.489 ms. 117.768 ms.
Settling time 416.423 ms. 308.542 ms.
Peak value 1.211 1.132
Comment: As can be seen from the figure and table above, PD type Fuzzy Controller is
significantly more efficient than Conventional PD controller. The overshoot (%) value and
settling time diminished considerably when PD type Fuzzy Controller is preferred instead of
Conventional PD controller. Besides, peak value of the response decreased, while rise time
slightly increased in case PD type Fuzzy Controller is utilized in the system.
EFFECT OF NUMBER OF MEMBERSHIP FUNCTION ON THE PERFORMANCE OF
FUZZY CONTROLLER (5 MF’s – vs – 7 MF’s)
Comment: As can be seen from the figure and table above, increasing the discretization level
of the domain, in other words, increasing the number of membership functions of both input
and output domain has negatively effect on the performance of the Fuzzy PD controller for this
case. While overshoot rate (%) and peak value are both rising up, rise time and settling time
decreases with the increasing the number of the membership function from 5 to 7.
EFFECT OF SCALING COEFFICIENTS ON THE PERFORMANCE OF FUZZY PD
CONTROLLERS
1) Effect of K p :
Comment: As can be seen from the figure and table above, proportional gain has not any effect
on the percentage of overshoot of the system. For this control system, increasing of the K p
parameter causes to decrease of the percentage of undershoot, rise time and settling time.
Whereas, peak value of the response remains constant with the increasing level of the K p
parameter.
1) Effect of Td :
Comment: As can be seen from the figure and table above, derivative gain significantly effects
the percentage of overshoot, percentage of undershoot, rise time, settling time and peak values.
As a result of interpreting the above graph and table, the output of the system can be tuned to
the desired level by changing the system's derivative gain.
EFFECT OF SAMPLING RATE ON THE PERFORMANCE OF FUZZY PD
CONTROLLERS
Comment: For determining the effect of the sampling rate, rate transition parameter is added
the block diagram of the system. As can be seen from the figure above, selecting 0.001 of the
output sample rate, system responses properly and behave as expected. When output sample
rate is selected above the 0.05, system responses abruptly and aliasing is observed.
PART – II
ROBUSTNESS ANALYSIS
EFFECT OF BACKLASH ON THE CONVENTIONAL PD AND FUZZY PD CONTROLLER
Effect of the Backlash
Conventional PD Fuzzy PD
Overshoot (%) 24.375 % 13.068 %
Undershoot (%) 2.718 % 3.043 %
Rise time 79.206 ms. 117.657 ms.
Settling time 699.073 ms. 897.468 ms.
Peak value 1.231 1.141
Comment: From the figure and table above, Fuzzy PD type controller is more robust than
Conventional PD type controller under the backlash effect. The percentage of overshoot (%),
rise time and settling time values of the Fuzzy PD controller is lower than the Conventional PD
type, while the peak value of the Conventional PD type controller is higher than the Fuzzy PD
controller.
EFFECT OF THE DEADBAND WIDTH OF THE BACKLASH ON THE FUZZY PD
CONTROLLER
Comment: From the figure and table above, increasing in the deadband width of the backlash
has significantly effect on the system. By increasing the deadband level of the backlash, while
percentage of overshoot (%) and peak value increase, rise time of the system continuously
decreases. Additionally, settling time of the system doesn’t behave smoothly, whereas it
decreases by the increasing the deadband width from 1 to 2, it increases between the deadband
widths 2 and 3.
EFFECT OF THE NOMINATOR OF THE TRANSFER FUNCTION ON THE FUZZY PD
CONTROLLER
Comment: From the figure and table above, increasing in the numerator of the transfer function
of the system has no effect on the percentage of overshoot (%). It can also be seen from the
table that when the numerator has lower value, rise time and settling time of the system
decreases. Additionally, percentage of undershoot diminished by the increasing in the
numerator. The peak value of the system has not affected by changing the numerator of the
system from 1.85 to 2.50, meanwhile, it slightly increases when the numerator is increased to
3.15.
EFFECT OF WHITE NOISE ON THE FUZZY PD CONTROLLER
Comment: From the figure above, it can be seen explicitly that the stability of the Fuzzy PD
controller is distorted by the inclusion of the white noise in the block diagram. Steady state
error is emerged on the system by adding the white noise. Besides, while percentage of
overshoot (%) and peak value decrease by including white noise, percentage of undershoot (%)
and settling time increases in this case.