0% found this document useful (0 votes)
13 views26 pages

Lecture 14 Ece4330t

The document discusses the Fourier series, a representation of periodic signals as sums of sinusoidal functions, with applications in linear system analysis. It covers the derivation of Fourier coefficients, conditions for the existence of the Fourier series, and examples of calculating the Fourier series for specific signals. Additionally, it addresses signal power and Parseval's theorem, emphasizing the importance of the Fourier series in analyzing real-valued signals.

Uploaded by

Daniel Amare
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views26 pages

Lecture 14 Ece4330t

The document discusses the Fourier series, a representation of periodic signals as sums of sinusoidal functions, with applications in linear system analysis. It covers the derivation of Fourier coefficients, conditions for the existence of the Fourier series, and examples of calculating the Fourier series for specific signals. Additionally, it addresses signal power and Parseval's theorem, emphasizing the importance of the Fourier series in analyzing real-valued signals.

Uploaded by

Daniel Amare
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

ECE4330

Lecture 14
The Fourier Series
Prof. Mohamad Hassoun

The Fourier series is a very useful representation of a given periodic signal


2𝜋
𝑓(𝑡) (with period 𝑇𝑜 and fundamental frequency 𝜔𝑜 = ) as an infinite
𝑇𝑜
sum of sinusoidal signals having harmonic (integer multiples of 𝜔𝑜 )
frequencies. The series has important applications in linear system steady-
state analysis (thanks to the superposition principle).

Trigonometric Fourier Series (FS)

𝑓 (𝑡) = 𝑎0 + ∑ [𝑎𝑛 cos(𝑛𝜔𝑜 𝑡) + 𝑏𝑛 sin(𝑛𝜔𝑜 𝑡)]


𝑛=1
1
𝑎0 = ∫ 𝑓(𝑡)𝑑𝑡 (Signal Average)
𝑇𝑜 𝑇𝑜
2
𝑎𝑛 = ∫ 𝑓(𝑡) cos(𝑛𝜔𝑜 𝑡) 𝑑𝑡 , 𝑛 = 1, 2, 3, …
𝑇𝑜 𝑇𝑜
2
𝑏𝑛 = ∫ 𝑓(𝑡) sin(𝑛𝜔𝑜 𝑡) 𝑑𝑡, 𝑛 = 1, 2, 3, …
𝑇𝑜 𝑇𝑜

Refer to your textbook (pp. 184-186 and Section 3.8) for derivation of the
above formulas. Also, refer to the last section of this lecture for additional
insight into the nature of the Fourier coefficients.
Example. Approximation of a square wave using a truncated Fourier
series (𝑛 = 3, 5, 7)

fourier_series_animati fourier_series_animati
on_square_wave.avi on_triangle_wave.avi

Compact Trigonometric Fourier Series


We may combine each pair of equal frequency sinusoids in the above
series as,
𝑎𝑛 cos(𝑛𝜔𝑜 𝑡) + 𝑏𝑛 sin(𝑛𝜔𝑜 𝑡) = 𝐶𝑛 cos(𝑛𝜔𝑜 𝑡 + 𝜃𝑛 )

−𝑏𝑛
𝐶𝑛 = √𝑎𝑛 2 + 𝑏𝑛 2 , 𝜃𝑛 = tan−1 ( )
𝑎𝑛

which leads to the compact representation,


𝑓(𝑡) = 𝐶0 + ∑ 𝐶𝑛 cos(𝑛𝜔𝑜 𝑡 + 𝜃𝑛 ) , 𝐶0 = 𝑎0
𝑛=1
In practice, the signal 𝑓(𝑡) is a physical (real-valued, laboratory
generated) signal. For physical periodic signals we have,
lim 𝑎𝑛 = lim 𝑏𝑛 = lim 𝐶𝑛 = 0
𝑛→∞ 𝑛→∞ 𝑛→∞

Conditions for the Existence of the Fourier Series

1. ∫ |𝑓 (𝑡)|𝑑𝑡 < ∞
𝑇𝑜

2. 𝑓(𝑡) has a finite number of maxima, minima, and discontinuities within


one period.

The above two conditions are known as the Strong Dirichlet Conditions.
Fortunately, all physical signals meet these conditions.

Signal Power (revisited): Let 𝑓 (𝑡) be a real, periodic signal of period 𝑇𝑜 .


Then, the average power is given by,
1
𝑃𝑓 = ∫ 𝑓 2 (𝑡)𝑑𝑡
𝑇𝑜 𝑇𝑜

