2
$\begingroup$

I followed the two methodology for generating impulse response

Method 1: Used the below link reference where I simply convolve the recorded signal by the time reversed sweep signal to get the impulse response. (Estimating the Impulse Response of the Room Using Sweep Signal Microphone Recorded Signal (Input & Output of a Convolution))

The output is as belowenter image description here Zoomed in:

enter image description here

Method 2: Used Reaper DAW, where it uses the recorded signal and the sweep signal to generate the impulse response. The output is as follow: enter image description here Zoomed in:enter image description here

The major difference I noticed here is that using method 1, the impulse response is kindof in the middle of the graph and in method 2 , it starts kindof from the beginning of the graph. Is this some kind of wrapping? How would this conversion of wrapping the signal work? The output from method 2 is kindof my desired output- any leads on how it can be obtained?

$\endgroup$
2
  • $\begingroup$ It looks like the second one has more high frequency content. If you apply an FFT to both, what are the differences? $\endgroup$ Jul 14, 2022 at 13:56
  • $\begingroup$ Using the first method you should discard the first half samples of the convolution results, which is actually the non-linear part of the system. $\endgroup$
    – ZR Han
    Jul 15, 2022 at 6:46

1 Answer 1

1
$\begingroup$

In (exponential or linear) swept sine method, the anti-causal part represents the non-linear part of the system. Simple matlab code is given:

%% Exponential swept sine generation
T = 1;  % sweep of duration T in second
Fs = 48e3;
t = 0:1/Fs:T-1/Fs;
f1 = 20;
f2 = 20e3;
w1 = 2*pi*f1;
w2 = 2*pi*f2;
x = sin( T*w1/(log(w2/w1)) * (exp((t / T) * log(w2/w1)) - 1) );
figure; plot(t, x)
title('Excitation signal')

%% Inverse filter
am = exp(-t*log(w2/w1)/T);
invFilter = x(end:-1:1).*am;
figure; plot(invFilter)
title('Inverse filter')

%% System response
[b, a] = butter(5, 0.5);
y = filter(b, a, x);
y = y + 0.5 * y.^2 + 0.25 * y.^3 + 0.1 * y.^4; % non-linear harmonics

%% Deconvolution
h = conv(y, invFilter);
figure; plot(h)
title('Impulse response')

enter image description here

If you are sure that the system is linear or you are only interested in the linear part, you should discard the first half of the convolution output. You may modify the this line and see what happens.

y = y + 0.5 * y.^2 + 0.25 * y.^3 + 0.1 * y.^4; % non-linear harmonics
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.