Name: Zulfiqar Ali.: Department of Electronic Engineering University of Engineering and Technology Abbottabad Campus
Name: Zulfiqar Ali.: Department of Electronic Engineering University of Engineering and Technology Abbottabad Campus
REPORT VERIFICATION
Date:
Instructor Name:
Signature:
1- Aim:
1. Transfer Function:
We can represent the above open-loop transfer function of the motor in MATLAB by defining
the parameters and transfer function as follows. Running this code in the command window
produces the output shown below.
TASK 1:
J=0.01;
b=0.1;
K=0.01;
R=1;
L=0.5;
s=tf('s')
pmotor=K/((J*s+b)*(L*s+R)+K^2)
RESULT:
pmotor =
0.01
---------------------------
TASK 2:
3-2. State Space:
A=[-b/J k/J
-K/L -R/L];
B=[0
1/L];
C=[1 0];
D=0;
motor_ss=ss(A,B,C,D)
RESULT:
motor_ss
= A =
x1 x2
x1 -10 1
x2 -0.02
-2 B =
u1
x1 0
x2
2 C
x1 x2
y1 1 0
D =
u1
y1 0
s=tf('s');
I=eye(2);
m1=C*inv(s*I-A)*B
t=0:0.01:10;
step(m1,t)
The above state-space model can also be generated by converting your existing transfer function
model into state-space form. This is again accomplished with the ss command as shown below.
From the main problem, the dynamic equations in the Laplace domain and the open-loop
transfer function of the DC Motor are the following.
For the original problem setup and the derivation of the above equations, please refer to the DC
Motor Speed: System Modeling page.
For a 1-rad/sec step reference, the design criteria are the following.
0.999
Amplitude
0.998
0.997
0.996
0.995
0.994
0 1 2 3 4 5 6 7 8 9 10
Time (seconds)
0.9995
0.999
Amplitude
0.9985
0.998
0.9975
0.997
0.9965
0.996
0 1 2 3 4 5 6 7 8 9 10
Time (seconds)
TASK:
kp=100;
ctr=pid(kp);
f=feedback(ctr*intf,1)
step(f,t)
grid on
title('pid controll with bsmall kp')
RESULT:
TASK:
kp=100;
ki=200;
kd=10,
ctr=pid(kp,ki,kd);
f=feedback(ctr*intf,1)
step(f,t)
grid on
title('pid controll with bsmall kp'
Conclusion:
As the kp is increase the peak amplitude ,percent overshoot,and settling time are reduced.
TASK:
RESULT: