See the linearization method described in Christiano, 'Solving Dynamic Equilibrium Models by a Method of Undetermined Coefficients' (manuscript, computer code). Some lecture notes.

The method is an adaptation of a method based on the approach advocated by Chris Sims, which uses the QZ decomposition.