[go: up one dir, main page]

CN105071807B - A kind of analog-digital converter adjustment scaling method and system - Google Patents

A kind of analog-digital converter adjustment scaling method and system Download PDF

Info

Publication number
CN105071807B
CN105071807B CN201510428444.XA CN201510428444A CN105071807B CN 105071807 B CN105071807 B CN 105071807B CN 201510428444 A CN201510428444 A CN 201510428444A CN 105071807 B CN105071807 B CN 105071807B
Authority
CN
China
Prior art keywords
sampling
calibration
analog
straight line
digital converter
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.)
Expired - Fee Related
Application number
CN201510428444.XA
Other languages
Chinese (zh)
Other versions
CN105071807A (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.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
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 Zhejiang University ZJU filed Critical Zhejiang University ZJU
Priority to CN201510428444.XA priority Critical patent/CN105071807B/en
Publication of CN105071807A publication Critical patent/CN105071807A/en
Application granted granted Critical
Publication of CN105071807B publication Critical patent/CN105071807B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Analogue/Digital Conversion (AREA)

Abstract

The invention discloses a kind of analog-digital converter adjustment scaling method and system, method to comprise the following steps:S01, obtain sampling curve;S02, by sampling curve automatic segmentation and fitting a straight line is carried out, obtain final segmentation method;S03, the straightway obtained using segmentation are calibrated respectively.The output of analog-digital converter can be calibrated by this programme, keep accurate transformation result.This programme is applied to all analog-digital converters.

Description

一种模数转换器调校标定方法及系统Method and system for calibrating and calibrating an analog-to-digital converter

技术领域technical field

本发明涉及电路模块校准领域,尤其是涉及一种模数转换器调校标定方法及系统。The invention relates to the field of circuit module calibration, in particular to an analog-to-digital converter calibration method and system.

背景技术Background technique

将模拟信号转换成数字信号的电路,称为模数转换器(简称A/D转换器或ADC,Analog to Digital Converter),A/D转换的作用是将时间连续、幅值也连续的模拟量转换为时间离散、幅值也离散的数字信号,因此,A/D转换一般要经过取样、保持、量化及编码4个过程。A circuit that converts analog signals into digital signals is called an analog-to-digital converter (A/D converter or ADC, Analog to Digital Converter). It is converted into a digital signal with discrete time and discrete amplitude. Therefore, A/D conversion generally goes through four processes of sampling, holding, quantization and encoding.

模数转换器经过一定时间的使用以后,转换值会发生偏差,影响输出精度,此时需要对模数转换器进行调校标定。After the analog-to-digital converter has been used for a certain period of time, the conversion value will deviate, which will affect the output accuracy. At this time, the analog-to-digital converter needs to be calibrated.

中华人民共和国国家知识产权局于2014年09月10日公开了名称为“具有自适应误差校准功能的电荷耦合流水线模数转换器”的专利文献(公开号:CN104038225A),其包括一个电荷耦合流水线模数转换器核、一个共模误差校准模块、一个差模误差校准模块、一个输入共模电压偏移补偿模块、一个数字后台校准模块和一个误差校准控制器模块。本发明能够自动检测全差分结构电荷耦合流水线模数转换器中由于非理想特性而引起的差模误差、共模误差、输入共模电压偏移误差和电路正常工作之后由于温度和电压波动带来的误差,并对这些误差进行校准。此方案并未公开合适的校准算法。The State Intellectual Property Office of the People's Republic of China published a patent document titled "Charge-Coupled Pipeline Analog-to-Digital Converter with Adaptive Error Calibration Function" on September 10, 2014 (publication number: CN104038225A), which includes a charge-coupled pipeline An analog-to-digital converter core, a common-mode error calibration block, a differential-mode error calibration block, an input common-mode voltage offset compensation block, a digital background calibration block, and an error calibration controller block. The invention can automatically detect the differential mode error, common mode error, input common mode voltage offset error caused by non-ideal characteristics in the fully differential structure charge-coupled pipeline analog-to-digital converter, and the temperature and voltage fluctuations caused by the normal operation of the circuit. errors and to calibrate for these errors. This scheme does not expose a suitable calibration algorithm.

发明内容Contents of the invention

本发明主要是解决现有技术所存在的缺少对模数转换器进行合理校准的方法和装置的技术问题,提供一种可以有效校准模数转换器的输出准确度的模数转换器调校标定方法及系统。The present invention mainly solves the technical problem in the prior art that lacks a method and device for reasonably calibrating the analog-to-digital converter, and provides an analog-to-digital converter calibration that can effectively calibrate the output accuracy of the analog-to-digital converter methods and systems.

本发明针对上述技术问题主要是通过下述技术方案得以解决的:一种模数转换器调校标定方法,包括以下步骤:The present invention mainly solves the above-mentioned technical problems through the following technical solutions: a method for calibrating and calibrating an analog-to-digital converter, comprising the following steps:

S01、获取采样曲线;S01. Obtain a sampling curve;

S02、将采样曲线自动分段并进行直线拟合,获得最终分段方法;S02. Automatically segment the sampling curve and perform straight line fitting to obtain the final segmentation method;

S03、利用分段得到的直线段分别进行校准。S03. Perform calibration using the straight line segments obtained by segmenting.

作为优选,获取采样曲线具体为:模数转换器的模拟电压输入口输入模拟电压信号,此模拟电压信号呈线性从0一直增大到模数转换器的输入电压上限,模数转换器进行采样,并对采样数据进行保存。Preferably, obtaining the sampling curve is specifically: the analog voltage input port of the analog-to-digital converter inputs an analog voltage signal, and the analog voltage signal increases linearly from 0 to the upper limit of the input voltage of the analog-to-digital converter, and the analog-to-digital converter performs sampling , and save the sampled data.

作为优选,步骤S02具体为:Preferably, step S02 is specifically:

S021、需要处理的n个采样数据点为(xi,yi),i=1,2…n,设定最大距离值dmax、最大残差平方和emax和最小残差平方和emin,最小距离dmin为0;S021. The n sampling data points to be processed are ( xi , y i ), i=1, 2...n, set the maximum distance value d max , the maximum residual square sum e max and the minimum residual square sum e min , the minimum distance d min is 0;

S022、计算各个采样数据点处的曲率,即S022, calculate the curvature at each sampling data point, namely

曲率 curvature

Δxi为xi的微小变化量,Δyi为yi的微小变化量,对n个曲率按大小排序并存储在数组c[n]中,此数组里只要存储排序后得到的K(i)中的i值即可;Δx i is the small change of x i , Δy i is the small change of y i , sort the n curvatures according to their size and store them in the array c[n]. In this array, only the K(i) obtained after sorting is stored. The value of i in is enough;

S023、设采样曲线需分为m段,m初始值为2,每段采样曲线含有3个以上采样数据点;S023. It is assumed that the sampling curve needs to be divided into m segments, the initial value of m is 2, and each sampling curve contains more than 3 sampling data points;

S024、判断m是否小于等于n/3,如果是,则进入步骤S025,否则进入步骤S029;S024, judge whether m is less than or equal to n/3, if yes, then enter step S025, otherwise enter step S029;

S025、从数组c[n]中取前m-1个数,查询此m-1个数对应的采样点,以此m-1个采样点为分段点,将所有采样点分为m部分,利用最小二乘法拟合得到m段直线段;S025. Take the first m-1 numbers from the array c[n], query the sampling points corresponding to the m-1 numbers, use the m-1 sampling points as segmentation points, and divide all the sampling points into m parts , using the least squares method to fit m straight line segments;

S026、对相邻的直线段的过渡时刻进行处理,处理方式为将过渡时刻的y值设为两条直线段在过渡时刻的y值的平均数;S026, processing the transition time of adjacent straight line segments, the processing method is to set the y value of the transition time as the average number of the y values of the two straight line segments at the transition time;

S027、依次计算m=2,3,…,mmax时的评价函数g的值,S027, sequentially calculate the value of the evaluation function g when m=2, 3, ..., m max ,

其中,mmax为n/3,且取整数,mmin为2,e为第m段拟合直线上的点与实际点的纵坐标差值的平方和,即残差平方和,d为第m段拟合直线对应的各实际采样点到该拟合直线的距离中的最大值;in, m max is n/3, and takes an integer, m min is 2, e is the sum of the squares of the difference between the points on the fitting line of the mth segment and the actual point, that is, the sum of squares of the residual, and d is the mth segment The maximum value of the distance from each actual sampling point corresponding to the fitted straight line to the fitted straight line;

S028、m增大1,返回步骤S024;S028, increase m by 1, return to step S024;

S029、选择g中的最大值所对应的分段方法作为最终分段方法。S029. Select the segmentation method corresponding to the maximum value in g as the final segmentation method.

作为优选,利用本段的拟合直线进行校准具体为:As a preference, using the fitting straight line in this paragraph to calibrate is specifically:

A.从存储单元里取得此段直线的起点xsp和终点xfp的理想采样值,设为Ref1和Ref2;A. Obtain the ideal sampling values of the starting point x sp and the end point x fp of this straight line from the storage unit, set as Ref1 and Ref2;

B.取这两点的实际采样值,设为Avg1和Avg2;B. Take the actual sampling values of these two points and set them as Avg1 and Avg2;

C.计算校准增益系数CalGain和校准偏置CalOffset,即CalOffset=Avg1×CalGain-Ref1;C. Calculate the calibration gain coefficient CalGain and the calibration offset CalOffset, namely CalOffset=Avg1×CalGain-Ref1;

D.由校准增益系数CalGain和校准偏置CalOffset计算此段直线上每个点校准后的采样值newResult,即newResult=oldResult×CalGain-CalOffset,其中oldResult表示校准前由A/D转换器直接得到的采样值;D. Calculate the calibrated sampling value newResult of each point on the line from the calibration gain coefficient CalGain and calibration offset CalOffset, that is, newResult=oldResult×CalGain-CalOffset, where oldResult represents the value directly obtained by the A/D converter before calibration sample value;

E.将每段直线段的校准增益系数CalGain和校准偏置CalOffset与此段yi的范围进行对应存储,方便查询进行校准。E. Store the calibration gain coefficient CalGain and calibration offset CalOffset of each straight line segment corresponding to the range of this segment y i , so as to facilitate query and calibration.

作为优选,当A/D转换器进行转换时,根据转换值进行查询它所在的拟合后的直线段,利用此段的校准增益系数CalGain和校准偏置CalOffset对结果进行校准,校准后输出。Preferably, when the A/D converter performs conversion, query the fitted straight line segment where it is located according to the conversion value, use the calibration gain coefficient CalGain and calibration offset CalOffset of this segment to calibrate the result, and output it after calibration.

一种模数转换器调校标定系统,包括:An analog-to-digital converter calibration calibration system, comprising:

获取采样曲线单元,用于获得A/D转换器的采样曲线;obtaining a sampling curve unit for obtaining a sampling curve of the A/D converter;

存储单元,用于存储输入的模拟电压对应的理想转换值,以及分段拟合后的每段直线段的校准增益系数CalGain和校准偏置CalOffset和此段yi的范围;The storage unit is used to store the ideal conversion value corresponding to the input analog voltage, and the calibration gain coefficient CalGain and the calibration offset CalOffset and the range of this segment yi of each straight line segment after segment fitting;

自动分段单元,用于将A/D采样曲线进行合理的分段,以使拟合结果接近实际的采样曲线;Automatic segmentation unit, used to reasonably segment the A/D sampling curve, so that the fitting result is close to the actual sampling curve;

校准单元,用于将分段后拟合的每一段直线进行校准。The calibration unit is used for calibrating each section of straight line fitted after segmentation.

本发明带来的实质性效果是,可以对模数转换器进行校准,提高输出结果的准确度。The substantive effect brought by the invention is that the analog-to-digital converter can be calibrated and the accuracy of the output result can be improved.

附图说明Description of drawings

图1是本发明的一种模数转换器调校标定系统示意图;Fig. 1 is a schematic diagram of an analog-to-digital converter calibration calibration system of the present invention;

图2是本发明的一种模数转换器调校标定方法流程图;Fig. 2 is a flow chart of an analog-to-digital converter calibration method of the present invention;

图中:1、A/D转换器,2、获取采样曲线单元,3、存储单元,4、自动分段单元,5、校准单元。In the figure: 1. A/D converter, 2. Obtaining sampling curve unit, 3. Storage unit, 4. Automatic segmentation unit, 5. Calibration unit.

具体实施方式Detailed ways

下面通过实施例,并结合附图,对本发明的技术方案作进一步具体的说明。The technical solutions of the present invention will be further specifically described below through the embodiments and in conjunction with the accompanying drawings.

实施例:本实施例的一种模数转换器调校标定系统,包括:Embodiment: An analog-to-digital converter calibration system of this embodiment includes:

获取采样曲线单元2,用于获得A/D转换器的采样曲线;Obtaining a sampling curve unit 2 for obtaining a sampling curve of the A/D converter;

存储单元3,用于存储输入的模拟电压对应的理想转换值,以及分段拟合后的每段直线段的校准增益系数CalGain和校准偏置CalOffset和此段yi的范围;The storage unit 3 is used to store the ideal conversion value corresponding to the input analog voltage, and the calibration gain coefficient CalGain and the calibration offset CalOffset and the range of this segment yi of each straight line segment after segment fitting;

自动分段单元4,用于将A/D采样曲线进行合理的分段,以使拟合结果接近实际的采样曲线;Automatic segmentation unit 4 is used to reasonably segment the A/D sampling curve so that the fitting result is close to the actual sampling curve;

校准单元5,用于将分段后拟合的每一段直线进行校准。The calibration unit 5 is used to calibrate each segment of the straight line fitted after segmentation.

如图1所示,A/D转转模块1分别连接获取采样曲线单元、自动分段单元和校准单元,存储单元分别连接获取采样曲线单元、自动分段单元和校准单元,自动分段单元还与校准单元连接。As shown in Figure 1, the A/D transfer module 1 is respectively connected to obtain the sampling curve unit, the automatic segmentation unit and the calibration unit, the storage unit is respectively connected to the acquisition sampling curve unit, the automatic segmentation unit and the calibration unit, and the automatic segmentation unit is also connected to the calibration unit. Connect to calibration unit.

A/D转换器的调校标定的方法是:The calibration method of A/D converter is:

A.将A/D采样曲线自动分段直线拟合;A. Automatically fit the A/D sampling curve into segments;

B.将分段得到的直线段分别进行校准。B. Calibrate the straight line segments obtained by segmenting.

具体的调校标定方法如图2所示。The specific adjustment and calibration method is shown in Figure 2.

获取采样曲线单元获取采样曲线的方法为:Obtaining the sampling curve The method of obtaining the sampling curve by the unit is:

A.此单元开始工作时,A/D转换器的模拟电压输入口会输入具有此种特点的模拟电压信号,即此电压呈线性从0一直增大到转换器可输入的最大模拟电压值,并且其随时间变化的速度能满足此转换器采样率的要求,以保证得到的采样曲线的准确性;A. When the unit starts to work, the analog voltage input port of the A/D converter will input an analog voltage signal with such characteristics, that is, the voltage increases linearly from 0 to the maximum analog voltage value that the converter can input. And its time-varying speed can meet the sampling rate requirements of the converter to ensure the accuracy of the obtained sampling curve;

B.A/D转换器进行采样,获取采样曲线单元对得到的数据进行保存。B. The A/D converter performs sampling, and the acquisition sampling curve unit saves the obtained data.

获取采样曲线单元和自动分段单元可以定时查询A/D转换器是否空闲,若空闲则进行获取采样曲线操作或分段操作;否则不进行,校准时则继续使用上次的分段结果。The acquisition sampling curve unit and the automatic segmentation unit can regularly check whether the A/D converter is idle, and if it is idle, the acquisition sampling curve operation or segmentation operation is performed; otherwise, the last segmentation result will continue to be used during calibration.

自动分段单元是基于最小二乘法和优化算法进行分段。其中最小二乘法的原理为:已知采样数据点(xi,yi),i=1,2…n),设其拟合的数学模型为y=ax+b,利用残差的平方和最小,得出模型中的参数a、b,计算方法是将Q的表达式分别对a、b求偏导,并使其等于零,解这两个方程,得到a、b的值,即可得The automatic segmentation unit is segmented based on the least square method and optimization algorithm. The principle of the least squares method is: known sampling data points ( xi , y i ), i=1, 2...n), set the mathematical model fitted by it as y=ax+b, and use the sum of squares of the residual The minimum is to get the parameters a and b in the model. The calculation method is to take the partial derivative of the expression of Q to a and b respectively, and make it equal to zero. Solve these two equations to get the values of a and b, then you can get

