question for theorists: zeros & phase
Magnus Danielson
cfmd at swipnet.se
Mon Sep 27 09:39:19 CEST 1999
From: Martin Czech <martin.czech at intermetall.de>
Subject: question for theorists: zeros & phase
Date: Mon, 27 Sep 1999 08:13:17 +0200 (MET DST)
> Hello theorists, I'm just putting together a little program to
> compute phase and magnitude for continuous and discrete filters. This
> is not difficult, all is written in the books. We can read there
> phase=arctan{Im/Re}. Oh, really? This is lovely academia. What happens if
> the pole/zero is very very close to the imaginary axis (unit circle)? Ther
> phase vector suddenly turns allmost 180 DEG. Due to the ambiguity of the
> arctan you get artefacts, phase jumps, oh well, one can eliminate that,
> but it causes some headache.
Nothing really dramatic happends there... it just goes faster. You are
simply not view this in enougth academic way ;)
> But one real phase jump remains: a zero on the imaginary axis, or on
> the unit circle. In both cases the phase vector comes closer and closer
> to the zero, and then it jumps 180 DEG to the other side (especially in
> the continuous case).
>
> It is clear to me that just at the zero the vector vanishes, so the
> phase does have no meaning there.
This is true for zeros, it is equally true for poles, but then you are blasted
instead.
But you would only experience an jump if you really pass throgth either a
zero or pole, this is actually _never_ done (think Heissenberg here), just
close enougth to count as it.
We have a lot of signals around the imaginary axis, but we have a heck of a
problem getting real poles or zeros sit tigth at the imaginary axis.
> Especially in the case of continuous
> filters the question remains, if the phase jumps by +180 or -180 DEG at
> the zero. Both would lead to the same phase vector, but different bode
> plots. To make things more confusing, zeros on the left side (inside
> unit circle) have a positive rotation whereas zeros on the right side
> (outside circle) have a negative rotation. So one can not argument by
> slowly approaching the imaginary axis (circle).
In the z-plane things got very confusing since someone (that Nyqvist fellow)
took the imaginary axis of the s-plane, cut of an infinite long end both up
and down, took the now finite length ends and bended them leftwards and
connected them so that it all shaped into a circle. All the stuff at
negative infinity on the real axis got stuffed into the new origo and the
positive infinity on the real axis was spread all over the complex inifinty
border. So, the z-plane is simply just a seriously screwed s-plane.
The Bode fellow saw that things could be made simpler, so he showved the
matematical accuracy for quick rule of thumbs.
Basically the same happends when you do z-splane stuff, but then you don't
move along a linear axis but along the unity circle (that Nyqvist bent for
us).
No, staring at formulas will make you gray-haired, better to retreit to
a graphical view...
^ imaginary axis
|
_-*
_-- /|\
x | | \
/ | \
-------|---+---o------> real axis
/ |
x |
|
|
|
Here we have the s-plane view of a 2-pole (x) and 1-zero (o) filter, which
forms a simple bandpass filter which takes an op-amp and a few caps and
resistors to realize (just to show that we are talking real filters here).
Oh, appologies for my ASCII graphic, it doesn't lend itself to no-90-degreesh
lines.
Anyway, the * point is the analysis point where we analyses the amplitude
and phase responce. We move from origo (DC/0 Hz) upwards towards some
frequency just below the clockspeed of some computer or so...
The three lines are pulled from the poles and zeros to whereever our analysis
point is. You can mentally think of the distance (length of a line) as
the inverse of the amount of influence a pole/zero has. You can then also
think of the angle of that line (relative the positive real, thus 0 degrees).
as the poles/zeros contribution to the phase.
The actual contribution to amplitude and phase for zeros and poles is
diffrent. A greater influence of a pole will increase the amplitude responce
where as the greater influence of a zero will decrease the amplitude
responce.
The hard-core formulas are:
(s - sz1) (s - sz2) ... (s - szm)
H(s) = ---------------------------------
(s - sp1) (s - sp2) ... (s - spn)
|Hz1(jw)| |(Hz2(jw)| ... |Hzm(jw)|
|H(jw)| = ----------------------------------
|Hp1(jw)| |(Hp2(jw)| ... |Hpn(jw)|
Ph(jw) = Phz1(jw) + Phz2(jw) + ... + Phzm(jw)
- Php1(jw) - Php2(jw) - ... - Phpm(jw)
_______________________
2 / 2 2 |
|Hzo(jw)| = \/Re(zo) + (w - Im(zo))
_______________________
2 / 2 2 |
|Hpo(jw)| = \/Re(po) + (w - Im(po))
-1 Im(zo) - w
Phzo(jw) = tan ----------
Re(zo)
-1 Im(po) - w
Phpo(jw) = tan ----------
Re(po)
where
m is the amount of zeros
n is the amount of poles
zm is the m:th zero
pn is the n:th pole
zo is any of the zeros
po is any of the poles
w is omega, that is angular frequency or 2*pi*f
j is the imaginary constant of sqrt(-1)
and hopefully you figure the rest out.
The z-plane is pretty much the same.
For the floor engineer without many mainframe hours to use up, those new
pocket calculators with trigonometry functions will work beutifully in
calculating responces this way. There is no big confusion about phase
unless someone happends to calculate just at the pole or zero.
> Since I expect a nonambigous bode plot for a stable pole/zero
> configuration there must be another restriction, I guess impulse
> response ?
Bode plots are a great simplification of the above formula, powerfull in its
own right. However, they are intended to describe the transfer function
and therefore these rules apply (as well to any other filter):
Poles stay left of the imaginary axis.
Poles with imaginary parts have to have a complementary friend.
Zeros with imaginary parts have to have a complementary friend.
The complementary friend issue is just to build the filter, thus making it
realizable.
The poles on the left half of the gamefield has to do with stability.
For control loops there are more refined stability requirements, but this
will do for us here and now.
As for this impulse responce guessing, if you follow the rules above, the
impulse responce will follow. The relation is called the LaPlace transform.
It connects the s-plane geometry with the time responce.
LaPlace
h(t) => H(s)
Inv. LaPlace
H(s) => h(t)
Consider the LaPlace transform a supercharged Fourier transform (and by
all means, consider the Fourier transform a reduced form or special case
of the LaPlace transform).
For our discrete time friends (friends of Mr. Nyquist) the equivalent
transform is the z-transform and its inverse.
The impulse responce of a linear time invariant filter (thus, no nonlinear
or time varying properties) will those be connected to it's poles and zeros
and be equially represented by those.
Going back to the distance analogy, a filter going into near self resonance
has thus placed two poles VERY near the imaginary axis, thus these poles have
a very high influence on the frequency responce there.
Similarly will a notch filter place two zeros very near the imaginary axis
in order to put those in a very high influence on the frequency responce there.
An all-pass filter have placed both poles and zeros in a balanced way such
that the compensate each other on the amplitude (simple geometric will do the
trick) but they will cooperate in the phase responce.
How many else on the list plots poles and zeros in their mind when they
hear speakers?
Cheers,
Magnus (who used to measure PA speaker systems)
More information about the Synth-diy
mailing list