Download Continuous Time Siganls Part 2 and more Exercises Digital Signal Processing in PDF only on Docsity! Solution to Assignment 1 Problem 1: Sketch the following CT signals as function of the independent variable t over the specified range. i) ( )1( ) cos 3 4 8 for ( 1 2x t t tπ π= + − ≤ )≤ ii) ( )2( ) sin 3 8 2 for ( 1 2)x t t tπ π= − + − ≤ ≤ (added) iii) 3( ) 5 3 for ( 2 2)tx t t e t−= + − ≤ ≤ iv) ( )( )24( ) sin 3 4 8 for ( 1 2)x t t tπ π= + − ≤ ≤ (added) v) ( ) ( )5( ) cos 3 4 sin 2 for ( 2 3)x t t t tπ π= + − ≤ ≤ vi) ( )6( ) exp 2 for ( 2 3)x t t t t= − − ≤ ≤ vii) ( )1[ ] cos 3 4 8 for ( 5 5)x k k kπ π= + − ≤ ≤ viii) ( )2[ ] sin 3 8 2 for ( 10 10)x k k kπ π= − + − ≤ ≤ (added) ix) 3[ ] 5 3 for ( 5 5)kx k k k−= + − ≤ ≤ x) ( )4[ ] sin 3 4 8 for ( 6 10)x k k kπ π= + − ≤ ≤ xi) ( ) ( )5[ ] cos 3 4 sin 2 for ( 10 10)x k k k kπ π= + − ≤ ≤ (added) xii) 6[ ] 4 for ( 10 10)kx k k k−= − ≤ ≤ ▌ Solution: The CT signals ((i) to (vi)) can be plotted in MATLAB as follows. The CT signals are plotted in Fig. 1. % clear figure clf % signal defined in part (i) t1 =-1:0.01:2 ; x1 = cos(3*pi*t1/4+pi/8) ; subplot(3,2,1), plot(t1, x1), grid on xlabel('t') % Label of X-axis ylabel('x_1(t)') % Label of Y-axis % signal defined in part (ii) t2 =-1:0.01:2 ; x2 = sin(-3*pi*t2/8+pi/2) ; subplot(3,2,2), plot(t2, x2), grid xlabel('t') % Label of X-axis ylabel('x_2(t)') % Label of Y-axis % signal defined in part (iii) t3 =-2:0.01:2 ; x3 = 5*t3+ 3*exp(-t3); subplot(3,2,3), plot(t3, x3), grid xlabel('t') % Label of X-axis ylabel('x_3(t)') % Label of Y-axis % signal defined in part (iv) t4 =-1:0.01:2 ; x4 = sin(3*pi*t4/4+pi/8) ; x4 =x4.*x4; subplot(3,2,4), plot(t4, x4), grid xlabel('t') % Label of X-axis ylabel('x_4(t)') % Label of Y-axis 1 docsity.com % signal defined in part (v) t5 =-2:0.01:3 ; x5 = cos(3*pi*t5/4) + sin(pi*t5/2) ; subplot(3,2,5), plot(t5, x5), grid xlabel('t') % Label of X-axis ylabel('x_5(t)') % Label of Y-axis % signal defined in part (vi) t6 =-2:0.01:3 ; x6 = t6.*exp(-2*t6) ; subplot(3,2,6), plot(t6, x6), grid xlabel('t') % Label of X-axis ylabel('x_6(t)') % Label of Y-axis Fig 1: CT signals for Problem 1, parts (i) to (vi). The DT signals ((vii) to (xii)) can also be plotted using the following MATLAB commands. The plots are shown in Fig. 2. % clear figure clf % signal defined in part (i) k1 =-5:5 ; x1 = cos(3*pi*k1/4+pi/8) ; subplot(3,2,1), stem(k1, x1, 'filled'), grid on xlabel('k') % Label of X-axis ylabel('x_1[k]') % Label of Y-axis % signal defined in part (ii) k2 =-10:10 ; x2 = sin(-3*pi*k2/8+pi/2) ; subplot(3,2,2), stem(k2, x2, 'filled'), grid on xlabel('k') % Label of X-axis ylabel('x_2[k]') % Label of Y-axis % signal defined in part (iii) 2 docsity.com [ ] ( ) ( ) 443442143421 IITermITerm kkkx 6463cos83sin4 π+π= Term I is periodic with a period K41 of 16. Term II is also K42 periodic with a period of 128. Since K41/K42 = 1/8 is a rational number, x4[k] is a periodic signal. Using Equation (1.9), the fundamental period of x4[k] is given by 16n = 128m. Picking n = 8 and m = 128, the overall period of x4[k] is given by 128. vii) Looking at the individual terms ( )( ) ( ) 44 344 2144 344 21 21 74cos47exp][5 TermTerm kkjkx π+π+π= Term I is periodic with a period K51 of 8. Term II is also K42 periodic with a period of 7. Since K41/K42 = 8/7 is a rational number, x4[k] is a periodic signal. Using Equation (1.9), the fundamental period of x4[k] is given by 8n = 7m. Picking n = 7 and m = 8, the overall period of x5[k] is given by 56. Problem 3: Show that the average power of the DT periodic signal x[k] = A cos(Ωk) is given by A2/2. ▌ Solution: By definition, [ ] ∑∑ − = − = ∞ Ω=Ω= 1 0 2 21 0 2 )(cos)cos(1 N k N k k N AkA N P , where N is the fundamental period and is given by N = 2π/Ω. By expressing the squared cosine as a linear term, we get ∑ − = ∞ Ω+ = 1 0 2 2 )2cos(1N k k N AP or, ∑∑ − = − = ∞ Ω+= 1 0 21 0 2 )2cos( 2 1 2 N k N k k N A N AP . Using the Euler’s formula to express the cosine as a sum of two complex exponentials, gives ∑∑ − = Ω− − = Ω ∞ ++×= 1 0 2 21 0 2 22 442 N k kj N k kj e N Ae N AN N AP . (1) We expand each complex exponential term as GP series to get 0 1 1 1 1 2 4 2 21 0 2 = − − = − − = Ω π Ω Ω− = Ω∑ j j j NjN k kj e e e ee and 0 1 1 1 1 2 4 2 21 0 2 = − − = − − = Ω π− Ω Ω−− = Ω−∑ j j j NjN k kj e e e ee . Substituting the values of the exponentials in Eq. (1), we get 2 00 2 22 AAP =++=∞ , which proves the result. ▌ Problem 4: Determine if the following CT signals are even, odd, or neither-even-nor-odd. In the later case, evaluate and sketch the even and odd components of the CT signals. 5 docsity.com i) ( ) ( ) ( )1 2sin 2 2 cos 4x t tπ π⎡ ⎤= +⎣ ⎦t 3 ii) ( ) ( )22 cosx t t t= + iii) ( ) 3 0 6 2 5 3( 6) 4 6 0 elsew t t t x t t t ≤ ≤⎧ ⎪ ≤ ≤⎪ = ⎨ − + ≤ ≤⎪ ⎪ ⎩ 2 4 here iv) [ ] ( ) ( )1 sin 4 cos 2 3x k k kπ= + . v) ( )( ) ( )3[ ] exp 7 4 cos 4 7x k j k kπ π π= + + . vi) . [ ] ( )1 05 1 0 k k x k k ⎧ − ≥⎪= ⎨ <⎪⎩ Solution: ▌ i) Since ( ) ( ) ( )1 2sin 2 2 cos 4 odd even even odd x t tπ π = = = = t ⎡ ⎤ ⎢ ⎥= + ⎢ ⎥⎣ ⎦ 14243 14243 1442443 14444244443 , therefore, the CT function is odd. ii) Since ( ) { ( )22 cos even even even 3x t t t = = = = + 14243 1442443 , therefore, the CT function is even. iv) To see if the DT signal is even or odd, we evaluate ][1 )3/2cos()4sin( )3/2cos()4sin(][1 kx kk kkkx ≠ π+−= π−+−=− Therefore, the DT signal is neither even nor odd. The even and odd components of x1[k] are given by Even component: [ ] ).3/2cos(][1][1][1 21 kkxkxkx even π=−+= Odd component: [ ] ).4sin(][1][1][1 21 kkxkxkx odd =−−= v) To see if the DT signal is even or odd, we evaluate ][1 )7/4cos()4/7exp( )7/4cos()4/7exp(][3 kx kkj kkjkx ≠ π+π+π−= π+π−+π−=− Therefore, the DT signal is neither even nor odd. The even and odd components of x3[k] are given by Even component: [ ] ).7/4cos()4/7cos(][1][1][3 21 π+π+π=−+= kkkxkxkx even 6 docsity.com Odd component: [ ] ).4/7sin(][1][1][3 21 kjkxkxkx odd π=−−= vi) To see if the DT signal is even or odd, we evaluate ][5 00 0)1( 00 0)1(][5 kx k k k kkx k k ≠ ⎩ ⎨ ⎧ > ≤− = ⎩ ⎨ ⎧ <− ≥−− =− − Therefore, the DT signal is neither even nor odd. The even and odd components of x5[k] are given by Even component: . 0)1( 02 0)1( ][5 2 1 ⎪ ⎩ ⎪ ⎨ ⎧ >− > <− = k k k kx k k even Odd component: . 0)1( 00 0)1( ][5 2 1 ⎪ ⎩ ⎪ ⎨ ⎧ >−− > <− = k k k kx k k odd ▌ Problem 5: Determine if the following CT signals are energy or power signals or neither. Calculate the energy and power of the signals in each case. i) ( ) ( ) ( )1 cos sin 3x t t tπ π= ii) ( ) ( ) ⎩ ⎨ ⎧ ≤≤−π = elsewhere0 333cos 2 tt tx iii) ( ) 0 2 5 4 2 0 elsewhe t t x t t t ≤ ≤⎧ ⎪ = − ≤ ≤⎨ ⎪ ⎩ 4 re iv) (Changed) )8/3sin()4/cos(][1 kkkx ππ= v) [ ] ( )3 1 kx k = − vi) (Changed) ▌ [ ] ⎪ ⎩ ⎪ ⎨ ⎧ ≤≤ ≤≤ = elsewhere0 15111 1002 5 k k kx k Solution: i) The CT signal 4342143421 1 2 1 2/1 2 1 00 )2sin()4sin()3sin()cos()(1 == π+π=ππ= TwithperioidicTwithperioidic tttttx is periodic with the fundamental period T = 1. Since periodic signals are always power signals, x1(t) is a power signal. Total energy Ex1 in x1(t) is infinite. Based on Problem 1.6, the average power in a sinusoidal signal x(t) = A sin(ω0t + θ) is given by A2/2. The average power in x1(t) is, therefore, given by 1/8 + 1/8 = 1/4. 7 docsity.com -4 -2 0 2 4 6 8 10 0 1 2 3 4 5 6 7 8 9 10 k (v) x5[k]= ku[k] -8 -6 -4 -2 0 2 4 6 8 0 1 2 3 4 5 6 k (vi) x6[k]= |k| (u[k+4] - u[k-4]) (v) (vi) Figure 3: Waveforms for CT signals specified in Problem 6. Problem 7: Consider the following signal ⎪ ⎩ ⎪ ⎨ ⎧ ≤≤+− ≤≤− −≤≤−+ = elsewhere0 212 111 122 )( tt t tt tx Sketch and),3( −tx ),32( −tx ),32( −− tx )343( −− tx . Determine the analytical expressions for each of the four functions. ▌ Solution: The waveforms for signals ),3( −tx ),32( −tx ),32( −− tx and )343( −− tx are shown in Fig. 4. t −4 −3 −2 −1 0 1 2 3 4 5 x(t) 1 t −4 −3 −2 −1 0 1 2 3 4 5 x(t − 3) 1 t −4 −3 −2 −1 0 1 2 3 4 5 x(2t − 3) 1 10 docsity.com t −4 −3 −2 −1 0 1 2 3 4 5 x(−2t − 3) 1 t −4 −3 −2 0 1 2 3 4 5 x(−3t/4 − 3) 1 −6.67 −0.75 Figure 4: Waveforms for the shifted and scaled signals specified in Problem 7. Problem 8: Consider the CT function ( )f t . i) Sketch the CT function )39()( tftg −= . ii) Calculate the energy and power of the signal ( )f t . Is it a power signal or energy signal? iii) Represent the function ( )f t as a summation of an even and an odd signal. Sketch the even and odd parts. ▌ Solution: (i) To obtain the waveform for g(t) from f(t), one possible order of transformations is: )39()9())9(()()( 39 tftftftftf offactorabyscalebyleftthetoshiftaxisyaboutreflect −⎯⎯⎯⎯⎯⎯ →⎯−=−−⎯⎯⎯⎯⎯ →⎯−⎯⎯⎯⎯⎯ →⎯ − . The final waveform for g(t) = f(9 – 3t) is sketched in Fig. 5. t −4 −3 −2 −1 0 1 2 3 4 5 f (t) 2 −3(−t – 3) (5t/3 – 3) t −4 −3 −2 −1 0 1 2 3 4 5 f (9 – 3t) 2 −3 (3t – 12) (−5t +12) Figure 5: Waveform for Problem 8(i). 11 docsity.com (ii) Since f(t) is a finite duration signal, it is an energy signal. The average power in f(t) is 0, while its total energy is given by 1679 )3)(3/5( )33/5( )3)(1( )3()33/5()3( 3 0 30 3 33 0 2 0 3 2 =+= − + − −− =−+−−= −− ∫∫ ttdttdttE f . ▌ (iii) We solve part (iii) for Problem 8 graphically. t −6 −5 −4 −3 −2 −1 0 1 2 3 4 5 1 −3 f (t) t −6 −5 −4 −3 −2 −1 0 1 2 3 4 5 6 1 −3 f (−t) t −6 −5 −4 −3 −2 −1 0 1 2 3 4 5 6 1 −3 feven (t) −3/2 t −6 −5 −4 −3 −2 −1 0 1 2 3 4 5 6 1 −3 fodd(t) −3/2 Figure 6: Waveforms for Problem 8(iii). Problem 9: Consider the two DT signals 12 docsity.com