Measuring with a timing reference

sm52

Member
Thread Starter
Joined
Mar 14, 2019
Messages
862
Hey. Until that time, I had received the frequency response and phase response graphs using ARTA. I want to try to do the same in REW. It is not clear which circuit should be used if use loopback as timing reference is enabled in the SPL measurement window. 11.png 12.png
 

Breeman

Member
Joined
Jan 9, 2019
Messages
151
I think it depends on what you are trying to accomplish. The first setup (1) excludes the magnitude and phase responses of the amplifier from the measurement while those are accounted for in the second setup. John may want to chime in here, I am not quite sure why the second setup is called a full-dual channel measurement system when there is a mic pre-amp (in the signal path) which may introduce its own phase and magnitude aberrations in the measurement.
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,212
REW is only using the loopback signal as a timing reference, not for correction, so either setup is fine. 1 is probably easier. In both cases a timing offset will be needed to remove the time of flight from speaker to mic.
 

sm52

Member
Thread Starter
Joined
Mar 14, 2019
Messages
862
Breeman,
By the way, I recently found out why I could not get calibration for measuring impedance. It turned out that the microphone or microphone preamplifier inverts the signal. Therefore, in the control panel of the sound card, I had to click on the button for inverting the signal from the microphone. After that, all measurements began to be obtained.
As for the microphone preamplifier - you are probably right. But maybe John will figure out later how to calibrate the channel from the microphone. Or eliminate its distortion.
 

sm52

Member
Thread Starter
Joined
Mar 14, 2019
Messages
862
John
A few more questions.
1. How to find out or calculate timing offset?
2. Do the inputs and outputs levels always have to be aligned before measurements?
 

Breeman

Member
Joined
Jan 9, 2019
Messages
151
Hi John,

Thanks for clearing this up. I kind of assumed the loopback does both the timing and correction. The assumed was probably based on the common setup that uses an USB based audio interface. Would you consider adding an audio chain (external amplifier) calibration option? I can see this being potentially useful for taking anechoic type measurements, where the amplifier's response must be factored out since the speaker being tested will be used in another audio setup.
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,212
John
A few more questions.
1. How to find out or calculate timing offset?
2. Do the inputs and outputs levels always have to be aligned before measurements?
REW can estimate the delay using the entry in the graph controls. Levels don't need to be aligned.
 

sm52

Member
Thread Starter
Joined
Mar 14, 2019
Messages
862
REW can estimate the delay using the entry in the graph controls
1. Does REW calculate delay when measurement is done? Prior to this, REW cannot know what the delay is. Or may? If REW itself calculates the delay before or after the measurement, why should the user enter it?
2. In circuit 1 the signal at the output of the sound card appears at its input without delay. Then REW will consider this moment as the reference point. And the signal transit time through the amplifier + speaker will be considered as the signal transit time only through the speaker. Is that right?
In circuit 2 the signal appears simultaneously at the input of the sound card and at the speaker. Maybe the start of the count of the time will be correct in this case?
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,212
1. Does REW calculate delay when measurement is done? Prior to this, REW cannot know what the delay is. Or may? If REW itself calculates the delay before or after the measurement, why should the user enter it?
REW measures the time difference between the mic input and the loopback input for each measurement and includes any timing offset value that has been entered. The time of flight from the speaker to the microphone must still be removed. Estimate IR Delay can estimate that figure and it can be applied as the timing offset. From the help:

Estimate IR delay calculates an estimate of the time delay in the measurement by comparing it with a minimum phase version. The delay it calculates can be removed from the impulse response by pressing the Shift IR button on the panel shown after the delay is calculated and can additionally be applied as a timing offset for subsequent measurements.

shiftir.jpg



2. In circuit 1 the signal at the output of the sound card appears at its input without delay. Then REW will consider this moment as the reference point. And the signal transit time through the amplifier + speaker will be considered as the signal transit time only through the speaker. Is that right?
In circuit 2 the signal appears simultaneously at the input of the sound card and at the speaker. Maybe the start of the count of the time will be correct in this case?
No. Unless the amplifier contains its own digital signal processing it will not have any significant delay, and even if it did that delay would be the same for each measurement. It is the delay from speaker to mic (with or without any amplifier delay depending on where the loopback connection is taken from) that must be found and entered as the timing offset.
 

sm52