Parseval’s Theorem (revisited)


For a periodic signal that is expressed as a Fourier series, the average
power is given by the infinite sum,
∞ ∞
1 1
𝑃𝑓 = 𝑎0 2 + ∑(𝑎𝑛 2 + 𝑏𝑛 2 ) = 𝐶0 2 + ∑ 𝐶𝑛 2
2 2
𝑛=1 𝑛=1
Since 𝐶𝑛 → 0 for large 𝑛, physical signals can be well approximated using
the first several terms of their Fourier series. Therefore, their average
power can be well approximated as,
1 1 1 2
𝑃𝑓 ≅ 𝐶02 + 𝐶12 + 𝐶22 + ⋯ + 𝐶𝑚 , 𝑚 ≤ 10
2 2 2
Example 1. Consider the following periodic signal,
𝑡
− 2𝜋
𝑓(𝑡) = 𝑒 2 , 0 < 𝑡 ≤ 𝜋, with period 𝑇𝑜 = 𝜋 (i.e., 𝜔𝑜 = = 2)
𝑇𝑜

a. Show that the Fourier series exists for this signal.


b. Find the Fourier series (trigonometric and compact trigonometric).
c. Find the signal’s exact average power, 𝑃𝑓 . Compare this power to the
average power in the first seven terms (including the constant term)
of the compact Fourier series.
d. Plot the signal’s amplitude and angle spectra.
Solution:
𝜋 −𝑡 −
𝜋
1. ∫0 |𝑒 2 |𝑑𝑡 = −2 (𝑒 2 − 1) < ∞ (i.e., finite).

2. The signal has one maximum, one minimum and one discontinuity.
Therefore, 𝑓(𝑡) satisfies the Strong Dirichlet conditions→ FS exists.
1 𝜋 −𝑡 2 −
𝜋
𝑎0 = ∫ 𝑒 𝑑𝑡 = (1 − 𝑒 2 ) ≅ 0.504
2
𝜋 0 𝜋
2 𝜋 −𝑡
𝑎𝑛 = ∫ 𝑒 2 cos(2𝑛𝑡) 𝑑𝑡
𝜋 0
2 𝜋 −𝑡
𝑏𝑛 = ∫ 𝑒 2 sin(2𝑛𝑡) 𝑑𝑡
𝜋 0

Employing a Table of Integrals we obtain,

𝑡

2 𝑒 1 2 𝜋
𝑎𝑛 = { [− cos(2𝑛𝑡) + (2𝑛) sin(2𝑛𝑡)]} |
𝜋 1 2 2 0
(− 2) + (2𝑛)2

Note: cos(0) = 1, cos(2𝑛𝜋) = 1, sin(0) = 0, and sin(2𝑛𝜋) = 0

Simplifying, we obtain

𝜋 𝜋
−2 −2
4(1−𝑒 ) 16𝑛(1−𝑒 )
𝑎𝑛 = 𝜋(1+16𝑛2 ). Similarly, one can show that 𝑏𝑛 = .
𝜋(1+16𝑛2 )

Your turn: Show that the compact trigonometric FS representation is,

2 −
𝜋
𝐶0 = 𝑎0 = (1 − 𝑒 2 ) ≅ 0.504
𝜋
𝜋

2 4 (1 − 𝑒 ) 2
𝐶𝑛 = √𝑎𝑛 + 𝑏𝑛
2 =
𝜋 √1 + 16𝑛2

−𝑏 𝑏
𝜃𝑛 = tan−1 ( 𝑎 𝑛) = − tan−1 (𝑎𝑛 ) = − tan−1 (4𝑛) [Note: 𝑎𝑛 > 0]
𝑛 𝑛
Therefore, the Fourier series expansion is (recall that 𝜔0 = 2),

∞ 𝜋
−2
2 𝜋
−2 4 1−𝑒
𝑓 (𝑡) = (1 − 𝑒 )+ ∑ [cos(2𝑛𝑡) + 4𝑛 sin(2𝑛𝑡)]
𝜋 𝜋 1 + 16𝑛2
𝑛=1
or, in compact form,
∞ 𝜋
−2
2 𝜋
−2 4 1−𝑒
𝑓 (𝑡) = (1 − 𝑒 )+ ∑ cos[2𝑛𝑡 − tan−1 (4𝑛)]
𝜋 𝜋 √1 + 16𝑛 2
𝑛=1

The dc component is 0.504


