ProSoundWeb Community
Sound Reinforcement  Forums for Live Sound Professionals  Your Displayed Name Must Be Your Real Full Name To Post In The Live Sound Forums => LAB: The Classic Live Audio Board => Topic started by: Frank Koenig on November 04, 2013, 09:35:21 PM

I define the phase of a linear, timeinvariant system as the argument of the transfer function between the input and output. The transfer function is also often called the system function. In general, this is a complex function of frequency H(jw) [I'm using "w" as lowercase omega representing frequency, j = sqrt(1).] H(jw) can be expressed in rectangular form as
Re{H(jw)} + j * Im{H(jw)}
where Re{ }, and Im{ } are the real and imaginary parts.
In polar form H(jw) can be expressed as
H(jw) * e^(j * Arg{H(jw)}
In this case Arg(H(jw) is the phase. This is familiar to any freshman electrical engineering student. All three signals and systems texts I pulled off my shelf (Network Analysis and Synthesis by Kuo, Digital Signal Processing by Oppenheim and Schafer, and Signals and Linear Systems by Gabal and Roberts) define the phase of a system this way.
Now if we agree that the transfer function of a polarity inversion is 1, then it is self evident that the phase of this system is pi or 180 deg.
Using 1 as the transfer function of a polarity inversion when that is a component in a larger linear system yields the correct answer for the transfer function of the larger system. The phase of a polarity inversion does not vary with frequency and as a result the group delay is zero for all frequencies, which is consistent with how we intuitively believe a polarity inversion should behave. So far so good.
Where I think we run into some semantic trouble is that some people don't want to call phase "phase" unless it varies with frequency, which, in general, it does for causal systems, and, clearly, the polarity inverter is a special case. But we run into a bit of a conundrum because we have to ask how slowly must the phase vary before it isn't phase?
There's also another special case, aside from polarity inversion, and that is the Hilbert transformer. This is a theoretical system (employing a Hilbert transform) which can be approximated arbitrarily closely over any given range of frequencies. It has the property that there is a frequencyinvariant phase shift of pi/2 (90 deg) from input to output. It is important in modulation theory, analytic signals, and no doubt many other things. If we don't accept frequencyinvariant phase, what do we do with the Hilbert transformer?
Please don't take any of this as an attack. I'm not trying to prove anyone wrong here. I would just like to have a (civil) discussion to sharpen my own thinking and perhaps that of a few others. I'd be delighted to see an alternative definition of phase that kicks out the polarity inverter and the Hilbert transformer.
Frank

I am not sure what your point is, but looks like you invested some time.
My more pedestrian explanation is that phase is a sine wave thing, or more specifically two sine waves compared to each other in terms of time offset as measured in wavelengths.
Polarity OTOH involves no time relationship and applies to complex waveforms the same as sine waves. Simply stated polarity is a zig vs a zag. Polarity like phase in live sound reproduction is generally only apparent when two versions of an input signal are both present. For live sound sources there is a true or absolute polarity for sounds like drums that have a specific zig/zag signature.
No math was harmed by this discussion...
JR

Three more things occur to me:
First, we are talking about the phase response of a system, as opposed to the phase of a signal, which, I believe, is more of what John is discussing  the relative phase of two steadystate sine waves (necessarily of the same frequency). A polarity inverter is a system, not a signal.
Second, I forgot to mention the most degenerate case, which is that of the system with a transfer function of 1  the "ideal mic cable". Its transfer function has a magnitude of 1 and a frequencyinvariant phase and group delay of zero. It should be there for completeness.
Third, there exists a class of systems that exhibit a frequencyinvariant phase shift of any value from pi to pi which are realized by summing, in various proportions, the output of a Hilbert transformer and either the original signal or the output of a polarity inverter.
I guess my point is to get people, including myself, to think. And, as often is the case, there's more than one way to skin a cat. F

Hi frank so all the math doesn't mean a thing to me because i'm not a math guy sorry :\.
The way i look at phase versus polarity reversal is rather simple (i like simple things:)
Phase for me = Time over frequency (i think that's also in the starting post)
Phase can be found (and calculated) in the down (or up) worth slope of the FFT phase screen on a analyzer . The steeper this slope (up or down) indicates more group delay a the frequency range you're looking at .
If i flip polarity the angle of the phase trace doesn't change so time doesn't change however combining a polarity reversed signal with other signals can cause severe changes in the sum of these signals .
I leave the math to the people that understand it (i hope maybe someday i'll understand it but not at this point)

We often referrer to an industrial AC power system as 3 phase, yet frequency never enters the conversation.

We often referrer to an industrial AC power system as 3 phase, yet frequency never enters the conversation.
Because mains power is constant frequency (or supposed to be).
The three phases in AC power systems are indeed phase offset versions of each other.
JR

We often referrer to an industrial AC power system as 3 phase, yet frequency never enters the conversation.
3Phase AC lines can't be in or out of polarity, they simply follow each other at 120 degrees offset.
Here in Holland the grid runs at 50 Hz, when you start with L1, L2 follows with 6,66 ms difference and L3 after that at 13,33 ms. (calculated back to time/group delay)
It doesn't matter what frequency you use since phase in degrees always refers to single cycle values as opposed to group delay which refers to time in seconds. (and changes up/down with frequency)

As an example let's take a time difference of 10 ms and then calculate phase shift for 10kHz, 1kHz and 100Hz.
1 second divided by 10.000 Hz = .1 ms(cycle length) > 10 ms(time diff.) divided by .1 ms = 100 cycles of phaseshift or 100x360 degrees = 36000 degrees of phaseshift @ 10 kHz.
1 second divided by 1.000 Hz = 1 ms(cycle length) > 10 ms(time diff.) divided by 1 ms = 10 cycles of phaseshift or 10x360 degrees = 3600 degrees of phaseshift @ 1 kHz.
1 second divided by 100 Hz = 10 ms(cycle length) > 10 ms(time diff.) divided by 10 ms = 1 cycle of phaseshift or 1x360 degrees = 360 degrees of phaseshift @ 100 Hz.
This is all relative phase, i called it phaseshift here.
I prefer calling the phase(in this case) of a system polarity because of the absence of the time factor, to me phase is always connected to time.
Definitely following this thread :)

I am sure there is some old discussions of this around. I had to deal with this in console design regarding how do I label that button in the input section that reverses the "polarity" of the input signal? Phase or the symbol phi which means phase, uses less letters and takes up less precious front panel real estate, BUT IS INCORRECT.
I consider using phase and polarity interchangeably relatively harmless, while there are distinct different meanings. Even in verbal communication you can say phase a lot faster than Polarity ...
When in doubt do what's right, and that includes using proper terminology.
JR
PS: I have used phi before in tight panel graphics. I don't think anybody was confused by that, or less people confused than if I used "POL" . Even though POL is arguably more correct, it is less likely to be understood by all users IMO.

"Timeinvariant"?
And that is...

I define the phase of a linear, timeinvariant system as the argument of the transfer function between the input and output... H(jw) can be expressed in rectangular form as:
Re{H(jw)} + j * Im{H(jw)}
where Re{ }, and Im{ } are the real and imaginary parts.
In polar form H(jw) can be expressed as:
H(jw) * e^(j * Arg{H(jw)}
In this case Arg(H(jw) is the phase...
...Now if we agree that the transfer function of a polarity inversion is 1, then it is self evident that the phase of this system is pi or 180 deg.
Using 1 as the transfer function of a polarity inversion when that is a component in a larger linear system yields the correct answer for the transfer function of the larger system. The phase of a polarity inversion does not vary with frequency and as a result the group delay is zero for all frequencies, which is consistent with how we intuitively believe a polarity inversion should behave. So far so good.
Where I think we run into some semantic trouble is that some people don't want to call phase "phase" unless it varies with frequency, which, in general, it does for causal systems, and, clearly, the polarity inverter is a special case. But we run into a bit of a conundrum because we have to ask how slowly must the phase vary before it isn't phase?
Frank,
Everything you say is true, of course, and we owe it historically to Heaviside for use of the complex plane phasor representation here. For those skilled in the art, this TF behavior of a fixed phase relationship as part of a polarity inversion is useful. For instance, it is used in the case of a second order LR filter pair to restore the inphase relationship at the (nominal) XO point.
For the average, non signals and systemseducated audio user, the description of polarity as swapping positive signal for negative is much more intuitive and graspable. I think of the behavior of H(jw) for TF of 1 vs. 1 as a more full way of thinking about the effect of swapping + for .
Personally, since I never had formal classwork in signals and systems during my engineering education, and thus am selftaught on these matters, I started from working with the more basic grasp of how a physical polarity swap is realized and then the ramifications on H(jw) came later. I don't think of denying "frequency invariant" phase, rather just keeping focused on occam's razor for intuitive understanding when talking about it in audio.
In a related vein, consider the (pretty rare) circumstance where we get to see the full Bode plot of magnitude and phase for the axial response behavior of a loudspeaker on a datasheet. Typically this DUT TF is displayed with a given polarity relationship (decided by the measurer) and the static time of flight group delay removed from the DUT. So when people who think about phase for loudspeakers are considering it, they're usually excluding both polarity and TOF delay. We do this when using SMAART/Systune/SIM/Etc., for system tuning too.
There's also another special case, aside from polarity inversion, and that is the Hilbert transformer. This is a theoretical system (employing a Hilbert transform) which can be approximated arbitrarily closely over any given range of frequencies. It has the property that there is a frequencyinvariant phase shift of pi/2 (90 deg) from input to output. It is important in modulation theory, analytic signals, and no doubt many other things. If we don't accept frequencyinvariant phase, what do we do with the Hilbert transformer?
One pro audiorelated used of the Hilbert transform: the Hilbert transform is used to predict the minimum phase behavior in a program called SoundEasy. You measure the axial H(jw) response of the loudspeaker driver, which is very nearly minimum phase, using MLS. Then the software calculates the Hilbert transform of the observed magnitude, and you compare this calculated phase to the measured phase to determine the TOF delay to the driver. It works well.
Hopefully this is a useful perspective for you.

"Timeinvariant"?
And that is...
Duane,
A time invariant system is one whose response at a given time will be the same as its response at a future time, with the only difference being the delay between the current given time and a future time.
As a practical way of thinking of it: If you play music through one of your speakers this afternoon, the speaker will color that music with a given frequency response. If you do the same thing two days from now, the music's coloration will be essentially the same as it would be this afternoon.
On moderate time scales, and at moderate levels, loudspeakers are reasonably time invariant.

One pro audiorelated used of the Hilbert transform: the Hilbert transform is used to predict the minimum phase behavior in a program called SoundEasy. You measure the axial H(jw) response of the loudspeaker driver, which is very nearly minimum phase, using MLS. Then the software calculates the Hilbert transform of the observed magnitude, and you compare this calculated phase to the measured phase to determine the TOF delay to the driver. It works well.
Phil, thank you. I was beginning to feel a little persecuted ;)
I'll say a little on the Hilbert transform and minimum phase, just for general consumption (I know Phil and a bunch more of you know all this).
A minimum phase system has the least amount of phase shift for the variation in magnitude.* This leads to a onetoone relation between magnitude and phase, which is not, in general, true for nonminimum phase systems. An allpass filter, for example, is nonminimum phase.
The phase of a minimum phase system can be determined from the magnitude by taking the imaginary part of the Hilbert transform of the log of the magnitude of the transfer function. The real part of the Hilbert transform gives back the logmagnitude  it's a good way to check if you screwed up. What makes this relevant to the current discussion is that when you look at the logmagnitude and phase of a minimum phase system you can see the "frequency" (it's not really frequency, it's the wiggles in the logmagnitude) invariant 90 deg phase shift. If you throw a logmagnitude plot for a (well behaved) speaker in front of Phil or Timo, I bet they can do a pretty good job of drawing the phase response by doing a Hilbert transform with their eyes.
Now this begs the question: is a polarity inverter minimum phase? Its Laplace transform has no zeros in the right half plane, but that's because it has no zeros at all. On the other hand, it has an excess phase (phase minus minimum phase determined from magnitude) of 180 deg. I leave this as a homework problem.
*Edit to add: for a causal system. That is a system where y(t) = 0 for t < 0.

Phil, thank you. I was beginning to feel a little persecuted ;)
Not intended but if it feels like that i'm sorry .
@frank and phil is there a source on the www that explains this stuff in plain english without all the heavy math formulas i run in to on wiki for example .
It's a bit hard to find a "simple" explanation or at least in plain english what you guy's are referring to …… Some of the stuff makes a bit of sense but after that the next line messes that up again :\

Sorry if you feel persecuted by me.
It is not intentional of personal.
JR

dead horse(http://)

Fair enough, I'll stop flogging a dead horse around the track, as my former boss, a master of malapropisms, used to say. I've been treading on thin ice long enough. But at least I know which side my beard is buttered on.
John, Timo, no worries, it's not you guys.
On getting conversant in signals and systems, I don't have any current advice. I have my old books I used in college but they're pretty old, just like me. The new thing is all the online courses that are becoming available thanks to MIT, Harvard, Stanford, and others. The math is not hard, as math goes, but I think you do need the equivalent of a few quarters worth of college calculus with an emphasis on complex variables in order to understand the language.
I'm not particularly good at math, and I'm certainly not rigorous about it the way mathematicians are. For me it's always been a tool to get where I wanted to go, which I think is true for most engineers. For me a Dirac delta function is infinite at t=0, 0 everywhere else, and has unit area. That would make most mathematicians spill their beer.
Speaking of beer and mathematicians, I learned  second hand, from a Fields Medal winner at Cal  that there is a special algebra for beer debts. If I owe you a beer and you owe me a beer, these conditions do not cancel. We must both buy and drink the beer.
Frank

Try not to take levity so seriously .
Fair enough, I'll stop flogging a dead horse around the track, as my former boss, a master of malapropisms, used to say. I've been treading on thin ice long enough. But at least I know which side my beard is buttered on.
Frank

Whenever I saw "POL" graphic, rather than a "phase" icon on a console I had more confidence in the design team.

Whenever I saw "POL" graphic, rather than a "phase" icon on a console I had more confidence in the design team.
But for every one user with a warm fuzzy feeling, there could be tens or hundreds of customers world wide that don't recognize the contraction for polarity, or what that means. In the owners manual I always describe the switch operation correctly as reversing polarity, even if I called it phase on the artwork. I don't mind gently leading the few customers who read the owners manual, but I never want to confuse customers.
Today I might be tempted to label it polarity after a few decades of making that very distinction on forums. While I still can't get people to spell bus correctly. :'(
JR

The phase issue is easy to see when designing a 3 way passive crossover. The mid range will have a difference in phase based on the pass band of the two segments making up the pass band filter. Compared with the single elements for a high pass or low pass filter used for the other two speakers.

I deleted a longer post about phase, polarity, and delay in the context of loudspeaker crossovers. Mating the sound output from two drivers together in typical loudspeakers is at best is an imperfect exercise. Use of phase shift, polarity flips, and delay (when available) are mainly to prevent very audible suckouts from deep cancellation. For a while the odd order crossovers were popular because 3 dB bumps were less bad, than deep notches. (but crossover performance also involves off axis lobing, and total spectral energy delivered into the room, etc).
In the context of crossovers a polarity flip "could" improve mating in the crossover region, while resulting in entire bandpasses being opposite polarity from each other. (I am not making a statement about the audibility of that, for some situations apparently a lesser evil).
Try not to think about this too much (i don't). This is why I defer to the speaker design engineers to design speakers. Crossover design is IMO part of speaker design. Back in the old days I actually designed and sold rack mount analog crossovers, but those were simpler times. Now we have better solutions available.
JR

 Phase response is a description of system behavior.
 Polarity inversion is an operation.
 It can't be proved that a given phase response is due to a particular operation.
David Gunness