DSPRelated.com
Forums

Converting IIR filter to different sample rates

Started by PaulTapper June 7, 2010
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


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. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
On 7 Jun, 14:18, "PaulTapper" <paul__tapper@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?
No, there isn't. The normalized bandwidth is the main design parameter for filters. Suppose you want a LPF with passband 0-10 Hz. If the sampling rate is low, say, 100 Hz, you will be able to achieve the goal with a low-order filter. If the sampling rate is high, say, 10kHz, you will need a far higher filter order to meet the same spec. Rune
On Jun 7, 8:18&#4294967295;am, "PaulTapper" <paul__tapper@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'm with Jerry, on this one. Just redo the filter using your filter design program. You may find that sometimes in order to meet spec, you will have to increase the filter order. Clay
On Jun 7, 11:20&#4294967295;am, Clay <c...@claysturner.com> wrote:
> On Jun 7, 8:18&#4294967295;am, "PaulTapper" <paul__tapper@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. > > I'm with Jerry, on this one. Just redo the filter using your filter > design program. You may find that sometimes in order to meet spec, you > will have to increase the filter order.
i'm with Clay and Rune and Jerry also. but if all of the "action" in your filter (all of the resonant frequencies) are much much lower than Nyquist, then the answer is "sorta yes". think of an analog filter as a sorta digital filter with Nyquist bumped up to infinity. then all of the resonant action *is* happening far below Nyquist and we know how to simply scale s-plane coefficients in an analog filter to move the frequency response around. so you can use a mapping like bilinear transform to map your digital to analog, then scale the s-plane coefficients in the simplistic manner, then map s-plane back to the z- plane. but if you are reducing the sample rate, then you are pushing the resonant action up toward Nyquist and then the approximations we use that it's all far below Nyquist no longer apply. r b-j you can map an analo

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. If this is a case, I prefer interpolation between the sets of coefficients. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
On Jun 7, 5:18&#4294967295;am, "PaulTapper" <paul__tapper@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/9eee0eb0c9ca6e82# 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. Peter Nachtwey
On 6/7/2010 8:52 PM, Vladimir Vassilevsky 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. If this is a case, I prefer interpolation > between the sets of coefficients.
Had the OP written that he needs to design his filter on target hardware, the suggestions would have been different. A program's needing to adapt to a new sample rate it couldn't anticipate must be rather rare. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
On 06/07/2010 06:57 PM, pnachtwey wrote:
> On Jun 7, 5:18 am, "PaulTapper"<paul__tapper@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/9eee0eb0c9ca6e82# > 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 consulting www.wescottdesign.com
On 08-06-2010 at 02:52:13 Vladimir Vassilevsky <nospam@nowhere.com> wrote:

> 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. If this is a case, I prefer interpolation > between the sets of coefficients. > > > Vladimir Vassilevsky > DSP and Mixed Signal Design Consultant > http://www.abvolt.com
Entry: resampling. Am I right? -- Mikolaj