## Does Paraller implementation of IIR help with delay?

Started by 4 years ago13 replieslatest reply 4 years ago146 views

Hello,

I am using a lowpass biquad to measure rms of a signal (fc 10 Hz, FS=48K).

It is not smooth enough so I would want to increase the order but If I do that by cascading to biquads it will have too much delay. Does it help if instead of cascading them I implement a parallel filter structure?

Thanks,

[ - ]

Can you decimate a couple of times first, and then do the Biquad?

Consider a cascade of half-band filters to get the sampling rate down first.

Also, if you are measuring RMS, what is the time constant of the filter you want, and if it is long enough, why do you care about delay?

If you were doing a simple boxcar average with a cutoff of 10 Hz it is virtually equivalent to 4800 samples of delay.  That's a lot, so I'm confused by your issues with delay.

[ - ]

Can you elaborate? Do I need to use antialiasing filter and downsample it?

Doesn't decimation add to the delay itself?

This whole rms filter is a side chain and the problem is due to it's delay I'll have to have long buffer in the signal path.

[ - ]

For decimation, you will have to have some anti-aliasing filtering.

Decimation will add to delay, but it is un-avoidable.

You have expressed a desire to measure RMS with a LPF that has a cutoff of 10 Hz.  If you think this through, consider that one way to do it is to square all the samples and then average them, after which you take the square root (the definition of RMS). In order to get the averaging down to a point where frequencies above 10 Hz do not have much effect on your estimate, you need to look at an average of at least 4800 samples, before you even get your first valid result.  That is a delay of 100 msec from when the first sample enters the system.

So, I am confused by your design issue with delay.

I'm sorry to report that you cannot measure RMS with few components above 10 Hz without delaying your signal a lot.  Reminds me of uncertainty.

I need to add one point.

If you use biquads, your can do the implementation with minimum phase.  That is as as little delay as you can get for the response you want in frequency.

[ - ]

Looks like I may have missed the essence of your issue.

I re-read you comment and see that you are trying to align your RMS estimate with the signal itself.

If this is true, then there is no way around the delay.  But again, as I just commented, cascaded biquads will give you the minimum group delay possible for a given frequency cutoff.

[ - ]

Thanks.

But still my main question is does it help if instead of cascading I put them in parallel?

[ - ]

My understanding is that the design of the IIR filter you want will define the delay.  A parallel or cascade implementation in the form of biquads are just different ways of implementing the same basic IIR filter response.

So I don't think that the implementation in biquads will change the actual delay of the same IIR filter response.

[ - ]

Yes.  The transfer function determines the delay.  Putting two low-pass filters in parallel will, in general, give you a different transfer function.  $$H_1 + H_2 \ne H_1 \cdot H_2$$.

[ - ]

Not really.  If you put two of the same filter in parallel, it would be the same as one filter with the gain increased by a factor of two. If you arbitrarily combine two biquad filters in parallel, there is an equivalent combination of two series filters.  Regarding your application, you should probably use an FIR filter instead if you want to keep the group delay low

[ - ]

An FIR filter with minimum phase response can - at best - match the delay of a set of biquads.

I believe that you won't be able to do any better WRT delay.

A typical FIR design will be linear phase by default, and therefore will have more delay than the IIR design.

[ - ]

I mostly agree.  If the biquad has all its poles and zeroes inside the unit circle in the z-domain, it’s already minimum phase, so it’s true that there is nothing to gain there.

Similarly, for that particular amplitude response, the biquad is the minimum phase implementation, so saying the same thing in a different way, nothing to gain there.

I agree that phase linear filter would not provide any benefit in terms of group delay.

What I would say is that the only way to reduce group delay is to make concessions in the amplitude response. I suppose this could either mean modifying your IIR coefficients, or trying to implement an FIR filter

[ - ]

[ - ]