DFT standards - diyAudio
Go Back   Home > Forums > Source & Line > Digital Line Level
Home Forums Rules Articles diyAudio Store Gallery Wiki Blogs Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Digital Line Level DACs, Digital Crossovers, Equalizers, etc.

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Thread Tools Search this Thread
Old 30th July 2012, 01:13 PM   #1
diyAudio Member
steph_tsf's Avatar
Join Date: Mar 2008
Default DFT standards

Those last times I am busy with short FIRs, having an odd length like 31-tap or 101-tap. The odd length enables precisely locating the FIR midpoint. This is of importance in speakers crossovers, where you want the sum of the two outputs to be a Dirac.

On the other hand, by definition, the DFT needs an even amount of samples.

What I'm thus doing, is to add one tap at the end of the FIR, with a zero coefficient.

I'm currently trying to embed the speaker linearization in the FIR. I thus analyze the unfiltered speaker white noise or pink noise response, in a two-channel DFT analyzer (this way the phase gets extracted) having a geometry that's compatible with the FIR I'm going to use for the speaker crossover.

Say I am using a 9-tap FIR.
I extend it to 10-tap for interfacing the DFT.
The DFT returns 6 frequency bins, both in ReX and in ImX.
This is 12 pieces of information, actually only 10 to be considered as true independent information, because the first and last ImX values are always equal to zero.
This looks reassuring : 10 pieces of information IN, and 10 pieces of information OUT.

I need to graph the DFT output on the PC screen.
Is there a standardization about this?
This is far from trivial, when paying attention to the details.

Say the sampling frequency is 10 kHz.

The first and last frequency bins exhibit half the normal bandwidth.

Band 1 : DC to 0.50 kHz, center is 0.25 kHz, bandwidth is only 0.50 kHz
Band 2 : 0.50 kHz to 1.50 kHz, center is 1.00 kHz, bandwidth is 1.00 kHz
Band 3 : 1.50 kHz to 2.50 kHz, center is 2.00 kHz, bandwidth is 1.00 kHz
Band 4 : 2.50 kHz to 3.50 kHz, center is 3.00 kHz, bandwidth is 1.00 kHz
Band 5 : 3.50 kHz to 4.50 kHz, center is 4.00 kHz, bandwidth is 1.00 kHz
Band 6 : 4.50 kHz to 5.00 kHz, center is 4.75 kHz, bandwidth is only 0.50 kHz

How shall we label the "spectrum analyzer" frequency axis?

The "DFT exact" way is to only label the frequency edges.
Thus never commit in labeling frequency bands.
A "spectrum bar" will thus only exist "between edges".

Most users would prefer seeing a name on each frequency band.
Just like they see frequency labels on their graphic equalizers.
Of course they would reject vague names like Band 1, Band 2, etc ...
They would like to see names like 0.25 kHz, 1.00 kHz, 2.00 kHz, 3.00 kHz, 4.00 kHz, 4.75 kHz.
However, doing so we can expect phone calls from them, saying that 0.25 kHz should be re-labelled "DC" and that 4.75 kHz should be re-labelled "5 kHz".

What's the industry norm about this?

There is a second annoying detail. How to deal with the half-width frequency bands (the first one and the last one)?

If we leave the DFT "spectrum analyzer" as is, the first and the last frequency bands will be -6 dB down the others when analyzing a white noise. This is normal, as the DFT displays nothing else than the energy in a given frequency band. So, if there is a white noise at the input, if the frequency bandwidth is half, the collected energy will be half.
If we leave the spectrum analyzer "DFT-exact", we can expect phone calls from customers, saying that the first and last frequency bands went mis-calibrated.

What's the industry norm about this? Is it allowed, is it recommended, to cheat with the first and last DFT bins, raising their sensitivity by a factor of two?

Then comes the DFT-then-iDFT idea. Currently I am using the WinXP PC as platform. When declaring a numeric variable "As Double" in MS Visual Basic 2010, I think I am relying on 64-bit floating point arithmetic. I'm curious to see the rounding effets. I thus consider operating one thousand DFT-then-iDFT iterations, and compare the resulting 10-tap FIR with the 10-tap FIR I've been starting from. Checking if the last coefficient is still equal to zero.
But wait a minute, in such DFT-then-iDFT process, do I need to cheat with the first and last frequency bin sensitivities, raising their sensitivities by two, or is it mandatory to leave them "DFT-exact"?

Any advice welcome.
Attached Images
File Type: jpg FIRs having an odd length, and DFT.jpg (200.6 KB, 35 views)

Last edited by steph_tsf; 30th July 2012 at 01:31 PM.
  Reply With Quote
Old 31st July 2012, 03:22 AM   #2
diyAudio Member
steph_tsf's Avatar
Join Date: Mar 2008
Just wrote a small Visual Basic 2010 application doing DFT followed by iDFT in a loop, in order to quantify the signal degradation. Thousands of iterations in a few minutes using a modern PC. After one 500 iterations, there is no visible degradation on the time-domain plot, same for the FFT plot. The time-domain data gets saved on the c:\ disk. Those are files "A" and "B". Over there, using the text files, one can see how the values got changed, albeit in infinitesimal proportions. Looks reassuring.
Attached Images
File Type: jpg DFT iDFT.jpg (188.9 KB, 21 views)
Attached Files
File Type: zip DFT iDFT.zip (219.1 KB, 2 views)
  Reply With Quote


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Audio Standards korneluk Tubes / Valves 4 7th August 2008 04:16 PM
diyAUDIO standards committee Iain McNeill Everything Else 22 9th March 2008 11:13 AM
Bad standards are better than no standards Aengus Analogue Source 16 13th December 2006 11:56 PM
IEC standards, anywhere? alex278 Tubes / Valves 1 25th January 2006 04:59 PM

New To Site? Need Help?

All times are GMT. The time now is 12:40 AM.

vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Copyright 1999-2017 diyAudio

Content Relevant URLs by vBSEO 3.3.2