# safe FFT resolution reduction and transfer functions

Started by November 29, 2009
Hi All,

The context:

I'm using Matlab to calculate a transfer function based on
spectra measured with several data-acq systems.

My problem is that the FFTs are "hi" resolution
and because of the different setups, the resonant frequencies
don't line up nicely. I suspect the resulting transfer function
doesn't capture the true system.

I'd like to reduce the resolution of the FFTs from 16 kHz, to 8 kHz,
to 4kHz, ... etc until the frequency bin width of the measurements is
large enough to engage the different measurements.

The question:

Assuming I only have the "hi" resolution FFTs, amplitude and phase,
and that they are good, ie properly filtered, properly windowed,
properly overlapped, properly averaged, whats the best way to reduce the
resolution?

1. do an inverse FFT, decimate/resample the calculated time
domain data, then do a lower resolution FFT  (no windowing,
no overlapping, and no averaging required, right?)?

3. or try something you haven't thought of yet

TIA,

RIH5342
On 29 Nov, 22:02, "rih5342" <rob.hic...@us.bosch.com> wrote:
> Hi All, > > The context: > > I'm using Matlab to calculate a transfer function based on > spectra measured with several data-acq systems. > > My problem is that the FFTs are "hi" resolution > and because of the different setups, the resonant frequencies > don't line up nicely. I suspect the resulting transfer function > doesn't capture the true system. > > I'd like to reduce the resolution of the FFTs from 16 kHz, to 8 kHz, > to 4kHz, ... etc until the frequency bin width of the measurements is > large enough to engage the different measurements. &#2013266080; > > The question: > > Assuming I only have the "hi" resolution FFTs, amplitude and phase, > and that they are good, ie properly filtered, properly windowed, > properly overlapped, properly averaged, whats the best way to reduce the > resolution?
If you want to blur the spectra, use shorter observation sequeces. For a given sampling frequency, reduce the FFT length, observation length, frame length, or whatever you want to call it. Rune
On Nov 29, 4:20&#2013266080;pm, Rune Allnor <all...@tele.ntnu.no> wrote:
> On 29 Nov, 22:02, "rih5342" <rob.hic...@us.bosch.com> wrote: > > > > > > > Hi All, > > > The context: > > > I'm using Matlab to calculate a transfer function based on > > spectra measured with several data-acq systems. > > > My problem is that the FFTs are "hi" resolution > > and because of the different setups, the resonant frequencies > > don't line up nicely. I suspect the resulting transfer function > > doesn't capture the true system. > > > I'd like to reduce the resolution of the FFTs from 16 kHz, to 8 kHz, > > to 4kHz, ... etc until the frequency bin width of the measurements is > > large enough to engage the different measurements. &#2013266080; > > > The question: > > > Assuming I only have the "hi" resolution FFTs, amplitude and phase, > > and that they are good, ie properly filtered, properly windowed, > > properly overlapped, properly averaged, whats the best way to reduce the > > resolution? > > If you want to blur the spectra, use shorter observation > sequeces. For a given sampling frequency, reduce the > FFT length, observation length, frame length, or whatever > you want to call it.
If you have N observations with t = dt*(0:N-1), dt = 1/Fs, frequency resolution is given by df = 1/T, T = N*dt. To reduce resolution, increase df by decreasing T = N*dt = N/Fs. I guess you could keep N constant and increase the sampling frequency. However, I can't think of a good reason for doing so. The obvious answer is to keep Fs constant and decrease N. Then you can just use your existing data and obtain two reduced resolution spectra which can be combined. Hope this helps. Greg
If you have to do something like you described, that simply means you do
the initially wrong things and possibly in the wrong way. Think of what
you are doing first.

"Matlab does all thinking for us" (TM)

DSP and Mixed Signal Design Consultant
http://www.abvolt.com

rih5342 wrote:

> Hi All, > > The context: > > I'm using Matlab to calculate a transfer function based on > spectra measured with several data-acq systems. > > My problem is that the FFTs are "hi" resolution > and because of the different setups, the resonant frequencies > don't line up nicely. I suspect the resulting transfer function > doesn't capture the true system. > > I'd like to reduce the resolution of the FFTs from 16 kHz, to 8 kHz, > to 4kHz, ... etc until the frequency bin width of the measurements is > large enough to engage the different measurements. > > The question: > > Assuming I only have the "hi" resolution FFTs, amplitude and phase, > and that they are good, ie properly filtered, properly windowed, > properly overlapped, properly averaged, whats the best way to reduce the > resolution? > > 1. do an inverse FFT, decimate/resample the calculated time > domain data, then do a lower resolution FFT (no windowing, > no overlapping, and no averaging required, right?)? > > 2. or do an intelligent addition of adjacent bins? > > 3. or try something you haven't thought of yet > > TIA, > > RIH5342

It's impossible to anticipate everything every time, and cranking out 16
kHz, 8 kHz, ..etc. FFTs for every measurement and every data channel (100
+) just isn't practical.

