Description
Problem 1
Problem 6.2-1 Consider the closed-loop system of Fig. P6.2-1
(a.) Calculate and plot the unit-step response at the sampling instants, for the case that
With this system’s digital controller having a transfer function of , then we only need to calculate the Pulse transfer function and then find its z-transform
Using the common z-transform pair:
Then subsituting in values for sample period
Then calculating the closed-loop transfer function
Then using calculating the unit-step response means the input term , and calculating the
output:
Then taking the partial fractions expansion and solving for the inverse z-transform give us
Thus,
Solving for B yields:
Thus
Taking the inverse z-transform by using common pairs, we find the unit-step response to be
Thus, the unit-step response for the system is
Now using MATLAB to verify calculations and plot the unit-step response, we get:
T1 = 2; Gs = tf(0.5,[1 0.5]); Gz = c2d(Gs,T1);
Tz = feedback(Gz,1), Rz = tf(1);
Tz =
0.6321 ——— z + 0.2642
Sample time: 2 seconds Discrete-time transfer function.
Cz = zpk(Rz*Tz)
Cz =
0.63212 ———-
(z+0.2642)
Sample time: 2 seconds Discrete-time zero/pole/gain model.
% Partial Fraction Expansion of C(z)/z
[R,P,K] = residue(0.6321,[1 -0.7358 -0.2642])
R = 2×1
0.5000
-0.5000
P = 2×1
1.0000 -0.2642
K =
[]
k = 0:10/T1; kT2 = k.*T1; ckT2 = real(0.5.*(1-(-0.2642).^k)); figure stairs(kT2,ckT2,’LineWidth’,1.5), ylim([0 0.7]), grid on xlabel(‘Time (sec)’), ylabel(‘c(kT)’), title(‘Unit-Step Response’)
(b.) Calculate the system unit-step response of the analog system, that is, with the sampler, digital controller, and data hold removed. Plot the response on the same graph with the results of part (a).
The transfer function of just the analog system is
Then the closed-loop transfer function would be described as
Subsituting the definition of the impulse reponse for to calculate the analog output yields
Then by taking the partial fraction expansion and inverse laplace transform, we can solve the unit-step response of the analog system to be
Thus, the unit-step response of the analog system is
Now using MATLAB to verify calculations and plot the analog system’s unit-step response, we get:
% Plot analog system unit-step t = 0:0.01:10; ct = 0.5.*(1-exp(-t)); figure stairs(kT2,ckT2,’LineWidth’,1.5), grid on, hold on plot(t,ct, ‘LineWidth’,1.5), hold off xlabel(‘Time (s)’), ylabel(‘Amplitude’) ylim([0 0.7]) title(‘Unit-Step of Analog and Discrete-Time Systems’) legend(‘c(kT)’,’c(t)’,’Location’,’best’)
(c.) For the system of Fig. P6.2-1, let . Calculate the unit-step response and plot these results on the same graph used for parts (a) and (b).
Subsituting inthe value for sample period to the transfer functions of part (a) yields
Then calculating the closed-loop transfer function
Then using calculating the unit-step response means the input term , and calculating the
output:
Then taking the partial fractions expansion ans solving for the inverse z-transform give us
Thus
Taking the inverse z-transform by using common pairs, we find the unit-step response to be
Thus, the unit-step response for the system with sample period is
Now using MATLAB to verify calculations and plot the unit-step response, we get:
% Dz = 1 and T = 0.4 secs
T2 = 0.4; Gs = tf(0.5,[1 0.5]); Gz = c2d(Gs,T2)
Gz =
0.1813 ——— z – 0.8187
Sample time: 0.4 seconds Discrete-time transfer function.
Tz = feedback(Gz,1), Rz = tf(1);
Tz =
0.1813 ——— z – 0.6375
Sample time: 0.4 seconds Discrete-time transfer function.
Cz = zpk(Rz*Tz)
Cz =
0.18127 ———-
(z-0.6375)
Sample time: 0.4 seconds Discrete-time zero/pole/gain model.
% Partial Fraction Expansion of C(z)/z b = 0.1813; a = conv([1 -1],[1 -0.6375]); [R,P,K] = residue(b,a)
R = 2×1
0.5001 -0.5001 P = 2×1
1.0000
0.6375 K =
[]
k = 0:10/T2; kT4 = k*T2; ckT_04 = real(0.5.*(1-(0.6375).^k)); figure stairs(kT2,ckT2, ‘LineWidth’,1.5), grid on, hold on plot(t,ct, ‘LineWidth’,1.5), stairs(kT4,ckT_04, ‘LineWidth’, 1.5), hold off xlabel(‘Time (s)’), ylabel(‘Amplitude’), ylim([0 0.7]) title(‘Unit-Step of Analog and Discrete-Time Systems’) legend(‘part (a)’,’part (b)’,’part (c)’,’Location’,’best’)
(d.) Use the system dc gains to calculate the steady-state responses for each of the systems of parts (a), (b), and (c). Why are these gains equal?
The dc gains for discrete-time systems in parts (a) and (c) can be derived by solving the
analog system in part (b), which result in
DC Gain for Part (a) system:
DC Gain for Part (b) system:
DC Gain for Part (c) system:
The choosing of different sample periods will result in varying transient reponses of the systems, but the discretization process of the analog system does not change the steady-state response provided that both discrete- and continuous-time systems are stable. The fact that all these systems have the same dc gain value verifies that all the systems are related through the conversion from a continuous to a discrete-time system.
Problem 2
Problem 6.2-7 The block diagram of a control system of a joint in a robot arm is shown in Fig. P6.2-7. This system is discussed in Section 1.6. Let .
(a.) Evaluate if the input is to command a step in the output and . Note that the system input must be a step function with an amplitude Why?
Given that the amplifier value is , and the input voltage must be , then the input voltage to the servomotor must be:
which means that the servomotor must be rated at and the input voltage must not exceed
because the voltage signal will be increased by a gain of 10 from the amplifier.
To solve for we first start by finding the Pulse transfer function and taking its z-transform
or
Using the common z-transform pair:
and then subsituting in values for , we find the Pulse transfer function to be
Now simplifying, we get
Now using Mason’s formula and solving for the closed-loop system, we get
or solving for the complex poles, we can represent it as
% Solve complex roots of C(z) using MATLAB p = roots([1 -1.8056 0.831])
p = 2×1 complex 0.9028 + 0.1263i
0.9028 – 0.1263i
P1_mag = abs(p(1)), P1_ang = angle(p(1))*(180/pi)
P1_mag = 0.9116
P1_ang = 7.9640
P2_mag = abs(p(2)), P2_ang = angle(p(2))*(180/pi)
P2_mag = 0.9116
P2_ang = -7.9640
Lastly, substituting the input for
Convert to z-transform pair: and multiplying by the closed-loop transfer function, gives our output as:
Thus, the output for the system is
(b.) Assuming the system to be stable, find that steady-state output.
We can solve for the steady-state value by using the final value theorem:
Thus, the steady-state value for the output is .
(c.) Find the (approximate) time required for the system response to reach steady-state.
Using the complex poles of the system:
The time constant of the poles is given by
Filling in the sample period and the radius of the complex poles
Then using the fact that the transient response settles out in approximately four time constants
Thus, the system response will take about seconds to reach steady-state (d.) Simulate the system to verify the results in parts (b) and (c).
% Use MATLAB to simulate system and verify parts (b) and (c)
T = 0.1; tau = -T/log(0.9116)
tau = 1.0805
b = [0.187 0.176]
b = 1×2
0.1870 0.1760
a = [1 -1.8056 0.831]
a = 1×3
1.0000 -1.8056 0.8310
Rz = tf(1.4,1,T)
Rz =
1.4 Static gain.
Cz = tf(b,a,T) * Rz
Cz =
0.2618 z + 0.2464 ——————– z^2 – 1.806 z + 0.831 Sample time: 0.1 seconds Discrete-time transfer function.
[ckT,k,x] = step(Cz); figure stairs(k,ckT,’LineWidth’,1.5),hold on, xline(4*tau,’k–‘,’LineWidth’,1.5) grid on, xlabel(‘Time (secs)’), ylabel(‘Amplitude’), title(‘Unit Step Response’) legend(‘c(kT)’,’4 au’,’Location’,’best’)
From the simulated unit-step response of the system above, we can see that the system’s steady state value settles around 20, and the calculated value of the time constant was used to calculate the time of which the system would reach a steady-state. This value should be about four times the time constant, so . From the plot, we can see the system hasn’t fully settled by this time, but the system’s transient response has indeed concluded.




Reviews
There are no reviews yet.