
Home  Forums  Rules  Articles  The diyAudio Store  Gallery  Blogs  Register  Donations  FAQ  Calendar  Search  Today's Posts  Mark Forums Read  Search 
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 
20th May 2012, 05:22 PM  #21  
diyAudio Member
Join Date: Mar 2008

Quote:
Quote:
You used the term "blending". You almost answered the question. Consider the three canonical numerators : HP, BP and LP. The Cookbook formulae for audio EQ biquad filter coefficients from Robert BristowJohnson is the classic source. IIR_Lab linearly combines the HP, BP and LP numerators using the weighting factors you manually specify. By specifying 0.0 1.0 0.0 like you did, you know by advance it is the pure bandpass peaking at 0dB. By specifying 1.0 0.0 1.0 you know by advance it is the infinite depth notch. By specifying 1.0 1.0 1.0 you know by advance it is the pure phase shifter. Up to you to manually specify any other pattern, and IIR_Lab will graph the corresponding 2nd order transfer function (BodePlot), and distorsion spectrum (SpectrumPlot). Last edited by steph_tsf; 20th May 2012 at 05:31 PM. 

20th May 2012, 05:43 PM  #22 
diyAudio Member
Join Date: Jun 2009

I tried that too. From what I can tell triangle lowpasses the noise used for Bode generation. Fewer high frequency errors but doesn't change the low frequency errors. Seems like a less brute force Bode would be helpful.
Ah, so it is that simple. Thanks. 
20th May 2012, 06:11 PM  #23  
diyAudio Member
Join Date: Mar 2008

Quote:
A bad move would be to compute the BodePlot in an analytical way, only looking at the IIR coefficients. Doing so, you'll get smooth BodePlot curves, but they can't reflect anymore the arithmetic errors introduced by the finitelenght representation. For IIR_Lab, the "brute force" BodePlot computing is thus the only way. There are three ways for improving the BodePlot rendering when dealing with very low frequency IIRs like 40 Hz. One could use a Pink noise as test signal (more energy in the bass), one could do the FFT on more than 65536 samples, and one could apply a more elaborate Windows than the Triangle one. An more elaborate test signal for the BodePlot would be a pink noise (a good match with the BodePlot log frequency scale) for providing the needed wideband signal, additionned to some bandpass filtered pink noise (for adding energy in any wanted frequency band). The flip side would be that, due to the added complexity, most people would not understand the setup. Last edited by steph_tsf; 20th May 2012 at 06:35 PM. 

20th May 2012, 09:58 PM  #24 
diyAudio Member
Join Date: Jun 2009

Direct impulse calculation, swept sine, chirp, and structured noise all work too. Music's power spectral density tends to fall in the 1/sqrt(f) to 1/f range so structured f^(0.75) noise is probably the most realistic default. It would be interesting to compare the results from that to an FFT of the impulse and see if there's a meaningful difference. My guess would be the method's analytic capability will limit on the noise structuring in which case one of the simpler, deterministic methods would be just as informative. One would have to try it and see but, generally, I've found swept sine or direct impulse more useful than MLS.
Another straighforward approach is to filter some real music and calculate the transfer function as the ratio of the FFTs of the input and output. 
21st May 2012, 03:06 AM  #25  
diyAudio Member
Join Date: Mar 2008

Quote:
In IIR_lab, you get the Spectrum Plot, dedicated to the representation of nonlinearities. Spectrum Plot does the job of detecting nonlinearities with a moderate length FFT provided you select a SpectrumGen test signal that's synchronized with the sampling frequency. The Bode Plot is only there to graphically confirm that you have correctly set the IIR coefficients. In IIR_lab, the Bode Plot shows wobbles in the frequency bands where there are nonlinearities caused by the finitelenght binary word representation, that you should see confirmed on the Spectrum Plot. Therefore, the less the test signal has energy (in the considered frequency bands), the more Bode Plot wobbles. In IIR_Lab, the Bode Plot also shows wobbles due to the nonperiodic nature of the test signal that's used (a White Noise). Using a more advanced Windowing function than the Triangle, one could reduce the wobbles. See how the Bode Plot degrades (huge wobbles) when selecting the Rect. Window. Remember to never draw conclusions basing on the Bode Plot, when the Bode Plot got computed using a Rect. Window. When you see wobbles in the Bode Plot you need to ask yourself : a) is my BodeGen Signal Level correct (you may have set it to 60 dB in a previous session)  b) am I using the BodeGen Triangle Window  c) am I testing using Double Float  d) is the Spectrum Plot clean ? Last edited by steph_tsf; 21st May 2012 at 03:11 AM. 

21st May 2012, 05:10 AM  #26 
diyAudio Member
Join Date: Jun 2009


21st May 2012, 05:29 AM  #27 
diyAudio Member
Join Date: Sep 2007
Location: Hangzhou  Marco Polo's 'most beautiful city'. 700yrs is a long time though...
Blog Entries: 123

Because he's talking about taking the FFT of a whole song here, using the fadein and fade out as a kind of natural windowing function.
__________________
When irony first makes itself known in a young man's life, it can be like his first experience of getting drunk  Robertson Davies 
21st May 2012, 06:36 AM  #28 
diyAudio Member
Join Date: Jun 2009

The argument seems to be more that the whole song has to be processed for transfer function extraction via FFT comparison to be valid. I'm not seeing how that holds. Certainly, some intelligence is required in selecting input data points from a recordinga bunch of zeros wouldn't be very usefulbut that's also a requirement for approaches using random inputs. There's also some excess phase to be removed from the group delay with both approaches.
Personally, the more I think about this the more I'm inclined to run tracks through equivalent filter banks, one implemented with doubles, one with fixed point implementation equivalent to arm_biquad_cascade_df1_q31 / arm_biquad_cas_df1_32x64_q31 (Q1.31 storage, Q1.63 or Q2.62 accumulator), one with an arm_biquad_cascade_df1_fast_q31 equivalent (Q1.31 storage and Q2.30 accumulator) and look at the differences between the output samples. If the differences are underflows after converting back to 24 bit the filter banks can reasonably be said to be functionally equivalent. Back of the envelope it'd take about two hours to perform this measurement on the portion of my music collection I've ripped. So the bottleneck's me getting around to implementing the fixed point codeit's just about summer here, meaning my DIY pace is likely to slow down quite a bit until October. Last edited by twest820; 21st May 2012 at 06:39 AM. 
21st May 2012, 09:00 AM  #29  
diyAudio Member
Join Date: Mar 2008

Quote:
Last edited by steph_tsf; 21st May 2012 at 09:28 AM. 

21st May 2012, 07:54 PM  #30 
diyAudio Member
Join Date: Jun 2009

THD and IMD are measurements of the same underlying phenomena and hence are usually strongly correlated. I tend to prefer multitone IMD as it's a bit more thorough, thoughsynchronous sines are a subset of a THD sweep. As pointed out earlier there's no requirement to take the measurement at scale; 64k points is 64k points. But, having gotten the code together, there's no particular reason not to let the computer run whilst one goes to the pub.

Thread Tools  Search this Thread 


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
great digital filters?  audiophail  Digital Line Level  1  20th December 2010 04:35 PM 
Any new digital filters ?  percy  Digital Source  17  20th July 2008 12:39 AM 
Why do manufacturers use crappy digital filters?  John007  Digital Source  23  7th May 2008 06:54 AM 
Convolving digital filters?  birkinshawc  Digital Source  4  1st April 2005 02:17 AM 
do digital filters also affect the phse of a signal?  weissi  Digital Source  4  20th April 2003 01:32 AM 
New To Site?  Need Help? 