Hi, i've been teaching myself dsp and currently im trying to get a good
understanding of pole zero filter design. I understand how to get the
magnitude response but i have some problem with the phase response. I'm
working thru an online book and im up to here
So it says the phase response is evaluated from all the angles from the
frequency to each pole and zero. The thing i dont understand (yeah it always
takes me fookin ages to get to the point), is that some of the angles are
anticlockwise and some are clockwise from 0, so some are negative some
positive. Which implies positive and negative phase delay? But that's not
posible is it?
Should the angles be -PI..PI or should they be 0..2PI ? Or what exactly?
On 18 Feb, 17:11, "Chris Warwick" <s...@m.me.not> wrote:
> Hi, i've been teaching myself dsp and currently im trying to get a good
> understanding of pole zero filter design. I understand how to get the
> magnitude response but i have some problem with the phase response. I'm
> working thru an online book and im up to here
>
> http://ccrma.stanford.edu/~jos/filte...Response_Calcu...
>
> So it says the phase response is evaluated from all the angles from the
> frequency to each pole and zero. The thing i dont understand (yeah it always
> takes me fookin ages to get to the point), is that some of the angles are
> anticlockwise and some are clockwise from 0, so some are negative some
> positive. Which implies positive and negative phase delay? But that's not
> posible is it?
The one thing that is missing from figure 8.4 on that page is a zero
outside
the unit circle. All the zeros are inside the unit circle.
To see the signficance, add a zero at z'=1 + j. Then draw a vector
starting
at z' and ends at z" = 1. Then let the point of the vector trace the
unit
circle in the anticlockwise direction. The vector starting in z' will
rotate
in the clockwise direction around z'. If you do the same excercise
with
the zeros inside the unit circle, the vectors rotate in the
anticlockwise
direction around the zeros as the points trce the unit cicle in the
anticlockwise direction.
> Should the angles be -PI..PI or should they be 0..2PI ?
That doesn't matter, as long as the vetors trace the unit circle
exactly on revolution in the anticlockwise direction.
On Feb 18, 8:11 am, "Chris Warwick" <s...@m.me.not> wrote:
> Hi, i've been teaching myself dsp and currently im trying to get a good
> understanding of pole zero filter design. I understand how to get the
> magnitude response but i have some problem with the phase response. I'm
> working thru an online book and im up to here
>
> http://ccrma.stanford.edu/~jos/filte...Response_Calcu...
>
> So it says the phase response is evaluated from all the angles from the
> frequency to each pole and zero. The thing i dont understand (yeah it always
> takes me fookin ages to get to the point), is that some of the angles are
> anticlockwise and some are clockwise from 0, so some are negative some
> positive. Which implies positive and negative phase delay? But that's not
> posible is it?
It is possible for an individual pole or zero to
contribute negative delay. But you really have
to count all the poles and zeros including the ones
at the origin and at infinity to get the complete
delay (integer tap + fractional phase), which will
end up being positive for a realizable filter.
(e.g. -20 degrees + 1 tap is really +340 degrees)
Chris Warwick wrote:
> Hi, i've been teaching myself dsp and currently im trying to get a good
> understanding of pole zero filter design. I understand how to get the
> magnitude response but i have some problem with the phase response. I'm
> working thru an online book and im up to here
>
> http://ccrma.stanford.edu/~jos/filte...lculation.html
>
> So it says the phase response is evaluated from all the angles from the
> frequency to each pole and zero. The thing i dont understand (yeah it always
> takes me fookin ages to get to the point), is that some of the angles are
> anticlockwise and some are clockwise from 0, so some are negative some
> positive. Which implies positive and negative phase delay? But that's not
> posible is it?
>
You can get phase lead at the lower frequencies with a stable zero.
It's real, but it comes at the cost of rising gain as the frequency
increases. Your system is still causal, but the wave shape will be
distorted.
You can't get phase lead with no amplitude distortion in a causal system.
One more question. I plot the phase response by calculating the angle to
each pole/zero with arcTan, then add up the zero angles, then subtract the
pole angles. This means i get sudden jumps in the plot where the angle
returned by arcTan switches from +PI to -PI. That cant realy mean an
instantanious 2PI step in the overall phase response can it? I just seems to
me that it should be a contiuous plot like the frequency response. Those
steps are just an artifact of the way I've calculated it? If so is there a
way to calculate it without those steps? Is there an easier way to get the
phase response that calculating each angle seperately, can it be done with
vector math and then grab the angle at the end?
On 19 Feb, 01:50, "Chris Warwick" <s...@m.me.not> wrote:
> "Chris Warwick" <s...@m.me.not> wrote in message
>
> news:[email protected]..
>
> Thanks everyone.
>
> One more question. I plot the phase response by calculating the angle to
> each pole/zero with arcTan, then add up the zero angles, then subtract the
> pole angles. This means i get sudden jumps in the plot where the angle
> returned by arcTan switches from +PI to -PI. That cant realy mean an
> instantanious 2PI step in the overall phase response can it?
If we agree that the "true" phase is PHI (with capital letters), the
best you actually can compute is a phase phi (note the lowercase
letters) such that
PHI = phi + n*2*pi
where n is some (unknown) integer and -pi <= phi <= pi.
> I just seems to
> me that it should be a contiuous plot like the frequency response. Those
> steps are just an artifact of the way I've calculated it? If so is there a
> way to calculate it without those steps? Is there an easier way to get the
> phase response that calculating each angle seperately, can it be done with
> vector math and then grab the angle at the end?
No matter how you do things, you end up with the PHI <-> phi
relation above. This is a fundamental property of complex numbers
(check out "Riemann surfaces" in a book on complex maths) and
is often the very reason for why "obvious" and "simple" signal
processing schemes don't work in practice.
>> I just seems to
>> me that it should be a contiuous plot like the frequency response. Those
>> steps are just an artifact of the way I've calculated it? If so is there
>> a
>> way to calculate it without those steps? Is there an easier way to get
>> the
>> phase response that calculating each angle seperately, can it be done
>> with
>> vector math and then grab the angle at the end?
>
> No matter how you do things, you end up with the PHI <-> phi
> relation above. This is a fundamental property of complex numbers
> (check out "Riemann surfaces" in a book on complex maths) and
> is often the very reason for why "obvious" and "simple" signal
> processing schemes don't work in practice.
"Rune Allnor" <[email protected]> wrote in message
news:[email protected] oups.com...
> On 19 Feb, 01:50, "Chris Warwick" <s...@m.me.not> wrote:
>> "Chris Warwick" <s...@m.me.not> wrote in message
>> I just seems to
>> me that it should be a contiuous plot like the frequency response. Those
>> steps are just an artifact of the way I've calculated it? If so is there
>> a
>> way to calculate it without those steps? Is there an easier way to get
>> the
>> phase response that calculating each angle seperately, can it be done
>> with
>> vector math and then grab the angle at the end?
>
> No matter how you do things, you end up with the PHI <-> phi
> relation above. This is a fundamental property of complex numbers
> (check out "Riemann surfaces" in a book on complex maths) and
> is often the very reason for why "obvious" and "simple" signal
> processing schemes don't work in practice.
On Feb 19, 12:27 am, "Rune Allnor" <all...@tele.ntnu.no> wrote:
> On 19 Feb, 01:50, "Chris Warwick" <s...@m.me.not> wrote:
>
> > "Chris Warwick" <s...@m.me.not> wrote in message
>
> >news:[email protected]..
>
> > Thanks everyone.
>
> > One more question. I plot the phase response by calculating the angle to
> > each pole/zero with arcTan, then add up the zero angles, then subtract the
> > pole angles. This means i get sudden jumps in the plot where the angle
> > returned by arcTan switches from +PI to -PI. That cant realy mean an
> > instantanious 2PI step in the overall phase response can it?
>
> If we agree that the "true" phase is PHI (with capital letters), the
> best you actually can compute is a phase phi (note the lowercase
> letters) such that
>
> PHI = phi + n*2*pi
>
> where n is some (unknown) integer and -pi <= phi <= pi.
This would imply that you could not calculate the
absolute delay of a LTI IIR or FIR filter, which
seems false.
The angle from any pole or zero shouldn't change by
more than +-2*pi as the frequency response traverses
the entire unit circle, so there will be a zero
angle reference for each pole or zero which causes
no phase jumps during a single orbit, and also equal
a known delay at some frequency.
On 19 Feb, 23:15, "Ron N." <rhnlo...@yahoo.com> wrote:
> On Feb 19, 12:27 am, "Rune Allnor" <all...@tele.ntnu.no> wrote:
>
>
>
>
>
> > On 19 Feb, 01:50, "Chris Warwick" <s...@m.me.not> wrote:
>
> > > "Chris Warwick" <s...@m.me.not> wrote in message
>
> > >news:[email protected]..
>
> > > Thanks everyone.
>
> > > One more question. I plot the phase response by calculating the angle to
> > > each pole/zero with arcTan, then add up the zero angles, then subtract the
> > > pole angles. This means i get sudden jumps in the plot where the angle
> > > returned by arcTan switches from +PI to -PI. That cant realy mean an
> > > instantanious 2PI step in the overall phase response can it?
>
> > If we agree that the "true" phase is PHI (with capital letters), the
> > best you actually can compute is a phase phi (note the lowercase
> > letters) such that
>
> > PHI = phi + n*2*pi
>
> > where n is some (unknown) integer and -pi <= phi <= pi.
>
> This would imply that you could not calculate the
> absolute delay of a LTI IIR or FIR filter, which
> seems false.
You can't. You can compute a RELATIVE delay from some
suitably chosen reference.
On Feb 19, 2:29 pm, "Rune Allnor" <all...@tele.ntnu.no> wrote:
> On 19 Feb, 23:15, "Ron N." <rhnlo...@yahoo.com> wrote:
>
>
>
> > On Feb 19, 12:27 am, "Rune Allnor" <all...@tele.ntnu.no> wrote:
>
> > > On 19 Feb, 01:50, "Chris Warwick" <s...@m.me.not> wrote:
>
> > > > "Chris Warwick" <s...@m.me.not> wrote in message
>
> > > >news:[email protected]..
>
> > > > Thanks everyone.
>
> > > > One more question. I plot the phase response by calculating the angle to
> > > > each pole/zero with arcTan, then add up the zero angles, then subtract the
> > > > pole angles. This means i get sudden jumps in the plot where the angle
> > > > returned by arcTan switches from +PI to -PI. That cant realy mean an
> > > > instantanious 2PI step in the overall phase response can it?
>
> > > If we agree that the "true" phase is PHI (with capital letters), the
> > > best you actually can compute is a phase phi (note the lowercase
> > > letters) such that
>
> > > PHI = phi + n*2*pi
>
> > > where n is some (unknown) integer and -pi <= phi <= pi.
>
> > This would imply that you could not calculate the
> > absolute delay of a LTI IIR or FIR filter, which
> > seems false.
>
> You can't. You can compute a RELATIVE delay from some
> suitably chosen reference.
This would imply that only the shape and not the location
of the impulse response is knowable.
Mathematically, a sine wave may look like itself when
delayed by one cycle, but to say that a 1 tap delay
line has an 11 tap phase delay does not sound useful
for anything except simplifying equations. I did not
see that narrow purpose in the OP's question.
On 20 Feb, 00:55, "Ron N." <rhnlo...@yahoo.com> wrote:
> On Feb 19, 2:29 pm, "Rune Allnor" <all...@tele.ntnu.no> wrote:
>
>
>
>
>
> > On 19 Feb, 23:15, "Ron N." <rhnlo...@yahoo.com> wrote:
>
> > > On Feb 19, 12:27 am, "Rune Allnor" <all...@tele.ntnu.no> wrote:
>
> > > > On 19 Feb, 01:50, "Chris Warwick" <s...@m.me.not> wrote:
>
> > > > > "Chris Warwick" <s...@m.me.not> wrote in message
>
> > > > >news:[email protected]..
>
> > > > > Thanks everyone.
>
> > > > > One more question. I plot the phase response by calculating the angle to
> > > > > each pole/zero with arcTan, then add up the zero angles, then subtract the
> > > > > pole angles. This means i get sudden jumps in the plot where the angle
> > > > > returned by arcTan switches from +PI to -PI. That cant realy mean an
> > > > > instantanious 2PI step in the overall phase response can it?
>
> > > > If we agree that the "true" phase is PHI (with capital letters), the
> > > > best you actually can compute is a phase phi (note the lowercase
> > > > letters) such that
>
> > > > PHI = phi + n*2*pi
>
> > > > where n is some (unknown) integer and -pi <= phi <= pi.
>
> > > This would imply that you could not calculate the
> > > absolute delay of a LTI IIR or FIR filter, which
> > > seems false.
>
> > You can't. You can compute a RELATIVE delay from some
> > suitably chosen reference.
>
> This would imply that only the shape and not the location
> of the impulse response is knowable.
>
> Mathematically, a sine wave may look like itself when
> delayed by one cycle, but to say that a 1 tap delay
> line has an 11 tap phase delay does not sound useful
> for anything except simplifying equations.
"Useful" has nothing to do with anything. "Ambiguous" is the key.
> I did not
> see that narrow purpose in the OP's question.
What purpose you, I or anyody else has with DSP
is beside the point. The simple fact of the matter is
that phase can only be determined to within mod 2*pi.
At best.
On Feb 19, 4:32 pm, "Rune Allnor" <all...@tele.ntnu.no> wrote:
> On 20 Feb, 00:55, "Ron N." <rhnlo...@yahoo.com> wrote:
>
>
>
> > On Feb 19, 2:29 pm, "Rune Allnor" <all...@tele.ntnu.no> wrote:
>
> > > On 19 Feb, 23:15, "Ron N." <rhnlo...@yahoo.com> wrote:
>
> > > > On Feb 19, 12:27 am, "Rune Allnor" <all...@tele.ntnu.no> wrote:
>
> > > > > On 19 Feb, 01:50, "Chris Warwick" <s...@m.me.not> wrote:
>
> > > > > > "Chris Warwick" <s...@m.me.not> wrote in message
>
> > > > > >news:[email protected]..
>
> > > > > > Thanks everyone.
>
> > > > > > One more question. I plot the phase response by calculating the angle to
> > > > > > each pole/zero with arcTan, then add up the zero angles, then subtract the
> > > > > > pole angles. This means i get sudden jumps in the plot where the angle
> > > > > > returned by arcTan switches from +PI to -PI. That cant realy mean an
> > > > > > instantanious 2PI step in the overall phase response can it?
>
> > > > > If we agree that the "true" phase is PHI (with capital letters), the
> > > > > best you actually can compute is a phase phi (note the lowercase
> > > > > letters) such that
>
> > > > > PHI = phi + n*2*pi
>
> > > > > where n is some (unknown) integer and -pi <= phi <= pi.
>
> > > > This would imply that you could not calculate the
> > > > absolute delay of a LTI IIR or FIR filter, which
> > > > seems false.
>
> > > You can't. You can compute a RELATIVE delay from some
> > > suitably chosen reference.
>
> > This would imply that only the shape and not the location
> > of the impulse response is knowable.
>
> > Mathematically, a sine wave may look like itself when
> > delayed by one cycle, but to say that a 1 tap delay
> > line has an 11 tap phase delay does not sound useful
> > for anything except simplifying equations.
>
> "Useful" has nothing to do with anything. "Ambiguous" is the key.
Useful has everything to do with engineering.
> > I did not
> > see that narrow purpose in the OP's question.
>
> What purpose you, I or anyody else has with DSP
> is beside the point. The simple fact of the matter is
> that phase can only be determined to within mod 2*pi.
> At best.
On 20 Feb, 07:14, "Ron N." <rhnlo...@yahoo.com> wrote:
> On Feb 19, 4:32 pm, "Rune Allnor" <all...@tele.ntnu.no> wrote:
> > The simple fact of the matter is
> > that phase can only be determined to within mod 2*pi.
> > At best.
>
> Only given an unsuitable definition of phase.
Maths is not politics. Unlike politics, one can not choose
to change the laws of maths just because one finds that
they don't support one's intentions.
The phase of a complex number can only be determined to
within mod 2*pi. It's as simle as that. Anyone might choose
to ignore the n*2*pi term. The competent engineer will do
so if the application seem to allow it, but he will keep the
n*2*pi term in mind, just in case he should be wrong.
On Feb 20, 4:52 am, "Rune Allnor" <all...@tele.ntnu.no> wrote:
> On 20 Feb, 07:14, "Ron N." <rhnlo...@yahoo.com> wrote:
>
> > On Feb 19, 4:32 pm, "Rune Allnor" <all...@tele.ntnu.no> wrote:
> > > The simple fact of the matter is
> > > that phase can only be determined to within mod 2*pi.
> > > At best.
>
> > Only given an unsuitable definition of phase.
>
> Maths is not politics. Unlike politics, one can not choose
> to change the laws of maths just because one finds that
> they don't support one's intentions.
>
> The phase of a complex number can only be determined to
> within mod 2*pi. It's as simple as that.
no, it is not as simple as that...
> Anyone might choose
> to ignore the n*2*pi term. The competent engineer will do
> so if the application seem to allow it, but he will keep the
> n*2*pi term in mind, just in case he should be wrong.
.... if it *were* as simple as that, why keep the n*2*pi term in mind?
if you have a single complex number, all by itself, without the
context of other related complex numbers, then you are correct to say:
"The phase of a complex number can only be determined to within mod
2*pi. It's as simple as that."
but when you have a complex function of a real variable (whether the
argument is frequency in frequency response or time in an analytic
signal) then phase unwrapping *is* a complexity that comes into the
mix. given a reasonable assumption of initial condition (like the
phase at DC is zero or +/- pi so "n" = 0 at DC), then you can actually
come up with mathematically meaningful values for "n" when jump
discontinuities are detected.
> given a reasonable assumption of initial condition (like the
> phase at DC is zero or +/- pi so "n" = 0 at DC), then you can actually
> come up with mathematically meaningful values for "n" when jump
> discontinuities are detected.
Let me put it in more physical terms. While it's true that arg(z) has an
ambiguity of +/- 2n*pi, an actual piece of hardware does not. There are
instances where phase unwrapping if difficult or impossible
mathematically, but real signals have an unambiguous phase whether it
can be calculated or not. (The phase isn't always determined by the
delay, as a Hilbert transformer demonstrates.)
Jerry
--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
On Feb 20, 9:33 am, "robert bristow-johnson"
<r...@audioimagination.com> wrote:
> On Feb 20, 4:52 am, "Rune Allnor" <all...@tele.ntnu.no> wrote:
>
> > On 20 Feb, 07:14, "Ron N." <rhnlo...@yahoo.com> wrote:
>
> > > On Feb 19, 4:32 pm, "Rune Allnor" <all...@tele.ntnu.no> wrote:
> > > > The simple fact of the matter is
> > > > that phase can only be determined to within mod 2*pi.
> > > > At best.
>
> > > Only given an unsuitable definition of phase.
>
> > Maths is not politics.
And engineering is not pure math, even given mathematics
"unreasonably effectiveness" at solving many engineering
problems. Phase is often used in reference to impure
"sinusoids" of very finite extent where the energy can be
modeled as localized in time, not 2n*pi later or earlier for
any arbitrary n.
On 20 Feb, 18:33, "robert bristow-johnson" <r...@audioimagination.com>
wrote:
> On Feb 20, 4:52 am, "Rune Allnor" <all...@tele.ntnu.no> wrote:
>
> > On 20 Feb, 07:14, "Ron N." <rhnlo...@yahoo.com> wrote:
>
> > > On Feb 19, 4:32 pm, "Rune Allnor" <all...@tele.ntnu.no> wrote:
> > > > The simple fact of the matter is
> > > > that phase can only be determined to within mod 2*pi.
> > > > At best.
>
> > > Only given an unsuitable definition of phase.
>
> > Maths is not politics. Unlike politics, one can not choose
> > to change the laws of maths just because one finds that
> > they don't support one's intentions.
>
> > The phase of a complex number can only be determined to
> > within mod 2*pi. It's as simple as that.
>
> no, it is not as simple as that...
Counter-examples, please?
> > Anyone might choose
> > to ignore the n*2*pi term. The competent engineer will do
> > so if the application seem to allow it, but he will keep the
> > n*2*pi term in mind, just in case he should be wrong.
>
> ... if it *were* as simple as that, why keep the n*2*pi term in mind?
Because you might be in a situation where the n*2*pi term *is*
important. It doesn't happen very often -- phase unwrapping of
discrete spectra is the only application I can think of, off the
top of my head -- but it does happen.
> if you have a single complex number, all by itself, without the
> context of other related complex numbers, then you are correct to say:
>
> "The phase of a complex number can only be determined to within mod
> 2*pi. It's as simple as that."
That's what I have been discussing. Numbers.
> but when you have a complex function of a real variable (whether the
> argument is frequency in frequency response or time in an analytic
> signal) then phase unwrapping *is* a complexity that comes into the
> mix.
Again, I am discussing complex numbers, either one or several
in a vector like a spectrum. Complex functions is a whole different
cup of tea.
> given a reasonable assumption of initial condition (like the
> phase at DC is zero or +/- pi so "n" = 0 at DC),
Sure. The key word here is "assumption." Other terms might
be "convention", "convenience" or something like that. All of which
are subjective. One can defend any particular choise in terms of
"there are certain enefits in this choise, " not "this is the One
unequivocal Truth."
> then you can actually
> come up with mathematically meaningful values for "n" when jump
> discontinuities are detected.
Sure. But again, "meaningful" is not the same as "the One and Only
Truth."
On 20 Feb, 19:56, "Ron N." <rhnlo...@yahoo.com> wrote:
> On Feb 20, 9:33 am, "robert bristow-johnson"
>
> <r...@audioimagination.com> wrote:
> > On Feb 20, 4:52 am, "Rune Allnor" <all...@tele.ntnu.no> wrote:
>
> > > On 20 Feb, 07:14, "Ron N." <rhnlo...@yahoo.com> wrote:
>
> > > > On Feb 19, 4:32 pm, "Rune Allnor" <all...@tele.ntnu.no> wrote:
> > > > > The simple fact of the matter is
> > > > > that phase can only be determined to within mod 2*pi.
> > > > > At best.
>
> > > > Only given an unsuitable definition of phase.
>
> > > Maths is not politics.
>
> And engineering is not pure math, even given mathematics
> "unreasonably effectiveness" at solving many engineering
> problems.
Do you by this state that you think mathemathics is "unreasonable"
as a tool for engineering problems?
> Phase is often used in reference to impure
"Impure" means...? (I don't have my dictionary availabe)
> "sinusoids" of very finite extent where the energy can be
> modeled as localized in time, not 2n*pi later or earlier for
> any arbitrary n.
This is an interesting claim, which you have to prove. I can
only interpret this statement that you can uniqely determine
whether an observed sinusoidal has been generated by f(x)
and not g(x) below:
f(x) = sin(2*n*pi*x + T)
g(x) = sin(2*m*pi*x + T)
where n and m are integers, n=/=m, and T is some real numer
such that 0 <= T < 2*pi.
On Feb 20, 12:39 pm, "Rune Allnor" <all...@tele.ntnu.no> wrote:
> On 20 Feb, 19:56, "Ron N." <rhnlo...@yahoo.com> wrote:
>
>
>
> > On Feb 20, 9:33 am, "robert bristow-johnson"
>
> > <r...@audioimagination.com> wrote:
> > > On Feb 20, 4:52 am, "Rune Allnor" <all...@tele.ntnu.no> wrote:
>
> > > > On 20 Feb, 07:14, "Ron N." <rhnlo...@yahoo.com> wrote:
>
> > > > > On Feb 19, 4:32 pm, "Rune Allnor" <all...@tele.ntnu.no> wrote:
> > > > > > The simple fact of the matter is
> > > > > > that phase can only be determined to within mod 2*pi.
> > > > > > At best.
>
> > > > > Only given an unsuitable definition of phase.
>
> > > > Maths is not politics.
>
> > And engineering is not pure math, even given mathematics
> > "unreasonably effectiveness" at solving many engineering
> > problems.
>
> Do you by this state that you think mathemathics is "unreasonable"
> as a tool for engineering problems?
Actually the opposite. Google the terms for a very
famous paper on the topic.
> > Phase is often used in reference to impure
>
> "Impure" means...? (I don't have my dictionary availabe)
>
> > "sinusoids" of very finite extent where the energy can be
> > modeled as localized in time, not 2n*pi later or earlier for
> > any arbitrary n.
>
> This is an interesting claim, which you have to prove.
Actually, the opposite is what has to be proved. How do
you know your mathematical model represents anything
useful (e.g. an actual physical source to a DSP built using
silicon).
On Feb 20, 3:01 pm, "Rune Allnor" <all...@tele.ntnu.no> wrote:
> On 20 Feb, 18:33, "robert bristow-johnson" <r...@audioimagination.com>
> wrote:
> That's what I have been discussing. Numbers.
>
> > but when you have a complex function of a real variable (whether the
> > argument is frequency in frequency response or time in an analytic
> > signal) then phase unwrapping *is* a complexity that comes into the
> > mix.
>
> Again, I am discussing complex numbers, either one or several
> in a vector like a spectrum.
> Complex functions is a whole different
> cup of tea.
complex function of a real variable. this "vector like a spectrum" is
a discretely sampled complex function of a real variable. phase
unwrapping is both salient and well-defined in that case. adding
2*pi*n to the angle of a single complex number out of context of any
others is not particularly meaningful.
> > given a reasonable assumption of initial condition (like the
> > phase at DC is zero or +/- pi so "n" = 0 at DC),
>
> Sure. The key word here is "assumption."
come on! what phase angle, other than 0 (for non-inverting gain) or
+/- pi (for inverting gain) is reasonable for the frequency response
at DC?
> Other terms might
> be "convention", "convenience" or something like that.
baloney.
>All of which are subjective.
no.
> One can defend any particular choise in terms of
> "there are certain benefits in this choise, " not "this is the One
> unequivocal Truth."
>
> > then you can actually
> > come up with mathematically meaningful values for "n" when jump
> > discontinuities are detected.
>
> Sure. But again, "meaningful" is not the same as "the One and Only
> Truth."
if the other "truths" are not meaningful, i'm willing to call the one
that remains the one and only truth.
for a minimum-phase system, the phase angle (in radians) and the gain
(in nepers or dB/8.68589) must be a hilbert transform pair. do you
think that is consistent to what you get when you add an arbitrary
piece-wise constant function equal to 2*pi*m (for arbitrary and
changing integer "m") to the phase?
a 6th order non-inverting low-pass filter does not have a phase angle
of 102*pi at DC. the only meaningful phase angle is the one, seen in
the context of the whole frequency response function as being odd
symmetry and continuous. that determines an appropriate multiple of
2*pi to be added at specific frequencies. if it's an inverting LPF,
then there is a jump discontinuity of 2*pi at DC (+pi for f=-epsilon
and -pi for f=+epsilon) and there would be continuous extension after
that. still a deterministic multiple of 2*pi to be added at specific
frequencies.
THIS is a personal convention, but still results in a unambiguous
choice of 2*pi*n: let the frequency response of a real system be
H(f) = A(f) * exp( j*phi(f) )
where A(f) = +/- |H(f)|
phi(0) = 0 phi(-f) = -phi(f)
and phi(f) is continuous. so at frequencues where H(f) (and A(f))
may go to zero, rather than have a jump discontinuity in the phase on
both sides of this singular point, let the sign change be reflected in
A(f) and let phi(f) be continuous on both sides of this singular point
where H(f)=0.
On 21 Feb, 02:16, "robert bristow-johnson" <r...@audioimagination.com>
wrote:
> On Feb 20, 3:01 pm, "Rune Allnor" <all...@tele.ntnu.no> wrote:
>
> > On 20 Feb, 18:33, "robert bristow-johnson" <r...@audioimagination.com>
> > wrote:
> > That's what I have been discussing. Numbers.
>
> > > but when you have a complex function of a real variable (whether the
> > > argument is frequency in frequency response or time in an analytic
> > > signal) then phase unwrapping *is* a complexity that comes into the
> > > mix.
>
> > Again, I am discussing complex numbers, either one or several
> > in a vector like a spectrum.
> > Complex functions is a whole different
> > cup of tea.
>
> complex function of a real variable. this "vector like a spectrum" is
> a discretely sampled complex function of a real variable.
While this may be rue in some cases, it is not at all necessarily
so.
A complex-vaued spectrum is an ordered collection of numbers.
Sample white noise and compute its spectrum. I would be very
interested
in seeing how you determine the "complex function of a real variable"
from
such data.
> phase
> unwrapping is both salient and well-defined in that case.
If you have sampled a complex analytical function, then yes. In that
case, we are talking about sorting out Riemann surfaces, not phase
unwrapping. I am not talking about complex functions. I am talking
about spectra computed from data, white noise being the case furthest
removed from analytic complex-valued functions.
> adding
> 2*pi*n to the angle of a single complex number out of context of any
> others is not particularly meaningful.
Maybe not, but I challenge you to come up with a sequence of complex
numbers on carthesian form, convert them to plar form, add n*2*pi
to the complex exponent of one randomly picked number and random
integer n, then convert back to carthesian form.
Would you, in a double-blind test, be able to tell from the result
which
number in the sequence was modified?
> > > given a reasonable assumption of initial condition (like the
> > > phase at DC is zero or +/- pi so "n" = 0 at DC),
>
> > Sure. The key word here is "assumption."
>
> come on! what phase angle, other than 0 (for non-inverting gain) or
> +/- pi (for inverting gain) is reasonable for the frequency response
> at DC?
"Reasonable" has nothing to do with anything. "Mathemathically
valid" is the key term.
In the olden day when I was still dabbling in acoustics, I did some
stuff in acoustics bouncng back and forth between reflecting walls.
What happens is that you set up a set of boundary conditions, say,
reflection coefficients R1 = 1 and R2 = -1at certain surfaces, and
then end up with an expression on the form
exp(jkx) = -1 (1)
The key to move on from there, is to express the number -1 on
complex polar form as
-1 = exp(j(2n-1)*pi) (2)
Sustitute in (1) to find
exp(jkx) = exp(j(2n-1)*pi) (3)
Next compare exponentials, skipping j, to find
kx = (2n-1)*pi (4)
Solve this for k to find
k_n = (2n-1)*pi/x (5)
Equation (5) has infinitely many solutions, since it has one
solution for each integer n.
This was the calculation for the underwater propagation problem,
where there is one pressure-release surface. For room acoustics,
the exact same argument is based on that all reflection coefficients
equal 1, resulting in
exp(j2npi) = 1 (6)
and then continuing as from (3) onward. Not at all difficult,
but it takes some mind-ending to be comfortale with multiple
complex representations of one real number.
> > Other terms might
> > be "convention", "convenience" or something like that.
>
> baloney.
OK. Prove me wrong. Prove that there exists One and Only
Undisputable Reference for the phase of complex numbers.
> >All of which are subjective.
>
> no.
Sure. You make your choise, somebody else might choose
otherwise. When all is said and done, everybody chooses
what gets the job done with the least amount of drudgery.
Completely pragmatic choises, based on return for drudgery.
Completely subjective criteria. Of course, it doesn't seem that
way, since in 99.999% of the cases everybody choose the
same representation.
> for a minimum-phase system, the phase angle (in radians) and the gain
> (in nepers or dB/8.68589) must be a hilbert transform pair. do you
> think that is consistent to what you get when you add an arbitrary
> piece-wise constant function equal to 2*pi*m (for arbitrary and
> changing integer "m") to the phase?
If you add a constant term 2*m*pi to the phase of a spectrum, m being
an arbitrary integer, you would not be able to see the difference
before
and after.This has to be a constant term across the spectrum, as
messing with the derivative of the phase, dphi/dw, would mess up
the group delay.
> a 6th order non-inverting low-pass filter does not have a phase angle
> of 102*pi at DC. the only meaningful phase angle is ...
"Meaningful" is an engineering term, which is relevant for the
application. "Mathemathically valid" is a quite different term.
A phase 102*pi is perfectly valid, what the maths is concerned.
Both you and I are sufficiently pragmatic to use the simplest
expression one can get away with. Since you will never be able
to tell the difference between a filter with a phase term 102*pi and
one with phase 0, we use the simplest.
On Feb 21, 2:03 am, "Rune Allnor" <all...@tele.ntnu.no> wrote:
> On 21 Feb, 02:16, "robert bristow-johnson" <r...@audioimagination.com>
> wrote:
> > for a minimum-phase system, the phase angle (in radians) and the gain
> > (in nepers or dB/8.68589) must be a hilbert transform pair. do you
> > think that is consistent to what you get when you add an arbitrary
> > piece-wise constant function equal to 2*pi*m (for arbitrary and
> > changing integer "m") to the phase?
>
> If you add a constant term 2*m*pi to the phase of a spectrum, m being
> an arbitrary integer, you would not be able to see the difference before
> and after. This has to be a constant term across the spectrum,
no, it is not a constant term. the integer "m" varies with frequency
and serves the function of unwrapping the phase.
> as messing with the derivative of the phase, dphi/dw, would mess up
> the group delay.
that's right. this is why the statement:
> > > The phase of a complex number can only be determined to
> > > within mod 2*pi. It's as simple as that.
is not correct in the case where this particular complex number is in
the context of other complex numbers such as in a frequency response
or an analytic signal (a complex function of a real variable). this
is still where i am focusing the issue because that is on-topic with
the subject line.
On 21 Feb, 20:10, "robert bristow-johnson" <r...@audioimagination.com>
wrote:
> On Feb 21, 2:03 am, "Rune Allnor" <all...@tele.ntnu.no> wrote:
>
> > On 21 Feb, 02:16, "robert bristow-johnson" <r...@audioimagination.com>
> > wrote:
> > > for a minimum-phase system, the phase angle (in radians) and the gain
> > > (in nepers or dB/8.68589) must be a hilbert transform pair. do you
> > > think that is consistent to what you get when you add an arbitrary
> > > piece-wise constant function equal to 2*pi*m (for arbitrary and
> > > changing integer "m") to the phase?
>
> > If you add a constant term 2*m*pi to the phase of a spectrum, m being
> > an arbitrary integer, you would not be able to see the difference before
> > and after. This has to be a constant term across the spectrum,
>
> no, it is not a constant term. the integer "m" varies with frequency
> and serves the function of unwrapping the phase.
I restricted the argument to a constant term beause you used
the term "system." It was not clear to me if you was talking about
discrete spectra or analytic functions.
> > as messing with the derivative of the phase, dphi/dw, would mess up
> > the group delay.
>
> that's right. this is why the statement:
>
> > > > The phase of a complex number can only be determined to
> > > > within mod 2*pi. It's as simple as that.
>
> is not correct in the case where this particular complex number is in
> the context of other complex numbers such as in a frequency response
> or an analytic signal (a complex function of a real variable). this
> is still where i am focusing the issue because that is on-topic with
> the subject line.
Thanks for focusing. As far as I am concerned, the DFT produces
a discrete spectrum which may or may not be related to an analytic
finction (I have no idea what an analytic function related to white
noise might look like).
So I have been discussing discrete spectra -- vectors containing some
discrete complex numbers. In this context I would agree that the
constant m above might change between individual coefficients in
the discrete spectrum or vector, whatever one might choose to call
it.
My point is simply that it is impossible to dteremine ther True value
for m without making some choises, which ultimately are subjective
and hence arbitrary.
On Feb 18, 9:27 am, "Rune Allnor" <all...@tele.ntnu.no> wrote:
> On 18 Feb, 17:11, "Chris Warwick" <s...@m.me.not> wrote:
>
> > Hi, i've been teaching myself dsp and currently im trying to get a good
> > understanding of pole zero filter design. I understand how to get the
> > magnitude response but i have some problem with the phase response. I'm
> > working thru an online book and im up to here
>
> >http://ccrma.stanford.edu/~jos/filte...Response_Calcu...
>
> > So it says the phase response is evaluated from all the angles from the
> > frequency to each pole and zero. The thing i dont understand (yeah it always
> > takes me fookin ages to get to the point), is that some of the angles are
> > anticlockwise and some are clockwise from 0, so some are negative some
> > positive. Which implies positive and negative phase delay? But that's not
> > posible is it?
>
> The one thing that is missing from figure 8.4 on that page is a zero
> outside
> the unit circle. All the zeros are inside the unit circle.
>
> To see the signficance, add a zero at z'=1 + j. Then draw a vector
> starting
> at z' and ends at z" = 1. Then let the point of the vector trace the
> unit
> circle in the anticlockwise direction. The vector starting in z' will
> rotate
> in the clockwise direction around z'. If you do the same excercise
> with
> the zeros inside the unit circle, the vectors rotate in the
> anticlockwise
> direction around the zeros as the points trce the unit cicle in the
> anticlockwise direction.
>
> > Should the angles be -PI..PI or should they be 0..2PI ?
>
> That doesn't matter, as long as the vectors trace the unit circle
> exactly on revolution in the anticlockwise direction.
It does matter if you don't want any random jumps in the
continuous phase response. So pick the angles so that
there are no unnecessary jumps as the vector traces the
unit circle exactly once counterclockwise.
An interesting question is what to do about a pole or zero
exactly on the unit circle, where a jump seems unavoidable.
Which jump makes the phase delay in the frequency domain
usefully related to the impulse response delay in the time
domain?