Contents
General description
Every periodic function x(t) can be developed into a trigonometric series called »Fourier series« in all areas, where it is continuous or has only finite discontinuities.
Definition: The »Fourier series« of a periodic signal x(t) is defined as follows:
- x(t)=A0+∞∑n=1An⋅cos(nω0t)+∞∑n=1Bn⋅sin(nω0t).
Here the symbols denote the following definitions:
- A0 the »constant component« of x(t),
- An the »cosine coefficients« with n≥1,
- Bn the »sine coefficients« with n≥1,
- ω0=2π/T0 the »basic circular frequency« of the periodic signal (T0 is the period duration).
If the Fourier series should exactly match the actual periodic signal x(t), an infinite number of cosine and sine coefficients must generally be used for calculation.
- If the Fourier series is interrupted and only N of An and Bn coefficients are used, then a slightly different plot of the function results except for some special cases:
- xN(t)=A0+N∑n=1An⋅cos(nω0t)+N∑n=1Bn⋅sin(nω0t).
- The relation between the periodic signal x(t) and the Fourier series approximation xN(t) holds:
- x(t)=limN→∞xN(t).
- If N⋅f0 is the highest frequency occurring in the signal x(t) then of course xN(t)=x(t).
Example 1: We consider two periodic rectangular signals ("square waves"), each with period duration T0 and basic circular frequency ω0=2π/T0.
- For the even (German: "gerade" ⇒ g) time signal sketched above:
- xg(−t)=xg(t).
- The function shown below is odd (German: "ungerade" ⇒ u):
- xu(−t)=−xu(t).
One finds the Fourier series representations of both signals in formularies:
- xg(t)=4π[cos(ω0t)−13⋅cos(3ω0t)+15⋅cos(5ω0t)−...+...],
- xu(t)=4π[sin(ω0t)+13⋅sin(3ω0t)+15⋅sin(5ω0t)+...+...].
- Because of the generally valid relationship
- 1−13+15−17+19−...+...=π4,
- the amplitudes (maximum values) of the rectangular basic pulse result to 1.
- This can also be verified using the signal curves in the graphic:
- xg(t=0)=xu(t=T0/4)=1.
Calculation of the Fourier coefficients
The Fourier coefficient A0 specifies the »direct current (DC) signal component« which can be determined by averaging over the signal course x(t). Due to the periodicity, averaging over one period is sufficient:
- A0=1T0⋅∫+T0/2−T0/2x(t)dt.
- The integration limits can also be selected from t=0 to t=T0 (or over a differently defined period of equal length).
- The determination of the Fourier coefficients An and Bn (n≥1) is based on the property that cosine and sine functions are so-called »orthogonal functions«.
- For them the following applies:
- ∫+T0/2−T0/2cos(nω0t)⋅cos(mω0t)dt={T0/20ifm=n,otherwise
- ∫+T0/2−T0/2sin(nω0t)⋅sin(mω0t)dt={T0/20ifm=n,otherwise
- ∫+T0/2−T0/2cos(nω0t)⋅sin(mω0t)dt=0for allm, n.
Conclusion: Considering these equations, the cosine coefficients An and the sine coefficients Bn result as follows
- An=2T0⋅∫+T0/2−T0/2x(t)⋅cos(nω0t)dt,
- Bn=2T0⋅∫+T0/2−T0/2x(t)⋅sin(nω0t)dt.
The following (German-language) learning video illustrates these equations:
»Zur Berechnung der Fourierkoeffizienten« ⇒ "Calculating the Fourier coefficients".
Example 2: We consider the drawn periodic time function
- x(t)=0.4+0.6⋅cos(ω0t)−0.3⋅sin(3ω0t).
- Since the integral of the cosine and sine functions over one period are identical to zero, the DC signal coefficient is
- A0=0.4.
- One determines the cosine coefficient A1 with following equation (Integration limits from t=0 to t=T0):
- A1=2T0⋅∫T000.4⋅cos(ω0t)dt+2T0⋅∫T000.6⋅cos2(ω0t)dt−2T0⋅∫T000.3⋅sin(3ω0t)⋅cos(ω0t)dt.
- The last integral is equal to zero due to orthogonality; the first one is zero too (integral over one period).
- Only the middle term contributes here to A1, namely 2−0.6−0.5=0.6.
- For all further (n≥2) cosine coefficients all three integrals return the value zero, and thus An≠1=0.
- To determine the sine coefficients Bn using following equation:
- Bn=2T0⋅∫T000.4⋅sin(n ω0t)dt+2T0⋅∫T000.6⋅cos(ω0t)sin(nω0t)dt−2T0⋅∫T000.3⋅sin(3ω0t)sin(nω0t)dt.
- For n≠3 all three integral values are zero and therefore Bn≠3=0.
- On the other hand, for n=3 the last integral provides a contribution, and one gets for the sine coefficient
- B3=−0.3.
- B3=−0.3.
Exploitation of symmetries
Some insights into the Fourier coefficients An and Bn can already be read from the »symmetry properties« of the time function x(t).
- If the time signal x(t) is an even function ⇒ axis-symmetrical around the ordinate (t=0), all sine coefficients Bn disappear, since the sine function itself is an odd function ⇒ sin(−α)=−sin(α):
- Bn=0(n=1, 2, 3,...).
- An odd function x(t) is point-symmetric around the coordinate origin (t=0; x=0). Therefore, all cosine coefficients disappear here (An=0), since the cosine function itself is even. In this case, the DC coefficient is always A0=0.
- An=0(n=0, 1, 2, 3,...).
- If a function without a DC signal component is present (A0=0) and if this function is odd within a period ⇒ x(t)=−x(t−T0/2), then only odd multiples of the basic frequency are present in the Fourier series representation. For the coefficients with an even index, however, the following always applies:
- An=Bn=0(n=2, 4, 6,...).
- If all coefficients An and Bn with even-numbered index (n=2, 4, 6,...) equals zero and the coefficient A0≠0, then the symmetry property mentioned in the last point refers to the DC component and applies:
- x(t)=2⋅A0−x(t−T0/2).
Remark: Several of the named symmetry properties can be fulfilled at the same time.
Example 3: The mentioned properties are now illustrated by three signal waveforms:
- x1(t) is an averaging function ⇒ A0≠0 and it is also even, which is accordingly exclusively determined by cosine coefficients An ⇒ Bn=0.
- In contrast, with the odd function x2(t) all An (n≥0) are identical to zero.
- Also the odd function x3(t) contains only sine coefficients, but because of x3(t)=−x3(t−T0/2) exclusively for odd n–values.
The first part of the following (German-language) learning video explained the symmetry properties of the Fourier coefficients:
- »Eigenschaften der Fourierreihe« ⇒ "Properties and accuracy of Fourier series".
Complex Fourier series
As shown in the section »Representation with cosine and sine components« in case of a harmonic oscillation any periodic signal
- x(t)=A0+∞∑n=1An⋅cos(nω0t)+∞∑n=1Bn⋅sin(nω0t)
can also be displayed using the magnitude and phase coefficients:
- x(t)=C0+∞∑n=1Cn⋅cos(nω0t−φn).
These modified Fourier coefficients have the following properties:
- The »DC coefficient« C0 is identical with A0.
- The »magnitude coefficient« read with n≥1: Cn=√A2n+B2n.
- For the »phase coefficient« applies: φn=arctan(Bn/An).
With the »Eulerian relationship« cos(x)+j⋅sin(x)=ejx we get a second representation variant of Fourier series, which starts from the complex exponential function.
Definition: The »complex Fourier series« of a periodic signal x(t) is as follows:
- x(t)=+∞∑n=−∞Dn⋅ejnω0t.
Here Dn denote the »complex Fourier coefficients«, which can be calculated as follows (valid for n≠0):
- from the cosine coefficients An and the sine coefficients Bn:
- Dn=1/2⋅(An−j⋅Bn),
- from the magnitude coefficients Cn and the phase coefficients φn:
- Dn=1/2⋅Cn⋅e−jφn
The complex Fourier coefficients can also be calculated directly using the following equation
- Dn=1T0⋅∫+T0/2−T0/2x(t)⋅e−jnω0tdt.
As long as the integration interval T0 is preserved, it can be shifted randomly as with the coefficients An and Bn, e.g. from t=0 to t=T0.
Conclusion: The coefficient D0=A0 is always real. For the complex coefficients with negative index (n<0) applies:
- D−n=D⋆n=1/2⋅(An+j⋅Bn).
Periodic signal spectrum
Starting from the complex Fourier series
- x(t)=+∞∑n=−∞Dn⋅ejnω0t
and the »shifting theorem« (for the frequency domain) one gets the following spectrum for the periodic signal x(t):
- X(f)=+∞∑n=−∞Dn⋅δ(f−n⋅f0).
This means:
- The (amplitude) spectrum of a periodic signal with period duration T0 is a »line spectrum« for integer multiples of the basic frequency f0=1/T0.
- The »DC signal component« returns a »Dirac delta function« at f=0 with the impulse weight A0.
- There are also Dirac delta functions δ(f±n⋅f0) at the multiples of f0,
- where δ(f−n⋅f0) denotes a Dirac delta function at f=n⋅f0 (namely in the positive frequency domain)
- and δ(f+n⋅f0) denotes a Dirac at the frequency f=−n⋅f0 (in the negative frequency domain).
- The impulse weights for n≠0 are generally complex.
These statements will now be illustrated by two examples.
Example 4: We consider as in Example 1 two periodic rectangular signals, each with period duration T0 and basic frequency f0=1/T0. The upper signal
- xg(t)=4/π⋅[cos(ω0t)−1/3⋅cos(3ω0t)+1/5⋅cos(5ω0t)−...+...]
is an even (German: "gerade" ⇒ "g") function, composed of different cosine parts.
Therefore:
- The corresponding spectral function Xg(f) is thus purely real.
- Reason: As described in the section »Spectral Representation of a cosine signal« the basic wave returns two Dirac delta functions at ±f0, each weighted with 2/π.
- This weighting corresponds to the (generally complex) Fourier coefficients D1=D∗−1, which are only real in the special case of an even function.
- Other Dirac delta functions are available in
- ±3f0 (negative),
- ±5f0 (positive),
- ±7f0 (negative), etc.
- All phase values φn are either zero or π due to the alternating signs.
⇒ The function xu(t) shown below is odd (German: "ungerade" ⇒ "u"):
- xu(t)=4/π⋅[sin(ω0t)+1/3⋅sin(3ω0t)+1/5⋅sin(5ω0t)+...].
- As described in the section »General Spectral Representation« the basic wave provides two Dirac delta functions
- at +f0 (weighted with −j⋅2/π) resp.
- at −f0 (weighted with +j⋅2/π).
- All other Dirac delta functions at ±3f0, ±5f0, ... are also purely imaginary and located in the same direction as the Dirac delta functions at ±f0.
- The two magnitude spectra are equal: |Xu(f)|=|Xg(f)|.
The Gibbs phenomenon
Not every periodic signal is suitable for the Fourier series. Some restrictions below:
- An important condition for the convergence of the Fourier series is that the signal may only have a finite number of discontinuities per period.
- At those places t=ti, where x(t) has jumps, the series converges to the arithmetic mean value formed by the respective left and right boundary value.
- In the surrounding area of such discontinuities, high-frequency oscillations usually occur in the series representation. This error is of principle kind, i.e. it could not be avoided too, if infinite summands would be considered. One speaks of the "Gibbs phenomenon", named after the physicist Josiah Willard Gibbs.
- An increase of N reduces the erroneous range but not the maximum deviation between x(t) and the Fourier series representation xN(t). The maximum error is independent of N about 9% of the jumping amplitude.
The Gibbs phenomenon and other interesting aspects of comparable effects are presented in the (German-language) learning video
»Eigenschaften der Fourierreihendarstellung« ⇒ "Properties and accuracy of the Fourier series".
Example 5: The left graphic shows a dotted section of a periodic ±1 rectangular signal and the corresponding Fourier series representation with N=1 (blue), N=3 (red) and N=5 (green) summands.
- The basic wave here has the amplitude value 4/π≈1.27.
- Even with N=5 (this means because of A2=A4=0 three "relevant" summands) the Fourier series still differs significantly from the approximated rectangular signal, especially in the area of the edge.
⇒ From the right graphic you can see that the flank and the inner area are well reproduced with N=100 but due to the Gibbs phenomenon there are still oscillations around 9% at the jumping point.
- Since the jump amplitudes here are equal to 2 the maximum values are approximately ±1.18.
- With N=1000 the oscillations would be exactly the same size, but limited to a narrower space and possibly not recognizable with discrete-time representation.
Exercises for the chapter
Exercise 2.4: Rectified Cosine
Exercise 2.4Z: Triangular Function
Exercise 2.5: Half-Wave Rectification
Exercise 2.6: Complex Fourier Series
Exercise 2.6Z: Magnitude and Phase