而优化算法是综合分段数目、残差平方和以及实际采样点到拟合直线段的距离值三个指标选出最优的分段情况。The optimization algorithm is to select the optimal segmentation by combining the three indicators of the number of segments, the sum of the squares of the residuals, and the distance from the actual sampling point to the fitted straight line segment.

自动分段的步骤为:The steps of automatic segmentation are:

A.对于需要处理的n个采样数据点(xi,yi),i=1,2…n,首先给定一个最大距离值dmax、最大残差平方和emax和最小残差平方和emin,最小距离dmin为0;A. For n sampling data points ( xi , y i ) that need to be processed, i=1, 2...n, first give a maximum distance value d max , maximum residual square sum e max and minimum residual square sum e min , the minimum distance d min is 0;

B.计算各个采样数据点处的弯曲程度,即B. Calculate the degree of curvature at each sampled data point, ie

曲率 curvature

比较这n个曲率值的大小,对其进行排序,并存储在数组c[n]里,此数组里只要存储排序后得到的K(i)中的i值即可;Compare the size of these n curvature values, sort them, and store them in the array c[n]. In this array, it is only necessary to store the i value in K(i) obtained after sorting;

C.设此采样曲线需分为m段,由于环境影响采样曲线呈现非线性,所以m≥2,而若将其每两个点进行拟合没有多大意义,所以m≤n/3,m取整数,设此最大值为mmax,当m=2时,从数组c[n]里取得最大曲率对应的的i值,即数组里的第一个数,以此点为分段点,将此采样点前与后的采样点分别利用最小二乘法拟合,得到两段直线段,同理当m=3时,从数组c[n]里取出前两个数,以这两点为分段点,将采样点利用最小二乘法拟合,得到三段直线段,一直到m取最大值mmaxC. Assuming that the sampling curve needs to be divided into m segments, because the environmental impact sampling curve is nonlinear, so m≥2, and it does not make much sense to fit every two points, so m≤n/3, m is taken Integer, set the maximum value as m max , when m=2, obtain the i value corresponding to the maximum curvature from the array c[n], that is, the first number in the array, and use this point as the segment point, and divide The sampling points before and after this sampling point are respectively fitted by the least squares method to obtain two straight line segments. Similarly, when m=3, take the first two numbers from the array c[n], and use these two points as segments point, use the least squares method to fit the sampling points to obtain three straight line segments until m takes the maximum value m max ;

