MAE43A Signals & Systems - Homework, Winter 4 due by the end of class Thursday January 6, 4. Question Time shifting [Chaparro Question.5] Consider a finite-support signal and zero everywhere else. Part (a): Carefully plot x(t + ). Part (b): Carefully plot x( t + ). x(t) t, t, Part(c): Add the two signals above to get a new signal y(t). To verify your results, represent each signal above analytically and then show that the resulting signal is correct. [That is, use a formula for x(t) and then for the transformed versions in parts (a) and (b). Compare this to your sum from the two plots.] Part (a): x(t + ) Part (b): x( t + ) t +, t + t +, t else else t +, t + t +, t else else Plot of x(t+) Plot of x( t+).9.9.8.8.7.7.6.5.4.6.5.4.3.3.....5.5.5.5.5.5.5.5 Figure : Part (a) and (b) t +, t < t + t +, t Part (c): y(t) x(t + ) + x( t + ) t +, < t else Plot of Part (c) is the sum of Part (a) and (b) plots.
Plot of x(t+)+x( t+).8.6.4..8.6.4..5.5.5.5 Figure : Part (c) Matlab code: clear all close all %Qa&b x -:.:; ft zeros(size(x)); ft zeros(size(x)); q x > - & x < ; ft(q) x(q)+; p x > & x < ; ft(p) -x(p)+; figure() plot(x,ft) title( Plot of x(t+) ) xlabel( ) ylabel( ) figure() plot(x,ft) title( Plot of x(-t+) ) xlabel( ) ylabel( ) %Qc y ft + ft; k find(x); y(k) ; figure(3) plot(x,y) hold on
plot([ ],[ ]) title( Plot of x(t+)+x(-t+) ) xlabel( ) ylabel( ) Question Even and odd functions [Chaparro Question.6] According to Euler s identity the sine and cosine are defined in terms of complex exponentials. You would then ask what if instead of complex exponentials you were to use real exponentials. This then yields the hyperbolic functions defined on < t < : cosh(ω t) eωt + e Ωt, sinh(ω t) eωt e Ωt. Part (a): Let Ω rad/sec. Use the definitions to plot cosh(t) and sinh(t). Part (b): Is cosh(t) even or odd? Part (c): Is sinh(t) even or odd? Part (d): Obtain an expression for x(t) e t u(t) in terms of hyperbolic functions [and u(t)]. Use symbolic matlab to plot x(t) e t u(t) and then to plot your expression in terms of hyperbolic functions. Compare them. Part (a): Plot of cosh(t) 5 Plot of sinh(t) 9 8 5 7 6 5 4 5 3 3 3 5 3 3 Figure 3: cosh(t) (left) and sinh(t) (right) plots Part (b): cosh( t) e t +e t cosh(t), cosh(t) is even.
Part (c): sinh( t) e t e t sinh(t), sinh(t) is odd. Part (d): Note that u(t) is a unit step signal cosh(t) sinh(t) e t, so, x(t) [cosh(t) sinh(t)]u(t). Plot of e t u(t) Plot of (cosh(t) sinh(t))u(t).9.9.8.8.7.7.6.5.4.6.5.4.3.3.... 3 4 5 6 3 4 5 6 Figure 4: e t u(t) (left) and [cosh(t) sinh(t)]u(t) (right) plots Matlab code: clear all close all t -3:.:3; cosh.5*(exp(t) + exp(-t)); sinh.5*(exp(t) - exp(-t)); figure() plot(t,cosh) title( Plot of cosh(t) ) xlabel( ) ylabel( ) figure() plot(t,sinh) title( Plot of sinh(t) ) xlabel( ) ylabel( ) %Part d clear all syms t e exp(-t);%creating exp(-t) fuction %figure %ezplot(e,[-,6,,3])%plot only exp(-t) hyp cosh(t) - sinh(t);%equivalent of exp(-t) u heaviside(t);%unit step function
figure(3) ezplot(e*u,[-,6,,]) title( Plot of eˆ-t}u(t) ) xlabel( ) ylabel( ) figure(4) ezplot(hyp*u,[-,6,,]) title( Plot of (cosh(t)-sinh(t))u(t) ) xlabel( ) ylabel( ) Question 3 Impulse and unit-step functions [Chaparro Question.8] By introducing the impulse δ(t) or unit-step u(t) signals, we expand the conventional calculus. One of the advantages of having the δ(t) function is that we are now able to find the derivative of discontinuous signals. Let us illustrate this advantage. Consider a periodic sinusoid defined for all times. and a causal sinusoid defined as x(t) cos(ω t), < t <, x (t) cos(ω t)u(t), where the unit-step function indicates that the function has a discontinuity at zero, since for t + the function is close to, and for t the function is zero. Part (a): Find the derivative y(t) dx(t)/dt and plot it. Part (b): Find the derivate z(t) dx (t)/dt [treat x (t) as the product of two functions cos(ω t) and u(t)] and plot it. Express z(t) in terms on y(t). Part (c): Verify that the integral of z(t) gives you back x (t). Part (a): y(t) d dt x(t) d dt cos(ω t) Ω sin(ω t). Set Ω rad/s. Part (b): z(t) d dt x (t) d dt cos(ω t)u(t) δ(t) cos(ω t) Ω sin(ω t)u(t). So, z(t) δ(t)x(t) + y(t)u(t) δ(t) + y(t)u(t) since x(t) at t. Use symbolic matlab to plot z(t). Part (c): t z()d t δ() Ω sin(ω )d, t < + cos(ω ) t, t, t < cos(ω t), t cos(ω t)u(t) x (t), t < t [δ() Ω sin(ω )] d, t, t < + cos(ω t), t Matlab code:
Plot of y(t).8.6.4...4.6.8 3 3 Figure 5: Plot of y(t) Plot of z(t).8.6.4...4.6.8 3 3 4 5 6 Figure 6: Plot of z(t) clear all close all %Part(a) t -pi:(pi/):3.4; figure() plot(t,-sin(t)) axis([-3.5,pi,-,]) title( Plot of y(t) ) xlabel( ) ylabel( ) %Part (b) clear t syms t
z dirac(t)*cos(t) - sin(t)*heaviside(t); %Note that Matlab s Dirac is not exactly what it should be figure() ezplot(z,[-3.5,6.3,-.,.]) hold on plot([ ],[,])%to add a spike at t title( Plot of z(t) ) xlabel( ) ylabel( ) Question 4 Ramp in terms of unit-step signals [Chaparro Question.] A ramp, r(t) tu(t), can be expressed as r(t) Part (a): Show that the above expression for r(t) is equivalent to r(t) Part (b): Compute the derivative of r(t) to show that u(t) t u()u(t ) d. d tu(t). u()u(t ) d, u()δ(t ) d. Part (a): Values of u() and u(t ) and their product depending on where t is on the real line can be sketched as follows
u() t t< u(t ) t t u()u(t ) t t t< So, r(t) tu(t) u()u(t )d t d t, t, t < Part (b): d dt r(t) d dt u(t) u()u(t )d u() d u(t )d dt u(t), t u()δ(t )d, by the sampling property of δ(t), t < As an alternative for the last step of the above calculation, d dt r(t) d dt tu(t) u(t) + tδ(t) u(t) + u(t); therefore u(t) u()δ(t )d.