How to Improve ADC Accuracy of DSP

Publisher:剑戟辉煌Latest update time:2011-09-16 Keywords:ADC Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

introduction

TI's C2000 series DSP is widely used in industrial automation, motor control, and industrial production with its excellent performance and rich on-chip peripherals. TMS320F2812 is one of the outstanding performance in the C2000 series. F2812 integrates a 12-bit 16-channel digital/analog converter on the chip, and the theoretical accuracy can reach more than 0.1%. However, due to the existence of gain error (<5%) and offset error (<2%), the accuracy can only be around 5%, so the ADC must be calibrated.

The traditional method for ADC calibration is to input known standard voltages into two channels, determine the AD conversion curve based on the principle of two points determining a straight line, and use this to calibrate the conversion value. However, due to the influence of accidental factors in the calibration process, the accuracy of this calibration method can only reach about 3%. In response to this, a calibration method using the least squares method and linear regression is proposed. By analyzing and calculating multiple measurement points, the best fitting curve is found to minimize the overall mean square error.

The least square method is a data processing method proposed by Gauss in 1809 and widely used in multidisciplinary fields. The use of the least square method to estimate unknown parameters can effectively eliminate the influence of gross errors and systematic errors in measurement. Regression analysis was first proposed by British statistician Galton in 18*. Univariate linear regression is one of the statistical analysis methods that uses regression analysis in mathematical statistics to determine the quantitative relationship between two or more variables that are interdependent. It is widely used. Generally speaking, the equation of linear regression can be obtained by the least square method, and the straight line for y=bx+a can be calculated.

1. Correction principle and implementation scheme

The input and output of the ADC module of DSP are linear. Ideally, the input-output equation should be y=x. But in fact, the ADC module has gain error and offset error. The gain error is the deviation between the actual curve slope and the ideal curve slope, and the offset error is the deviation between the actual output value and the ideal output value (0 V) when the input is 0 V. The analog input voltage of F2812 ADC is 0~3 V, and the output is 0~4095. The corresponding relationship between analog input and digital output is: digital output value = 4095×(analog input value-reference voltage value)/3.0. The input/output characteristic curve of ADC module is shown in Figure 1.

Figure 1 ADC module input/output characteristic curve

The ADC of F2812 has 16 input channels. Since the error between channels is within ±0.2%, 6 channels can be selected as the calibration input terminals, and 6 unequal standard DC reference voltages can be input respectively. By defining the structure variables in the program to read the converted values, 6 sets of coordinate points on the input/output plane are obtained. Then, the data is processed using the least squares and univariate linear regression ideas to obtain the best fitting curve, which minimizes the sum of squares of the distances from each coordinate point to the best curve (the sum of squares of the residuals).

2 Least Squares Method and Univariate Linear Regression

2.1 Least Squares Principle

For a linear model, if there are t unmeasurable unknown quantities, theoretically, the functional relationship can be obtained by measuring the directly measured quantity that has a functional relationship with the t unknown quantities t times. However, since the measured data inevitably contains measurement errors, the results obtained must also contain certain errors. In order to improve the accuracy of the results obtained, the number of measurements can be increased to n (n>t) to use compensation to reduce the impact of random errors.

Gauss believed that when obtaining unknown parameters based on observed data, the most appropriate value of the unknown parameter should be such a value, that is, to select the parameter estimate that makes the model output as close to the observed data as possible, and the degree of closeness is measured by the sum of the squares of the difference between the model output and the data. This is the basic idea of ​​least squares. The principle of least squares method points out that the most accurate value should be obtained under the condition of minimizing the sum of squares of residual errors.

2.2 Principle of univariate linear regression

Univariate linear regression deals with the relationship between two variables, that is, if there is a linear relationship between two variables x and y, then through experiments and analysis of the obtained data, the function curve between the two is found. This is also the linear fitting problem often encountered in engineering.

3 Experimental plan and result analysis

3.1 Experimental plan

The experiment was completed using the F2812 development board and DSP debugging software CCS2.0. A stable signal source was used to generate 6 standard voltages, which were 0.2 V, 0.5 V, 1.0 V, 1.5 V, 2.0 V, and 2.5 V, and the input channels were selected as A0, A1, A2, B0, B1, and B2. The ADCL0 pin was connected to the analog ground of the circuit board, and the signal line connected to the analog input pin should avoid the digital signal line to reduce the interference of the digital signal on the analog signal. The input circuit is shown in Figure 2.


Figure 2 Input circuit [page]

3.2 Correction Algorithm

Assume that the input/output curve of the ADC module is y=a+bx, the input voltage value is xi, and the corresponding conversion output value is yi. The equation can be obtained by the least squares estimation algorithm:


Solving this system of equations gives us estimated values ​​of a and b:


In the formula,

This gives the best fitting curve (regression equation): This equation can then be used to perform transformation value correction.

