DSPRelated.com
Forums

MLS RIR Measurement

Started by ger_lough January 7, 2010
Hi there, 

I am trying to measure a room impulse response using an MLS (maximum
length sequence) test signal. I've read that the MLS signal needs to have a
time duration longer than that of the RIR. The length of the sequence in
samples is (2^n)-1, thus at a sample rate of 44.1 kHz, I chose n=16
equating to approximately 1.5 seconds. I estimated that the time duration
of the RIR is less than 1.5 seconds.
Having performed the experiment (play the signal through speakers, record
response and convolve time reversed MLS signal with response) my result was
not simply an IR. When I plot the graph of my result, it it looks like an
IR contained within some low level noise. This noise ramps up and down
slightly just before the IR and the same noise pattern repeats, commencing
at the start of the IR. 
I tried to extract the IR by dropping all data before the IR. The problem
is that the tail of the IR is shrouded in the low level noise. All I can
think of doing to extract a somewhat meaningful RIR is to force the tail
down to zero using a ramp so that the duration equals the theoretical (or
estimated) RIR duration. The problem with this is that I will be changing
the spectrum of the RIR. 

So, my main question is: Does my result sound like what should be obtained
using the MLS method?

If so, how could I improve my results (i.e. reduce the noise level)?

If not, what should the graphed result of the convolution look like and
can you spot anything I'm doing wrong?

Many thanks,

Ger

p.s. if you are familiar with the MLS RIR measurement technique and my
description appears muddled, I can email you the graph of my result. 
Hi again,

I am reading through a very helpful book entitled "Handbook of Signal
Processing in Acoustics" and just came across this:

"When working with a periodic excitation signal, the acquired
impulse response will also be periodic. Care must be taken to
guarantee that the chosen period is sufficiently long to accommodate
all delayed components of the IR. In this case, one period
of the periodic IR is virtually equal to the normal aperiodic IR.
If the chosen period is too short, the IR’s tail will smear into the
beginning of the next period, an effect known as time aliasing"

My excitation signal is an MLS, which is periodic, so the above is one
explanation for my problem. Though it's hard to believe that the
reverberation time of my room would be more than 1.5 seconds. It is quite a
big room (approx 5 x 4 x 3.5 meters), but not too reverberant. 

Any suggestions appreciated and I will post again if I find the
problem/solution.

Thanks

