0% found this document useful (0 votes)
1K views26 pages

REW IR Phase Alignment

Uploaded by

carsoundlin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views26 pages

REW IR Phase Alignment

Uploaded by

carsoundlin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
  • Preface
  • RoomEQ Wizard setup for time alignment with an USB microphone
  • Routing in the DSP
  • A note on the acoustic timing channel
  • First measurement with acoustic reference
  • Comparing Impulse Responses of two drivers
  • Aligning tweeters to mids
  • Now to something completely different!
  • How to align the two measurements now?
  • The end

RoomEQ Wizard, USB microphone,

Impulse Response and phase


alignment
A How-To Guide
Written by Peter Hermanns
Version 1.1
Content
Preface ................................................................................................................................................... 3
RoomEQ Wizard setup for time alignment with an USB microphone .......................................... 4
Routing in the DSP ............................................................................................................................... 5
A note on input from REW to your system........................................................................................ 5
A note on the acoustic timing channel............................................................................................... 6
First measurement with acoustic reference ...................................................................................... 6
Comparing Impulse Responses of two drivers .............................................................................. 11
Aligning tweeters to mids................................................................................................................... 17
Now to something completely different! .......................................................................................... 20
How to align the two measurements now? ..................................................................................... 21
The end ................................................................................................................................................ 26
Preface
Hi, i’m Peter Hermanns, and i’m a member of the Facebook group „RTA in cars“.
This group was founded by Nerijus Kochanskas who also made some awesome videos
regarding his journey on how to learn to tune a sound system in a car with a DSP and the
help of measurement software.
He also wrote a very good starter guide on this, which this document is an addition to.
I wrote this, because Nerijus initially stated, that you cannot measure time and phase with an
USB microphone like the very popular UMIK-1 from MiniDSP.

While it is true that measuring time and phase information with a USB-microphone is a
tedious task, it’s not impossible.

And for people who were wondering on how to do that I wrote a short how-to in the
aforementioned Facebook group.

Unfortunately some of the points in the short how-to are not that clear, so I decided to write
down the guide as a PDF and enrich it with actual screenshots of RoomEQ Wizard to show
what I may have missed in the how-to in the Facebook group.

If you find something missing, misleading or just plain wrong in this guide, please let me
know. I will then update this guide with the updated information from you.
Right now this guide presents on how I time alignment with an USB microphone and the help
of measurement sweep instead of a pure tape measure.

Also please take note that most of the steps in this guide can also be done with a hardware
loopback and XLR microphone as most of the steps are basically identical.

So, let’s begin……


RoomEQ Wizard setup for time alignment with an USB
microphone

Most of the basic configuration tasks for REW are already presented in Nerijus Kochanskas
guide „[Link]“ which I really recommend to download and read from start to finish.
He did an amazing work in this guide to get a beginner started with REW and measurements
and therefor he deserves all the credit you could basically give him.
Therefor I only show the additional configuration settings that you want to use when
measuring time with an USB microphone.
For this we open the REW preferences. When you read Nerijus guide you already know
where to find the preferences.

Most important for the task in this guide is the configuration of the impulse response
calculation that you can find in the „Analysis“ tab of the preferences.
You want to check the checkbox next to „Adjust clock with acoustic ref“. This somewhat
negates the impact of clock drift that you will inevitably experience when using an USB
microphone for input and the internal soundcard of a laptop for output.
clock drift means, that the internal clock generators for both soundcards are not in sync and
therefor skew up the measurement over time. You want to minimize this effect as much as
possible and these settings helps with that.
Routing in the DSP
In my opinion doing measurements with acoustic timing reference is best done with a DSP
that supports independent routing of all drivers like all modern Helix, Mosconi or JL Audio
processors can do.
This basically means that you can assign all outputs to two inputs (left+right) individually.

For example you route the right channel to the passenger tweeter as this channel is both
able to play the timing chirp (see next chapter) and is farther away than all driver side
speakers.
Assumption: I drive a LHD car, therefor the right tweeter is on passenger side. If you have a
RHD driven car like in UK you have to adapt for this and make right to left and vice versa!
Ideally you want to therefor have the right input channel assigned to the right tweeter and the
left input channel to all other drivers. In my Mosconi processor this would look like this.

