Impulse response of a second order LTI 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) &amp;= \displaystyle \frac{Y(z)}{X(z)} \\
 &amp;= \frac{\beta_0 + \beta_1 z^{-1}}{1 - \alpha_1 z^{-1} - \alpha_2 z^{-2}} \\
 &amp;= \frac{\beta_0 z^2 + \beta_1 z}{z^2-\alpha_1 z -\alpha_2 } \\
 &amp;= \frac{A_1 \, z}{z-p_1} + \frac{A_2 \, z}{z-p_2} \\
 &amp;= 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?
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.