MATLAB: Estimating impulse response function from input and output signal

impulse-response functioninverse filterSystem Identification Toolbox

I would like to determine an h_t from x (input) and y (output), so that conv(x, h_t, 'same') should be very close to y. deconv doesn't work. Sampling frequency was 100 Hz, signal length is 9000. The two signals are real, measured one, and it is reasonable to assume that the system linking them is linear, LTI. I performed the calculation on dyadic length (4096) to improve FFT. I tried out several equations, for example: h_t = ifft(fft(y)./fft(x)); h_t = tfestimate(x, y) * conj(tfestimate(x, y); I was suggested to consider Nyquist-frequency and noise content of the signal, so maybe I should try it on a windowed signal. Or I found a code on the internet performing linear phase inverse filtering, but I am not sure how to define gamma and d. The latter parameter takes care for the time delay that the linear phase inverse filter causes in the time domain. So how should I define, and all in all, what is the best solution to the problem?<http://cnx.org/content/m13144/latest/inverseFilter.m>

Best Answer

I am not sure this would work for you (it seems you might be trying to write the function yourself), but you could easily do this with System Identification Toolbox.
There is a function impulseest for non-parametric impulse response estimation. Here is detailed doc reference.
Alternatively, you could estimate a parametric model, a transfer function, for example, and get its impulse response.
HTH.
Arkadiy
Related Question