SPRAD55 March   2023 TMS320F2800132 , TMS320F2800133 , TMS320F2800135 , TMS320F2800137 , TMS320F2800152-Q1 , TMS320F2800153-Q1 , TMS320F2800154-Q1 , TMS320F2800155 , TMS320F2800155-Q1 , TMS320F2800156-Q1 , TMS320F2800157 , TMS320F2800157-Q1 , TMS320F280021 , TMS320F280021-Q1 , TMS320F280023 , TMS320F280023-Q1 , TMS320F280023C , TMS320F280025 , TMS320F280025-Q1 , TMS320F280025C , TMS320F280025C-Q1 , TMS320F280033 , TMS320F280034 , TMS320F280034-Q1 , TMS320F280036-Q1 , TMS320F280036C-Q1 , TMS320F280037 , TMS320F280037-Q1 , TMS320F280037C , TMS320F280037C-Q1 , TMS320F280038-Q1 , TMS320F280038C-Q1 , TMS320F280039 , TMS320F280039-Q1 , TMS320F280039C , TMS320F280039C-Q1

 

  1.   Abstract
  2.   Trademarks
  3. 1Introduction
  4. 2Theory
  5. 3Hardware
  6. 4Software
  7. 5Results
  8. 6Summary
  9. 7References

Theory

The goal of software oversampling is to increase ENOB by reducing the noise observed in the signal. Software oversampling performs multiple conversions on the same input signal and accumulates the digital values to attain an ENOB higher than the ADC's inherent ENOB. The result's precision increases, depending on how much oversampling takes place. This accuracy can be demonstrated by measuring a varying input signal to determine the signal's major frequency. The amount of oversampling possible is theoretically limited to the data width of the variable used to store the conversion result. For instance, a 16-bit result word limits you to 16X oversampling on a 12-bit ADC, with a maximum accumulated value of 65535.

In addition to data size constraints, the amount of oversampling is limited by the relationship between the throughput of the ADC and the fundamental frequency of the input signal, as the number of oversampled conversions per second cannot fall below the Nyquist rate. This also means that the oversampling factor is limited by the control loop frequency needed to achieve the system performance requirements.

The size limit occurs because oversampling accumulates the results, which invariably requires more memory than the original result because there can be an overflow from the addition. The accumulated values are not averaged since this effectively removes the additional precision that is obtained. As such, averaging maintains the size of the stored result and the reduced noise, but this does not affect the observed ENOB of the result to any significant degree.

Oversampling with accumulation improves noise reduction in the final value obtained, but the ENOB does not increase as much if there is significant noise affecting the signal. There are several board layout guidelines that, if followed, can help to minimize significant sources of noise in analog signals for ADC conversion. These include:

  • Verifying no signal crossing between analog and digital signals
  • Having separate layers for analog and digital signals
  • Having a dedicated return ground for analog signals that are not shared with digital
  • Isolating the analog region from the digital region

For more details about good hardware design for C2000 ADCs, see Section 3.

A Fast Fourier Transform (FFT) is used in this document to process the oversampled ADC results stored in memory. The FFT plot gives us a view of the signal noise and harmonic distortions that affect the observed major frequency, and as such diminish the ENOB. These values are quantified from the FFT data and used to compute an approximate ENOB value. For the purpose of testing, the FFT was computed on ADC data exported from RAM. Before the ADC results have an FFT performed on them, windowing is required on data stored in memory to avoid creating artifacts in the signal. This is because the start and end points do not always line up to form a complete waveform. The windowing function used in this application note is the 7-term Blackman-Harris function. The FPU DSP library also has the capability of performing fast Fourier transforms on data in stored memory using windowing. The different windowing functions available can be viewed in the FFT module within SysConfig, or within the directory C2000Ware_X_XX_XX_XX\libraries\dsp\FPU\c28\include\fpu32 as files labeled fpu_fft_<name>.h.

The magnitude of noise present in a signal can be expressed using the Signal-to-Noise Ratio (SNR), and the harmonics observed in the signal can be expressed using Total Harmonic Distortion (THD). The noise and harmonics present in the sampled signal reduce the ENOB of the result. Table 2-1 shows the theoretical ENOB increase and SNR improvement possible with various oversampling factors. For more data on the theory behind the numbers in this table, see General Oversampling of MSP ADCs for Higher Resolution.

Table 2-1 Relationship Between Oversampling Factor, SNR, and Extra Bits of Resolution
Oversampling Factor SNR Improvement (dB) Extra Bit of Resolution
2 3 0.5
4 6 1
8 9 1.5
16 12 2
32 16 2.5
64 18 3
128 21 3.5
256 24 4
512 27 4.5
1024 30 5
2048 33 5.5
4096 36 6

In the example shown in this application note, each oversampling factor from baseline to 16X is tested using a 10 kHz sine wave input signal. An FFT plot is used to display the results here because the plot visualizes the signal to noise ratio, harmonic distortion, and accuracy of the sampling. The noise frequencies present in the signal can be observed as minor peaks, which are far below the peak of the DC and signal frequency. Excluding the peak at 0, which is the DC component of the signal, the highest peak is the closest to the input signal's frequency. The more diminished these are relative to the fundamental signal amplitude, the higher the resulting ENOB.