I have a set of measurement which I want to model with 2nd-order difference equations (first order eqs don't model well enough).

The equation is

$$y[n] = \alpha_1 y[n-1] + \alpha_2 y[n-2] + \beta_0 x[n] + \beta_1 x[n-1]$$

I want a generic formula for the impulse response.

I did a derivation, but being a total DSP beginner, I'm not sure whether it's correct or I'm missing some bits:

The transfer function is:

$$\begin{align} H(z) &= \displaystyle \frac{Y(z)}{X(z)} \\ &= \frac{\beta_0 + \beta_1 z^{-1}}{1 - \alpha_1 z^{-1} - \alpha_2 z^{-2}} \\ &= \frac{\beta_0 z^2 + \beta_1 z}{z^2-\alpha_1 z -\alpha_2 } \\ &= \frac{A_1 \, z}{z-p_1} + \frac{A_2 \, z}{z-p_2} \\ &= A_1\frac{1}{1-p_1 z^{-1}} + A_2\frac{1}{1-p_2 z^{-1}} \\ \end{align}$$

where $p_{1,2}$ are the poles and $A_1$ and $A_2$ can be calculated using partial fraction expansion.

Therefore the impulse response is

$h[n] = \big(A_1 p_1^n + A_2 p_2^n \big) u[n], $

where $u[n]$ is the discrete step function.

Is this ok?

  • $\begingroup$ Hi! Your $H(z)$ shall better use powers of $z^{-1}$ but that's a minor issue. The problem is how do you determine those coefficients $\alpha$ and $\beta$... $\endgroup$ – Fat32 Oct 2 '18 at 9:24
  • $\begingroup$ @Fat32 I used least squares: minimizing the distance between the measured curve and the one given by the model with parameters $\alpha_1, \alpha_2, \beta_1, \beta_2, y_0$ and $y_1$. Is it there a more principled approach? $\endgroup$ – doburupegu Oct 2 '18 at 9:30
  • $\begingroup$ there are many approaches but a least squares approach is very common. So what's your question ? (is this ok?) $\endgroup$ – Fat32 Oct 2 '18 at 9:36
  • $\begingroup$ Yes, I'd like to know wheter the impulse response is ok. $\endgroup$ – doburupegu Oct 2 '18 at 9:43
  • 1
    $\begingroup$ This an ok approach if you have a pair of real poles, but typically you end up with a complex conjugate pair, in which case. both partial impulse responses would be complex as well which is awkward. It also doesn't work for a double real pole (i.e. r1 = r2) $\endgroup$ – Hilmar Oct 2 '18 at 11:24

Your procedure is correct. But, you need to consider two things:

(i) Pole/zero locations.

(ii) Whether the system is causal or non-causal.

Your final answer is OK provided you consider that all the zeros and poles are distinct and the underlying LTI system is causal.

You will get two more solutions if the LTI system is considered non-causal, even if you assume to have distinct zeros and poles.

Hope this helps.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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