𝑛 = 1 → 𝜔 = (1)𝜔0 = 2 → 0.245 cos(2𝑡 − 1.326) (first harmonic)
𝑛 = 2 → 𝜔 = (2)𝜔0 = 4 → 0.125 cos(4𝑡 − 1.446) (second harmonic),
etc.
𝜋
We also have, lim 𝐶𝑛 = 0 and lim 𝜃𝑛 = − 2 .
𝑛→∞ 𝑛→∞

Mathcad solution
The amplitude and angle spectra for this signal are as follows (recall that
𝜔𝑜 = 2):

The asymptotic rate at which the amplitude coefficients decay is

K
lim 𝐶𝑛 = lim →0 (at a rate of 1/𝑛)
𝑛→∞ 𝑛→∞ √1 + 16𝑛2

1 1
So, we may write: 𝐶𝑛 ∝ 𝑛 or 𝐶𝑛 = 𝑂 (𝑛) (relatively slow convergence)

Signal average power,

1 𝜋 −𝑡 2 1 𝜋 −𝑡
𝑃𝑓 = ∫ (𝑒 2 ) 𝑑𝑡 = ∫ 𝑒 𝑑𝑡 ≅ 0.3046
𝜋 0 𝜋 0
6
1
𝑃𝑓,7 = 𝐶02 + ∑ 𝐶𝑛2 = 0.2997 ≅ 98.4% 𝑜𝑓 𝑃𝑓
2
𝑛=1
where 𝑃𝑓,7 represents the average power in the first seven terms of the
series. The following is a plot for the average power as a function of the
number of terms included in the power calculations,
Signal Symmetry Considerations
𝑓(𝑡) Symmetry Trigonometric FS Coefficients

Odd: 𝑓(𝑡) = −𝑓(−𝑡) 𝑎𝑛 = 0, ∀𝑛


Even: 𝑓 (𝑡) = 𝑓(−𝑡) 𝑏𝑛 = 0, ∀𝑛
Half-wave symmetry:
𝑇𝑜 𝑏𝑛 = 𝑎𝑛 = 0 for all even values of 𝑛
𝑓(𝑡) = −𝑓 (𝑡 ± )
2

These symmetry properties are not affected by adding dc bias to 𝑓(𝑡)

Example of half-wave symmetry:


The following triangular signal is odd (symmetric with respect to the
origin) and it has half-wave symmetry (the period is 𝑇𝑜 = 2).
Example 2. Repeat Example 1 for the following periodic triangular signal,

2𝜋
with 𝑇𝑜 = 2 and 𝜔0 = =𝜋
𝑇𝑜

By inspection, the area under |𝑓 (𝑡)| over one period is finite. Also, within
one period, the signal has a finite number of maxima (1), minima (1) and
jump discontinuities (0). Therefore, the Fourier series expansion exists for
this signal.
𝑎0 = 0 (by inspection, the signal’s average is zero)
The signal is odd, (𝑡) = −𝑓(−𝑡) → 𝑎𝑛 = 0.
𝑇
Also, 𝑓(𝑡) = −𝑓 (𝑡 ± 2𝑜 ) = −𝑓(𝑡 ± 1), therefore the signal has half-
wave symmetry → 𝑎𝑛 = 𝑏𝑛 = 0 for 𝑛 even.

The following is a Mathcad evaluation of the Fourier series integrals as a


