Digital Signal Processing

download Digital Signal Processing

of 25

  • date post

    13-Jul-2015
  • Category

    Documents

  • view

    94
  • download

    0

Embed Size (px)

Transcript of Digital Signal Processing

1.

x (n) X (e j )

X ( e j ) =

n =

x ( n)e

j n

= ~ (a) x (n) X (e j )

X (e j ) = e j (1 + cos ) X (e j ) X (e j )

(b) (a) x (n)

cos = (e j + e j ) / 2

1 2

e

j n

d = (n)

x ( n) =

1 2

X (e

j

) e j n d

(c) (a) X (e j ) 0 Y (e j )

Y ( e j ) = X ( e j )

Y (e j ) = 0 = ~

Y (e j ) y (n)

2. N x(n), n = 0 N 1 X(k) X(k) =2

N 1 n=0

kn x(n)WN , k = 0 N 1

(1)

WN WN = ej N X(k) x(n)

x(n) =

N 1 1 kn X(k)WN , n = 0 N 1 N k=0

(2)

(a) 8 x(n) X(k) |X(k)| x(n) = [0, 1, 1, 0, 0, 0, 0, 0] (b) Y (k) y(n) Y (k) = [1, 0, 0, 0, 0, 0, 0, 0]

3. h(n) (a) x(n) y(n) * (b) h(n) = [1, 2, 1] x(n) = [1, 3, 2, 4] y(n)

(c) (b) h(n)

(d) H(z) (e) H(ej ) H(ej )

N x( n ), n = 0 ~ N 1 X (k )

X (k ) =

N 1 n =0

kn x( n)WN ,

k = 0 ~ N 1j 2 N

(1)

WN WN = e X (k ) x(n )

x( n ) =

1 N 1 X (k )WN kn , n = 0 ~ N 1 N k =0

(2)

(a)

8 x(n ) X (k ) X (k ) x ( n ) = [1, 0, 0, 0, 1, 0, 0, 0]

(b)

Y (k ) y (n ) Y ( k ) = [1, 1, 1, 1, 1, 1, 1, 1]

3. h(n) (a) x(n) y(n) * (b) h(n) = [1, 3, 1] x(n) = [0, 0, 1, 1, 1, 1, 0, 0] y(n)

(c) H(z) (d) H(ej ) H(ej ) (e)

5. MATLAB x = [1 0 0 0 0]; N = length(x); kn = 0:N-1; WN = exp(-j*2*pi/N); WNkn = WN.^kn; X = zeros(1,N); for k = 0:N-1 for n = 0:N-1 p = mod(k*n,N); X(k+1) = X(k+1)+x(n+1)*WNkn(p+1); end end %(4) %(3) %(2) %(1)

(a) (1) kn (b) (2) (c) (3) (4) (d) MATLAB X

1.

x(n) X (e j )

X ( e j ) =

n =

x ( n )e

jn

= ~ (a) x1 (n) X 1 (e j )

1 0 n 7 x1 (n) = 0 = 0 X 1 (e j 0 ) X 1 (e j ) = 0 ( ) (b) m x2 ( n) = x1 (n m) x2 (n) X 2 (e j ) (a) X 1 (e j )

N x( n ), n = 0 ~ N 1 X (k )

X (k ) =

N 1 n =0

kn x( n)WN ,

k = 0 ~ N 1j 2 N

(1)

W N WN = e X (k ) x(n )

x( n ) =

1 N 1 X (k )WN kn , n = 0 ~ N 1 N k =0

(2)

(a)

8 x(n ) X (k ) X (k )

x( n ) = [0, 0, 1, 0, 0, 0, 0, 0] Y (k ) y (n )

(b)

Y ( k ) = [1, 0, 0, 0, 1, 0, 0, 0](b) y (n ) 1 Hz ## Hz xx y (n ) Hz

(c)

3. h(n) (a) x(n) y(n) * (b) h(n) = [0.25, 0.5, 0.25] x(n) = [1, 1, 1, 1] y(n)

(c) H(z) (d) H(ej ) H(ej )

5. MATLAB N = 3; n = 0:N-1; h = [-0.25 0.5 -0.25]; figure(1) stem(n, h) axis([0 length(n)-1 min(h) max(h)]) xlabel(Time n) ylabel(h(n)) w = -pi:0.01:pi; H = freqz(h,1,w); magH = abs(H); argH = angle(H); figure(2) subplot(2,1,1) plot(w,magH) axis([-pi pi 0 1.5]) xlabel(Frequency \omega [rad]) ylabel(|H(e^{j\omega})|) subplot(2,1,2) plot(w,argH) axis([-pi pi -pi pi]) xlabel(Frequency \omega [rad]) ylabel(\theta [rad]) %(4) %(2) %(3) %(1)

(a) n (b) (1) (2)

(c) (3) (4)

1 0.5 signal x(n) 0 0.5 1 0 1 2 3 time n 4 5 6 7