hw2 Sol
hw2 Sol
hw2 Sol
n
=
1
LC
.
=
1
2
n
R
L
=
R
2
_
L
C
.
(d) For 25% overshoot 0.4 (see Page 118 Figure 3.23),
0.4 =
R
2
_
L
C
R = 2
_
L
C
= (2)(0.4)
_
10 10
3
4 10
6
= 40 .
Problem 3.25
For the unity feedback system shown in Fig. 3.58, specify the gain and pole location of the
compensator so that the overall closed-loop response to a unit-step input has an overshoot of
no more than 25%, and a 1% settling time of no more than 0.1 sec. Verify your design using
MATLAB.
Solution:
Y (s)
R(s)
=
100K
(s+a)(s+25)
1 +
100K
(s+a)(s+25)
=
100K
s
2
+ (25 + a)s + 25a + 100K
=
100K
s
2
+ 2
n
s +
2
n
.
2
Using the given information:
R(s) =
1
s
unit step,
M
p
25%,
t
s
0.1sec.
Solve for :
M
p
= e
/
1
2
,
=
(ln M
p
)
2
2
+ (ln M
p
)
2
Mp=0.25
0.4037.
Solve for
n
:
e
nts
= 0.01, for a 1% settling time.
t
s
4.605
n
= 0.1,
n
114.07.
Now nd a and K:
2
n
= (25 + a)
a = 2
n
25 = 92.10 25 = 67.10
2
n
= (25a + 100K),
K =
2
n
25a
100
113.34.
The step response of the system using MATLAB is shown below.
a = 67.10;
K = 113.34;
% Compensator
num1 = K;
den1 = [1 a];
sys1 = tf(num1,den1);
% Plant
num2 = 100;
den2 = [1 25];
sys2 = tf(num2,den2);
sys3 = series(sys1,sys2);
3
% The feedback system
num4 = 1;
den4 = 1;
sys4 = tf(num4,den4);
sys = feedback(sys3,sys4,-1);
hold on;
[y,t] = step(sys);
plot(t,y);
title(Step response);
xlabel(Time (sec));
ylabel(y(t));
grid on;
0 0.02 0.04 0.06 0.08 0.1 0.12 0.14
0
0.2
0.4
0.6
0.8
1
1.2
1.4
Step response
Time (sec)
y
(
t
)
4
Problem 3.27
A certain servomechanism system has dynamics dominated by a pair of complex poles and
no nite zeros. The time-domain specications on the rise time (t
r
), percent overshoot (M
p
),
and settling time (t
s
) are given by,
t
r
0.6sec,
M
p
17%,
t
s
9.2sec.
(a) Sketch the region in the s-plane where the poles could be placed so that the system will
meet all three specications.
(b) Indicate on your sketch the specic locations (denoted by ) that will have the smallest
rise-time and also meet the settling time specication exactly.
Solution:
(a)-(b)
t
r
=
1.8
n
0.6 =
n
3
M
p
= e
1
2
= 0.17 =
_
1
2
= log 0.17 1.772
= = sin
1
= tan
1
_
_
1
2
_
= tan
1
_
1.772
_
29.42
t
s
=
4.6
9.2 = 0.5
5
Problem 3.30
The equation of motion for the DC motor shown in Fig. 2.32 were given in Eqs. (2.52-53) as
J
m
m
+
_
b +
K
t
K
e
R
a
_
m
=
K
t
R
a
v
a
.
Assume that
J
m
= 0.01 kg m
2
,
b = 0.001 N m sec,
K
e
= 0.02 V sec,
K
t
= 0.02 N m/A,
R
a
= 10 .
(a) Find the transfer function between the applied voltage v
a
and the motor speed
m
.
(b) What is the steady-state speed of the motor after a voltage v
a
= 10 V has been applied?
(c) Find the transfer function between the applied voltage v
a
and the shaft angle
m
.
(d) Suppose feedback is added to the system in part (c) so that it becomes a position servo
device such that the applied voltage is given by
v
a
= K(
r
m
),
where K is the feedback gain. Find the transfer function between
r
and
m
.
(e) What is the maximum value of K that can be used if an overshoot M
p
< 20% is desired?
(f) What values of K will provide a rise time of less than 4 sec? (Ignore the M
p
constraint.)
(g) Use MATLAB to plot the step response of the position servo system for values of the gain
K = 0.5, 1, and 2. Find the overshoot and rise time for each of the three step responses
by examining your plots. Are the plots consistent with your calculations in parts (e) and
(f)?
Solution:
J
m
m
+
_
b +
K
t
K
e
R
a
_
m
=
K
t
R
a
v
a
.
(a)
J
m
m
s
2
+
_
b +
K
t
K
e
R
a
_
m
s =
K
t
R
a
V
a
(s)
6
s
m
(s)
V
a
(s)
=
Kt
RaJm
s +
b
Jm
+
KtKe
RaJm
.
J
m
= 0.01 kg m
2
,
b = 0.001 N m sec,
K
e
= 0.02 V sec,
K
t
= 0.02 N m/A,
R
a
= 10 .
s
m
(s)
V
a
(s)
=
0.2
s + 0.104
(b) Final Value Theorem
m
() = s
m
(s)V
a
(s)|
s=0
=
s(10)(0.2)
s(s + 0.104)
s=0
=
2
0.104
= 19.23.
(c)
m
(s)
V
a
(s)
=
0.2
s(s + 0.104)
.
(d)
m
(s) =
0.2K(
r
m
)
s(s + 0.104)
.
m
(s)
r
(s)
=
0.2K
s
2
+ 0.104s + 0.2K
.
(e)
M
p
= e
/
1
2
0.2 (20%),
0.4559.
m
(s)
r
(s)
=
2
n
s
2
+ 2
n
s +
2
n
.
2
n
= 0.104,
n
=
0.104
2
=
0.104
2(0.4559)
= 0.114 rad/sec,
2
n
= 0.2K = (0.114)
2
,
K < 6.50 10
2
.
7
(f)
n
1.8
t
r
=
1.8
4
,
n
0.45
2
n
= 0.2K = (0.45)
2
K 1.01.
(g) MATLAB
% Problem 3.30 FPE6e
clear all
close all
K1=[0.5 1.0 2.0 6.5e-2];
t=0:0.01:150;
for i=1:1:length(K1)
K = K1(i);
titleText = sprintf(K= %1.4f , K);
wn = sqrt(0.2*K);
num=wn^2;
den=[1 0.104 wn^2];
zeta=0.104/2/wn;
sys = tf(num, den);
y= step(sys, t);
% Finding maximum overshoot
if zeta < 1
Mp = (max(y) - 1)*100;
overshootText = sprintf(Max overshoot = %3.2f %, Mp);
else
overshootText = sprintf(No overshoot);
end
% Finding rise time
idx_01 = max(.nd(y<0.1));
idx_09 = min(.nd(y>0.9));
t_r = t(idx_09) - t(idx_01);
risetimeText = sprintf(Rise time = %3.2f sec, t_r);
% Plotting
subplot(3,2,i);
plot(t,y);
grid on;
title(titleText);
text( 0.5, 0.3, overshootText);
text( 0.5, 0.1, risetimeText);
end
8
%%%%%%%%%%%%%%%%
% Function for computing rise time
function tr = risetime(t,y)
% A. Emami 2006
% normalize y to 1:
y = y/y(length(y));
idx1 = min(find(y>=0.1))
idx2 = min(find(y>=0.9))
if ~isempty(idx1) & ~isempty(idx2)
tr = t(idx2) - t(idx1);
else
tr = 0
end
0 50 100 150
0
0.5
1
1.5
2
K= 0.5000
Max overshoot = 59.23
Rise time = 3.70 sec
0 50 100 150
0
0.5
1
1.5
2
K= 1.0000
Max overshoot = 69.23
Rise time = 2.51 sec
0 50 100 150
0
0.5
1
1.5
2
K= 2.0000
Max overshoot = 77.17
Rise time = 1.73 sec
0 50 100 150
0
0.5
1
1.5
K= 0.0650
Max overshoot = 19.99
Rise time = 13.66 sec
For part (e) we concluded that K < 6.50 10
2
in order for M
p
< 20%: This is consistent
with the above plots. For part (f) we found that K 1.01 in order to have a rise time of less
than 4 seconds. We actually see that our calculations is slightly o and that K can be K 0.5,
but since K 1.01 is included in K 0.5, our answer in part (f) is consistent with the above
plots.
9
Problem 3.33
In aircraft control systems, an ideal pitch response (q
o
) versus a pitch command (q
c
) is described
by the transfer function
Q
o
(s)
Q
c
(s)
=
2
n
(s + 1/)
s
2
+ 2
n
s +
2
n
.
The actual aircraft response is more complicated than this ideal transfer function; nevertheless,
the ideal model is used as a guide for autopilot design. Assume that t
r
is the desired rise time
and that
n
=
1.789
t
r
,
1
=
1.6
t
r
,
= 0.89.
Show that this ideal response possesses a fast settling time and minimal overshoot by plotting
the step response for t
r
= 0.8, 1.0, 1.2, and 1.5 sec.
Solution:
The following program statements in MATLAB produce the following plots:
% Problem 3.33 FPE6e
tr = [0.8 1.0 1.2 1.5];
t=[1:240]/30;
tback=fliplr(t);
clf;
for I=1:4,
wn=(1.789)/tr(I); %Rads/second
tau=tr(I)/(1.6); %tau
zeta=0.89; %
b=tau*(wn^2)*[1 1/tau];
a=[1 2*zeta*wn (wn^2)];
y=step(b,a,t);
subplot(2,2,I);
plot(t,y);
titletext=sprintf(tr=%3.1f seconds,tr(I));
title(titletext);
xlabel(t (seconds));
ylabel(Qo/Qc);
ymax=(max(y)-1)*100;
msg=sprintf(Max overshoot=%3.1f%%,ymax);
text(.50,.30,msg);
yback=flipud(y);
10
yind=find(abs(yback-1)>0.01);
ts=tback(min(yind));
msg=sprintf(Settling time =%3.1f sec,ts);
text(.50,.10,msg);
grid;
end
0 1 2 3 4 5 6 7 8
0
0.2
0.4
0.6
0.8
1
1.2
1.4
tr=0.8 seconds
t (seconds)
Q
o
/
Q
c
Max overshoot=2.3%
Settling time =2.3 sec
0 1 2 3 4 5 6 7 8
0
0.2
0.4
0.6
0.8
1
1.2
1.4
tr=1.0 seconds
t (seconds)
Q
o
/
Q
c
Max overshoot=2.3%
Settling time =2.9 sec
0 1 2 3 4 5 6 7 8
0
0.2
0.4
0.6
0.8
1
1.2
1.4
tr=1.2 seconds
t (seconds)
Q
o
/
Q
c
Max overshoot=2.3%
Settling time =3.5 sec
0 1 2 3 4 5 6 7 8
0
0.2
0.4
0.6
0.8
1
1.2
1.4
tr=1.5 seconds
t (seconds)
Q
o
/
Q
c
Max overshoot=2.3%
Settling time =4.4 sec
11