1.8 Computation of Harmonics

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Computation of Harmonics of Fourier

Series from Numerical Data


Dr. T. Phaneendra

December 2, 2019
MAT2002 - ADDE Dr. T. Phaneendra
Module 1 Professor of Mathematics

Computation of Harmonics from the Numerical Data

Fourier series have applications in music synthesis and image processing. We


will mention the relationship between sound (music) and Fourier series.

Consider the Fourier series of periodic signal f(x), where x represents a time-
variable.
a  n n
f ( x ) ~ 0   an cos x  bn sin  x  for all 0  x  2L. … (1)
2 n1  L  L  
n
The frequencies of the signal f are given by n  , n  1, 2, 3, ...
L
n  n 
The term Hn  an cos  x  bn sin  x is called the nth harmonic of f.
L L
Thus
x x
H1  a1 cos   b1 sin  is the first harmonic,
 L L
2x   2x 
H2  a2 cos   b2 sin L  is the second harmonic and so on.
 L   
The amplitude (the maximum displacement) of nth harmonic is An  an2  bn2 .

Audio signals describe air pressure variations captured by our ears and
perceived as sounds. Periodic audio signals are also known as tones, which are
represented by Fourier series.

If f(x) is defined by an explicit form of the independent variable x, we evaluate its


Fourier coefficients by Euler’s formulae:

1 2L
a0  f ( x )dx
L 0
1 2L nx 
an   f ( x )cos   dx , … (2)
L0  L 
1 2L nx 
bn   f ( x )sin   dx ,
L0  L 
for n  1, 2, 3, ... .
But in some practical problems, a 2L-periodic function f (x ) is defined by a
graph or by a table of values with equally spaced values of the argument x in the
full range (0, 2L) .

For instance consider the data points:

x x0 x1 … xi … xk –1 xk

f(x) y0 y1 … yi … yk –1 yk = y0

SJT 511-A10 Page 1 phaneendra.t@vit.ac.in


MAT2002 - ADDE Dr. T. Phaneendra
Module 1 Professor of Mathematics

2L
In this data, there are k subintervals each of length , that is
k
2L
xi  xi 1 
for all i  1, 2, ..., k .
k
To evaluate the Fourier coefficients, we approximate the integrals in given (2)
using statistical mean.

In fact, we know about the means:


1 2L _____
 f ( x )dx  f ( x )
2L 0
________________________
1 2L nx   nx 
f ( x )cos   dx  f ( x )cos  L  ,
2L 0  L   
______________________
1 2L nx   nx 
f ( x )sin   dx  f ( x )sin  L 
2L 0  L   

With these the Fourier coefficients in (2) can be written as


_______
a0  2  f ( x )
__________ __________ ____
nx 
an  2  f ( x ) cos  , … (3)
 L 
__________ __________ __
nx 
bn  2  f ( x ) sin  ,
 L 
for n  1, 2, 3, ... .

Example 1. Find the first two harmonics of the Fourier series of f(x) given the
following table:

x 0 /3 2/3  4/3 5/3 2


f(x) 1.0 1.4 1.9 1.7 1.5 1.2 1.0

Note that the values of y = f(x) are spread over the interval 0 x  2 and
f(0) = f(2) = 1.0.

Hence the function is periodic and so we omit the last value f(2) = 1.0.

We have 2L = 2 or L = , and

__________ __________ ___


nx  __________ __
an  2  f ( x )cos   2  y cos nx
 l 
__________ __________ __
__________ __
nx 
bn  2  f ( x )sin   2  y sin nx
 l 
for n  1, 2, 3, ... .

SJT 511-A10 Page 2 phaneendra.t@vit.ac.in


MAT2002 - ADDE Dr. T. Phaneendra
Module 1 Professor of Mathematics

We prepare the following table to compute the first two harmonics.

Col Col Col Col Col Col Col Col Col


Col VII
I II III IV V VI VIII IX X

x y = f(x) cosx cos2x sinx sin2x ycosx ycos2x ysinx ysin2x

0 1.0 1 1 0 0 1 1 0 0

/3 1.4 0.5  0.5 0.866 0.866 0.7  0.7 1.2124 1.2124

