MAE43A Signals & Systems - Homework 5, Winter 23 due by the end of class Tuesday February 2, 23. If left under my door, then straight to the recycling bin with it. This week s homework will be a refresher on the Laplace transform. It will refer to the Quiz questions; the original (plus solutions) is available on either of the class web sites: oodgeroo or TED. Question Solving an LTI ODE using Laplace transforms Consider the following system described by an ODE. y (t) + 6y (t) + 9y(t) 3 exp( 3t), y (), y(). Solve this differential equation using Laplace transforms and the partial fractions expansion. Show your working for the partial fraction expansion, or expect zero credit, since I know matlab can do it. Check your answer using dsolve in matlab, which thinks the correct response is ans exp(-3*t) + 2*t*exp(-3*t) + (3*tˆ2*exp(-3*t))/2 Take the Laplace transform of the ODE and simplify. s 2 Y (s) + s + 6sY (s) 6 + 9Y (s) 3 s + 3, (s 2 + 6s + 9)Y (s) s 5 3 s + 3, Y (s) (s + 5)(s + 3) + 3 (s + 3) 3, (s + 3)2 + 2(s + 3) + 3 (s + 3) 3, s + 3 + 2 (s + 3) 2 + 3 (s + 3) 3. Thus y(t) [ e 3t + 2te 3t + 3 2 t2 e 3t] (t), just like matlab except that we do not omit the (t). The matlab command is dsolve( D2y-6*Dy-9*y+3*exp(-3*t), Dy()-, y() ) Please note that I really hate using the complicated residue formula for multiple poles if I can avoid it, which I did by grouping terms in the numerator above. Question 2 Determining the impulse response of the Ford Nucleon Recall from the Quiz Question, the Ford Nucleon system from fuel flow, u(t), to position, x(t), is described by the ODE d 2 x dx (t) + dt2 dt (t) u(t), x( ), ẋ( ).
Recall also from the bonus part of the question that I gave you the impulse response. Through extraordinary mathematical skills (which we shall all learn shortly), I propose that the impulse response of the pickup truck is h(t) [ e t ](t). () Part (i) Please apply your Laplace transform skills to establish that this is indeed correct. [Congratlutaions on your extraordinary mathematical skills.] Take Laplace transforms with input u(t) δ(t) and zero initial conditions, since the impulse response is defined to have zero initial conditions. s 2 Y (s) + sy (s), Y (s) s 2 + s, s(s + ), s s +, Thus, h(t) (t) e t (t). Part (ii) You then proved in Question 2(a) the following using integration. From the expression () for the impulse response h(t) of the truck, show that the step response is y step (t) t h(τ) dτ [t + e t ](t). (2) Show from the ODE that this is indeed the step response of the car. Again use Laplace transforms with u(t) (t) and zero initial conditions. s 2 Y (s) + sy (s) s, Y (s) s 3 + s 2, s 2 (s + ), s + + s 2 s, Thus, y step (t) [t + e t ](t). Part (iii) We next proceed to the Quiz Question 2(b) where you wrote u(t) 2 (t + ) + (t 2 ) 3 (t 2). Use matlab to create a time sample vector t[-:.:6] and to create the corresponding input signal sample vector u corresponding to the quiz. Define a system as follows. sys tf(,[ ])
Explain how this implements the Nucleon ODE. The left-hand side of the ODE for the Nucleon has a Laplace transform (s 2 + s)y (s) and the right-hand side is U(s). So the transfer function if given by the matlab statement: >> systf(,[ ]) sys ------- sˆ2 + s Continuous-time transfer function. Next apply your input vector to this system with zero initial conditions (the default if not specified) using the lsim function. Plot your answer versus time. >> for i:7, % note that t()- and construct the u-vector if t(i)<.5, u(i)2; elseif t(i)<2, u(i)3; end end >> ylsim(sys,u,t); Warning: Simulation will start at a nonzero initial time. > In warning at 26 In DynamicSystem.checkLsimInputs at 9 In DynamicSystem.lsim at 68 >> plot(t,y);shg >> title( Plot of system response ) >> xlabel( Time (sec) );ylabel( ) >> print -dpdf wiggle.pdf 8 Plot of system response 7 6 5 4 3 2 2 3 4 5 6 Time (sec)
Question 3 Initial and Final Value Theorems Question 3.9, all parts, from p. 228 in Chaparro Signals and Systems using Matlab. Note that the steady-state response of a system is the part of its output signal which does not vanish as t. The part which does vanish as t is called the transient response. If the system has an unbounded output signal the use of the terms is moot. 3.9(a) Since x(t) is a causal (i.e. one-sided) signal, and X(s) s(s 2 +2s+), we see that the transform of x has poles in at s and at some values in the open left-half plane. So, lim t x(t) will exist. Use the final value theorem to find the limit. lim x(t) lim sx(s), t s lim s s s(s 2 + 2s + ), lim s s 2 + 2s +. To compute x() use the initial-value theorem: lim t + x(t) lim s sx(s). (b) Since the poles of the signal transform are at s, 2 ± j the steady-state signal will have only a constant value, which can be found by the final value theorem. lim y(t) lim sy (s) t s 5 y ss(t). (c) Since the signal transform has poles at s, 2 ± j the signal is not bounded as t. So the steady-state signal does not exist. (d) The poles of the signal transform are at s, ± j and so a steady-state solution exists and can be found from the final-value theorem. s + y ss (t) lim sy (s) lim s s (s + ) 2 + 2. The transient solution is the rest of the solution and has transform: Y trans (s) Y (s) 2s, s + s((s + ) 2 + ) 2s, (s + ) /2[(s + )2 + ] s((s + ) 2, + ) /2s 2 s((s + ) 2 + ), /2s (s + ) 2 +, thus, y trans (t) 2 e t cos(t)(t).
Question 4 Putting convolution to sleep In Quiz Question 3, you were asked to proved the following result using the convolution integral. [ e at (t) ] [ e bt (t) ] [ e at e bt] (t) [ e bt e at] (t). a b b a Now repeat the proof using the Laplace transform, noting that the Laplace transform of a convolution (of two one-sided functions) is given by the product of their individual Laplace transforms. Use the method of residues to reach your answer. Take Laplace transforms of the left-hand side using the convolution rule. s a [ ] [ ] s b lim (s a) s a (s a)(s b) s a + lim (s b) s b (s a)(s b) s b, a b s a + b a s b, [ a b s a ]. s b So [ e at (t) ] [ e bt (t) ] [ e at e bt] (t) [ e bt e at] (t) a b b a For specific values of the quantities a and b, use matlab to define a time sample vector and vectors of sampled values of the two exponentials. Now perform the convolution using matlab s conv function. Plot your answer to verify the veracity of the formula that you computed twice, once via convolution integral and once via Laplace transform. Help added Thursday February 7: You are using matlab to compute a convolution using samples from two signals and necessarily these sample vectors are of limited time extent. When I performed this convolution in matlab, I used >> a-.5; b; >> t[-:.:]; My e at and e bt are plotted below versus t. Note that I did not scale this well. exp(at) signal versus time 2.5 x 4 exp(bt) signal versus time.9.8 2.7.6.5.5.4.3.2.5. 2 2 4 6 8 time (sec) 2 2 4 6 8 time (sec) These plots are all the data that we have from the two signals. On the next plot are the following three curves: (i) (blue) the fixed curve e bτ [(τ) (τ )] versus time τ, scaled by 2, to fit it on the same plot as e at, (ii) (green) the reversed and shifted curve e a(7 τ) [(τ 7 ) (τ 7)], (iii) (red) the reversed and shifted curve e a(5 τ) [(τ 5 ) (τ 5)]. Notice that each of these curves is truncated, as in the above picture, so that their support is exactly time units. I have
tried to capture this with the ( ) functions..4.2 Fixed exp(bt) and reversed and shifted exp(at) with shifts 7 and 5 fixed e bt /2 shift 7 shift 5.8.6.4.2 5 5 5 2 time (sec) The convolution in computed by letting the e a(t τ) curve slide across the picture as t varies and taking the integral of the product of the blue-e bτ with the corresponding e a(t τ) curve. You will note that, because of limited support in e bτ we do not compute the correct continuous-time convolution for t >. One final point: do not forget to multiply the convolution by the step-size (here.) in making your comparison. One final, final point: do not spend too much time on this. It worked out a bit more complicated than I expected. The example in the class notes does not exhibit this support issue, because the signals themselves have limited support. >> a-.5;b; >> t[-:.:]; >> tp[-2:.:2]; >> oot[zeros(,) ones(,)]; >> eatoot.*exp(a*t); >> ebtoot.*exp(b*t); >> yconv(eat,ebt); >> z/(a-b)*(eat-ebt); >> plot(tp,y,t,z*);shg >> title( Convolutions ) >> xlabel( Time (sec) );ylabel( ) >> legend( conv function, by hand ) >> print -dpdf convo.pdf
5 x 5 Convolutions conv function by hand 5 5 5 5 2 Time (sec) We see that the convolutions line up (almost) perfectly over the original interval but differ outside of this. We will see why later... perhaps. This has to do with circular convolution and the discrete Fourier transform.