DSPRelated.com
Forums

signal power

Started by lucapp September 5, 2008
Hi all,

I have the following problem:

a snapshot of a signl s[n], n=0.....N-1.
I compute signal power like this: P=1/n*sum(abs(s[n])^2) n=0,...,N-1.

After this I make S=fft(s)
and
P'=sum(abs(S)^2). 

Missing out a normalization parameter (depending from fft definition) I
have the same result.

Suppose noe that I want to use a window function with fft like hanning
(for example) my new signal is:

s2[n]=w[n]*s[n].(P2=power of s2=1/n*sum(abs(s2[n])^2)!=P)
 
Assuming that the real power of the signal (the power of the signal that
is on the air) is P,
how can I obtain the same result using s2[n]? 

Thanks in advance
Luca




On Sep 5, 8:46&#4294967295;am, "lucapp" <pascale.luca...@gmail.com> wrote:
> Hi all, > > I have the following problem: > > a snapshot of a signl s[n], n=0.....N-1. > I compute signal power like this: P=1/n*sum(abs(s[n])^2) n=0,...,N-1. > > After this I make S=fft(s) > and > P'=sum(abs(S)^2). > > Missing out a normalization parameter (depending from fft definition) I > have the same result. > > Suppose noe that I want to use a window function with fft like hanning > (for example) my new signal is: > > s2[n]=w[n]*s[n].(P2=power of s2=1/n*sum(abs(s2[n])^2)!=P) > > Assuming that the real power of the signal (the power of the signal that > is on the air) is P, > how can I obtain the same result using s2[n]? > > Thanks in advance > Luca
Scale the window.
>Scale the window.
Hi John, I have already scaled the window (i.e I have a win with power=1, sqrt(sum(win^2))) but i dont obtain the same result again. any further suggestion ?
On Sep 5, 8:46 am, "lucapp" <pascale.luca...@gmail.com> wrote:
> Hi all, > > I have the following problem: > > a snapshot of a signl s[n], n=0.....N-1. > I compute signal power like this: P=1/n*sum(abs(s[n])^2) n=0,...,N-1. > > After this I make S=fft(s) > and > P'=sum(abs(S)^2). > > Missing out a normalization parameter (depending from fft definition) I > have the same result. > > Suppose noe that I want to use a window function with fft like hanning > (for example) my new signal is: > > s2[n]=w[n]*s[n].(P2=power of s2=1/n*sum(abs(s2[n])^2)!=P) > > Assuming that the real power of the signal (the power of the signal that > is on the air) is P, > how can I obtain the same result using s2[n]? > > Thanks in advance > Luca
Luca, I don't think there's any easy relationship between P2 and P in this case. The best you can do is prove an inequality relating P2, P and the power of w[n]. Thanks, Dilip.
lucapp <pascale.luca.it@gmail.com> wrote:

>>Scale the window.
>Hi John, > >I have already scaled the window >(i.e I have a win with power=1, sqrt(sum(win^2))) >but i dont obtain the same result again.
>any further suggestion ?
For windowed power measurements you need to scale the window by a fudge factor that may depend on the statistics of your signal. Therefore, run some simulations with the signal of interest and determine which scale factor to use. Steve
>lucapp <pascale.luca.it@gmail.com> wrote: > >>>Scale the window. > >>Hi John, >> >>I have already scaled the window >>(i.e I have a win with power=1, sqrt(sum(win^2))) >>but i dont obtain the same result again. > >>any further suggestion ? > >For windowed power measurements you need to scale the window by a >fudge factor that may depend on the statistics of your signal. >Therefore, run some simulations with the signal of interest and >determine which scale factor to use. > >Steve >
My problem is to compute the power of a signal that is present between fft bin #i and fft bin #j using a windowed FFT. j-i<(=)FFT_DIMENSION. any solution ? Thanks
lucapp <pascale.luca.it@gmail.com> wrote:

