“It’s Just a Phase I’m going through” By Martyn “ferrit” Rowe Reading the phase trace: When reading the phase trace, delay and time differences are indicated by the angle (slope) of the phase trace, not the degree indicators. You don't need unwrap to compare phase trace slopes, although rotating the phase trace (Alt+PageUp/PageDown) is often helpful. And when comparing phase traces to determine if two signals will add or subtract (say at crossover), what matters is comparing the traces within 360 degrees or one turn of phase. Fig. 1 - The Phase wheel. Pic Mauricio Ramirez Looking at Fig.1 you can see that from -120(240) to +120 there are varying amounts of addition and at 0 degrees we have +6dB summation. On the 120 to 240(-120) side of the wheel varying amounts of cancellation with 180 giving 100dB of cancellation. Notice the asymmetry here. Phase Un-wrap vs. Wrapped. The phase trace in Smaart is unstable in the un-wrap mode because phase information really only exists within 360 degrees - i.e. 0 to 360 or -180 to 180. (A circle only has 360 degrees.) When you compare two waves of the same frequency, they can only be 0 to 360 degrees shifted from each other. There is no 361 degrees. So the "unwrapping" is a simulated view of the data. Tip: My advice is to stick to the wrapped, real phase data, if you want stability: try more averaging and maybe some smoothing. How Does Smaart measure Phase? Warning Math speak ...... Smaart directly calculates the magnitude and phase of a transfer function from the complex division of two signals in the frequency domain. On a two port device, like a 2channel FFT, you measure the amplitude and phase directly, unlike other programs that calculate phase through a Hilbert Transform of the amplitude. You can test this with a simple experiment: Set up Smaart with exactly the SAME signal going to both input channels. Use pink noise. Then look at the transfer function, both magnitude and phase should be VERY flat. Next add a short delay of 0.5 milliseconds (using Smaart's internal delay) to one of the two inputs. You will see the magnitude and phase change. (note how the point where the phase wraps is related to the delay you introduce). Now here' s the proof. set the number of averages to 5 and use the FPPO transfer function. NEXT turn OFF The noise. Wait about 10 seconds and then turn the noise back on. You will see that the magnitude and phase return and change for each average, and are converging back to the result... in a manner that would be very different if using a Hilbert transform. (In the Hilbert case only the magnitude of one channel would be required). ……End Math speak Phase Wrapped The Wrapping of phase is one of convenience for display purposes, all that basically is happening is if it leaves the bottom of the screen it wraps back onto the top. Fig. 2 In Fig. 2, We see the full unwrapped phase response from 495 degrees to – 450 degrees. We are really only interested in the 180 to -180 part. (See Fig. 3) Fig. 3 So the parts outside our window are “Wrapped” back in. (See Fig. 4) The vertical lines are really part of the graphing engine and don’t exist, in Smaart 6/7 they were removed. (a lot of people miss them!) Fig. 4 – Wrapped Phase Response. Measuring Phase: It is important to understand that the phase measurement’s in this kind of software is about time and frequency. Let’s make one scenario. Let’s say we want to measure the delay in an electronic device (for instance a digital delay). We have a signal going directly into the reference channel and the same signal is sent into the device unit input. Then the output of the device is taken to the measurement channel. Let’s pretend there is no latency in the device (not for real, in any digital device with AD converters). When you measure transfer function you will have a flat phase response. (Fig. 5) Fig. 5 (Let’s also pretend this device has no HPF or LPF). Then we apply 1.0 ms of delay in the device without compensation for this inside SmaartLive. (See Fig. 6) Fig. 6 – 1.0ms delay Now you will see the phase plot (seen from left to right) starting flat, but at 500Hz it will be 180 degrees out of phase, at 1000Hz 360 degrees, at 2000Hz 720 degrees, at 4000Hz 1440 degrees etc. The math behind this is very simple but important. You can actually calculate pure delay based on your phase measurement. To find the delay time your just calculate: time (sec) / the frequency (cycles per sec: Hz) where the phase plot turns 360 degrees. In our scenario the math will be 1(sec) / 1000(Hz) = 0,001 sec per cycle (at 1000 Hz). To make it simpler, use 1000(ms) / 1000 Hz = 1ms. Another scenario could be. We have a phase shift of 360 degrees at 500 Hz (read from left to right) 1000(ms) / 500(Hz) = 2(ms). (See Fig 7) Fig 7 – 2 ms It is important to remember that this is a measurement of the Time difference between two channels. Fig. 8 Our measurement model. In Fig. 8 we have our measurement model. If Smaart’s delay is set so the Reference and measurement signal coincide (Aligned) then the relative phase between the two is shown as a horizontal trace. See (Fig. 9) Fig. 9 - aligned If the Measurement signal arrives before the Reference signal (Leads), i.e. too much smaart delay, then the trace slopes upward. (See Fig. 10) Fig. 10 – Leading. If the Measurement signal is behind the Reference signal (lags), i.e. not enough smaart delay, then the trace slopes downward. (See Fig. 11) Fig. 11 – Lagging. So the phase trace indicates the arrival time of different frequencies by its slope. This is a very powerful tool. Let’s look at a real Measurement - If the phase trace looks like a big smile (see Fig 12): you have best timing in the mid range, but you have delay in the LF end and the HF is arriving slightly too early. Fig.12 By manipulating Smaart’s delay time we can change the slope angle and derive the arrival time. We can also look at multiple phase traces, and as long as we record them with the same Smaart delay time we can interpret the differences in delay time arrivals from the differences of the slope of the phase traces. Here in Fig. 13 we see two signals arriving with the same time but one is inverted 180 degrees. Fig. 13 – Polarity reversal You should also be able to see that Smaart’s delay is set to align the 250Hz region. In Fig. 14 we see four traces: First the white trace is a subwoofer (SUB), the Second, Blue trace, is the LF and in the lower half we can see the crossover point at about 80-90Hz. The Cyan trace is showing summation of both SUB + LF, and if we look in the top phase window we can see that both the slopes of the white and blue traces agree through this region. Same slope = Same timing The Green trace is both SUB + LF but with the Sub 180 polarity reversed, notice the huge dip at crossover in the lower window. In the phase window the slopes remain the same they have just shifted 180 degrees. (this dip confirms the timing is right – just don’t forget to put it back for the show!) Fig . 14 pic Langston Holland.