Ger
ger_lough wrote:
> Hi again, > > I am reading through a very helpful book entitled "Handbook of Signal > Processing in Acoustics" and just came across this: > > "When working with a periodic excitation signal, the acquired > impulse response will also be periodic. Care must be taken to > guarantee that the chosen period is sufficiently long to accommodate > all delayed components of the IR. In this case, one period > of the periodic IR is virtually equal to the normal aperiodic IR. > If the chosen period is too short, the IR�s tail will smear into the > beginning of the next period, an effect known as time aliasing" > > My excitation signal is an MLS, which is periodic, so the above is one > explanation for my problem. Though it's hard to believe that the > reverberation time of my room would be more than 1.5 seconds. It is quite a > big room (approx 5 x 4 x 3.5 meters), but not too reverberant. > > Any suggestions appreciated and I will post again if I find the > problem/solution.
If the problem diminishes with a longer MLS or worsens with a shorter one, you have your answer. In 1.5 seconds, there are some 52 bounces in 5-meter path. What is the decay factor for each bounce? Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
>If the problem diminishes with a longer MLS or worsens with a shorter >one, you have your answer. > >In 1.5 seconds, there are some 52 bounces in 5-meter path. What is the >decay factor for each bounce? > >Jerry
Hi Jerry, Thanks for your response and sorry for the delay in my response. I am starting to get a better handle on it now. I couldn't tell you what the decay factor is for each bounce. From looking at the impulse response, the difference in level between the second and third most significant peaks is approximately 0.8 dB. I did try what you suggested and tried a shorter and a longer MLS test signal. I found that the longer the MLS signal, the higher the SNR. I remember reading that that's one of the main reasons for using MLS signals in that by using longer signals, the SNR can be improved. There is probably a trade-off between SNR and RIR accuracy associated with this though. I have two more questions which I'm hoping you can answer. 1. When convolving the response with the reversed MLS test signal, should I include the reverberant tail (the room reverberation after the test signal has stopped) of the response? Or should cut off the reverberant tail? 2. I think I read that by repeating the test signal periodically a few times can improve the accuracy of the measured RIR. I tried this by playing the test signal 3 times, with a gap equal to the duration of the test signal between each test signal output. I then tried to convolve the room response with this test signal, but the result was just three separate RIRs, one after the other. Do you know of any technique that involves repeating the test signal periodically to improve the accuracy of the measured RIR? If so, how is it implemented? Many thanks Ger
ger_lough wrote:
>> If the problem diminishes with a longer MLS or worsens with a shorter >> one, you have your answer. >> >> In 1.5 seconds, there are some 52 bounces in 5-meter path. What is the >> decay factor for each bounce? >> >> Jerry > > Hi Jerry, > > Thanks for your response and sorry for the delay in my response. I am > starting to get a better handle on it now. > I couldn't tell you what the decay factor is for each bounce. From looking > at the impulse response, the difference in level between the second and > third most significant peaks is approximately 0.8 dB. > I did try what you suggested and tried a shorter and a longer MLS test > signal. I found that the longer the MLS signal, the higher the SNR. I > remember reading that that's one of the main reasons for using MLS signals > in that by using longer signals, the SNR can be improved. There is probably > a trade-off between SNR and RIR accuracy associated with this though. > > I have two more questions which I'm hoping you can answer. > > 1. When convolving the response with the reversed MLS test signal, should > I include the reverberant tail (the room reverberation after the test > signal has stopped) of the response? Or should cut off the reverberant > tail?
Think about the convolution process. It involves multiplying samples from the excitation stream by samples from the response. When one of those streams is identically zero, there can be no contribution to the outcome. So I think you shouldn't bother because it doesn't matter.
> 2. I think I read that by repeating the test signal periodically a few > times can improve the accuracy of the measured RIR. I tried this by playing > the test signal 3 times, with a gap equal to the duration of the test > signal between each test signal output. I then tried to convolve the room > response with this test signal, but the result was just three separate > RIRs, one after the other.
You can improve the SNR by averaging those RIRs.
> Do you know of any technique that involves repeating the test signal > periodically to improve the accuracy of the measured RIR? If so, how is it > implemented?
A longer test sequence helps. Repeating the excitation without gaps makes a longer sequence but introduces a small ambiguity in the timing. I say "small" because I don't think that any problem will be introduced with a well-behaved RIR. The usual way to determine if a test condition is long enough -- or short enough, or heavy enough, or whatever, depending on the test -- is making it longer (or shorter, or heavier, etc.) until the change makes no difference. The same criterion is used to decide when an iteration has reached an acceptable approximation. Sometimes, one can remember and use the information next time -- that's called experience. Sometimes, one needs to test each instance. You really shouldn't ask a person if the MLS is long enough, you should ask the room. And when you do need to consult an expert, I'll bow out because I'm not an expert! :-) Good luck! Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
ger_lough wrote:

