Fourier Transform and Applications
- Part 3

ECE generic        Han Q. Le (c)

\

(continued from Part 2)

7. Properties of the Fourier transform and related theorems

7.1 Real and Imaginary part:

Consider:                                    χ[f ]= (∫_(-∞)^∞)x[t](e^(i 2 π f t)) dt                            (7.1.1a)
1. If x[t] is real, then:                 (SuperStar[χ])[f ]= (∫_(-∞)^∞)x[t](e^(-i 2 π f t)) dt =χ[-f ]        (7.1.1b)
2. We can take the Re and Im part:
                                         Re[χ[f ]]= (∫_(-∞)^∞)x[t]Cos[2 π f t] dt                        (7.1.2a)
                                         Im[χ[f ]]= (∫_(-∞)^∞)x[t]Sin[2 π f t] dt                          (7.1.2b)
 We notice that, because of the even and odd property of Cos and Sin function:
                       Re[χ[-f ]]= (∫_(-∞)^∞)x[t]Cos[-2 π f t] dt 
                       = (∫_(-∞)^∞)x[t]Cos[2 π f t] dt 
                        =Re[χ[f ]]                                    (7.1.3)
Hence, Re[χ[f ]] is even, and similarly, Im[χ[f ]] is odd.

3. If x[t] is even, then Im[χ[f ]]=0, or  χ[f ] is purely real
4. If x[t] is odd, then Re[χ[f ]]=0, or  χ[f ] is purely imaginary

Since generally:                   x[t]=(1/2)(x[t]+x[-t]) +(1/2)(x[t]-x[-t]) 
        ≡         (Subscript[x, even])[t]         +         (Subscript[x, odd])[t]               (7.1.4)
The Fourier transform:
                                             χ[f ]=(Subscript[χ, even])[f]  + i (Subscript[γ, odd])[f]                                  (7.1.5)
is a general complex number (neither purely real nor purely imaginary, and thus, the phase of a Fourier transform is related to the function asymmetry. But this symmetry depends on the origin. For example:

Illustration

Manipulate[
If[!TrueQ[tsold== ts],
ftline=Graphics3D[Table[f0=3(jf-37.5)0.02;f1=3(jf-36.5)0.02;
{Hue[(jf/76.),1,1,1]
,Tube[{{((Sinc[f0 π]Cos[2 π f0 ts])/(Sqrt[2. π])),((Sinc[f0 π]Sin[2 π f0 ts])/(Sqrt[2. π])),f0/3.}
,{((Sinc[f1 π]Cos[2 π f1 ts])/(Sqrt[2. π])),((Sinc[f1 π]Sin[2 π f1 ts])/(Sqrt[2. π])),f1/3.}},0.02]},{jf,0,75}]];
tsold=ts;
,];

Grid[{{Plot[UnitBox[t-ts],{t,-2,2}
,PlotStyle->{Thickness[0.0075],Red}
,Filling->{1-> {0,Hue[0.04,1,1,0.4]}}]
,Show[ft3D,ftline]}}
(* ,Background-> Black *)]
,{{ts,0},-1,1}
,Initialization:>{
ft3D=Show[ParametricPlot3D[{((Sinc[3z π])/(Sqrt[2 π])) Cos[ϕ],((Sinc[3z π])/(Sqrt[2 π])) Sin[ϕ],z}
,{ϕ,0,2 π},{z,-0.75,0.75}, PlotPoints->{40, 15}
,PlotRange-> {{-.5,.5},{-.5,.5},{-0.75,0.75}}
,PlotStyle->Opacity[0.6]]
,Graphics3D[{Hue[0.45,1,1,1]
,Arrowheads[0.08],Arrow[Tube[{{0,0,-0.75},{0,0,0.75}},0.01]]
,Text[Style["frequency",14,FontFamily->"Calibri",Hue[0.45,1,1]],{0.,0,0.8}]}]
,PlotRange-> {{-.5,.5},{-.5,.5},{-0.85,0.85}}
,BoxRatios->{1, 1,1.7}
,ImageSize-> 300,Background->Black];

}]

We see that just by translating the signal function away from the origin, the 3D line of the FT twists away from the real axis plane. The added phase (e^(i 2 π f (Subscript[t, shift]))) is meaningless unless there are other signals and their relative phase differences are important. 
We’ll see in Section 7.3 that the phase is also related to relative position of the signal or parts within the signals. An example of the importance of the phase term is wave diffraction of periodic structures.

Illustration 1: Diffraction grating or the CD/DVD/BluRay effect

Illustration 2: phased array antenna:

The relative phase differences between the dipoles determine the bearing, i. e. azimuthal angular direction of the main lobe of the radiation.

7.2 Delta function and Fourier transform

What is the Fourier transform of delta function? We know that delta-function is not a conventional function, but if we apply the formalism:
                                 K[f]=ℱ[δ[t]]= (∫_(-∞)^∞)δ[t](e^(i 2 π f t)) dt =(e^(i 2 π f 0)) =1          (7.2.1)
This is not qualified as true Fourier transform, since the function K[f]=1 is not integrable from -∞ to ∞ and we cannot obtain the inverse transform:
                                             (ℱ^(-1))[K[f]]= (∫_(-∞)^∞)(e^(-i 2 π f t)) df =?                              (7.2.2)
It is indeterminate. However, if t≠0 and if we make the convention that:
                                      (∫_(-∞)^∞)(e^(i 2 π f t)) df = (lim_(N->∞))(∫_(-N/t)^(N/t))(e^(i 2 π f t)) df
then:
                                              (∫_(-∞)^∞)(e^(i 2 π f t)) df ={({{0 if t≠ 0}, {∞ if t=0}})                                    (7.2.3)   
which is a property of δ-function. We still need the property:
                                        x[t]=(∫_(-∞)^∞)x[t']((∫_(-∞)^∞)(e^(i 2 π f (t-t'))) df)dt'                            (7.2.4)