Judging what frequency resolution is best can only be done after you have
most of the data.

Let me reword the question.

Doesn't the INVERSE
of a properly filtered, windowed, overlapped, and averaged FFT
produce time data with a KNOWN period and therefor doesn't need windowing?

There's no need to overlap or average one period of data. I also think
the averaging in the frequency domain improves the quality of the
calculated time domain data.

I'm not a fan of Matlab, and like it or not, it is the computational tool
recent engineering graduates know and WILL use.

RIH5342

> >If you have to do something like you described, that simply means you do
>the initially wrong things and possibly in the wrong way. Think of what >you are doing first. > >"Matlab does all thinking for us" (TM) > > >Vladimir Vassilevsky >DSP and Mixed Signal Design Consultant >http://www.abvolt.com > > > > > >rih5342 wrote: > >> Hi All, >> >> The context: >> >> I'm using Matlab to calculate a transfer function based on >> spectra measured with several data-acq systems. >> >> My problem is that the FFTs are "hi" resolution >> and because of the different setups, the resonant frequencies >> don't line up nicely. I suspect the resulting transfer function >> doesn't capture the true system. >> >> I'd like to reduce the resolution of the FFTs from 16 kHz, to 8 kHz, >> to 4kHz, ... etc until the frequency bin width of the measurements is >> large enough to engage the different measurements. >> >> The question: >> >> Assuming I only have the "hi" resolution FFTs, amplitude and phase, >> and that they are good, ie properly filtered, properly windowed, >> properly overlapped, properly averaged, whats the best way to reduce
the
>> resolution? >> >> 1. do an inverse FFT, decimate/resample the calculated time >> domain data, then do a lower resolution FFT (no windowing, >> no overlapping, and no averaging required, right?)? >> >> 2. or do an intelligent addition of adjacent bins? >> >> 3. or try something you haven't thought of yet >> >> TIA, >> >> RIH5342 >

rih5342 wrote:

