In synchronous machines, electromechanical swinging can be damped by parametric control of the excitation current. This is possible only in case the excitation time constant is much smaller than the mechanical constant of the machine. The method described in this paper is effective for damping oscillations caused by oscillations in the grid frequency, grid voltage, and mechanical torque fluctuations. The method is based on the Lyapunov stability theory and demonstrated on a real synchronous machine. This machine operates as a noninterruptible backup power system. The original power fluctuations were up to 50% of the nominal power of the machine. With the described control, a sevenfold increase in the damping of fluctuations caused by grid frequency variations has been achieved.