# Characterizing an unknown LTI system

What are the best approaches to characterize an unknown discrete time LTI system? I believe one of the approaches is to input a known input and measure the output to find a transfer function. What are some more approaches to better characterize this black box system?

• Giving an impulse input to your black box will give the impulse response of the system which can be used to calculate the output for an input x[n] – DSP Novice Apr 6 '20 at 6:12
• This is super broad. It's 90% of what the scientific field system identification is about. I know a library with literally multiple 100 kg of books on how to identify systems. You need to narrow things down, with a model of what it might be, and restrictions on what you can and can't do. – Marcus Müller Apr 6 '20 at 7:13

One option from the realms of adaptive filtering is the Least Mean Squares (LMS) filter depicted below:

The idea is you take the output of the unknown system, compare it with the output of your adaptive filter and minimize the difference by tweaking the filter coefficients, using a LMS algorithm. When the error $$e(n)$$ is zero (or more often, lower than a threshold you define) you found your unknown system's response.

There are countless resources where you can learn about LMS. In this case, given

the input vector: $$X(i) = [x(i) \space x(i-1) \ldots x(i-N+1)]^T$$ and the coefficients vector: $$W = [w_0 \space w_1 \ldots w_{N-1}]^T$$

The output of the adaptive filter is: $$\hat{y}(i)=X(i)^TW$$

Now define the cost function to be: $$e(i)^2 = \big(d(n)-\hat{y}(i)\big)^2$$ It can be shown that the gradient of the cost function with respect to the coefficients is:$$\hat{\nabla}(i) = \frac{\partial e(i)^2}{\partial W} = -2e(i)X(i)$$ Since the gradient points towards the maximum of the cost function you update the coefficients in the opposite direction: $$\hat{W}(i+1) = \hat{W}(i)-\mu\hat{\nabla}(i) = \hat{W}(i)+2\mu e(i)X(i)$$ where $$\mu$$ controls the adaptation speed. I've ignored a lot of details but this is the idea.

Note that the filter will produce a frequency response that is adapted to you input signal $$x(n)$$. It's not guaranteed for any other frequency. For example, in the response depicted below, my $$x(n)$$ is composed of 3 tones. You can see only at those particular frequencies does the filter (N=3,6,10) match the true response (H1(z)). So consider feeding it a wideband signal like white noise.

I think the best possible way to get the transfer function of a LTI blackbox would be giving complex exponential as input. Because complex exponential $$Ae^{j\omega_0}$$ are eigen functions of LTI systems. So output will be $$Ae^{j\omega_0} \rightarrow H(e^{j\omega_0})Ae^{j\omega_0}.$$
If you have a reasonable idea of the LTI Blackbox, can restrict your $$\omega_0$$, to a range of frequencies. The magnitude response of output will be $$M(\omega_0) = |H(e^{j\omega_0})|A$$ and the phase response will be $$\angle(\omega_0) = \angle(H(e^{j\omega_0})).$$ If you have magnitude and phase response of output, you can easily remove the known input magnitude/phase to get the Black-box system's characteristics.