CN116505947B - Analog-to-digital converter calibration method, device, storage medium and chip - Google Patents

Analog-to-digital converter calibration method, device, storage medium and chip Download PDF

Info

Publication number
CN116505947B
CN116505947B CN202310770172.6A CN202310770172A CN116505947B CN 116505947 B CN116505947 B CN 116505947B CN 202310770172 A CN202310770172 A CN 202310770172A CN 116505947 B CN116505947 B CN 116505947B
Authority
CN
China
Prior art keywords
data
target
calibration
analog
tested
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
CN202310770172.6A
Other languages
Chinese (zh)
Other versions
CN116505947A (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.)
Beijing Thinking Semiconductor Technology Co ltd
Original Assignee
Beijing Thinking Semiconductor Technology Co ltd
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 Beijing Thinking Semiconductor Technology Co ltd filed Critical Beijing Thinking Semiconductor Technology Co ltd
Priority to CN202310770172.6A priority Critical patent/CN116505947B/en
Publication of CN116505947A publication Critical patent/CN116505947A/en
Application granted granted Critical
Publication of CN116505947B publication Critical patent/CN116505947B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M1/00Analogue/digital conversion; Digital/analogue conversion
    • H03M1/10Calibration or testing
    • H03M1/1009Calibration

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Analogue/Digital Conversion (AREA)

Abstract

The present disclosure relates to the field of integrated circuit design, and in particular, to a method and apparatus for calibrating an analog-to-digital converter, a storage medium, and a chip for calibrating the analog-to-digital converter, thereby improving conversion accuracy thereof, where the method includes: acquiring first data to be tested and first output data, wherein the first output data is output data after the target analog-to-digital converter performs analog-to-digital conversion according to the first data to be tested; weighting factors are given to each data in the first data to be measured, and initial calibration values are obtained according to the first data to be measured and the first output data after the weighting factors are given; calibrating the first output data according to the initial calibration value to obtain first calibration data; acquiring a first error value between the first calibration data and first data to be tested, and determining first target data to be tested according to the first error value; and obtaining a first target calibration value according to the first target data to be measured and the first target output data corresponding to the first target data to be measured.

Description

