EE102B Spring 2018 Signal Processing and Linear Systems II Goldsmith Problem Set #7 Solutions Due: Friday June 1st, 2018 at 5 PM. 1. Laplace Transform Convergence (10 pts) Determine whether each of the following statements is true or false. If a statement is true, construct a convincing argument for it. If it is false, give a counterexample. (a) The Laplace transform of t 2 u(t) does not converge anywhere on the s-plane. Solution: False (b) The Laplace transform of e t2 u(t) does not converge anywhere on the s-plane. Solution: True (c) The Laplace transform of e jω 0t does not converge anywhere on the s-plane. Solution: True (d) The Laplace transform of e jω 0t u(t) does not converge anywhere on the s-plane. Solution: False (e) The Laplace transform of t does not converge anywhere on the s-plane. Solution: True 2. Bode Plots Sketch the Bode plots for the following frequency responses: (a) (b) s 10 10(s + 1) Solution:Find plot on next page 100(s + 10)(10s + 1) (s + 100)(s 2 + s + 1) Solution:Find plot on next page (10 pts) 3. Cascade and parallel realizations (20 pts) This problem shows how a higher-order LTI system can be constructed from lower-order subsystems, using the equivalences of interconnected systems presented on page 183 of the Laplace Transform chapter in course reader. Consider an LTI system with transfer function of the form where γ 1 γ 2 β 1. H(s) = s β 1 (s γ 1 )(s γ 2 ), R(s) > min{r(γ 1),R(γ 2 )}, 1
2
(a) Find rational transfer functions H 1 (s) and H 2 (s) of order 1 (i.e., their numerator and denominator are polynomial in s of degree up to 1), such that the following two diagrams are equivalent: x(t) H 1 (s) H 2 (s) y(t) Solution: The two s are equivalent provided This is satisfied (for example) by and x(t) H(s) y(t) H(s) = H 1 (s)h 2 (s). H 1 (s) = s β 1 s γ 1, R(s) > R(γ 1 ) H 2 (s) = 1 s γ 2, R(s) > R(γ 1 ). (b) Find rational transfer functions H 1 (s) and H 2 (s) of order 1 (i.e., their denominator is a degree 1 polynomial in s), such that the following two diagrams are equivalent: H 1 (s) x(t) + y(t) H 2 (s) x(t) H(s) y(t) Hint: Use the partial-fraction expansion representation of H(s). Solution: In order to obtain a parallel realization we do partial-fraction expansion of H(s): H(s) = A 1 s γ 1 + A 2 s γ 2, where A 1 = γ 1 β 1 γ 1 γ 2, and A 2 = γ 2 β 1 γ 2 γ 2. We now may choose: H a (s) = γ 1 β 1 γ 1 γ 2 1 s γ 1, R(s) > R(γ 1 ) H b (s) = γ 2 β 1 γ 2 γ 1 1 s γ 2, R(s) > R(γ 2 ) 3
4. Stabilizing unstable system by feedback This problem makes reference to the Feedback Systems lecture notes, pages 197-198. H(s) consists of a proportional-plus-derivative transfer function. x(t) + G(s) = 1/s y(t) H(s) = K (a) Assume K = 0. Find the response of the system to a step input x(t) = u(t). Is te system stable? Explain. (b) Find a real K such that the system is stable. (c) Find the response to a step input x(t) = u(t) with the K as in (b). (d) Extra credit: using the final value theorem, find Solution: lim y(t) t when x(t) = u(t) as in (c). Make sure your answer agrees with the limit evaluated directly from the step response in (c). (a) Note: There was a typo in this question and we forgot to add a - sign at the summation in the block diagram. Hence we have decided to accept the solutions that assume both - and + sign, the solution for + sign is shown in red We have Y (s) = X(s)H(s) = 1,R(s) > 0. s2 The inverse Laplace transform o the above leads y(t) = u(t)t. The system is not stable since the ROC o its transer unction does not contain the jω axis. Indeed, u(t)t is an unbounded response to a bounded input u(t). (b) The close-loop transfer function is Y (s) X(s) = G(s) 1 + G(s)H(s) = 1 s + K We observe that the poles of this transfer function are at s = K. We require that the poles are to the left of the jω axis, or K > 0. The close-loop transfer function is Y (s) X(s) = G(s) 1 G(s)H(s) = 1 s K We observe that the poles of this transfer function are at s = K. We require that the poles are to the left of the jω axis, or K < 0. 4
(c) With the system as in (b) we have which leads to With the system as in (b) we have Y (s) = X(s) 1 s = 1 s(s + K) = 1 K y(t) = u(t) ( 1 e kt). K Y (s) = X(s) 1 s = 1 s(s K) = 1 K ( 1 s 1 ), s + K ( 1 s K 1 ), s which leads to y(t) = u(t) ( ) e kt 1). K (d) Since x(t) = 0 or t < 0 and since the (c) implies that the limit exists, the finite value theorem implies Y (s) = lim sx(s) 1 s 0 s = lim s s 0 s(s + K) = 1 K. Y (s) = lim sx(s) 1 s 0 s = lim s s 0 s(s K) = 1 K. 5. Computing z-transforms For the following signals, determine bilateral z-transforms and regions of convergence. Note that if the region of convergence is null, the z-transform does not exist. (a) x[n] = δ[n] 3u[n 5]. (b) x[n] = β n n! u[n]. (c) ( 4 3) n u[n] + ( 1 2) n u[ n]. (d) x[n] = a n u[n 1]. (e) x[n] = a n u[ n]. Solution: (a) 1 (b) 3z 1, ROC: {z : z > 1}. 1 z 1 X(s) = n= n= x[n]z n = ROC; entire z plane except z = 0 (c) X(z) = n= n= β n n! u[n]z n = n= β n n=0 n! z n = n= (βz 1 ) n = e β/z, n=0 n! 1 1 4/(3z) + z 1 z 1 2, ROC: {z : z 1 < 3/4 and z 1 > 2}, i.e., ROC is null. 5
az 1 (d) 1 az 1,ROC:{z : az 1 < 1}. (e) az 1 1 az 1,ROC:{z : az 1 > 1}. 6
MATLAB Assignment General Instructions (30 pts) Answer all questions asked. Your submission should include all m-file listings and plots requested. All plots should have a title and x- and y-axes properly labeled. In the following problems, you will examine the pole locations for second-order systems of the form ω 2 n H(s) = s 2 + 2ηω n s + ωn 2 (1) The values of the damping ratio η and undamped natural frequency ω n specify the locations of the poles, and consequently the behavior of this system. In this exercise, you will see how the locations of the poles affect the frequency response. First, you will examine the pole locations and frequency responses for four different choices of η while ω n remains fixed at 1. a) Define H 1 (s) through H 4 (s) to be the system functions that result from fixing ω n = 1 in Eq. (1) above while η is 0, 1 4,1, and 2, respectively. Define a1 through a4 to be the coefficient vectors for the denominators of H 1 (s) through H 4 (s). Find and plot the locations of the poles for each of these systems. Note that the command roots([a,b,c]) returns the values of the roots (in this case poles) of an equation of the form ax 2 + bx + c. To plot the poles, display the imaginary part on the y-axis and the real part on the x-axis. b) Define omega = [-5:0.1:5] to be the frequencies at which you will compute the frequency responses of the four systems. Use the Matlab command freqs to compute and plot H( jω) for each of the four systems you defined in Part (a). How are the frequency responses for η < 1 qualitatively different from those for η 1? Can you explain how the pole locations for the systems cause this difference? Next, you will trace the locations of the poles as you vary η and ω n and see how varying these parameters affects the frequency response of the system. c) First, you will vary η in the range 0 η 10 while holding ω n = 1. Define etarange=[0 logspace(-1,1,99)] to get 100 logarithmically spaced points in 0 η 10. Define a_eta to be a 3 x 100 matrix where each column is the denominator coefficients for H(s) when η has the value in the corresponding column of etarange. Notice that only the middle coefficient is changing with each new value of η. Define etapoles to be a 2 x 100 matrix where each column is the roots of the corresponding column of a_eta. On a single, plot the real versus imaginary parts for each row of etapoles and describe the loci they trace. On your plot, indicate the following points: η = 0, 1 4,1, and 2 (you can use something like the scatter command to show these individual points). In order to get a square aspect ratio with equal length axes in your plot, you can type: 7
>> axis( equal ) >> axis([-4 0-2 2]) Describe qualitatively how you expect the frequency response to change as η goes from 0 to 1 and then from 1 to 10. d) In this problem, you will hold η = 1 4 and examine the effect of increasing ω n from 0 to 10. Define omegarange=[0 logspace(-1,1,99)] to get 100 logarithmically spaced points in the region of interest. Define a_omega and omegapoles analogously to the way you defined a_eta and etapoles in Part (c). On a single, plot the real versus imaginary parts for each column of omegapoles. How would you expect changing ω n to change the frequency response H( jω)? Use freqs to evaluate the frequency response when ω n = 2 and η = 1 4 and plot the magnitude of this frequency response. Compare this with the plot you made in Part (b) for ω n = 1 and η = 1 4. How are they different? Does this match what you expected from your plot of the loci traced by omegapoles? e) Extra Credit: There is no reason that η needs to be positive. Repeat Part (c) for η between -10 and 0. When η is negative, can the system described by H(s) be both causal and stable? Also, plot the frequency response magnitude for the system when η = 1 4 and ω n = 1 using freqs. Is the system with the frequency response computed by freqs causal? Also explain any similarities or differences between this plot and the frequency response magnitude plotted in Part (b) for η = 1 4. 8
Part a Table of Contents Part a... 1 Part b... 2 Part c... 5 Part d... 6 Part e... 9 % H(s) = (omega_n)^2 / (s^2 + 2*eta*omega*s + omega^2) % H1(s) --> eta = 0 % H2(s) --> eta = 1/4 % H3(s) --> eta = 1 % H4(s) --> eta = 2 a1 = [1 0 1]; a2 = [1 1/2 1]; a3 = [1 2 1]; a4 = [1 4 1]; % Find the poles of these systems poles1 = roots(a1); poles2 = roots(a2); poles3 = roots(a3); poles4 = roots(a4); hold on scatter(real(poles1), imag(poles1), 'b') scatter(real(poles2), imag(poles2), 'g') scatter(real(poles3), imag(poles3), 'k') scatter(real(poles4), imag(poles4), 'r') legend('h_1', 'H_2', 'H_3', 'H_4') title('locations of Poles') ylabel('imaginary') xlabel('real') 1
Part b omega = -5:0.1:5; b = 1; h1 = freqs(b,a1,omega); plot(omega, abs(h1),'b') title('frequency Response for eta = 0') h2 = freqs(b,a2,omega); plot(omega, abs(h2),'g') title('frequency Response for eta = 1/4') h3 = freqs(b,a3,omega); plot(omega, abs(h3),'k') title('frequency Response for eta = 1') h4 = freqs(b,a4,omega); plot(omega, abs(h4),'r') title('frequency Response for eta = 2') 2
% Answers to questions % For eta > 0, the frequency response is symmetric about omega = 0. For eta % < 0, the frequency response is symmetric but not at 0. For eta > 0, the % poles are real while for eta < 0 they have imaginary parts. 3
4
Part c etarange = [0 logspace(-1,1,99)]; % Coefficients of denominator a_eta = zeros(100,3); a_eta(:,1) = 1; a_eta(:,2) = 2*etarange; a_eta(:,3) = 1; % Poles for different eta values etapoles = zeros(100,2); for i = 1:100 etapoles(i,:) = roots(a_eta(i,:)); end hold on scatter(real(etapoles(:,1)), imag(etapoles(:,1)), 'b') scatter(real(etapoles(:,2)), imag(etapoles(:,2)), 'g') % Mark particular values of eta % eta = 0 is sample 1 % eta = 1/4 is sample 21 % eta = 1 is sample 51 % eta = 2 is sample 66 5
etas = [1,21,51,66]; for eta = 1:length(etas) scatter(real(etapoles(etas(eta),1)), imag(etapoles(etas(eta),1)), 'r') scatter(real(etapoles(etas(eta),2)), imag(etapoles(etas(eta),2)), 'r') end xlabel('real Part') ylabel('imaginary Part') title('poles for Changing Eta') axis('equal') axis([-4 0-2 2]) % The values asked for are marked in red. % As eta goes from 0 to 1, the frequency response will be closer to % centered at 0. As eta goes from 1 to 10, the frequency response will be % sharper and centered at 0. Part d omegarange=[0 logspace(-1,1,99)]; eta = 1/4; % Coefficients of denominator a_omega = zeros(100,3); 6
a_omega(:,1) = 1; a_omega(:,2) = 2*eta*omegarange; a_omega(:,3) = omegarange.^2; % Poles for different omega values omegapoles = zeros(100,2); for i = 1:100 omegapoles(i,:) = roots(a_omega(i,:)); end hold on scatter(real(omegapoles(:,1)), imag(omegapoles(:,1)), 'b') scatter(real(omegapoles(:,2)), imag(omegapoles(:,2)), 'g') xlabel('real Part') ylabel('imaginary Part') title('poles for Changing Omega') axis('equal') axis([-4 0-2 2]) % The frequency response will be more spread out (centered at wider points) % when omega is larger. omega = -5:0.1:5; b = 4; a = [1 1 4]; h = freqs(b,a,omega); plot(omega, abs(h),'b') title('frequency Response for eta = 1/4, omega = 2') % Yes, this matches what we would expect 7
8
Part e netarange = [0 logspace(-1,1,99)]*-1; % Coefficients of denominator a_neta = zeros(100,3); a_neta(:,1) = 1; a_neta(:,2) = 2*netarange; a_neta(:,3) = 1; % Poles for different eta values netapoles = zeros(100,2); for i = 1:100 netapoles(i,:) = roots(a_neta(i,:)); end hold on scatter(real(netapoles(:,1)), imag(netapoles(:,1)), 'b') scatter(real(netapoles(:,2)), imag(netapoles(:,2)), 'g') xlabel('real Part') ylabel('imaginary Part') title('poles for Changing Eta') axis('equal') % All the poles are in the right hand side of the so it cannot be % causal and stable. omega = -5:0.1:5; b = 1; a = [1-1/2 1]; h = freqs(b,a,omega); plot(omega, abs(h),'b') title('frequency Response for eta = -1/4, omega = 1') 9
10
Published with MATLAB R2016a 11