estimate IR delay in car

sm52

Member
Thread Starter
Joined
Mar 14, 2019
Messages
892
John, hello. I made measurements in the car, creating test signal files in REW and burning these files to CD. Found that the distance to the driver is not defined correctly. The actual distance from the microphone to the tweeter is 83 cm. And REW defines 30.4 cm. I didn't use 'estimate IR delay' on purpose to check.
 

Attachments

  • left tw.mdat
    2.4 MB · Views: 10

sm52

Member
Thread Starter
Joined
Mar 14, 2019
Messages
892
Not sure. In my case, the measured driver was also the reference one. Because it's a tweeter. Second, when I took measurements at home, the distance from the microphone to the reference driver was equal to the physical distance. The difference is that at home the reference signal played REW, and in the car the file was on CD.
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,326
the measured driver was also the reference one
In which case the delay should nominally be zero, rather than nearly a ms negative (meaning it arrived earlier than the timing signal). A car is a very reflective environment though, so difficult for an acoustic reference.

when I took measurements at home, the distance from the microphone to the reference driver was equal to the physical distance
I'm not sure what you mean by that, it doesn't matter what the distance to the reference driver is. REW can only estimate how much closer or further away the driver being measured is.
 

sm52

Member
Thread Starter
Joined
Mar 14, 2019
Messages
892
Do you think the reason why the measurement signal (not the reference one) began to play earlier could be due to the incorrect recording on the CD of the file created by REW? Or does the CD player play the recorded file incorrectly? Or do you have other thoughts on this?
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,326
If the file playback and REW are not running at the same sample rate that would cause issues.
 

sm52

Member
Thread Starter
Joined
Mar 14, 2019
Messages
892
I tried to find out what is happening in my case. Here's what I did. I have read the manual for the CD player. It can play 44.1kHz and 48kHz .wav files, 16bit only. I created all file variants for both sample rates in the generator. That is 4 files. The results are the same for both sample rates. The microphone was on the driver's seat near the headrest. Only the tweeters located on the side pillars (to the right and left of the windshield) were measured. For variants L_ref_L and R_ref_R the negative delay is the same. For the other two, it differs by two times more or two times less.
John, maybe this information will prompt you to explain why the delays are not zero.
 

Attachments

  • negative delays 4 options.mdat
    8.4 MB · Views: 9

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,326
A possible explanation is that for the 5 - 20 kHz frequency range of the timing sweep there is a reflection that is stronger than the direct sound.
 

sm52

Member
Thread Starter
Joined
Mar 14, 2019
Messages
892
I repeated the same at home. There are no reflections at home that are stronger than the main signal. The microphone was closer to the left speaker at a distance of about 1.5 m. To the right speaker about 2.5 m. The results are similar to the results in the car. The impulses on the time scale are arranged in multiples. In the car it is a multiple of 16 cm, at home it is a multiple of 46 cm. At home the files were played by foobar installed on the same computer as REW.
 

Attachments

  • negative delays 4 options home.mdat
    9.5 MB · Views: 11

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,326
Playing back the 48 kHz file? There is a lot going on before the IR peak in those measurements, usually an indicator of resampling or FIR processing. From the measurements the left looks to be about 460 mm closer to the mic. I don't know why the results are like that, sorry. You can turn on the Analysis preference "Adjust clock with acoustic ref" to make sure clock rate differences are not a factor.
 

sm52

Member
Thread Starter
Joined
Mar 14, 2019
Messages
892
Playing back the 48 kHz file?
Yes. Here are the files. Could you make 4 files like mine in a generator and measure like me? So that I can see how the impulses are located on your time scale?
 

Attachments

  • 512kMeasSweep_0_to_24000_-9_dBFS_48k_PCM16_L_or_R.zip
    3.9 MB · Views: 10
Last edited:

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,326
You do not appear to be measuring with the "Adjust clock with acoustic ref" analysis option selected. It can make a big difference, the longer the sweep the more difference it will make. For example, if I use your L_ref_L file played from Roon to my office speakers the delay distance shows -230 mm, if I play it with the clock correction active the delay distance is -3.1 mm. On this setup the clock difference is -66.0 ppm. I recommend always selecting Adjust clock with acoustic ref.
 

sm52

