Allpass filter phase

Oct 24, 2012 10 Replies

One version of a second-order allpass filter has a recursion equation:



y(n) = a*x(n) + x(n-2) - a*y(n-2)



and transfer function



H(z) = (a + z**-2) / (1 + a*z**-2)



The phase of the filter can be obtained by substituting z = exp(jw) in the above and computing the arctan of the ratio of the imaginary and real parts of H(w).



The phase is also given by the equation


1) theta(w) = -2*arctan{ (1 - a) * tan(w) / (1 + a) }

and by the more cumbersome equation


2) theta(w) = arctan[(a**2-1)*sin(2*w) / { (a**2+1)*cos(2*w)+2*a}]


I derived the second equation by substituting exp(jw) for z in H(z) and multiplying the numerator and denominator by the conjugate of the denominator; the phase angle is then the arctan of the ratio of the imaginary and real parts of the numerator. I thought perhaps eq. 2 could be transformed into eq. 1 by substituting the trig identities for sin(2w) and cos(2w) but that led nowhere. There evidently is a way of arriving at eq. 1 but I haven't found it. Any suggestions? I'm not looking for the complete derivation, just the general approach.



Thanks in advance. Gary Richardson


I don't know if this will get you there, but if I'm not completely cracked the phase of an allpass filter is twice the phase of the all-pole part. Is your first equation just twice the phase of 1 / (1 + a * z^ (-2)) ?

I have every faith that you can get to (1) from (2) directly, using trig identities. But you may be climbing the walls and gibbering before you get there.

My liberal friends think I'm a conservative kook. My conservative friends think I'm a liberal kook. Why am I not happy that they have found common ground? Tim Wescott, Communications, Control, Circuits & Software http://www.wescottdesign.com

the

ts

g

I've long forgotten all my trig tricks. But have you plugged a few numbers into each equation.. just to check that you get the same answer? (A reality check.)

George H.

Some people try to make problems too difficult. Your "twice the phase of the all-pole part" has to be correct...

For a second order all-pass the numerator and denominator differ ONLY in the _sign_ of the "s" term. ...Jim Thompson

| James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.

Well, I know it's true for continuous-time filters. I'm just not 100% certain about discrete time -- the fact that nearly everything that's true about the s domain is true about the z domain just means that when you _do_ stumble into the occasional pitfall it comes as a much bigger surprise.

It would only take half an hour to verify -- but I'm lazy today.

My liberal friends think I'm a conservative kook. My conservative friends think I'm a liberal kook. Why am I not happy that they have found common ground? Tim Wescott, Communications, Control, Circuits & Software http://www.wescottdesign.com

I'm not lazy, just tired. Been putting together a workbench, the heavy kind, steel with a 1-1/4" butcher block top (8'). ...Jim Thompson

| James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.

I've been taking apart pallets to make my own butcher block bench tops. I plan on a total of 5, 8' sections for a 40' bench in the back of my garage. Pull all the nails, rip them to the same width, then glue and clamp the sections. I'll use some all-thread to hold each section in compression, then they will drop onto pins on the legs.

When it's finished, I'll have plenty of room to do different kinds of work without clearing & resetting the bench.

I don't have that much garage ;-)

For a lot of things I do, I don't need a bench... my favorite "tool" is a Rockwell JawHorse. ...Jim Thompson

| James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.

I've long forgotten all my trig tricks. But have you plugged a few numbers into each equation.. just to check that you get the same answer? (A reality check.)

George H.

Yes, all three return idential values for 0

It has been some time since I worked in Z domain, but wouldn't an all pass have poles and zeros on the unit circle, forming a square.

Maybe the OP is over thinking this.

I just won this on Ebay:

formatting link

Hopefully, it'll help with my poor vision. Those units have a decent depth of field, and are made for more than just reading books. Some models have a video out, but I don't think this unit does. That would make it easy to take photos with a NTSC to USB video converter.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required