Analog-to-digital converter calibration method, device, storage medium and chip
Technical Field
The present disclosure relates to the field of integrated circuit design, and in particular, to a method, apparatus, storage medium, and chip for calibrating an analog-to-digital converter.
Background
An analog-to-digital converter (Analog To Digital Converter, ADC), which is a device that converts a continuous variable analog signal into a discrete digital signal, converts the analog signal into a digital signal representing a proportional voltage value. For example, a broadband power line carrier communication chip for photovoltaic needs to accurately measure signals such as temperature, voltage, current and the like, and the analog signals can be converted into digital signals which are convenient to calculate and store through an ADC.
In the practical application process of the ADC, offset errors, gain errors and nonlinear errors exist, so that the conversion result of the ADC is inaccurate, and along with the high preset precision requirement on the conversion result of the ADC, the precision of ADC calibration is mainly improved from a hardware level in the related art, so that the ADC still has the technical problems of low consistency, poor precision, low automation degree of the calibration method, human factors and the like.
Disclosure of Invention
The invention aims to provide a calibration method, a device, a storage medium and a chip of an analog-to-digital converter, which calibrate the analog-to-digital converter so as to improve the conversion precision of the analog-to-digital converter.
To achieve the above object, in a first aspect, the present disclosure provides an analog-to-digital converter calibration method, the method comprising:
Acquiring first data to be detected and first output data, wherein the first output data is output after the target analog-to-digital converter performs analog-to-digital conversion according to the first data to be detected;
weighting factors are given to each data in the first data to be measured, and initial calibration values are obtained according to the data to be measured and the first output data after the weighting factors are given;
calibrating the first output data according to the initial calibration value to obtain first calibration data;
acquiring a first error value between the first calibration data and the first data to be tested, and determining first target data to be tested according to the first error value;
and obtaining a first target calibration value according to the first target data to be measured and the first target output data corresponding to the first target data to be measured, wherein the first target calibration value is used for calibrating the target analog-to-digital converter.
Optionally, the analog-to-digital converter calibration method further includes:
acquiring second to-be-detected data and second output data, wherein the second to-be-detected data comprises any data in the rest input data except the to-be-detected data in the input data of a target analog-to-digital converter, and the second output data is data output after the target analog-to-digital converter performs analog-to-digital conversion according to the second to-be-detected data;
Calibrating the second output data according to the first target calibration value to obtain second calibration data;
acquiring a second error value between the second calibration data and the second data to be measured, and determining second target data to be measured according to the second error value;
and obtaining a second target calibration value according to the second target data to be measured and second target output data corresponding to the second target data to be measured, wherein the second target calibration value is used for recalibrating the target analog-to-digital converter.
Optionally, the analog-to-digital converter calibration method further includes:
circularly executing the steps of acquiring first data to be tested and first output data to acquire a first error value between the first calibration data and the first data to be tested, determining first target data to be tested according to the first error value, and matching the first target data to be tested acquired each time with a preset precision requirement and a preset cost requirement to obtain a matching result until the first target data to be tested meeting the preset precision requirement and the preset cost requirement is obtained;
the obtaining a first target calibration value according to the first target to-be-measured data and the first target output data corresponding to the first target to-be-measured data includes:
And obtaining a first target calibration value according to the first target data to be tested meeting the preset precision requirement and the preset cost requirement and the first target output data corresponding to the first target data to be tested.
Optionally, the analog-to-digital converter calibration method further includes:
according to the matching result obtained last time, adjusting the data number of the first data to be tested, which is obtained in the next cycle;
the method comprises the steps of determining a matching result of a first data to be tested, wherein the matching result is that the matching result meets the preset precision requirement and the matching result does not meet the preset cost requirement, and reducing the number of the first data to be tested acquired in the next cycle;
or alternatively, the process may be performed,
and under the condition that the matching result does not meet the preset precision requirement, increasing the data number of the first to-be-tested data acquired in the next cycle.
Optionally, the weighting factor is obtained by the following formula:
W=[diag(1/X[i])] 2
wherein W represents a weighting factor, X [ i ] represents first data to be tested, i represents the number of data, and diag () represents a diagonal matrix.
Optionally, the initial calibration value is obtained by the following formula:
θ=(A T WA) -1 A T WY;
wherein θ characterizes the initial calibration value, θ= [ k, b] T K represents a gain error, b represents a bias error, a represents test data determined from first data to be tested, W represents a weighting factor, and Y represents first output data.
Optionally, the transmission characteristics of the calibrated target analog-to-digital converter include:
Y[n]=kX[n]+b+N,
wherein Y [ N ] represents first target output data, X [ N ] represents first target data to be detected, N represents target data number, k represents gain error, b represents bias error, and N represents noise vector.
In a second aspect, the present disclosure provides an analog-to-digital converter calibration apparatus, the apparatus comprising:
the acquisition module is configured to acquire first to-be-detected data and first output data, wherein the first output data is output data after the target analog-to-digital converter performs analog-to-digital conversion according to the first to-be-detected data;
the first execution module is configured to assign a weighting factor to each piece of data in the first data to be tested, and obtain an initial calibration value according to the first data to be tested and the first output data after the weighting factor is assigned;
the calibration module is configured to calibrate the first output data according to the initial calibration value to obtain first calibration data;
the adjustment module is configured to acquire a first error value between the first calibration data and the first data to be tested, and determine first target data to be tested according to the first error value;
The second execution module is configured to obtain a first target calibration value according to the first target to-be-measured data and first target output data corresponding to the first target to-be-measured data, wherein the first target calibration value is used for calibrating the target analog-to-digital converter.
In a third aspect, the present disclosure provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method of the first aspect.
In a fourth aspect, the present disclosure provides a chip comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the method of the first aspect.
According to the technical scheme, the weighting factors are given to each piece of data in the first data to be tested, the initial calibration value is obtained according to the first data to be tested and the first output data after the weighting factors are given, the relative accuracy of the ADC is improved, and the first output data is calibrated according to the initial calibration value to obtain the first calibration data; according to a first error value between first calibration data and first data to be measured, determining first target data to be measured, wherein the first target data to be measured is the data to be measured which simultaneously meets the calibration preset cost requirement and the calibration preset precision requirement of the ADC, and obtaining a first target calibration value according to the first target data to be measured and first target output data corresponding to the first target data to be measured, so as to calibrate a target analog-to-digital converter according to the first target calibration value, the whole calibration process does not need human interference, automatic calibration of the analog-to-digital converter is realized, and the calibration precision is high.
Additional features and advantages of the present disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings are included to provide a further understanding of the disclosure, and are incorporated in and constitute a part of this specification, illustrate the disclosure and together with the description serve to explain, but do not limit the disclosure. In the drawings:
fig. 1 is a flow chart illustrating a method of calibrating an analog-to-digital converter according to an exemplary embodiment of the present disclosure.
Fig. 2 is another flow chart illustrating a method of analog to digital converter calibration according to an exemplary embodiment of the present disclosure.
Fig. 3 is yet another flow chart of an analog-to-digital converter calibration method according to an exemplary embodiment of the present disclosure.
Fig. 4a is a calibration effect diagram of an analog-to-digital converter calibration method according to an exemplary embodiment of the present disclosure.
Fig. 4b is another calibration effect diagram of an analog-to-digital converter calibration method according to an exemplary embodiment of the present disclosure.
Fig. 5 is a block diagram of an analog-to-digital converter calibration apparatus according to an exemplary embodiment of the present disclosure.
Fig. 6 is a block diagram of a chip shown according to an exemplary embodiment of the present disclosure.
Detailed Description
Specific embodiments of the present disclosure are described in detail below with reference to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating and illustrating the disclosure, are not intended to limit the disclosure.
It should be noted that, in the present disclosure, all the actions of acquiring the data to be measured are performed under the condition of conforming to the corresponding policy of the data protection rule of the country of the location and obtaining the authorization given by the owner of the corresponding device.
As the background technology is, the related technology mainly improves the accuracy of ADC calibration from the hardware level, so that the ADC still has the technical problems of low consistency, poor accuracy, low automation degree of the calibration method, human factors existing in the calibration method and the like.
Besides, in the related art, the minimum idea of the square sum of errors is adopted, so that the absolute value of the error of the input data of the ADC near the full amplitude meets the absolute preset precision requirement, but if the absolute value of the error meets the absolute precision under the condition that the input data of the ADC is near zero, the relative error percentage of the data with small numerical value in the input data of the ADC is large, and therefore the calibration result of the ADC is unreliable.
In view of this, the present disclosure provides a calibration method, device, storage medium and chip for an analog-to-digital converter, which can obtain a first target calibration value of the analog-to-digital converter according to suitable first data to be measured, the whole calibration process does not need human intervention, and an automatic calibration of the analog-to-digital converter is realized, and a weighting factor is given to each data in the first data to be measured in the acquisition process, so that the relative precision of the analog-to-digital converter is improved, and the calibration precision of the analog-to-digital converter is further improved.
Fig. 1 shows a flow chart of an analog-to-digital converter calibration method according to an exemplary embodiment of the present disclosure, referring to fig. 1, the analog-to-digital converter calibration method may include the steps of:
in step S11, first data to be tested and first output data are obtained, where the first output data are output data after the target analog-to-digital converter performs analog-to-digital conversion according to the first data to be tested.
And the data number of the first data to be tested is smaller than the maximum data number which can be input by the target analog-to-digital converter, so that the target analog-to-digital converter is calibrated by a small amount of data, the calibration time is shortened, the calibration cost is reduced, and the calibration speed is improved.
For example, in the case where the maximum number of data that can be input by the target analog-to-digital converter is 1024, the number of data of the first data to be measured may be any number of data less than 1024, for example, the number of data of the first data to be measured may be 6, 10, 20, or the like.
In step S12, a weighting factor is given to each data in the first data to be measured, and an initial calibration value is obtained according to the first data to be measured and the first output data after the weighting factor is given.
The initial calibration value may be calculated by a least square method according to the first data to be measured and the first output data after the weighting factors are given, or may be calculated by a weighted least square method according to the first data to be measured and the first output data after the weighting factors are given.
For example, the ideal transmission characteristic of the ADC is y=x, where Y represents the ideal output data of the ADC, and X represents the input data of the ADC, but the ADC has a bias error b and a gain error k during actual operation, i.e., the actual transmission characteristic of the ADC is y=kx+b; bias error refers to the difference between the conversion function and the ideal straight line of the ADC at zero input; gain error refers to the degree of deviation of the actual transmission characteristic of the ADC from the ideal transmission characteristic. The present disclosure defines the bias error and gain error of the ADC as calibration values.
In step S13, the first output data is calibrated according to the initial calibration value, so as to obtain first calibration data.
The ADC is affected by offset errors and gain errors in the actual operation process, and output data corresponding to original input data output by the ADC fluctuates in a certain range, so that errors exist between first calibration data obtained by reversely pushing the ADC according to the first output data and an initial calibration value and the original input data.
Illustratively, X [ i ] is input to a target analog-to-digital converter, the target analog-to-digital converter outputs Y [ i ], and X [ i ] are derived in a reverse direction from Y [ i ] and an initial calibration value θ of the target analog-to-digital converter, and errors exist in X [ i ] and X [ i ].
In step S14, a first error value between the first calibration data and the first data to be measured is obtained, and the first target data to be measured is determined according to the first error value.
And adjusting the data number of the first data to be tested according to the relation between the first error and the preset precision requirement and the preset cost requirement, so as to determine the first target data to be tested.
In step S15, a first target calibration value is obtained according to the first target to-be-measured data and the first target output data corresponding to the first target to-be-measured data, where the first target calibration value is used for calibrating the target analog-to-digital converter.
According to the method and the device, the target analog-to-digital converter is calibrated through a small amount of data, so that the calibration time is shortened, the calibration cost is reduced, and the calibration speed is improved; weighting factors are given to each data in the first data to be tested, so that the relative precision of the target analog-to-digital converter is improved; according to the relation between the first error value and the preset precision requirement and the preset cost requirement, the data number of the first data to be tested is adjusted to determine the first target data to be tested, the reliability of a calibration result is guaranteed, the whole calibration process is free from human interference, and automatic calibration of the analog-to-digital converter is achieved.
In order to facilitate a better understanding of the analog-to-digital converter calibration method provided by the present disclosure, the following describes in detail the relevant steps of the analog-to-digital converter calibration method.
In a possible embodiment, the analog-to-digital converter calibration method further includes:
and circularly executing the steps of acquiring the first data to be measured and the first output data until the first error value between the first calibration data and the first data to be measured is acquired, determining the first target data to be measured according to the first error value, and matching the first target data to be measured acquired each time with a preset precision requirement and a preset cost requirement to obtain a matching result until the first target data to be measured meeting the preset precision requirement and the preset cost requirement is obtained.
The data length of the first data to be tested changes along with the number of the loops, and the first data to be tested acquired in the next loop is different from the first data to be tested in the last loop.
In step S15, obtaining a first target calibration value according to the first target to-be-measured data and the first target output data corresponding to the first target to-be-measured data includes:
and obtaining a first target calibration value according to the first target data to be tested meeting the preset precision requirement and the preset cost requirement and the first target output data corresponding to the first target data to be tested.
The preset precision requirement can be preset according to the calibration precision requirement of the target analog-to-digital converter, and can be an error threshold value or an error interval. The calibration accuracy of the target analog-to-digital converter is in direct proportion to the number of data to be measured, the more the number of data of the data to be measured is, the higher the calibration accuracy is, the fewer the number of data of the data to be measured is, and the lower the calibration accuracy is.
For example, in the case that the preset precision requirement is the error threshold, matching the error value with the preset precision requirement includes: judging whether the error value is smaller than or equal to an error threshold value; under the condition that the preset precision requirement is an error interval, matching the error value with the preset precision requirement comprises the following steps: and judging whether the error value is in an error interval or not.
The preset cost requirement can be preset according to the calibration cost of the target analog-to-digital converter, and can be a cost threshold or a cost interval. The calibration cost of the target analog-to-digital converter is in direct proportion to the number of data of the data to be tested, the more the number of data of the data to be tested is, the higher the calibration cost is, the less the number of data of the data to be tested is, and the lower the calibration cost is.
For example, in the case where the preset cost requirement is a cost threshold, matching the error value with the preset cost requirement includes: determining a calibration cost corresponding to the error value, and judging whether the calibration cost is less than or equal to a cost threshold; under the condition that the preset cost requirement is a cost interval, matching the error value with the preset cost requirement comprises the following steps: and determining the calibration cost corresponding to the error value, and judging whether the calibration cost is in a cost interval.
The error value is limited through the preset precision requirement and the preset cost requirement, so that the data number of the data to be tested is adjusted, and the accuracy and the reliability of the target calibration value obtained according to the target data to be tested are ensured.
In a possible embodiment, the analog-to-digital converter calibration method may further include:
according to the matching result obtained in the last time, the data number of the first data to be tested, which is obtained in the next cycle, is adjusted;
and under the condition that the matching result meets the preset precision requirement and does not meet the preset cost requirement, reducing the number of the first data to be tested acquired in the next cycle.
For example, when the preset precision requirement is an error threshold, the preset cost requirement is a cost threshold, the matching result is that the error value is smaller than or equal to the error threshold, and the calibration cost of the corresponding error value is greater than the cost threshold, a part of the data to be measured from the first data to be measured acquired last time is selected as the first data to be measured acquired in the next cycle, so that the calibration cost of the corresponding error value is reduced.
Or alternatively, the process may be performed,
and under the condition that the matching result does not meet the preset precision requirement, increasing the data number of the first to-be-tested data acquired in the next cycle.
For example, the preset precision requirement is an error threshold, the preset cost requirement is a cost threshold, and when the matching result is that the error value is greater than the error threshold, new data to be tested is added as the first data to be tested acquired in the next cycle on the basis of the first data to be tested acquired in the last time, so that the error value is reduced.
Under the condition that the matching result is that the preset precision requirement is not met, part of the data to be tested is selected from the first data to be tested which is acquired last time to serve as the first data to be tested which is acquired next time in a circulating mode, so that the data to be tested which meets the preset precision requirement is determined, new data to be tested is added to serve as the first data to be tested which is acquired next time in a circulating mode on the basis of the first data to be tested which is acquired last time, and the first target data to be tested which meets the preset precision requirement and the preset cost requirement simultaneously is determined.
In a possible embodiment, the weighting factor of the first data to be measured is obtained by the following formula:
W=[diag(1/X[i])] 2
wherein W represents a weighting factor, X [ i ] represents first data to be tested, i represents the number of data, and diag () represents a diagonal matrix.
Wherein, the larger the value of the data in the first data to be tested is, the smaller the weighting factor of the data is; the smaller the value of the data in the first data to be measured, the larger the weighting factor of the data.
Illustratively, at the first data under test X [ i ]]Is X1, 2, 5, 6, 8, 9]In the case of (1), the weighting factor w= [ diag (1)] 2 Weighting factor w= [ diag (1/2) for data 2] 2 Weighting factor w= [ diag (1/5) for data 5] 2 Weighting factor w= [ diag (1/6) for data 6] 2 Weighting factor w= [ diag (1/8) ] for data 8] 2 Weighting factor w= [ diag (1/9) for data 9] 2
According to the method and the device, the larger weighting factor is given to the data with the small value in the first data to be tested, the smaller weighting factor is given to the data with the large value in the first data to be tested, so that the relative error percentage of the data with the small value in the input data of the analog-to-digital converter is prevented from being too large, and the relative precision of the analog-to-digital converter is improved.
In a possible embodiment, the initial calibration value is obtained by the following formula:
θ=(A T WA) -1 A T WY;
wherein θ characterizes the initial calibration value, θ= [ k, b] T K represents a gain error, b represents a bias error, a represents test data determined from first data to be tested, W represents a weighting factor, and Y represents first output data.
In order to ensure that the equation can operate normally, the column vector 1 needs to be added to the data to be tested X [ i ] to determine the test data a= [ X [ i ], 1] corresponding to the data to be tested X [ i ] because of the offset error b.
Illustratively, at data under test X [ i ]]Is [ x ] 1 、x 2 、x 3 、x 4 、x 5 、x 6 ]In the case of (1), the test data corresponding to the data to be tested is [ x ] 1 、x 2 、x 3 、x 4 、x 5 、x 6 、1]Is simplified as [ X [ i ]]、1]。
The method and the device calculate an initial calibration value of the analog-to-digital converter through the first data to be measured, the first output data and the transmission characteristics of the analog-to-digital converter.
For example, the first data to be measured X is [ X ] 1 、x 2 、x 3 、x 4 、x 5 、x 6 ] T The first output data Y is [ Y ] 1 、y 2 、y 3 、y 4 、y 5 、y 6 ] T The test error introduces a noise vector N, N being [ N ] 1 、n 2 、n 3 、n 4 、n 5 、n 6 ] T The transmission characteristics of the analog-to-digital converter are as follows:
the simplification is as follows: y=kx+b+n.
In order to estimate the gain error k and the offset error b, it is assumed that the parameter vectors of the gain error k and the offset error b are the calibration values θ, and θ= [ k, b ] is obtained] T The actual transmission characteristic of the analog-to-digital converter is y=aθ+n.
Where A and Y are known, in case N is Gaussian white noise, to estimate θ, a cost function is obtained: i (θ) = [ (Y-aθ) T diag(1/X)][diag(1/X)(Y-Aθ)]W= [ diag (1/X [ i ]])] 2 Substituting the cost function to obtain I (θ) = (Y-aθ) T W(Y-Aθ)。
Simplifying the cost function to obtain theta= (A) T WA) -1 A T WY. The present disclosure does not limit the transmission characteristics of the analog-to-digital converter, and it is within the protection scope of the present disclosure to respectively assign weighting factors to input data of the analog-to-digital converter based on a weighted least square method to realize calibration of the analog-to-digital converter.
For example, the ideal transmission characteristic in an analog-to-digital converter is y=k 1 X 2 +k 2 Under the condition of X, the calibration is carried out by the calibration method of the analog-to-digital converter provided by the disclosure, and the actual transmission characteristic of the analog-to-digital converter is obtained as Y [ i ]]=k 1 X[i] 2 +k 2 X[i]+b。
In a possible embodiment, the transmission characteristics of the calibrated target analog-to-digital converter include:
Y[n]=kX[n]+b+N,
wherein Y [ N ] represents first target output data, X [ N ] represents first target data to be detected, N represents target data number, k represents gain error, b represents bias error, and N represents noise vector.
For example, in case the first target calibration value comprises a gain error k and a bias error b, the target analog-to-digital converter may be calibrated by the following formula:
Y[n]=kX[n]+b+N,
wherein Y [ N ] represents output data of the target analog-to-digital converter, X [ N ] represents data to be detected input to the target analog-to-digital converter, N represents data number of the data to be detected, k represents gain error, b represents bias error, and N represents noise vector.
In a possible embodiment, referring to fig. 2, the analog-to-digital converter calibration method may further comprise the steps of:
in step S21, second data to be measured including any data in the remaining input data except the first data to be measured in the input data of the target analog-to-digital converter and second output data which is output after the target analog-to-digital converter performs analog-to-digital conversion according to the second data to be measured are obtained.
In order to determine the first target data to be measured, a plurality of first data to be measured are acquired in a cyclic process, the second data to be measured are different from the first data to be measured, and the second data to be measured comprise any data in the rest input data except the first data to be measured in the input data of the target analog-to-digital converter.
Illustratively, a second data under test X [ j ] is obtained]And second output data Y [ j ]]The input data of the target analog-to-digital converter has 1024 data and the first data X [ i ] to be tested]In the case where i is 6, X [ j ]]Including at X [ X ] 1 、x 2 、x 3 、x 4 、x 5 、x 6 ] T Increasing the division of X [ X ] in the input data based on 1 、x 2 、x 3 、x 4 、x 5 、x 6 ] T Any of the remaining input data other than X [ X ] 1 、x 2 、x 3 、x 4 、x 5 、x 6 、x 7 ] T
In step S22, the second output data is calibrated according to the first target calibration value, so as to obtain second calibration data.
Wherein the first target calibration value is also obtained by the following formula:
θ 1 =(A 1 T W 1 A 1-1 A 1 T W 1 Y 1
wherein θ 1 Characterizing a first target calibration value, θ 1 =[k,b] T K represents gain error, b represents bias error, A 1 Characterizing test data, W, determined from first target test data 1 Characterizing the weighting factors, Y 1 The first output data is characterized.
The weighting factor of each datum in the first target data to be measured is obtained through the following formula:
W 1 =[diag(1/X[j])] 2
Wherein W is 1 Characterizing the weighting factor, X [ j ]]Characterizing the first target data to be measured, diag () characterizes the diagonal matrix.
Illustratively, X [ j ]]Input to a target analog-to-digital converter, which outputs Y [ j ]]According to Y [ j ]]And a first target calibration value θ of the target analog-to-digital converter 1 Reverse derivation to obtain X' [ j ]],X[j]And X' [ j ]]There is an error.
In step S23, a second error value between the second calibration data and the second data to be measured is obtained, and the second target data to be measured is determined according to the second error value.
The step of circularly executing the steps of acquiring the second data to be measured and the second output data to acquire the second error value between the second calibration data and the second data to be measured, determining the second target data to be measured according to the second error value, and matching the second target data to be measured acquired each time with a preset precision requirement and a preset cost requirement to obtain a matching result until the second target data to be measured meeting the preset precision requirement and the preset cost requirement is obtained.
In step S24, a second target calibration value is obtained according to the second target to-be-measured data and the second target output data corresponding to the second target to-be-measured data, where the second target calibration value is used for recalibrating the target analog-to-digital converter.
The data number of the second data to be tested, which is acquired in the next cycle, is adjusted according to the latest matching result, and the data number of the first data to be tested, which is acquired in the next cycle, is reduced under the condition that the matching result meets the preset precision requirement and does not meet the preset cost requirement; and under the condition that the matching result does not meet the preset precision requirement, increasing the data number of the first to-be-tested data acquired in the next cycle.
According to the method and the device, the first target calibration value determined according to the first target calibration value is checked through the second to-be-detected data comprising any data of the rest data except the to-be-detected data in the input data of the target analog-to-digital converter, and the first to-be-detected data is adjusted until the second target data meeting the preset precision requirement and the preset cost requirement is obtained under the condition that the first target calibration value does not meet the preset precision requirement or meets the preset cost requirement, so that the accuracy and the reliability of the target analog-to-digital converter are improved.
For example, referring to fig. 3, the analog-to-digital converter calibration method provided by the present disclosure may include the steps of:
in step S31, the first data to be measured X [ i ] input to the ADC to be calibrated is obtained, and the number of data of the first data to be measured is i.
In step S32, first output data Y [ i ] of the ADC to be calibrated according to the first data X [ i ] to be measured is obtained.
In step S33, an initial calibration value θ is calculated from X [ i ] and Y [ i ].
In step S34, Y [ i ] is calibrated according to the initial calibration value θ, and first calibration data X [ i ] is obtained.
In step S35, a first error between the first data to be measured X [ i ] and the first calibration data X' i is obtained, and a relationship between the first error and the preset precision requirement and the preset cost requirement is determined. In the case where the first error does not meet the preset accuracy requirement, i is increased, and the process returns to step S31. In the case where the first error satisfies the preset accuracy requirement and does not satisfy the preset cost requirement, i is reduced, and the process returns to step S31.
In step S36, under the condition that the first error meets both the preset precision requirement and the preset cost requirement, the second data X [ j ] to be measured is obtained, and the ADC to be calibrated outputs the output data Y [ j ] according to the second data X [ j ], where the number of data of the second data X [ j ] is j, and j includes any data number except i.
In step S37, Y [ j ] is calibrated according to the initial calibration value θ to obtain second calibration data X [ j ].
In step S38, a second error value of the second data X [ j ] to be measured and the second calibration data X' j is obtained, and a relationship between the second error value and a preset precision requirement and a preset cost requirement is determined. In the case where the second error does not meet the preset accuracy requirement, i is increased, and the process returns to step S31. And in the case that the second error meets the preset precision requirement and does not meet the preset cost requirement, reducing i, and returning to the step S31.
In step S39, under the condition that the second error value meets both the preset precision requirement and the preset cost requirement, the first data to be tested X [ i ] of the current cycle is determined to be the first target data to be tested X [ n ].
In step S310, the first target data X [ n ] to be tested is determined]Corresponding to X [ n ]]Y [ n ] of (2)]Calculating to obtain a first target calibration value theta 1
Referring to fig. 4a, if the calibration is performed by the least square method in step S33 and step S310, the corresponding error value of the calibrated analog-to-digital converter is controlled within 2.5% when the value of the input data is smaller. Referring to fig. 4b, if calibration is performed by the weighted least square method in step S33 and step S310, the corresponding error value of the calibrated analog-to-digital converter may be controlled within 0.3% when the value of the input data is smaller. It can be seen that the calibration by the weighted least squares method works better.
According to the method and the device, the number of the first data to be measured of the ADC to be calibrated is controlled, the first target data to be measured which simultaneously meet the preset cost requirement and the preset precision requirement can be obtained, the data with large numerical value in the input data of the ADC to be calibrated is endowed with a smaller weighting factor, the data with small numerical value is endowed with a larger weighting factor, so that the relative precision of the ADC after the ADC to be calibrated is improved, the weighted least square method is adopted for calibration, the reliability of a calibration result is improved, a second target calibration value is obtained according to the second target data to be measured and the second output data corresponding to the second target data to be measured, and the ADC to be calibrated is calibrated again according to the second target calibration value. The whole process does not need human intervention, hardware is not improved, and automatic calibration of the ADC is realized.
Based on the same inventive concept, the present disclosure further provides an analog-to-digital converter calibration apparatus, referring to fig. 5, the analog-to-digital converter calibration apparatus 500 includes an acquisition module 501, a first execution module 502, a calibration module 503, an adjustment module 504, and a second execution module 505.
The acquiring module 501 is configured to acquire first to-be-detected data and first output data, where the first output data is output after the target analog-to-digital converter performs analog-to-digital conversion according to the first to-be-detected data.
The first execution module 502 is configured to assign a weighting factor to each of the first data to be measured, and obtain an initial calibration value according to the first data to be measured and the first output data after the weighting factor is assigned.
The calibration module 503 is configured to calibrate the first output data according to the initial calibration value, so as to obtain first calibration data.
The adjustment module 504 is configured to obtain a first error value between the first calibration data and the first data to be measured, and determine the first target data to be measured according to the first error value.
The second execution module 505 is configured to obtain a first target calibration value according to the first target to-be-measured data and the first target output data corresponding to the first target to-be-measured data, where the first target calibration value is used for calibrating the target analog-to-digital converter.
According to the method and the device, the target analog-to-digital converter is calibrated through a small amount of data, so that the calibration time is shortened, the calibration cost is reduced, and the calibration speed is improved; weighting factors are given to each data in the first data to be tested, so that the relative precision of the target analog-to-digital converter is improved; according to the relation between the first error value and the preset precision requirement and the preset cost requirement, the data number of the first data to be tested is adjusted to determine the first target data to be tested, the reliability of a calibration result is guaranteed, the whole calibration process is free from human interference, and automatic calibration of the analog-to-digital converter is achieved.
Further, the obtaining module 501 is further configured to obtain second to-be-detected data and second output data, where the second to-be-detected data includes any data in remaining input data except for to-be-detected data in input data of the target analog-to-digital converter, and the second output data is data output after the target analog-to-digital converter performs analog-to-digital conversion according to the second to-be-detected data.
The calibration module 503 is further configured to calibrate the second output data according to the first target calibration value, to obtain second calibration data.
The adjustment module 504 is further configured to obtain a second error value between the second calibration data and the second data to be measured, and determine second target data to be measured according to the second error value;
the second execution module 505 is configured to obtain a second target calibration value according to the second target to-be-measured data and the second target output data corresponding to the second target to-be-measured data, where the second target calibration value is used for recalibrating the target analog-to-digital converter.
Further, the acquiring module 501 to the adjusting module 504 circularly execute the steps of acquiring the first data to be measured and the first output data to acquire the first error value between the first calibration data and the first data to be measured, determining the first target data to be measured according to the first error value, and matching the first target data to be measured acquired each time with a preset precision requirement and a preset cost requirement to obtain a matching result until the first target data to be measured meeting the preset precision requirement and the preset cost requirement is obtained;
The adjustment module 504 is configured to obtain a first target calibration value according to the first target data to be measured that meets the preset precision requirement and the preset cost requirement and the first target output data corresponding to the first target data to be measured.
Further, the adjusting module 504 is configured to adjust the number of the first data to be tested acquired in the next cycle according to the matching result obtained last time; under the condition that the matching result meets the preset precision requirement and does not meet the preset cost requirement, reducing the number of the first data to be tested acquired in the next cycle;
or alternatively, the process may be performed,
and under the condition that the matching result does not meet the preset precision requirement, increasing the data number of the first to-be-tested data acquired in the next cycle.
Further, the first execution module 502 is configured to obtain the weighting factor by performing the following steps:
W=[diag(1/X[i])] 2
wherein W represents a weighting factor, X [ i ] represents first data to be tested, i represents the number of data, and diag () represents a diagonal matrix.
Further, the first execution module 502 is configured to obtain the initial calibration value by performing the following steps:
θ=[A T WA] -1 A T WY;
wherein θ characterizes the initial calibration value, θ= (k, b) T K represents a gain error, b represents a bias error, a represents test data determined from first data to be tested, W represents a weighting factor, and Y represents first output data.
Further, the transmission characteristics of the calibrated target analog-to-digital converter include:
Y[n]=kX[n]+b+N,
wherein Y [ N ] represents first target output data, X [ N ] represents first target data to be detected, N represents the number of target data, i represents the number of data, k represents gain error, b represents bias error, and N represents noise vector.
The specific manner in which the various modules perform the operations of the analog-to-digital converter calibration apparatus 500 of the above embodiment has been described in detail in relation to the embodiments of the method, and will not be described in detail herein.
Based on the same inventive concept, the present disclosure also provides a chip comprising:
a memory having a computer program stored thereon;
and a processor for executing the computer program in the memory to implement the steps of the analog-to-digital converter calibration method.
According to the method and the device, the target analog-to-digital converter is calibrated through a small amount of data, so that the calibration time is shortened, the calibration cost is reduced, and the calibration speed is improved; weighting factors are given to each data in the data to be tested, so that the relative precision of the target analog-to-digital converter is improved; according to the relation between the first error value and the preset precision requirement and the preset cost requirement, the number of the data to be tested is adjusted to determine the target data to be tested, the reliability of the calibration result is ensured, the whole calibration process is free from human interference, and the automatic calibration of the analog-to-digital converter is realized.
Fig. 6 is a block diagram of a chip 600 shown in accordance with an exemplary embodiment, referring to fig. 6, the chip 600 includes a processor 622, which may be one or more in number, and a memory 632 for storing computer programs executable by the processor 622. The computer program stored in memory 632 may include one or more modules each corresponding to a set of instructions. Further, the processor 622 may be configured to execute the computer program to perform the analog-to-digital converter calibration method described above.
In addition, chip 600 may further include a power supply component 626 and a communication component 650, where power supply component 626 may be configured to perform power management of chip 600, and communication component 650 may be configured to enable communication of chip 600, e.g., wired or wireless communication. In addition, the chip 600 may also include an input/output (I/O) interface 658. Chip 600 may operate based on an operating system stored in memory 632.
In another exemplary embodiment, a computer readable storage medium is also provided comprising program instructions which, when executed by a processor, implement the steps of the analog-to-digital converter calibration method described above. For example, the non-transitory computer readable storage medium may be the memory 632 described above that includes program instructions that are executable by the processor 622 of the chip 600 to perform the analog-to-digital converter calibration method described above.
In another exemplary embodiment, a computer program product is also provided, comprising a computer program executable by a programmable apparatus, the computer program having code portions for performing the above-described analog-to-digital converter calibration method when executed by the programmable apparatus.
The preferred embodiments of the present disclosure have been described in detail above with reference to the accompanying drawings, but the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solutions of the present disclosure within the scope of the technical concept of the present disclosure, and all the simple modifications belong to the protection scope of the present disclosure.
In addition, the specific features described in the above embodiments may be combined in any suitable manner without contradiction. The various possible combinations are not described further in this disclosure in order to avoid unnecessary repetition.
Moreover, any combination between the various embodiments of the present disclosure is possible as long as it does not depart from the spirit of the present disclosure, which should also be construed as the disclosure of the present disclosure.

