Sequence or Continuous Time Signal. Inverse Discrete Fourier Transform (IDFT) Is Given As

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Experiment 6: Determination of Inverse Discrete Fourier Transform(IDFT)

Aim: To determine Inverse Discrete Fourier Transform(IDFT) of given DFT samples to obtain orignal
sequence or continuous time signal.

Inverse Discrete Fourier Transform(IDFT) is given as:

where

IDFT for a given sequence:

xk=input('Enter the sequence:? ')

xk =
10.0000 + 0.0000i -2.0000 + 2.0000i -2.0000 + 0.0000i -2.0000 - 2.0000i

N=length(xk);
n=0:1:N-1;
k=[0:1:N-1];
nk=n'*k;
WN=exp(j*2*pi/N);
WNnk=WN.^nk;
xn=(1/N)*xk*WNnk

xn =
1.0000 + 0.0000i 2.0000 + 0.0000i 3.0000 - 0.0000i 4.0000 - 0.0000i

IDFT for a continuous time signal:

f=input('Signal frequency:? ')

f = 50

fs=input('Sampling frequency:? ')

fs = 1000

t=0:1/fs:40e-03;
xn=10*sin(2*pi*f*t);
N=length(xn);
n=0:1:N-1;
k=[0:1:N-1];
nk=n'*k;
WN=exp(-j*2*pi/N);
WNnk=WN.^nk;
xk=xn*WNnk;
f=k*(1/N)*fs;
figure;
stem(f,abs(xk));
xlabel('Frequency');
ylabel('Magnitude');
 
N=length(xk);
n=0:1:N-1;
k=[0:1:N-1];
nk=n'*k;
WN=exp(j*2*pi/N);
WNnk=WN.^nk;
xn=(1/N)*xk*WNnk;
figure;
stem(n,real(xn));
xlabel('Digital Frequency');
ylabel('Amplitude');
Using IFFT function:

y=ifft([10 (-2+2j) -2 (-2-2j)]) %DFT samples given as input

y =
1 2 3 4

y=ifft(xk); %DFT samples of continuous time signal


figure;
stem(n,real(xn));
xlabel('Digital Frequency');
ylabel('Amplitude');
Result: The Inverse Discrete Fourier Transform(IDFT) is found for given DFT samples to obtain
sequence or continuous time signal.

You might also like