
Generation of pulse width modulation requires three functions:
Sample and hold circuit
Precision ramp voltage generator
Comparator
Operation:
The input signal, x(t), is a time varying signal with known maximum and minimum amplitude and frequency bandwidth. On input to the PWM routine, x(t) is passed through a S/H circuit to produce a piecewise linear x(t) approximation designated as x(k). A ramp generator output producing a precision ramp voltage which has a peak-to-peak amplitude slightly larger than the maximum amplitude range of the input signal is added to x(k). The peak-to-peak amplitude is controlled by the PEAK RAMP AMPLITUDE GAIN which should be set to 1.1 times the maximum amplitude range of the input signal. This sum is then compared with a fixed reference value (the COMPARATOR REFERENCE LEVEL). When the sum is greater than the comparator reference level, the output PWM pulse is HIGH (1), when the sum is less than the comparator reference level, the output PWM pulse is LOW (0).
|