3.3 Experimental data processing

The six sets of data obtained from the experiment were processed using the least squares method and linear regression method, and the least squares estimates of a, 6 were obtained, respectively, so the regression equation is: y = 0.003 612 + 1.039 091x. Using the regression equation as the standard, the corrected transformation value can be calculated by x = (y-0.003 612) / 1.039 091 and compared with the untransformed value. The results are shown in Table 1.


In Excel, the uncorrected input/output distribution points and the regression curve are plotted as shown in Figure 3.


Figure 3 Schematic diagram of regression curve

3.4 Results Analysis

It can be seen from Table 1 and Figure 3 that if no correction measures are taken, the ADC module of F2812 will have a relative error of about 5%; and the proposed correction method can reduce the error to less than 1%. This greatly improves the accuracy of A/D conversion. For occasions with high control accuracy requirements, sacrificing the 6 channels of the ADC module to obtain relatively high conversion accuracy is still very necessary and worthwhile.

4 Conclusion

This paper proposes a method of using the least squares method and linear regression to correct the ADC module of DSP. Experiments have shown that this method can greatly improve the conversion accuracy and effectively make up for the defect of low AD conversion accuracy in DSP. This method has simple hardware circuits and low cost, and has high promotion and utilization value.

Keywords:ADC Reference address:How to Improve ADC Accuracy of DSP

Previous article:Secondary boot loading scheme for microprocessor
Next article:Design of center positioning algorithm based on TMS320C6711B DSP

Recommended ReadingLatest update time:2024-11-16 21:34

Application of impedance measurement methods in sensor technology
Real-world circuit components are much more complex than ideal resistors and exhibit resistive, capacitive, and inductive properties that together determine the impedance characteristic. Impedance differs from resistance in two main ways. First, impedance is an alternating current (AC) characteristic, and second, im
[Analog Electronics]
Using the built-in high-speed ADC of STM32 to realize a simple oscilloscope
Making a digital sampling oscilloscope has been my long-standing wish, but after all, this goal is quite difficult, and there are too many aspects involved, such as analog front-end circuit, high-speed ADC, microcontroller, CPLD/FPGA, communication, host computer program, data processing, etc. It is not something that
[Microcontroller]
What analog engineers must know: Learn about analog-to-digital converters in all aspects
Suggestions for improving ADC performance Although ADCs look very simple, they must be used correctly to achieve optimal performance. ADCs have the same performance limitations as simple analog amplifiers, such as limited gain, offset voltage, common-mode input voltage limitations, and harmonic distortio
[Analog Electronics]
What analog engineers must know: Learn about analog-to-digital converters in all aspects
Design scheme of pulse signal measurement based on ADC and FPGA
0Introduction There are many methods for measuring frequency and pulse width. Usually, the signal parameter measurement based on MCU has a low accuracy because the MCU has a very low operating frequency. The time domain measurement accuracy based on AD10200 and FPGA can often reach 10 ns, and the frequency
[Test Measurement]
Design scheme of pulse signal measurement based on ADC and FPGA
Choosing Between Two Types of High-Speed ​​ADCs: Buffered and Unbuffered
Buffered or Unbuffered When considering the effects of input impedance, designers can generally choose between two types of high speed ADCs: buffered and unbuffered (i.e., using switched capacitors). While there are many different converter topologies to choose from, the applications discussed in this article o
[Analog Electronics]
Choosing Between Two Types of High-Speed ​​ADCs: Buffered and Unbuffered
FL2440 driver addition (5) ADC driver study notes
As can be seen from the figure, the analog ADC is divided into two parts, one is the touch screen function, and the other is the ordinary ADC function. Two interrupts, INT_TC and INT_ADC, can be generated respectively. The ADC module has a total of 8 channels for analog signal input, namely AIN0, AIN1, AIN2, A
[Microcontroller]
Simple implementation of STM32 ADC analog-to-digital conversion
ADC is usually used together with DMA. Here we simply use the library to configure the ADC to scan continuously to implement the ADC application.   First configure the GPIO and ADC clocks:     ADC_InitTypeDef     ADC_InitStructure;   GPIO_InitTypeDef   GPIO_InitStructure;   RCC_APB2PeriphClockCmd(RCC_APB2Peri
[Microcontroller]
A New Approach to Optimizing Signal Chains Using Continuous-Time Sigma-Delta Converters
A New, Better Way to Optimize a Signal Chain with a Continuous-Time Sigma-Delta Converter A New Approach to Optimizing Signal Chains Using Continuous-Time Sigma-Delta Converters question: Why should I consider using a CTSD ADC to improve my signal chain design?   Answer:   Compared with traditional archit
[Analog Electronics]
A New Approach to Optimizing Signal Chains Using Continuous-Time Sigma-Delta Converters
Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号