Discard „Out Group 4“ as channels 9/10 would be unused and you only have four output
groups.
But you can see that channel 1, 3, 4, 5 and 6 are all fed from input 1, while channel 2 is the
only channel fed from input 2.
Input channel 1 is „Left“ in REW, input channel 2 is „Right“ in REW.
If your DSP does not support independent channel routing, like you can only assign inputs to
channel 1+2 together like in the old Mosconi software not all is lost though. The process just
a bit more complicated as you have to align one side first, then the other side and then side
against side.

With the process outlined in this guide you are doing driver pairs first, i.e. left tweeter 
right tweeter and so on before you align driver pairs to each other.

A note on input from REW to your system


This guide assumes that you’re feeding the signal directly from your laptop into your system,
either via AUX-input into your head unit or, more ideally, directly from your laptop to your
DSP via unused inputs. If the latter in your mixer you need to choose the correct inputs that
you’re feeding the signal in.
A note on the acoustic timing channel
With an acoustic timing reference that you have to use with an USB microphone you need to
have one driver playing a short burst of sound, called „chirp“ that marks the beginning of the
measurement. REW knows exactly when it registers this chirp that it now must measure the
following sweep and compare it to its internal sweep. Internally the sweep is a perfect
logarithmic measurement sine sweep, but the microphone records this sweep with all the
alterations due to positive and negative interferences (reflections), different locations, and so
on.
This chirp is a very short chirp of a frequency around 4kHz, so the timing channel has to be
able to play this chirp, therefor naturally a tweeter or wideband without a lowpass should be
the driver of choice for this chirp.
This also means, that you never have to mute this one channel that is playing the chirp
during the process.
If using independent channel routing like in my example above this will be no problem as the
assignment of the channel that is playing the actual sweep is done in REW.
Ok… basic setup done, on to the first measurement.

First measurement with acoustic reference


Ok, you’ve done your individual EQ, driver levels and so on in REW according to Nerijus
guide. Great. Now you want to align the drivers to each other.

Well. That’s what we’ll be doing now.


Save all measurements you have so far and remove them from REW, so you got this REW
picture.

You’ve your USB microphone connected, have your calibration file loaded, put the
microphone into a position that is in your driver’s seat in the middle of where your ears would
be and are ready to go for your first measurement with acoustic timing reference.
In your DSP you unmute your reference timing channel (passenger side tweeter) and
measure the same driver as reference measurement for tweeter alignment.
All other drivers are muted.
Next steps you open the „Measure“ dialog by pressing on „Measure“ in above window.
This will open the measurement window.

1. You need to enable „Use acoustic timing reference “.


If you would do a loopback reference, f.e. with the help of a Focusrite Scarlett and
XLR microphone this would read „Use loopback as timing reference “. So, make sure
you set it to the correct timing reference.
2. Your output channel for your right tweeter (passenger) should be right channel. In
case of RHD cars, choose left channel here as your passenger tweeter is the left
tweeter then (will not note this any further from here on. I will only note
passenger/driver side from now on!).
3. This is your reference (Timing chirp!) output. As we set the routing to the passenger
tweeter for the chirp we have to use the corresponding channel, in this case „R“.
When everything is setup as shown above you are ready to measure and for that you click
„Start“.

Now the measurement process will start. REW will measure the noise floor, then the short
chirp, followed by the sweep and after the sweep a short chirp again.
This measurement window will then close, and the measurement is put into the left side of
the REW window as usual.
You immediately rename the measurement, f.e. to „TWR ref“ and ignore the messy
frequency response (:P). You haven’t done a moving mic average, so this single point
measurement will not look like your nice and beautiful RTA measurement with 100+
averages, but this is totally ok.
We’re not interested in the frequency response right now!

What you can see though is marked in green in above screenshot.


This is the delay, that is introduced by the measurement system. We want to remove that
and is one of the more important tasks and probably led to lot of confusion.
When removing this delay the initial large peak of the IR response (showing later) is set to
the „0ms“position in the impulse response overlay. This makes calculations a lot easier, and
it also cleans up the phase graph.

Btw. If your phase graph looks more like this:


