# Aligning Driver Phase - REW v5 Example



## jtalden

I saw a case study that provided good information regarding this subject for aligning the SW to Main speakers. The method I use for aligning a MR (aka MW) to a TW is somewhat different so here it is.

This example uses a DCX2496 for XO and driver delays, but the process will be similar using other units such as the MiniDSP. The XO between MR and TW drivers is set at 2 kHz. This method works because a near field mic location can be used. [See notes regarding aligning SW to Main Speakers below.]

Pic 1 Speaker/Mic Setup:








Mic Settings:
> Mic Distance: (about 1 m – not critical) Close enough to avoid multipath in the XO range and far enough back to get mic alignment reasonably accurate.
> Mic Alignment: The mic should be on the line of sight from the LP (main Listening Position) to the midpoint between the centers of the MR and TW.
> Mic Calibration: Generally not important because the SPL is not the issue and the phase of most mics is pretty flat in the range of most XO’s.

[The XO filters types and slopes in this example are; TW is Butterworth 12 dB/Oct, and MR is Bessel 24 dB/Oct. Both are set to 2 kHz. There is no best choice for XO filter settings as there is no agreement among the experts. I’ve tried dozens of XO filter combinations. This one is my current setup as it provides moderately steep XO filters and can still provide good phase alignment.]

REW Setting:
> Setup and Activate “Use Loopback as Timing Reference”

WE HAVE TO START SOMEPLACE
I arbitrarily set both TW and MR delay to 1000 mm (2.91 ms) to start. The MR is on output channel 3 is and the TW is on output channel 4. 
[We’re only after the relative delay between the two drivers so this provides plenty of room make either positive or negative delay adjustments.]

PROCESS
> Mute the MR then measure the TW 

Fig 1 DCX Remote screenshot below:








> Mute the TW then measure the MR

Fig 2 SPL Overlay of MR and TW:








Note that the XO range extends from about 800 - 5k Hz to provide -25 to -30 SPL reduction.
The acoustic XO is about 1.8k Hz even though the electrical XO is set at 2 kHz.

Fig 3 Impulse Overlay of TW (red) and MR (green):








The impulse peaks do not align closely with the delays set equally in the DCX. The MR is delayed about 0.27 ms (90 mm). 

For this example I will assume that we are looking to minimize the total phase rotation while keeping the phase differential in the XO band within 90 deg. 

> So, let’s start by reducing the delay of the MR by 0.27 ms (90 mm), as found above, to match the IR peak of the TW and take another MR measurement.

Fig 4 Adjusted Delay – MR to 910 mm








Fig 5 Adjusted MR Impulse (blue) now aligns with the TW peak:








The phase cannot be viewed yet because the delays of the impulses are almost 68 ms. The impulse needs to be near 0 ms to see the minimum phase rotation. I strongly recommend that the TW is taken as reference driver for identifying the exact timing offset to use. 

Fig 6 Delay of the TW - REW reports it to be 67.81 ms: 








> We must maintain the same relative timing of MR and TW to view the relative phase so we need to offset both drivers by the same 67.81 ms (important).

Fig 7 Impulse of TW and MR both offset by 67.81 ms (now near 0 ms).








Fig 8 Wrapped Phase:








> Now let’s unwrap the phase. The XO setting is 2 kHz so it is necessary to place the cursor near that range. Anyplace between 1.8k and 5k will actually work in this case. We must avoid over 7k where the MR phase is lost because the MR measurement in that range is buried in the noise floor and both the SPL and phase look chaotic. There is a similar issue with the TW below 600 Hz for the same reason. Also, note the phase wrap that occurs around 1.4k to 1.8k, it is necessary to stay above this level as well, otherwise the relative phase of the MR will be offset 360 deg when the unwrap occurs.

Fig 9 Unwrapped Phase:








We can now more easily see that the MR and TW phases do not align well through the XO region, 800-5k Hz. There is about a 170 deg mismatch at 2k. If the timing/phase alignment was left this way there would be major SPL cancelation in the XO range. We could also say that the acoustic phase XO is near 5k when it needs to be around 2k.

> Since the phase error at the target XO is almost 180 deg, let’s first just invert the polarity of the MR to see what happens. I don’t see a facility do this in REW for an existing measurement so let’s use the DCX to invert the driver signal and then measure again.

