PWM Output and Current Accuracy
OFFSET
The PWM output is quantized to 1024 levels. Therefore, the
duty cycle can change only in increments of 1/1024.
There is a one-half (0.5) quantization cycle delay in the output
of the PWM circuitry. That is to say that instead of a duty cycle
of N/1024, the duty cycle actually is (N+½)/1024.
The quantization error can be corrected for if a more precise
result is desired. To correct for this error, simply subtract
1/2048 from the measured duty cycle.
The extra half cycle delay will show up as a DC offset of ½ bit
if it is not corrected for. This is approximately 1.1 mA for 1
Amp parts, and 11 mA for 7 Amp parts.
JITTER
In addition to quantization, the duty cycle will contain some
jitter. The jitter is quite small (for example, the standard devi-
ation of jitter is only 0.1% for the LM3812/13-1.0). Statistically
the jitter can cause an error in a current sample. Because the
jitter is a random variable, the mean and standard deviation
are used. The mean, or average value, of the jitter is zero.
The standard deviation (0.1%) can be used to define the peak
error caused from jitter.
The “crest factor” has often been used to define the maximum
error caused by jitter. The crest factor defines a limit within
which 99.7% of the samples fall. The crest factor is defined
as ±0.3% error in the duty cycle.
Since the jitter is a random variable, averaging multiple out-
puts will reduce the effective jitter. Obeying statistical laws,
the jitter is reduced by the square root of the number of read-
ings that are averaged. For example, if four readings of the
duty cycle are averaged, the resulting jitter (and crest factor)
are reduced by a factor of two.
JITTER AND NOISE
Jitter in the PWM output appears as noise in the current mea-
surement. The Electrical Characteristics show noise mea-
sured in current RMS (root mean square). Arbitrarily one
could specify PWM jitter, as opposed to noise. In either case
the effect results in a random error in an individual current
measurement.
Noise, just like jitter, can be reduced by averaging many read-
ings. The RMS value of the noise corresponds to one stan-
dard deviation. The “crest factor” can be calculated in terms
of current, and is equal to ±3 sigma (RMS value of the noise).
Noise will also be reduced by averaging multiple readings,
and follows the statistical laws of a random variable.
ACCURACY OF 7A VERSIONS
The graph of Figure 7 shows two possible responses to a 7A
current step. The flat response shows basically a 7A level with
some noise. This is what is possible with a good thick trace
and a good thermal connection to the IC on the sense pins.
The second trace that asymptotically approaches a higher
value shows what can happen under extremely poor thermal
conditions. Here a very small wire connects the IC to the cur-
rent source. The very small wire does not allow heat in the
sense resistor to dissipate. Hence, as the sense resistor heats
up, a temperature difference between the sense element and
the die gets larger, and an error develops. Eventually the
temperature difference reaches steady state, which accounts
for the under-damped exponential response.
10012223
FIGURE 7. Transient Response to 7 Amp Step Current
ACCURACY VERSUS NOISE
The graph shown in Figure 8 illustrates the typical response
of ±1 Ampere current gauges. In this graph, the horizontal
axis indicates time, and the vertical axis indicates measured
current (the PWM duty cycle has been converted to current).
The graph was generated for an actual current of 500 mA.
The difference between successive readings manifests itself
as jitter in the PWM output or noise in the current measure-
ment (when duty cycle of the PWM output is converted to
current).
The accuracy of the measurement depends on the noise in
the current waveform. The accuracy can be improved by av-
eraging several outputs. Although there is variation in suc-
cessive readings, a very accurate measurement can be
obtained by averaging the readings. For example, on aver-
aging the readings shown in this example, the average cur-
rent measurement is 502.3 mA (Figure 8). This value is very
close to the actual value of 500 mA. Moreover, the accuracy
depends on the number of readings that are averaged.
10012226
FIGURE 8. Typical Response of LM3812-1.0/LM3813-1.0
www.national.com 12
100122 Version 13 Revision 3 Print Date/Time: 2011/09/22 15:32:17
LM3812/LM3813