DSPRelated.com
Forums

Coefficients for A-weighting filter

Started by Robert Adams December 15, 2006
On Thu, 21 Dec 2006 17:44:00 -0500, Randy Yates <yates@ieee.org> wrote:

>What I'm wondering is if it can be proven that the algorithm in >general will produce a stable IIR transfer function, i.e., how can you >guarantee the poles it generates are always inside the unit circle?
As far as I know, you can't. However, in my experience, with only some pathological exceptions, stable prototype systems have always yielded stable models and unstable prototype systems have always yielded unstable models. The exceptions were cases where pole(s) were extremely close to the jw-axis (like real part > -0.0001) or to the unit circle (like radius > .9999), where the model pole might slip to an unstable position. That's why I was so surprised when the A-weighting filter produced an unstable model -- it's a fairly benign transfer function. The problem in this case had to do with the way that I implemented the "artificial delay" mentioned in the magazine article. While the explanation is probably too complex for a brief comp.dsp post, I can summarize: I use a "cosine" input instead of a "sine" input because of observability problems with "sine" near half the sampling frequency. (This is also mentioned in the article.) If the frequency of a sine wave is "Fs/2", and you sample it at "Fs", you only capture the zero-crossings. So, assuming that the output of the system at Fs/2 is nonzero, the algorithm interprets the situation as "zero-input/nonzero-output". It deals with this by placing one or more poles at an angle of PI on the Z-plane, and those poles are often outside the unit circle. In my computer program I made the mistake of adding the "artificial delay" not only to the output sequence, but to the input sequence as well. Well, if you delay a cosine wave you phase-shift it. Trig identities will tell you that a phase-shifted cosine is equal to a cosine plus a sine. That little bit of sine wave on the input led to the unstable pole(s) in the transfer function. I solved the problem by eliminating the phase shift from the input sequence, allowing it only in the output sequence. The net effect of this is that if you inject "delta" samples of "artificial delay" into the frequency response, the first "delta" coefficients of the numerator of the transfer function will be approximately zero. (Approximately, not exactly, because of the least squares nature of the model fit.) Now a teaser, for future study: It can be shown that a cosine input formulation models the real part of the frequency response, and that a sine input formulation models the imaginary part (and is almost always unstable because of the observability problems mentioned above). When I was in graduate school I was trying to find a way to eliminate that sine formulation instability. But I had to move on with my life before I solved the problem. Greg