2/3 1.9  0.5  0.5 0.866  0.866  0.95  0.95 1.6454  1.6454

 1.7 1 1 0 0  1.7 1.7 0 0

4/3 1.5  0.5  0.5  0.866 0.866  0.75  0.75 1.299 1.299

5/3 1.2 0.5  0.5 -0.866 -0.866 0.6  0.6 1.0392  1.0392
Total  1.1  0.3 3.1176  0.1732

For n = 1:
____________
Col. VII Total 1
a1  2  y cos x  2   (1.1)  0.367 ,
6 3
____________
Col. IX Total 1
b1  2  y sin x  2   (3.1176)  1.0392 ;
6 3

The first harmonic is

H1 = a1cosx+b1sinx = –0.367 cosx + 1.0392 sinx,

For n = 2:
____________
Col. VIII Total 1
a2  2  y cos 2x  2   (0.3)  0.1 ,
6 3
____________
Col. X Total 1
b1  2  y sin 2x  2   (0.1732)  0.0577 ;
6 3

The second harmonic is

H2 = a2cos2x+b2sin2x = – 0.1 cos2x – 0.0577 sin2x

Example 2. Express y as a Fourier series upto the third harmonic from the
following values:

x 0 1 2 3 4 5
y 4 8 15 7 6 2

The values of y at x = 0, 1, 2, 3, 4, 5 are given and hence the interval of x should be


0  x < 6.

SJT 511-A10 Page 3 phaneendra.t@vit.ac.in


MAT2002 - ADDE Dr. T. Phaneendra
Module 1 Professor of Mathematics

The length of the interval = 6 – 0 = 6 so that 2L = 6 or L = 3.

The Fourier series upto the third harmonic is


a x x 2x 2x   3x 3x 
y  0   a1 cos  b1 sin    a2 cos  b2 sin  a cos  b3 sin
2  L L  L L   3 L L 
or
a x x 2x 2x   3x 3x 
y  0   a1 cos  b1 sin    a2 cos  b2 sin    a3 cos  b3 sin
2  3 3  3 3   3 3 
x
For brevity, put   , then
3
a0
y   a1 cos   b1 sin   a2 cos 2  b2 sin 2  a3 cos 3  b3 sin 3 (1)
2

We prepare the following table using the given values:


Col Col Col Col Col Col Col
Col IV Col VII
I II III V VI VIII IX
x
x = y ycos ycos2 ycos3 ysin ysin2 ysin3
3
0 0 4 4 4 4 0 0 0

1 600 8 4 4 -8 6.928 6.928 0

2 1200 5 7.5 7.5 15 12.99 12.99 0

3 1800 7 7 7 7 0 0 0

4 2400 6 3 3 6 5.196 5.196 0

5 3000 2 1 1 2 1.732 1.732 0

Total 42 8.5 4.5 8 12.99 2.598 0

Constant term:
_______
Col. III Total 1
a0  2  f ( x )  2   (42)  14
6 3

For n = 1:
___________
Col. IV Total 1
a1  2  y cos   2   (8.5)  2.833 ,
6 3
_________
Col. VII Total 1
b1  2  y sin   2   (12.99)  4.33 ;
6 3
For n = 2:
___________
Col. V Total 1
a2  2  y cos 2  2   (4.5)  1.5 ,
6 3
_________
Col. VIII Total 1
b2  2  y sin 2  2   (2.598)  0.866 ;
6 3

SJT 511-A10 Page 4 phaneendra.t@vit.ac.in


MAT2002 - ADDE Dr. T. Phaneendra
Module 1 Professor of Mathematics

For n = 3:
___________
Col. VI Total 1
a3  2  y cos 3  2    (8)  2.667 ,
6 3
_________
Col. IX Total 1
b3  2  y sin 3  2    (0)  0.
6 3

Using these in (1), we get


x x 2x  2x 
y  7  2.833cos   (4.33)sin   1.5cos   0.866sin   2.667cos x
3 3  3   3 
This is the required Fourier series up to the third harmonic.

Example 3. The following table gives the variations of a periodic current A over
a period T :

