2-Signal-Analysis Fourier Series Analysis Lecture-02A
2-Signal-Analysis Fourier Series Analysis Lecture-02A
subplot(3,1,3);
stem(f, abs(S)); % x-axis represent frequencies
title(' X[ f] ' );
xlabel(' frequencies (f) ' ); ylabel(' | X(f) | ' );
Continuous Time Fourier Series (CTFS) Analysis
❑ The sample at the Nyquist frequency ( fs/2) mark the boundary between
the positive and negative frequencies.
❑ Note that the complex numbers surrounding the Nyquist index are
complex conjugates and they represent positive and negative
frequencies respectively.
Module Content
Fig. 3 Magnitude response from FFT plotted against - sample index (top)
and computed frequencies (bottom)
Continuous Time Fourier Series (CTFS) Analysis
❑ It can be seen that the frequency axis starts with DC, followed by
positive frequency terms which is in turn followed by the negative
frequency terms.
DC → positive frequencies → negative frequencies
Module Content
Module Content
❑ When N is odd, the ordered frequency axis should be set as
Continuous Time Fourier Series (CTFS) Analysis
%for odd N see equation above
S1 = [(S(N/2+1:N)) S(1:N/2)]; % Method-1 order frequencies without using fftShift
S2 = fftshift(S); % Method-2 order frequencies by using fftshift
df = fs/N; % frequency resolution
subplot(2,1,2);
stem(f, abs(S1));
stem(f, abs(S2), ' r' )
xlabel(' frequencies (f) ' ); ylabel('|X(f)|' ); % frequencies on x-axis
Continuous Time Fourier Series (CTFS) Analysis
❑ Magnitude response of FFT result after applying FFTShift : plotted
against sample index (Fig. 5a) and against computed frequencies
(Fig. 5b).
Fig. 5a
Module Content
Fig. 5b
Continuous Time Fourier Series (CTFS) Analysis
❑ Fig. 1b representation forms the basis of the
representation of periodic waveforms in the frequency
domain or loosely referred to as the spectrum of the
signal or its spectral behaviour.
Periodic Signals Spectra
❑ Assume a periodic function v(t) with a fundamental period To
expressed in general as:Module Content
❑ The integral of Eq. (5) to (7) are also referred to as the Euler
formulae for the coefficients of v(t).
❑ It is also worth mentioning that the interval of integration above
i.e, 𝑻𝟎 Τ𝟐 may be replaced by any interval of length T, 𝟎 ≤ 𝒕 ≤ 𝑻
❑ Another form of representation of CTFS is given by :-
𝟐𝝅𝒏𝒕
𝒗 𝒕 = 𝑪𝟎 + σ∞
𝒏=𝟏 𝑪𝒏 𝒄𝒐𝒔( − 𝚽) (8)
𝑻𝟎
Continous Time Fourier Series (CTFS) Analysis
❑ Where Co= ao
𝑪𝒏 = 𝒂𝟐𝒏 + 𝒃𝟐𝒏 (9)
𝒃𝒏
𝚽𝒏 = tan−𝟏 (10)
𝒂𝒏
❑ The integral Eq. (5) to (7) are also referred to as the Euler
formulae for the coefficients of v(t).
Continous Time Fourier Series (CTFS) Analysis
❑ From Eq. (4), we note that v(t) is made up of a d.c. term Co=ao,
and sinusoids at frequencies ranging from the fundamental,
i.e. n = 1, i.e. at ωo, to infinity, i.e. an infinite number of
harmonics of the fundamental frequency. The amplitudes are
determined by Eq. (9) A sketch of these spectral components
is shown below.
Module Content
T/2 Content
Module T
t
B
Continous Time Fourier Series (CTFS) Analysis
❑ E.g-1 solution
s(t)
V
T/2 T
t
𝑽 𝟎 ≤ 𝒕 ≤ 𝑻Τ𝟐 𝟏 𝟎≤𝒕≤𝟏
𝒔(𝒕) = ൝ =ቊ
−𝑽 𝑻Τ𝟐 ≤ 𝒕 ≤ 𝑻 −𝟏 𝟏≤𝒕≤𝟐
❑ The Fourier coefficient an and bn are calculated using Eqs. (5) and (7)
𝑻 𝟐
𝒂𝒏 = න 𝒔 𝒕 𝒄𝒐𝒔 𝒏𝝎𝒕 𝒅𝒕 = න 𝒔 𝒕 𝐜𝐨𝐬 𝒏𝝅𝒕 𝒅𝒕
𝟎 𝟎
𝟏 𝟐 𝟏 𝟐
𝟏 𝟏
= න 𝐜𝐨𝐬 𝒏𝝅𝒕 𝒅𝒕 − න 𝒄𝒐𝒔 𝒏𝝅𝒕 𝒅𝒕 = . 𝐬𝐢𝐧 𝒏𝝅𝒕 − . 𝐬𝒊𝒏 𝒏𝝅𝒕 =𝟎
𝟎 𝟏 𝒏𝝅 𝟎
𝒏𝝅 𝟏
Continous Time Fourier Series (CTFS) Analysis
❑ E.g-3. Find the CTFS of the half-wave rectified sinusoid.
s(t) sin(t)
1
T/2 T
t
❑ This waveform is an odd function, which means that a0=0, and an=0 .
The period, T is 2 and the waveform over one period is given by
𝑽 𝟎 ≤ 𝒕 ≤ 𝑻Τ𝟐 𝟏 𝟎≤𝒕≤𝟏
𝒔(𝒕) = ൝ =ቊ
−𝑽 𝑻Τ𝟐 ≤ 𝒕 ≤ 𝑻 −𝟏 𝟏≤𝒕≤𝟐
Continous Time Fourier Series (CTFS) Analysis
❑ The Fourier coefficient an and bn are calculated using Eqs. (5) and (7)
𝑻 𝟐
𝒂𝒏 = න 𝒔 𝒕 𝒄𝒐𝒔 𝒏𝝎𝒕 𝒅𝒕 = න 𝒔 𝒕 𝐜𝐨𝐬 𝒏𝝅𝒕 𝒅𝒕
𝟎 𝟎
𝟏 𝟐 𝟏 𝟐
𝟏 𝟏
= න 𝐜𝐨𝐬 𝒏𝝅𝒕 𝒅𝒕 − න 𝒄𝒐𝒔 𝒏𝝅𝒕 𝒅𝒕 = . 𝐬𝐢𝐧 𝒏𝝅𝒕 − . 𝐬𝒊𝒏 𝒏𝝅𝒕 =𝟎
𝟎 𝟏 𝒏𝝅 𝟎
𝒏𝝅 𝟏
𝟏 𝟏 𝟐
𝑩𝒏 = 𝒏𝝅 𝟏 − 𝐜𝐨𝐬(𝒏𝝅) + 𝒏𝝅 𝒄𝒐𝒔(𝟐𝒏𝝅) − 𝐜𝐨𝐬(𝒏𝝅) = 𝒏𝝅 (𝟏 − 𝒄𝒐𝒔 𝒏𝝅 )
Continous Time Fourier Series (CTFS) Analysis
❑ For even values of n the B coefficient are all zeros. Therefore the
trigonometric CTFS representation of the square waveform is
∞
𝟐
𝒔(𝒕) = 𝟏 − 𝒄𝒐𝒔 𝒏𝝅 . 𝐬𝒊𝒏 𝒏𝝅𝒕
𝒏𝝅
𝒏=𝟏
𝟒
𝒔 𝒕 = 𝐬𝐢 𝐧 𝝅𝒕 (Fundamental)
𝝅
+𝟎 (Second harmonic)
𝟒
+ Module Content
𝒔𝒊𝒏(𝟑𝝅𝒕) (third harmonic)
𝟑𝝅
E.g-2 solution
f(t)
A (0,V) V
B (T/2,-V)
❑ The periodic interval [t0, t0 + T] can be chosen rather than [0, T]. For
this example, because of the form of f(t), it is convenient to choose
periodic interval to be [- T /2, T /2].
𝟐 𝟐
𝑻 Module Content
𝟐𝝅𝒏𝒕
𝒂𝒏 = 𝒇 𝒕 𝒄𝒐𝒔( ) 𝒅𝒕
𝑻𝟎 −𝑻 𝑻
𝟐
❑ Since both f(t) and cos(𝟐𝝅𝒏𝒕/T) are even functions, the interval must
have the same value between -T/2 to 0 and between 0 and T/2. As
such, an can be rewritten as;
𝑻
𝟒 𝟐 𝟐𝝅𝒏𝒕
𝒂𝒏 = 𝒇 𝒕 𝒄𝒐𝒔( ) 𝒅𝒕
𝑻 𝟎 𝑻 X1,y1 X2,y2
❑ Determine the equation of the line between A (0,V) and B(T/2,-V),
𝟒𝑽 𝟒𝑽 𝑻
𝒇 𝒕 =− 𝒕 +𝑽=− (𝒕 − )
𝑻 𝑻 𝟒
Continous Time Fourier Series (CTFS) Analysis
❑ -4V/T is the slope of the line for the interval 𝟎 ≤ 𝒕 ≤ 𝑻Τ𝟐 , therefore,
𝑻
𝟒 𝟐 𝟒𝑽 𝑻 𝟐𝝅𝒏𝒕
𝒂𝒏 = −𝑻 𝒕− . 𝒄𝒐𝒔( ) 𝒅𝒕
𝑻 𝟎 𝟒 𝑻
𝑻 𝑻
𝟏𝟔𝑽 𝟐𝝅𝒏𝒕 𝟒𝑽 𝟐𝝅𝒏𝒕
𝒂𝒏 = − 𝟐 𝒕 𝟐𝟎. 𝒄𝒐𝒔( ) 𝒅𝒕 + (𝒔𝒐𝒄 𝟐𝟎 ) 𝒅𝒕
𝑻 𝑻 𝑻 𝑻
𝟏𝟔𝑽 𝑻𝟐 𝑻𝟐 𝟐𝑽
𝒂𝒏 = − 𝟐 𝒄𝒐𝒔 𝒏𝝅 − 𝟏 + 𝒔𝒊𝒏 𝒏𝝅 + 𝒔𝒊𝒏 𝒏𝝅
𝑻 𝟒𝒏𝟐 𝝅𝟐 𝟒𝒏𝝅 𝝅𝒏
Continous Time Fourier Series (CTFS) Analysis
❑ Hence, 𝒔𝒊𝒏 𝒏𝝅 = 𝟎 for all n and 𝒄𝒐𝒔 𝒏𝝅 = 𝟏 for n = even integer
number and -1 for n = odd integer number. Thus
∞
𝟖𝑽 𝟐𝝅𝒏𝒕
𝒇 𝒕 = 𝟐 𝟐 . 𝒄𝒐𝒔
𝒏 𝝅 𝑻
𝒏=𝒐𝒅𝒅
Module Content
E.g-3 Solution
s(t) sin(t)
1
t
❑ The function s(t) can be represented over one period given as:
𝒔𝒊𝒏(𝒕) 𝟎 ≤ 𝒕 ≤ 𝝅
𝒔(𝒕) = ቊ
𝟎 𝝅 ≤ 𝒕 ≤ 𝟐𝝅
Continous Time Fourier Series (CTFS) Analysis
❑ Since there is no half-wave symmetry, a DC value exist. Therefore
𝟏 𝑻 𝟏 𝝅 𝟏 𝟐𝝅
𝒂𝟎 = 𝒕𝒅 𝒕 𝒏𝒊𝒔 𝟎 = 𝒕𝒅 𝒕 𝒔 𝟎+ = 𝒕𝒅 𝟎 𝟎
𝑻 𝟐𝝅 𝟐𝝅
𝟏 𝝅 𝟏 𝟏
𝒂𝟎 = −𝒄𝒐𝒔 𝒕 𝟎 = 𝟏+𝟏 =
𝟐𝝅 𝟐𝝅 𝝅
❑ It can be seen that the function is neither an odd nor even symmetry.
Therefore, the values of an and bn must be determine. The CTFS
representation of a periodic signal is given by
Module Content
s 𝒕 = 𝒂𝟎 + σ∞
𝒏=𝟏 𝒂𝒏 𝒄𝒐𝒔(𝒏𝝎𝟎 𝒕) + 𝒃𝒏 𝒔𝒊𝒏(𝒏𝝎𝟎 𝒕)
𝟐 𝑻
𝒂𝒏 = 𝒕 𝒔 𝟎. 𝒄𝒐𝒔(𝒏𝝎𝟎 𝒕) 𝒅𝒕
𝑻
𝟐 𝑻
𝒃𝒏 = 𝒕 𝒔 𝟎. 𝒔𝒊𝒏(𝒏𝝎𝟎 𝒕) 𝒅𝒕
𝑻
𝟐 𝑻
𝒃𝒏 = 𝒏𝒊𝒔 𝒕 . 𝒔𝒊𝒏 𝒏𝒕 𝒅𝒕 𝝎𝟎 = 𝟏
𝟐𝝅 𝟎
𝒈 𝟏 = 𝝅 𝒄𝒐𝒔 𝝅 − 𝝅 = 𝝅 and
𝟏 𝟏
𝒃𝟏 = 𝝅 =
𝟐𝝅 𝟐Module Content
❑ n = 1, yield
𝟏 𝟏 𝟏 𝟏 𝟏
𝒂𝟏 = − + −( + )
𝟐𝝅 𝟐 𝟎 𝟐 𝟎
❑ The two indeterminate terms are both equal to zero by L ’Hospital’s
rule, giving 𝒂𝟏 =0 Module Content
❑ n = 2, yield
𝟏 𝟏 𝟏 𝟐
𝒂𝟐 = − − +𝟏− +𝟏 =−
𝟐𝝅 𝟑 𝟑 𝟑𝝅
❑ n = 3, yield
𝟏 𝟏 𝟏 𝟏 𝟏
𝒂𝟑 = − − − + =𝟎
𝟐𝝅 𝟒 𝟑 𝟒 𝟑
Continous Time Fourier Series (CTFS) Analysis
❑ Continue with integer values of n>0, it can be observed that for all
odd harmonics (n = 1, 3, 5,..) 𝒂𝒏 is zero, and all even harmonics (n = 2,
4, 6,..)
𝟏 𝟏 𝟏 𝟏 𝟏
𝒂𝒏 = − − − − −
𝟐𝝅 𝟏 + 𝒏 𝟏 − 𝒏 𝟏 + 𝒏 𝟏 − 𝒏
𝟏 𝟐 𝟐 𝟏 𝟐 𝟐 𝟐 𝟏
𝒂𝒏 = − − − = Content +
Module
=
𝟐𝝅 𝟏 + 𝒏 𝟏 − 𝒏 𝟐𝝅 𝟏 + 𝒏 𝟏 − 𝒏 𝝅 (𝟏 − 𝒏𝟐 )
𝟏 𝟏 𝟐 𝟏
s 𝒕 = + 𝒔𝒊𝒏 𝒕 + σ∞
𝒏=𝟐,𝟒,𝟔,… 𝒄𝒐𝒔 𝒏𝒕
𝝅 𝟐 𝝅 𝟏−𝒏𝟐
Assignment 1
❑ Determine the CTFS series of the waveforms shown in Fig. 1a
& b and sketch their spectra up to the fifth harmonic in the
range -2π≤t≤2π. Plot their time function on the same graph
using :
a) The first two terms only of the Fourier series
b) The first three terms only of the series
c) The first four terms only of the series.
d) Comment on the Moduleeffect Content
of these truncations on how
accurately the Fourier series expansion approximates the
original time function.
Fig. 1a Fig. 1b
Assignment Submission Mode and Deadline
Submission Mode
Module Content
Submission Deadline
❑ One week from date of discussion.
THANK YOU