Member
Thread Starter
Joined
Mar 14, 2019
Messages
862
1. I took measurements according to scheme 1. The first measurement gives the delay value. The second measurement and subsequent ones already use the calculated delay. If the measurements are repeated several times, then sometimes the program considers that the delay has changed, although nothing has changed. The microphone did not move, the speaker either, the sound card and amplifier settings did not change.
2. After the measurement, I want to see the minimum phase. However, the “generate minimum phase' button is not active. It is necessary to note the checkbox 'phase', then the button 'generate minimum phase' becomes active. Even if you check the 'phase' checkbox and immediately remove the checkmark, the 'generate minimum phase' button also becomes active. Is it possible to make the 'generate minimum phase' button immediately active. It is even better to make the minimum phase graph appear along with the frequency response graph automatically.
3. If I want to export a measurement to a txt file, I can specify smoothing, for example, 1/6. In this case, the frequency response graph is saved with the specified smoothing, and the minimum phase graph is saved without smoothing.
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,212
1. I took measurements according to scheme 1. The first measurement gives the delay value. The second measurement and subsequent ones already use the calculated delay. If the measurements are repeated several times, then sometimes the program considers that the delay has changed, although nothing has changed. The microphone did not move, the speaker either, the sound card and amplifier settings did not change.
Changes by how much?
2. After the measurement, I want to see the minimum phase. However, the “generate minimum phase' button is not active. It is necessary to note the checkbox 'phase', then the button 'generate minimum phase' becomes active. Even if you check the 'phase' checkbox and immediately remove the checkmark, the 'generate minimum phase' button also becomes active. Is it possible to make the 'generate minimum phase' button immediately active. It is even better to make the minimum phase graph appear along with the frequency response graph automatically.
That would be a bug, though I can't reproduce it. Can you attach the mdat file for an example measurement that shows that, saved at the point you have made the measurement and you see the button is not enabled?

Automatically generating the minimum phase response would be a waste of processing, there are few circumstances where it is useful. It is not the response of the system that was measured, but rather the response of a system with the same magnitude response that is entirely minimum phase.
3. If I want to export a measurement to a txt file, I can specify smoothing, for example, 1/6. In this case, the frequency response graph is saved with the specified smoothing, and the minimum phase graph is saved without smoothing.
A measurement exported as text has the measured phase, not the minimum phase. Please attach an example export file where the measurement is smoothed and the phase not smoothed and the measurement mdat file it was exported from.
 

sm52

Member
Thread Starter
Joined
Mar 14, 2019
Messages
862
Re: 3. Yes, 'A measurement exported as text has the measured phase'. But I need to export it with a minimum phase. Under the graph, I uncheck the 'phase' and put a mark on the 'minimum phase'. Then I export the measurement to a txt file. And I expect that in the third column there will be a minimum phase. But there is a phase. How do I get a measurement file with frequency response + minimum phase? Phase plot data is a forest of transitions from -180 to +180. How can such data be useful? I need frequency response files + phase for the crossover simulator. In the first picture, group delay and phases of four speakers, phases from REW. The second picture shows the same phases from ARTA. The phases from ARTA are the same as the minimum phases from REW. You can’t understand anything in the first picture. On the second, everything is clearly visible, you can work with these graphs.
 

Attachments

  • GD and Phase.PNG
    GD and Phase.PNG
    153.3 KB · Views: 62
  • GD and Phase2.PNG
    GD and Phase2.PNG
    71.8 KB · Views: 64

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,212
The difference between the two is the time delay that has either been removed or not removed from them. Time delay causes a phase shift proportional to frequency and so contributes many phase wraps. Converting a measurement to minimum phase is not the same as removing the time delay. If you wish to export minimum phase results there is a button in the All SPL graph controls to create a minimum phase copy of a measurement, you could export the result of that. However your timing reference becomes redundant in that case since any relative timing that existed between the measurements is thrown away when they are converted to minimum phase. You should use the tools in REW to find and apply the delay offset for measurements, using the same offset for all measurements will preserve their relative timing.
 

sm52

Member
Thread Starter
Joined
Mar 14, 2019
Messages
862
a button in the All SPL graph controls
I found this button and created txt files with minimal phase. Thank you.

You should use the tools in REW to find and apply the delay offset for measurements, using the same offset for all measurements will preserve their relative timing.
I had 4 measurements of 4 speakers. Speakers in a speaker enclosure. The microphone is always in one position. Will the delay offset be different for each measurement? Which tool do i need to use to find and add an offset delay?
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,212
I had 4 measurements of 4 speakers. Speakers in a speaker enclosure. The microphone is always in one position. Will the delay offset be different for each measurement?
I'm not sure whether you are using "speakers" to mean individual drive units or complete loudspeakers. If you are measuring 4 different loudspeakers it will be the same if the speakers are the same type and in the same position relative to the microphone. If you are measuring individual drive units in a single enclosure you should use the same offset for all the measurements, assuming your mic is placed where you expect the drivers to acoustically integrate. In that case best using the tweeter measurement to estimate the delay figure.
Which tool do i need to use to find and add an offset delay?
The Estimate IR Delay button, as explained in post #9, using the "Shift and update timing offset" button on the result. You can also manually determine a figure using the "Adjust t=0" controls while looking at the effect on the phase response, and enter the adjustment in the timing offset (or add it to any existing offset) afterwards.
 

sm52