Claims (10)

1. A method of calibrating an analog-to-digital converter, the method comprising:
Acquiring first data to be detected and first output data, wherein the first output data is output after the target analog-to-digital converter performs analog-to-digital conversion according to the first data to be detected;
weighting factors are given to each data in the first data to be measured, and initial calibration values are obtained according to the first data to be measured and the first output data after the weighting factors are given;
calibrating the first output data according to the initial calibration value to obtain first calibration data;
acquiring a first error value between the first calibration data and the first data to be tested, and determining first target data to be tested according to the first error value;
obtaining a first target calibration value according to the first target data to be detected and first target output data corresponding to the first target data to be detected, wherein the first target calibration value is used for calibrating the target analog-to-digital converter;
wherein determining the first target data to be measured according to the first error includes:
and adjusting the data number of the first data to be tested according to the relation between the first error and the preset precision requirement and the preset cost requirement, so as to determine the first target data to be tested.
2. The analog-to-digital converter calibration method of claim 1, further comprising:
acquiring second to-be-detected data and second output data, wherein the second to-be-detected data comprises any data in the rest input data except the first to-be-detected data in the input data of a target analog-to-digital converter, and the second output data is data output after the target analog-to-digital converter performs analog-to-digital conversion according to the second to-be-detected data;
calibrating the second output data according to the first target calibration value to obtain second calibration data;
acquiring a second error value between the second calibration data and the second data to be measured, and determining second target data to be measured according to the second error value;
and obtaining a second target calibration value according to the second target data to be measured and second target output data corresponding to the second target data to be measured, wherein the second target calibration value is used for recalibrating the target analog-to-digital converter.
3. The analog-to-digital converter calibration method of claim 1, further comprising:
Circularly executing the steps of acquiring first data to be tested and first output data to acquire a first error value between the first calibration data and the first data to be tested, determining first target data to be tested according to the first error value, and matching the first target data to be tested acquired each time with a preset precision requirement and a preset cost requirement to obtain a matching result until the first target data to be tested meeting the preset precision requirement and the preset cost requirement is obtained;
the obtaining a first target calibration value according to the first target to-be-measured data and the first target output data corresponding to the first target to-be-measured data includes:
and obtaining a first target calibration value according to the first target data to be tested meeting the preset precision requirement and the preset cost requirement and the first target output data corresponding to the first target data to be tested.
4. The analog-to-digital converter calibration method of claim 3, further comprising:
according to the matching result obtained last time, adjusting the data number of the first data to be tested, which is obtained in the next cycle;
The method comprises the steps of firstly, determining a matching result, wherein the number of data of first to-be-tested data acquired in the next cycle is reduced under the condition that the matching result meets the preset precision requirement and does not meet the preset cost requirement;
or alternatively, the process may be performed,
and under the condition that the matching result does not meet the preset precision requirement, increasing the data number of the first to-be-tested data acquired in the next cycle.
5. The analog-to-digital converter calibration method of claim 1, wherein the weighting factor is obtained by the following formula:
W=[diag(1/X[i])] 2
wherein W represents a weighting factor, X [ i ] represents first data to be tested, i represents the number of data, and diag () represents a diagonal matrix.
6. The analog-to-digital converter calibration method of claim 1, wherein the initial calibration value is obtained by the following formula:
θ=(A T WA) -1 A T WY;
wherein θ characterizes the initial calibration value, θ= [ k, b] T K represents a gain error, b represents a bias error, a represents test data determined from first data to be tested, W represents a weighting factor, and Y represents first output data.
7. The method of calibrating an analog-to-digital converter according to claim 1, wherein the calibrated transmission characteristics of the target analog-to-digital converter comprise:
Y[n]=kX[n]+b+N,
Wherein Y [ N ] represents first target output data, X [ N ] represents first target data to be detected, N represents target data number, k represents gain error, b represents bias error, and N represents noise vector.
8. An analog to digital converter calibration apparatus, the apparatus comprising:
the acquisition module is configured to acquire first to-be-detected data and first output data, wherein the first output data is output data after the target analog-to-digital converter performs analog-to-digital conversion according to the first to-be-detected data;
the first execution module is configured to assign a weighting factor to each piece of data in the first data to be tested, and obtain an initial calibration value according to the first data to be tested and the first output data after the weighting factor is assigned;
the calibration module is configured to calibrate the first output data according to the initial calibration value to obtain first calibration data;
the adjustment module is configured to acquire a first error value between the first calibration data and the first data to be tested, and determine first target data to be tested according to the first error value;
the second execution module is configured to obtain a first target calibration value according to the first target to-be-detected data and first target output data corresponding to the first target to-be-detected data, wherein the first target calibration value is used for calibrating the target analog-to-digital converter;
The adjusting module is configured to adjust the data number of the first data to be tested according to the relation between the first error and the preset precision requirement and the preset cost requirement, so as to determine the first target data to be tested.
9. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor performs the steps of the method according to any of claims 1-7.
10. A chip, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the method of any one of claims 1-7.
CN202310770172.6A 2023-06-27 2023-06-27 Analog-to-digital converter calibration method, device, storage medium and chip Active CN116505947B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310770172.6A CN116505947B (en) 2023-06-27 2023-06-27 Analog-to-digital converter calibration method, device, storage medium and chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310770172.6A CN116505947B (en) 2023-06-27 2023-06-27 Analog-to-digital converter calibration method, device, storage medium and chip

