# IR delay doesn't match with other software. what to trust?



## Osho (Oct 11, 2010)

Hi to Everybody,

i noticed that REW IR delay is very different from some other software that i am using. i tried all the settings in the "Analysis" page ( use loopback as timing reference, set t=0 at IR Peak, sub sample timing adjustment, decimate IR )and all the different combinations but still having a delay time that differ consistently from the others software i've tried.
Attached some pictures showing the differences.

I am using REW for testing some earphones, i really like it, but this difference in time is too much and cause a shift in the phase response.

Thank you.


----------



## jtalden (Mar 12, 2009)

The phase "rotates" [slants up or down] based on the location of the IR relative to the zero time position. All programs have an algorithm to automatically make this alignment. There are various ways to do this and there is no correct answer for all situations. Some programs offer several automated choices and I presume all programs offer a way to manually shift the IR. In REW the manual adjustment is in the tools window on the IR tab. 

In the examples you posted, I prefer the setting that REW automatically selected as the most informative, but I would expect this to vary from situation to situation. To increase your confidence you could shift the IR in each program so that they all align the same relative to zero. The phase should then look similar.

There may still be some differences particularly if smoothing is applied as these algorithms also vary sometimes.


----------



## Osho (Oct 11, 2010)

Hi John,

thank you for your answer.

But what i mean is that REW calculate a different delay time, while all the other software calculates the same delay time.
the test system is the same for all the measures, Motu interface out, headphone ampli, ear simulator with microphone and Motu interface In, so the distance from the earphone to the microphone is always the same.
REW is the only one that calculate a time (and a distance) not in accord with the test system.


----------



## jtalden (Mar 12, 2009)

The REW photo popup shows a small number 0.067ms(?) compared the 0.200ms(?) the others show - I think (it’s very hard to read these). This REW popup always shows the additional delay needed from the present position not the total delay from the initial reference. 

So, if you turned on the reference channel and allowed subsample timing this popup should indicate the total delay. If that is what you did then I am not sure why there is such a big discrepancy. 

If you already shifted the IR either manually or by letting REW set T=0 at IR peak then this dialog is just indicating a further minor adjustment that it can apply.


----------



## JohnM (Apr 11, 2006)

How do the various phase responses compare after applying each program's delay correction?


----------



## Osho (Oct 11, 2010)

Hi,

a have done four new measurements, with the signal coming out from my Motu audio interface in this configuration:

R out to R in
L out to a delay line in, delay line out to L in.
I've done this in order to have the same delay time in all measurements.

attached a REW mdat.
As you can see all the phase responses are a bit different, i've been able to get the same delay time with REW using the option "Use loopback as timing reference".
Also the curve obtained with the loopback option is different from the one obtained with the option " Set T=0 at IR peak".


----------



## jtalden (Mar 12, 2009)

Osho said:


> …L out to a delay line in, delay line out to L in.
> I've done this in order to have the same delay time in all measurements.


Delay line? I don’t understand what you mean by that. 

You only need to run L out to L in if you want to use the “loopback” option. Any left channel connection is ignored when you use “Set T=0".

Using “loopback” will set the IR peak at the total delay of the measurement. Using “T=0” will apply the algorithm to move the IR peak to align it with zero.



Osho said:


> …As you can see all the phase responses are a bit different, i've been able to get the same delay time with REW using the option "Use loopback as timing reference".
> Also the curve obtained with the loopback option is different from the one obtained with the option " Set T=0 at IR peak".


The small apparent difference in the phase response of the 2 REW curves is the result of the location of the IR relative to T=0. The “T=0” measurement needs about 0.0009 ms less delay to perfectly align the phase with the “loopback” measurement.

This 0.0000009 s delay difference may be the result of the “delay line” connection you mentioned? Another possibility for the discrepancy is the algorithm that that REW applied to align the IR peak to zero when the “Set T=0" measurement was taken? I suspect there is no perfect way to do this as the shape of the IR is no uniform and digitized so any automated alignment may result in a very small error like this. 

I tried to replicate a difference in IR location between “T=0” vs “loopback” setup using my equipment, but the in my case the IR’s and the phase curves directly overlaid.

I suspect the soundcard calibration algorithm between the measurement programs also varies, so when you compare REW to Arta for example there will be some minor differences due to that. For most of us these small differences will not impact the work we are doing. 

I hope these thoughts are helpful.


----------



## Osho (Oct 11, 2010)

Hi John,

thank you for your thoughts.

For "Delay line" I mean that i am using on the left channel a Soundweb 9088 networked signal processor that allow me to introduce a certain amount of delay to the signal passing through it, otherwise if I loopback the L and R channels directly the delay time between the two channels will be zero.
I've done it just for the purpose of measurements, in order to have a fixed delay time between the reference channel and the measure channel.

I also suspect that the discrepancy is the algorithm that that REW applied to align the IR peak to zero when the “Set T=0" measurement was done, as you wrote.
i'm testing earphones(actually i'm measuring IEMs) so the distance from the earphone to the ear simulator is around 2 cm, the phase difference is not so huge, but at high frequency is noticeable, and I just want to figure out what software is closer to the actual behavior so i can tune properly my products.


----------



## jtalden (Mar 12, 2009)

Yes, your delay line is then possibly the easiest way to have a repeatable fixed offset between successive measurements that are aligned as you desire near zero.

For those of us using without a seperate delay device to insert we just determine what delay we need and then apply it manually. That works fine, but requires repeating the manual offset for each measurement. That is sometimes a little tedious. The REW controls could be a little more friendly for determining delays for drivers and other similar work.


----------



## JohnM (Apr 11, 2006)

It would be better to start the REW sweeps below 20Hz, the limited bandwidth of a sweep that starts at 20Hz affects the recovered IR and alters the shape slightly. Try 10Hz (or 0) as the sweep start.


----------



## Osho (Oct 11, 2010)

Hi,

sorry I've been a bit misleading...

I used the delay line just for the purpose of testing the behaviour of the different software, in order to have the same delay between the channels L and R for all the measurements.
In this way I avoid the possible differences in time due to the earphone or the Ear simulator or any other "sound path" that could be interpreted in a different way from the various software.
Basically I measured the electric frequency response and phase of my sound card only with a fixed delay between left and right, so I could compare the results between the measures.

I'll make the measure in REW as JohnM says,and will let you know.


----------