D.对相邻两条直线的过渡时刻进行处理。例如,直线L1、L2的过渡时刻为xp,经过分段直线拟合后,这一时刻对应的采样值y存在两个值,可令 D. Process the transition moment between two adjacent straight lines. For example, the transition time of the straight lines L 1 and L 2 is x p , after the piecewise straight line fitting, there are two values of the sampling value y corresponding to this time and , can make

E.综合分段数、残差平方和以及实际采样点到拟合直线段的距离值选出最优的分段情况,引入功效函数gi,其值即为功效系数,规定gi∈(0,1),满意时,gi=1;不满意时,gi=0;其他情况取0-1之间的的数,由于要综合上述三个目标考虑,可以按照构成评价函数,进行优化选择,其中E. Select the optimal segment by combining the number of segments, the sum of squared residuals, and the distance from the actual sampling point to the fitted straight line segment, and introduce the efficacy function g i , whose value is the efficacy coefficient, specifying g i ∈( 0, 1), when satisfied, g i =1; when dissatisfied, g i =0; in other cases, take the number between 0-1, because the above three objectives should be considered comprehensively, you can follow Constitute an evaluation function for optimal selection, where

e为此段拟合直线段上的点与实际点的纵坐标差值的平方和,即残差平方和,d为此段拟合直线对应的各实际采样点到此直线的距离中的最大值,依次计算m=2,3,…,mmax时的评价函数g的值,比较选出最大值gmax,此种情况即为最优的分段情况,即选用此种分段方法。 e is the sum of the squares of the difference between the points on the fitted straight line and the actual point’s ordinate difference, that is, the sum of the squares of the residual error, and d is the maximum distance from each actual sampling point corresponding to the fitted straight line to the straight line. value, calculate the value of the evaluation function g when m=2, 3, ..., m max in turn, compare and select the maximum value g max , this situation is the optimal segmentation situation, that is, choose this segmentation method.