Member
Thread Starter
Joined
Mar 14, 2019
Messages
862
I am talking about 4 acoustic measurements: lower midbass, upper midbass, middle, tweeter. They are in the same enclosure. In addition, the middle and tweeter inside this enclosure have their own enclosure.
Audiovector QR5 b.PNG
Two files contain 10 measurements made under the same conditions after 1 minute. This is about floating delay.
I could not repeat the situation with the inactive 'generate minimum phase' button.
 

Attachments

  • 5_1 measurements.mdat
    11.8 MB · Views: 60
  • 5_2 measurements.mdat
    11.8 MB · Views: 28
Last edited:

sm52

Member
Thread Starter
Joined
Mar 14, 2019
Messages
862
using the same offset for all measurements will preserve their relative timing
It concerns also my case? When the microphone is in front of tweeter, and its and others speakers measurements make from one position, from one point? Thus the distance from a microphone up to tweeter is not equal to distance from a microphone up to the midrange and up to the others speakers.
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,212
Two files contain 10 measurements made under the same conditions after 1 minute. This is about floating delay.
The total variation in the delay figures across all 10 measurements is 2.7 us, to express that as a distance sound travels it is just under 1 mm. You consider that a large variation in a measurement made at 2.5 m? And that is despite some of the measurements being made in the presence of significantly higher background noise than others and all the measurements suffering from high background noise levels at 2.7 kHz and its harmonics. It looks like very good performance to me.

It concerns also my case? When the microphone is in front of tweeter, and its and others speakers measurements make from one position, from one point? Thus the distance from a microphone up to tweeter is not equal to distance from a microphone up to the midrange and up to the others speakers.
The distances to the drivers will not be the same when you listen either. If you are using 2.5 m as the measurement distance because that is the distance at which he drivers should integrate then make the measurement with the mic so that it aligns with the intended listening position height on the speaker.

Measuring at that distance means the measurement contains a lot of reflections. That will make the responses, both magnitude and phase, difficult to interpret. You could reduce the impulse response windows to gate out the reflections, but there is a big reflection (63% of the peak so only 4 dB down) at just 1.21 ms and another (35% of the peak, so 9dB down) at 13.1 ms. If you gate out the 1.21 ms reflection the response will only have about 900 Hz resolution and nothing below 900 Hz. To measure the speaker you need to move it as far as possible from all surfaces, such as in the middle of a large room, preferably with a high ceiling and raised off the floor, or moved outside. A frequency-dependent window can help reduce the impact of reflections without sacrificing as much frequency resolution, there is an option on the IR windows dialog to apply a frequency dependent window.

The measurements also show a significant peak (23 dB down) 7.35 ms before the measurement itself, which corresponds to the timing difference of the loopback connection. That suggests there is a lot of crosstalk between the measurement and loopback channels. That might be from the wiring arrangements, in which case you could improve it by keeping the wiring for the input channels away from each other, or it might be in the interface, which would be more difficult to fix. It is rare to see such high levels of crosstalk.
 

sm52

Member
Thread Starter
Joined
Mar 14, 2019
Messages
862
This is the measurement that is used for the sound card calibration file. It does not give reason to think that the sound card is not suitable for measurements.
 

Attachments

  • Calibration file 24 june 2020.mdat
    1.6 MB · Views: 17

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,212
The soundcard's response is fine, the issue is with crosstalk, not with the response. Signal from the loopback channel is ending up on the measurement channel.
 

sm52

Member
Thread Starter
Joined
Mar 14, 2019
Messages
862
There are controls on the sound card control panel. I did not understand how they work. During the calibration of the sound card, the signal level was not enough and I twisted to the maximum everything that was relevant to this. Perhaps this is the reason. I'll check it today.
 

Attachments

  • SC_adj_0.PNG
    SC_adj_0.PNG
    111.4 KB · Views: 39
  • SC_adj_max.PNG
    SC_adj_max.PNG
    107 KB · Views: 35

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,212
I wouldn't expect any of the controls you altered to be responsible for signal levels.
 

sm52

Member
Thread Starter
Joined
Mar 14, 2019
Messages
862
I set all knobs to 0, took 3 measurements to calculate the delay, made 3 measurements with a delay of 0. See if the situation with interference and interpenetration of the input channels has changed.
 

Attachments

  • 3 measurements.mdat
    7.1 MB · Views: 9

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,212
Much the same, but it doesn't look to affect the measurements so can probably ignore it. For reference the crosstalk causes the spike in the impulse response at the cursor position in this graph:

33419
 

sm52

Member
Thread Starter
Joined
Mar 14, 2019
Messages
862
I soldered all the plugs connected to the sound card from mono TRS to stereo TRS. This did not solve the problem of input channels, but improved the high-frequency part of the spectrum. So it seemed to me. Then I decided in the 'use loopback as timing reference' mode to disable the input to which the loopback signal arrives. REW was unhappy, but the measurement worked out. In the same place there is this surge, but of a lower level. How to explain this? If only one input channel is working, the second cannot influence it.
 

Attachments

  • without loopback.PNG
    without loopback.PNG
    39.5 KB · Views: 55
Top Bottom