To provide a method and a circuit for compensating a pulse width modulation(PWM) signal.
The circuit is provided with a sigma-delta modulator 11 for receiving an N-bit digital signal; a pulse width modulator 12 which is connected with the output of the modulator 11, receives the N-bit digital signal, and outputs a pulse width modulation(PWM) waveform signal based on the digital signal; a PWM waveform signal correcting circuit 13 which is connected with the output of the modulator 12, and outputs the corrected PWM waveform signal; a D-class switching stage 14 which is connected with a correction circuit output and driven by the corrected PWM waveform signal, and sends out a signal output for driving a load; and an error measuring block 16 which as a first input connected with the output of the switching stage 14, a second input connected with the output of the pulse width modulator 12 and an output connected with a correction input of the correcting circuit 13, obtains difference between the first and the second input signals, and sends out a digital correction signal showing codes of the difference to the output.