for  (∫_(-∞)^∞)(e^(i 2 π f (t-t'))) df to act like  δ(t-t') .

Let's look at Eqs. (5.1.11a and b) above:
                                                        χ[f ]= (∫_(-∞)^∞)x[t](e^(-i 2 π f t)) dt                             (5.1.9a)
                                                         x[t]=(∫_(-∞)^∞)χ[f](e^(i 2 π f t))df                              (5.1.9b)
If we take χ[f ] in (5.1.9a) and insert in (5.1.9b), we obtain:
                 x[t]=(∫_(-∞)^∞)χ[f](e^(i 2 π f t))df =(∫_(-∞)^∞)(∫_(-∞)^∞)x[t'](e^(-i 2 π f t')) dt' (e^(i 2 π f t))df      (7.2.5)
Rearranging (7.2.5):
                                    x[t]=(∫_(-∞)^∞)x[t']((∫_(-∞)^∞)(e^(-i 2 π f t'))  (e^(i 2 π f t))df) dt'              
                                          =(∫_(-∞)^∞)x[t']((∫_(-∞)^∞)(e^(i 2 π f (t-t')))  df) dt'                                   (7.2.6)
But we recall that:
                                              x[t]=(∫_(-∞)^∞)x[t']δ(t-t')dt'                                            (7.2.7)
