Generalized Galerkin Approach For The Study Of Nonlinear Thermoacoustic Instabilities