Given:
V = L di/dt
I(t) = I(t0) + 1/L × ∫ V(t) dt
Rearrange:
(L/V) × (I(t) - I(t0)) = dt
Using the formula:
PWM on-time = (L/V) × 2 × (IDESIRED - ISTART)
For most applications, the input voltage can't change very quickly-because of large input-filter capacitors. Therefore, you needn't calculate the time-consuming divide operation (L/V) for every execution of the control algorithm.
To reduce the computational workload, you can share this calculation among a number of PWM cycles. By treating the (L/V) term as a quasi-constant, the remainder of the duty-cycle calculation becomes trivial. By not using an analog comparator for PWM termination, the analog comparator becomes available for detecting unexpected severe load-current transients or output overvoltage conditions.
It's important to select the optimum method for digital current control in a specific application. There are several methods for implementing it.
METHOD 1: PEAK DIGITAL CURRENT CONTROL
This method calculates the voltage across the inductor, measures the starting
current, and calculates the desired inductor current based on the output-voltage
error.
You then calculate the duty cycle using:
Duty cycle = (L/V) × 2 × (IDESIRED - ISTART)
METHOD 2: AVERAGE DIGITAL CURRENT CONTROL
There are several methods to measure the average inductor current. One involves
measuring the current midpoints of the PWM on-time or off-time. A second method
is to measure the peak and valley currents at the PWM transitions, sum the values
together, and then divide by two. Directly measuring the average current doesn't
require a low-pass filter or integrator as it would with an analog controller,
which improves transient response.
The control software needn't calculate PWM based on the inductance and applied
voltages. Instead, it can use a gain coefficient to scale the difference between
the average measured current and the desired current. That product becomes the
PWM duty-cycle value. Choose the gain coefficient value to provide good response
without oscillation.
METHOD 3: VARIABLE-FREQUENCY DIGITAL CURRENT CONTROL
For most DSCs, software can control the PWM period as well as the duty cycle.
The software can measure the inductor current at any point—at the start
or end of the PWM pulse or at a midpoint to detect minimum, peak, or average
current values.
An advantage of variable-frequency techniques is that they reduce switching losses with load-current reductions, which helps to improve power-conversion efficiency. The disadvantage of variable-frequency, current-loop-control schemes is that the operating frequency varies, which can make electromagnetic-interference control more difficult in larger systems because it makes it harder to avoid critical system frequencies.
METHOD 4: HYSTERETIC DIGITAL CURRENT CONTROL
It's possible to implement hysteretic current-mode control without using analog
comparators. The software on the DSC can control both the PWM duty cycle and
the period. It also can change these values during PWM operation. The PWM off-time
represents the period minus the PWM on-time.