CN112165328B - ADC digital-to-analog conversion error correction method, device and medium - Google Patents

ADC digital-to-analog conversion error correction method, device and medium Download PDF

Info

Publication number
CN112165328B
CN112165328B CN202010916080.0A CN202010916080A CN112165328B CN 112165328 B CN112165328 B CN 112165328B CN 202010916080 A CN202010916080 A CN 202010916080A CN 112165328 B CN112165328 B CN 112165328B
Authority
CN
China
Prior art keywords
conversion curve
curve
area
actual
adc
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010916080.0A
Other languages
Chinese (zh)
Other versions
CN112165328A (en
Inventor
杨稳
沈钢
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sinocare Inc
Original Assignee
Sinocare Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sinocare Inc filed Critical Sinocare Inc
Priority to CN202010916080.0A priority Critical patent/CN112165328B/en
Publication of CN112165328A publication Critical patent/CN112165328A/en
Priority to PCT/CN2021/114975 priority patent/WO2022048499A1/en
Application granted granted Critical
Publication of CN112165328B publication Critical patent/CN112165328B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M1/00Analogue/digital conversion; Digital/analogue conversion
    • H03M1/06Continuously compensating for, or preventing, undesired influence of physical parameters

Abstract

The application discloses a correction method of ADC digital-to-analog conversion errors, which comprises the steps of firstly obtaining a theoretical conversion curve and an actual conversion curve corresponding to an ADC, then calculating slopes corresponding to at least one group of points on the actual conversion curve, and in a value range, if the area between a curve formed by a third point and the slopes on the actual conversion curve and the actual conversion curve is smaller than the area between the theoretical conversion curve and the actual conversion curve, taking the curve formed by the third point and the slopes as a correction conversion curve. By applying the technical scheme, the area between the corrected curve and the actual conversion curve is smaller than the area between the theoretical conversion curve and the actual conversion curve, so that the corrected conversion curve is as close to the actual conversion curve as possible, the nonlinear error when the analog signal is converted into the digital signal in the prior art is reduced, and the overall accuracy of the ADC is improved. In addition, hardware cost is saved.

Description

ADC digital-to-analog conversion error correction method, device and medium
Technical Field
The present invention relates to the field of analog-to-digital conversion technologies, and in particular, to a method, an apparatus, and a medium for correcting an ADC digital-to-analog conversion error.
Background
With the increasing requirement for the accuracy of signal acquisition, the role of Analog-to-Digital Converter (ADC) is also becoming more and more important; however, in practical situations, the ADC has a non-linear error, and the analog signal is easily distorted when converted into a digital signal.
Currently, two solutions mainly appear to address the above problems: one is to improve the overall accuracy and precision by improving the number of bits and performance of the ADC, but this approach increases the cost of the product; secondly, a more complex high-order algorithm is used for compensating the nonlinear error in the ADC, so that the overall error is reduced, and the accuracy is further improved, however, the complex algorithm affects the operation speed of a Micro Controller Unit (MCU), and thus has great limitation in the application scenario of high-speed acquisition.
In view of the foregoing prior art, it is an urgent need for those skilled in the art to find a method for correcting ADC digital-to-analog conversion errors with improved accuracy and reduced cost.
Disclosure of Invention
The application aims to provide a method, a device and a medium for correcting ADC digital-to-analog conversion errors.
In order to solve the above technical problem, the present application provides a method for correcting an ADC digital-to-analog conversion error, including:
acquiring a theoretical conversion curve and an actual conversion curve corresponding to the ADC;
calculating the corresponding slope of at least one group of points on the actual conversion curve, wherein the group of points are any two points on the actual conversion curve;
in the value range, if the first area is smaller than the second area, taking a curve formed by a third point on the actual conversion curve and the slope as a correction conversion curve to convert the signal;
the first area is an area between a curve formed by a third point on the actual conversion curve and the slope and the actual conversion curve, and the second area is an area between the theoretical conversion curve and the actual conversion curve.
Preferably, the method further comprises the following steps:
setting an effective range interval in the value interval;
the calculating the slope corresponding to at least one group of points on the actual conversion curve specifically includes: and calculating the slope corresponding to the left end point and the right end point of the actual conversion curve in the effective range interval.
Preferably, the digital quantity corresponding to the target third point is located at the middle point of the effective range interval.
Preferably, after the valid range interval is set in the value interval, the method further includes:
dividing the effective range interval into a plurality of effective range subintervals;
the calculating the slope corresponding to at least one group of points on the actual conversion curve specifically includes: and respectively calculating the slope of the actual conversion curve corresponding to each effective range subinterval.
Preferably, after obtaining the theoretical conversion curve and the actual conversion curve corresponding to the ADC, if there are a plurality of intersections between the actual conversion curve and the theoretical conversion curve, the method further includes:
dividing the actual conversion curve into a plurality of sections of curves according to the intersection points, wherein each section of the curve corresponds to one subinterval;
the slope is specifically a slope determined by a set of points of the curves in the corresponding subintervals.
Preferably, after determining that the first area is smaller than the second area, the method further includes:
selecting a target third point from a plurality of third points satisfying that the first area is smaller than the second area, and taking a curve formed by the target third point and the slope as a final correction conversion curve;
wherein an area between the final corrected conversion curve and the actual conversion curve is minimized.
In order to solve the above technical problem, the present application further provides a device for correcting an ADC digital-to-analog conversion error, including:
the acquisition module is used for acquiring a theoretical conversion curve and an actual conversion curve corresponding to the ADC;
a calculation module, configured to calculate a slope corresponding to at least one group of points on the actual conversion curve, where the group of points is any two points on the actual conversion curve;
a determining module, configured to, in a value range, if the first area is smaller than the second area, use a curve formed by a third point on the actual conversion curve and the slope as a correction conversion curve to perform signal conversion;
the first area is an area between a curve formed by a third point on the actual conversion curve and the slope and the actual conversion curve, and the second area is an area between the theoretical conversion curve and the actual conversion curve.
Preferably, the method further comprises the following steps:
the selecting module is used for selecting a target third point from a plurality of third points which meet the condition that the first area is smaller than the second area after the first area is determined to be smaller than the second area, and taking a curve formed by the target third point and the slope as a final correction conversion curve;
wherein an area between the final corrected transfer curve and the actual transfer curve is minimized.
In order to solve the above technical problem, the present application further provides a device for correcting an ADC digital-to-analog conversion error, including a memory for storing a computer program;
a processor for implementing the steps of the method for correcting the digital-to-analog conversion error of the ADC when executing the computer program.
In order to solve the above technical problem, the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the method for correcting the digital-to-analog conversion error of the ADC.
According to the correction method for the ADC digital-to-analog conversion error, a theoretical conversion curve and an actual conversion curve corresponding to an ADC are obtained firstly, then slopes corresponding to at least one group of points on the actual conversion curve are calculated, and in a value range, if the area between a curve formed by a third point and the slopes on the actual conversion curve and the actual conversion curve is smaller than the area between the theoretical conversion curve and the actual conversion curve, the curve formed by the third point and the slopes is used as a correction conversion curve. By applying the technical scheme, the area between the corrected curve and the actual conversion curve is smaller than the area between the theoretical conversion curve and the actual conversion curve, so that the corrected conversion curve is as close to the actual conversion curve as possible, the nonlinear error when the analog signal is converted into the digital signal in the prior art is reduced, and the overall accuracy of the ADC is improved. In addition, the technical scheme can achieve the purpose of reducing the overall error without additionally adding hardware and improving the number of bits and the performance of the ADC, so that the hardware cost is saved.
In addition, the ADC digital-to-analog conversion error correction device and medium provided by the application correspond to the method, and have the same beneficial effects.
Drawings
In order to more clearly illustrate the embodiments of the present application, the drawings required for the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained by those skilled in the art without inventive effort.
Fig. 1 is a graph of an AD conversion curve provided in an embodiment of the present application;
fig. 2 is a flowchart of a method for correcting an ADC digital-to-analog conversion error according to an embodiment of the present disclosure;
fig. 3 is a graph of another AD conversion curve provided in the embodiment of the present application;
fig. 4 is a graph of another AD conversion curve provided in the embodiment of the present application;
fig. 5 is a schematic structural diagram of a device for correcting an ADC digital-to-analog conversion error according to an embodiment of the present disclosure;
fig. 6 is a structural diagram of a device for correcting an ADC digital-to-analog conversion error according to another embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without any creative effort belong to the protection scope of the present application.
The core of the application is to provide a method, a device and a medium for correcting ADC digital-to-analog conversion errors, so that nonlinear errors generated when analog signals are converted into digital signals in the prior art are reduced, and the overall accuracy of an ADC is improved.
In order that those skilled in the art will better understand the disclosure, the following detailed description will be given with reference to the accompanying drawings.
Fig. 1 is a graph of an AD conversion curve provided in the embodiment of the present application, which is illustrated by taking a 12-bit ADC as an example. As shown in fig. 1, an actual conversion curve 1 represents an AD conversion curve of actual distortion, a theoretical conversion curve 2 represents an AD conversion curve in an ideal case without distortion, and a corrected conversion curve 3 represents an AD conversion curve after correction, where X represents a digital quantity and Y represents an analog quantity. Taking X1 as an analysis point, it can be seen from the actual conversion curve 1 that when the analog signal voltage value is Y1PObtained by conversionThe digital quantity is X1, and after receiving the digital quantity X1, the MCU will calculate the analog voltage signal Y1 represented by the digital quantity X1 according to the theoretical conversion curve 2TThen Y1TAs the basis for condition judgment, data and algorithm analysis. However, the actual analog signal voltage value Y1PAnd theoretical analog voltage signal Y1TThere is a large error, so Y1TAs Y1PThe result of the judgment or calculation may become inaccurate.
For example, if the low battery alarm threshold is set at Y1 when the ADC is used for the low battery alarm function of the instrumentPAnd Y1TIn between, it may occur that the actual charge has been as low as Y1PBut does not prompt the condition of replacing the battery, so that the power supply of the instrument is insufficient and the normal work is influenced; similarly, if the error semaphore is substituted into the blood glucose algorithm during the blood glucose measurement process, an inaccurate blood glucose value is obtained, and the guiding significance of the blood glucose control of the user is lost.
Fig. 2 is a flowchart of a method for correcting an ADC digital-to-analog conversion error according to an embodiment of the present application, and as shown in fig. 2, the method includes:
s10: and acquiring a theoretical conversion curve 2 and an actual conversion curve 1 corresponding to the ADC.
In a specific implementation, the actual AD-converted digital values are measured by a standard voltage source input, resulting in an actual conversion curve 1 as shown in fig. 1. It should be noted that, in the actual measurement, only limited points on the actual conversion curve 1 can be measured as many as possible, and the countless points on the actual conversion curve 1 cannot be measured one by one, so the actual conversion curve 1 shown in fig. 1 is actually fitted with a limited and discrete number of points.
S11: the slopes of at least one set of point correspondences on the actual transfer curve 1 are calculated. Wherein, one group of points is any two points on the actual conversion curve 1.
As shown in FIG. 1, two points such as (X0, Y0) and (X2, Y2) are arbitrarily selected on the actual transfer curve 1, wherein 0 ≦ X0 < 2n,0<X2≤2nAnd n is the number of bits of the ADC. Determining slope K from (X0, Y0) and (X2, Y2), K ═ Y2-Y0)/(X2-X0)。
S12: in the value range, it is determined whether the first area S1 is smaller than the second area S2, if so, the process proceeds to S13, and if not, the process proceeds to S14.
S13: the curve formed by the third point on the actual conversion curve 1 and the slope K is used as the correction conversion curve 3 to perform the conversion of the signal.
S14: the position of the third point is adjusted and returns to S12.
The first area S1 is an area between a curve formed by the third point on the actual conversion curve 1 and the slope K and the actual conversion curve 1, and the second area S2 is an area between the theoretical conversion curve 2 and the actual conversion curve 1.
In the specific implementation, in the value range, a third point, i.e., the point a in fig. 1, is arbitrarily selected from the actual conversion curve 1, the coordinate of the point a is (Xa, Ya), and a linear equation of unity is determined by the coordinate of the point a and the slope K: y isC(x)=K×x+(Ya-K×Xa),(0<Xa<2n)。
It should be noted that the value interval herein specifically refers to a value range of the ADC, and may be a value range corresponding to a digital quantity, or a value range corresponding to an analog quantity, which is not limited herein. In addition, the point a is not a fixed point, and the position of the point a may fluctuate on the actual conversion curve 1 according to the actual situation, and of course, the abscissa and the ordinate thereof also change.
Calculating Y in the value range by means of a mathematical statistic toolC(x) Area between the actual transfer curve 1:
Figure BDA0002665061950000061
wherein S1 is the first area, X0 and X2 are the abscissa of two points selected from S11, and Y isC(x) For the curve equation of the third point with slope K, YP(x) The curve equation of the actual conversion curve 1.
Judging whether the first area S1 is smaller than the second area S2, if so, taking a curve formed by a third point on the actual conversion curve 1 and the slope K as a correction conversion curve 3 to convert signals; if not, the position of the third point is adjusted until the first area S1 is smaller than the second area S2.
It can be understood that, after the corrected conversion curve 3 is obtained, the corrected conversion curve 3 is used to realize the conversion of the signal, where the signal conversion may be from an analog quantity to a digital quantity, or may be a reverse extrapolation of the corresponding analog quantity according to the obtained digital quantity, and since the corrected conversion curve is corrected, the accuracy of the signal conversion can be improved during the signal conversion process.
The method for correcting the digital-to-analog conversion error of the ADC provided in the embodiment of the present application first obtains a theoretical conversion curve and an actual conversion curve corresponding to the ADC, then calculates a slope corresponding to at least one group of points on the actual conversion curve, and in a value range, if an area between a curve formed by a third point and the slope on the actual conversion curve and the actual conversion curve is smaller than an area between the theoretical conversion curve and the actual conversion curve, takes the curve formed by the third point and the slope as a correction conversion curve. By applying the technical scheme, the area between the corrected curve and the actual conversion curve is smaller than the area between the theoretical conversion curve and the actual conversion curve, so that the corrected conversion curve is as close to the actual conversion curve as possible, the nonlinear error when the analog signal is converted into the digital signal in the prior art is reduced, and the overall accuracy of the ADC is improved. In addition, the technical scheme can achieve the purpose of reducing the overall error without additionally adding hardware and improving the number of bits and the performance of the ADC, so that the hardware cost is saved.
In the above embodiment, when the first area S1 is smaller than the second area S2, it is only ensured that the non-linear error when the analog signal is converted into the digital signal is reduced to a certain extent, and in order to further improve the accuracy of the whole ADC, in a specific implementation, the corresponding correction conversion curve 3 when the first area S1 is the minimum needs to be found.
As a preferred embodiment, after determining that the first area is smaller than the second area, the method further comprises:
selecting a target third point from a plurality of third points which meet the condition that the first area is smaller than the second area, and taking a curve formed by the target third point and the slope as a final correction conversion curve;
wherein the area between the final corrected conversion curve and the actual conversion curve is minimal.
In a specific embodiment, the position of the third point, i.e., the position of the adjustment point a (Xa, Ya) on the actual conversion curve 1 is continuously adjusted, and Xa-1, Xa-2, Xa-3, 3 … …, Xa-2 are sequentially obtainednThe area between the curve formed by the third point on the discretized actual transfer curve 1 and the slope K and the actual transfer curve 1, namely:
Figure BDA0002665061950000071
through comparison, the coordinate of the point a corresponding to the minimum first area S1 is found and substituted into the slope K value, and the final correction conversion curve is obtained.
According to the method for correcting the ADC digital-to-analog conversion error, the target third point is selected from the plurality of third points which meet the condition that the first area is smaller than the second area, and a curve formed by the target third point and the slope serves as a final correction conversion curve. By applying the technical scheme, the area between the obtained final correction conversion curve and the actual conversion curve is minimum, the nonlinear error when the analog signal is converted into the digital signal in the prior art is further reduced, and the overall accuracy of the ADC is improved.
In practical application, the whole range of the ADC may not be used, and only a part of the range of the whole range of the ADC needs to be used, so on the basis of the above embodiment, the method further includes: and setting an effective range interval in the value interval.
S11 specifically includes: and calculating the slopes corresponding to the left end point and the right end point of the actual conversion curve 1 in the effective range interval.
In a specific implementation, the left end point and the right end point of the actual conversion curve 1 in the effective range interval are selected to calculate the corresponding slope K value. As shown in fig. 1, when the effective range interval is set to (X0, X2), the slope K is calculated by selecting (X0, Y0) and (X2, Y2) on the actual transfer curve 1, where K is (Y2-Y0)/(X2-X0).
When the target third point is selected, the minimum value of the first area S1 can be found quickly according to the actual situation and the change rule of the first area S1, and as a preferred embodiment, the target third point is located at the middle point of the effective range interval.
The third point is arbitrarily selected from the actual conversion curve 1, and when Xa-1, Xa-2, and Xa-3 … … Xa-2 are sequentially determinednIn this case, the area between the curve formed by the third point on the actual conversion curve 1 and the slope K after the dispersion and the actual conversion curve 1 is theoretically feasible, but actually requires a lot of effort, so in a specific implementation, the digital quantity corresponding to the target third point is generally directly selected from the vicinity of the middle point of the effective range interval, so that the target third point corresponding to the minimum first area S1 can be quickly found.
According to the correction method for the ADC digital-to-analog conversion error, the effective range interval is arranged in the value interval, only the AD conversion curve in the effective range interval needs to be corrected, and the obtained correction conversion curve can be closer to an actual conversion curve compared with the correction conversion curve obtained by correcting the full-range of the ADC, so that the accuracy of the ADC in the effective range interval is improved.
In practical applications, if a wide range of valid ranges or the entire range of ADC ranges needs to be corrected, only determining one correction conversion curve 3 may not achieve a good correction effect, and therefore, on the basis of the foregoing embodiment, as a preferred embodiment, after setting the range of valid ranges in the value range, the method further includes:
the effective range interval is divided into a plurality of effective range sub-intervals.
S11 specifically includes: and respectively calculating the corresponding slopes of the actual conversion curve 1 in each effective range subinterval.
Fig. 3 is a graph of another AD conversion curve provided in this embodiment of the present application, as shown in fig. 3, the effective range interval is the whole ADC range, the effective range interval is divided into two effective range subintervals by taking (X1, 0) as a boundary point, and then the correction conversion curve 3 corresponding to each effective range subinterval is determined in each effective range subinterval by using the method described in the above embodiment, which is not described herein again in detail.
By the method, two correction conversion curves 3 are obtained and combined into a piecewise function, and the obtained equation set is as follows:
Figure BDA0002665061950000091
wherein, YC(x) Curve equation for the curve formed by the third point and the slope K, KabSlope determined for points a and b, KbcSlopes determined for points b and c, babConstant terms of the curve equation for the correction transfer curve 3 for the first range subinterval, bbcThe constant term of the curve equation of the correction conversion curve 3 corresponding to the second effective range subinterval.
It should be noted that, in the present application, the selection position of the demarcation point is not limited, and the most appropriate point is selected to divide the effective range subinterval according to the actual situation. In addition, when the slopes of the actual conversion curve 1 corresponding to the effective range subintervals are respectively calculated, a group of points selected in each effective range subinterval is any two points on the actual conversion curve 1, that is, the coordinates of two points corresponding to each effective range subinterval and two points corresponding to other effective range subintervals may be the same or different, and are not limited herein. In fig. 3, the points selected in the first effective range subinterval are point a and point b, the points selected in the second effective range subinterval are point b and point c, and point b selected in the two effective range subintervals is the same, but in other embodiments, different points may be selected.
It can be understood that, although the accuracy can be improved better by using a plurality of correction conversion curves to correct the ADC, the algorithm becomes complicated, so that it is suggested to select an optimal equation set according to the actual use scenario and the accuracy requirement, so as to achieve the purpose of improving the accuracy of the ADC and also achieving the simplest processing procedure.
According to the correction method for the ADC digital-to-analog conversion error, the effective range interval is divided into a plurality of effective range sub-intervals, then two or more correction conversion curves are determined through the method and combined into a piecewise function, and therefore the correction effect on the accuracy of the ADC in a wide effective range interval or the whole ADC range is obvious.
Fig. 4 is a graph of another AD conversion curve provided in the embodiment of the present application. As shown in fig. 4, after obtaining the theoretical conversion curve 2 and the actual conversion curve 1 corresponding to the ADC, if there are a plurality of intersections between the actual conversion curve 1 and the theoretical conversion curve 2, the method further includes:
dividing the actual conversion curve 1 into a plurality of sections of curves according to the intersection points, wherein each section of curve corresponds to one subinterval;
the slope is specifically determined by a set of points of the multi-segment curve in the corresponding subinterval.
In a specific implementation, as shown in fig. 4, the actual transfer curve 1 is divided into a first curve 101 and a second curve 102 by an intersection (Xi, Yi), the subinterval of the first curve 101 is (0, Xi), the subinterval of the second curve 102 is (Xi, 4096), and the corrected transfer curve 3 corresponding to each segment of the curve is calculated in each subinterval according to the method in the above embodiment.
According to the correction method for the ADC digital-to-analog conversion error, the actual conversion curve is divided into the multiple sections of curves according to the intersection points, and then the correction conversion curve is determined corresponding to each section of curve, so that the accuracy of the ADC when the actual conversion curve and the theoretical conversion curve have multiple intersection points is improved.
On the basis of the above embodiment, as a preferred embodiment, after obtaining the corrected conversion curve 3, the method further includes:
the correspondence between the correction conversion curve 3 and the ADC is stored.
In specific implementation, because the effective range interval applied by the related technicians for the ADCs of the same model is generally unchanged in the same application scenario, the corresponding relationship between the correction conversion curve and the ADCs is stored in the storage device after the correction conversion curve is obtained, so that the related technicians can directly use the ADC without repeated correction subsequently.
In the foregoing embodiments, a method for correcting an ADC digital-to-analog conversion error is described in detail, and the present application also provides an embodiment corresponding to a device for correcting an ADC digital-to-analog conversion error. It should be noted that the present application describes the embodiments of the apparatus portion from two perspectives, one from the perspective of the function module and the other from the perspective of the hardware.
Fig. 5 is a schematic structural diagram of a correction apparatus for ADC digital-to-analog conversion errors according to an embodiment of the present disclosure. As shown in fig. 5, the apparatus includes, based on the angle of the function module:
the acquisition module 10 is configured to acquire a theoretical conversion curve 2 and an actual conversion curve 1 corresponding to the ADC;
the calculation module 11 is configured to calculate a slope corresponding to at least one group of points on the actual conversion curve 1, where the one group of points is any two points on the actual conversion curve 1;
a determining module 12, configured to, in the value range, if the first area S1 is smaller than the second area S2, use a curve formed by a third point and a slope on the actual conversion curve 1 as a correction conversion curve 3 to perform signal conversion;
the first area S1 is an area between a curve formed by a third point 1 on the actual conversion curve and the slope and the actual conversion curve 1, and the second area S2 is an area between the theoretical conversion curve 2 and the actual conversion curve 1.
As a preferred embodiment, the apparatus further comprises:
the setting module is used for setting an effective range interval in the value interval;
the first dividing module is used for dividing the effective range interval into a plurality of effective range subintervals;
the second dividing module is used for dividing the actual conversion curve into a plurality of sections of curves according to the intersection point, wherein each section of the curve corresponds to one subinterval;
the selecting module is used for selecting a target third point from a plurality of third points which meet the condition that the first area is smaller than the second area after the first area is determined to be smaller than the second area, and taking a curve formed by the target third point and the slope as a final correction conversion curve;
wherein the area between the final corrected conversion curve and the actual conversion curve is minimal.
Since the embodiments of the apparatus portion and the method portion correspond to each other, please refer to the description of the embodiments of the method portion for the embodiments of the apparatus portion, which is not repeated here.
The device for correcting the digital-to-analog conversion error of the ADC, provided by the application, firstly obtains a theoretical conversion curve and an actual conversion curve corresponding to the ADC, then calculates the corresponding slopes of at least one group of points on the actual conversion curve, and in a value interval, if the area between a curve formed by a third point and the slopes on the actual conversion curve and the actual conversion curve is smaller than the area between the theoretical conversion curve and the actual conversion curve, the curve formed by the third point and the slopes is used as a correction conversion curve. By applying the technical scheme, the area between the corrected curve and the actual conversion curve is smaller than the area between the theoretical conversion curve and the actual conversion curve, so that the corrected conversion curve is as close to the actual conversion curve as possible, the nonlinear error when the analog signal is converted into the digital signal in the prior art is reduced, and the overall accuracy of the ADC is improved. In addition, the technical scheme can achieve the purpose of reducing the overall error without additionally adding hardware and improving the number of bits and the performance of the ADC, so that the hardware cost is saved.
Fig. 6 is a structural diagram of an apparatus for correcting an ADC digital-to-analog conversion error according to another embodiment of the present application, as shown in fig. 6, based on a hardware structure, the apparatus includes: a memory 20 for storing a computer program;
the processor 21 is configured to implement the steps of the method for correcting the digital-to-analog conversion error of the ADC according to the above embodiment when executing the computer program.
The device for correcting the ADC digital-to-analog conversion error provided by this embodiment may include, but is not limited to, a smart phone, a tablet computer, a notebook computer, or a desktop computer.
The memory 20 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 20 may in some embodiments be an internal memory location of the correction device for the digital-to-analog conversion errors of the ADC.
The processor 21 may be a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor or other data Processing chip in some embodiments, and is used to run program codes stored in the memory 20 or process data, such as a program corresponding to a method for performing correction of ADC digital-to-analog conversion errors.
In some embodiments, the bus 22 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 6, but this is not intended to represent only one bus or type of bus.
Those skilled in the art will appreciate that the configuration shown in fig. 6 does not constitute a limitation of the correction means for the digital-to-analog conversion errors of the ADC, and may comprise more or fewer components than those shown.
The device for correcting the digital-to-analog conversion error of the ADC, provided by the embodiment of the application, comprises a memory and a processor, wherein when the processor executes a program stored in the memory, the following method can be realized: firstly, a theoretical conversion curve and an actual conversion curve corresponding to the ADC are obtained, then, slopes corresponding to at least one group of points on the actual conversion curve are calculated, and in a value taking interval, if the area between a curve formed by a third point and the slopes on the actual conversion curve and the actual conversion curve is smaller than the area between the theoretical conversion curve and the actual conversion curve, the curve formed by the third point and the slopes is used as a correction conversion curve. By applying the technical scheme, the area between the corrected curve and the actual conversion curve is smaller than the area between the theoretical conversion curve and the actual conversion curve, so that the corrected conversion curve is as close to the actual conversion curve as possible, the nonlinear error when the analog signal is converted into the digital signal in the prior art is reduced, and the overall accuracy of the ADC is improved. In addition, the technical scheme can achieve the purpose of reducing the overall error without additionally adding hardware and improving the number of bits and the performance of the ADC, so that the hardware cost is saved.
Finally, the application also provides a corresponding embodiment of the computer readable storage medium. The computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps as set forth in the above-mentioned method embodiments.
It is to be understood that if the method in the above embodiments is implemented in the form of software functional units and sold or used as a stand-alone product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium and executes all or part of the steps of the methods described in the embodiments of the present application, or all or part of the technical solutions. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The method, the apparatus and the medium for correcting the ADC digital-to-analog conversion error provided by the present application are described in detail above. The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A method for correcting ADC digital-to-analog conversion errors comprises the following steps:
acquiring a theoretical conversion curve and an actual conversion curve corresponding to the ADC;
calculating the corresponding slope of at least one group of points on the actual conversion curve, wherein the group of points are any two points on the actual conversion curve;
in the value range, if the first area is smaller than the second area, a curve formed by a third point on the actual conversion curve and the slope is used as a correction conversion curve to convert signals;
the first area is an area between a curve formed by a third point on the actual conversion curve and the slope and the actual conversion curve, and the second area is an area between the theoretical conversion curve and the actual conversion curve.
2. The method for correcting digital-to-analog conversion errors of an ADC of claim 1, further comprising:
setting an effective range interval in the value interval;
the calculating the slope corresponding to at least one group of points on the actual conversion curve specifically includes: and calculating the slope corresponding to the left end point and the right end point of the actual conversion curve in the effective range interval.
3. The method for correcting digital-to-analog conversion errors of an ADC of claim 2, wherein the digital quantity corresponding to the third point is located at a midpoint of the range.
4. The method for correcting the digital-to-analog conversion error of the ADC of claim 2, wherein after setting the range interval within the value interval, the method further comprises:
dividing the effective range interval into a plurality of effective range subintervals;
the calculating the slope corresponding to at least one group of points on the actual conversion curve specifically includes: and respectively calculating the slope of the actual conversion curve corresponding to each effective range subinterval.
5. The method for correcting digital-to-analog conversion errors of an ADC according to claim 1, wherein after obtaining the theoretical conversion curve and the actual conversion curve corresponding to the ADC, if there are a plurality of intersections between the actual conversion curve and the theoretical conversion curve, the method further comprises:
dividing the actual conversion curve into a plurality of sections of curves according to the intersection points, wherein each section of the curve corresponds to one subinterval;
the slope is specifically a slope determined by a set of points of the curves in the corresponding subintervals.
6. The method of correcting digital-to-analog conversion errors of an ADC of any one of claims 1 to 5, after determining that the first area is smaller than the second area, further comprising:
selecting a target third point from a plurality of third points satisfying that the first area is smaller than the second area, and taking a curve formed by the target third point and the slope as a final correction conversion curve;
wherein an area between the final corrected conversion curve and the actual conversion curve is minimized.
7. An apparatus for correcting an ADC digital-to-analog conversion error, comprising:
the acquisition module is used for acquiring a theoretical conversion curve and an actual conversion curve corresponding to the ADC;
a calculation module, configured to calculate a slope corresponding to at least one group of points on the actual conversion curve, where the group of points is any two points on the actual conversion curve;
a determining module, configured to, in a value range, if the first area is smaller than the second area, use a curve formed by a third point on the actual conversion curve and the slope as a correction conversion curve to perform signal conversion;
the first area is an area between a curve formed by a third point on the actual conversion curve and the slope and the actual conversion curve, and the second area is an area between the theoretical conversion curve and the actual conversion curve.
8. The apparatus for correcting digital-to-analog conversion errors of an ADC of claim 7, further comprising:
the selecting module is used for selecting a target third point from a plurality of third points which meet the condition that the first area is smaller than the second area after the first area is determined to be smaller than the second area, and taking a curve formed by the target third point and the slope as a final correction conversion curve;
wherein an area between the final corrected conversion curve and the actual conversion curve is minimized.
9. An apparatus for correcting ADC errors, comprising a memory for storing a computer program;
a processor for implementing the steps of the method for correcting digital-to-analog conversion errors of an ADC as claimed in any one of claims 1 to 6 when executing said computer program.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method of correcting digital-to-analog conversion errors of an ADC according to any one of claims 1 to 6.
CN202010916080.0A 2020-09-03 2020-09-03 ADC digital-to-analog conversion error correction method, device and medium Active CN112165328B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010916080.0A CN112165328B (en) 2020-09-03 2020-09-03 ADC digital-to-analog conversion error correction method, device and medium
PCT/CN2021/114975 WO2022048499A1 (en) 2020-09-03 2021-08-27 Adc conversion error correcting method and apparatus, and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010916080.0A CN112165328B (en) 2020-09-03 2020-09-03 ADC digital-to-analog conversion error correction method, device and medium

Publications (2)

Publication Number Publication Date
CN112165328A CN112165328A (en) 2021-01-01
CN112165328B true CN112165328B (en) 2022-05-13

Family

ID=73857610

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010916080.0A Active CN112165328B (en) 2020-09-03 2020-09-03 ADC digital-to-analog conversion error correction method, device and medium

Country Status (2)

Country Link
CN (1) CN112165328B (en)
WO (1) WO2022048499A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112165328B (en) * 2020-09-03 2022-05-13 三诺生物传感股份有限公司 ADC digital-to-analog conversion error correction method, device and medium
CN115314045B (en) * 2022-10-08 2023-01-20 深圳市好盈科技股份有限公司 Method, system, device and medium for adaptive calibration of finger-dialing output interval
CN117076938B (en) * 2023-10-17 2024-01-26 四川大学华西医院 Maximum sample number determining method, device and equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6963300B1 (en) * 2004-02-04 2005-11-08 National Semiconductor Corporation Pipeline analog-to-digital converter
US8031092B1 (en) * 2009-01-16 2011-10-04 President And Fellows Of Harvard College Dual-mode based digital background calibration of pipelined ADCs for gain variations and device mismatches
CN107941417A (en) * 2017-11-10 2018-04-20 苏州华兴源创电子科技有限公司 The output calibrating installation and method of a kind of pressure sensor
CN207423441U (en) * 2017-11-10 2018-05-29 苏州华兴源创电子科技有限公司 A kind of output calibrating installation of pressure sensor

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7671768B2 (en) * 2004-04-30 2010-03-02 Interuniversitair Microelektronica Centrum (Imec) Digital-to-analogue converter system with increased performance
US7501965B2 (en) * 2007-02-06 2009-03-10 Texas Instruments Incorporated Correcting for errors that cause generated digital codes to deviate from expected values in an ADC
EP2197117B1 (en) * 2008-12-11 2013-07-31 Siemens Aktiengesellschaft Switching unit for creating an output voltage depending on a digital data value and method for calibrating the switching unit
CN104678896B (en) * 2015-02-11 2018-06-08 北京配天技术有限公司 Means for correcting, method and the digital control system of digital analog converter
CN104767524B (en) * 2015-04-17 2018-06-19 上海华虹宏力半导体制造有限公司 ADC adaptive-filtering digital calibrating methods
CN106941354B (en) * 2017-04-17 2020-10-02 北京机械设备研究所 Hardware circuit correction method based on mathematical fitting
CN107302359B (en) * 2017-06-21 2020-10-16 中国电子科技集团公司第二十四研究所 Variable weight sub-DAC (digital-to-analog converter) correction method of high-precision successive approximation structure ADC (analog-to-digital converter)
CN112165328B (en) * 2020-09-03 2022-05-13 三诺生物传感股份有限公司 ADC digital-to-analog conversion error correction method, device and medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6963300B1 (en) * 2004-02-04 2005-11-08 National Semiconductor Corporation Pipeline analog-to-digital converter
US8031092B1 (en) * 2009-01-16 2011-10-04 President And Fellows Of Harvard College Dual-mode based digital background calibration of pipelined ADCs for gain variations and device mismatches
CN107941417A (en) * 2017-11-10 2018-04-20 苏州华兴源创电子科技有限公司 The output calibrating installation and method of a kind of pressure sensor
CN207423441U (en) * 2017-11-10 2018-05-29 苏州华兴源创电子科技有限公司 A kind of output calibrating installation of pressure sensor

Also Published As

Publication number Publication date
CN112165328A (en) 2021-01-01
WO2022048499A1 (en) 2022-03-10

Similar Documents

Publication Publication Date Title
CN112165328B (en) ADC digital-to-analog conversion error correction method, device and medium
CN103051339B (en) A kind of AD sampling value correcting method and system
CN109887522B (en) Microphone array gain adjusting method and device and terminal equipment
WO2021063058A1 (en) Adc (error automatic correction) method and apparatus, analog-digital conversion circuit and storage medium
CN115616266B (en) Waveform amplitude value measuring method and device, terminal equipment and storage medium
US9813074B2 (en) Calibration of interpolating string digital-to-analog converters
US20180211278A1 (en) Information release method, information release apparatus, and storage medium
CN109408970B (en) A kind of D conversion method, device and a kind of analog-digital converter
JP2013025467A (en) Approximation operation circuit for logarithmic function
CN112836170A (en) Data coordinate conversion method and device
CN109687870B (en) Charge redistribution type SARADC capacitance mismatch correction method and system
CN111506382A (en) Progress bar curve determination method and device, storage medium and electronic equipment
CN114970253B (en) Angle calculation method of vertical shaft drilling machine, terminal and storage medium
KR20200034034A (en) System and method for calibrating offset of analog to digital converter
CN115694493A (en) Gain error calibration method, device, computer equipment and medium
CN111490786B (en) Calibration method and device of digital-to-analog converter
US10917099B2 (en) Method and device for improving output accuracy of digital-to-analogue converter
CN116186471A (en) Index function-based table lookup method and device, electronic equipment and storage medium
CN115983354B (en) High-precision adjustable general activation function implementation method
CN113435058B (en) Data dimension reduction method, system, terminal and medium for distribution network self-healing test model
CN110389746B (en) Hardware acceleration circuit, micro control chip and system
CN210274034U (en) High-precision DAC
Tatsumi et al. A calibration with an adaptive data selection based on Bayes estimation for a successive stochastic approximation ADC system
A. AKANBI Propagation of errors in numerical computations
CN115913227A (en) Analog-to-digital converter nonlinear correction method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant