High speed PWM without linearity compromise at extreme duty cycles

Abstract: A circuit for reducing the amount of instability in a pulse width modualtion circuit by providing a minimum amount of overdrive after the crossover point between a ramp and a voltage threshold level (V₁,V N ), and a constant amount of discharge time (Control 1) between the end on one ramp and the beginning of the next. Also, a feedback loop (C H ,C h ,l₁,l₂) is provided to increase or decrease the slope to compensate for a decreasing or increasing amount of time between clock pulses, to maintain the duty cycle of the output when the clock frequency varies.

Description: The present invention relates to circuits for generating pulse width modulated (PWM) pulses. US-A4,847,695 discloses image processing apparatus in which minimum and maximum widths of a pulse-width modulated signal can be independently adjusted in accordance with predetermined data signals. The minimum and maximum widths are adjusted by variable resistors, one of which sets a maximum amplitude of an analog image signal, the other of which sets the bias level of a triangle wave signal. US-A-4,847,695 discloses that the triangle wave could be replaced by a saw-tooth wave. A PWM circuit normally compares a ramp waveshape having a constant slope against a variable threshold DC level to produce an output pulse that toggles at the point where the ramp level exceeds the threshold level. Also, as soon as the threshold level is reached, the ramp is discharged to zero. For long output pulses in relatively high speed circuits, the time for the ramp circuit to discharge is short, and any variability in the ramp slope or threshold voltage results in a variation in this discharge time, which in turn, affects the timing of the next cycle. Thus, the variability of the discharge time of the circuit results in significant PWM tolerances that make the circuit unusable in high speed precision applications such as the modulation of video data. Also, the ramp waveshape actually has to go a bit past the threshold level for the comparator to be able to react to it. This additional amount of drive is called "overdrive", and the comparator output delay is highly influenced by the amount of this overdrive at its input. Overdrive less than a certain minimum value results in more delay between the time of the crossover point and the fall time of the output pulse. In current designs this amount is not controlled, thereby resulting in inconsistent widths for the same threshold levels. However, due to the over-all period mandated by some design requirements (such as for switching power supply applications) the variabilities of the device delays are considered insignificant. However, an uncontrolled amount of overdrive can result in timing tolerances that are unacceptable, especially in applications where these uncertainties are significant as compared to the over-all period of the data being modulated. A third problem that a PWM circuit must deal with is that of a changing clock frequency. If the output pulse ON time is fixed and the clock frequency changes, the OFF time, and therefore the duty cycle, also changes. A fourth problem is that, if the ramp is discharged at the crossover point, the circuit can only be used to generate one output pulse train. It is an object of the present invention to provide a pulse generator which enables the above-described problems to be overcome but which is comparatively simple and uses comparatively few parts. The present invention provides a pulse width modulation pulse generator as defined in any one of the accompanying claims. A circuit constructed in accordance with the invention establishes a fixed ramp which is longer by a predetermined amount than the longest ramp required to produce the highest duty cycle, and a fixed discharge time. This gives the circuit a guaranteed minimum amount of overdrive and a constant discharge time which results in a more stable output. Also, since the ramp circuit is not discharged when the ramp exceeds the threshold, this circuit can produce any number of output pulse trains from one ramp. In addition, a feedback loop can be provided to vary the ramp slope to maintain a constant duty cycle output for a given threshold as the clock frequency varies. By way of example only, embodiments of the invention will be described with reference to the accompanying drawings, in which: Fig 1 is a timing diagram of a prior art PWM circuit; Fig 2 is a detailed timing diagram of a circuit in accordance with the invention; Fig 3 is a block diagram of the circuit; and Figs 4 and 5 are detailed schematics of another circuit. Figure 1 shows the waveshapes of short, medium and long output pulses of a typical PWM circuit. A digital to analog converter (DAC) or other equivalent means may be used to generate the variable threshold, V REF , which is compared against a ramp having a constant slope. The output pulse is ON until the two voltages meet, and OFF for the remainder of the cycle, during which time the circuit discharges. After the threshold point is reached, the ramp continues for a short and uncontrolled distance, not shown, defined here as "overdrive", and from this cross-over point to the beginning of the next cycle, the circuit will discharge and remain discharged. The amount of overdrive affects the circuit delay and uncertainty, the smaller the overdrive the greater the uncertainty. The variable amount of discharge time also contributes to the uncertainty. The worst case is the generation of the longest output waveshape which results in the shortest discharge time, the least amount of overdrive and the greatest instability. The result is that this approach is unusable for any application where the duration of the entire cycle is not significantly longer than the time it takes for the ramp to reach the threshold. The detailed waveshapes of a circuit in accordance with this invention are shown in Fig 2. From the top, the Clock period is measured from one positive going wave front to the next. Each Clock is used to create a short Control 1 signal that starts at clock time and lasts long enough to bring the ramp waveshape down to zero. Next, the ramp is shown with respect to three dc levels. V N is the highest reference level that can be produced, which results in the longest pulse output. V 1 is the lowest reference level that can be produced, which results in the shortest pulse output. V REF is a DC level within the circuit that controls the ramp rise time. PWM 1 is the short output pulse shape if V 1 is used. PWM N is the long output pulse shape if V N is used. The time between the longest and shortest pulse lengths is the active linear range of the circuit, and is shown as the cross hatched section of the next waveshape. The remaining waveshapes of Fig 2 will be discussed with relation to Figs 3, 4 and 5. Assuming that a ramp has been generated, two different sets of output pulses can be generated in parallel as shown in Fig 3. Digital values of PWM 1 and PWM N are applied to two DACs 63, the outputs being two voltage levels, V 1 and V N . These levels are compared to the ramp by comparators 41, 42, the outputs of which are the two digital output PWM signals, PWM 1 and PWM N. The ramp is generated in the remainder of the circuit. First the Clock is input to the Logic 50 which generates the fixed Control 1 signal. This signal is coupled to the current generator 57 which turns on for the duration of the positive portion of the Control 1 signal to discharge capacitor C H , through transistor 56 and diode 55, to zero at the beginning of each cycle. Control 1 also turns on current generator I 1 at the same time to discharge capacitor C h by a small predetermined amount (not to zero). At the end of the Control 1 signal, the residual positive charge on capacitor C h is coupled to the + input of operational amplifier 52, transistor 54 and resistor 53, all of which constitute a current generator which charges up capacitor C H to create a ramp. When this ramp is equal to the V REF level, the Logic block 51 will output a signal to current generator I 2 to charge up capacitor C h at a predetermined rate. This will continue until the start of the next clock pulse. The outcome of this entire process is that the slope of the ramp is a function of the clock frequency, the longer the clock period, the longer the ramp will become to maintain the output duty cycle in spite of a change in clock frequency. This can be explained as follows. The slope of the ramp is set by the dc level on capacitor C h . This capacitor is charged down by the I 1 current generator which is ON for a fixed amount of time, namely the duration of the Control 1 signal. On the other hand it is charged up by the amount of time that the ramp is above the V REF level, which can vary. If the ramp slope is too steep, the ramp will reach the V REF level too soon, the I 2 signal will become longer, more time will be spent by the I 2 current generator charging up capacitor C h , the general level of V Control will rise, and the amount of current through transistor 54 will decrease, charging up capacitor C H at a slower rate. By the same reasoning, if the slope is not steep enough, the charge current to capacitor C H will rise to increase it. Finally, if the clock frequency is not changing and the slope is already correct, the amount capacitor C h is charged by current generator I 2 will exactly equal the amount capacitor C h is discharged by current generator I 1 , and the ramp slope will remain constant. The final result is, as the clock period varies, the slope will also vary to keep the duty cycle constant in spite of a changing clock frequency. Figs 4 and 5 show an alternative embodiment which is shown as detailed schematics. This embodiment can use the same ramp to create two sets of output pulses. In Fig 4, two digital PWM values are applied to two DACs 63 in one package. The two analog output voltages, buffered through two amplifiers 61, 62 and the ramp signal V RAMP are applied to two comparators 41, 42 to generate the two output signals, PWM 1 and PWM N. Fig 5 shows the ramp generator. The clock is input to a delay line 43 and two comparators 44, 45 which generate two fixed pulse signals, equivalent to the Control 1 signal of Fig 4. One of these is applied to the I 1 current generator transistor 46 which bleeds a fixed amount of charge off capacitor C h . The other is applied through transistor 57 to the ramp capacitor C H , discharging it completely. At the end of the Control 1 pulse, the residual charge on capacitor C h is felt through buffer 49 and op amp 52, turning on transistor 54 to charge up the ramp capacitor C H . If the circuit is operating properly, this will ultimately result in a time when the ramp voltage exceeds the V REF voltage, at which time the comparator 51 will turn on the I 2 current generator transistor 47 which charges up capacitor C h to the same extent that I 1 current generator 46 discharged it at the beginning of the cycle. However, if the slope had been too shallow, the time that the ramp is above the V REF level would be short, the charge time would be shorter, and the charge remaining would be less that it was before. This would ultimately result in an increase in the ramp slope. Similarly, the closed loop would operate to decrease the slope if it was too steep. It can now be seen the circuits shown in Figs. 3 to 5 have several unique characteristics. First, there is at least a minimum amount of overdrive since the ramp does not stop until a minimum time after the maximum length pulse is output. Second, the discharge time, which is the duration of the Control 1 signal, is fixed. Third, a feedback loop is provided to guarantee that the duty cycle will be constant for a varying clock frequency. Fourth, because the ramp is not terminated at the time of the pulse output, several pulse widths can be produced in parallel, and finally, the circuits are small and simple and use comparatively few parts.