> It's impossible to anticipate everything every time, and cranking out 16 > kHz, 8 kHz, ..etc. FFTs for every measurement and every data channel (100 > +) just isn't practical. > > Judging what frequency resolution is best can only be done after you have > most of the data. > > Let me reword the question. > > Doesn't the INVERSE > of a properly filtered, windowed, overlapped, and averaged FFT > produce time data with a KNOWN period and therefor doesn't need windowing?
No.
> There's no need to overlap or average one period of data. I also think > the averaging in the frequency domain improves the quality of the > calculated time domain data.
Huh?
> I'm not a fan of Matlab, and like it or not, it is the computational tool > recent engineering graduates know and WILL use.
I don't give a damn about FFTs, Matlabs or whatever recent engineering punks have instead of brains. You have to do weird things which means your approach to the problem is incorrect. Instead of wiggling with data, could you tell what is the whole problem, what do you have at the input, and what should you get at the output. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
On Nov 29, 4:02 pm, "rih5342" <rob.hic...@us.bosch.com> wrote:
> > I'm using Matlab to calculate a transfer function based on > spectra measured with several data-acq systems. > > My problem is that the FFTs are "hi" resolution > and because of the different setups, the resonant frequencies > don't line up nicely.
you are trying to measure a composite spectrum from several sources?
> I suspect the resulting transfer function > doesn't capture the true system. > > I'd like to reduce the resolution of the FFTs from 16 kHz, to 8 kHz, > to 4kHz, ... etc until the frequency bin width of the measurements is > large enough to engage the different measurements. > > The question: > > Assuming I only have the "hi" resolution FFTs, amplitude and phase, > and that they are good, ie properly filtered, properly windowed, > properly overlapped, properly averaged, whats the best way to reduce the > resolution? > > 1. do an inverse FFT, decimate/resample the calculated time > domain data,
that would mean tossing the high frequency data in the data that goes into this iFFT.
> then do a lower resolution FFT (no windowing, > no overlapping, and no averaging required, right?)?
i think a butt-splice can be made into a complementary splice. if it's a butt-splice, it would be no overlap. but, i think a constraint on the windowing and overlapping is that the overlapping windows add to a constant 1. there are overlapping splices that satisfy that constraint also.
that's convolution and that has multiplicative (as with a transfer function) in the other domain. it's sorta the same as doing the iFFT and multiplying by a low-pass transfer function and iFFTing back.
> 3. or try something you haven't thought of yet
how could anyone answer that question with "yes"? anyway, i think that "reducing the resolution" in the frequency domain means the same as shortening the impulse response in the time-domain data. and you can shorten it by truncating it with some multiplicative window that goes to zero as t increases. so numbers 1 and 2 are sorta two different ways of doing the same thing. On Nov 29, 8:13&#2013266080;pm, Vladimir Vassilevsky <nos...@nowhere.com> wrote:
>
...
> I don't give a damn about FFTs, Matlabs or whatever recent engineering > punks have instead of brains.
my goodness, the hapless OP pays for his question.
> You have to do weird things which means > your approach to the problem is incorrect.
Vlad, that's not always true. sometimes doing the weird thing is the correct approach. i think that general relativity is more correct *and* weirder than newtonian gravitation.
> could you tell what is the > whole problem, what do you have at the > input, and what should you get at the output.
i think he wants to smooth out those different bumps that he gets from the different sensors. or something that makes the "resonant frequencies don't line up nicely". so we're gonna smooth out them damn resonant frequencies. i dunno, it's just a guess. r b-j
On Nov 29, 1:02 pm, "rih5342" <rob.hic...@us.bosch.com> wrote:
> Hi All, >
Your post has received many responses giving little help. There are reasons for this. You do not provide adequate context or clear technical statements. Examples follow:
> The context: > > I'm using Matlab to calculate a transfer function based on > spectra measured with several data-acq systems.
Why does this matter? Are there different sample frequencies?
> > My problem is that the FFTs are "hi" resolution
Resolution has a number of inconsistent meanings, later you use bin width, is "hi" resolution bigger or smaller bin width? Do you really mean bin spacing? When windowing is applied, it changes bin width but not bin spacing. Consider using bin spacing.
> and because of the different setups, the resonant frequencies > don't line up nicely. I suspect the resulting transfer function > doesn't capture the true system.
"line up nicely" and "capture the true system" are not technical terms that communicate useful meaning.
> > I'd like to reduce the resolution of the FFTs from 16 kHz, to 8 kHz, > to 4kHz, ... etc until the frequency bin width of the measurements is > large enough to engage the different measurements. > > The question: > > Assuming I only have the "hi" resolution FFTs, amplitude and phase, > and that they are good, ie properly filtered, properly windowed, > properly overlapped, properly averaged, whats the best way to reduce the > resolution?
Windowing is combined with overlapping and averaging most often with power or magnitude data. if so you have no useful phase information. If you have frequency domain data from rectangular windowed data (sometimes referred to as unwidowed) and have magnitude and phase, you can reconstruct the complex fft coefficients. If the frequency components you want to measure are well separated at of adequate SNR, you can apply a frequency domain flattop window to get an accurate amplitude reading regardless of signal position relative to bin centers. Take a look at: http://ece.wpi.edu/analog/resources/FFT_Windowing_Tutorial.pdf for windows in general and the use of flattop in particular There is a class of windows sometime referred to as "cosine-sum" that can be applied in the frequency domain as small convolutions. They would work for your frequency domain data. This only works if you really do have phase information so you can get to complex fft coefficients. The documentation at: http://www.mathworks.com/access/helpdesk/help/toolbox/signal/flattopwin.html gives the coefficients for one example of a flattop window. If you have only power or magnitude data, there are frequency estimation techniques that could help you determine accurate amplitude of non-bin centered signals. a number of people around here are familiar with those techniques, but no one can tell what you need from what you have said so far. Good luck Dale B. Dalrymple
On 30 Nov, 03:34, robert bristow-johnson <r...@audioimagination.com>
wrote:

> > You have to do weird things which means > > your approach to the problem is incorrect. > > Vlad, that's not always true.
You neet to know the rules to know when to break them. The OP doesn't know the most basic rules. Vlad is right.
> > could you tell what is the > > whole problem, what do you have at the > > input, and what should you get at the output. > > i think he wants to smooth out those different bumps that he gets from > the different sensors. &#2013266080;or something that makes the "resonant > frequencies don't line up nicely". &#2013266080;so we're gonna smooth out them > damn resonant frequencies. &#2013266080;i dunno, it's just a guess.
Exactly: Everybody are guessing because the OP doesn't know what he is doing, and hence is unable to come up with a useful problem description. Rune
Hi All,

This is an FFT question, not an experimental technique question.

I'm calculating a transfer function using measurements from
different setups and different data-acq systems.

If I had used fewer lines in my FFTs, the resonant frequencies
from the different measurements would have been in bins centered
on the same frequency. However, because of the high number of
lines, the resonant frequencies are off by a bin or 2.

What I need is a way to easily change the delta-f for a hundred FFTs.

The raw-time-domain data is not available.

The FFTs I'm using,  have both amplitude and phase.

I plan on calculating the time domain data for each FFT, by inverse FFT,
halfing the measurement duration, then forward FFTing.

My question is about the details of doing this.

How is the calculated-time-domain data (via IFFT) changed by the
raw-time-domain data being windowed prior to FFTing in the first place?
I assume you divide the calculated-time-domain data by the window
function (being careful about divide by zero).

Since this calculated-time-domain data represents 1 period (by the
definition of Fourier Analysis), any halfing of the measurement
duration will also be 1 period and therfore does not require windowing
for the forward FFT.

If the period is known exactly, why would a window still be needed?

Furthemore, is there any reason to not expect this
calculated-time-domain data to be of higher quality because it
represents an average of many FFTs?

I appreciate everyone's input.

RIH5342