AnsweredAssumed Answered

State Variable filter bug.

Question asked by MadMatt on Apr 12, 2011
Latest reply on May 4, 2011 by MadMatt

In SigmaStudio, lets say I have a filter in place, lets say it's a 2nd order IIR high pass filter with a Q of 1 and a frequency of 1khz and also that the system sampling frequency is set to 48khz. I have a probe and stimulus in place that lets me view how the filter is performing and I can verify that the filter is doing what it's supposed to do.

 

Now say I want to increase the system sampling frequency up to 192khz. First of all I change the sampling frequency in the "New Item Sample Rate" drop down box, then I click on the "Set System Sampling Rate" button. When this happens the frequency response in the probe window shifts down showing how the frequency response would look using the old filter coeffients, but at the higher sampling frequency. This is nice to see but isn't very useful so I click on the button labled "Propagate Sampling Rate". This in turn updates the filter blocks to the new sampling frequency of 192khz and all the filter coefficients update as a direct result. Now the frequency response is back where it is supposed to be, great, fantastic.

 

The same does not occur however when using the state varible filter.

 

If I have the system sampling frequency set @ 48 khz and use a state variable filter instead, everything works in the same way right until I push the "Propagate Sampling Rate" button. When using the IIR filters this will update the filter coefficients for the new sampling frequency, however it will not update the state variable filter. If I then choose to alter the state variable filter parameters manually, changing the Q works predictably, but changing the frequency does not, in other words the filter reads 250hz, but the probe shows 100hz.

 

There isn't any way around this as far as I can see. The only way to make the state variable filter work at the new sampling rate of 192khz, is to delete every filter, replace them and manually input all the filter parameters again. Naturally you have to go through this process every time you want to change the sampling frequency to something else.

 

Is this a bug and can it be fixed? Or is this something unique about the way the state variable filters work?

Outcomes