>>lucapp <pascale.luca.it@gmail.com> wrote:
>>>I have already scaled the window >>>(i.e I have a win with power=1, sqrt(sum(win^2))) >>>but i dont obtain the same result again.
>>>any further suggestion ?
>>For windowed power measurements you need to scale the window by a >>fudge factor that may depend on the statistics of your signal. >>Therefore, run some simulations with the signal of interest and >>determine which scale factor to use.
> My problem is to compute the power of a signal that is present > between fft bin #i and fft bin #j using a windowed FFT. > j-i<(=)FFT_DIMENSION.
>any solution ?
Your problem as stated may not have any reasonable solution. An FFT is a transform, not a power measurement. If you want to measure power within a frequency band, compute the power spectral density instead. Steve
> >Thanks >
> >Your problem as stated may not have any reasonable solution. >An FFT is a transform, not a power measurement. If you want >to measure power within a frequency band, compute the power >spectral density instead. > >Steve
Thanks Steve for your reply. I have a clarification to do: I have the IQ samples of a portion of air spectrum with band B. I want to compute the power of a signal that is present in a sub-band of B. I was thinkin to use FFT bin samples of that sub-band to compute tha power. How con be computed that power ?
lucapp <pascale.luca.it@gmail.com> wrote:

>>Your problem as stated may not have any reasonable solution. >>An FFT is a transform, not a power measurement. If you want >>to measure power within a frequency band, compute the power >>spectral density instead.
>>Steve
>Thanks Steve for your reply. >I have a clarification to do: > >I have the IQ samples of a portion of air spectrum with band B. >I want to compute the power of a signal that is present in a sub-band of >B. > >I was thinkin to use FFT bin samples of that sub-band to compute tha >power.
>How con be computed that power ?
Are you just researching a signal you have sampled, or do you need to implement this frequency analysis as part of a system design? If the former, and you have Matlab, you could use freqz(). If the latter, or if freqz() is not adequate, you really want to do a real PSD calculation: window the data; compute the autocorrelation function; window the autocorrelation function, then perform a cosine transform on it. This gives you the PSD. The power within a range of frequencies is proportional to the PSD summed over those frequencies. Note that, unlike an FFT, the number of points in this transform can be whatever you like and it is not related to the size of the initial dataset or even the length of the autocorrelation window. You will still have to calibrate the result with a scale factor. Once you have a PSD function created, feed sinusoids of known power into it to determine the scale factor needed. Watch out for negative PSD values, which sometimes can happen with this approach. (But not with "well behaved" signals.) Hope this helps. Steve
>lucapp <pascale.luca.it@gmail.com> wrote: > >>>Your problem as stated may not have any reasonable solution. >>>An FFT is a transform, not a power measurement. If you want >>>to measure power within a frequency band, compute the power >>>spectral density instead. > >>>Steve > >>Thanks Steve for your reply. >>I have a clarification to do: >> >>I have the IQ samples of a portion of air spectrum with band B. >>I want to compute the power of a signal that is present in a sub-band
of
>>B. >> >>I was thinkin to use FFT bin samples of that sub-band to compute tha >>power. > >>How con be computed that power ? > >Are you just researching a signal you have sampled, or do >you need to implement this frequency analysis as part of >a system design? > >If the former, and you have Matlab, you could use freqz(). > >If the latter, or if freqz() is not adequate, you really want to >do a real PSD calculation: window the data; compute the autocorrelation >function; window the autocorrelation function, then perform a >cosine transform on it. This gives you the PSD. The power within a >range of frequencies is proportional to the PSD summed over those >frequencies. > >Note that, unlike an FFT, the number of points in this transform >can be whatever you like and it is not related to the size of the >initial dataset or even the length of the autocorrelation window. > >You will still have to calibrate the result with a scale >factor. Once you have a PSD function created, feed sinusoids >of known power into it to determine the scale factor needed. > >Watch out for negative PSD values, which sometimes can happen >with this approach. (But not with "well behaved" signals.) > >Hope this helps. > >Steve
Hi Steve, I have a signal from a digital receiver in form of IQ samples. Next day I investigate about this method but..... the proportionality factor is not exactly the same problem that I have if use the FFT? So.. what is the difference into use FFT or PSD (excluding the goodness of the power estimation)?? Thanks Luca