Then don’t worry. I just applied a frequency dependent window of 5 to my measurement (see
on the same page of the preferences as shown earlier), which is basically automatically
apply some smoothing to the frequency and phase response, but has no impact on the
impulse response measurement. For now, it’s just cosmetics.

Ok, remove the initial system delay.


To do this, you open the „Controls“ window by pressing the button in the top right corner (1.)
followed by clicking on „Estimate IR delay“ (2.):

After clicking „Estimate IR delay“ a popup will open:

You want to click on the marked button. This will update your measurement dialog:
and then automatically remove the system delay from all subsequent measurements.
You can now either remeasure your passenger side tweeter (which I would recommend) or
go directly to measure the driver’s side tweeter.
If doing passenger side tweeter again, just redo the measurement with the updated timing
offset as shown above.
If doing driver side tweeter switch „Output“ from „R“ to „L“ and leave „Ref output“ alone!

No matter how you do that. You will end up with two measurements. Passenger side and
driver side tweeter (in my Screenshot TWR and TWL respectively).

You now have to measurements that you can compare the impulse responses to each other.
Comparing Impulse Responses of two drivers
Ok, you got two sweep measurements, but how do you find out which driver to apply delay to
and how much?
On to the Overlay window! (And see my godly Paint skills!)

Just pressing the button labelled „Overlays“ will open the overlay window.
In there you have to select „Impulse“. It will present you a messy piece of graphs that can
hardly be read.
But don’t worry. Solution incoming!

Just change from „dbFS“ to „%FS“ in dropdown the upper left corner of the graph window
and it will look more like something that we can work with.

But wait… something seems to be off. How on earth do we want to see the realm impulses?
Well, by default REW is showing a large time window in this screen like 1 second before 0ms
and 100ms after 0ms.
This is way too much obviously and therefore we want to change that.
As we probably know, no tweeter on this earth will be more than 3ms off if installation is
good. Therefor we can change to something like 3ms before and 0.1ms after.
In the following dialog enter the appropriate values.

and then just click „Apply Settings “.


You can see the initial spike from the right tweeter is right at the -0u mark which is 0ms (give
or take some fractions. REW is not that accurate with acoustic reference, but still way more
accourate than tape measure!) and the green is arriving way earlier.
All you have to do is check where the initial peak of the green measurement is and you have
the delay that you have to put in into your DSP for the drivers side tweeter.

Yes, it’s that easy!


In this example it would be 2.466ms.
Wait… but my DSP only can do 0.02ms steps? Well, use 2.46 or 2.48ms of delay then. Use
what your DSP can do to get as near as possible.
If your DSP only can do 2.46 or 2.48ms use what would be the nearest to 2.466ms, in my
case this would be 2.46ms instead of 2.48ms.
Why? Because 2.46ms is only 0.006ms off, while 2.48ms would be 0.014ms off.
If your DSP supports a finer resolution (resolution is tied to the internal sampling rate of the
DSP) then great, if not, don’t worry. Get it as near as possible and you’re good.

But Peter, in the screenshot it says „-2.466ms“!

Yes, because the drivers side tweeter is arriving earlier in relation to the reference tweeter.
Remove the negative from the value and you have the delay.
If it was arriving later you would have to add the negative to the number.

„-„ means add delay to the corresponding driver (or remove from the other)
and no „-„ means remove delay from the corresponding driver (or add to the
other driver)!
As we have not setup any delay in the DSP yet, means all drivers are at 0ms, we can only
add delay, means, we use the value of the left tweeter without the „-„.
When done remeasure both channels, which means making 3 measurements.
First measurement you reset the „Timing offset“ in the measurement dialog to 0ms again!
Then do the „Estimate IR delay“ thing, update the timing offset and remeasure both drivers
immediately after each other to minimize the impact of clock drift.
If everything went well, you’ll see this in the Impulse Overlay window:

If measurements are still a tiny bit off, adjust the DSP again with tiny steps and remeasure.
Find the point where the difference is as small as possible, but always remeasure both sides
to minimize the effect of the clock drift.

(By now you get the idea why it’s more ideal to do all this with a real loopback and XLR
microphone, right?)
Now repeat the process for midrange and midbass drivers.
But realize that there is a small difference when doing the measurements.
Remember the routing in the DSP.
You leave the passenger side tweeter unmuted for the chirp. All other drivers are routed from
the other channel (in my case „L“).

