ΣSigmaStudio Ask AI Русский Log in

How to use a single chip microcomputer control filter?

SigmaDSP & SigmaStudio chenbaoyuan Sep 20, 2009 00:00 5 replies Original on forum ↗
Subscribe
chenbaoyuan Question
Sep 20, 2009 00:00

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

ADIApproved Reply
Sep 21, 2009 00:00

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:

https://ez.analog.com/cfs-file/__key/communityserver-discussions-components-files/396/5861.8c42c57a1da1b5b38d0c48fd5d4dd4df.bin

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):

https://ez.analog.com/cfs-file/__key/communityserver-discussions-components-files/396/1460.df6cb6db4c9dbcb38ea5eb336962978f.bin

https://ez.analog.com/cfs-file/__key/communityserver-discussions-components-files/396/3568.ee0a02387e1b9c2b5062e4a94bccfcbc.bin

In the compiler output, I can see the number of instructions and parameters required by this algorithm.

https://ez.analog.com/cfs-file/__key/communityserver-discussions-components-files/396/0537.5a5279314d342d6d2cddcd55034623aa.bin

42 instructions, 32 data addresses, 21 parameter addresses.

Now, I can change filter parameters.

https://ez.analog.com/cfs-file/__key/communityserver-discussions-components-files/396/4130.e8aa29bc9bc08966c0c26a67d30729d6.bin

Here, I've changed the low-pass filter's cutoff to 200 Hz. The capture window shows that 10 parameters have been updated.

https://ez.analog.com/cfs-file/__key/communityserver-discussions-components-files/396/6471.5e0bbc5b9bdbbe63e9bc2665caa69d6f.bin

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).

https://ez.analog.com/cfs-file/__key/communityserver-discussions-components-files/396/8880.a65351e3fcb93e82b0cc8990d5dadd1d.bin

Now the rolloff is much steeper. You'll notice that the status bar has turned BLUE:

https://ez.analog.com/cfs-file/__key/communityserver-discussions-components-files/396/5758.8e172e05adacb495cea398453c46e1b9.bin

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.

https://ez.analog.com/cfs-file/__key/communityserver-discussions-components-files/396/3618.d4d8d8433295038ae5339e952937796c.bin

The new crossover uses more instructions, data, and coefficients.

The parameters also will get new addresses in RAM:

https://ez.analog.com/cfs-file/__key/communityserver-discussions-components-files/396/4762.6e966fc232e8d090bdcebb55f9993c0e.bin

https://ez.analog.com/cfs-file/__key/communityserver-discussions-components-files/396/0083.ac9b55e8c2527f4d63c98bc61f0564fb.html

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

Eric Reply
Dec 1, 2009 00:00

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

ADIApproved Reply
Dec 1, 2009 00:00

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:

https://ez.analog.com/message/5666#5666

Eric Reply
Dec 2, 2009 00:00

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

EZAdministrator Reply
Aug 2, 2018 00:00

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