It is possible to express the spectrum X[w] directly in terms of its

advertisement
It is possible to express the spectrum X[w] directly in terms of its samples, X 2k / N 
where k = 0,1,2,…….,(N-1). In order to derive the interpolation formula from X[w] we
assume that N >= L (no aliasing).
Since x[n] = xp[n] for 0 <= n<= (N-1)
x[n] 
1
N
N 1
 2  j 2kn / N
k e

 X  N
k 0
,0  n  N  1
If we now use equation (1) and substitute for x[n] we obtain:
N 1
1
X w   
n 0  N
 2  j 2kn / N   jwn
k e
e


N 1
 X  N
k 0
N 1
 2
X w   X 
N
k 0
 1
k 
 N
N 1
e
 j  w 2k / N n
n 0



The term in the brackets represent the basic interpolation function shifted by
(8)
2k
in
N
frequency.
Pw 
1
N
N 1
e
 jwn
n 0

1 1  e  jwN
N 1  e  jw

sin wN / 2   jw( N 1) / 2
e
N sin( w / 2)
N 1
 2
X w   X 
N
k 0
2
 
k  P w 
N
 

k

The interpolation function P[w] is not merely a
(9)
sin 
but instead it is a periodic

counterpart of it.
The function
sin wN / 2
for N = 5 is graphed below:
N sin( w / 2)
X[w]
1.0
w

-
The function P[w] has the property
 2
P
N
k 0
k  1,2,........, N  1
 1
k  
 0
Hence equation (9) which is the interpolation formula gives exactly the same values
2
 2 
k.
X  k  for w 
N
N 
Example:
Consider the signal xn  a n u[n]
0  a  1.
2
k where k = 0,1,..., (N-1)
N
Determine the reconstructed spectra for a = 0.8 when N=5 and N=50.
The spectrum of this signal is sampled at frequencies wk 
Sol:
The Fourier transform of x[n] is

X [ w]   a n e  jwn 
n 0
1
1  ae  jw
when evaluated at a =0.8 at the N frequencies:
 2
X
N

k 

1
1  0.8  e
 jw
2
k
N
 2
The periodic sequence xp[n] corresponding to frequency samples X 
N
0,1,…..,(N-1) is obtained using equation (7)
Plots for x[n] with N=5 and N=50 are as shown below:

k , k =

clear all
clc
%------------------------------------%This is a frequency sampling program
%Written by E.A.Ince
%Date: 09/04/2000
%------------------------------------%forst generate and plot original sequence
for n=1:50
x(1,n)=(0.8)^n;
end
n=1:50;
stem(n,x)
axis([0 50 0 1])
title('Original Sequence')
% Generate the Fourier Transform of x[n] and plot it i.e plot x[w]
g=linspace(0,2*pi,50);
for i=1:50
X(i)=1/(1-(0.8)*exp(-sqrt(-1)*g(1,i)));
end
figure(2)
plot(g,abs(X))
title('Magnitude of spectrum X[w]')
grid on
%Determine the xp[n] and reconstructed spectra for N=5,50
N=input('Input a value for N:');
for i=1:N
sum=0;
for k=1:N
sum=sum+1/(1-(0.8)*exp(-sqrt(-1)*2*pi*(k-1)/N))*exp(sqrt(-1)*2*pi*(k-1)*(i1)/N);
end
xx(i)=(1/N)*real(sum);
end
time=0:49;
if N<50
xp=zeros(1,50);
xp(1,1:N)=xx;
else
xp=xx;
end
figure(3)
stem(time,xp)
title(['xp[n] for N=',num2str(N)])
%----------------------------------------------------%Determine the spectrum of xp[n] for selected N value
for k=1:N
trsum=0;
for n=1:N
trsum=trsum+xp(1,n)*exp(-sqrt(-1)*2*pi*(k-1)*(n-1)/N);
end
trans(1,k)=trsum;
end
kk=0:N-1;
figure(4)
stem(kk,abs(trans),'r')
title(['Spectrum of xp[n] with N=',num2str(N)])
ylabel('Transform')
xlabel('time-index-k')
Download