Member
Thread Starter
Joined
Mar 14, 2019
Messages
892
I have tried enabling this option. Nothing changes for me. Houses. There are suspicions why this is happening. I'll check and write.
 

sm52

Member
Thread Starter
Joined
Mar 14, 2019
Messages
892
I checked how REW plots for four cases. When the file being played is original, with two sweeps of the timing reference(5-20 kHz) at the beginning and end. When 20 samples of silence are added between the first sweep of the timing reference and the start of the main sweep. When the file being played is original and "clock with acoustic ref' option is enabled. When the file is recorded without sweeps of the timing reference, just a main sweep.
 

Attachments

  • 4 cases.jpg
    4 cases.jpg
    215.1 KB · Views: 14

sm52

Member
Thread Starter
Joined
Mar 14, 2019
Messages
892
The first two graphs are completely identical, The second with an offset of 420 µs. The second two are different from the first two. The second two are also different from each other. The picture shows the differences after the impulse peak. The SPL graphs are the same for everyone. The impulse graphs are different. The second, third and fourth also differ in the level first two impulse peaks.
 

Attachments

  • 4 cases 2.jpg
    4 cases 2.jpg
    209.8 KB · Views: 13
Last edited:

sm52

Member
Thread Starter
Joined
Mar 14, 2019
Messages
892
For all four options, you can correctly track the position of the drivers in time. The addition of 20 samples of silence shifted momentum to zero at home, but a larger shift is needed in the car. And each playback device will have its own offset. I think the 'adjust clock' function is not working correctly, even though the momentum graph is shifting towards zero. It would be more correct when analyzing the measurement inside the REW to add some time between the first reference sweep and the start of the main sweep. Then the impuls graphs remains the same completely.
It would be possible to make a button to set the time offset. Then all cases would be adjusted correctly.
 

Attachments

  • negative delays 4 options car.mdat
    10.5 MB · Views: 6

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,326
If you add samples before the sweep but do not remove the same number afterwards you create a clock rate error, since you have changed the number of samples between the timing references. That should only occur when the clock is in error, so you have created an invalid test. When you added 20 samples without the clock adjustment correction (so the second timing reference is ignored) the delay estimate change corresponded to 20.16 samples, which seems pretty close to me.
 

sm52

Member
Thread Starter
Joined
Mar 14, 2019
Messages
892
First I added 1 sample to see what happens. Then 2. And so I got to 20. Although, in my case at home, it takes 20.5 samples to get to zero.
If you add samples before the sweep but do not remove the same number afterwards you create a clock rate error
However, nothing bad happened. The shape of the impulse remained exactly the same, it only shifted in time.

Should I try to do as you wrote, +20 before the main sweep, -20 after? Or is it not necessary?
 
Last edited:

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,326
It serves no purpose. It is unusual that you have negative delays, but you can see from the wavelet spectrogram that the timing of the frequency response above 6 kHz differs from the response below. If you get results that are repeatable then the absolute time of the reference is irrelevant. If L ref L and R ref L produce the same delay, they are aligned. If they differ then the amount of the difference is the adjustment required, but if you have a system with different timings within the same driver there is no one answer for what its delay is.

53468
 

sm52

Member
Thread Starter
Joined
Mar 14, 2019
Messages
892
you can see from the wavelet spectrogram that the timing of the frequency response above 6 kHz differs from the response below.
Can you explain what is unusual about what you said? The wavelet shows reflections over time at all frequencies. Why do reflections up to 6 kHz and beyond have to match?
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,326
The timing reference signal spans 5 kHz to 20 kHz, so its timing is determined by the response in that region. A wider band measurement includes lower frequency content, so the estimate of arrival time for that combined signal can differ from that of the timing signal.
 

sm52

Member
Thread Starter
Joined
Mar 14, 2019
Messages
892
Are you saying that the error in estimating the arrival time of the main sweep will depend on the number of reflections at frequencies of 5-20 kHz?
 

sm52

Member
Thread Starter
Joined
Mar 14, 2019
Messages
892
Then I'm missing something. Everything you wrote before is clear to me. Thanks for the clarification and your time.
Lately I've been adjusting t=0 on different measurements in the GD window. So that the flat area at the end of the range is 0. This is the most correct way. However, it is not so easy. if the driver does not play to the end of the measurement range.
 
Top Bottom