校准单元将分段得到的直线段进行校准的方法为:利用线性增益误差和偏置误差进行校准。The method for the calibration unit to calibrate the segmented straight line segments is: to calibrate by using the linear gain error and the offset error.

校准单元将分段得到的直线线段进行校准的步骤为:The calibration unit calibrates the segmented straight line segments as follows:

A.从存储单元里取得此段直线的起点xsp和终点xfp的理想采样值,设为Ref1和Ref2;A. Obtain the ideal sampling values of the starting point x sp and the end point x fp of this straight line from the storage unit, set as Ref1 and Ref2;

B.取这两点的实际采样值,设为Avg1和Avg2;B. Take the actual sampling values of these two points and set them as Avg1 and Avg2;

C.计算校准增益系数CalGain和校准偏置CalOffset,即CalOffset=Avg1×CalGain-Ref1;C. Calculate the calibration gain coefficient CalGain and the calibration offset CalOffset, namely CalOffset=Avg1×CalGain-Ref1;

D.由校准增益系数CalGain和校准偏置CalOffset计算此段直线上每个点校准后的采样值,即newResult=oldResult×CalGain-CalOffset,其中oldResult表示校准前由A/D转换器直接得到的采样值;D. Calculate the calibrated sampling value of each point on this straight line from the calibration gain coefficient CalGain and the calibration offset CalOffset, that is, newResult=oldResult×CalGain-CalOffset, where oldResult represents the value directly obtained by the A/D converter before calibration sample value;

