Single precision mixed with double precision gives crackling and other noise issues.
Currently we are using an ADAU1401A with some external ADCs and DACs.
For a specific horn loudspeaker design we are using a pretty complex crossover filter and we bumped into some very strange issues.
Let me explain;
Since the complexity of the filter we are running almost out of total space on this tiny DSP (using 96kHz samplerate).
After reading; "Parameter Quantization in Direct-Form Recursive Audio Filters" by Brian Neunaber (must read!) about the difference and max expected error vs frequency/Q-factor between single and double precision filters, we decided to only use double precision for the filter below 100Hz.
For the rest of the biquads we are using single precision filters to free up some space (all filters are IIR biquads btw)
After applying this there was only a very weird rumbling/crackling noise coming out of the speakers.
This issue was gone immediately when switching back to double precision again.
The flow of the filter schematic is; input - compressor - double precision filters - single precision filters - output
(for confidential reasons I can't share the schematic on the forum unfortunately)
Is this a bug or a known issue when mixing single and double precision filter blocks?
I have been searching around for a while, but can't find anything that is related to this issue.
adau1401a
Audio Signal Processors
dsp
precision
noise
sigmastudio
SigmaDSP Audio Processors
adau1701
Show More
Still no replies?
I was hoping that one of the engineers could give me some information about this, since it's still a big issue in our designs.
Hello,
Sorry no one has responded yet. Your source correctly notes that single-precision IRR filters are more likely to run into round-off errors when their critical frequency is a tiny fraction of the sample rate. In my experience I haven't an inherent problem combining single- and double-precision filters, but of course an AD engineer may have more info on this. In the meantime, how many instructions does the single / double precision design use? Since a few instructions go to overhead, designs exceeding 500 instructions at 96K may turn problematic -- becoming more probable as you approach 512. The compiler may not report an error, especially at higher sample rates. Symptoms vary from a no sound at all to a loud hiss to various noises.
An AD engineer would likely wish to see the project, which they can arrange privately.
Best regards,
Bob
Hello OWC,
I have heard different rules of thumb and it depends some on the actual filters. I think to be safe if you come within 1% of the fs then you should switch to double precision. That would be 480Hz at 48kHz. This is overly cautious since I have heard some people say below 150Hz or 200Hz. Now this does scale with sampling rate! Either way, 100Hz is too low. I would go at least to 500Hz as your mark for switching to double precision and closer to 1kHz is even better.
It does sound like this is your issue. I can have a look at your project to see if there are other ways to save a few MIPS here or there. Let me know and I will shoot you an email since you do not want to put it up on the forum.
Sorry for the delay. I think your question is one of the ones I have not gone back to. I am still trying to keep up with new posts and chipping away at some of the old ones.
Thanks KJBob for the response
Dave T
Please log in to reply.