You are on page 1of 10

Laboratory 8 - Continuous-time

Fourier Transform
Signals and Systems
Department of Computer Engineering
College of Computer and Information Sciences
King Saud University
Student Name:

Student ID:

Instructions

1. Read this document before coming to the laboratory.

2. Print this document and bring it with you to the laboratory.

3. Mobile phones are not allowed.

4. Do not copy paste the code - type it.

5. Use only the front side of the sheets.

Marking Scheme

Task Points Obtained


1 20
2 20
3 20
4 20
5 20
Total 100

1
Laboratory 8 - Continuous-time
Fourier Transform
Contents
8.1 Fourier transform . . . . . . . . . . . . . . . . . . . . . . . . . 3
8.2 Student Task 1 - Inverse Fourier transform . . . . . . . . . . . 4
8.3 Magnitude and phase of the Fourier transform . . . . . . . . . 5
8.4 Student Task 2 - Magnitude and phase . . . . . . . . . . . . . 7
8.5 Properties of the Fourier transform . . . . . . . . . . . . . . . 8
8.5.1 Linearity . . . . . . . . . . . . . . . . . . . . . . . . . . 8
8.5.2 Student Task 3 - Linearity . . . . . . . . . . . . . . . . 8
8.5.3 Time shifting . . . . . . . . . . . . . . . . . . . . . . . 9
8.5.4 Student Task 4 - Time shifting . . . . . . . . . . . . . 9
8.5.5 Convolution and multiplication . . . . . . . . . . . . . 10
8.5.6 Student Task 5 - Convolution and multiplication . . . . 10

2
8.1 Fourier transform
Matlab uses the f ourier function to calculate the Fourier transform. Let
us calculate the Fourier transform of some common signals. The Fourier
transform of x(t) = δ(t) is calculated using the following code

clear all
close all
syms t
x=dirac(t);
f=fourier(x)

This gives the following result

f=1

The Fourier transform of x(t) = e−2t u(t) gives f = 1/(2 + w ∗ 1i) using the
following code.

clear all
close all
syms t w
x=exp(-2*t)*heaviside(t)
f=fourier(x)

The Fourier transform of the periodic signal x(t) = sin(w0 t) is calculated


using the following code

clear all
close all
syms t w w 0
x=sin(w 0 *t)
f=fourier(x)

This gives us the following result

f =-pi*(dirac(t - w) - dirac(t + w))*1i

It is important to understand the results of the f ourier function. The Fourier


transform of x(t) = sin(w0 t) is given by X(jw) = πj [δ(w − w0 ) − δ(w + w0 )].
Compare X(jw) to the result of applying the f ourier function on x(t) =
sin(w0 t).

3
8.2 Student Task 1 - Inverse Fourier transform
Task 1. Matlab uses the if ourier function to calculate the inverse Fourier
transform. Calculate and show the inverse Fourier transform of the common
signals shown in the previous section.

Note:

1. (sign(t) + 1)/2 = heaviside(t).

2. Use the simplif y function after calculating the inverse Fourier trans-
form of X(jw) = πj [δ(w − w0 ) − δ(w + w0 )].

4
8.3 Magnitude and phase of the Fourier transform
The magnitude and phase of the Fourier transform of x(t) = e−2t u(t) can be
calculated and plotted using the following code. subs(f, w)) substitutes w in
f , the result is stored in F .

clear all
close all
syms t w
x=exp(-2*t)*heaviside(t);
f=fourier(x);
w=-2*pi:pi/100:2*pi;
F=subs(f,w);
plot(w,abs(F),'-k','LineWidth',2);
xlabel('\omega')
title(' | F(j\omega) | ')
figure
plot(w,angle(F),'-k','LineWidth',2);
xlabel('\omega')
title('\angleF(j\omega)')

Figure 1 shows the magnitude and Figure 2 shows the phase of the Fourier
transform of x(t) = e−2t u(t).

Figure 1: Fourier Transform - magnitude

5
Figure 2: Fourier Transform - phase

6
8.4 Student Task 2 - Magnitude and phase
Task 2. Calculate and plot the magnitude and phase of the Fourier trans-
form of x(t) = e|t| . Add appropriate labels and title. Write the code, print
and paste the figure here. Comment on your results.

7
8.5 Properties of the Fourier transform
We will now consider some of the important properties of the Fourier trans-
form. You are encouraged to try out the other properties of the Fourier
transform.

8.5.1 Linearity
The linearity property of the Fourier transform is given by Equation 1.
F
ax(t) + by(t) ←−
−→ aX(jw) + bY (jw) (1)

8.5.2 Student Task 3 - Linearity


Task 3. Show that the Fourier transform is linear for a = 2, b = 3,
−t
x(t) = e u(t) and y(t) = et u(−t). This would require the following steps

1. Calculate the left hand side of Equation 1 and take its Fourier trans-
form.

2. Calculate the Fourier transform of x(t) and y(t) separately and then
calculate the right hand side of Equation 1.

For the linearity property to hold, the result of step 1 should be equal to the
result of step 2.

Write the code and result here.

8
8.5.3 Time shifting
The time shifting property of the Fourier transform is given by Equation 2.
F
−→ e−jwt0 X(jw)
x(t − t0 ) ←− (2)
If a signal is shifted in time, the magnitude of the Fourier transform remains
the same and the phase is altered.

8.5.4 Student Task 4 - Time shifting


Task 4. For x(t) = e−2t u(t), calculate and plot the magnitude and phase
of x(t − 3). Compare your results to magnitude and phase of x(t) = e−2t u(t).
Add appropriate labels and title. Write the code, print and paste the figure
here.

9
8.5.5 Convolution and multiplication
The convolution property of the Fourier transform is given by Equation 3.
F
x(t) ∗ y(t) ←−
−→ X(jw)Y (jw) (3)
The convolution property is related to the multiplication property (sometimes
called the modulation property) of the Fourier transform, given by Equation
4, through the duality property.
F
x(t)y(t) ←−
−→ X(jw) ∗ Y (jw) (4)

8.5.6 Student Task 5 - Convolution and multiplication


Task 5. The input - output relationship, y(t) = x(t) ∗ h(t), is viewed in
the Fourier domain as Y (jw) = X(jw)H(jw). Given y(t) = e−3t u(t) and
1
H(jw) = 3+jw , find x(t), the input to the system using Fourier transform
and its properties. Write the code here.

10

You might also like