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.

calculate frequency energy from spectrum signal

Status
Not open for further replies.

Adnan86

Full Member level 2
Full Member level 2
Joined
Apr 4, 2013
Messages
121
Helped
26
Reputation
52
Reaction score
26
Trophy points
1,308
Visit site
Activity points
2,153
calculate frequency energy from spectrum signal in MATLAB

I am trying to calculat the energy spectrum of a signal in MATLAB.
for example I want calculate this ratio :
(low frequency energy (1 hz to 2 hz)) / (high frequency energy (4 hz to 5 hz)) in the spectrum of the discrete signal .

But, I have no idea how to get energy-Hz for each frequency components.

Any help is much appreciated !
 

at first we use FFT and then for get energy of signal we us SUM of square like this :

Code:
SS = Zigma[ (abs(FFT_Siagnal)).^2]

but SS it's energy of whole of signal . but i want enrgy of signal between for example 2 hz to 3 hz .
so haw i can do that ?
 

Code:
%PSD
 
 FFT_HR_Siagnal = fft(HR_Siagnal,N);
 
 
 Square_HR_Siagnal = (abs(FFT_HR_Siagnal)).^2 ;
 % N,M should determin as Frequence but how ? I dont know !!!
 Energy_low = 0 ;
 for i= N1: N2
     Energy_low = Square_HR_Siagnal(i) + Energy_low ;
 end ;
%  subplot(1 2 1 ) ;
%  plot (Energy_low) ;
 
 Energy_high = 0 ;
 for i= M1:M2
     Energy_high = Square_HR_Siagnal(i) + Energy_high ;
 end ;
 
 AB = Energy_low / Energy_high ;
 

this is signal

- - - Updated - - -

instead N in first row use this :
FFT_HR_Siagnal = fft(HR_Siagnal,:);
 

Attachments

  • HR_Signal.rar
    10 KB · Views: 84

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top