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

LAB-7

BAHRIA UNIVERSITY KARACHI CAMPUS


Department of Electrical Engineering

SIGNALS & SYSTEMS

LAB EXPERIMENT # 7

Properties of Fourier Transform


OBJECTIVES:
 To verify properties of Fourier Transform

TOOLS:

 MATLAB 2018 or higher version

THEORY:
The Fourier Transform is a tool that breaks a waveform (a function or signal) into an alternate
representation, characterized by the sine and cosine functions of varying frequencies. The Fourier
Transform shows that any waveform can be re-written as the sum of sinusoidal.

In this Lab we will verify following properties of Fourier Transform:

Linearity property
Addition of two functions corresponding to the addition of the two frequency spectrum is called
linearity. If we multiply a function by a constant, the Fourier transform of the resultant function is
multiplied by the same constant. The Fourier transform of sum of two or more functions is the sum of
the Fourier transforms of the functions.

𝐹.𝑇
𝑎𝑥(𝑡) + 𝑏𝑦(𝑡) ↔ 𝑎𝑋(𝑤) + 𝑏𝑌(𝑤) Eq 7.1

Time shifting property


The time variable shift also effects the frequency function. The time shifting property concludes that
a linear displacement in the time corresponds to a linear phase factor in the frequency domain.

29
LAB-7

𝐹.𝑇
𝑥(𝑡 − 𝑡0 ) ↔ 𝑒 −𝑗𝑤𝑡𝑜 𝑋(𝑤) Eq 7.2

Scaling Property
Scaling is the method that is used to change the range of the independent variables or features of data.
If we stretch a function by a factor in time domain, then it means that we compress the Fourier
Transform by the same factor in the frequency domain.
𝐹.𝑇 1 𝑤
𝑥(𝑎𝑡) ↔ |𝑎|
𝑋( ) Eq 7.3
𝑎

Differentiation property

Differentiation function with respect to time yields to the constant multiple of the original function.

𝑑𝑥(𝑡) 𝐹.𝑇
↔ 𝑗𝑤. 𝑋(𝑤) Eq 7.4
𝑑𝑡

Convolution property
The Fourier Transform of a convolution of two functions is the point-wise product of their respective
Fourier transforms.
𝐹.𝑇
ℎ(𝑡) ∗ 𝑥(𝑡) ↔ 𝐻(𝑤). 𝑋(𝑤) Eq 7.5

Duality Property

The Duality Property tells us that if x(t) has a Fourier Transform X(ω), then if we form a new function
of time that has the functional form of the transform, X(t), it will have a Fourier Transform x(ω) that
has the functional form of the original time function (but is a function of frequency).

PROCEDURE:-
Program-1
Linearity Property
%Plot first Sin signal
fs=100;
t=0:1/fs:5;
y=sin(2*pi*3*t);
plot(t,y)

30
LAB-7

%Plot second Sin signal


y1 =sin(2*pi*5*t);
figure
plot(t,y1)
a=2;
b=3;

%Takes Fourier Transform of Left side of Linearity Property


left=a.*y+b.*y1;
figure
plot(t,left)
Y=fft(left);
n1 = length(Y);
f1 = (0:(n1-1))*100/n1;
plot(f1,abs(Y))
fshift1 = (-n1/2:n1/2-1)*(100/n1);
yshift1 = fftshift(Y);
figure
plot(fshift1,abs(yshift1))

%Takes Fourier Transform of first Sin signal

s3=fft(y);
n2 = length(s3);
f2 = (0:(n2-1))*100/n2;
plot(f2,abs(s3))
fshift2 = (-n2/2:n2/2-1)*(100/n2);
yshift2 = fftshift(s3);
figure
plot(fshift2,abs(yshift2))

%Computes Right side of Linearity property and compare both right


and left side to prove the property
s5=fft(y1);
n3 = length(s5);
f3 = (0:(n3-1))*100/n3;
plot(f3,abs(s5))
fshift3 = (-n3/2:n3/2-1)*(100/n3);
yshift3 = fftshift(s5);
figure
plot(fshift3,abs(yshift3))

right=(a.*abs(yshift2))+(b.*abs(yshift3));
figure
plot(fshift2, right)

31
LAB-7

Program-2
Convolution Property

%Plot square signal


fs=100;
t=0:1/fs:1;
y=square(2*pi*3*t);
plot(t,y)

%Plot Sawtooth signal


fs=100;
t=0:1/fs:1;
z=sawtooth(2*pi*3*t);
figure
plot(t,z)

%Convolution of two signals in time domain


a=conv(y,z);
t1=0:1/fs:2;
figure
plot(t1,a)

%Fourier Transform of the convoluted signal


A=fft(a);
na = length(A);
fa = (0:(na-1))*100/na;
plot(fa,abs(A))
title('Magnitude')
fshifta = (-na/2:na/2-1)*(100/na);
yshifta = fftshift(A);
figure
plot(fshifta,abs(yshifta))

%Fourier Transform of the square signal


Y=fft(y);
n2 = length(Y);
f2 = (0:(n2-1))*100/n2;
figure
plot(f2,abs(Y))
fshift2= (-n2/2:n2/2-1)*(100/n2);
yshift2= fftshift(Y);
figure
plot(fshift2,abs(yshift2))

32
LAB-7

%Fourier Transform of the sawtooth signal


Z=fft(z);
n3 = length(Z);
figure
f3 = (0:(n3-1))*100/n3;
plot(f3,abs(Z))
fshift3= (-n3/2:n3/2-1)*(100/n3);
yshift3= fftshift(Z);
figure
plot(fshift3,abs(yshift3))

%Multiplication of the Fourier domain signals


MF=Y.*Z;
figure
n4 = length(MF);
figure
f4 = (0:(n4-1))*100/n3;
plot(f4,abs(MF))
fshift4= (-n4/2:n4/2-1)*(100/n4);
yshift4= fftshift(MF);
figure
plot(fshift4,abs(yshift4))

Program-3
Duality Property

%Plot Rectangular pulse signal


fs = 100;
t = -2:1/fs:2;
x = rectpuls(t,1);
figure;
plot(t,x);

xlabel('Time (sec)');
ylabel('Amplitude');

%Takes Fourier Transform of Rectangular Pulse


y=fft(x);
n=length(y);
f=(0:n-1)*(fs/n);
figure;
plot(f,abs(y));

33
LAB-7

fshift=(-n/2:n/2-1)*(fs/n);
yshift=fftshift(y);
figure;
plot(fshift,abs(yshift));
xlabel('Frequency');
ylabel('Amplitude');

%Plot sinc signal


t = linspace(-5,5);
y = sinc(t);
plot(t,y);
xlabel('Time (sec)');
ylabel('Amplitude');

%Takes Fourier Transform of Sinc Signal


z=fft(y);
n=length(z);
f=(0:n-1)*(fs/n);
figure;
plot(f,abs(z));
fshift=(-n/2:n/2-1)*(fs/n);
zshift=fftshift(z);
figure;
plot(fshift,abs(zshift));
xlabel('Frequency');
ylabel('Amplitude');

QUESTIONS:
1. Verify the following properties of Fourier Transform by writing code in MATLAB:

Time Shifting

Time Scaling

Differentiation

Note: Plot the signals at each step.

34
LAB-7

2. Verify the following Modulation property by writing code in MATLAB.

𝐹.𝑇 1
𝑥(𝑡) 𝑐𝑜𝑠𝑤𝑜 𝑡 ↔ [𝑋(𝑤 − 𝑤0 ) + 𝑋(𝑤 + 𝑤0 )]
2

35

You might also like