[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem using the hanning function in embedded mode

From: Macy
Subject: Re: Problem using the hanning function in embedded mode
Date: Mon, 24 Dec 2012 06:32:45 -0800

You probably noticed these already but just in case...

If you wish to 'presrve' the true rms of any signal, be sure to multiply the 
hanning function by 2, else you will apparently attenuate the signal and lower 
the energy in your packet. For hamming, multiply by 2/1.08

For any real signal, like an audio signal, the FFT yields a 'duplicated' 
spectrum. Usually the lower half the spectrum is of any real interest. To then 
preserve true rms, multiply the FFT with sqrt(2)/N, where N is the number of 
terms in your FFT. Then, the values that you retrieve from the lower half 
spectrum are true rms values.

You can leave out all these coefficients and obtain answers in 'relative' 
terms. But getting results in true rms has the advantage of enabling you to 
compare spectrums derived from different packet sizes [equivalent to changing 
the BW in a spectrum analyzer]; compare calculations to actual measurements; 
and relate to noise in the system, etc.

Also, hamming is awful for 'out of sync' signals and hanning is a bit better. 
Yet there is another function used by the ADC/DAC industry which is a bit more 
complicated. Find TI's App Notes relating to their 24 bit audio ADC's 
especially the ADS1282. They use a different window function that provides 
better separation between signals [to make their products look better] when the 
signals are not sync'ed to the ADC process for use in audio systems.

If you're making some type of presentation of results you may wish to use the 
same type window function to 'lower' the energy in the spectrum between 
signals. Make the display 'cleaner'.

--- address@hidden wrote:

From: Nicanor García <address@hidden>
To: address@hidden
Subject: Problem using the hanning function in embedded mode
Date: Sun, 23 Dec 2012 11:46:37 -0500

Hello, I'm currently developing a standalone audio signal processing
application and I'm using octave for the processing part. I'm working in
Ubuntu Linux (though I'll be moving soon to Linux Mint), and using

My process involves taking the FFT of the series of windows of a signal,
and for that I'm also using the hanning function to get a hanning window.

The code works perfectly when run from octave in console, but when I try to
use it in the application I detected that the hanning function returns only
zeros. The same happens with the hamming function.

This only happens when I use the embedded mode in the program.  And is the
only problem involving Octave I have detected.

I searched throughly in all the resources provided by Octave and across the
web and found nothing about this issue, so I'm asking here for your help.

Thank you very much.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]