E.将每段直线段的校准增益系数CalGain和校准偏置CalOffset与此段yi的范围进行对应存储,方便查询进行校准。E. Store the calibration gain coefficient CalGain and calibration offset CalOffset of each straight line segment corresponding to the range of this segment y i , so as to facilitate query and calibration.

当A/D转换器进行转换时,根据转换值进行查询它所在的拟合后的直线段,利用此段的校准增益系数CalGain和校准偏置CalOffset对结果进行校准,校准后输出。When the A/D converter is converting, query its fitted straight line segment according to the conversion value, use the calibration gain coefficient CalGain and calibration offset CalOffset of this segment to calibrate the result, and output it after calibration.

本文中所描述的具体实施例仅仅是对本发明精神作举例说明。本发明所属技术领域的技术人员可以对所描述的具体实施例做各种各样的修改或补充或采用类似的方式替代,但并不会偏离本发明的精神或者超越所附权利要求书所定义的范围。The specific embodiments described herein are merely illustrative of the spirit of the invention. Those skilled in the art to which the present invention belongs can make various modifications or supplements to the described specific embodiments or adopt similar methods to replace them, but they will not deviate from the spirit of the present invention or go beyond the definition of the appended claims range.

尽管本文较多地使用了采样曲线、分段、评价函数等术语,但并不排除使用其它术语的可能性。使用这些术语仅仅是为了更方便地描述和解释本发明的本质;把它们解释成任何一种附加的限制都是与本发明精神相违背的。Although terms such as sampling curve, segment, and evaluation function are frequently used in this paper, the possibility of using other terms is not excluded. These terms are used only for the purpose of describing and explaining the essence of the present invention more conveniently; interpreting them as any kind of additional limitation is against the spirit of the present invention.

