Patent ID: 7649935

Claim:
A device for compensating a digital signal for distortion, the device comprising: an estimator configured to receive a first signal, the estimator estimating an initial amplitude and an initial frequency of the first signal; a compensator to receive the first signal from the estimator; the compensator determining a harmonic distortion component of the first signal from the initial amplitude and the initial frequency, the compensator to generate a compensated signal from the harmonic distortion component and the first signal; logic coupled to the compensator for determining the harmonic distortion component of the first signal from the initial frequency and the initial amplitude; at least one comparator to receive an output of a switching power stage, the at least one comparator generating a comparator output, the comparator output at least partially determined by the output of the switching power stage and a reference voltage; at least one digital counter configured to receive the comparator output, the at least one digital counter configured to determine a net pulse signal; a second circuit in communication with the at least one digital counter, the second circuit to compare a modulator input signal to the net pulse signal to generate an error signal; and a circuit operably coupled to the logic, the circuit to modify the harmonic distortion component at least partially based on the error signal.