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

The Nth Order Filter

SigmaDSP & SigmaStudio KJBob Aug 30, 2015 00:00 8 replies Original on forum ↗
Subscribe
KJBob Question
Aug 30, 2015 00:00

This filter has shown up unceremoniously in recent SigmaStudio betas, and it's immensely useful.

Previously, to make a sharp filter we had to cascade a number of first and second-order sections, Their frequency and Q had to be figured with a filter-design program. Now, SigmaStudio does the work for you. Below are two 4 KHz "brick wall" Chebyshev telephone filters, done the old way and the new way:

The Order number N (number of poles in the filter) must be even. If you change N with the green button, it chooses even numbers. You can go ahead and type an odd number in the box, but the resulting response is incorrect. Thus I'm comparing a 12-pole Nth-Order filter to an 11-pole assembled filter. Here the Nth-Order filter uses three more instructions (60 instead of 57), but works much better as shown below:

filter implementation

nth order

chebyshev

8357.87cfe7a3433d87b0115aaa936d3c034d.png
8357.87cfe7a3433d87b0115aaa936d3c034d.png
8357.87cfe7a3433d87b0115aaa936d3c034d.png-620x244.png
8357.87cfe7a3433d87b0115aaa936d3c034d.png-620x244.png
6076.a4798e8e4eb9d27fbc8370332447d06a.png
6076.a4798e8e4eb9d27fbc8370332447d06a.png
6076.a4798e8e4eb9d27fbc8370332447d06a.png-592x427.png
6076.a4798e8e4eb9d27fbc8370332447d06a.png-592x427.png
jon71 Reply
Aug 30, 2015 00:00

Brilliant as always--ADI ought to keep you on retainer!

I have a schematic I've been working on for a month that I am getting close to sharing, but you seem to manage these three per week!

SimonBroadley Reply
Aug 31, 2015 00:00

Oh how I'll miss making my 10th order filters. Nice find, looks like we'll have to download the betas and take a look. We use high order filters all the time in our designs.

KJBob Reply
Aug 31, 2015 00:00

Yep, it's really handy. The real advantage of the Nth-Order Filter over designs we've assembled ourselves shows with filters between N = 10 and N = 20 (the max). Many filter design programs stop at N = 10 because they assume the implementation will be analog, and it's tough to build an active filter with more than five op-amp stages. Also, high-order filters often run into SigmaStudio's Q limit of 16 for the General Second-Order filters. The Nth-Order Filter has no such limitation.

Jon, I'm looking forward to seeing the project you're planning to share -- yours are always fascinating.

Best regards,

Bob

jc.reynaud Reply
Oct 23, 2015 00:00

Hi, I'm using a ADU1452 and I can't find the nth order filter while I could find it for the ADU1442... Is it normal ?

KJBob Reply
Oct 23, 2015 00:00

Hello,

I'm afraid that yes, this is normal. The ADAU1452 is the newest SigmaDSP, thus this new algorithm has not yet been ported there. Presently you'll need to cascade first and second-order filters to get your desired response.

Best regards,

Bob

jc.reynaud Reply
Oct 25, 2015 00:00

Ok then...

How can make à 48db filter at 35hz using several 1st and second order filters ?... Can you help me ?

KJBob Reply
Oct 25, 2015 00:00

Start with an analog filter design program. ADI has one at:

FILTER WIZARD | Analog Devices

I assumed you wanted a highpass filter:

Input your cutoff frequency (35 Hz), your stopband loss (48 dB), and your stopband frequency (typically one octave from your cutoff frequency). The Filter Response slider allows you a trade-off between simplicity and phase response. Audiophiles may wish to slide this over to the right (Bessel filter), but I can't hear the difference :

Change the drop-down View menu to Stages. This gives you the specs for each of the General Second-Order filter stages in your DSP project:

Build your SigmaDSP filter. First, grow a General Second-Order Double-Precision filter to four sections. Sharp-cutoff filters like this should always be double-precision. Growing it rather than using separate sections allows the Sigma 300 (ADAU145x) compiler to optimize the filter, using fewer instructions.

Then, type in the Frequency and Q for each section. Butterworth response filters will have the same frequency for all sections, only different Qs. Other filter responses will vary. Just copy the numbers from the Filter Wizard to your individual sections. Simulate the results with SigmaStudio's Stimulus-Probe tool.

If you wanted a Low-pass filter, the procedure is the same:

Best regards,

Bob

6378.66537679abdb790adfa01a24a245839a.png
6378.66537679abdb790adfa01a24a245839a.png
6378.66537679abdb790adfa01a24a245839a.png-384x373.png
6378.66537679abdb790adfa01a24a245839a.png-384x373.png
7635.60cc0343de16b12005a38ec505562e3f.png
7635.60cc0343de16b12005a38ec505562e3f.png
7635.60cc0343de16b12005a38ec505562e3f.png-620x355.png
7635.60cc0343de16b12005a38ec505562e3f.png-620x355.png
0083.503ecbade9887146cafeba16f074fc69.png
0083.503ecbade9887146cafeba16f074fc69.png
0083.503ecbade9887146cafeba16f074fc69.png-620x367.png
0083.503ecbade9887146cafeba16f074fc69.png-620x367.png
2450.452ebc768bc7002ac881c71040236810.png
2450.452ebc768bc7002ac881c71040236810.png
2450.452ebc768bc7002ac881c71040236810.png-620x514.png
2450.452ebc768bc7002ac881c71040236810.png-620x514.png
3716.0a528288e06d27f1d76887e90bf50e03.png
3716.0a528288e06d27f1d76887e90bf50e03.png
3716.0a528288e06d27f1d76887e90bf50e03.png-611x544.png
3716.0a528288e06d27f1d76887e90bf50e03.png-611x544.png
jc.reynaud Reply
Oct 26, 2015 00:00

Thanks a lot for your help...