In this section we will show the other way around: when we are given the waveform in the time-domain of a periodic signal x(t), how can we derive the spectral weights αk? In order to do so we need the following basic property of a phasor function:
The integral over one period T0=1/F0 of a phasor with a harmonic related frequency k⋅F0 results always in zero except for the case k=0.
Mathematically this can be shown as follows:
∫T00ej2πkF0tdt=[ej2πkF0tj2πF0k]T0t=0=ej2πk−1j2πF0k=1−1j2πF0k=0.
Furthermore the integral can be evaluated for k=0 as
∫T00ej2π0F0tdt=∫T001dt=[t]T00=T0−0=T0.
What do the above two equation now actually mean? If we integrate a sinusoidal signal over a number of periods, we are actually summing the areas under the sinusoid. Since the sinusoid has an equal area under as above the horizontal axis per period, the area will sum to zero. However, if k=0, which means that we are talking about a DC signal, the signal does not oscillate around the horizontal axis and therefore the integral will not become zero.
When we normalize and combine the previous two equations we obtain the basic property of phasors
1T0∫T00ej2πkF0tdt={1,for k=00.for k≠0
Since we are sure that a periodic signal x(t), with Fundamental period T0=1/F0, only consists of harmonic related frequencies we can use the above phasor property as follows to analyze which harmonic related frequencies are present in x(t) and what are the complex values of the spectral weights. For this we evaluate the normalized integral over one period T0 of x(t) multiplied by a phasor with harmonic related frequency l⋅F0. Thus with both k and l integer we obtain
In the last step we have used the phasor property to observe that the integral only becomes non-zero when k=l.
Thus when we are given a periodic signal x(t) with period T0=1/F0 then we can find the spectral components ak by using the following Fourier series analysis equation
αk=1T0∫T00x(t)e−j2πkF0tdt.
In practical application it is impossible to evaluate αk for −∞<k<∞. Therefore we can approximate a period signal x(t) with only a limited amount of terms as
^x(t)=N∑k=−Nαkej2πkF0t.
It is obvious that the approximation becomes better and better for larger N.
Example
Given the following periodic signal x(t), evaluate the spectral weights αk. Furthermore, show the approximated periodic signal x(t) when using only up to the first 5 terms.
Ideal periodic block wave x(t).
From the figure it follows that x(t) is a periodic signal with period T0=1/F0=4 [sec]. In most cases it is convenient to evaluate first the DC component α0 of the periodic signal (which can be regarded as just the average value of the signal). The DC component can be calculated simply by averaging as
α0=1T0∫T00x(t)dt=14{∫202dt+∫420dt}=14{4+0}=1.
Furthermore with ω0=2πF0=2π4=π2, we obtain for αkαk=1T0∫T00x(t)e−jω0ktdt=14∫202e−jω0ktdt=14[2e−jω0kt−jω0k]_02,=j2ω0k(e−j2ω0k−1)=jkπ(e−jπk−1)=(e−jπ)k−1kπj=(−1)k−1kπejπ2,=1−(−1)kkπe−jπ2.
Thus except for k=0 all Fourier coefficients with even index k are equal to zero. The Fourier coefficients with odd indices are:
α1=α∗−1=2πe−jπ2,α3=α∗−3=23πe−jπ2,α5=α∗−5=25πe−jπ2,etc.
When approximating this periodic signal with the first N terms we obtain
^x(t)=α0+N∑k=1(αkejkπ2t+α−ke−jkπ2t),=1+4kπN∑k=1,3,5,…cos(kπ2t−π2),=1+4kπN∑k=1,3,5,…sin(kπ2t).
The figure below gives the approximation of the block wave for an increased number of Fourier coefficients, where k is limited between −N and N.
Approximation of an ideal block wave, where the k is limited between −N and N. The value of N is altered during the animation.