Thus, Eqs. (7.2.3) along with (7.2.6) allows us to conclude:
                                         (∫_(-∞)^∞)(e^(i 2 π f (t-t')))  df =δ(t-t')                                            (7.2.8)
Obviously, it is only a convention, but we'll see it can be very convenient. It is obvious by taking the conjugate that  (7.2.8) is valid for both +f or -f in the exponent of the left hand side.

7.3 Fourier Transform Theorems

There are a number of basic properties of FT that are straightforward. Knowing these theorems sometimes can help to find FT without too much work. These are: (in the following, we denotes χ[f] as the FT of x[t], or ℱ[x])
1. Linear superposition:
                      ℱ[(Subscript[a, 1]) (Subscript[x, 1])+(Subscript[a, 2]) (Subscript[x, 2])] = (Subscript[a, 1])  ℱ[(Subscript[x, 1])]  +(Subscript[a, 2]) ℱ[(Subscript[x, 2])]
                                                  = (Subscript[a, 1])  (Subscript[χ, 1])[f]  +(Subscript[a, 2]) (Subscript[χ, 2])[f]             (7.3.1)
2. Translation or time delay
                                   ℱ[ x[t-(Subscript[t, 0])]] =χ[f] (e^(-i 2 π f (Subscript[t, 0]) ))                  (7.3.2)
3. Scaling
                                      ℱ[ x[a t]] =  (1/(|a|)) χ[(f/a)]                             (7.3.3)
A special case is reflection or time reversal:
                             ℱ[ x[- t]] =   χ[-f] =(SuperStar[χ])[f]  (if real)            (7.3.4)

4. Duality:
                                         ℱ[ χ[t]] =  x[-f]                                  (7.3.5)
(this is related to               (ℱ^(-1))[χ[f]]=x[t]                    )           

We have discussed a beautiful illustration of this simple theorem:




5. Frequency shift (translation):    (follow from 2 and 4)
                                      ℱ[ x[t] (e^(i 2 π (Subscript[f, 0])  t ))] =χ[f-(Subscript[f, 0])]                   (7.3.6)
A special case for amplitude modulation:
               ℱ[ x[t] Cos[2 π (Subscript[f, 0])  t ] ] =(1/2)(χ[f-(Subscript[f, 0])]+χ[f+(Subscript[f, 0])])      (7.3.7)

From an app in Part 2:

We see that with a carrier, the Fourier transform of the signal (a ramp in this case) consists of two components centering around (Subscript[f, 0]) and -(Subscript[f, 0])

6. Differentiation:   
                                       ℱ[ ((d^n)/(d(t^n)))x[t] ] = (((i 2 π f))^n)χ[f]                   (7.3.8) 
7. Integration:
                     ℱ[(∫_(-∞)^t)x[t']dt' ]= (((i 2 π f))^(-1))χ[f] +(1/2)χ[0] δ[f]      (7.3.9) 
8. Convolution: (remember this)               
                                        ℱ[ (Subscript[x, 1]) ⊗ (Subscript[x, 2])] =  (Subscript[χ, 1])[f] (Subscript[χ, 2])[f]                     (7.3.10) 
9. Multiplication: (this follows from 8 and 4 above):
                                       ℱ[ (Subscript[x, 1])[t]  (Subscript[x, 2])[t]] =  (Subscript[χ, 1])[f] ⊗(Subscript[χ, 2])[f]              (7.3.11)

7.3.1 An additional note on convolution

Note that the theorem on convolution does involve the Fourier parameters of a given convention of Fourier transform. The above theorem is appropriate when we use the signal processing convention.
Let                                          u[t]=∫(Subscript[x, 1])[θ] (Subscript[x, 2])[t-θ]dθ                    (7.3.12)
We substitute:                         (Subscript[x, 1;2])[θ]=∫ (Subscript[χ, 1;2])[f](e^(i 2 π f θ))df
                                  u[t]=∫∫ (Subscript[χ, 1])[f'](e^(i 2 π f' θ))df' ∫ (Subscript[χ, 2])[f](e^(i 2 π f (t-θ)))df dθ
                                  u[t]=∫df  (Subscript[χ, 2])[f](e^(i 2 π f t))∫df'(Subscript[χ, 1])[f']∫dθ (e^(i 2 π (f' -f) θ)) 
Since:                                    ∫dθ (e^(i 2 π (f' -f) θ)) =δ[f' -f]
                                  u[t]=∫df  (Subscript[χ, 2])[f](e^(i 2 π f t))∫df'(Subscript[χ, 1])[f']δ[f' -f] 
                                         =∫df  (Subscript[χ, 2])[f](Subscript[χ, 1])[f](e^(i 2 π f t))
Thus, it is obvious that:
                                  ℱ[ (Subscript[x, 1]) ⊗ (Subscript[x, 2])] =ℱ[ u]  = (Subscript[χ, 1])[f] (Subscript[χ, 2])[f]           (7.3.13)

The reverse can be similarly proven.
However, we should note that for other convention:
                                  (Subscript[x, 1;2])[θ]=(1/(Sqrt[2 π]))∫ (Subscript[χ, 1;2])[ω](e^(-i ω θ))dω                 (7.3.14)
The result is:
                         u[t]=(1/(2 π))∫∫ (Subscript[χ, 1])[ω'](e^(-i ω' θ))dω' ∫ (Subscript[χ, 2])[ω](e^(-i ω (t-θ)))dωdθ
                               =(1/(2 π))∫dω (e^(-i ω t))(Subscript[χ, 2])[ω]∫ dω' (Subscript[χ, 1])[ω']∫ (e^(i (ω-ω') θ))dθ
Similarly to the above:
                                         (1/(2 π))∫ (e^(i (ω-ω') θ))dθ=δ[ω-ω']         
Hence:
                                        u[t]=∫dω (e^(-i ω t))(Subscript[χ, 2])[ω](Subscript[χ, 1])[ω]
                                        u[t]=(1/(Sqrt[2 π]))∫dω (e^(-i ω t)) (Sqrt[2 π])(Subscript[χ, 2])[ω](Subscript[χ, 1])[ω]
Thus:                 ℱ[ (Subscript[x, 1]) ⊗ (Subscript[x, 2])] =ℱ[ u]  =(Sqrt[2 π]) (Subscript[χ, 1])[ω] (Subscript[χ, 2])[ω]          (7.3.15)
We see that there is this factor (Sqrt[2 π]) that may appear a bit odd, but it is just a factor and does not really affect anything fundamental about this theorem. In fact:
                            (ℱ^(-1)) [ℱ[ (Subscript[x, 1]) ⊗ (Subscript[x, 2])] ]=(Sqrt[2 π]) (ℱ^(-1))[(Subscript[χ, 1])[ω] (Subscript[χ, 2])[ω]]     (7.3.16)  
                                    (Subscript[x, 1]) ⊗ (Subscript[x, 2])=(Sqrt[2 π]) (ℱ^(-1))[(Subscript[χ, 1])[ω] (Subscript[χ, 2])[ω]]     
Or:                                (ℱ^(-1))[(Subscript[χ, 1])[ω] (Subscript[χ, 2])[ω]]=(1/(Sqrt[2 π])) (Subscript[x, 1]) ⊗ (Subscript[x, 2])                (7.3.17a)
Collorally:                     ℱ[(Subscript[x, 1]) × (Subscript[x, 2])]=(1/(Sqrt[2 π]))(Subscript[χ, 1])[ω] ⊗(Subscript[χ, 2])[ω]              (7.3.17b)                  
As long as the coefficient is kept consistently, it will work out fine.

7.4 Generalized functions

We have seen FT of delta function. The following are the FT of generalized functions, which are useful when FT is applied to power signals (instead of only energy signals).

7.4.1 Most common functions

ClearAll[t,f,f0];
funcGen={DiracDelta[t-t0],(E^(I 2 π f0 t)),Cos[2 π f0 t],Sin[2 π f0 t]
,HeavisideTheta[t],Sign[t],(1/(π t))};
FTlist=Table[FourierTransform[u,t,f,FourierParameters->{0,-2 π}]
,{u,funcGen}];
Grid[Join[{Style[#,24,Bold,White,FontFamily->"Century Gothic"]&/@{"function/inverse Fourier T","Fourier T/function"}}
,Transpose[{funcGen,FTlist}]]
,BaseStyle->{24,FontFamily->"Times New Roman"}
,Frame->All,Background->{{Hue[0.15,0.4,1],Hue[0.4,0.4,1]}
,{Hue[0.75,1,0.1],}}]

In traditional format:                    (7.4.1)

In addition to these results, two other related FTs also useful in many applications are Hilbert transform and periodic delta-function sampling waveform or ideal sampling waveform (or impulse sampling waveform).
1- Hilbert transform is defined as:
                                               (OverHat[x])[t]=x[t] *((1 )/(π t)) =((1 )/π)(∫_(-∞)^∞)((x[λ])/(t-λ))dλ                    (7.4.2)
 The FT of  (OverHat[x])[t] is:
                                            ℱ[ (OverHat[x])[t]] =-i sgn[f]  ℱ[ x[t]]  
                 =-i sgn[f] χ[f]                         (7.4.3)
2- An ideal sampling waveform is simply a periodic delta-function: (∑_(m=-∞)^∞)δ[t-m (Subscript[T, s])]. We have studied this in Chapter 3, Lecture 3-2:
                                                 x[t]=(1/(Subscript[T, s])) (∑_(m=-∞)^∞)  (e^(i m ω t)) =(∑_(m=-∞)^∞) δ[t-m (Subscript[T, s])]    
              Its FT is simply:       ℱ[x[t]]=(1/(Subscript[T, s])) (∑_(m=-∞)^∞) ℱ[ (e^(i m ω t))] =(Subscript[f, s]) (∑_(m=-∞)^∞) δ[f-m (Subscript[f, s])]  
or:                                            
                                     ℱ[(∑_(m=-∞)^∞)δ[t-m (Subscript[T, s])]]=(Subscript[f, s]) (∑_(m=-∞)^∞) δ[f-m (Subscript[f, s])]         (7.4.4)

8. Power and Energy Spectral Density

8.1 Introduction

See the ppt part of the lecture.

Link to ppt on the concept of spectrum

8.2 Discussion

Consider the figure above, suppose we have a solar cell that works from 400 nm to 800 nm and want to know how much sun power it can generate, we start by finding out how much total sun power in that wavelength range:
                                   (∫_(400nm)^(800 nm)) P[λ] dλ =  (Subscript[P, 0])                       (8.2.1)

where P]λ] is sunlight power as a function of wavelength. Since (Subscript[P, 0]) is power, in unit of, say, watt, then function P[λ] has to have the unit of watt/(unit of wavelength). Thus, P[λ] is the power per unit of spectral wavelength, or we can just call it “power spectral density”: 
                             P[λ]≡(Underscript[Lim, Δλ-> 0])((P[between λ-((Δλ)/2) and λ+((Δλ)/2)])/(Δλ))           (8.2.2)

8.2.1 Example of discrete spectrum

Now, let’s consider a voltage signal, like this:

sigwave1[x_]:=If[x≤0,0,If[x≤ 1,(x^2),If[x≤2,1,If[x≤ 3,1-2(x-2),
If[x≤ 4,-(((x-4))^2),0]]]]];
Plot[sigwave1[u] /. u-> Mod[x,4],{x,0,20}, AspectRatio->0.3,ImageSize->500]
Grid[{{Plot[sigwave1[u] /. u-> Mod[x,4],{x,0,20}, AspectRatio->0.3,ImageSize->300]
,}
}]

that is applied to our 50-Ω load. What is the power delivered to the load? For instantaneous power, it is:
                                     P[t]=(((v[t])^2)/(Subscript[R, load]))                                            (8.2.3)

Show[Plot[sigwave1[u]^2 /. u-> Mod[x,4],{x,0,20}, AspectRatio->0.3,ImageSize->500]
,Plot[sigwave1[u]^2 /. u-> Mod[x,4] ,{x,8,12},Filling->{1-> {0,Hue[0.05,0.5,1]}}]
,Graphics[{Red,Dashed,Thickness[0.005],Table[Line[{{m,0},{m,1}}],{m,0,20,4}]
,Text[Style["power in one period",Black,Bold,15,FontFamily->"Calibri"],{10,1.2}]}]
,PlotRange->All]

and more relevant is the average power per unit of period: 
                       (Subscript[P, ave])=(1/T)(∫_0^T) P[t] dt =(1/(T (Subscript[R, load])))(∫_0^T) ((v[t])^2) dt          (8.2.4)
For simplicity, from now on, we will drop (Subscript[R, load]) and treat it as 1 because it is just a constant factor.

There is another way to look at power: we have learned from Fourier’s theorem:

sigwave1[x_]:=If[x≤0,0,If[x≤ 1,(x^2),If[x≤2,1,If[x≤ 3,1-2(x-2),
If[x≤ 4,-(((x-4))^2),0]]]]];
T=4.;
fcoef=Chop @ Table[(1/T) Quiet[NIntegrate[sigwave1[x](E^(-I m 2 π x/T)),{x,0.,T}]],{m,0,4}] ;
Grid[{{"signal",,"First "<>ToString[Length[fcoef]-1]<>" non-dc\ncomponents"}
,{Plot[sigwave1[u] /. u-> Mod[x,4],{x,0,20}, AspectRatio->0.3,ImageSize->300]
,"Fourier->"
,Plot[Release[Table[2 Re[fcoef[[m+1]](E^(-I m 2 π t/T))]+(m-1),{m,1,Length[fcoef]-1}]],{t,0,20}
,AspectRatio->1.5]
}
,{"power",,"harmonic power"}
,{Show[Plot[sigwave1[u]^2 /. u-> Mod[x,4],{x,0,20}, AspectRatio->0.3,ImageSize->300]
,Plot[sigwave1[u]^2 /. u-> Mod[x,4] ,{x,8,12},Filling->{1-> {0,Hue[0.05,0.5,1]}}]
,Graphics[{Red,Dashed,Thickness[0.005],Table[Line[{{m,0},{m,1}}],{m,0,20,4}]
,Text[Style["power in one period",Black,Bold,15,FontFamily->"Calibri"],{10,1.2}]}]
,PlotRange->All],,Plot[Release[Table[4 ((Re[fcoef[[m+1]](E^(-I m 2 π t/T))])^2)+0.5(m-1),{m,1,Length[fcoef]-1}]],{t,0,20}
,Filling-> Table[m-> {0.5(m-1),Hue[((m-1.)/(Length[fcoef])),1,1,1]},{m,1,Length[fcoef]-1}],AspectRatio->1.5]}
},BaseStyle->{18,FontFamily->"Calibri"},Frame-> All
,Background->{,{Hue[0.35,0.4,1],,Hue[0.04,0.4,1]}}]

As shown above, we know that each real harmonic component (Subscript[X, m]) (e^(i 2 π m (Subscript[f, 0]) t))+(SuperStar[(Subscript[X, m])])(e^(-i 2 π m (Subscript[f, 0]) t)) delivers an average power:                     (Subscript[P, m])=(1/2) (4((|(Subscript[X, m])|)^2))=2((|(Subscript[X, m])|)^2)               (8.2.5)
then, the total power average power for all components should be:
                                 (Subscript[P, ave])=((Subscript[X, 0])^2) + (∑_(m=1)^∞)2((|(Subscript[X, m])|)^2)                            (8.2.6)

If so, these two expressions of power should be equivalent:
                ({{time-domain power, frequency-domain power}, {(Subscript[P, ave])=(1/T)(∫_0^T) ((v[t])^2) dt  ,  (Subscript[P, ave])=((Subscript[X, 0])^2) + (∑_(m=1)^∞)2((|(Subscript[X, m])|)^2)}})   (8.2.7)

which is Parseval’s theorem that was covered in Chapter 3.

sigwave1[x_]:=If[x≤0,0,If[x≤ 1,(x^2),If[x≤2,1,If[x≤ 3,1-2(x-2),
If[x≤ 4,-(((x-4))^2),0]]]]];
T=4.;fcoefLarge=fcoef=Chop @ Table[(1/T) Quiet[NIntegrate[sigwave1[x](E^(-I m 2 π x/T)),{x,0.,T}]],{m,1,20}] ;
fXdatapl=Transpose[{Range[Length[fcoefLarge]],2((Abs[fcoefLarge])^2)}];
fXdB=Transpose[{Range[Length[fcoefLarge]],10Log[10.,2((Abs[fcoefLarge])^2)]}];
Grid[{{"time domain\npower",Plot[sigwave1[u]^2 /. u-> Mod[x,4] ,{x,0,12}
,Frame->True,GridLines->Automatic
,FrameLabel->{"time","power "}
,Filling->{1-> {0,Hue[0.05,0.5,1]}},ImageSize->300],}
,Join[{"frequency\ndomain power"},ListPlot[#[[1]],PlotStyle->{Red,PointSize[0.03]}
,Frame->True,GridLines->Automatic
,FrameLabel->{"frequency","power "<>#[[2]]}
,LabelStyle->{15,Black,FontFamily->"Calibri"}
,Filling->Bottom,FillingStyle->{Blue,Thickness[0.005]}
,PlotRange->All
,ImageSize->300]& /@ {{fXdatapl,"linear"},{fXdB,"dB"}}]}
,BaseStyle->{18,FontFamily->"Calibri"}]

In the above, we see that power can be expressed as a function of frequency, this is the concept of spectrum: power vs. frequency. In this case, the spectrum is discrete because the frequency set is.

8.2.2 Example of continuous spectrum

However, what if the signal is only one pulse:

sigwave1[x_]:=If[x≤0,0,If[x≤ 1,(x^2),If[x≤2,1,If[x≤ 3,1-2(x-2),
If[x≤ 4,-(((x-4))^2),0]]]]];
Plot[sigwave1[x] ,{x,-4,8}, AspectRatio->0.3,ImageSize->500,PlotRange->All]

The concept of instantaneous power still applies, but over the whole pulse duration, or over all time from -∞ to ∞, assuming that the pulse has only finite duration as shown, the key concept is total energy delivered to the load:
                P[t]=(((v[t])^2)/(Subscript[R, load]))   ;     E=(∫_(-∞)^∞) P[t] dt =(1/(Subscript[R, load]))(∫_(-∞)^∞) ((v[t])^2) dt       (8.2.8)

What becomes to the Fourier transform?

sigwave1[x_]:=If[x≤0,0,If[x≤ 1,(x^2),If[x≤2,1,If[x≤ 3,1-2(x-2),
If[x≤ 4,-(((x-4))^2),0]]]]];
ftfunc=FourierTransform[sigwave1[x],x,f,FourierParameters->{0, -2*Pi}];
ftarr=Abs[Chop[Quiet[ftfunc /. f-> Range[-100,100]*0.05]]];
imgselect=0;
fourierplot=Column[{ListLinePlot[ftarr^2,DataRange->{-5,5}, AspectRatio->0.3,ImageSize->300,PlotRange->All,Filling->Bottom]
,ListLinePlot[Max[#,-40] & /@ 10Log[10.,ftarr^2],DataRange->{-5,5}, AspectRatio->0.3,ImageSize->300,PlotRange->All,Filling->Bottom]}];
Grid[{{"signal",,"Fourier transform"}
,{Plot[sigwave1[x],{x,-4,8}, AspectRatio->0.3,ImageSize->300
,PlotRange->All]
,"Fourier->"
,ListLinePlot[ftarr,DataRange->{-5,5}, AspectRatio->0.3,ImageSize->300,PlotRange->All]
}
,{"instant. power / total energy",,"harmonic power / total energy"}
,{Show[Plot[sigwave1[x]^2  ,{x,-4,8},Filling->{1-> {0,Hue[0.05,0.5,1]}}
,PlotRange->All], AspectRatio->0.3,ImageSize->300],,Button[Dynamic[If[TrueQ[imgselect==0], 
,({{}, {}})]]
,{imgselect=If[NumberQ[imgselect],Mod[imgselect+1,2],0]}]}
},BaseStyle->{18,FontFamily->"Calibri"},Frame-> All
,Background->{,{Hue[0.35,0.4,1],,Hue[0.04,0.4,1]}}]

In fact, for the FT, frequency variable f simply becomes continuous. The absolute square of the FT, ((χ[f])^2) must be somehow proportional to the power or energy density of the harmonic associated with f. In this case, we have a continuous spectrum, and instead of a sum, we have an integral:
                 ({{time-domain energy, frequency-domain energy}, {E=(∫_(-∞)^∞) ((v[t])^2) dt  ,  ?=(∫_(-∞)^∞) ((|χ[f]|)^2) df }})          (8.2.9)

8.3 Parseval’s theorem extension to continuous variable

In Chapter 3, lecture 2, we have learned about Parseval’s theorem for the Fourier series of a periodic function and we mention it again in 8.2.1 example above. Now, let’s take a look at the case of continuous signal.

If a signal is square integrable from -∞ to ∞, i. e.
                                                (∫_(-∞)^∞)|x[t]((|)^2)dt = E                                      (8.3.1)
then, we define it to be an energy signal. For the sake of generality, we will allow x[t] to be complex and if it is associated with a real physical quantity such as voltage, then, like phasor, we’ll let the physical quantity be its real part. If the signal has a Fourier transform, we can substitute to see that:
                                     E=(∫_(-∞)^∞)|x[t]((|)^2)dt =(∫_(-∞)^∞)x[t] (SuperStar[x])[t]dt           
                                        =(∫_(-∞)^∞)((∫_(-∞)^∞)χ[f](e^(i 2 π f t))df) (SuperStar[x])[t]dt                    (8.3.2)
 Re-arranging:
                                      E=(∫_(-∞)^∞)χ[f]((∫_(-∞)^∞)(e^(i 2 π f t)) (SuperStar[x])[t]dt ) df                      (8.3.3)
  We notice that:
                                        ((∫_(-∞)^∞)(e^(i 2 π f t)) (SuperStar[x])[t]dt ) =(SuperStar[((∫_(-∞)^∞)(e^(-i 2 π f t)) x[t]dt )])      
                                                                            =(SuperStar[χ[f] ])                                  (8.3.4)
  Substitute (8.3.4) in (8.3.3), we obtain:
                                       E=(∫_(-∞)^∞)χ[f](SuperStar[χ])[f] df =(∫_(-∞)^∞)|χ[f]((|)^2) df              (8.3.5)
 Comparing (8.3.5) to (8.3.1), we see that:
                                           (∫_(-∞)^∞)|x[t]((|)^2)dt =(∫_(-∞)^∞)|χ[f]((|)^2) df                     (8.3.6)
Thus, we have Parseval's theorem for the continuous FT and we can assert the case above:
                  ({{time-domain energy, frequency-domain energy}, {E=(∫_(-∞)^∞) ((|v[t]|)^2) dt  ,  E=(∫_(-∞)^∞) ((|χ[f]|)^2) df }}).            (8.3.7)

The function
                                               G[f]=((|χ[f]|)^2)                                                   (8.3.8)
represents the energy density per unit of frequency, and we call it energy spectral density. From the pure mathematics perspective however, x[t] can be anything, even variable t needs not be time. If so, why would we use concepts like energy and power as energy per unit time? The answer is simple, it is just a convention.

8.4 Empirical applications and examples

Recall that when we discussed Bode’s plot, we mentioned that who would ever be interested in Bode’s plot for a system with a perfectly known analytic model? It is the empirical Bode’s plot for an unknown system that we want to understand and discover is what make it interesting.

The same can be said to PSD function: the reason we learn it is to apply to data of systems or subjects we want to study. As shown in the ppt files, there are numerous applications of PSD functions. Below, we do a few more and some more in HW.

8.4.1 Sun spots

Consider this example:

This is a phone ring tone of 10 x sun spots data

What is its power spectral density? Notice how funny the units are: for frequency, instead of Hz (1 per second), we have (year^(-1)) or per year. Since the data is monthly, we have max Nyquist frequency of twice a month of 6/year. For the vertical scale, the unit is (ahem...)
                            dBmonthly-averaged-number-of-(sunspots^2)/(year^(-1))

What does it show? First, the 11-year cycle is obvious, and there is a weak 2nd harmonic. But does it appear to have a shorter cycle of 10 year (frequency 0.1/per year) and a long cycle of 0.0112 or ~ 89 year period?

A way to analyze is to plot those components which we will do in HW. For the 89-year component, is it real? Given that the data is only 2.5 century, a cycle of almost a century is statistically meaningless. 

But quite interesting is the high-frequency tail of the spectrum. It almost looks like /1/(f^α) noise, α could 1 or slightly less than 1, and the 1/f noise is as it should be since the sunspots must be related to some internal process that has a cause-and-effect correlation of its past.

8.4.2 Gold price , Bitcoin price, and others

See the following results: (all the data below are from FRED server of the Federal Reserve Bank of St. Louis)
https://fred.stlouisfed.org/

The left hand sides are the price (top) and the relative price change (bottom). Their correspondent power spectral densities are on the right. Below is for gold daily price.

This is for Bitcoin

Besides the remarkable market psychology parallelism between price and bitcoin (both have peak mania and subsequent correction crashes), the PSD tell a fundamental market law. There cannot be any periodicity of the market price daily change, because if so, the price change is predictable and the market would quickly exploit it, destroying any periodicity. Indeed they all obey double-sided Laplacian distribution and the fluctuation is a Brownian process. 

For the price, if the price change is Brownian, it must obey the “drunkard random walk down Wall Street” law and its PSD exhibits 1/f behavior, perfect to a t.

This economic market behavior - based on human trading behavior, is as fundamental and immutable as physical laws or more precisely, human economic genetic behavior. It applies to stock prices, ...anything involving human trading bahavior. Below are the prices of two items as different from gold and Bitcoin as possible, yet the same law applies:

Notice however, there are big differences in the PSD magnitude: the fluctuation of Bitcoin price certainly demonstrate a much high volatility than something as low-risk as US T-bill or something as efficient a commodity as oil.

8.4.3 Earth temperature data from Vostok ice sheet

This is for HW

8.4.4 US consumer behavior

This is for HW: analyze the PSD of VMT in the US.

Should there be any similarity in the PSD of US gasoline consumption and that of vehicle miles traveled?

Driving behavior and gasoline consumption in the US are driven by economic and cultural activities as well as seasonal effects including the weather condition (more in summer, less in winter, occasional peak on Thanksgiving etc.). Regardless of oil price, people will do what they do. But is there any price elasticity? It is NOT just about the absolute gas price because surely, if the price is above $4/gallon, many will drive less -  as it can be seen in those oscillations when the price hit $4/gallon 2011-2014. But more interesting is whether the price change, e. g. 20% increase or decrease would have people to drive slightly more or less? We may also notice that the price tends to go up during Thanksgiving etc. The topic we’ll learn later is regresssion and time-series data correlation that can handle these questions best. However, it is worthwhile for us to look at the PSD to see if there are any interesting features there.

8.5 Empirical-data-based formulation

For all the emprical examples above, it is obvious that we could not have obtained the PSD ((|χ[f]|)^2) via Fourier transform in the strict mathematical sense:
                                 χ[f]=(∫_(-∞)^∞) x[t](e^(-i 2 π f t)) dt                                 (8.5.1)

First, in reality, there is no such a thing as a signal known from -∞ to ∞. The data is available only over some duration T, let’s say from -T/2 to T/2. Then, we can only do this:
                                         (OverTilde[χ])[f]=(∫_(-T/2)^(T/2)) x[t](e^(-i 2 π f t)) dt                       (8.5.2)
and define conceptually: 
                          χ[t]=(Underscript[Lim, T->∞])(OverTilde[χ])[f]=(Underscript[Lim, T-> ∞])(∫_(-T/2)^(T/2)) x[t](e^(-i 2 π f t)) dt            (8.5.3)

In other words, the more data we obtain of signal x[t], the more accurately does function (OverTilde[χ])[f] approximate the true value χ[t].

However, there is a problem with (8.5.2): what it does, is this:

(OverTilde[χ])[f]=(∫_(-∞)^∞) (OverTilde[x])[t](E^(-I 2 π f t)) \[DifferentialD]t        ; 
                          where      (OverTilde[x])[t]=({{\[Piecewise], ({{x[t], -T/2≤ t≤ T/2}, {0, elsewhere}})}})                       (8.5.4)

In other words, it is the Fourier transform of a truncated signal function. Is this correct? Suppose we measure the sun spots like the above example and have data only for 2.5 centuries, should we use a formalism that implicitly assumes the sun spot number was zero before the data is collected and zero afterward for billions of years to come as long as the sun still lives?

A more logical way to handle this (and we’ll see later a natural consequence of  DFT) is that we should just pad the data before and after with the same data we have from -T/2 to T/2. In other words, treat the data as a periodic function with a super long period of T. Then, instead of (8.5.2), we should use the Fourier series component:
                                   (Subscript[(OverTilde[χ]), m])=(1/T)(∫_(-T/2)^(T/2)) x[t](e^(-i 2 π (Subscript[f, m]) t)) dt                       (8.5.5)
with the Fourier component power:
                                    ((|(Subscript[(OverTilde[χ]), m])|)^2)=((|(1/T)(∫_(-T/2)^(T/2)) x[t](e^(-i 2 π (Subscript[f, m]) t)) dt|)^2)           (8.5.6)   
such that Parseval’s theorem can be applied:
                                   (∑_(m=-∞)^∞)((|(Subscript[(OverTilde[χ]), m])|)^2)=(1/T)(∫_(-T/2)^(T/2)) ((|x[t]|)^2) dt                   (8.5.7)

What is essential of Eq. (8.5.7) is this:
                    (Underscript[Lim, T-> ∞])(1/T)(∫_(-T/2)^(T/2)) ((|x[t]|)^2) dt  = True average of x[t]            (8.5.8)
Hence, regardless what T is, whether we observe the sun spots for 5 years for 5 million year, the result of (8.5.8) is still a measure of the true, intrinsic value of the average power of the quantity of interest. The only difference between large-T data and small-T data is about the accuracy and uncertainty, not about the magnitude of the quantity to be measured. In other words, if we measure something with a definite invariant value, we can measure it 5 times or 5000 times to take the mean, it is still the same value that is measured and only the uncertainties of the results are different.

Hence, based on (8.5.7), we can use the same approach when we discuss continuous Fourier transform in  as the case discussed in Section 5.1: we define for the left hand side of (8.5.7):
                          (∑_(m=-∞)^∞)((|(Subscript[(OverTilde[χ]), m])|)^2)  -> (∑_(m=-∞)^∞)(((|(OverTilde[χ])[(Subscript[f, m])]|)^2)/(Δf)) Δf
                        (Underscript[->, if Δf->0 ]) (∫_(-∞)^∞) (Underscript[Lim, Δf->0]) ((((|(OverTilde[χ])[(Subscript[f, m])]|)^2)/(Δf))) df               (8.5.9)

The empirical-based definition of power spectral density is thus: 
                                 PSD[f]=(Underscript[Lim, Δf->0]) ((((|(OverTilde[χ])[f]|)^2)/(Δf)))                                   (8.5.10)
where we drop the dummy subscript m from (Subscript[f, m]).
A more practical expression of (8.5.10) using Eq. (8.5.7) and replacing Δf->0 with T->∞:
               PSD[f]=(Underscript[Lim, T->∞]) (T ((|(1/T)(∫_(-T/2)^(T/2)) x[t](e^(-i 2 π (Subscript[f, m]) t)) dt|)^2))                 (8.5.11a)        
                               =(Underscript[Lim, T->∞]) (1/T) ((|(∫_(-T/2)^(T/2)) x[t](e^(-i 2 π (Subscript[f, m]) t)) dt|)^2)                       (8.5.11b)

This is exactly the formula we used in all the examples of this chapter, including those in Section 8.4, and in all the software utility packages associated with the Fourier series lecture.

8.6 An introduction to noise power spectral density

It may appear that what we learn in this chapter is interesting only if applied to periodic phenomena. That’s actually not true. Power spectral density is also useful to study noise phenomena, especially when noise affecting periodic phenomena of interest. In all electronic devices, noise power spectral density is an important figure of merit, as shown in the example below:

The high-lighted figure above is about voltage noise, not voltage noise power, hence, instead of the unit:
                             noise power  unit = ((V^2)/Hz)  ; 
 the spec sheet shows noise amplitude  unit(Sqrt[((V^2)/Hz)])= (V/(Sqrt[Hz]))

A spec sheet typically shows the (Sqrt[PSD]) for the user to consider in circuit design. Below shows the voltage noise spectral density and the current noise spectral density for the op amp above.

And this shows that not all noises are the same: low frequency noises in the 1/f-characteristic range must be handled differently from high-frequency noises which appear to be flat, or “white-noise” in the above. What does this mean to a user? A user who designs for example, some applications in certain frequency range, e. g. few Hz must be aware of the noise level at that range, which is higher than the noise level for 100 Hz and above.

As a simple example, if a user uses it for a robot with a control operated in the range of few Hz, it is not wise to send/receive the control signal at the baseband, but to modulate the control signal with a higher carrier frequency, e. g. 100 kHz for lower noise, and then demodulate to obtain the baseband signal. Thus, noise spectral density is a very important figure-of-merit.

How is the noise measured to be reported in this spec sheet? Exactly by the approach we just learn above:
                             PSD[f] ~ (1/T) ((|(∫_0^T) x[t](e^(-i 2 π (Subscript[f, m]) t)) dt|)^2)

except that T doesn’t have to be approaching to ∞, but just a few times longer than the lowest (1/f) show, which means just a few seconds shoud suffice.