Claims (4)

1. An analog-to-digital converter calibration method is characterized by comprising the following steps:
s01, acquiring a sampling curve;
s02, automatically segmenting the sampling curve and fitting a straight line to obtain a final segmentation method;
s03, respectively calibrating by utilizing the straight line segments obtained by segmentation;
the acquisition of the sampling curve specifically comprises the following steps: an analog voltage input port of the analog-to-digital converter inputs an analog voltage signal which linearly increases from 0 to the upper limit of the input voltage of the analog-to-digital converter, and the analog-to-digital converter samples and stores sampled data;
step S02 specifically includes:
s021, the n sampling data points to be processed are (x)i,yi) I is 1, 2 … n, and a maximum distance value d is setmaxMaximum residual sum of squares emaxSum minimum residual sum of squares eminMinimum distance dminIs 0;
s022, calculating the curvature at each sampled data point, i.e.
Curvature
ΔxiIs xiBy a small amount of change, Δ yiIs yiThe small variation of (c) is stored in an array c [ n ] by sorting n curvatures according to size]In the array, only the value i in the K (i) obtained after sorting is stored;
s023, setting a sampling curve to be divided into m sections, wherein the initial value of m is 2, and each section of the sampling curve contains more than 3 sampling data points;
s024, judging whether m is less than or equal to n/3, if yes, entering a step S025, otherwise, entering a step S029;
s025, taking the front m-1 sampling points from the array c [ n ], inquiring sampling points corresponding to the m-1 sampling points, taking the m-1 sampling points as segmentation points, dividing all the sampling points into m parts, and fitting by using a least square method to obtain m straight line segments;
s026, processing transition time of adjacent straight-line segments, wherein the processing mode is that the y value of the transition time is set as the average of the y values of the two straight-line segments at the transition time;
s027, m 2, 3, …, mmaxThe value of the evaluation function g of time,
<mrow> <mi>g</mi> <mo>=</mo> <mroot> <mrow> <msub> <mi>g</mi> <mn>1</mn> </msub> <msub> <mi>g</mi> <mn>2</mn> </msub> <msub> <mi>g</mi> <mn>3</mn> </msub> </mrow> <mn>3</mn> </mroot> <mo>,</mo> </mrow>
wherein,mmaxis n/3 and is an integer, mmmThe sum of squares of difference values of the vertical coordinates of points on the mth section of fitting straight line and actual points, namely the sum of squares of residual errors, is 2, and d is the maximum value of distances from each actual sampling point corresponding to the mth section of fitting straight line to the fitting straight line;
s028, m is increased by 1, and the step returns to the step S024;
s029, selecting the segmentation method corresponding to the maximum value in g as the final segmentation method.
2. The method for calibrating an analog-to-digital converter according to claim 1, wherein the calibration using the fitted straight line of the mth segment specifically comprises:
A. obtaining the starting point x of the m-th fitting straight line from the storage unitspAnd end point xfpSetting the ideal sampling values of Ref1 and Ref 2;
B. taking actual sampling values of the two points, and setting the actual sampling values as Avg1 and Avg 2;
C. calculating the calibration gain factor Calgain and the calibration offset Caloffset, i.e.CalOffset=Avg1×CalGain-Ref1;
D. Calculating a new result of a sampling value of each point on the m-th section of fitting straight line after calibration by using the calibration gain coefficient Calgain and the calibration offset CalOffset, namely calculating the new result of each point on the m-th section of fitting straight line after calibration, namely calculating the new result which is equal to old result multiplied by Calgain-CalOffset, wherein the old result represents a sampling value directly obtained by the A/D converter before calibration;
E. the calibrated gain coefficient Calgain and the calibrated offset Caloffset of each section of the fitted straight line and y thereofiThe range of the data is correspondingly stored, so that the data is conveniently inquired and correctedThe method is accurate.
3. The method for calibrating the analog-to-digital converter according to claim 2, wherein when the analog-to-digital converter performs conversion, the fitted straight line segment where the analog-to-digital converter is located is searched according to the conversion value, and the result is calibrated by using a calibration gain coefficient CalGain and a calibration offset CalOffset corresponding to the searched straight line segment and is output after calibration.
4. An analog-to-digital converter calibration system using the method of claim 1, comprising:
the acquisition sampling curve unit is used for acquiring a sampling curve of the analog-digital converter;
a storage unit for storing an ideal conversion value corresponding to the input analog voltage, a calibration gain coefficient Calgain and a calibration offset Caloffset of each section of straight line segment after the piecewise fitting, and the section yiA range of (d);
the automatic segmentation unit is used for reasonably segmenting the analog-digital sampling curve so as to enable the fitting result to be close to the actual sampling curve;
and the calibration unit is used for calibrating each segment of straight line which is fitted after segmentation.
CN201510428444.XA 2015-07-20 2015-07-20 A kind of analog-digital converter adjustment scaling method and system Expired - Fee Related CN105071807B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510428444.XA CN105071807B (en) 2015-07-20 2015-07-20 A kind of analog-digital converter adjustment scaling method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510428444.XA CN105071807B (en) 2015-07-20 2015-07-20 A kind of analog-digital converter adjustment scaling method and system

