# Parseval’s theorem! Time-domain, frequency domain equivalence.

Parseval’s theorem can be used to show that

Total energy of waveform computed in time domain is equal to the total energy of the waveform’s Fourier Transform computed in the frequency domain.

OR

Total energy of a signal can be calculated by summing power-per-sample across time or spectral power across frequency.

As shown in below equation where x(n) is in time domain and X(k) is Fourier transform of x(n).

Why this is sometimes very useful in wireless communication systems implementation. Time and frequency domain equivalence give flexibility to calculate total energy of waveform in time or frequency domain.

Lets see this with an example in Matlab.

close all;
Fs=40;f=4;Ts=1/Fs;T=2;t=0:Ts:T-Ts;N=length(t);
x=2cos(2pift);
fx=fft(x);
figure,
subplot(1,2,1), area(t,abs(x.^2)),title(‘ Time Domain’);
subplot(1,2,2),area(abs(fx)), title(‘ Frequency Domain’);
E1_timedomain=sum(abs(x.^2))
E1_frequdomain=sum(abs(fx.^2))/N

Output of the MATLAB script can be seen below. This shows the equivalence in time and frequency domain.

Ref:

Youssef Khmou (2021). Parseval’s Theorem : 1D,2D and 3D functions (https://www.mathworks.com/matlabcentral/fileexchange/43041-parseval-s-theorem-1d-2d-and-3d-functions), MATLAB Central File Exchange. Retrieved January 15, 2021.