View
219
Download
0
Category
Preview:
Citation preview
8/8/2019 ASS2 Simulation Final Report Thurai
1/25
Experiment 1: DC Motor Speed Modeling
Exercises:
1. Table below shows the values of undamped natural frequency and damping ratio for a general
second order control system. For the parameter values shown in the table, sketch the step
response of the system. Compare and discuss the results.
Undamped NaturalFrequency (n)
Damping Factor ()
2 0.4
2 0.1
1 0.3
1 0.2
2 0.5
1 0.8
(15 marks)
Classified the table to which systemTable 1
Undamped NaturalFrequency (n)
Damping Factor () Sys no
2 0.4 sys1
2 0.1 sys2
1 0.3 sys3
1 0.2 sys4
2 0.5 sys5
1 0.8 sys6
Using this formula for the general second order
Use the value in table 1 and substitute inside the above equation [1]
The m-file script;a=2^2;
b=[1,(0.4*a),a];
c=[1,(0.1*a),a];
d=1^2;
e=[1,(0.3*1*2),d];
f=[1,(0.2*2*1),d];
g=[1,(0.5*a),a];
h=[1,(0.8*2*1),d];
sys1=tf(a,b);
sys2=tf(a,c);
sys3=tf(d,e);
sys4=tf(d,f);
sys5=tf(a,g);
sys6=tf(d,h);
8/8/2019 ASS2 Simulation Final Report Thurai
2/25
8/8/2019 ASS2 Simulation Final Report Thurai
3/25
From the Figure1 we obtained Table 2
Table 2
SysPeak
AmplitudeOvershooting
(%)Rise time
(s)Settingtime (s)
Steady
state finalvalue
sys1 1.25 25.4 0.736 4.25 1
sys2 1.73 72.9 0.556 19.2 1
sys3 1.37 37.2 1.33 11.2 1
sys4 1.53 52.7 1.21 19.6 1
sys5 1.16 16.3 0.824 4.04 1
sys6 1.02 1.52 2.48 3.76 1
Discussion
From the Table 2 we can assume
y Went the damping ratio is about is increase the overshoot percentage when down.y Went the damping ratio is decrease the settling time increase.y Went the undamped natural frequency is less the settling time increase.
All the system can be classified as under-damped system because their damping ratio are less
than 1, which is under-damped. The oscillates within a decaying envelope is called under-damped response. to reach steady-state the oscillation will take longer in a high underdamped
system .[2]
8/8/2019 ASS2 Simulation Final Report Thurai
4/25
0 5 10 15 20 25 300
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
Step Response For 6 System
Time (sec)
Amplitude
sys1
sys2
sys3
sys4
sys5
sys6
Figure 1: The step response of six systems Ex. (1)
8/8/2019 ASS2 Simulation Final Report Thurai
5/25
2. The motor transfer function is modified by adding compensators and a unity gain negativefeedback. The resultant open loop transfer function is
)21)(1(
)2()(
sss
sKsG
!
X
There are two parameters that can be changed (K and X ). Choose at least 5 different values ofK
and X ,
a) check for stability of the system by pole zero plot in each case(7 marks)
b) sketch the step response of the system in each case and calculate the transient parameters(8 marks)
Five values that has been choose
Table 3
System K Sys1 5 4
Sys2 4 5
Sys3 3 2
Sys4 2 3
Sys5 1 1
The value above will be substitute in the equation given .Part (a)
The m-file script;
an=[5 2*5];ad=[2*4 (4+2) 1 0];
sys1t=tf(an,ad)
sys1=feedback(sys1t,1)
subplot(3,3,1); %multiple plot in one figure%
pzmap(sys1); %pzmap funtion%
title('sys1');
bn=[4 2*4];
bd=[2*5 (5+2) 1 0];
sys2t=tf(bn,bd)
sys2=feedback(sys2t,1)
subplot(3,3,2);
pzmap(sys2);title('sys2');
cn=[3 2*3];
cd=[2*2 (2+2) 1 0];
sys3t=tf(cn,cd)
sys3=feedback(sys3t,1)
subplot(3,3,3);
pzmap(sys3);
title('sys3');
8/8/2019 ASS2 Simulation Final Report Thurai
6/25
dn=[2 2*2];
dd=[2*3 (3+2) 1 0];
sys4t=tf(dn,dd)
sys4=feedback(sys4t,1)
subplot(3,3,4);
pzmap(sys4);
title('sys4');
sys4=tf(dn,dd);
en=[1 2*1];
ed=[2*1 (1+2) 1 0];
sys5t=tf(en,ed)
sys5=feedback(sys5t,1)
subplot(3,3,5);
pzmap(sys5);
title('sys5');
Screen shot for 5 different value that been shown in the Table3.
Screen Shot 2: The closed loop transfer function for the five values. Ex 2(a)
8/8/2019 ASS2 Simulation Final Report Thurai
7/25
The plot;
Figure 2: The pzmap Ex. 2(a)
Discussion
y only the sys that have poles have the left side of axis are stabley from the pzmap we can find the sys5 are stabley The value choose for sys5 are small value compare to other valuey This show the sys only will be stable in under-damper or critically-damped systemy
In the pzmap we can find that only the poles that are in left side and in the imaginary axis stablesystem.
Part (b)The m-file
an=[5 2*5]
bn=[4 2*4]
cn=[3 2*3]
dn=[2 2*2]
en=[1 2*1]
ad=[2*4 (4+2) 1 0]
bd=[2*5 (5+2) 1 0]
cd=[2*2 (2+2) 1 0]
dd=[2*3 (3+2) 1 0]
ed=[2*1 (1+2) 1 0]
sys1t=tf(an,ad)
sys2t=tf(bn,bd)
sys3t=tf(cn,cd)
sys4t=tf(dn,dd)
sys5t=tf(en,ed)
-2 0 2-2
0
2
sys1
Real Axis
Imagina
ryAxis
-2 -1 0 1-1
0
1
sys2
Real Axis
Imagina
ryAxis
-2 -1 0 1-2
0
2
sys3
Real Axis
Imagina
ryAxis
-2 0 2-1
0
1
sys4
Real Axis
ImaginaryAxis
-2 -1 0-1
0
1
sys5
Real Axis
ImaginaryAxis
8/8/2019 ASS2 Simulation Final Report Thurai
8/25
sys1=feedback(sys1t,1)
sys2=feedback(sys2t,1)
sys3=feedback(sys3t,1)
sys4=feedback(sys4t,1)
sys5=feedback(sys5t,1)
step(sys1,sys2,sys3,sys4,sys5)
The transient parameters table 4 form the figure 3 at below
Table 4
System Peak amplitude Rise time (s)Settling time
(s)Overshoot %
Steady state final
value
sys1 >10.3 - - - Infinitysys2 >0.524 - - - Infinity
sys3 >9.19 - - - Infinity
sys4 >-4.26 - - - Infinity
sys5 1.65 1.41 40.7 64.6 1
Discussion
y In the step response of the figure 3 we could only have the sys5 value of rise time,settling time, overshoot percent and steady state final value. This is because only sys5 are
stable other are not stable.
y From what we get is pzmap we can conculude that only sys5 are stable and other notstable.
y This motor transfer function will only will stable in under-damped or critically-dampedsystem, which mean that damping ratio must be 1 or less than 1.
8/8/2019 ASS2 Simulation Final Report Thurai
9/25
The plot;
0 10 20 30 40 50 60 70-1
-0 .5
0
0.5
1
1.5x 1 0
5 Step Response
Time (sec )
Amplitude
sys1
sys2
sys3
sys4
sys5
Figure 3: The step response Ex. 2(b)
8/8/2019 ASS2 Simulation Final Report Thurai
10/25
Exercises
1. Simulate the response of the system for five different values of Kp if proportionalcontroller is used. Discuss the results obtained and propose a suitable proportionalcontroller to improve the performance of the system and satisfy the design specifications.
(15 marks)
2. Simulate the response of the system for five different values of Kp and KD if PDcontroller is used. Discuss the results obtained and propose a suitable PD controller to
improve the performance of the system and satisfy the design specifications.(15 marks)
3. Simulate the response of the system for five different values of Kp and KI if PI controlleris used. Discuss the results obtained and propose a suitable PI controller to improve theperformance of the system and satisfy the design specifications.
(15 marks)
4. Simulate the response of the system for at least five different values of Kp,KI, and Kd ifPID controller is used. Discuss the results obtained and propose a suitable PID controller
to improve the performance of the system and satisfy the design specifications.(15 marks)
5. Based on the obtained results compare the performance of various controllers.(10 marks)
8/8/2019 ASS2 Simulation Final Report Thurai
11/25
The table 4 below is the 5 value for that will be used for question 1, 2 3
and 4. Table 5
System
sys 0.05 10 3
sys1 0.5 100 9
sys2 5 0.1 8
sys3 50 0.01 6
sys4 13.9 27.5 5
For Question 1
The m-file;J=0.01; %rotor inertia%b=0.1; %damping ratio of mechanical system%K=0.01; %Electromotive force constant%R=1; %electric resistance%L=0.5; %electric inductance%num=K;den=[(J*L) ((J*R)+(L*b)) ((b*R)+K^2)];M1=tf(num,den);
Kp=0.05;Gc=Kp;sysP=Gc*M1;sys=feedback(sysP,1)t=[0:0.01:5];hold on;step(sys,t);
Kp1=0.5;Gc1=Kp1;sysP1=Gc1*M1;sys1=feedback(sysP1,1)step(sys1,t);
Kp2=5;Gc2=Kp2;sysP2=Gc2*M1;sys2=feedback(sysP2,1)step(sys2,t);
Kp3=50;Gc3=Kp3;sysP3=Gc3*M1;sys3=feedback(sysP3,1)
8/8/2019 ASS2 Simulation Final Report Thurai
12/25
step(sys3,t);
Kp4=13.9;Gc4=Kp4;sysP4=Gc4*M1;sys4=feedback(sysP4,1)step(sys4,t);
Screen shot
Screen Shot 3: The closed loop function Ex. 1
8/8/2019 ASS2 Simulation Final Report Thurai
13/25
The plot
Figure 3: The step response of Kp. Ex. 1
Step Response
Time (sec)
Amp
litude
0 0 .5 1 1 .5 2 2.5 3 3 .5 4 4 .5 0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
sy s
sys1
sys2
sys3
sys4
8/8/2019 ASS2 Simulation Final Report Thurai
14/25
Dissusion
Table 6: Kp Controller Ex.1
system
Peak
amplitute
Rise time
(s)
Settling
Time (s)
Overshooting
%
Steady
state finalvalue
Steadystate error
%
sys 0.00497 1.13 2.05 0 0.00497 99.5
sys1 0.0476 1.07 1.95 0 0.0476 95.2
sys2 0.333 0.7 1.25 0 0.333 66.7
sys3 0.94 0.159 0.532 12.8 0.94 6
sys4 0.532 0.396 0.631 0.146 0.532 46
From the table we can assume
y sys2, sys3 and sys4 have fulfill two criteria of the design requirement than needy
For Kp we can say that almost fulfill the settling time with almost less than 2secondy For overshooting we hat 4 system that fulfill the requirementy For steady state error
For Question 2
The m-fileJ=0.01;
b=0.1;
K=0.01;
R=1;
L=0.5;num=K;
den=[(J*L) ((J*R)+(L*b)) ((b*R)+K^2)];
M1=tf(num,den);
Kp=0.05;
Kdsn=[10 0];
Kdsd=[0 1];
Kds=tf(Kdsn,Kdsd);
Gc=Kp+Kds;
sysPD=Gc*M1;
sys=feedback(sysPD,1)
t=[0:0.01:5];
hold on;
step(sys,t);
Kp1=0.5;
Kdsn1=[100 0];
Kdsd1=[0 1];
Kds1=tf(Kdsn1,Kdsd1);
Gc1=Kp1+Kds1;
sysPD1=Gc1*M1;
sys1=feedback(sysPD1,1)
8/8/2019 ASS2 Simulation Final Report Thurai
15/25
step(sys1,t);
Kp2=5;
Kdsn2=[01 0];
Kdsd2=[0 1];
Kds2=tf(Kdsn2,Kdsd2);
Gc2=Kp2+Kds2;
sysPD2=Gc2*M1;
sys2=feedback(sysPD2,1)
step(sys2,t);
Kp3=50;
Kdsn3=[0.01 0];
Kdsd3=[0 1];
Kds3=tf(Kdsn3,Kdsd3);
Gc3=Kp3+Kds3;
sysPD3=Gc3*M1;
sys3=feedback(sysPD3,1)
step(sys3,t);
Kp4=13.9;
Kdsn4=[27.5 0];Kdsd4=[0 1];
Kds4=tf(Kdsn4,Kdsd4);
Gc4=Kp4+Kds4;
sysPD4=Gc4*M1;
sys4=feedback(sysPD4,1)
step(sys4,t);
Screen shot
Screen Shot 4: The closed loop function. Ex. 2
8/8/2019 ASS2 Simulation Final Report Thurai
16/25
The plot
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 50
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Step Response
Time (se c)
Amp
litu
de
sys
sys1
sys2sys3
sys4
Figure 4: The step response of PD. Ex. 2
8/8/2019 ASS2 Simulation Final Report Thurai
17/25
Discussion
Table 7: PD controller Ex.2
systemPeak
amplitute
Rise time
(s)
Settling
Time (s)
Overshooting
%
Steadystate final
value
Steadystate error
sys 0.588 0.000232 - 1.17e+004 0.00497 99.5
sys1 0.941 0.000456 - 1.88e+003 0.0476 95.2
sys2 0.333 0.699 1.3 0 0.333 66.7
sys3 0.939 0.159 0.532 12.7 0.833 16.7
sys4 0.815 0.0144 4.26 40.1 0.581 42
y from the Table 7 above we find that PD controller that only 2 system fulfill thesettling time
y there no system that fulfill the steady state error requirementy only one system fulfill the overshooting requirementy PD controller have high steady state error
For Question 3
The m-fileJ=0.01;
b=0.1;
K=0.01;
R=1;
L=0.5;
num=K;den=[(J*L) ((J*R)+(L*b)) ((b*R)+K^2)];
M1=tf(num,den);
Kp=0.05;
Kisn=[0 3];
Kisd=[1 0];
Kis=tf(Kisn,Kisd);
Gc=Kp+Kis;
sysPI=Gc*M1;
sys=feedback(sysPI,1);
t=[0:0.01:40];
hold on;
step(sys,t);
Kp1=0.5;
Kisn1=[0 9];
Kisd1=[1 0];
Kis1=tf(Kisn1,Kisd1);
Gc1=Kp1+Kis1;
sysPI1=Gc1*M1;
sys1=feedback(sysPI1,1);
step(sys1,t);
8/8/2019 ASS2 Simulation Final Report Thurai
18/25
Kp2=5;
Kisn2=[0 8];
Kisd2=[1 0];
Kis2=tf(Kisn2,Kisd2);
Gc2=Kp2+Kis2;
sysPI2=Gc2*M1;
sys2=feedback(sysPI2,1);
step(sys2,t);
Kp3=50;
Kisn3=[0 6];
Kisd3=[1 0];
Kis3=tf(Kisn3,Kisd3);
Gc3=Kp3+Kis3;
sysPI3=Gc3*M1;
sys3=feedback(sysPI3,1);
step(sys3,t);
Kp4=13.9;
Kisn4=[0 5];Kisd4=[1 0];
Kis4=tf(Kisn4,Kisd4);
Gc4=Kp4+Kis4;
sysPI4=Gc4*M1;
sys4=feedback(sysPI4,1);
step(sys4,t);
Screen shot
Screen Shot 5: The closed loop function of PI. Ex. 3
8/8/2019 ASS2 Simulation Final Report Thurai
19/25
Plot;
Step Response
Time (sec)
Amplitude
0 5 10 15 20 25 30 35 400
0.2
0.4
0.6
0.8
1
1.2
1.4
sys
sys1
sys2
sys3
sys4
Figure 5: The step response of PI. Ex.3
8/8/2019 ASS2 Simulation Final Report Thurai
20/25
Discussion
Table 8: PI controller Ex.3
systemPeak
amplitute
Rise time
(s)
Settling
Time (s)
Overshooting
%
Steadystate final
value
Steadystate error
sys 1 6.03 11 0 1 0
sys1 1.04 1.63 4.5 4.05 1 0
sys2 1 2.7 5.07 0 1 0
sys3 0.997 0.216 20.6 0 1 0
sys4 1 6.26 13.6 0 1 0
y From the above table we fulfill the overshooting and steady state error requirement.y For settling time we did not fulfill any requirementy PI controller can be used as steady state error controller and over shooting controller
For Question 4
The m-file
J=0.01;
b=0.1;
K=0.01;
R=1;
L=0.5;
num=K;
den=[(J*L) ((J*R)+(L*b)) ((b*R)+K^2)];
M1=tf(num,den);
Kp=0.05;
Kisn=[0 3];
Kisd=[1 0];
Kis=tf(Kisn,Kisd);
Kdsn=[10 0];
Kdsd=[0 1];Kds=tf(Kdsn,Kdsd);
Gc=Kp+Kis+Kds;
sysPID=Gc*M1;
sys=feedback(sysPID,1)
t=[0:0.01:40];
holdon;
step(sys,t);
Kp1=0.5;
8/8/2019 ASS2 Simulation Final Report Thurai
21/25
Kisn1=[0 9];
Kisd1=[1 0];
Kis1=tf(Kisn1,Kisd1);
Kdsn1=[100 0];
Kdsd1=[0 1];
Kds1=tf(Kdsn1,Kdsd1);
Gc1=Kp1+Kis1+Kds1;
sysPID1=Gc1*M1;
sys1=feedback(sysPID1,1)
step(sys1,t);
Kp2=5;
Kisn2=[0 8];
Kisd2=[1 0];
Kis2=tf(Kisn2,Kisd2);
Kdsn2=[0.1 0];
Kdsd2=[0 1];
Kds2=tf(Kdsn2,Kdsd2);
Gc2=Kp2+Kis2+Kds2;
sysPID2=Gc2*M1;
sys2=feedback(sysPID2,1)step(sys2,t);
Kp3=50;
Kisn3=[0 6];
Kisd3=[1 0];
Kis3=tf(Kisn3,Kisd3);
Kdsn3=[0.01 0];
Kdsd3=[0 1];
Kds3=tf(Kdsn3,Kdsd3);
Gc3=Kp3+Kis3+Kds3;
sysPID3=Gc3*M1;
sys3=feedback(sysPID3,1)
step(sys3,t);
Kp4=13.9;
Kisn4=[0 5];
Kisd4=[1 0];
Kis4=tf(Kisn4,Kisd4);
Kdsn4=[27.5 0];
Kdsd4=[0 1];
Kds4=tf(Kdsn4,Kdsd4);
Gc4=Kp4+Kis4+Kds4;
sysPID4=Gc4*M1;
sys4=feedback(sysPID4,1)
step(sys4,t);
8/8/2019 ASS2 Simulation Final Report Thurai
22/25
Screen shot;
Screen Shot 6: The closed loop function of PID. Ex. 4
Discussion
Table 9: PID controller Ex. 4
systemPeak
amplitute
Rise time
(s)
Settling
Time (s)
Overshooting
%
Steady
state finalvalue
Steady
state error
sys 1.02 7.55 14 2.44 1 0
sys1 1.19 0.0159 - 15 1 0
sys2 1 2.72 5.05 0 1 0
sys3 0.997 0.216 20.6 0 1 0
sys4 1 7.61 12.1 0.0141 1 0
y From the table above we can determine that steady state error requirement has beenfulfils.
y For the overshooting 4 of 5 requirements are fulfill.y The settling time requirement did not been fulfill in PID controller.
8/8/2019 ASS2 Simulation Final Report Thurai
23/25
Plot;
Figure 6: The step response of PID. Ex. 4
Step Response
Time (se c)
Amplitude
0 5 10 15 20 25 30 35 400
0.2
0.4
0.6
0.8
1
1.2
1.4
sy s
sys1
sys2
sys3
sys4
8/8/2019 ASS2 Simulation Final Report Thurai
24/25
Question 5
Based on the results that obtained on , PD, PI and PID controller. PI and PID almost
fulfill the requirement of the design of motor output speed based on the value that been selected
from Table 3 above.
PI controller has two system that almost fulfilling the requirement but the settling timedid not fulfill the requirement. PID controller have 1 system almost fulfill the requirement butdid not fulfill the settling time.
For and PD controller can fulfill the settling time and overshooting but cannot fulfill
the steady state error from the result been obtained. and PD controller are best to use in
controlling settling time and overshoot. For PI and PID controller is best to use to controlovershooting and steady state error.
Based on the results obtained PID controller is the best controller to use in this system.
8/8/2019 ASS2 Simulation Final Report Thurai
25/25
Reference[1] Richard , C.D., Robert, H.B 2008., Modern ControlSystem, 11
thedn, Pearson
International Edition, Singapore.
[2] Wikipedia 2010, The Transient Response, online retrieved 2 May 2010, fromhttp://en.wikipedia.org/wiki/Transient_response#Underdamped.
Recommended