# Extract Impulse Response of a System From its Input/Output Waveform

I am a new engineer for signal processing field.

I want to extract the system impulse response from input and output of the system, i.e. so-called system identification, more specfically, for impulse response. E.g. I could input waveform to system as following:

And I also got the output waveform from the system as following:

Please note both waveform are four periods, but there is unknown delay existing in between.

How could I extract the impulse response of system from those two?

Update in 2020/04/27

I followed the comments from Marcus, and used following code, but the result is obviously not correct, not even close.

x = load("C:\Users\Desktop\bit_wf.txt")
x = x(:,2)
plot(x)

% convolution between bit_waveform and impluse response
% wf = conv(bit_wf, imp_rsp);
y = sbr(:,2)
plot(y)

ryx = xcorr(y,x)
plot(ryx)

rxx = xcorr(x,x)
plot(rxx)

imp = deconv(ryx, rxx)

plot(imp)


If I deconv(ryx, rxx), I only get a constant number. I understood the theory is there, but my problem is how to implement it correctly. Thanks, hope someone could help me there, really appreciate.

• Does this answer your question? How to identify impulse response of noisy system? Commented Apr 26, 2020 at 14:32
• Hi, Marcus, thanks for your information, but I think that one didn't answer my question, maybe I was too dumb to understand that, but looks like only when the x[n] is white noise, the cross-correlation is the impulse response, but that is not my case here. Commented Apr 26, 2020 at 14:58
• The answer does address the special case of white noise, but your signal is still covered by the math up to that point! You need to calculate the autorcorrelation function of your transmit signal; the "peakiness" of that defines your ability to estimate the channel. Commented Apr 26, 2020 at 15:50
• Hi, Marcus, thanks for your information, I understood the math in behind is same, but now what I got is a engineering problem that I don't know how to implement that by matlab, I tried lot of things, but all doesn't look right, could you please kindly help me with more details ? Really appreciate. Commented Apr 26, 2020 at 16:25
• E.g. More specific, yes, I could get the cross-correlation between input and output, and also I could calculate the autocorrelation of input, then what the next step to extract the impulse response ? Do I need to handle the unknown offset between input/output waveform before doing cross-correlation ? Those problems hold me back to sovle the impulse response from that high level description, thanks. Commented Apr 26, 2020 at 16:35