An adaptive repetitive control scheme is proposed and applied to the control of a pulsewidth-modulated (PWM) inverter used in a high-performance ac power supply. The proposed control scheme can adaptively eliminate periodic distortions caused by unknown periodic load disturbances in an ac power supply. The proposed adaptive repetitive controller consists of a voltage regulator using state feedback control, a repetitive controller with tuning parameters, and an adaptive controller with a recursive least-squares estimator (LSE). This adaptive repetitive controller designed for ac-voltage regulation has been realized using a single-chip digital signal processor (DSP) TMS320C14 from Texas Instruments. Experimental verification has been carried out on a 2-kVA PWM inverter. Simulation and experimental results show that the DSP-based adaptive repetitive controller can achieve both good dynamic response and low total harmonic distortion (THD) under large-load disturbances and uncertainties.