Professional Documents
Culture Documents
3.1. Find magnitude and phase at frequency ω=1 rad/s of a zero-order hold with sampling period
T=0.1 s.
T 0.1
sin sin 1
T 2 2
| G ZOH ( j ) | T sin c T 0.1 0.1
2 T 0.1
1
2 2
while the phase is given by
T 0.1
G ZOH ( j ) 1 0.05 rad
2 2
3.2. The first-order hold uses the last two numbers in a sequence to generate its output. The output of
both the zero-order hold and the first order hold is given by
u kT u k 1T
u t u kT a t kT ,kT t k 1T
T
k 0,1,2,...
(a) For a discrete impulse input, obtain and sketch the impulse response for the above equation
with a = 0 and a = 1.
(b) Write an impulse sampled version of the above impulse response and show that the transfer
function is given by
G H ( s)
1
s
1 e sT 1 ae sT
a
sT
1 e sT
(c) Obtain the transfer functions for the zero-order hold and for the first-order hold from the
above transfer function. Verify that the transfer function of the zero-order hold is the same
as that obtained in Section 3.3.
u(t ) u( kT ), kT t ( k 1)T
The first order hold uses the last two numbers of a sequence to generate the output
u kT u k 1 T
u(t ) u kT
T
t kT , kT t ( k 1)T
1
u kT u k 1 T
u(t ) u kT a
T
t kT , kT t ( k 1)T
(a) For a zero-order hold (ZOH), the output for each sampling period is a constant equal to
the input at the beginning of the period. Thus it is equal to one for the first period and
zero thereafter. For a first-order hold (FOH), the output increases steadily from an initial
level = u(0) =1, to reach a level of 2 at t = T. For the second sampling period, u(T) is
zero and u(0) is unity. Thus the output decrease steadily to a level of -1 at t = 2T. At t =
3T, the output goes to zero since both u(T) and u(2T) are zero. The results of this analysis
are shown in Figure P3.0.
1 1 1
2T
0 0 T 0 T
Unit Impulse Impulse
Impulse Response Response
of ZOH of FOH
Figure P3.0 Unit impulse and impulse responses for ZOH and FOH.
(b) The output of Problem 3.1 for u(0) = 1 and u(k) = 0, k > 0, gives the impulse sampled
form
u 0
u * (t ) u 0 1 t 1 t T a t.1 t (t T )1 t T au (0)1 t T
T
u 0
a (t T ).1 t T (t 2T )1 t 2T au (0)1 t 2T
T
1
U * ( s)
s
1 e sT a T1 s1 1 2e
2
sT
e 2 sT ae sT 1 e sT
1
1 e sT
s
1 ae sT
a
sT
1 e sT
1 a
i.e. G H ( s)
s
1 e sT 1 a e
sT
sT
1 e sT
(c) Thus for a = 0, we have the impulse response of the zero-order hold (as given in the
notes)
1
*
GZOH ( s)
s
1 e sT
2
and for a = 1, we have the impulse response of the first-order hold
1 1
*
GFOH ( s)
s
1 e sT 1 e sT
sT
1 e sT
3.3. Many chemical processes can be modelled by the following transfer function:
K
G (s) e Td s
s 1
where K is the gain, is the time constant and Td is the time delay. Obtain the transfer function
G Z A S ( z) for the system in terms of the system parameters. Assume that the time delay Td is a
multiple of the sampling time T.
G ( s) K K K Td s
Obtain the partial fraction expansion e Td s
s s 1
e
s s s 1
G ZAS ( z ) 1 z 1 Z G (ss) 1 z Z Ks s K1 e
1 Td s
K
1 z 1 1
K Td / T
T 1
z
1 z 1 e z
K z 1 Td / T
K z
z e T
K 1 e T Td / T
z
z e T
3.4. Obtain the transfer function of a point mass (m) with force as input and displacement as output
neglecting actuator dynamics then find G Z A S ( z) for the system.
X 1
The transfer function for the system is G ( s)
F m s2
3
GZAS ( z ) 1 z 1 Z G (ss) 1 z Z m1s 1
3
1
1 z 1
T z 1 z
2 1
1
m 1 z 1
3
T z 1
2
m z 1 2
3.5. For an internal combustion engine, the transfer function with injected fuel flow rate as input and
fuel flow rate into the cylinder as output is given by 1
s 1
G ( s)
s 1
where is a time constant and is known as the fuel split parameter. Obtain the transfer function
G Z A S ( z) for the system in terms of the system parameters.
G ( s) s 1 1 1
Obtain the partial fraction expansion
s s s 1 s s 1
1
G ZAS ( z ) 1 z 1 Z G ( s ) 1 z 1 Z 1
s s s 1
1
1 z 1
1
1 z
1
1 e T z 1
1
1 z 1
z e T
3.6. Repeat Problem 3.5. including a delay of 25 ms in the transfer function with a sampling period
of 10 ms.
25 = 3 10 0.5 10
Hence, m = 3 and f = 0.5. The partial fraction coefficient corresponding to the s-domain pole at
(1/) is modified by the factor e5/ where the time constant is assumed to be given in ms. The
transfer function for the system with ZOH and sampler is given by
1J. Moskwa, Automotive Engine Modeling and Real Time Control, MIT Doctoral Thesis, 1988.
4
GZAS ( z ) 1 z 1 Z
G( s)
s
1
1 z 1
1 e5 / z 3
1 z
1
1 e T z 1
1 z 1 e 5 / 3
1 T z
z e
Hence, m = 3 and f = 0.5. The partial fraction coefficient corresponding to the s-domain pole at
(1/) is modified by the factor e5/ where the time constant is assumed to be given in ms. The
transfer function for the system with ZOH and sampler is given by
GZAS ( z ) 1 z 1 Z
G( s)
s
1
1 z 1
1 e5 / z 3
1 z
1
1 e T z 1
1 z 1 e 5 / 3
1 z
z e T
3.7. Find the equivalent sampled impulse response sequence and the equivalent z-transfer function
for the cascade of the two analog systems with sampled input
1 10
H 1 (s ) H 2 (s)
s6 s 1
(a) In the absence of samplers between the systems, the overall transfer function is
10
H ( s)
( s 6)( s 1)
2 2
s 6 s 1
h(t ) 2e 6 t 2e t
5
2z 2z 2 e T e 6T z
H ( z)
z e 6T z e T z e 6T z e T
(b) If the analog systems are separated by a sampler then each has a z-domain
transfer function and the transfer functions are given by
z 10 z
H 1 ( z) H 2 (z)
z e 6T z e T
10 z 2
H ( z)
z e 6T z e T
The partial fraction expansion of the transfer function is
10 e 6T z e T z
H ( z)
e 6 T e T z e 6 T z e T
h(kT )
e
10
6T
e T
e 6T e 6 kT e T e kT
6T
e
10
e T
e 6( k 1)T e ( k 1)T ,k 0,1,2,...
3.8. Obtain expressions for the analog and sampled outputs from the block diagrams of Figure P3.8
(a)
R(s)
U(s) U*(s) Y(s) Y*(s)
C(s) G(s)
T T
H(s)
(b)
6
R(s) E(s) E*(s) Y(s) Y*(s)
C(s) G(s)
T T
H(s)
(c)
H(s)
( CR) * ( s)
Solving for U*(s), we obtain U ( s)
*
1 ( CHG ) * ( s)
G ( s)(CR) * ( s)
The analog output is Y ( s) G ( s) U ( s)
*
1 (CHG ) * ( s)
G * ( s)( CR ) * ( s)
The sampled output is Y ( s)
1 (CHG ) * ( s)
R * ( s)
Solving for E*(s), we obtain E ( s)
*
1 H ( s)(CG ) * ( s)
*
7
C ( s)G ( s) R * ( s)
Hence, we have the output Y ( s)
1 H * ( s)(CG ) * ( s)
(CG ) * ( s) R * ( s)
and the sampled output Y * ( s)
1 H * ( s)( CG ) * ( s)
(c) Since there are samplers between all blocks, we use the feedback rule for block diagrams
to obtain
C * ( s) R * ( s)
U * ( s)
1 H * ( s)G * ( s)C * ( s)
G * ( s)C * ( s) R * ( s)
Y * ( s)
1 H * ( s)G * ( s)C * ( s)
G ( s)C * ( s) R * ( s)
The analog output is Y ( s) G ( s) U ( s)
*
1 H * ( s) G * ( s)C * ( s)
3.9. For the unity feedback system shown in Figure P3.9, we are given the analog subsystem
s8
G ( s)
s5
The system is digitally controlled with a sampling period of 0.02 s. The controller transfer function
was selected as
0.35 z
C ( z)
z 1
(a) Find the z-transfer function for the analog subsystem with DAC and ADC.
(b) Find the closed-loop transfer function and characteristic equation.
(c) Find the steady-state error due to a sampled unit step and a sampled unit ramp. Comment on
the effect of the controller on steady-state error.
Figure P3.9 Block diagram for a closed-loop system with digital control.
(a)
8
R(z) E(z) U(z) Y(z)
C(z) ZOH G(s)
T
G ( s) s8 16
. 0.6
s s s 5 s s5
G ZAS ( z ) 1 z 1 Z G(ss)
z 1 1.6 z 0.6 z
z z 1 z e 50.02
0.6 z 1
1.6
z e 0.1
z 0.845
z 0.905
(b) The closed-loop transfer function is
C ( z )GZAS ( z )
Gcl ( z )
1 C ( z )GZAS ( z )
0.35 z z 0.848
z 1 z 0.905 0.35 z z 0.848
0.35 z z 0.848
. z 2 2.202 z 0.905
135
0.259 z z 0.848
z 2 1631
. z 0.670
(c) The system is type 1 and therefore has zero steady-state error due to a step and finite
steady-state error due to a ramp. The error due to a unit ramp is
9
100T
e()% %
z 1 C ( z )G ZAS ( z ) z 1
2
% 3.57%
z 1
0.351.6
z e 0.1 z 1
The steady-state error is improved because the controller increases the type of the system
by 1.
3.10. Find the steady-state error due to a unit step disturbance input for the systems of Figure P3.10
with a sampling period of 0.03 s and the transfer functions
2 4 s 2 e sT 0.95
Gd (s) G (s) C * ( s)
s 1 s s 3 e sT 1
(a)
D(s)
Gd(s)
(b)
D(s)
Gd(s)
Y(s) Y*(s)
R(s)
C*(s) ZOH
T T G(s)
T
Sampling gives
z z z z 0.911 10 2 z
(Gd D)( z ) 2 2
z 1 z e z 1 z 0.970 z 1 z 0.970
T
The transfer function for the plant with ZOH and sampler is
10
GZAS ( z ) 1 z 1 Z s4ss23
2
1 z 1 Z 8s 3 94 1s s 1 3
2
8 3
1 z 1
4 1
1
1 z 1
2
9 1 z 1 1 e 30.03 z 1
8 3 4 1 z 1
1
1 z 1 9 1 0.914z 1
0.118 z 0.942
z 1 z 0.914
z 0.95
C ( z)
z 1
Y ( z)
(Gd D)( z ) 0.911 10 2 z
z 0.942 z 0.95
1 0118
.
1 C ( z )GZAS ( z ) z 1 z 0.97
z 1 2 z 0.914
y ( ) z 1 Y ( z ) z 1
0
8 s 2 4 3 10 9 1 19
G ( s)Gd ( s) D( s) 4 2
s s 1 s 3
2
s s s 1 s 3
Sampling gives
4 3 z 10 9 z z 1 9 z
(GGd D )( z ) 4
z 1
T
2
z 1 ze z e 3T
3.529 10 3 z z 0.980 z 0.942
z 1 2 z 0.970 z 0.914
The transfer function for the plant with ZOH and sampler is (as in part a)
GZAS ( z ) 1 z 1 Z s4ss23
2
0.118 z 0.942
z 1 z 0.914
z 0.95
C( z)
z 1
11
(Gd D)( z )
Y ( z)
1 C ( z )GZAS ( z )
3.529 10 3 z z 0.980 z 0.942 z 0.942 z 0.95
1 0.1182
z 1 z 0.970 z 0.914 z 1 2 z 0.914
2
y ( ) z 1 Y ( z ) z 1
0
0.4 z 0.2
(i) G( z) (ii)
z 1 z 0.1
0.5 z 0.2
G( z)
z 0.1 z 0.8
a) The position error constant:
(i) The system is Type 1 and has an infnite position error constant.
0.51 0.2 .
(ii) K p G (1) 3.333 3
1 0.11 0.8
b) The velocity error constants:
.
1 0.41 0.2 0.533 3
(i) K v ( z 1)G ( z )
T z 1 T 1 0.1 T
(ii) The system is Type 0 and has zero velocity error constant.
Computer Exercises
12
(a) Obtain the transfer function for the system with sampled input and output.
(b) Obtain the transfer function for the system with DAC and ADC.
(c) Obtain the unit step response of the system with sampled output and analog input.
(d) Obtain the poles of the systems in (a), (b) and the output of (c) and comment on the
differences between them.
>> g=zpk(-2,[0,-5],10)
>> gd=c2d(g,.05,'imp')
>> g=zpk(-2,[0,-5],10)
>> gd = c2d(g,.05,'zoh')
0.4654 z 0.905
we obtain the transfer function G ( z )
z 1 z 0.7788
(c) Obtain the output with the MATLAB command
>> [y,t]=step( tf([10,20],[1,5,0]),[0:0.05:2]) % Sampled analog step response
>> plot(t, y, ‘*’) % Plot samples with period 0.05
Figure P3.1 Step response of system with analog input and sampled output.
13
(d) The two systems of (a) and (b) have the same poles at (1, 0.779) given by e 0.05 ps with ps =
0, -5 (the poles of the analog system). The output of (c) has an extra pole at unity resulting
from the step input with its pole at the origin.
(a) The transfer function for the analog subsystem with DAC and ADC of Figure P3.109 is
obtained using the MATLAB command
(b) The responses show that the steady-state error due to a unit step has been drastically reduced
using the controller. The transient response has been somewhat adversely affected. The
deterioration in the time response is the price paid for improving the steady-state error. A
different controller must be used if the transient response is unacceptable.
1.6
1.5
1.4
1.3
1.2
1.1
1
0 0.5 1 1.5 2
14
Step Response
From: U(1)
1.2
1.1
0.9
0.8
Amplitude
To: Y(1)
0.7
0.6
0.5
0.4
0.3
0.2
0 0.1 0.2 0.3 0.4 0.5 0.6
Time (sec.)
(c) The frequency response plot shows that the magnitude at the folding frequency is relatively low.
Thus the sampling frequency is acceptable.
The sampling frequency is chosen based on the actual dynamics of the system after the loop is
closed since these are the conditions under which the system actually operates. The open-loop
dynamics are irrelevant and may be much slower than the closed-loop dynamics.
1.1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0 100 200 300 400 500
3.14. Consider the internal combustion engine model of Problem 3.5. Assume that, for the operational
conditions of interest, the time constant is approximately 1.2 s while the parameter can vary
in the range 0.4 to 0.6. The digital cascade controller
15
0.02 z
C ( z)
z 1
was selected to improve the time response of the system with unity feedback and a sampling
period of 4 ms. Simulate the digital control system with = 0.4, 0.5, 0.6, and discuss the
behavior of the system in each case.
We use SIMULINK to simulate the system with the numerical values of the parameters entered
in MATLAB. The simulation diagram is shown in Figure P3.5. Alternatively, the following
MATLAB commands yield the same results.
The step responses plotted using MATLAB are shown in Figure P3.6. As the value of the
parameter increases, the zero of the system gets closer to the origin and its effect on the time
response increases. This results in a higher percentage overshoot and a faster response. The
controller includes an integral term which results in zero steady-state error due to step for all
three parameter values.
1/z
0.02 z eps *tau .s+1
Zero-Order
Hold
Figure P3.5 Simulation diagram for the closed-loop control of the internal combustion engine.
16
Step Response
0.6 0.5
0.4
0.8
Amplitude
0.6
0.4
0.2
0
0 1 2 3 4 5 6
Time (sec)
Figure P3.6 Step response for the internal combustion engine with = 0.4, 0.5, and 0.6.
3.15. Simulate the continuous-discrete system of Problem 3.9 and examine the behavior of both the
continuous output and the sampled output. Repeat the simulation with a %10 error in the plant
gain. Discuss the simulation results and comment on the effect of the parameter error on
disturbance rejection.
The SIMULINK scheme employed for the simulation of the control system is shown in Figure
Figure P3.7.
17
A step reference input is applied at time t=0 s and a step disturbance is applied at time t=1 s. The
resulting continuous and sampled process output are shown in Figure P3.8.
1.5
process output
0.5
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
time [s]
Figure P3.8 Time response for the nominal system of Problem 3.15. Black: analog output.
Red: sampled output.
The results obtained when the gain of the process is increased by 10% are shown in Figure P3.9. The
steady-state error is zero despite the gain modification because of the presence of an integrator in the
controller.
1.5
process output
0.5
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
time [s]
Figure P3.9 Time response for Problem 3.15 when the gain is increased by 10%. Black: analog
output. Red: sampled output.
18