function of 𝑛.
Your turn: Employ trigonometric identities to show that for integer 𝑛,
𝑎(𝑛) = 0. Also, show that the expression for 𝑏(𝑛), reduces to:
0 𝑛 even
𝑛𝜋
𝑏𝑛 = { 8sin ( 2 )
𝑛 odd
𝑛2 𝜋 2
Furthermore, we can show that
8
2 2
𝑛 = 1,5,9,13, …
𝑏𝑛 = { 𝑛 𝜋
−8
𝑛 = 3,7,11,15, …
𝑛2 𝜋 2

The following are numerical values for the series coefficient up to 𝑛 = 6.


The compact trigonometric Fourier series coefficients are
𝐶0 = 𝑎0 = 0
0 𝑛 even
𝐶𝑛 = √𝑎𝑛2 + 𝑏𝑛2 = |𝑏𝑛 | = { 8
𝑛 odd
𝑛2 𝜋 2
𝜋
−𝑏𝑛 tan−1 (−∞) = − 𝑛 = 1,5,9,13, …
𝜃𝑛 = tan−1 ( )={ 2
𝑎𝑛 𝜋
tan−1 (+∞) = + 𝑛 = 3,7,11,15, …
2

Therefore, the following is the resulting compact trigonometric


representation of the Fourier series of 𝑓 (𝑡),

8 𝜋 8 𝜋 8 𝜋
𝑓(𝑡) = cos (𝜋𝑡 − ) + 2 cos (3𝜋𝑡 + ) + cos (5𝜋𝑡 − )
𝜋2 2 9𝜋 2 25𝜋 2 2
8 𝜋
+ cos (7𝜋𝑡 + ) + ⋯
49𝜋 2 2
Convergence rate of the series coefficients, 𝐶𝑛 :
1
The coefficients converge as 𝐶𝑛 = 𝑂 (𝑛2 ), which indicates a relatively fast
convergence.
Signal Power:
3
1 2
𝑃𝑓 = ̅̅̅̅
∫ 𝑓 2 (𝑡)𝑑𝑡 = 0.333 (your turn: verify)
2 − 1
2
𝑃𝑓,2 ≅ 0.3285 + 0.0040 = 0.3325
1 2 1 2
𝐶1 𝐶3
2 2
1
Because of the 𝑂 (𝑛2 ) convergence of the series coefficients, the power in
the signal can be well approximated by the power in the dc and first few
harmonics (two harmonics and no dc term in this case).
Predicting convergence rate for 𝐶𝑛 from the plot of 𝑓(𝑡)
If within one period 𝑓(𝑡) has:
1
(1) One or more jump discontinuity 𝐶𝑛 = 𝑂 ( )
𝑛
(2) No jump discontinuity in 𝑓 (𝑡), but 𝑓′(𝑡)
1
has a jump discontinuity 𝐶𝑛 = 𝑂 (𝑛2 )
(3) No jump discontinuity in 𝑓(𝑡) and 𝑓 ′ (𝑡),
1
but with a jump discontinuity in 𝑓 ′′ (𝑡) 𝐶𝑛 = 𝑂 (𝑛3 )
(4) 𝑓(𝑡) and all of its derivatives have no jump discontinuities, then
1
𝐶𝑛 = 𝑂 (𝑛∞) = 𝑂(0) which implies that the expansion is exact
with a finite number of FS terms. Example: 𝑓 (𝑡) = cos 𝑚 (𝜔𝑜 𝑡), 𝑚
is a positive integer.
Example 3. Consider the following square wave. Determine its Fourier
series.

𝑇0 = 2
2𝜋
𝜔0 = =𝜋
𝑇𝑜
𝑎0 = 0 (by inspection of area under the curve)
Symmetries in 𝑓(𝑡):
Even signal → 𝑏𝑛 = 0
𝑇
Half-wave symmetry exists (by inspecting the plot, −𝑓 (𝑡) = 𝑓(𝑡 − 2),
then 𝑎𝑛 = 0 for even 𝑛.
Convergence rate of the 𝐶𝑛 coefficients:
1
Jump discontinuity exists in 𝑓(𝑡), therefore 𝐶𝑛 = 𝑂 (𝑛).
The Fourier series expansion of 𝑓(𝑡) is given by (𝜔0 = 𝜋),

𝑓 (𝑡) = ∑ 𝑎𝑛 cos(𝑛𝜋𝑡)
𝑛=1
𝑛 𝑜𝑑𝑑

where the non-zero coefficients are obtained by solving the following


integral (with odd 𝑛),
3
2 2
𝑎𝑛 = ∫ 𝑓 (𝑡) cos(𝑛𝜋𝑡) 𝑑𝑡
2 −1
2

Your turn: Solve the integral by hand. Repeat using Mathcad or Matlab.
Alternative method
We can take advantage of the Fourier series expansion for the triangular
signal [call it 𝑓2 (𝑡)] obtained in Example 2. Notice that the square wave in
question [call it 𝑓1 (𝑡)] is the derivative of the triangular wave, as can be
seen graphically,
𝑑𝑓2 (𝑡 )
So, we can obtain the Fourier series expansion of 𝑓1 (𝑡) as 𝑑𝑡
8 𝑑 𝜋 1 𝜋
𝑓1 (𝑡) = 2 [cos (𝜋𝑡 − ) + cos (3𝜋𝑡 + )
𝜋 𝑑𝑡 2 9 2
1 𝜋 1 𝜋
+ cos (5𝜋𝑡 − ) + cos (7𝜋𝑡 + ) + ⋯]
25 2 49 2
8 𝜋 1 𝜋 1 𝜋
= (− sin (𝜋𝑡 − ) − sin (3𝜋𝑡 + ) − sin (5𝜋𝑡 − )
𝜋 2 3 2 5 2
1 𝜋
− sin (7𝜋𝑡 + ) + ⋯ )
7 2
𝜋
Next, we employ the identity sin (𝑥 ∓ 2 ) = ∓cos(𝑥) to rewrite the
expansion in terms of cosines,
8 1 1 1
𝑓1 (𝑡) = (cos 𝜋𝑡 − cos 3𝜋𝑡 + cos 5𝜋𝑡 − cos(7𝜋𝑡) + ⋯ )
( ) ( ) ( )
𝜋 3 5 7
The compact trigonometric representation requires 𝐶𝑛 ≥ 0. Thus, we
rewrite the expression as (the negative sign in the second and fourth terms
are absorbed into the corresponding cosine term as an angle of ±𝜋),
8 1 1 1
𝑓1 (𝑡) = (cos(𝜋𝑡) + cos(3𝜋𝑡 ± 𝜋) + cos(5𝜋𝑡) + cos(7𝜋𝑡 ± 𝜋) + ⋯ )
𝜋 3 5 7
The following is a plot of the signal 𝑓1 (𝑡) and its approximation 𝑓̃1 (𝑡)
using the first three-harmonics,
Mathcad solution (including all terms up to 𝑛 = 7)
Spectra:
Your turn: Consider the signal, 𝑓(𝑡) = 𝑡, 0 < 𝑡 < 1 and 𝑓 (𝑡 + 1) = 𝑓(𝑡).
(a) Predict the order of convergence of the Fourier series coefficient
𝐶𝑛 . (b) Find the compact trigonometric Fourier series. (c) Compare the
signal’s exact power to that obtained using the dc and first 5 harmonic
terms. (d) Verify your work employing the provided Mathcad Fourier
series worksheet.
1 1 1
Ans. (b) 𝑓 (𝑡) = − ∑∞
𝑛=1 sin(2𝜋𝑛𝑡)
2 𝜋 𝑛

Your turn: Consider the signal, 𝑓(𝑡) = 𝑡 2 , −𝜋 < 𝑡 < 𝜋 and 𝑓(𝑡 + 2𝜋) = 𝑓(𝑡)
(a) Predict the order of convergence of the Fourier series coefficient
𝐶𝑛 . (b) Find the compact trigonometric Fourier series. (c) Compare the
signal’s exact power to that obtained using the dc and first 5 harmonic
terms. (d) Verify your work employing the provided Mathcad Fourier
series worksheet.
𝜋2 (−1)𝑛
Ans. (b) 𝑓 (𝑡) = + 4 ∑∞
𝑛=1 cos(𝑛𝑡)
3 𝑛2

Your turn: Consider the signal, 𝑓 (𝑡) = |sin(𝜋𝑡)|


(a) Predict the order of convergence of the Fourier series coefficient
𝐶𝑛 . (b) Find the compact trigonometric Fourier. (c) Compare the signal’s
exact power to that obtained using the dc and first 5 harmonic terms. (d)
Verify your work employing the provided Mathcad Fourier series
worksheet.
2 4 1
Ans. (b) 𝑓 (𝑡) = − ∑∞
𝑛=1 cos(2𝜋𝑛𝑡)
𝜋 𝜋 4𝑛2 −1
Table of Some Useful Trigonometric Fourier Series
The Fourier Series Coefficients and LSE Minimization
The Fourier series coefficients are the solution to a minimization problem
involving the least-square-error (LSE) objective function. The formulas
for the (2𝑚 + 1) coefficients 𝑎0 , 𝑎𝑛 , and 𝑏𝑛 in the finite Fourier series
expansion
𝑚

𝑓̃(𝑡) = 𝑎0 + ∑ [𝑎𝑛 cos(𝑛𝜔𝑜 𝑡) + 𝑏𝑛 sin(𝑛𝜔𝑜 𝑡)]


𝑛=1

can be obtained as the solution that minimizes the LSE criterion (error
function)
𝑇0
2 2
𝐸(𝑎0 , 𝑎1 , 𝑎2, … , 𝑎𝑚 , 𝑏1 , 𝑏2, … , 𝑏𝑚 ) = ∫ [𝑓 (𝑡) − 𝑓̃(𝑡)] 𝑑𝑡
𝑇
− 0
2

where it is assumed that 𝑓(𝑡) is periodic of period 𝑇0 .

The coefficients are then obtained by solving the following set of 2𝑚 + 1


equations,
𝜕𝐸 𝜕𝐸 𝜕𝐸 𝜕𝐸 𝜕𝐸 𝜕𝐸 𝜕𝐸
= 0, = 0, = 0, … , = 0, = 0, = 0, … , =0
𝜕𝑎0 𝜕𝑎1 𝜕𝑎2 𝜕𝑎𝑚 𝜕𝑏1 𝜕𝑏2 𝜕𝑏𝑚

Once the equations are formulated, Mathcad or Matlab can then be used to
solve the resulting system of (generally, nonlinear) equations numerically.

The following example demonstrates the above formulation and solution


to a specific periodic signal.
Example. Consider the following periodic signal.

Determine the least-square-error (LSE) approximation of 𝑓(𝑡) = 𝑡 2 over the


interval [-1 1] using

𝑓̃(𝑡) = 𝑎0 + 𝑎1 cos(𝜋𝑡) + 𝑏1 sin(𝜋𝑡) + 𝑎2 cos(2𝜋𝑡) + 𝑏2 sin(2𝜋𝑡)

Compare the resulting approximation 𝑓̃(𝑡) to the Fourier series approximation of


𝑓(𝑡) given by,
1 4 1
𝑓̂(𝑡) = + ( )
cos 𝜋𝑡 + 𝜋 + 2 cos(2𝜋𝑡)
3 𝜋2 𝜋

Solution: We need to find the set of parameters {𝑎0 , 𝑎1 , 𝑏1 , 𝑎2 , 𝑏2 } (referred to as the


LSE solution) that minimize the five-dimensional error function
𝐸(𝑎0 , 𝑎1 , 𝑏1 , 𝑎2 , 𝑏2 ) defined by,
1 2
𝐸(𝑎0 , 𝑎1 , 𝑏1 , 𝑎2 , 𝑏2 ) = ∫ (𝑓 (𝑡) − 𝑓̃(𝑡)) 𝑑𝑡 =
−1
1
∫ {𝑡 2 − [𝑎0 + 𝑎1 cos(𝜋𝑡) + 𝑏1 sin(𝜋𝑡) + 𝑎2 cos(2𝜋𝑡) + 𝑏2 sin(2𝜋𝑡) ]}2 𝑑𝑡
−1

The following is Mathcad’s solution using the Minimize function. (Alternatively,


one may employ Matlab’s fminsearch function. Try it).
The above solution can be easily shown to be equivalent to the compact
trigonometric FS expansion of the periodic function 𝑓(𝑡), namely, it is equal to the
first three terms in the FS expansion:
1 4 1
𝑓̂(𝑡) = + 2 cos(𝜋𝑡 + 𝜋) + 2 cos(2𝜋𝑡)
3 𝜋 𝜋
We conclude that the FS expansion of a periodic signal is identical to the signal’s
LSE approximation employing the sum of harmonic sinusoids.

Your turn: Solve the above optimization problem by solving the set of equations,
𝜕𝐸 𝜕𝐸 𝜕𝐸 𝜕𝐸 𝜕𝐸
= 0, = 0, = 0, = 0, =0
𝜕𝑎0 𝜕𝑎1 𝜕𝑏1 𝜕𝑎2 𝜕𝑏2
1 4 1
Ans. 𝑎0 = , 𝑎1 = − 2 , 𝑏1 = 0, 𝑎2 = and 𝑏2 = 0
3 𝜋 𝜋2

Your turn: If you are to sample the function 𝑓(𝑡) at 𝑚 (say, 𝑚 = 201) equally
spaced points 𝑡𝑖 over the interval [-1 1], then the total square-error would be the
sum
201
2
𝐸 = ∑ (𝑓 (𝑡𝑖 ) − 𝑓̃(𝑡𝑖 ))
𝑖=1

Solve for the set of parameters {𝑎0 , 𝑎1 , 𝑏1 , 𝑎2 , 𝑏2 } that minimize the error function
𝐸(𝑎0 , 𝑎1 , 𝑏1 , 𝑎2 , 𝑏2 ) and compare your solution to the LSE solution.
Hint: Formulate the problem as a linear regression problem and solve the resulting
overdetermined system of linear equations employing the pseudo-inverse method.
Refer to the Section “General Linear Least-Squares Regression and the Polynomial
Model” in Lecture 18 of the course ECE 3040:

http://neuron.eng.wayne.edu/auth/ece3040/lectures/lecture18.pdf

You might also like