Control System Lab 7
Control System Lab 7
1
2
Frequency Design Method for DC Motor
Speed Control
Drawing the original Bode plot
Adding proportional gain
Plotting the closed-loop response
Adding a lag controller
From the main problem, the dynamic equations and the open-loop transfer
function of DC Motor Speed are:
For the original problem setup and the derivation of the above equations,
please refer to the Modeling a DC Motor page.
Create a new m-file and type in the following commands (refer to the main
problem for the details of getting those commands).
J=0.01;
b=0.1;
3
K=0.01;
R=1;
L=0.5;
num=K;
den=[(J*L) ((J*R)+(L*b)) ((b*R)+K^2)];
bode(num,den)
4
[mag,phase,w] = bode(num,den,10)
mag =
5
The settling time is fast enough, but the overshoot and the steady-state
error are too high. The overshoot can be reduced by reducing the gain a bit
to get a higher phase margin, but this would cause the steady-state error to
increase. A lag controller is probably needed.
which should reduce the steady-state error by a factor of 1/0.01 = 100 (but
could increase the settling time). Go back and change your m-file so it looks
like the following:
num=K;
den=[(J*L) ((J*R)+(L*b)) ((b*R)+K^2)];
num=50*K;
z=1;
p=0.1;
numa=[1 z];
dena=[1 p];
numb=conv(num,numa);
denb=conv(den,dena);
bode(numb,denb)
Rerun the file and you will get this plot:
6
The phase margin looks good. The steady-state error is predicted to be about
1/40dB or 1%, as desired. Close the loop and look at the step response. Add
the following lines of code to the end of you m-file and rerun.
[numc,denc]=cloop(numb, denb, -
t=0:0.01:10;
step(numc,denc,t)
Now you have a step response that meets the design requirements. The
steady-state error is less than 1%, the overshoot is about 5%, and the settling
time is about 2 seconds.
7
8