Publications (2)

Publication Number Publication Date
CN105071807A CN105071807A (en) 2015-11-18
CN105071807B true CN105071807B (en) 2018-03-13

Family

ID=54501112

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510428444.XA Expired - Fee Related CN105071807B (en) 2015-07-20 2015-07-20 A kind of analog-digital converter adjustment scaling method and system

Country Status (1)

Country Link
CN (1) CN105071807B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105971976A (en) * 2016-05-25 2016-09-28 广西柳工机械股份有限公司 Method for measuring hydraulic pressure of engineering machine by means of voltage type pressure sensor
CN106885932A (en) * 2017-02-09 2017-06-23 深圳市鼎阳科技有限公司 A kind of oscillograph and its ADC uniformity compensation methods
CN107404575B (en) * 2017-07-18 2020-04-17 Oppo广东移动通信有限公司 Method and device for optimizing screen control, storage medium and mobile terminal
CN110391814B (en) * 2019-07-29 2023-03-10 中国电子科技集团公司第二十四研究所 Integral Nonlinear Digital Correction Method for On-Chip Digital-to-Analog Converter
CN111121998A (en) * 2019-12-20 2020-05-08 扬州船用电子仪器研究所(中国船舶重工集团公司第七二三研究所) Temperature measurement calibration method based on PT1000 temperature sensor
CN111352021B (en) * 2020-03-10 2022-08-09 上海御渡半导体科技有限公司 Signal calibration method of test equipment
CN111380648A (en) * 2020-03-27 2020-07-07 辛成辉 Self-calibration pressure sensor and self-calibration method thereof
CN112462312B (en) * 2020-11-04 2021-08-06 胜达克半导体科技(上海)有限公司 Automatic calibration method for chip testing machine and application thereof
CN112165330A (en) * 2020-11-04 2021-01-01 中电智能科技有限公司 Method for improving channel calibration effect of PLC analog input module
CN112217515B (en) * 2020-12-14 2021-07-09 南京华士电子科技有限公司 Control method and system for automatic AD calibration of converter
CN114184993A (en) * 2021-11-09 2022-03-15 东风电驱动系统有限公司 Data acquisition method with synchronous self-calibration
CN116358597A (en) * 2021-12-28 2023-06-30 航天科工惯性技术有限公司 Calibration method of inertial navigation equipment
CN116414178A (en) * 2021-12-29 2023-07-11 杭州堃博生物科技有限公司 Radio frequency control method, electronic device and computer readable storage medium
CN116558712A (en) * 2023-05-12 2023-08-08 江苏天合储能有限公司 A battery internal pressure measurement display calibration method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103175547A (en) * 2011-12-21 2013-06-26 北京普源精电科技有限公司 Parameter fitting method of data acquisition device
CN104038225A (en) * 2014-06-17 2014-09-10 中国电子科技集团公司第五十八研究所 Charge coupling production line analog-digital converter having self-adaption error calibration function

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7188030B2 (en) * 2001-08-21 2007-03-06 Applera Corporation Automatic threshold setting for quantitative polymerase chain reaction

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103175547A (en) * 2011-12-21 2013-06-26 北京普源精电科技有限公司 Parameter fitting method of data acquisition device
CN104038225A (en) * 2014-06-17 2014-09-10 中国电子科技集团公司第五十八研究所 Charge coupling production line analog-digital converter having self-adaption error calibration function

Also Published As

Publication number Publication date
CN105071807A (en) 2015-11-18

Similar Documents

Publication Publication Date Title
CN105071807B (en) A kind of analog-digital converter adjustment scaling method and system
CN103888141B (en) Streamline gradually compares the method for self-calibrating and device of analog-digital converter
DE60107075T2 (en) A / D converter CALIBRATION
CN102647187B (en) Adc calibration apparatus
US7612703B2 (en) Pipelined analog-to-digital converter with calibration of capacitor mismatch and finite gain error
CN111352021B (en) Signal calibration method of test equipment
CN101706520B (en) A Digital Storage Oscilloscope with Gain Correction Function
US9362938B2 (en) Error measurement and calibration of analog to digital converters
US20100073215A1 (en) Unified architecture for folding adc
CN103929178A (en) Successive Approximation Analog-to-Digital Converter and Its Conversion Method
EP3565122A1 (en) Accuracy enhancement techniques for adcs
CN102291141A (en) Time-interleaved split ADC (Analog-to-Digital Converter) calibration structure without redundant channel and adaptive calibration method thereof
JP2016152625A (en) Circuit and method for dac mismatch error detection and correction in adc
CN111669178B (en) A High Precision Successive Approximation Analog-to-Digital Converter and Its Linearity Calibration Method
US20110285563A1 (en) Pipelined analog-to-digital converter and sub-converter stage
US7994960B1 (en) Data converter with redundancy for error correction in polarity decision
US8816892B2 (en) Segmented column-parallel analog-to-digital converter
CN104796149A (en) High-precision successive approximation type analog-digital converter and performance lifting method based on DNL (dynamic noise limiter)
CN110995268B (en) Multi-order successive approximation type n bit analog-to-digital converter
CN107453756A (en) A kind of front-end calibration method for pipeline ADC
CN104296661B (en) Absolute grating scale absolute signal Concordance method
CN104270158B (en) A cooperative reconstruction method with adaptive sparsity
CN105571666A (en) Flow compensation method, compensation device and flow sensor
US9276599B2 (en) Method and apparatus for non-uniform analog-to-digital conversion
WO2009070001A2 (en) A successive approximationregistrer (sar)analog-to-digital converter (adc) with programmable voltage reference

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180313

CF01 Termination of patent right due to non-payment of annual fee