> I have two more questions which I'm hoping you can answer. > [..] > 2. I think I read that by repeating the test signal periodically a few > times can improve the accuracy of the measured RIR.
AFAIR you must stimulate the room with 2-3 MLS periods before acquiring the data used to calculate the room response.
> I tried this by > playing the test signal 3 times, with a gap equal to the duration of the > test signal between each test signal output. I then tried to convolve the > room response with this test signal, but the result was just three > separate RIRs, one after the other. > Do you know of any technique that involves repeating the test signal > periodically to improve the accuracy of the measured RIR? If so, how is it > implemented?
About 10 years ago I played a little with MLS for audio. My results were that you can either use a long MLS period (say MLS-1) or several shorter periods (say N * MLS-2) and average the results and get the same SNR if t(MLS-1) = N * t(MLS-2). So the best approach is to use the longest period you can handle (usually limited by processing time) since averaging shorter MLS periods has no advantage regarding SNR. Processing time can be reduced dramatically if you implement the fast Hadamard transformation. AFAIR my old PC needed 15 minutes for a long MLS (16?) with standard convolution and a few seconds with fast Hadamard. best regards Andreas -- Andreas H�nnebeck | email: acmh@gmx.de ----- privat ---- | www : http://www.huennebeck-online.de Fax/Anrufbeantworter: 0721/151-284301 GPG-Key: http://www.huennebeck-online.de/public_keys/andreas.asc PGP-Key: http://www.huennebeck-online.de/public_keys/pgp_andreas.asc
On Jan 14, 3:15&#4294967295;am, Andreas Huennebeck <a...@gmx.de> wrote:
> ger_lough wrote: > > I have two more questions which I'm hoping you can answer. > > [..] > > 2. I think I read that by repeating the test signal periodically a few > > times can improve the accuracy of the measured RIR. > > AFAIR you must stimulate the room with 2-3 MLS periods before > acquiring the data used to calculate the room response.
if your MLS is long enough (longer than the IR), the stimulating the room with *one* period should be enough to bring it to a steady state.
> > I tried this by > > playing the test signal 3 times, with a gap equal to the duration of the > > test signal between each test signal output. I then tried to convolve the > > room response with this test signal, but the result was just three > > separate RIRs, one after the other. > > Do you know of any technique that involves repeating the test signal > > periodically to improve the accuracy of the measured RIR? If so, how is it > > implemented? > > About 10 years ago I played a little with MLS for audio. My results were that > you can either use a long MLS period (say MLS-1) or several shorter periods > (say N * MLS-2) and average the results and get the same SNR if > t(MLS-1) = N * t(MLS-2). So the best approach is to use the longest period > you can handle (usually limited by processing time) since averaging > shorter MLS periods has no advantage regarding SNR.
the other thing is to try different MLS sequences (perhaps of different length, as long as they're all long enough). one can just repeat the same MLS and (synchronously) averaging the result and that can help regarding room *noise* (that is not synced or coupled with the MLS). but, if there is a nonlinearity in the room response (or loudspeaker, more likely), that can show up as little "noisy" spikes in the IR and you can average until the cows come home and those spurious spikes will not go away. unless you average (but median "averaging" would be better) the IR obtained from diffferent MLSs. the math behind how this happens is explained at http://www.dspguru.com/dsp/tutorials/a-little-mls-tutorial . r b-j
That's all very helpful, thanks a million fellows! 
It's hard to find documentation that explains how exactly to perform
experiments, so I'm having to decipher the theory and apply it practically.
I misinterpreted the periodic repetition technique, but suspected that it
was an averaging of many measured responses. Thanks for clarifying that and
my AC issue Jerry. 

Andreus, your insights were very enlightening. I thought that repeating
the MLS signal periodically required a gap in between each period, but I
now fully understand the motivation behind concatenating shorter MLS
signals or using longer ones.

Thanks Robert for elaborating too on Andreus' point. I just had a look at
that dspGuru page and it is exactly the kind of explanation I was looking
for. 
 
I think I now have enough understanding to try out the various techniques
and find the best approach for my purpose. 

One last question if you can; 
It seems that there will always be a certain level of noise present in the
resulting IR. If, for example, I use a test MLS signal considerably longer
than the RIR, the tail of the calculated IR is lost underneath the noise
well before the end of the signal. In practice, does one just leave the IR
like this? Or should I try and manually ramp the IR down to zero at the
estimated end of the RIR?
On Jan 14, 11:01&#4294967295;am, "ger_lough" <debr...@tcd.ie> wrote:

> One last question if you can; > It seems that there will always be a certain level of noise present in the > resulting IR. If, for example, I use a test MLS signal considerably longer > than the RIR, the tail of the calculated IR is lost underneath the noise > well before the end of the signal. In practice, does one just leave the IR > like this? Or should I try and manually ramp the IR down to zero at the > estimated end of the RIR?
how much difference would it make? if, for practical reasons, a short IR helps you, you'll have to figure out some judgment as to how to truncate the noisy stuff off of the end. but, if the noisy stuff can go along with the real IR into further analysis with no extra cost (or a cost that you're willing to pay), then why bother to truncate? r b-j
>how much difference would it make? > >if, for practical reasons, a short IR helps you, you'll have to figure >out some judgment as to how to truncate the noisy stuff off of the >end. > >but, if the noisy stuff can go along with the real IR into further >analysis with no extra cost (or a cost that you're willing to pay), >then why bother to truncate? > >r b-j
Ok, it shouldn't cause too much extra cost, so I'm prepared to leave it in. Thanks once again for that clarification. Ger