Fig 10 DCX Invert the MR polarity.








Fig 11 Impulse (again after applying the 67.81 ms offset):
[It would be convenient if REW provided the means to set a fixed offset for new measurements as this is an iterative process requiring manual offset of each new measurement.]








Fig 12 Phase (after unwrapping):








This looks much better now with acoustic phase alignment at about 1.8 kHz. 

[Note that the phase curves cross such that the phase difference is about 180 deg at 5k (just at the extreme of the XO region where the MR SPL is about -30 dB). At 800 the difference is about 90 deg. We could further fine tune the acoustic phase XO point a little higher by adjusting the DCX MR delay. The purpose would be to better equalize the phase error at the extremes of the XO range. Moving the acoustic phase XO point up to maybe 2.5k would make the relative error at 800 and 5k a little more balanced. [I will not show this adjustment as you should now know how to do it. Again, always remember to apply the 67.81 ms IR offset to any new MR measurement.]

Fig 13 SPL response of TW, MR and TW+MR (smoothed to 1/24 for clarity):








Note the expected good reinforcement of SPL around 2k and the expected minor very reduction in SPL from 3.5k to 5k where the phase differential exceeds 90 deg.

Fig 14 Phase response of TW, MR and TW+MR (smoothed to 1/24 for clarity):








Fig 15 Impulse response TW+MR:








Fig 16 Step Response TW+MR:








Fig 17 Group Delay TW+MR:








Notes:
> The alignment as it stands here is pretty good and generally meets the target for SPL reinforcement and phase smoothness, but it does not meet the stated alignment criteria of retaining the relative phase within 90deg at the extents of the XO range. Changing the MR delay to get the acoustic phase XO to around 2.5 kHz will balance the top and bottom of the range a little better, but it would still not meet the 90 deg criteria. 

> To provide better relative phase agreement you will discover it is necessary to delay the MR about 1/2 WL (about 0.28 ms) and change the MR polarity back to positive. This actually puts the setting back to where we started (just happenstance). The phase will now will now be more parallel and will closely track throughout the XO. The tradeoff is more total phase rotation of the system. The total phase rotation of the example alignment is about 360 deg from 100 Hz (my SW XO point) to 22 kHz. With the MR polarity set to positive and delay increase 0.28 ms the total phase rotation will be about 450 deg over this same range. Again, there is differing opinions as to the relative merits of these optional alignments.

> SW to mains phase alignment can sometimes use the same process.
- The mic should be at the main LP 
- For multiple SWs: Delay the nearer SW(s) to match the delay of the most distant SW prior to starting this phase alignment process. 
[Also note; there is much greater opportunity for multipath in mid/far field measurements that can make it very difficult to interpret the phase response correctly. The reflections can result in REW showing numerous rapid 360 phase rotations that obscure the direct phase. The severity of this issue depends greatly on your particular situation. I am not able to use this method from my LP using REW.]

> The default IR Window works fine for near field mic setups like this example and they do not help with LP mic setups.

> We may be able to align the SW to Mains by using the Group Delay feature. I looked at this and it does show some promise. However, it is not completely clear to me how to set the criteria and avoid misleading results. I have not yet found this method discussed in detail.

> If you want to use this example method and can’t get a clean phase response at the LP using REW you may want to try HOLMImpulse as it provides a cleaner phase signal in the presence of multipath. Smoothing also improves the situation using HOLMImpulse, but makes it worse using REW. I much prefer REW in for all my EQ and other work, but still use HOLMImpulse occasionally for LP phase alignment work. 

Fig 18 Phase Response SW, MR and TW, Mic at the LP, Front Right Speaker, HOLMImpulse:
[The target was to aligned phase closly through the 100 and 2k Hz XO’s (at the expense of greater system phase rotation)]
[These curves were smoothed; 1/6 Oct for SW, and 1/4 Oct for both MR and TW.]








I hope you find this information helpful.


----------



## Jason_Nolan

Very interesting.

A little above what I can understand at the moment, but I'm going to bookmark this so I can look at it more when I have more time.


----------



## laser188139

Hi John,

It looks as if you are having as much fun as I did looking into how to set the sub distance/timing. It is interesting to see how, as I found with the sub, the limited frequency response of the MR affects the shape of the impulse curve. 

With my front speakers, I replaced the original crossovers with better ones, but they were still passive. As in your situation, I found that the acoustic crossover was not necessarily in the same place as the designed electrical crossover. 

You mentioned that you wanted to try inverting the phase, but did not find where this option was in REW. In the Impulse view Controls, there is an option Invert Impulse. Checking / unchecking this box inverts the impulse that REW uses, and so inverts the displayed Phase. (You can see this by opening the Phase plot in the Overlay window, while manipulating Invert Impulse in the impulse Controls.)

I was curious how the MR and TW separate impulse curves overlaid, after you made the 0.28ms adjustment in the MR timing. You initially set the two curves such that the peaks were at the same time; I am wondering how the leading edges of the curves align after your final adjustment. 

Regards,
Bill


----------



## jtalden

laser188139 said:


> It looks as if you are having as much fun as I did looking into how to set the sub distance.


Yes, that thread helped me decide to finally put this one together. I had been thinking about it for awhile.
It looked to me like your final alignment would be very good as your final IR curves overlayed as I would expect to get a good handoff. I do like to see the phase curves though to be sure. I need go through that thread again more thoroughly as I think there were several points that I missed. 



> It is interesting to see how, as I found with the sub, the limited frequency response of the MR affects the shape of the impulse curve.


I don't know if I follow your thought unless it is just that the IR shape is dependent on the FR of the driver. That is true.



> You mentioned that you wanted to try inverting the phase, but did not find where this option was in REW. In the Impulse view Controls, there is an option Invert Impulse.


Thanks! I thought I had seen this option before, but couldn't find it when I needed it. I guess it was too obvious. :R 



> I was curious how the MR and TW separate impulse curves overlaid, after you made the 0.28ms adjustment in the MR timing. You initially set the two curves such that the peaks were at the same time; I am wondering how the leading edges of the curves align after your final adjustment.


The initial alignment (see Fig 3 of my original post) is very close to my current or "final" alignment. My current MR DCX delay is only 0.01 ms shorter than the DCX delay for the TW for both my FL and FR speakers (the CC MR delay is slightly shorter than that at 0.05 ms less than the TW because that it is about 8" lower). Below is the resulting Phase handoff for that alignment. The phase overlays well throughout the 800 - 5k XO range. Of course a different choice of XO filters results in a differ timing requirement so it is only happenstance that the correct offset in my case is so near 0. 









The REW phase handoff above matchs up well with the HOLMImpulse measurement shown as Fig 18 above.


----------



## paulspencer

It would be interesting to see how auto align compares to this manual process.


----------



## jtalden

laser188139 said:


> Hi John,
> 
> It looks as if you are having as much fun as I did looking into how to set the sub distance/timing. It is interesting to see how, as I found with the sub, the limited frequency response of the MR affects the shape of the impulse curve.


Bill, I just reviewed your referenced thread again and agree that is the best method to align SW to Mains using REW. I just tested that general procedure (as I understand it) and it agrees closely with my current alignment in which I have great confidence that it is set correctly. I will put together and summarize my findings in that thread.


----------



## jtalden

paulspencer said:


> It would be interesting to see how auto align compares to this manual process.


There is a lot of info there. Are you referring to the DCX auto alignment process that is referenced there or possibly to another more manual method I did not spot in my quick look?
I did try the DCX auto alignment method early on and think it is adequate. The numbers jumped around quite a bit in my trials, but if I remember correctly the variation was probably not too critical from a practical perspective. I would have to investigate it again to be sure. Being a hobbyist, I wanted to optimize the alignment in a repeatable way and to be assured that it is the best that can be done within the given equipment and tools I have available. I would definitely recommend the DCX procedure for those that don’t look forward to diving into the complexities of REW. My guess would be that the DCX auto alignment works best for the lower XO frequencies where there is more room for timing error without major impact to the system.


----------



## paulspencer

Yes, auto align. The funny thing about it is that it does it differently every time, even if you change nothing. It will invert polarities one time and not do it the next, but the time delays are also different. Most likely two different ways of getting a very similar result. I tend to use auto align because it's quick and I don't often have time to use a longer method. However, when I get more time I plan to do it the manual way. It wouldn't be too hard to compare that result to auto align. Great tutorial BTW!


----------



## jtalden

paulspencer said:


> It will invert polarities one time and not do it the next, but the time delays are also different. Most likely two different ways of getting a very similar result.


That's a good thought. It is possible to align phase at the XO in 1/2 wavelength increments if the polarity is inverted. It is sometimes a toss up as to which setting to use even when its set manually. I am focused on other work now, but I will try to keep this in mind when I am looking for something new to investigate.


----------



## atledreier

Wow.. I have been looking for something like this for a while, since I introduced midbass units to my system. I need to study your post more closely and see if I can make heads or tails of it at all.. 

Thank you for the time and effort making the write-up!


----------



## jtalden

Maverick (and also Jason further above),
Thank you both for your interest and kind comments. 

I tried to include the major steps, but there may not be enough detail included. If you get into this later and have specific questions, I will try to help out.
Enjoy!


----------



## JohnM

> > Since the phase error at the target XO is almost 180 deg, let’s first just invert the polarity of the MR to see what happens. I don’t see a facility do this in REW for an existing measurement so let’s use the DCX to invert the driver signal and then measure again.


Use the "Invert Impulse" control in the Impulse window.


----------



## jtalden

Thanks! I see it now - right where it should be! 
Great program!


----------



## axius0

Could you tell me what settings you had for measuring the delays between the speakers? I'm wondering about the Analysis section under preferences. What did you have set for the Impulse response window defaults? Because I'm not getting one nice peak like you have in your graphs.


----------



## jtalden

It was not necessary to set a special IR window using this method in my particular situation. The default automatic window worked fine. My speaker was on a stand with the floor being the nearest boundary about 0.8 m away and the XO was around 2 kHz. Under those conditions the 1 m mic distance is close enough that multipath was not a problem. 

If you are in a small room and your speaker is nearer to a boundary then there may be more of a problem. An IR window can help in that case. The left settings needs to be just before the initial start of the impulse (0.2 ms to 0.5 ms) and right setting should be long enough to capture a measurement an octave below the lowest part of the XO range you are interested in. In my case of an 800 - 5k Hz XO range I would like to see to see data down to about 400 Hz so a right setting of about 2.0 ms or greater would be okay.

The lower the XO, the more difficult it will be.


----------



## Delight5566

Hi Jtalden,
I have read the post, and I am new on REW. I try to simulate the Impulse response like yours in the post( I am trying to get the phase data to calculate delay),

but I only get a peaking data without the sine wave

I use the JRiver's WDM driver to be my loopback method so the REW measurement setting I use "Use loopback as timing reference"

(I can not post the image so be sorry to use word to explain my question or if I can use the gmail to explain my environment to discuss with you.)

any setting that I missed? I can not get the similar result like yours

please help 
thanks!


----------



## jtalden

Delight5566 said:


> Hi Jtalden,
> I have read the post, and I am new on REW. I try to simulate the Impulse response like yours in the post( I am trying to get the phase data to calculate delay),
> 
> but I only get a peaking data without the sine wave


I'm not clear on the problem your discribe, but If you ran a sweep measurement and the impulse shape is very different from mine then check to see that the impulse graph is set to '%FS' and not 'dBFS'. The control appears in the top left corner of the graph when the mouse is hovered there - See REW Help for the impulse chart.



> I use the JRiver's WDM driver to be my loopback method so the REW measurement setting I use "Use loopback as timing reference"


I would expect that will work correctly. You can confirm it is by taking 3 repeated sweep measurements and checking the impulse overlay chart to confirm that the 3 impulses are identical and lay directly on top of each other. If there is any shift between them (when zoomed in all the way) then there is a problem. They all should be shifted away from 0 ms by the same xx.xx ms amount.



> (I can not post the image so be sorry to use word to explain my question or if I can use the gmail to explain my environment to discuss with you.)


I prefer to help you here as others may benefit at well. You can use the post padding thread to create 4-5 quick posts. That will then allow you to post charts and mdat files in this thread to explain the situation.



> any setting that I missed? I can not get the similar result like yours


If the '%FS' setting is not the solution, please post a chart showing the problem.

Comments:
This process work very well for XOs in the midrange and above (above the modal region). If this is a SW XO <300 Hz the room modes can make it very difficult to use. Other SW XO timing methods are likely much easier to do and provide similar results.

Given the needed mdat measurements, I can provide you with a timing recommendation that you can use to confirm your results.


----------

