# IR estimated delay, something wrong



## Osho (Oct 11, 2010)

Hi to everybody,

I'm using REW for testing some earphones, 
when I try to estimate IR Delay ,REW calculate a value that is very different from three other software with which I compared the result (SIA Smaart live,Spectraplus,Arta). They all show the same delay time, except REW.
Obviously this leads to incorrectly display the phase, especially at high frequencies.
I wonder why?


----------



## JohnM (Apr 11, 2006)

There are two delay times you can calculate with REW. One is the system delay, which is the delay relative to a loopback connection on the other channel. To have REW generate the system delay figure (which you will find in the Info panel) you need the loopback connection in place and to tick the box in the Analysis preferences.

The other delay REW can estimate is the total delay in the measurement without using a reference loopback. To do this REW cross-correlates the measurement with a minimum phase version, this is the figure shown when using "Estimate IR delay". 

To look any further into your measurement you would need to attach an mdat file and give the delay figures you see with the other packages.


----------



## Osho (Oct 11, 2010)

Hi John,

thank you to replay.
I'am using the loopback connection as reference for the system delay.
When I hit the button "Estimate IR delay" the value shown is pretty similar to the values shown with the other two software but the phase into the graph is different.

I have attached some test results in ASCII format, as you can see Smaart and ARTA result are pretty similar, REW is very different.
I have also attached a mdat file as reference.

If you want I can send you some snapshot of the other graphs.

Thank you.


----------



## JohnM (Apr 11, 2006)

The measurement looks to have a 0.5 sample time offset (0.0113ms) which REW is removing when the "Estimate IR delay" feature is used. This may be an offset between the soundcard channels (some soundcards interleave their channels rather than sampling them at the same time). If you want REW to show the same HF phase as ARTA and SMAART, offset the impulse by 0.113ms in the Impulse Response controls, but note that your impulse will then be starting before t=0, i.e. not causal.


----------



## Osho (Oct 11, 2010)

Hi John,

I have offset the impulse by 0.113ms in the Impulse Response controls but still different result.
I have different phase value also at low frequencies.
I really like REW , i have already tested the impedance and electric phase of several earphones,
and it works great but for acoustic response I don't know which software give me the best results.
I would like to use REW because I like its interface and I really think it's a great software,and also i would like to use only one software as measuring device.
I have attached some snapshot of different software and a mdat file to show you the difference I am talking about.

Thank you.


----------



## JohnM (Apr 11, 2006)

Sorry, I put a typo in the delay setting the second time, that should be 0.*0*113ms. I also noticed the LF phase lead when comparing with the other measurements, I'm looking into that. You can import the ASCII measurements and do the compare in REW, just offset the traces to line them up - but for the (noisy!) SMAART data you will need to edit the file to change the ";" at the start of comment lines to a "*", I have made a change to allow ; as a comment delimiter for the next release.


----------



## JohnM (Apr 11, 2006)

Here is a comparison SPL plot with the amplitude offsets removed (ARTA red, SMAART green, REW blue)







and a comparison phase plot with a timing offset of 0.015ms added to the REW impulse








I suspect you would see closer phase correlation by default if you configure REW to set t=0 at the impulse peak.

The difference at low frequency may be due to the soundcard struggling to drive the load at low frequencies. Try (1) repeating the test at a lower sweep level (try 10dB lower), (2) starting the REW sweep at 20Hz and (3) measuring in ARTA with a sweep (was the data for the ASCII measurement from periodic noise?) and using the same signal level as REW.


----------



## Osho (Oct 11, 2010)

Hi John,

thank you.

I have made a new set of measurements in ARTA (as you write SMAART is too noisy  ) with a PN white, white noise and sweep as well, they are pretty much the same. On REW I imported the ascii files, set the t=0 at the impulse peak, but had to add 0,002 ms to the impulse to get closer to the other curves on the HF( sorry but how do you enter 0,00113 ms, the window only accept 4 digit). The REW sweep level is already low (-10 dB) and I don't think at LF there is a problem with the soundcard (I do the measurements with REW and the other software one after another and i don't see this behavior with the others).
Here a comparison phase plot with all the measurements








thank you.


----------



## JohnM (Apr 11, 2006)

Osho said:


> I have made a new set of measurements in ARTA (as you write SMAART is too noisy  ) with a PN white, white noise and sweep as well, they are pretty much the same.


You would get better measurements at LF using pink rather than white noise, but even the ARTA sweep result differs from its noise measurements, though by less than REW:










> On REW I imported the ascii files, set the t=0 at the impulse peak, but had to add 0,002 ms to the impulse to get closer to the other curves on the HF( sorry but how do you enter 0,00113 ms, the window only accept 4 digit).


It was 0,0113ms, you can type more digits than are displayed and they will be accepted, but increments of 0,001ms are sufficient. Easiest is to set the adjustment to 0.001ms then hit apply as many times as necessary to align the phase.



> The REW sweep level is already low (-10 dB) and I don't think at LF there is a problem with the soundcard (I do the measurements with REW and the other software one after another and i don't see this behavior with the others).


I note that your REW measurements do not include any soundcard calibration, did you calibrate the soundcard with ARTA? The calibration will affect the LF phase where the soundcard starts to roll off. Another point to check is what the actual soundcard output level is for each system at the chosen sweep level.


----------

