A generalized procedure to obtain first integrals for nonconservative dynamics systems: application to power systems | IEEE Conference Publication | IEEE Xplore