How to use a single chip microcomputer control filter?
Hello!
I use ADAU1446,in the SigmaStudio's Crossover module,i found there are different numbers addresses is shown in the Capture window when i select different filter.
For example,when i choose Butterworth 12 ,there are 5 addresses,and Bessel 24,there aer 10 addresses.I can't found which Coefficients match with these addresses,and
how to compute them.
Can you provide me the detailed algorithm just like General 2nd-Order Filters algorithm.Thanks!
Audio Signal Processors
adau1446
SigmaDSP Audio Processors
SigmaDSP
Hello 宝远 chen,
SigmaStudio's Crossover cell has several options for filter types, and differs from our other filter cells in one major way: each different filter type represents a different filter architecture, not just different coefficients.
I will try to explain using an example. I have created a simple project with an input, crossover, and two outputs:
I click the Link-Compile-Download button, and then get a Green bar (showing that my hardware is connected, and the project has compiled and downloaded):
In the compiler output, I can see the number of instructions and parameters required by this algorithm.
42 instructions, 32 data addresses, 21 parameter addresses.
Now, I can change filter parameters.
Here, I've changed the low-pass filter's cutoff to 200 Hz. The capture window shows that 10 parameters have been updated.
Why 10 parameters? Well, a normal second-order filter has a rolloff of 12 dB per octave and requires 5 coefficients for a biquad IIR implementation.
Right now, we're using a Linkwitz-Riley filter with 24 dB per octave rolloff. Therefore, we require 10 coefficients for the biquad IIR implementation. Basically, we have two filters in series.
Now, let's try changing to a Linkwitz-Riley 48 filter (48 dB per octave rolloff).
Now the rolloff is much steeper. You'll notice that the status bar has turned BLUE:
This is because we have effectively added two more biquad filters, and therefore the program has changed - and new parameters have been assigned.
You can see this by clicking Link-Compile-Download again.
The new crossover uses more instructions, data, and coefficients.
The parameters also will get new addresses in RAM:
So, the reason your filter addresses are changing is because you are changing the filter architecture, and therefore the program code is changing as well, requiring a new compilation.
In order to implement a crossover in your system, you should choose one type of filter, and then continue to use it throughout the development of your system.
Best Regards,
BrettG
Hi BrettG,
If over one group of 5coeffs, such as 4th or 6th bessel filter, how can we safeload those 10/20 coeffs?
I think the high order LPF/HPF should be realized by cascade those sencond filter units, we should send those all coeffs to ADAU1446
by external microcontroller.
There another problem----bessel filter crossover point not at -3db point, i think it should be -3dB point regardless of how much order.
Kindly please give some advice to us.
Thanks&Regards,
Eric Wang
Hi Eric,
When using safeload to download more than 5 coefficients, you must download them 5 at a time. This means you need to update each filter separately. This will take multiple audio frames to complete. Depending on the application, this may be acceptable, even though it will cause minor distortion in the audio. If that is not acceptable, you should mute the audio before updating the filters - this could be accomplished with a block write instead of a safeload write.
I've responded to your bessel filter question in your other post:
Hi BrettG,
thanks for yourt reply!
i think we may update 5coeffs one time in turn, if 4order, safe load two times, if 6order safe load three times, if 8order safeload four times,...
because per-second filter is steady, i think it's feasible possilbly.
i think in actual application, customer may not accept the audio stream interrup,so we select the first method you provide.
Best regards,
Eric Wang
This question has been assumed as answered either offline via email or with a multi-part answer. This question has now been closed out. If you have an inquiry related to this topic please post a new question in the applicable product forum.
Thank you,
EZ Admin
Please log in to reply.