Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

any suggestions for how to calculate energy of a signal in FFT

Status
Not open for further replies.

harithota20

Junior Member level 2
Joined
Jul 22, 2010
Messages
20
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Location
kolkata
Activity points
1,397
anybody,please help me in getting the energy of a signal in FFT in MATlab.
 

thank you for your reply, but i want know how to calculate value of the signal energy, from its FFT, the area under the curve is equal to energy of the signal? below code is correct to calculate energy of signal?
fs = 10000; % Sample frequency (Hz)
load imf1.txt;
x=imf1;
t = 1:length(x);
m = length(x); % Window length
n = pow2(nextpow2(m));% Transform length
y = fft(x,n); % DFT
f = (0:n-1)*(fs/n); % Frequency range
power = y.*conj(y)/n; % Power of the DFT
m = max((fft(x,n)));
figure(1);
plot(f,power)
xlabel('Frequency (Hz)')
ylabel('Power')
title('{\bf Periodogram}')
y0 = fftshift(y); % Rearrange y values
f0 = (-n/2:n/2-1)*(fs/n); % 0-centered frequency range
power0 = y0.*conj(y0)/n;% 0-centered power
figure(2);
plot(f0,power0)
xlabel('Frequency (Hz)')
ylabel('Power')
title('{\bf 0-Centered Periodogram}')
figure(3);
h = area(fft(x).^2);

the value of "h" will give the energy of the signal in FFT?? and how to calculate center frequency of the FFT?

please help me!!
 

The area under the squared spectrum is the energy, if h is the area under FFT, then it is the energy.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top