Abstract: Early detection of the threat of a cascading failure is encouraged to use the immune information system, the main subsystem of the which is a virtual stability analyzer. We propose to implement the virtual analyzer by usage of the linearized models of energy systems and apparatus Lyapunov direct method, based on the study of matrix Lyapunov equation solutions, called gramians. The functional of stability loss risk is defined as the square of H2 - norm of the system matrix transfer function, which is proportional to the energy of the system. We propose to use the functional of a risk assessment through thespectral decomposition of energy participation factors for the evaluating of the energy accumulated in dominant eigenvalues of the system. For sub-gramians method the energy participation factors are defined as a partion derivative of the functional regarding to the chosen parameter. In comparison with the method of a modal analysis the proposed approach allows to evaluate the impact of synergies between weak-stable eigenvalues and their combinations to the system stability loss risk, and also to detect the potential source of stability loss.