fourier series
fourier series
Mechatronics Department
Signal representations
● Every continuous function in the function space can be represented as a linear combination of some basis
functions
𝑥 𝑡 = 𝑋𝑘 𝜑𝑘 (𝑡)
Fourier Basis
● For the periodical signals the Fourier basis
𝜑𝑘 𝑡 = 𝑒 𝑗𝑘Ω𝑜 𝑡
− Frequency Ω𝑜 = 2𝜋𝑓𝑜 = 2𝜋/𝑇𝑜
● 𝜑𝑘 are an ortho-normal set
𝑒 𝑗 𝑘−𝑙 2𝜋 − 1
= 𝑒𝑗 𝑘−𝑙 2𝜋
𝑗 𝑘 − 𝑙 2𝜋
0 𝑘≠𝑙
=ቊ
1 𝑘=𝑙
Example
● Let
● Eulers identity
● Rearrange
● or
Example
● Let
𝑥 𝑡 = 2 + 4 cos 4𝑡 + 6 sin 6𝑡 + 8 cos 10𝑡
● Find 𝑋2 , 𝑋−3 , 𝑋4
2𝜋 𝜋 2𝜋 𝜋 2𝜋 𝜋
𝑇1 = = , 𝑇2 = = , 𝑇3 = =
4 2 6 3 10 5
● Periodicity
𝑚𝑇1 = 𝑘𝑇2 = 𝑙𝑇3
3
𝑥 𝑡 = 2 + 2 𝑒 𝑗4𝑡 + 𝑒 −𝑗4𝑡 + (𝑒 𝑗6𝑡 − 𝑒 −𝑗6𝑡 ) + 4(𝑒 𝑗10𝑡 + 𝑒 −𝑗10𝑡 )
𝑗
𝑋2 = 2,
𝑋−3 = 3𝑗,
𝑋4 = 0
𝑥 𝑡 = 𝑋𝑘 𝑒 𝑗Ω𝑜 𝑘𝑡
𝑘=−∞
1 𝑡𝑜+𝑇𝑜
𝑋𝑘 = න 𝑥(𝑡)𝑒 −𝑗𝑘Ω𝑜𝑡 𝑑𝑡
𝑇𝑜 𝑡𝑜
Example
𝑥(𝑡)
● Fourier series representation of
A
− Ω𝑜 =?
𝑇𝑜 /2
1 𝜏 𝜏 𝜏 𝜏
𝑋𝑘 = න 𝑥(𝑡)𝑒 −𝑗𝑘Ω𝑜 𝑡 𝑑𝑡 − 𝑇𝑜 − − 𝑇𝑜 −
𝑇𝑜 2 2 2 2
−𝑇𝑜 /2
𝜏/2 𝜏/2
1 𝐴 𝑗𝑘2𝜋𝑡
න 𝐴𝑒 −𝑗𝑘2𝜋𝑡/𝑇𝑜 𝑑𝑡 =
− ቚ
𝑋𝑘 = 𝑒 𝑇𝑜 𝑡=−𝜏
𝑇𝑜 −𝑗2𝜋𝑘 2
−𝜏/2 𝑗𝑘𝜋𝜏 𝑗𝑘𝜋𝜏
−
𝐴 𝑒 𝑇𝑜 −𝑒 𝑇𝑜 sin 𝑥
𝐴 → 𝑠𝑖𝑛𝑐 𝑥 =
𝑋𝑘 = 𝑒𝑗𝑘𝜋𝜏/𝑇𝑜 − 𝑒 −𝑗𝑘𝜋𝜏/𝑇𝑜 𝜋𝑘 𝑗2 𝑥
𝑗2𝜋𝑘
𝜏/𝑇𝑜 1
𝑋𝑘 = 𝐴 sin 𝑘𝜋𝜏/𝑇𝑜
𝜏/𝑇𝑜 𝑘𝜋
𝜏 𝜏
𝑋𝑘 ≝ 𝐴 𝑠𝑖𝑛𝑐(𝑘 )
𝑇𝑜 𝑇𝑜
● The periodic signals in Fourier series representation are the infinite sum of eigen functions 𝑒 𝑗Ω𝑜 𝑘𝑡 , i.e.,
𝑥 𝑡 = 𝑋𝑘 𝑒 𝑗Ω𝑜 𝑘𝑡
𝑘=−∞
● Using the LTI eigenfunction property, response to periodical inputs represented by fourier series
∞ ∞
𝑌𝑘 = 𝑋𝑘 𝐻(𝑗Ω𝑜 𝑘)
1 𝑡
𝑦 𝑡 = න 𝑥 𝑎 𝑑𝑎
𝑇 𝑡−𝑇
using
b) Impulse response
a) LTI? Yes
b) h(t) or H(s)?
b) impulse response
1 𝑡 1 𝑡 1 𝑡−𝑇
𝑦 𝑡 = න 𝑥 𝑎 𝑑𝑎 = න 𝜹 𝑎 𝑑𝑎 − න 𝜹 𝑎 𝑑𝑎
𝑇 𝑡−𝑇 𝑇 −∞ 𝑇 −∞
𝑢 𝑡 −𝑢 𝑡−𝑇
ℎ 𝑡 =
𝑇
1 1 − 𝑒 −𝑠𝑇
𝐻 𝑠 =
𝑇 𝑠
1 − 𝑒 −𝑗Ω𝑜 𝑘𝑇
𝑌𝑘 = 𝑋𝑘
𝑗Ω𝑜 𝑘𝑇
𝑏𝑛
𝜃𝑛 = atan
𝑎𝑛
1 1 0 1 1
𝑋𝑛 = න 𝑥 𝑡 𝑒 −𝑗𝑛Ω𝑜𝑡 𝑑𝑡 = න −𝐾 𝑒 −𝑗𝑛𝜋 𝑡 𝑑𝑡 + න 𝐾𝑒 −𝑗𝑛𝜋 𝑡 𝑑𝑡
𝑇𝑜 <𝑇𝑜> 2 −1 2 0
1 𝐾 0,0 1 𝐾
= ⋅ ⋅ 𝑒 −𝑗𝑛𝜋 𝑡 ቚ = ⋅ ⋅ 1 + 1 − 𝑒 −𝑗𝑛𝜋 + 𝑒 𝑗𝑛𝜋
2 𝑗𝑛𝜋 𝑡=−1,1 2 𝑗𝑛𝜋
𝐾 𝐾 𝑛
= ⋅ 1 − cos 𝑛𝜋 = ⋅ 1 − −1 , 𝑛 = 0, ±1, ±2, …
𝑗𝑛𝜋 𝑗𝑛𝜋
𝑇𝑜 = 2
2𝜋
Ω𝑜 = =𝜋 2𝐾 −𝑗𝑠𝑖𝑔𝑛(𝑛)𝜋/2
𝑇𝑜
𝑋𝑛 = ቐ 𝑛𝜋 𝑒 , 𝑛 = 𝑜𝑑𝑑
0, 𝑛 = 𝑒𝑣𝑒𝑛
2𝐾 −𝑗𝑠𝑖𝑔𝑛(𝑛)𝜋/2
𝑋𝑛 = ቐ 𝑛𝜋 𝑒 , 𝑛 = 𝑜𝑑𝑑
0, 𝑛 = 𝑒𝑣𝑒𝑛
● Now let’s have a look at some special cases and properties of the Fourier series
∞ ∞ ∞
nth harmonic
● Real-valued signal’s Fourier series representation may be expressed with real coefficients
𝑥 𝑡 = 𝑎𝑜 + 2 𝑎𝑛 cos(𝑛Ω𝑜 𝑡) + 𝑏𝑛 sin(𝑛Ω𝑜 𝑡)
𝑛=1
1
𝑎𝑛 = න 𝑥 𝑡 cos 𝑛Ω𝑜 𝑡 𝑑𝑡 = 𝑐𝑛 cos 𝜃𝑛 , 𝑛 = 0, 1, …
𝑇𝑜 <𝑇𝑜 >
1
𝑏𝑛 = න 𝑥 𝑡 sin 𝑛Ω𝑜 𝑡 𝑑𝑡 = − 𝑐𝑛 sin 𝜃𝑛 , 𝑛 = 1, 2, …
𝑇𝑜 <𝑇𝑜 >
With
𝑐𝑛 = 𝑎𝑛2 + 𝑏𝑛2
𝑏𝑛
𝜃𝑛 = − atan
𝑎𝑛
1 0 1 0
= න −𝐾 cos 𝑛𝜋𝑡 𝑑𝑡 + න −𝐾 cos 𝑛𝜋𝑡 𝑑𝑡
2 −1 2 1
𝐾 1 0,0
=− ⋅ ⋅ sin 𝑛𝜋𝑡 ቚ = 0, 𝑛 = 0, 1, 2, …
2 𝑛𝜋 𝑡=−1,1
1 1 0 1 1
𝑏𝑛 = න 𝑥 𝑡 sin 𝑛Ω𝑜 𝑡 𝑑𝑡 = න −𝐾 sin 𝑛𝜋𝑡 𝑑𝑡 + න 𝐾 sin 𝑛𝜋𝑡 𝑑𝑡
𝑇𝑜 <𝑇𝑜> 2 −1 2 0
𝐾 1 0,0 𝐾 1
= ⋅ ⋅ cos 𝑛𝜋𝑡 ቚ = ⋅ ⋅ 1 + 1 − cos(−𝑛𝜋) + cos 𝑛𝜋
2 𝑛𝜋 𝑡=−1,1 2 𝑛𝜋
𝐾 𝐾 𝑛
𝑏𝑛 = ⋅ 1 − cos 𝑛𝜋 = ⋅ 1 − −1 , 𝑛 = 1, 2, …
𝑛𝜋 𝑛𝜋
Prof. A. Yesildirek Fourier Series 19
Note
● The integral definition of the FS coefficients may be expressed using only the 1 st period signal as
1 𝑡𝑜 +𝑇𝑜 1 ∞
𝑋𝑘 = න 𝑥(𝑡)𝑒 −𝑗𝑘Ω𝑜 𝑡 𝑑𝑡 = න 𝑥1 𝑡 𝑒 −𝑗𝑘Ω𝑜 𝑡 𝑑𝑡
𝑇𝑜 𝑡𝑜 𝑇𝑜 −∞
At 𝑠 = 𝑗𝑘Ω𝑜
So, can we use the Laplace transform of 𝑥1 (𝑡) to get the Fourier series coefficients of 𝑥(𝑡)?
𝟏
𝑿𝒌 = L 𝒙𝟏 (𝒕) ቚ
𝑻𝟎 𝒔=𝒋𝜴𝒐 𝒌
1
● 𝑋𝑘 = L 𝑥1 (𝑡) |𝑠=𝑗Ω𝑜 𝑘
𝑇0
𝑒 0.25𝑠 𝑒 −0.25𝑠
● 𝑋𝑘 = − |𝑠=𝑗2𝜋𝑘
𝑠 𝑠
1 𝑒 𝑗𝜋𝑘/2 𝑒 −𝑗𝜋𝑘/2 1 𝜋𝑘
● 𝑋𝑘 = − = sin ∀𝑘 ≠ 0
𝜋𝑘 𝑗2 𝑗2 𝜋𝑘 2
1 𝑡𝑜 +𝑇𝑜
● 𝑋𝑜 = 𝑥1 𝑡 𝑑𝑡 = 2 ∗ 0.5 = 1 (average)
𝑇𝑜 𝑡𝑜
Example
● Let 𝑥1 (𝑡) be the first period of 𝑥 𝑡 with the period 4 sec. Find the fourier series coefficients
𝑥1 𝑡 = 𝑟 𝑡 − 𝑟 𝑡 − 2 − 2𝑢 𝑡 − 3
𝜋
𝑇0 = 4 → Ω0 =
2
𝑥1 𝑡 = 𝑟 𝑡 − 𝑟 𝑡 − 2 − 2𝑢 𝑡 − 3
Use Laplace transform
1
𝑋𝑘 = 𝐿𝑇 𝑥𝟏 𝑠 ቚ
𝑇𝑜 𝑠=𝑗Ω𝑜𝑘
1 1 − 𝑒 −2𝑠 𝑒 −3𝑠
𝑋𝑘 = −2
4 𝑠2 𝑠 𝑠=𝑗𝜋𝑘
2
3
1 1 − 𝑒 −𝑗𝜋𝑘 𝑒 −𝑗2𝜋𝑘
𝑋𝑘 = 2 −2 𝜋
4 𝜋 𝑗 𝑘
𝑗 𝑘 2
2
3
1 − 𝑒 −𝑗𝜋𝑘 𝑒 −𝑗2𝜋𝑘
𝑋𝑘 = −
−𝜋 2 𝑘 2 𝑗𝜋𝑘
1 − −1 𝑘 𝑗𝑘+1
𝑋𝑘 = +
−𝜋 2 𝑘 2 𝜋𝑘
𝜋
Assume that the Fourier series coefficients with Ω𝑜 = is given as
2
𝜋
−1 𝑘 − 1 𝑒 −𝑗 2 (3𝑘−1)
𝑋𝑘 = +
𝜋 2𝑘2 𝜋𝑘
𝑗𝜋 𝑗𝜋
And the kth harmonic is defined by 𝑥𝑘 𝑡 = 𝑋−𝑘 𝑒 − 2 𝑘𝑡 + 𝑋𝑘 𝑒 2 𝑘𝑡 .
Find the 5th harmonic of 𝑥(𝑡).
𝜋
−1 −5 − 1 𝑒 −𝑗 2 (−15−1) 2 1 5𝜋 + 2
𝑋−5 = + =− − =−
𝜋 2 25 −5𝜋 25𝜋 2 5𝜋 25𝜋 2
𝜋
−1 5 − 1 𝑒 −𝑗 2 (15−1) 2 1 5𝜋 + 2
𝑋5 = 2 + =− 2 − =−
𝜋 25 5𝜋 25𝜋 5𝜋 25𝜋 2
5𝜋 + 2 −𝑗𝜋𝑘𝑡 𝑗𝜋 4 + 10𝜋 𝜋
𝑥5 𝑡 = − 2 𝑒 2 + 𝑒 2 𝑘𝑡 = − 2 cos 5 𝑡
25𝜋 25𝜋 2
∞
1 𝑡𝑜 +𝑇𝑜 2 𝑑𝑡 2
𝑃𝑥 = න 𝑥 𝑡 = 𝑋𝑘
𝑇𝑜 𝑡𝑜
𝑘=−∞
● So, no need for integration in power calculation when the FS coefficients are known
● Odd 𝑥(𝑡)
− Fourier coefficients of 𝑥(𝑡) are imaginary
− 𝑥 𝑡 = 𝑗2 σ∞
𝑘=1 𝑋𝑘 sin(𝑘Ω𝑜 𝑡) no real part
− 𝑋𝑘 = 𝑋𝑒𝑘 + 𝑋𝑜𝑘
Example
𝑦1 (−𝑡)
𝑦 t = 𝑥(𝑡 − 𝑡𝑜 )
𝒀𝒌 = 𝑿𝒌 𝒆−𝒋𝒌𝛀𝒐 𝒕𝒐
Examples
1 𝑒 𝑗𝜋𝑘/2 𝑒 −𝑗𝜋𝑘/2 1 𝜋𝑘
● 𝑋𝑘 = − = sin ∀𝑘 ≠ 0 & 𝑋𝑜 = 1
𝜋𝑘 𝑗2 𝑗2 2𝜋𝑘/2 2
● Let 𝑦 𝑡 = 𝐴𝑥 𝑡 + 𝐵 then
− 𝑌0 = 𝐴𝑋𝑜 + 𝐵
− 𝑌𝑘 = 𝐴𝑋𝑘 ∀𝑘 ≠ 0
● You may derive many signals from linear combinations of 𝑥(𝑡)
● 𝑦1 𝑡 = −2𝑥 𝑡 + 3 ⇒
− 𝑌10 = −2𝑋𝑜 + 3
− 𝑌1𝑘 = −2𝑋𝑘 ∀𝑘 ≠ 0
● 𝑦2 𝑡 = 4𝑥 𝑡 + 1 ⇒
− 𝑌10 = 4𝑋𝑜 + 1
− 𝑌1𝑘 = 4𝑋𝑘 ∀𝑘 ≠ 0
● Etc.
Example
2𝐾 −𝑗𝑠𝑖𝑔𝑛(𝑛)𝜋/2
𝑋𝑛 = ቐ 𝑛𝜋 𝑒 , 𝑛 = 𝑜𝑑𝑑
0, 𝑛 = 𝑒𝑣𝑒𝑛
𝑥𝑁 𝑡 = 𝑋𝑛 𝑒 𝑗Ω𝑜 𝑛𝑡
𝑛=−𝑁