From: Rune Allnor on
On 8 Jun, 02:52, Vladimir Vassilevsky <nos...(a)nowhere.com> wrote:
> Jerry Avins wrote:
> > On 6/7/2010 8:18 AM, PaulTapper wrote:
>
> >> Hi,
>
> >> Is there a standard way of converting an IIR filter to a different sample
> >> rate?
>
> >> What I mean by this is, if I have an IIR filter F0 with a particular
> >> frequency response at sample rate S0, and I want to create a filter F1 to
> >> give, as near as possible, the same frequency response, at a different
> >> sample rate S1, is there a standard way of calculating the
> >> coefficients of
> >> F1 from F0?
>
> >> My initial thoughts are that maybe I can find the zeroes and poles, and
> >> then rotate them around the unit circle or something, but I suspect there
> >> may be a standard solution to this problem?
>
> > Why not design a new filter to the original response specs? Even if
> > there were a simple transformation, the prewarping would be wrong.
>
> The problem stated by OP is quite common. Of course, it is possible to
> design a filter to a new sample rate from scratch. However this implies
> pretty extensive floating point math with libraries which could be too
> heavy for the target hardware.

Would one do filter *design* with scarce computational
resources? I think of design as something done once up
front, on a PC, and then the coefficints might be
downloaded to whatever device that would actually run
the filter.

> If this is a case, I prefer interpolation
> between the sets of coefficients.

Sure. With FIRs this would be possible. But IIRs?

Rune
From: pnachtwey on
On Jun 7, 8:27 pm, Tim Wescott <t...(a)seemywebsite.now> wrote:
> On 06/07/2010 06:57 PM, pnachtwey wrote:
>
>
>
> > On Jun 7, 5:18 am, "PaulTapper"<paul__tapper(a)n_o_s_p_a_m.hotmail.com>
> > wrote:
> >> Hi,
>
> >> Is there a standard way of converting an IIR filter to a different sample
> >> rate?
>
> >> What I mean by this is, if I have an IIR filter F0 with a particular
> >> frequency response at sample rate S0, and I want to create a filter F1 to
> >> give, as near as possible, the same frequency response, at a different
> >> sample rate S1, is there a standard way of calculating the coefficients of
> >> F1 from F0?
>
> >> My initial thoughts are that maybe I can find the zeroes and poles, and
> >> then rotate them around the unit circle or something, but I suspect there
> >> may be a standard solution to this problem?
>
> >> Thanks for any help.
>
> >> Paul
> > I just posted a similar question
> >http://groups.google.com/group/comp.dsp/browse_frm/thread/9eee0eb0c9c...
> > I am not able to work on the solution now but I will next week.   I
> > tried use an inverse Tustin's to s domain and then Tustin's to z
> > domain but that was not very accurate.  It was accurate to about 3
> > decimal places. The Tustin's approximation also introduced zeros that
> > weren't there before. Not good.  I also have an offset that you may
> > not have.  When I am able I will look into using the inverse matched z
> > transforms and match z transforms.  This problem seems to have stump
> > this news group.
>
> > How many terms do you have in your IIR filter?  I may be able to help
> > with something simple but at this time I don't have a general
> > solution.  There may not be a general solution.  I do know I can wok
> > out a solution for a specific case given time using the same
> > techniques I used for the simple first order IIR in my pdf files.
>
> Well, I wouldn't say that I'm stumped per se, just that I don't have the
> information at my fingertips and -- much as I think you're a cool guy --
> I'm not willing to work it all out for free.  I think it's a very
> solvable problem, however.
>
> --
> Tim Wescott
> Control system and signal processing consultingwww.wescottdesign.com
The problem is solvable but the point is there isn't a well known
algorithm that makes it easy for me or PaulTrapper. It well take some
symbolic manipulation.

Peter Nachtwey
From: PaulTapper on
Hi, and thank you all for your responses.

My specific application is a software implementation, not hardware, in a
context where the sample rate is unknown at the outset (although it is very
likely to be within the range of 11kHz to 96kHz).

The filters I'm interested in are Biquads, so pretty simple. One HPF and
one high shelf. I have the coefficients for the desired frequency response
at one specific sample rate, and want to be able to generate a biquad with
similar freq response for a given sample rate at run-time.

The converting to S-plane, and then back again idea sounds promising. I'll
need to brush up my dsp theory a bit I think.

Thanks again everyone.

Paul
From: Jerry Avins on
On 6/8/2010 8:41 AM, PaulTapper wrote:
> Hi, and thank you all for your responses.
>
> My specific application is a software implementation, not hardware, in a
> context where the sample rate is unknown at the outset (although it is very
> likely to be within the range of 11kHz to 96kHz).
>
> The filters I'm interested in are Biquads, so pretty simple. One HPF and
> one high shelf. I have the coefficients for the desired frequency response
> at one specific sample rate, and want to be able to generate a biquad with
> similar freq response for a given sample rate at run-time.
>
> The converting to S-plane, and then back again idea sounds promising. I'll
> need to brush up my dsp theory a bit I think.

If you want to do this at run time on an embedded processor, I think a
good way would te to store coefficients for a number of sample rates and
interpolate between them, as Vladimir suggested.

Jerry
--
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������
From: Vladimir Vassilevsky on


Rune Allnor wrote:
> On 8 Jun, 02:52, Vladimir Vassilevsky <nos...(a)nowhere.com> wrote:
>
>>Jerry Avins wrote:
>>
>>>On 6/7/2010 8:18 AM, PaulTapper wrote:
>>
>>>>Hi,
>>
>>>>Is there a standard way of converting an IIR filter to a different sample
>>>>rate?
>>
>>>>What I mean by this is, if I have an IIR filter F0 with a particular
>>>>frequency response at sample rate S0, and I want to create a filter F1 to
>>>>give, as near as possible, the same frequency response, at a different
>>>>sample rate S1, is there a standard way of calculating the
>>>>coefficients of
>>>>F1 from F0?
>>
>>>>My initial thoughts are that maybe I can find the zeroes and poles, and
>>>>then rotate them around the unit circle or something, but I suspect there
>>>>may be a standard solution to this problem?
>>
>>>Why not design a new filter to the original response specs? Even if
>>>there were a simple transformation, the prewarping would be wrong.
>>
>>The problem stated by OP is quite common. Of course, it is possible to
>>design a filter to a new sample rate from scratch. However this implies
>>pretty extensive floating point math with libraries which could be too
>>heavy for the target hardware.
>
>
> Would one do filter *design* with scarce computational
> resources? I think of design as something done once up
> front, on a PC, and then the coefficints might be
> downloaded to whatever device that would actually run
> the filter.

There are many application where users can enter arbitrary parameters.
Ranging from digital oscilloscopes to audio processing.
Once I did filter design in a fixed point on machine with 4k memory; I
won't like to do it again.

>>If this is a case, I prefer interpolation
>>between the sets of coefficients.
>
>
> Sure. With FIRs this would be possible. But IIRs?

With IIRs, store precalculated sets and interpolate between them.

Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com