So do the following.
- Reset the timing offset to „0ms“ when measuring the passenger midrange/midbass
- Estimate IR delay and update timing offset as shown above for first measurement.
- Remeasure passenger side midrange/midbass.
- Always leave the output set to the corresponding channel setup in the routing matrix,
in my case „L“ and reference to the channel of the reference tweeter, in my case „R“.
Measuring tweeters is the only point where you need to switch the output from R to L! When
measuring midrange, midbass or subs you leave it to the setting these drivers are fed from in
the DSP routing!
The rest of driver pairs is then done as shown for the tweeters.

Aligning tweeters to mids


As you may have read somewhere, hearing phase above ~1.5kHz becomes less important
as we localize sound more based on sound pressure above this area. This doesn’t mean
phase isn’t important, but
a) Phase data is hard to read if only doing one sweep measurement with REW and
b) Doing multiple sweeps and do correct averages is a very time consuming process.
It’s not that it isn’t doable, but it’s something for the really die-hard guys that want to go the
extra mile for the last few % of quality.

For beginners doing alignment of tweeters to midranges with impulse responses is doable
and already way better than doing it by tape measure (at least for me. Maybe i’m just not
able to measure distances correctly, who knows?).

How do you align tweeters and mids? Well, basically as above, but you don’t align the first
initial peak, but the first initial rise to the first peak.
This is important!

As we have already set our crossovers and have done our EQ the midrange drivers don’t
have that much high frequency content anymore, which makes the slope way less steep than
that of the tweeters.

It basically looks something like this.

Where the blueish is mids and red is tweeters.


You can clearly see the initial rise is way steeper for the tweeters.
Aligning mids to tweets via impulse response measurements means the following.
First measurement in my case is like following (adjust accordingly for RHD cars):
- both tweeters unmuted
- Timing offset set to 0ms
- Output set to „L+R“
- Ref Output set to „R“
After measurement estimate IR delay et. Al. Same as above. Remeasure tweeters with
updated timing offset followed by measurement of midrange drivers. For midrange drivers
change the following
- Right tweeter and both midranges unmuted.
- Leave timing offset alone, don’t touch/change this!!!!
- Output set to „L“ (in mixer both midranges are fed from left input in my DSP!)
- Ref Output set to „R“ (again: adjust accordingly to your specific routing setup)
Do measurement. Result will be like the last screenshot.
No try to zoom in as much as possible while still being able to see both measurements in the
impulse window.

Try to identify the point where the initial rise is leaving the 0% mark while ignoring the ripple!
Ripple is the following f.e.:
Both drivers initial rise is positive upwards, so you want to check the difference between the
following points:
Point for red graph is at ~ -55us and for blue graph it’s at -1.918ms.
Math for delay is:

-1.918ms+0.055us = -1.863ms  Delay 1.863ms.


Add the delay to both midrange drivers!
If midrange drivers are behind the tweeters, i.e. in the positive ms range in the graph, you
need to do the math and add the delay to the tweeters.
After that, remeasure as outlined earlier.
You should arrive at something like this:

You can clearly see that the initial peek of the mids is behind the peak of the tweeters.

This is perfectly ok!

Now to something completely different!


Yeah… :P
We’re doing a 3way up front, means, we have to align the mids/tweets, that are now aligned
to each other, to the midbass drivers.
Impulse response is even less steep than the midranges, so it gets harder to get the point
where the initial rise leaves the 0% mark. In addition, a lot of times midbass to midranges are
crossed in an area where we can get totally readable phase graphs that don’t deviate much
from different measurement positions.
Therefor for midbass to midrange/tweeter alignment and sub to front alignment, we’re doing
phase alignment instead of alignment of the IR impulse responses…. Oh, the joy, I can see
it.

Measurement process is totally the same.


Remove timing offset. Measure mids and tweets together, remove initial delay, remeasure
mids/tweets and measure midbass drivers together… you know the process by now except,
that you can correctly assign channels to midrange and tweeters now, means right channel
to right midrange and tweeter and left channel to left midrange and tweeter…. YAY!!!!
Both midbass drivers are still fed from only one channel though!