t (sec.) 0 T/6 T/3 T/2 2T/3 5T/6 T

A (amp) 1.98 1.30 1.05 1.30 0.88 0.25 1.98

Show that there is a constant part of 0.75 amp. in the current A and obtain the
amplitude of the first harmonic.

Note that the values of A at t = 0 and t = T are the same. Hence f(t) = A(t) is a
periodic function of period T.

Also Full length 2L = T so that L = T/2. The Fourier coefficients are:


_____
a0  2 f (t )
__________ __________ __ __________ __________ ____ __________ __________ ____
nt  nt  2nt 
an  2 f (t )cos    2  f (t )cos    2 f (t )cos  
 L  T / 2  T 
__________ __________ __ __________ __________ __ __________ __________ ____
nt   nt   2nt 
bn  2  f (t )sin    2  f (t )sin  T / 2   2 f (t )sin  T  ,
 L     
for n = 1, 2, 3, …

2t
Let us denote   . Then we have
T

a0  2  A
__________ __
2t 
a1  2  A cos   2  A cos  (1)
 T 
__________ _____
__________ _
2t 
b1  2  A sin   2  A sin 
 T 

SJT 511-A10 Page 5 phaneendra.t@vit.ac.in


MAT2002 - ADDE Dr. T. Phaneendra
Module 1 Professor of Mathematics

We prepare the following table:

Col I Col II Col III Col IV Col V Col VI Col VII

2t
t  A cos sin Acos Asin
T
0 0 1.98 1 0 1.98 0
T/6 600 1.30 0.5 0.866 0.65 1.1258
T/3 1200 1.05 -0.5 0.866 -0.525 0.9093
T/2 1800 1.30 -1 0 -1.30 0
2T/3 2400 -0.88 -0.5 -0.866 0.44 0.7621
5T/6 3000 -0.25 0.5 -0.866 -0.125 0.2165
Total 4.5 1.12 3.0137

Using the values of the table in (1), we get

Col. III Total 1


a0  2  A  2    (4.5)  1.5
6 3
__________ __
Col. VI Total 1
a1  2  A cos   2    (1.12)  0.3733
6 3
__________ _
Col. VII Total 1
b1  2  A sin   2    (3.0137)  1.0046
6 3

The Fourier expansion upto the first harmonic is


a 2t   2t 
A  0  a1 cos   b1 sin T 
2  T   
 2t  2t 
 0.75  0.3733cos   1.0046sin 
 T   T 
The expression shows that A has a constant part 0.75 amp in it.

Also the amplitude of the first harmonic is a12  b12 = 1.0717.

Exercises:

1. The displacement y of a part of a mechanism is tabulated with corresponding


angular movement x0 of the crank. Express y as a Fourier series upto the third
harmonic:

x0 0 30 60 90 120 150 180 210 240 270 300 330


y 1.80 1.10 0.30 0.16 1.50 1.30 2.16 1.25 1.30 1.52 1.76 2.00

2. Obtain the Fourier series of y upto the second harmonic using the following table:
x0 45 90 135 180 225 270 315 360
y 4.0 3.8 2.4 2.0 -1.5 0 2.8 3.4

SJT 511-A10 Page 6 phaneendra.t@vit.ac.in


MAT2002 - ADDE Dr. T. Phaneendra
Module 1 Professor of Mathematics

3. Obtain the constant term and the coefficients of the first sine and cosine terms in the
Fourier expansion of y as given in the following table:
x 0 1 2 3 4 5
y 9 18 24 28 26 20

4. Find the Fourier series of y up to the second harmonic from the following table:
x 0 2 4 6 8 10 12
y 9.0 18.2 24.4 27.8 27.5 22.0 9.0

5. Obtain the first three coefficients in the Fourier cosine series for y, where y is given
in the following table:
x 0 1 2 3 4 5
y 4 8 15 7 6 2

6. The turning moment T is given for a series of values of the crank angle 0 = 750:
0 0 30 60 90 120 150 180
T 0 5224 8097 7850 5499 2626 0
Obtain the first four terms in a series of sines.

SJT 511-A10 Page 7 phaneendra.t@vit.ac.in

You might also like