Aug 30, 2017

When can adding noise increase signal resolution?

Did you know that there are cases where you can add noise to your signal to get more resolution? It is referred to as dithering and works well, provided a few conditions are true in your system. (This explanation assumes you understand averaging/filtering to smooth data and what an analog-to-digital converter does.)
  • If there is time to average multiple samples
  • If the signal is quiet relative to ADC resolution
  • If there is a way to generate and combine a noise source with signal before the ADC sampling.
Here's an example.
Your system consists of a temperature sensor providing a voltage output proportional to temperature in degrees. Its output is connected to the microcontroller's ADC input. Actual voltage for eight successive measurements is
   22.4  22.4  22.5  22.4  22.3  22.4  22.4  22.4
The ADC is 8 bits, accurate to << 1 LSB, and has a 2.56V reference. So each bit = 10mV. The temperature is fairly steady moving slowly in the lab, hovering at 22.4C. The voltage is 224mV. What does the ADC measure? It would truncate to its resolution and read:
   22    22    22    22    22    22    22    22 
Clearly averaging would not improve the value because the actual values are always between 1 LSB (either 22 or 23 in this case).

Now suppose I add a random value of  one bit (1 LSB)
   22.4  22.4  22.5  22.4  22.3  22.4  22.4  22.4    
+   0.0   1.0   0.0   0.0   1.0   0.0   1.0   0.0
----------------------------------------------------- 
   22.4  23.4  22.5  22.4  23.3  22.4  23.4  22.4    
The ADC would read these (again truncating) as:
   22    23    22    22    22    23    23    23     avg = 22.5
So eight measurements will have some 22 and some 23, with the ratio close to the fractional value. In this example I only used values of 0 or 1, but a wider range of values between and shaping the noise distribution can further improve the estimate.
The smoothed value (purple) of the noisy samples (green) is closer to the actual value (blue).

In practice, any random or pseudorandom source will work. 4x oversampling is enough to get a benefit, and 8 or 10 is quite good. If the signal is noisy more than 1-2 LSB (as it usually is), then there is no benefit to adding noise. Just average as you would normally to get better effective resolution.

Here's another description at electronics.stackexchange.com.

No comments: