CN-122001375-A - Method for improving performance and prolonging service life of AD sampling device
Abstract
The invention provides a method for improving the performance of an AD sampling device and prolonging the service life of the AD sampling device, which comprises the steps of obtaining an acquired voltage value (float type) after analog-to-digital conversion according to original data acquired by a sampling channel of the AD sampling device, acquiring original external input voltage, carrying out analog-to-digital conversion which is not processed in any way and is only related to an AD device manual, carrying out AD compensation, namely carrying out linear compensation on a result (D0) obtained by AD sampling according to an AD calibration coefficient, compensating hardware errors by a software algorithm, reducing the dependence on a high-precision AD device, saving more than 30 percent of hardware cost, prolonging the service life of the device by 2-3 times by a self-adaptive calibration mechanism, being particularly suitable for industrial control long-term operation scenes, being compatible with various storage devices and communication protocols by modularized design, being capable of being quickly transplanted to different embedded platforms, and reducing equipment calibration maintenance frequency by more than 50 percent after being applied to the fields of intelligent instruments, industrial automation and the like.
Inventors
- CHENG SHI
- LIN TIANFU
- XIAO YINING
- SUN LEI
- YAN DONGXIAO
- LIU JIAXIANG
- Qiu fan
- ZHANG WEI
- JU JUNMEI
- WANG FENG
- ZHAO FUCHUAN
Assignees
- 湖北三江航天红峰控制有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20251210
Claims (10)
- 1. A method for improving the performance and prolonging the service life of an AD sampling device is characterized by comprising the following steps: (1) AD sampling, namely obtaining an acquired voltage value (float type) through analog-to-digital conversion according to the original data acquired by a sampling channel of an AD sampling device, wherein the acquired voltage value is an original external input voltage, and only has analog-to-digital conversion related to an AD device manual without any treatment; (2) The method comprises the steps of carrying out linear compensation on a result (D0) obtained by AD sampling according to AD calibration coefficients to obtain a compensated AD sampling value (D1), carrying out linear operation on the sampling result to eliminate linear errors and improve sampling precision, carrying out linear compensation on the AD sampling result (D0) to obtain an AD sampling value (D1), wherein the AD compensation can be described as D1= (D0-b)/k, the AD compensation comprises a group of calibration coefficients, each group of calibration coefficients comprises two calibration parameters such as k and b in the formula described above, the coefficient b is set to 0 and k is set to 1 during primary calibration, the sampling value (D2) is obtained as a calculation reference quantity of the AD calibration coefficients, the AD calibration process is carried out according to (-aV to aV) (the value of a is positive value) of each AD sampling channel, power is supplied by an external precision power supply, the power supply voltage is set to be-aV, - (a-1) V, - (a-2) V, - (a-3) V, - (a-2) V) and the coefficient b is calculated according to the increment of the initial calibration coefficients, and the coefficient is calculated according to the increment of the coefficients after the AD 1, the coefficient b is calculated, and the increment of the coefficient is calculated according to the increment of the calculation coefficients is calculated according to the 1, then, according to the power supply output voltage output set when the AD coefficient is calibrated, a corresponding AD sampling result (D2) is sequentially obtained, and whether the improvement of the sampling precision meets the 3% precision requirement or not is observed; (3) AD filtering, namely obtaining a result (D2) obtained by AD compensation for six times, then carrying out AD filtering on the result, wherein the filtering process is to remove a maximum value and a minimum value in the AD sampling values (D2) for six times, and then averaging the rest AD sampling values (D2).
- 2. The method of claim 1, wherein in the step (2), the AD sampling result is linearly compensated according to the stored AD calibration coefficient, then AD filtering is performed to obtain an actual AD voltage value, when the AD device is aged for a certain time, the AD coefficient calibration is performed again to meet the requirement of acquisition precision again, the calibration process adopts a flexible and variable serial communication protocol, and the qualified AD coefficient is calibrated to generate a corresponding file for storage record. And the calibration can be carried out for a plurality of times according to actual conditions.
- 3. The method for improving the performance and prolonging the service life of the AD sampling device as claimed in claim 1, wherein the links of AD compensation, AD filtering and the like are software processing modes, so that the sampling precision of the AD chip is improved, and the influence of random interference on the acquisition precision is reduced.
- 4. The method for improving the performance and prolonging the service life of the AD sampling device according to claim 1, wherein when the AD sampling hardware circuit is aged, and the sampling precision cannot meet the precision requirement, the AD sampling functional part can be recalibrated to meet the sampling precision requirement again, and meanwhile, the AD sampling functional part can be calibrated for a plurality of times according to the actual use condition.
- 5. The method for improving the performance and prolonging the service life of the AD sampling device as claimed in claim 2, wherein the serial port communication adopts a serial port communication protocol which adopts a serial port communication protocol with a fixed frame structure and a fixed frame length or a variable frame length and is used between an industrial personal computer and a computer.
- 6. The method for improving the performance and prolonging the service life of the AD sampling device according to claim 1 is characterized in that the AD sampling device is characterized in that an analog quantity acquisition chip AD7656 of a multi-channel acquisition channel with 16-bit precision is adopted for analog quantity acquisition, a serial port communication chip is a multi-channel TL16C754B serial port communication chip, data transmission in the AD coefficient uploading process adopts a frame header and verification mode to improve the data reliability in the communication process, and the precision of floating point data transmitted to a computer from an industrial personal computer is reserved to 0.001.
- 7. The method for improving the performance and prolonging the service life of the AD sampling device as claimed in claim 6, wherein the floating point data calculation is performed by reserving 6 bits after decimal point.
- 8. The method for improving the performance and prolonging the service life of the AD sampling device as claimed in claim 5, wherein the data verification mode of the serial port communication adopts accumulation and verification or CRC verification, the baud rate of the serial port communication adopts 115200bit/s, and the baud rate of the data verification mode and the serial port communication can be adjusted according to actual conditions.
- 9. The method for improving the performance and prolonging the service life of the AD sampling device according to claim 2, wherein the calibration of the AD sampling result is completed and a coefficient file in a text form can be generated.
- 10. The method for improving the performance and prolonging the service life of the AD sampling device according to claim 5, wherein the calculation method of the AD compensation coefficient b (compensation multiple) and k (compensation increment) comprises the following calculation steps: Calculating the product Sum sum_mul of the Sum of voltages of each channel under all the point values Xi of different voltages (-aV) and all the different voltage point values, and calculating the square Sum sum_pow of all the different voltage point values Xi; calculating a compensation increment b, namely an average value of voltage and Sum at point values Xi of all different voltages (-aV range), wherein b=sum/(2a+1); The compensation factor k, k=sum_mul/sum_pow is calculated.
Description
Method for improving performance and prolonging service life of AD sampling device Technical Field The invention relates to the technical field of embedded control, in particular to a method for improving the performance of an AD sampling device and prolonging the service life of the AD sampling device. Background The AD sampling technology is widely applied in the technical field of embedded control, analog quantity is usually collected in peripheral devices and interfaces of an embedded control system, and certain linear errors are usually generated due to certain difference of the consistency of sampling performance of each channel of the AD sampling chip of the multichannel. The output forms of the sensors are analog output, accurate analog acquisition is important to obtain true and correct sensor data, and accurate acquisition of peripheral sensor data is important to the application of embedded control technology. Therefore, the proposal of a method for effectively improving the performance of the AD sampling device and prolonging the service life of the AD sampling device is very necessary, and has remarkable effects of improving the sampling precision, reducing the linear error of AD sampling, reducing the use cost of the AD sampling device and prolonging the service life. Disclosure of Invention Aiming at the defects existing in the prior art, the invention aims to provide a method for improving the performance of an AD sampling device and prolonging the service life of the AD sampling device so as to solve the problems in the prior art. In order to achieve the above purpose, the invention is realized by the following technical scheme that the method for improving the performance and prolonging the service life of the AD sampling device comprises the following steps: (1) AD sampling, namely obtaining an acquired voltage value (float type) through analog-to-digital conversion according to the original data acquired by a sampling channel of an AD sampling device, wherein the acquired voltage value is an original external input voltage, and only has analog-to-digital conversion related to an AD device manual without any treatment; (2) The method comprises the steps of carrying out linear compensation on a result (D0) obtained by AD sampling according to AD calibration coefficients to obtain a compensated AD sampling value (D1), carrying out linear operation on the sampling result to eliminate linear errors and improve sampling precision, carrying out linear compensation on the AD sampling result (D0) to obtain an AD sampling value (D1), wherein the AD compensation can be described as D1= (D0-b)/k, the AD compensation comprises a group of calibration coefficients, each group of calibration coefficients comprises two calibration parameters such as k and b in the formula described above, the coefficient b is set to 0 and k is set to 1 during primary calibration, the sampling value (D2) is obtained as a calculation reference quantity of the AD calibration coefficients, the AD calibration process is carried out according to (-aV to aV) (the value of a is positive value) of each AD sampling channel, power is supplied by an external precision power supply, the power supply voltage is set to be-aV, - (a-1) V, - (a-2) V, - (a-3) V, - (a-2) V) and the coefficient b is calculated according to the increment of the initial calibration coefficients, and the coefficient is calculated according to the increment of the coefficients after the AD 1, the coefficient b is calculated, and the increment of the coefficient is calculated according to the increment of the calculation coefficients is calculated according to the 1, then, according to the power supply output voltage output set when the AD coefficient is calibrated, a corresponding AD sampling result (D2) is sequentially obtained, and whether the improvement of the sampling precision meets the 3% precision requirement or not is observed; (3) AD filtering, namely obtaining a result (D2) obtained by AD compensation for six times, then carrying out AD filtering on the result, wherein the filtering process is to remove a maximum value and a minimum value in the AD sampling values (D2) for six times, and then averaging the rest AD sampling values (D2). Further, in the step (2), the stored AD calibration coefficient is linearly compensated, and then the AD sampling result is subjected to AD filtering to obtain an actual AD voltage value, when the AD device is aged for a certain period of time, the AD coefficient is calibrated again, so that the AD device meets the requirement of acquisition precision again, the calibration process adopts a flexible and variable serial communication protocol, and the calibrated qualified AD coefficient is generated, and the corresponding file is stored and recorded. And the calibration can be carried out for a plurality of times according to actual conditions. Furthermore, links such as AD compensation and AD filtering adopt a softwar