Lab 2 - Fourier Series
Lab 2 - Fourier Series
1.
NAME OF GROUP
MEMBER(S) & 2.
MATRIX NUMBER(S)
3.
COURSE BEEZ
DATE
TOTAL MARKS
1.0 OBJECTIVES
1. To show that any periodic function (or signal) can be represented as a series of
sinusoidal (or complex exponentials) function.
2. To approximate periodic functions using a finite number of sinusoidal function and
run the simulation using MATLAB.
2.0 EQUIPMENT
1. MATLAB® software.
+∞ +∞
jk ω0 t
x(t )= ∑ a k e = ∑ ak e
jk(2π /T )t
k=−∞ k=−∞
jω 0 t jω 0 t jω0 t jω0 t
x ( t )=a−2 e +a−1 e +a 0 + a1 e + a2 e
Example (Demo)
A periodic signal, x(t) has a fundamental frequency of 2. The signal is expressed as:
3
x (t )= ∑ a k e jk 2 π t
k=−3
Given:
1 1 1
a 0=1 , a−1=a 1= , a−2=a 2= , a−3=a 3=
4 2 3
Therefore,
The signal can be simplified in terms of trigonometric function. Using Euler’s formula;
1 2
x (t )=1+ cos 2 πt+ cos 4 πt + cos 6 πt
2 3
Run the demonstration Matlab script (filename: fourier_series_demo.mlx) to display the signal
and its harmonics.
2
4.0 PROCEDURE
TASK 1:
{
Wave form Fourier Coefficients
Half-rectified sine wave:
A
2
k =0 ,±2 ,±4 ,…
π (1−k )
ak= jA
∓ k =±1
4
0 others
Table 1
Listing 1:
3
TASK 2:
1. Change ak (in previous Listing 1) with the formula given in the Table 2, then
run the program. Pay attention to other instructions that must also be changed.
2. Discussed your result. (Answer question 7.0)
Waveform 1:
{
2A
k =even
a k = π ( 1−k 2 )
0 k=odd
Waveform 2:
{
4A
k=odd
ak = π2 k2
0 k=even
4
7.0 QUESTIONS & DISCUSSION
2. From Task 1, the output will show the half-rectified sine wave. Please identify the
waveforms from Task 2.
(a) Waveform 1
(b) Waveform 2
5
4. Discussed your result in Task 2.
8.0 CONCLUSION