# How to get the impulse response of from input and output data?

We know that

$$x(t) \star h(t) = y(t)$$

and

$$X(\omega)H(\omega) = Y(\omega).$$

But in real world, $$X(\omega)$$ and $$H(\omega)$$ are DFTs. So to prevent circular convolution, we do zero padding before FFT.

When I want to get $$H(\omega)$$ from $$Y(\omega)/X(\omega)$$, I think circular convolution problem will be occurred.

I want to get $$h(t)$$ in time domain.

1. How can I get $$H(\omega)$$ in frequency domain while preventing circular convolution / aliasing?

2. What means $$Y(\omega)/X(\omega)$$ in time domain and How can I get $$h(t)$$ in time domain?

• The DTFT, $H(\omega)$ is not quite the same as the DFT $H[k]$, but there is a relationship. Commented Oct 30, 2022 at 6:51
• So how can i get H(w)?
– gg h
Commented Oct 30, 2022 at 7:23
• Why do you want $H(\omega)$? What do you plan to do with it? Commented Oct 30, 2022 at 16:37

You can always perform the operation

$$H[k] = \frac{Y[k]}{X[k]}$$

provided $$|X[k]|$$ is sufficiently large (i.e. larger than the noise floor of your measurement).

If the parameters are chosen so that the sampling theorem is met in BOTH DOMAINS, then you can indeed assume that

$$h_c(nT) = h[n]\\ H_c(2\pi k F_s/N) = H[k]$$

where $$T = 1/F_s$$ is the sampling period, $$N$$ is the FFT length and the subscript $$_c$$ denotes the continuous-time signals. In other words, the discrete values accurately sample the continuous domain functions.

In order for the sampling theorem to hold, the sample rate must be chosen higher than twice the highest frequency in $$H_c(\omega)$$ and the FFT length must be larger than the length of the impulse response $$h_c(t)$$.

Here is where the problem starts: a signal that's finite in one domain MUST be infinite in the other. That means that you are ALWAYS going to have some amount aliasing. So in practice you need to choose your analysis parameters so that you minimize the impact of that aliasing for your specific application.

You have to do the deconvolution to get $$h(t)$$. If you want to do it in python, here is the link to the question asked by me on how to deconvolve a signal in python, you may find it useful.

• Your answer, although it may be correct, lacks useful information such as what is deconvolution, how to perform it etc. It would be extremely beneficial to provide at least a brief explanation of the solution at the other end of the link you provided. In this way if the link goes dead the answer will still be available and furthermore, one that searches for the answer on DSP SE won't have to reach any external links (which may lead to spam or any other malware-prone place). So I suggest you edit your answer to at least incorporate a brief explanation on the solution and possibly how this can b Commented Oct 30, 2022 at 20:43