## Summing spectral lines to give an overall level

## Summing spectral lines to give an overall level

(OP)

I would like some advise about calculating an overall level by summing the amplitude of the individuals lines that make up a frequency spectrum. In my case I am measuring acoustic data and the frequency range I am interested in is 0 to 5kHz. When I summed the individual lines the overall level was slightly higher than I expected. The 'error' would appear to be a linked to the time windowing function that I am using (which is 'Hanning' in the majority of my tests).

Are there correction values that can be applied that take into account the effective bandwidth of the 'filters' or lines in the frequency spectrum. I would be grateful for any additional information on this subject / correction factors for the different time windowing functions (in particular Hanning).

Thanks

Are there correction values that can be applied that take into account the effective bandwidth of the 'filters' or lines in the frequency spectrum. I would be grateful for any additional information on this subject / correction factors for the different time windowing functions (in particular Hanning).

Thanks

## RE: Summing spectral lines to give an overall level

A uniform window has an Amplitude Uncertainity of 56.5%

A Hanning window has an Amplitude Uncertainity of 18.8%

A flat to window has an Amplitude Uncertainity of 1%

Therefore if you want amplitude accuracy you should use a flat top window.

Next, the choice of window has an significant effect on the signal if it has transients. A transient could be missed completely if the wrong window is chosen.

What I am trying to say is that a applying a correction factor would be complex and difficult and it would be easier to remeasure the data.

Hope that helps.

## RE: Summing spectral lines to give an overall level

And of course another most accurate method is the "analog overall" computed directly from time samples. I think that formula is Voverall=sqrt((1/N)*sum{vi^2}) where vi are individual time samples and N is the number of samples

## RE: Summing spectral lines to give an overall level

## RE: Summing spectral lines to give an overall level

machinedoctor

= (sample only)

## RE: Summing spectral lines to give an overall level

To ElectricPete (glow, glow)

Yes - the way to do it is Root Mean Square -RMS.

There was an interesting thread pointing out that

Parsevals Relation shows that RMS in time and

frequency must end up with the same result.

Its a truly wonderful feeling to see that come true.

I used Matlab to do the computations for me.

Go to www.DSPguide.com and get the book

"The Scientist and Engineer's Guide to

Signal Processing" - Particularly the final page

of chapter 10, where Parsevals Relation is

explained. The "trick" explained here is to

remember that X[0]^2 and X[N/2]^2 (first and last

stave squared in the fft of length N) have to be

divided with 2 in order to compensate for the fact

that they only contribute each one half stave width.

This trick is easier to remember once you realise

that the number of fft staves is not N/2 but N/2+1.

In floating point precision the two RMS values come

out with 3-4-5 digits alike - a truly convincing result.

Steven W. Smith who wrote the book I recommend above

ends chapter 10 saying "While Parsevals Relation is

intersting from the physics it describes (conservation

of energy) it has few practical uses in DSP. That is

a big pity, I find. Doing this simple test makes it

easy to "get on solid ground" with results from an fft.

Regards, steeno