Claims: A pulse width modulation pulse generator comprising: a clock generator for generating a series of clock pulses at a clock frequency that changes, threshold means (63) for generating a threshold voltage of any value between a low voltage (V 1 ) and a high voltage (V N ) within a voltage range, ramp means for generating a ramp having a slope, amplitude and duration, said ramp amplitude exceeding said high voltage in said range by a predetermined amount, said ramp duration being an amount less than the time between clock pulses, and a comparator (41, 42) for producing an output of one state immediately before the crossover of said ramp and threshold level, and for producing an output of the other state for the remainder of the time between clock pulses, the ramp means being responsive to the time between clock pulses for increasing or decreasing the slope of said ramp as the time between clock pulses decreases or increases, respectively, the ramp means increasing or decreasing the slope of said ramp to provide a constant pulse width modulation output pulse duty cycle despite change in the clock frequency. A pulse generator as claimed in Claim 1 in which the ramp means comprises: ramp charge storage means (C H ) for storing charge to generate the ramp; slope charge storage means (C h ) for storing charge to set the slope of the ramp; and control means (50-57, I 1 , I 2 ) for controlling the charging and discharging of the ramp charge storage means (C H ) and the slope charge storage means(C h ); the control means (50-57, I 1 , I 2 ), during a discharge duration in each clock period, discharging the ramp charge storage means (C H ) completely and discharging the slope charge storage means (C h ) to leave a residual charge on the slope charge storage means (C h ); the control means (50-57, I 1 , I 2 ), after the discharge duration, charging the ramp charge storage means (C H ) at a rate that is slower or faster as the residual charge on the slope charge storage means (C h ) is greater or less, respectively; the control means (50-57, I 1 , I 2 ), after the ramp reaches a reference voltage level (V REF ; 5/2 V REF ), charging the slope charge storage means (C h ) for a time that depends on the clock period. A pulse generator as claimed in claim 2 in which the control means (50-57, I 1 , I 2 ), during the discharge duration, discharges the slope charge storage means (C h ) for a fixed amount of time. A pulse generator as claimed in claim 2 or claim 3 in which the control means (50-57, I 1 , I 2 ) charges the slope charge storage means (C h ) from when the ramp reaches the reference voltage level (V REF ; 5/2 V REF ) until the start of the next clock pulse and in which the discharge duration of the next clock period begins in response to the start of the next clock pulse. A pulse generator as claimed in any of claims 2 to 4 in which, when the clock period is not changing, the amount by which the control means (50-57, I 1 , I 2 ) discharges the slope charge storage means (C h ) during the discharge duration is equal to the amount by which the control means (50-57, I 1 , I 2 ) charges the slope charge storage means (C h ) after the ramp reaches the reference voltage level (V REF ; 5/2 V REF ). A pulse generator as claimed in any of claims 2 to 5 in which the control means (50-57, I 1 , I 2 ) comprises: logic means (51) for providing a signal when the ramp reaches the reference voltage level (V REF ; 5/2 V REF ) to start charging of the slope charge storage means (C h ); and charging means (I 2 ; 47) for responding to the signal from the logic means (51) by charging the slope charge storage means (C h ).

Inventors: GIRMAY GIRMAY K, GIRMAY, GIRMAY K.
Applicants: XEROX CORP, XEROX CORPORATION
Application year: 1994
Main classification: H03K7
IPC codes: H03K7