Estude fácil! Tem muito documento disponível na Docsity
Ganhe pontos ajudando outros esrudantes ou compre um plano Premium
Esta página não é visível na pré-visualização
Não perca as partes importantes!
1 Introduction
Harmonic analysis is concerned with the representation of functions by trigonometric sums or integrals. These trigonometric representations are usually referred to as Fourier series or Fourier integrals. Harmonic expansions have proven to be useful in such diverse fields as astronomy, acoustics, optics, signal processing, image processing, and data compression. In this paper we will discuss some of the practical aspects involved in using these expansions. The material in these notes is based largely on the work of Cornelius Lanczos [7, 8]. The discussion of Fast Fourier Transforms draws heavily on the material in the book Numerical Recipes [11].
Trigonometric expansions have a long history. The early work in the eighteenth century was fo- cused primarily on the solution of two problems. The first was the vibration of a taut string an- chored at both ends. The second was the interpolation of planetary orbits between observation points.
D’Alembert (1747) derived the following wave equation for the vibrating string problem
c^2
@^2 u @x^2
@^2 u @t^2
where u is the displacement of the string and c is a constant related to the tension of the string. He showed that a general solution to this wave equation is given by
u.x; t/ D f .ct C x/ C g.ct x/ (1.2)
where f and g are arbitrary twice differentiable functions. Since the displacement at the end x D 0 is zero, it follows that g D f , i.e.,
u.x; t/ D f .ct C x/ f .ct x/: (1.3)
Since the displacement af the other end x D L is also zero, it follows that
f .ct C L/ D f .ct L/ (1.4)
and hence that f is periodic with period 2L. He gave several examples of periodic functions that could be used for f including the trigonometric functions.
In 1749 Euler proposed using the function f .x/ D sin nx L in D’Alembert’s solution, yielding
u.x; t/ D f .ct C x/ f .ct x/ D 2 sin
nx L
cos
nct L
He also pointed out that any linear combination of solutions of this form is also a solution.
expanded in a series of sine functions
T .x; 0/ D
nD 1
an sin nx (1.7)
where
an D
0
T .x; 0/ sin nx dx: (1.8)
He then showed that the solution to the heat equation with these boundary and initial conditions is given by
T .x; t/ D
nD 1
anen
(^2) t sin nx: (1.9)
In deriving this expression, Fourier used D. Bernoulli’s method of separation of variables, a tech- nique widely used today. Fourier recognized that the initial temperature distribution could contain jump discontinuities unlike the initial shape function in the string problem. He suggested that even discontinuous functions could be expanded in trigonometric series. He also recognized that an infinite series expansion could represent a function in an interval and disagree with it outside that interval. Although Fourier was not the first to employ Fourier series expansions, he was the first to define and use the Fourier integral.
As we have seen, a number of mathematicians (Euler, Lagrange, Bernoulli, Clairaut, Fourier, etc.) employed trigonometric expansions to solve various problems. However, the arguments used to support these expansions were more intuitive than rigorous. Dirichlet (1829) examined more care- fully the convergence of Fourier series expansions. He showed that the N th partial sum of a trigonometric expansion could be written as
SN .x/ D
sin.N C 1=2/t sin t=
f .x t/ dt: (1.10)
Using this he was able to show that a function defined on an interval could be expanded in a Fourier series if it was piecewise continuous and had bounded variation. A function f defined on an interval Œa; b is said to have bounded variation if there exists a constant B such that for any partition a D x 0 < x 1 < < xN D b of the interval Œa; b we have
X^ N
iD 0
jf .xi / f .xi 1 /j B:
Jordan showed that a function has bounded variation if and only if it can be expressed as the difference of two non-decreasing functions.
Fej´er (1904) applied a different method for summing infinite series that greatly extended the va- lidity of harmonic expansions. He showed that it is only necessary to require that f is absolutely integrable onP Œ; if summation of the series is defined differently. He called an infinite series 1 kD 1 ak^ summable if the sequence
S 1 ;
converges. Here Sn is the n-th partial sum Sn D
Pn kD 1 ak^.^ It can be shown that a series that converges in the conventional sense is also summable with the same limit. There are, however, divergent series that are summable. For example, the series expansion
1 1 C x
D 1 x C x^2 x^3 C : : :
is divergent at x D 1 where the right-hand-side becomes 1 1 C 1 1 C : : :. However, it is summable to the correct value 1=2.
As we have seen, harmonic analysis has a long history and has occupied the attention of many famous mathematicians. This topic has also generated a great deal of controversy. Much of the controversy centered around the question: What constitutes a function? Initially the concept of a function was more like what we would call an expression. It included algebraic expressions, expressions involving known functions such as sines, cosines and logarithms, and eventually in- cluded some power series. Functions were often closely associated with physical quantities. For example, D’Alembert, in his study of the wave equation, would only consider functions that were differentiable. Euler extended the function concept to include functions that could be graphed with a pencil (without lifting the pencil). These functions were continuous, but could have discontinu- ous slopes and could be defined by different expressions in different intervals. Fourier extended the function concept to include functions with step discontinuities. Dirichlet, in addition to analysing the convergence of Fourier series, also gave a definition of a function that is close to what we use today. Thus, the concept of a function as well as other concepts like continuity and convergence, grew out of the study of trigonometric expansions. Let us now look at some of the properties of harmonic expansions.
2 Fourier Series
Let f be a real-valued function defined on the interval Œ; . Then the Fourier series expansion of f is given by
f .x/ D 12 a 0 C a 1 cos x C a 2 cos 2x C : : : C b 1 sin x C b 2 sin 2x C : : :
where
an D
f .x/ cos nx dx (2.2)
bn D
f .x/ sin nx dx: (2.3)
The Fourier expansion of fO can be written
f .y/^ O D
nD
cnei ny^ (2.8)
where cn is given by
cn D
f .y/e^ O i ny^ dy: (2.9)
Making the change of variables (2.6) in equations (2.8) and (2.9), we get
f .x/ D f .y/O D
nD
cnei ny^ D
nD
cnei n.aCb/=.ba/ei2 nx=.ba/^ (2.10a)
cnei n.aCb/=.ba/^ D
b a
Z (^) b
a
f .x/ei2 nx=.ba/^ dx: (2.10b)
If we define c On D cnei n.aCb/=.ba/; (2.11)
then we have
f .x/ D
nD
c Onei2 nx=.ba/^ (2.12a)
c On D
b a
Z (^) b
a
f .x/ei2 nx=.ba/^ dx: (2.12b)
Equations (2.12a) and (2.12b) define the Fourier series expansion of f on the interval Œa; b.
The function f can be expressed as
f .x/ D g.x/ C h.x/ (2.13)
where
g.x/ D 12 Œf .x/ C f .x/ (2.14) h.x/ D 12 Œf .x/ f .x/: (2.15)
The function g is an even function in the sense that g.x/ D g.x/. The function h is an odd function in the sense that h.x/ D h.x/. Moreover, if f has a Fourier expansion like that in equation (2.1), then
g.x/ D 12 a 0 C a 1 cos x C a 2 cos 2x C : : : (2.16) h.x/ D b 1 sin x C b 2 sin 2x C : : : (2.17)
and
an D
0
g.x/ cos nx dx (2.18)
bn D
0
h.x/ sin nx dx: (2.19)
If the function f is defined on the interval Œ0:, then it can be extended to the interval Œ; as either an odd function or as an even function. Thus, f can be represented on Œ0; in terms of a cosine series or a sine series.
In numerical computations we are not only interested in the convergence of an infinite series, but also in the rate at which it converges. Suppose f is an infinitely differentiable function on the interval Œ; that can be expanded in a Fourier series
f .x/ D
nD
cnei nx^ (2.20)
with coefficients cn given by
cn D
f .x/ei nx^ dx: (2.21)
Integrating the right-hand-side of equation (2.21) by parts three times, we obtain
2cn D
i.1/n n
Œf ./ f ./ C
.1/n n^2
Œf 0 ./ f 0 ./ i.1/n n^3
Œf 00 ./ f 00 ./ C
i n^3
f 000 .x/ei nx^ dx: (2.22)
We can learn a lot about the rate of convergence of the Fourier series from equation (2.22). If f ./ ¤ f ./, then the periodic extension of f will have jump discontinuities at the end points of the interval and the convergence rate will be 1=n. However, if f ./ D f ./, the extension will be continuous and the convergence rate will be at least 1=n^2. If, in addition, f 0 ./ D f 0 ./, then the periodic extension will have a continuous derivative and the convergence rate will be at least 1=n^3. Thus the convergence rate depends strongly on the smoothness of the periodic extension of f. Knowing this, it is often possible to increase the convergence rate by modifying the function in such a way as to increase the smoothness of the periodic extension. Several examples of this will be shown later. A particularly important example is shown in subsection 4.4.1 dealing with the calculation of impulse responses.
Let us now look at the rate of convergence of Fourier Sine and Cosine expansions. Suppose f is defined on Œ0; . If we extend f to Œ; as an even function, then f can be expanded in a cosine series, i.e., f .x/ D 12 a 0 C a 1 cos x C a 2 cos 2x C : : : : (2.23)
The residual m is defined by
m.x/ D
nDm
.cnei nx^ C cnei nx^ /: (2.32)
Equation (2.32) can be rewritten as follows:
m D eimx
nD 0
cmCnei nx^ C eimx
nD 0
cmnei nx^ : (2.33)
Define m and (^) m by
m.x/ D
nD 0
cmCnei nx^ (2.34)
m.x/^ D
nD 0
cmn ei nx^ : (2.35)
Then Equation (2.33) can be written
m.x/ D eimx^ m.x/ C eimx^ m.x/: (2.36)
The functions m and (^) m are generally smooth functions which do not show any rapid oscillations. On the other hand, eimx^ and eimx^ are rapidly oscillating functions when m is large. Thus, the error behaves like a modulated carrier wave of high frequency. If we formally differentiate fm and compare it with f 0 .x/, we obtain the error
^0 m.x/ D imeimx^ m.x/ C eimx^ m^0 .x/ imeimx^ m.x/ C eimx^ m^0 .x/: (2.37)
The primed terms arise from differentiation of the modulation and do not cause any serious diffi- culty. However, the other terms contain the factor m that comes from differentiating the carrier. For large m these terms can be significant. In fact they can cause the differentiated series to diverge.
Suppose we replace the process of differentiation by the following central difference process:
Dmf .x/ D
f .x C =m/ f .x =m/ 2=m
For large m, Dm is a good approximation to the derivative. Since
e˙im.x˙=m/^ D e˙imx^ ; (2.39)
it follows that Dmm.x/ D eimx^ Dm m.x/ eimx^ Dm m.x/: (2.40)
Notice that there are no factors of m in this expression since the operator Dm picks out two points on the carrier wave that are in phase (˙ 180 ı^ away from the phase at x). Moreover,
Dmei nx^ D i nei nx^
sin.n=m/ n=m
Dmei nx^ D i nei nx^
sin.n=m/ n=m
Therefore, to apply Dm to the sum defining fm in equation (2.31) we can differentiate the sum formally term by term and then apply the factor
n D
sin.n=m/ n=m
to the terms corresponding to ˙n. The factor n is 1 for n D 0 and then decreases monotonically with increasing n. It is almost zero at the highest subscript m 1. Figure 2.1 is a plot of n vs. n for m D 30.
0 5 10 15 20 25 30
Figure 2.1: Plot of n vs. n for m D 30.
This attenuation of the higher harmonics counteracts the tendency for the series to become diver- gent. Since any function can be considered as the derivative of its integral, sigma factors can be applied to any Fourier expansion in order to increase its convergence rate. We will look at the effect of applying these sigma factors in the following examples.
Example 1. The formal fourier series of a delta function is given by
ı.x/ D
. 12 C cos x C cos 2x C : : : /: (2.44)
This series does not converge at any point. If sigma factors are applied to the first m terms of this series, we get
ım.x/ D
2 C^ ^1 cos^ x^ C^ ^2 cos^ 2x^ C C^ m^1 cos.m^ ^ 1/x
A plot of this function for m D 30 is shown in figure 2.2.
In addition to converting divergent Fourier series into convergent ones, sigma factors can also be used to increase the convergence rate of a slowly convergent Fourier series.
−4 −3 −2 −1 0 1 2 3 4
−0.
−0.
−0.
−0.
0
x
f(x)
Figure 2.3: Fourier sine series approximation of square wave.
−4 −3 −2 −1 0 1 2 3 4
−0.
−0.
−0.
−0.
0
x
f(x)
Figure 2.4: Approximation of square wave using Fej´er’s arithmetic mean method
−4 −3 −2 −1 0 1 2 3 4 −0.
−0.
−0.
−0.
0
x
f(x)
Figure 2.5: Approximation of square wave using sigma factors
The sigma factor method can be looked upon in a different way. Instead of replacing the differen- tiation operator (^) dxd by the difference operator Dm, we could instead replace the function f by a
locally smoothed function fN defined by
f .x/^ N D m 2
Z (^) =m
=m
f .x C t/ dt: (2.48)
Differentiating (2.48), we get
d dx
f .x/N D m 2
Z (^) =m
=m
d dx
f .x C t/ dt D
m 2
Z (^) =m
=m
f 0 .x C t/ dt
m 2
Z (^) xC=m
x=m
f 0 .t/ dt D
f .x C =m/ f .x =m/ =m
D Dmf .x/: (2.49)
Notice that as m increases, the interval over which f is averaged gets smaller and smaller.
Extension of the Concept of Convergence Usually when we talk about the sum of an infinite series such as a Fourier series we are thinking of a fixed sequence of terms a 1 ; a 2 ; : : : , and we define the sum to be the limit of the partial sums Sn as n! 1. With the method of sigma factors the weighted terms actually change as the number of terms in the partial sums increases. Thus, the
In this section we will show the close connection between the trapezoidal rule and trigonomet- ric expansions. We will use this connection to develop a modified trapezoidal rule with greater accuracy.
Suppose f is defined on the interval Œ0; 1. Let us expand f into a Fourier cosine series, i.e.,
f .x/ D 12 a 0 C a 1 cos x C a 2 cos 2x C : : : : (2.51)
Using the trapezoidal rule we approximate the area A under the curve by the area AN under the inscribed polygon, i.e.,
n
1 2 f .0/^ C^ f
n
C C f
n 1 n
C 12 f .1/ : (2.52)
Substituting (2.51) into (2.52) and rearranging terms, we see that the coefficient of a 0 is one half, the coefficient of the odd term a2k 1 is
1 n
X^ n^1
mD 1
cos
.2k 1/m n
and the coefficient of the even term a2k is
n
nX 1
mD 0
cos
2km n
It can be shown that 1 n
nX 1
mD 1
cos
.2k 1/m n
and 1 n
nX 1
mD 0
cos
2km n
0 for k not a multiple of n 1 for k a multiple of n:
Therefore, A^ N D 1 2 a^0 C^ a2n^ C^ a4n^ C^ : : : :^ (2.55)
The Fourier coefficient a 0 is given by
a 0 D 2
0
f .x/ dx: (2.56)
Therefore,
A^ N D
0
f .x/ dx C a2n C a4n C : : : : (2.57)
It can be seen from equation (2.57) that the error in the trapezoidal rule depends on how fast the Fourier cosine series converges. For many oscillating integrands the trapezoidal rule gives surprisingly good results. Consider the function shown in figure 2.7. Looking at the curve you
0.0 0.2 0.4 0.6 0.8 1. x
−
−
−
0
2
4
f(x)
Figure 2.7: Example function for trapezoidal integration.
would think that it would require at least 20 points to get an accurate value for the integral using the trapezoidal rule. However, since the curve was generated by the formula
f .x/ D cos.x/ 2 cos.2x/ C 3 cos.3x/; (2.58)
it only requires four points to get an exact value. We will now develop a more accurate trapezoidal rule.
Integrating the expression for a2n by parts, we get
1 2 a2n^ D
0
f .x/ cos.2nx/ dx D
f 0 .1/ f 0 .0/ 4n^2
4n^2
0
f 00 .x/ cos.2nx/ dx: (2.59)
Thus, a2n converges like 1=n^2 unless f 0 .1/ D f 0 .0/. In general, f doesn’t have this property. However, the modified function g defined by
g.x/ D f .x/
f 0 .1/ f 0 .0/ 2
x^2 (2.60)
does have the property g^0 .1/ D g^0 .0/. Therefore, we can use the trapezoidal rule on g and obtain an approximation to the integral of f using
Z (^1)
0
f .x/ dx
n
1 2 g.0/^ C^ g
n
C C g
n 1 n
C 12 g.1/ C
f 0 .1/ f 0 .0/ 2
0
x^2 dx
n
1 2 g.0/^ C^ g
n
C C g
n 1 n
C 12 g.1/ C
f 0 .1/ f 0 .0/ 6