*MAINLY COPY FROM WIKI
Energy spectral density
Fourier transformF[x(t)]=∫∞−∞x(t)exp(−i2πft)dt
inverse transform
x(t)=∫∞−∞F[x(t)]exp(i2πft)df
Energy spectral density describes how the energy of a signal or a time series is distributed with frequency. The term energy is used in the generalized sense of signal processing, that is, the energy E of a singal x(t) is
E=∫∞−∞|x(t)|2dt.
The energy spectral density is most suitable for signal with a finite total energy.
∫∞−∞|x(t)|2dt=∫∞−∞|ˆx(f)|2df,
where
ˆx(f)=∫∞−∞exp(−iwt)x(t)dt,
is the Fourier transform of the signal and w=2πf is angular frequency.
Since the integrate on the right-hand side is the energy of the signal (see eq 1), the integrand |ˆx(f)|2 can be interpreted as a density function describing the energy per unit frequency contained in the signal at the frequency f.
The energy spectral density of a signal x(t) is defined as
Sxx(f)=|ˆx(f)|2.
The definition to a discrete signal with an infinite number of values xn such as a signal sampled at discrete times xn=x(nΔt):
Sxx(f)=|N∑n=1exp(−iwnΔt)xnΔt|2