Publications (2)

Publication Number Publication Date
CN116505947A CN116505947A (en) 2023-07-28
CN116505947B true CN116505947B (en) 2023-09-26

Family

ID=87325279

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310770172.6A Active CN116505947B (en) 2023-06-27 2023-06-27 Analog-to-digital converter calibration method, device, storage medium and chip

Country Status (1)

Country Link
CN (1) CN116505947B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5870041A (en) * 1995-12-23 1999-02-09 Samsung Electronics, Co., Ltd. Analog-to-digital converter with digital compensation
CN102171931A (en) * 2008-09-30 2011-08-31 飞思卡尔半导体公司 Data conversion circuitry and method therefor
CN104702282A (en) * 2015-04-03 2015-06-10 中国电子科技集团公司第十四研究所 Digital calibration method and circuit for multi-stage multi-bit sub circuit in analog-digital converters
KR20190047556A (en) * 2017-10-27 2019-05-08 울산대학교 산학협력단 Autonomic Calibration method in Sensor Measuring Device
CN113765518A (en) * 2020-06-03 2021-12-07 杭州深谙微电子科技有限公司 Analog-to-digital converter and calibration method thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5870041A (en) * 1995-12-23 1999-02-09 Samsung Electronics, Co., Ltd. Analog-to-digital converter with digital compensation
CN102171931A (en) * 2008-09-30 2011-08-31 飞思卡尔半导体公司 Data conversion circuitry and method therefor
CN104702282A (en) * 2015-04-03 2015-06-10 中国电子科技集团公司第十四研究所 Digital calibration method and circuit for multi-stage multi-bit sub circuit in analog-digital converters
KR20190047556A (en) * 2017-10-27 2019-05-08 울산대학교 산학협력단 Autonomic Calibration method in Sensor Measuring Device
CN113765518A (en) * 2020-06-03 2021-12-07 杭州深谙微电子科技有限公司 Analog-to-digital converter and calibration method thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
模数转换器的数字校准算法设计与实现;黄丽;李雪梅;张晓晶;;科技风(01);全文 *

