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

How can I load 256 coeffs one time when I design a IIR filter?

SigmaDSP & SigmaStudio shanchanyue Jul 26, 2011 00:00 8 replies Original on forum ↗
Subscribe
shanchanyue Question
Jul 26, 2011 00:00

hi ,

Coeffs are the velue of beta in the red pane in the filter.bmp, I want to use a table to set it , this is ok ?and how can I get it?

And I have the other problem about paste, it's troubleful to design a 256 taps IIR filter, I can design a 184 taps and can't do it any more , a error like error2.bmp will happen, why?

thanks

shanchanyue

sigmastudio

shanchanyue Reply
Jul 27, 2011 00:00

hi

The filter was showed in IIR.png , it is just two taps , and what I want to design was 256 taps like this.

but when i copy the things like the red pane again and again , the error will hanppen which is showed in error.png ,

for example, somewhere there are lots of line which i don't want , and somewhere there is no line appear which i want.

Tom00 Reply
Jul 27, 2011 00:00

Is it possible that you mix up IIR and FIR filters, because a 256 order IIR filter is very unusual?

shanchanyue Reply
Jul 27, 2011 00:00

thanks for your Re, the filter's structure is in the structure.png , it looks like a FIR, but actually a IIR,

and i knew the reason of the error about paste,, because the number of instructions used is over 1024(my processor is 1701)

so now the problem is how can i load 256 coeffs one time

best regards

shanchanyue

ADIApproved Reply
Aug 4, 2011 00:00

The Safeload mechanism only supports 5 coefficients at a time, so that means you can't update 256 coeffs in the span of a single frame. So, there are two options:

1. Mute the core and do a block write of 256 coeffs, then un-mute the core.

2. Divide the write into 4- or 5-address chunks and write them one frame at a time.

256 / 4 = 64, so...

Make a for loop with 64 loops; 1 loop per audio frame.

Write 4 coefficients (using Safeload) per frame.

This operation will take 1.3 ms to complete.

The downside of option 2 is that for those 1.3 ms, you filter may be unstable and produce unwanted audio artifacts.

shanchanyue Reply
Aug 5, 2011 00:00

Hi BrettG:

Thank you very much for your Re, and I know how to work out it by the two options now.

but I have a new problem, I can just design 67 taps and if I add one tap complile will be failed when i design the schematic,

the output error is showed in output.png, the project is 2iir.dspproj.

best regards

shanchanyue

ADIApproved Reply
Aug 5, 2011 00:00

Hi shanchanyue:

Can you please explan what type of filter you are trying to update. If your filter is an FIR filter, uploading 5 coefficients at a time will not make your filter unstable. If however your filter is an IIR filter, then most likely you can factor the numerator and denominator and download biquads in groups of 5 coefiicients. Doing so will guarantee stability.

My understanding is that your filter is an IIR filter (based on the subject of this thead). Please factorize the filter by calculating all roots so that they can fit in independent biquad sections.

Can you post your project. I'm curious what you are tying to accomplish.

Best regards

Miguel

shanchanyue Reply
Aug 9, 2011 00:00

hi Miguel:

I'm so sorry for late reply,

The type of filter is IIR, it is a FIR-like filter, its structure is as shown in Fig 1 (b) ,and it is a evolution from fig 1(a ) ,

The D(Z) in fig 1(a ) is shown in fig 2.

I just design a filter like Fig 1 (b), my project is 2iir.dspproj, I used 66 "Gen Filter", and link project is ok ,but if i add a "Gen Filter" more in the project it will be failed.

best regards

shanchenyue

ADIApproved Reply
Aug 10, 2011 00:00

Hi shanchenyue,

Your project actually exceeded a limitation we had placed on the compiler, which limited the number of feedback paths allowed in a project. Nobody has ever exceeded this number before, so we were surprised to see the error! We have increased the limit, so this problem should go away in the next beta release, which should be available for download in a few weeks.