hw5-sol

hw5-sol - Homework 5 Problem 1(Chapter 8 P 22 T0 = 2 f 0 =...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Homework 5 Problem 1 (Chapter 8, P. 22) 0 2 T = , 0 1 2 f = , 0 ω π = , sin(2 ), 1/ 2 () 0, 1/ 2 1 tt xt t ⎧< = << , as shown in figures (dotted line). Find the harmonic function [] X k by: 0 0 0 0 1 T jk t X kx t e d t T = 1 1 1 2 jk t xte d t = 1/2 1/2 1 sin(2 ) 2 jk t te d t = 22 1/2 1/2 1 jt jk t ee ed t j ππ = 1/2 (2 ) ) 1/2 1 4 jk t t eed t j −− + =− 1/2 1/2 ) ) 1/2 1/2 1 4( 2 ) ( 2 ) t t jj k j k + =+ −+ sin( (2 )) sin( (2 )) 1 2( 2 ) ( 2 ) kk k ⎡⎤ ⎢⎥ ⎣⎦ sin c( )-sinc( ) 42 2 j So, the complex CTFS description is: [ ] k jk t k x tX k e =∞ =−∞ = Approximation to the signal: kN jk t N x k e = = , as shown is figures (solid line) Code: clear all T0 = 2; icount = 0; for t = -3:0.01:3; % To get x(t) icount = icount+1; if abs(t-round(t/T0)*T0) <= 1/2; x_t(icount) = sin(2*pi*t);
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
else x_t(icount) = 0; end end tt = -3:0.01:3; figure(1);subplot(2,1,1),plot(tt,x_t,':');hold on x_Nt = zeros(size(t)); % To get x[k] N = 1; % N=1,2,3 for k = 1:N; X_k1(k) = -j/4*(sinc((2-k)/2)-sinc((2+k)/2)); X_k2(k) = -j/4*(sinc((2+k)/2)-sinc((2-k)/2)); x_Nt = x_Nt+X_k1(k)*exp(j*2*pi*k*1/T0*tt)++X_k2(k)*exp(-j*2*pi*k*1/T0*tt); end figure(1);subplot(2,1,1),plot(tt,x_Nt);hold off -3 -2 -1 0 1 2 3 -1 -0.5 0 0.5 1 t x(t) N=1 -1 0 1 2 3 -1 -0.5 0 0.5 1 t N=2 -1 0 1 2 3 -1 -0.5 0 0.5 1 t N=3
Background image of page 2
Problem 2 (Chapter 8, P. 23) From (a) to (d), we got 1 () () 2cos (2 ) NN x txt N t π =+ 2 ( ) 2cos(2( 1) ) 2cos(2 ) N x tN t N t + # 0 ( ) 2cos(2 ) 2cos(4 ) 2cos(2 ) x ttt N t ππ = +++ + " 1 12 c o s ( 2 ) N n nt = 2 N jnt nN e =− = Signals for 0,1,2,20 N = are shown as follow over the time range 33 t −<< . By numerically calculate the area of the signal over 1/2 t << , we got: 0 , 1 aN a r e a == , 1 , 1 bN a r e a , 2 , 1 cN a r e a = = , 2 0 , 1 dN a r e a As N become lager, for case N = ∞ , 2 N n xt e =−∞ = tends to a function x t with 0 1 T = and [] 1 Xk = . From the table we can find that, x t is a unit period impulse ( ( ) ( ) [ ] 1 t δ =↔ = ). Clearly see in plots, as N increases the figure become more like the impulse train and the area within one period should be 1. Code: t = -3:0.01:3; x_Nt = zeros(size(t))+1; N0 = 20; % N0=0,1,2,20 for part a,b,c,d for n = 1:N0; x_Nt = x_Nt+2*cos(2*n*pi*t); end figure(2),subplot(2,1,1),plot(t,x_Nt); num1 = find(t==-1/2);num2 = find(t==1/2); Area = sum((x_Nt(num1:num2-1))*0.01, % Summation should end at num2-1 -3 -2 -1 0 1 2 3 0 0.5 1 1.5 2 t x 0 (t) N=0
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
-3 -2 -1 0 1 2 3 -1 0 1 2 3 t x 1 (t) N=1 -1 0 1 2 3 -2 0 2 4 6 t 2 N=2 -1 0 1 2 3 -20 0 20 40 60 t 20 N=20 Problem 3 (Chapter 8, P. 30) (1) From the first figure in Figure E.30, the signal is even with 00 2, T ω π = = 0 0 0 0 1 [] () T jk t X kx t e d t T = 1 1 1 2 jk t xte d t = 1 1 1 ( )[cos( ) sin( )] 2 x tk t j k t d t ππ =− + 11 1 ()cos ( ) ()s in ( ) 22 even odd j x t d t x t k t d t −− ∫∫ ±²²³ ²² ´± ² ²³ ²²´ So, 1 1 ( ) 0 2 j x t d t = , the harmonic function [ ] X k have a purely real value
Background image of page 4
for every value of k . (2) From the second figure in Figure E.30, the signal is odd with 00 1, 2 T ω π == 0 0 0 0 1 [] () T jk t X kx t e d t T = 1/2 2 1/2 jk t xte d t = 1/2 1/2 1/2 1/2 ( )cos(2 ) ( )sin(2 ) even odd x tk t d t j x t k t d t ππ −− =− ∫∫ ±²²³ ² ² ´± ² ²³ ² ²´ So, 1/2 1/2 ()cos (2 ) 0 x t d t = , the harmonic function X k have a purely imaginary value for every value of k .
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 15

hw5-sol - Homework 5 Problem 1(Chapter 8 P 22 T0 = 2 f 0 =...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online