Also Published As

Publication number Publication date
CN116505947A (en) 2023-07-28

Similar Documents

Publication Publication Date Title
CN101621810B (en) Received signal strength indication detector and method for calibrating received signal strength indication
CN106324479B (en) chip calibration method, circuit and chip
EP2632063B1 (en) Radio frequency calibration method and device for mobile terminal
CN109508510B (en) Improved Kalman filtering-based rubidium atomic clock parameter estimation algorithm
CN112051562A (en) Distance compensation method and device for wireless ranging, electronic equipment and storage medium
CN108650035B (en) Electronic equipment calibration method and device, electronic equipment and storage medium
CN104678343A (en) Frequency response characteristic calibration method, device and system of waveform generator
CN114509599B (en) Current measurement method, apparatus, device and computer readable storage medium
CN109597016B (en) Metering device, calibration method thereof and ammeter
CN116505947B (en) Analog-to-digital converter calibration method, device, storage medium and chip
CN116318449B (en) Temperature calibration method and device
US7315731B2 (en) Method of measuring and calibrating frequency down converter
US7639082B2 (en) System and method for amplifier gain measurement and compensation
US20230017555A1 (en) Over the air calibration of an advanced antenna system
CN103092815A (en) Calibration device and method for carrying out calibration on transfer function in monitoring device
CN115642913A (en) Analog-to-digital converter ADC calibration method, device, equipment and storage medium
KR101229571B1 (en) Sensor callibration system and method
CN114024628B (en) S parameter test system, test method and calibration method
CN107976646A (en) A kind of signal power characteristic compensation method and device based on vector network analyzer
CN112198494B (en) Method, device, system and terminal equipment for calibrating flight time module
CN103929770A (en) Method for correcting apparatus to be detected for wireless communication
CN111934636B (en) Attenuator calibration device and method
CN105143912A (en) Radar device
US20230006687A1 (en) Signal generation apparatus and linearity correction method thereof
KR20190047556A (en) Autonomic Calibration method in Sensor Measuring Device

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