Again a warning: you’re playing same content over left and right side when doing
midbass drivers. So you will get cancellations due to the room reflections and stuff.
Perfectly normal and not of interest. The phase graph will still be good enough to
achieve good phase alignment!
Ok. Measurement process done as outline. Measure mids+tweets together, then measure
midbass with the same process as before!
You will have to measurements (ignore the other measurements in the screenshot, you will
have two measurements, mids+tweets and midbass).

Ignore the dips and peaks and stuff. It’s single point sweep measurements and midbass in
blue is fed from only one input. For the task at hand, it’s not that important anyway.

How to align the two measurements now?


Make sure you’re in the „All SPL“ tab in REW.

Make sure you have only selected the two measurements you want to align.
Then click on the Controls button in the upper right corner and click on „Alignment Tool“ in
the window that opens up.
Another window will open. Unfortunately, you have to reselect the measurements you want
to align again in that window, but in the underlying measurement window your already
selected measurements will show up.

After selecting the measurements in the alignment window again. You’ll see their phase
graphs in the lower window, too.

Btw. I renamed the measurements for next screenshot.


Now select the acoustic crossover point. This is the point where you want to align the phase
response of the measurement.
In the alignment tool now click on the button labeled „Level phase at cursor“. This makes the
phase at the cursor position that you just marked easier to read.
After that simply click on „Align phase at cursor“. This will automatically align the phase at the
cursor position via adding or removing delay on the 2nd measurement, in this example the
midbass.

As with the impulse response delay settings you must remember the following:

- „-„ means remove delay from measurement or add delay to other measurement.
- No „-„ means add delay to measurement or remove delay from the other
measurement.
In the example above we would have to remove 1.53ms delay from both midbass drivers.
As one midbass driver is still at 0ms delay, we cannot do that, therefor we add 1.53ms to all
midrange drivers and both tweeters.
If one of the midrange drivers had a delay of 0ms before, it will now have 1.53ms delay. If the
other midrange driver had a 0.7ms delay before, it will now have 2.23ms and so on. Add the
delay to all drivers of first measurement to keep their relative delay in place.
Sometimes it might be that the alignment tool shows you this, but without the checkbox
„Invert polarity“ marked as active.(ignore the checkbox for now).

In this case with some experience, you can see that you’re in phase at the crossover, but out
of time below and above the cursor.
Although you’re in phase this is not (!) what we want to achieve. We want as much phase
coherence in the entire region as possible.
How to achieve that? Well, simply invert the phase on one measurement in the Alignment
tool and press „Align phase“ again and check if it’s more like the screenshot before with more
overlapping phase response.
If you got something like this

it will guarantee you that you’re in phase and time in the entire crossover region and this will
give you maximum summation in the same region.
If you inverted the polarity for one measurement to get a better phase alignment, do that to
the corresponding drivers in the DSP, also. Doing it in the alignment tool, but not in the DSP
will give you biggest cancellation possible as you will be 180° out of phase then as shown in
the following screenshot.
Same delay as screenshot before, but polarity inverted on midbass drivers. See the black
line in the frequency response? This is the estimated response with a big cancellation at the
cursor position.
So don’t forget to adjust the polarity in the DSP if also done in the alignment tool!
For subwoofer integration you repeat this process, but this time with the whole front playing
for first measurement (with proper DSP mixer routing this time!) and sub second.

When done it should look something like this:

In my case I needed to flip the polarity and add 0.21ms delay to all front drivers to get this
alignment.
Not flipping polarity showed a delay of almost 7ms while the phase alignment was not as
good:
Front and sub in phase at cursor, but still a bit out of time.
So don’t hesitate to experiment in this window. Flip polarity, move the delay sliders a bit to
left or right to get the best possible alignment of phase.
When finished your bass should play upfront without any incoherence to the front system.
Staging left/right should be very good, although it might be that some instruments still wander
to one or the other side.
This is then subject to further tuning, but again, this process should give you proper staging
and imaging with upfront bass and very good coherence between drivers.

The end
Thank you all for reading this.
I really hope that all the screenshots make some points in this process clearer to follow.
If you find inconsistencies in my explanations please let me know. I always thrive to learn
more about these processes, and while I think that I did my best to outline the process I’m
still a human who makes errors.

You might also like