This paper proposes a wavelet-based power system stabilizer by using both the scaling coefficient energy and the wavelet coefficient energy with border distortions of a one-cycle sliding window. The boundary scaling coefficient energy is used for real-time extraction and compensation of electromechanical oscillations in the synchronous generator, whereas the boundary wavelet coefficient energy is used for the real-time detection of electrical oscillations and for tripping the wavelet-based power system stabilizer at the fault inception time. The performance of the proposed wavelet-based power system stabilizer was assessed in an experimental power system laboratory setup and compared with a conventional power system stabilizer.Index Terms-Wavelet transform, synchronous generator, power system stabilizer, electromechanical oscillations, electrical oscillations.