- 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
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:
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.
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:
Post a Comment