# Sweep length versus IR Phase



## ths61 (Jan 14, 2010)

I am using a USB calibrated UMIK-1, a USB DAC and REW 5.20 Beta 12.

I noticed that the IR plots phase inverts as the sweep length changes between 128K and 1M. 

Is this normal behavior ?

If so, why would the polarity change based on the sweep length ? :huh:

TIA


----------



## JohnM (Apr 11, 2006)

Please post an mdat file with your measurements.


----------



## ths61 (Jan 14, 2010)

JohnM said:


> Please post an mdat file with your measurements.


Thanks JohnM,

Here you go.


----------



## JohnM (Apr 11, 2006)

The difference is due to small differences between the clock rate of your DAC and the UMIK. Here are the impulse responses with 21 parts per million clock rate adjustment applied:









There is a note in the help about this, added following a similar issue that a user spotted in April:

_If the input and output are on the same device and so share a common clock longer sweeps will provide higher signal-to-noise ratio (S/N) in the measurements. Long sweeps are not recommended when the input and output are on different devices, such as when using a USB mic, as their sample clock rates will differ. Over a long sweep the difference in clock rates can cause severe distortions in the shape of the impulse response and affect the phase response._


----------



## ths61 (Jan 14, 2010)

JohnM said:


> The difference is due to small differences between the clock rate of your DAC and the UMIK. Here are the impulse responses with 21 parts per million clock rate adjustment applied:
> 
> View attachment 149066
> 
> ...


I saw that in the help file and for me 256K sweep lengths plots don't look right.


"... The default is 256k which works well for most purposes. ..."​

So how does one get correct reliable/repeatable measurements then ?

- Somehow determine and apply a clock rate adjustment ?
- Use a specific sweep length (e.g. 128K, 256K and above don't look correct) ?
- Get rid of the calibrated USB MiniDSP UMIK-1 in leu of some other TBD mic/soundcard combo ?
- Something else ?

TIA


----------



## JohnM (Apr 11, 2006)

Clock rate mismatches are likely with different input and output devices, all clocks have a tolerance. To eliminate them the input and output need to share the same clock.

The effect is equivalent to an all pass filter. Magnitude response is essentially unchanged and the phase response effects aren't visible until higher frequencies. The change in the shape of the impulse response has much less effect than one might imagine. I'll add a feature in V5.21 to have a second timing reference after the sweep and compensate for clock mismatch automatically, but it is too big a change to go in 5.20. In the meantime I have added a manual rate adjustment feature for the next beta build.


----------



## ths61 (Jan 14, 2010)

JohnM said:


> Clock rate mismatches are likely with different input and output devices, all clocks have a tolerance. To eliminate them the input and output need to share the same clock.
> 
> The effect is equivalent to an all pass filter. Magnitude response is essentially unchanged and the phase response effects aren't visible until higher frequencies. The change in the shape of the impulse response has much less effect than one might imagine. I'll add a feature in V5.21 to have a second timing reference after the sweep and compensate for clock mismatch automatically, but it is too big a change to go in 5.20. In the meantime I have added a manual rate adjustment feature for the next beta build.


Thanks for the update. That will be a very useful addition. 

The USB UMIK-1 has been recommended multiple places on the web, but the timing issues were not caveated accordingly. I have been looking into DRC that goes beyond frequency magnitude adjustments and the timing issues pretty much defeat the purpose. It would seem the software measurement routines in packages like Acourate and Audiolense would be affected. DRC-FIR can use REW sweeps, so it can benefit by your forthcoming upgrades.

Again, thank you very much for the new software updates as well as REW in general.


----------



## ths61 (Jan 14, 2010)

Thanks for the updates in V5.20 Beta 14. 

You under-promised and over-delivered !!!


----------

