DSPRelated.com
Forums

The Delay of Minimum Phase FIR filter

Started by wyonghao May 17, 2013
>a solution I've used for myself is calculate the "spot" group delay from >the slope of phase on a grid of frequencies, then average with the power >spectrum of the test signal. Probably it turns out to be the same as >similar equations in earlier posts, rewritten. > >An "ad-hoc" solution could be to send a test pulse (IFT of the power >spectrum) through the filter and wait until 50 % of the energy are >accounted for. Resolution can be improved by oversampling (replace 1
delay
>with n delays and IFT the test pulse at the oversampled rate). Haven't >tried it, though. > >Whether or not any of this qualifies as "analytic" is open to debate, but >it's easily done in Matlab. > >BTW, I know the problem from equalizing IIR filters. What I usually do
here
>is to brute-force the target group delay, to rattle and shake the problem >until _quantized_ coefficients fall into place. Not stylish, but gets the >job done.
Thanks! Here is my Matlab code for Central time Greg Berchin mentioned in his earlier post: ----------------------------------------------------------------- % A normalised first-order temporal moment about time 't=0' is % referred to as the 'CENTRAL TIME, T', and is defined as % +inf % T = {INTEGRAL[t*y(t)²dt]}/E % -inf % This value can be thought of as the centroid of the area under the % amplitude-squared time history and is directly analogous to the % first statistical moment or mean value." function T=centraltime(A) L=length(A); t=1:L; E=sum((A).^2); Sum=0; for i=1:L Sum=Sum+t(i)*(A(i)^2); end T=Sum/E; ------------------------------------------------------------------ It seems working ok! would you share some of your implementation thought?
Hi,

I put together some code, here:
http://www.dsprelated.com/blogimages/MarkusNentwig/comp.dsp/120613_groupDelayCalculation.m

The more I think about it, the more I like my definition "wait until half
the energy has arrived". The reason is that group delay as derivative of
phase isn't well-defined when the amplitude response isn't flat. 

The code implements also a power-weighted averaging, but it gives different
results in some cases. It may be a bug in the equations, but I suspect
there is a conceptual difference.

Actually I can't recall any clear definition for "the" group delay of a
wideband signal. Take the code in a spirit of reading off a number from a
plot or the like, something that is probably close enough for engineering
purposes but doesn't claim perfect accuracy.

ps: file / function name needs to be changed (may not start with a digit)