WO2018120346A1 - 提高数模转换器的输出精度的方法和装置 - Google Patents

提高数模转换器的输出精度的方法和装置 Download PDF

Info

Publication number
WO2018120346A1
WO2018120346A1 PCT/CN2017/072061 CN2017072061W WO2018120346A1 WO 2018120346 A1 WO2018120346 A1 WO 2018120346A1 CN 2017072061 W CN2017072061 W CN 2017072061W WO 2018120346 A1 WO2018120346 A1 WO 2018120346A1
Authority
WO
WIPO (PCT)
Prior art keywords
digital
analog converter
output
input value
error
Prior art date
Application number
PCT/CN2017/072061
Other languages
English (en)
French (fr)
Inventor
张辉
义忠
陆建波
邱文才
Original Assignee
广东大普通信技术有限公司
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 广东大普通信技术有限公司 filed Critical 广东大普通信技术有限公司
Priority to US16/474,108 priority Critical patent/US10917099B2/en
Publication of WO2018120346A1 publication Critical patent/WO2018120346A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M1/00Analogue/digital conversion; Digital/analogue conversion
    • H03M1/06Continuously compensating for, or preventing, undesired influence of physical parameters
    • H03M1/0602Continuously compensating for, or preventing, undesired influence of physical parameters of deviations from the desired transfer characteristic
    • H03M1/0604Continuously compensating for, or preventing, undesired influence of physical parameters of deviations from the desired transfer characteristic at one point, i.e. by adjusting a single reference value, e.g. bias or gain error
    • H03M1/0607Offset or drift compensation
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M1/00Analogue/digital conversion; Digital/analogue conversion
    • H03M1/06Continuously compensating for, or preventing, undesired influence of physical parameters
    • H03M1/0602Continuously compensating for, or preventing, undesired influence of physical parameters of deviations from the desired transfer characteristic
    • H03M1/0604Continuously compensating for, or preventing, undesired influence of physical parameters of deviations from the desired transfer characteristic at one point, i.e. by adjusting a single reference value, e.g. bias or gain error
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M1/00Analogue/digital conversion; Digital/analogue conversion
    • H03M1/66Digital/analogue converters
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M1/00Analogue/digital conversion; Digital/analogue conversion
    • H03M1/10Calibration or testing
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M1/00Analogue/digital conversion; Digital/analogue conversion
    • H03M1/10Calibration or testing
    • H03M1/1009Calibration
    • H03M1/1014Calibration at one point of the transfer characteristic, i.e. by adjusting a single reference value, e.g. bias or gain error

Definitions

  • the present disclosure relates to digital to analog converters, for example, to a method and apparatus for improving the output accuracy of a digital to analog converter.
  • Digital to Analog Converter is a converter that converts discrete signals in the form of binary digital quantities into analog quantities based on standard quantities (or reference quantities).
  • the resolution of the n-bit digital-to-analog converter is 1/2 n and the input precision is 1. If a higher resolution is required in the actual application, since the input accuracy cannot be modified, it is necessary to select a digital-to-analog converter with a higher resolution. However, the higher the resolution, the more expensive the digital-to-analog converter, and the resolution of the digital-to-analog converter cannot be increased indefinitely.
  • the input of the digital-to-analog converter is binary, it is possible to input an integer value, but it is not possible to input a floating-point value. Usually, when you enter a floating-point value, the fractional part is ignored, so the fractional part becomes the input error. The input error has a small effect in a short time, but after multiple inputs, it will accumulate into a huge integral output error.
  • the present disclosure provides a method of improving output accuracy of a digital to analog converter, comprising:
  • the integer input value of the digital-to-analog converter is adjusted according to the comparison result.
  • the at least one output error is obtained, compared with a preset threshold, and the integer input value of the digital-to-analog converter is adjusted according to the comparison result, including:
  • the integer input value of the digital-to-analog converter is set to be a round-point input value rounded up by 1 until the accumulated output error is greater than the first threshold.
  • the at least one output error is obtained, compared with a preset threshold, and the integer input value of the digital-to-analog converter is adjusted according to the comparison result, including:
  • One of the integer input values is set to a floating point input value rounded, and the other integer input values are set to be a floating point input value rounded up by one.
  • the output error of the digital-to-analog converter is calculated, including:
  • the input error integer input value - floating point input value
  • the output error obtained by inputting the integer input value to the digital-to-analog converter output accuracy * input error.
  • the absolute value of the first threshold is equal to the absolute value of the second threshold.
  • the present disclosure provides an apparatus for improving output accuracy of a digital to analog converter, comprising:
  • the output error calculation module is configured to calculate an output error of the digital-to-analog converter according to the output precision and the input error of the digital-to-analog converter;
  • An error comparison module configured to obtain at least one of the output errors for comparison with a preset threshold
  • the input adjustment module is set to adjust the integer input value of the digital-to-analog converter according to the comparison result.
  • the input adjustment module is specifically set to:
  • the integer input value of the digital-to-analog converter is set to be a round-point input value rounded up by 1 until the accumulated output error is greater than the first threshold.
  • the input adjustment module is specifically set to:
  • One of the integer input values is set to a floating point input value rounded, and the other integer input values are set to be a floating point input value rounded up by one.
  • the output error calculation module is specifically set as:
  • the input error integer input value - floating point input value
  • the output error obtained by inputting the integer input value to the digital-to-analog converter output accuracy * input error.
  • the absolute value of the first threshold is equal to the absolute value of the second threshold.
  • the present disclosure also provides a non-transitory storage medium storing computer executable instructions arranged to perform the above-described method of increasing the output precision of a digital to analog converter.
  • the present disclosure also provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer, The computer is caused to perform the above-described method of improving the output precision of the digital-to-analog converter.
  • the present disclosure also provides an electronic device comprising at least one processor and a memory communicatively coupled to the at least one processor, the memory for storing instructions executable by the at least one processor, the instructions being The at least one processor, when executed, causes the at least one processor to perform the method of improving output accuracy of the digital to analog converter as described above.
  • the present disclosure also provides a digital to analog converter including the above described electronic device or means for improving the output accuracy of the digital to analog converter.
  • the method and apparatus for improving the output precision of a digital-to-analog converter of the present disclosure calculates an output error of a digital-to-analog converter by inputting a floating-point type value, and compares it with a preset threshold value, thereby aligning the digital-to-analog converter according to the comparison result.
  • the type input value is adjusted to achieve an equivalent higher output accuracy without replacing the high-resolution digital-to-analog converter and redesigning the circuit.
  • FIG. 1 is a flow chart of a method for improving output accuracy of a digital to analog converter provided by an embodiment of the present disclosure
  • FIG. 2 is a flow chart of adjusting an integer input value of a digital-to-analog converter according to an embodiment of the present disclosure
  • FIG. 3 is a flow chart of adjusting an integer input value of a digital-to-analog converter according to an embodiment of the present disclosure
  • FIG. 4 is a flowchart of a method of improving output accuracy of a digital to analog converter provided by an embodiment of the present disclosure
  • FIG. 5 is a structural block diagram of an electronic device according to an embodiment of the present disclosure.
  • Embodiments of the present disclosure provide a method for improving the output precision of a digital-to-analog converter, which is suitable for adjusting an input value of a digital-to-analog converter to eliminate an input error generated when an input floating-point value is present.
  • FIG. 1 is a flow chart of a method of improving output accuracy of a digital to analog converter provided by an embodiment of the present disclosure. As shown in FIG. 1, the method includes steps S11 and S12:
  • S12 Acquire at least one of the output errors, and compare with a preset threshold, according to the comparison result.
  • the integer input value of the digital-to-analog converter is adjusted.
  • FIG. 2 is a flowchart of adjusting an integer input value of a digital-to-analog converter according to an embodiment of the present disclosure. As shown in FIG. 2, step S12 includes steps S121 to S123.
  • the preset threshold includes a first threshold and a second threshold, which are set according to the frequency to be adjusted.
  • the preset threshold is
  • Equivalent output accuracy of digital-to-analog converter maximum cumulative output error / adjustment method execution time.
  • the first threshold 0.5
  • the adjustment can be set to an irregular input, and the time interval between the two inputs is also unequal.
  • This embodiment is suitable for the case where the accumulated output error is adjusted.
  • the output error is smoothed, and the effect of equivalently improving the output precision of the digital-to-analog converter is achieved.
  • a method for improving output precision of a digital to analog converter includes Step S21 and step S22.
  • S21 calculating an output error of the digital-to-analog converter according to the output precision and the input error of the digital-to-analog converter.
  • S22 Acquire at least one of the output errors, compare with a preset threshold, and adjust an integer input value of the digital-to-analog converter according to the comparison result.
  • FIG. 3 is a flowchart of adjusting an integer input value of a digital-to-analog converter according to an embodiment of the present disclosure. As shown in FIG. 3, step S22 may further include step S221 and step S222.
  • the value obtained by dividing the output precision of the digital-to-analog converter by the desired accuracy is rounded off to obtain the number of adjustments, and the number of adjustments is ⁇ output accuracy/predicted accuracy.
  • One of the integer input values is set to a floating point input value rounded, and the other integer input values are set to be a floating point input value rounded up by one.
  • the number of adjustments can be calculated according to the above formula at least 4 times, and the floating-point input value is 1.5.
  • the input value is 1, the input error is -0.5, the output error is -0.0625, and the absolute value of the output error is greater than the preset threshold of 1/32.
  • After adding, add 1 or 2; after 4 times of input, the cumulative output error is 0.125, the average is 0.125/4 0.03125 per input, and the equivalent of 1/32 is achieved in 4 inputs.
  • the precision Similarly, if you want to achieve higher equivalent accuracy, just need more time, or perform more input in the same time, so you can accurately control the input and output of the digital-to-analog converter through calculation.
  • This embodiment is suitable for the case where high-resolution data needs to be output by using a low-resolution digital-to-analog converter. Since the accuracy of the low-resolution digital-to-analog converter is not satisfactory, the input error of one input may cause the output error to exceed the pre-preparation. To set the threshold, you need to adjust the next few inputs. Calculate the number of integer values that need to be input according to the desired accuracy and the output accuracy of the digital-to-analog converter, and according to the preset The rule assigns a value to an integer input value to achieve the result of multiple low-precision inputs equivalent to one high-precision input.
  • Embodiments of the present disclosure also provide an apparatus for improving the output accuracy of a digital to analog converter for performing the method described in the above embodiments.
  • the apparatus includes an output error calculation module 31, an error comparison module 32, and an input adjustment module 33.
  • the output error calculation module 31 is configured to calculate an output error of the digital-to-analog converter according to the output precision and the input error of the digital-to-analog converter;
  • the error comparison module 32 is configured to acquire at least one of the output errors and compare with a preset threshold
  • the input adjustment module 33 is configured to adjust the integer input value of the digital-to-analog converter according to the comparison result.
  • the input adjustment module 33 is specifically set to:
  • the integer input value of the digital-to-analog converter is set to be a round-point input value rounded up by 1 until the accumulated output error is greater than the first threshold.
  • the input adjustment module 33 is specifically configured to:
  • One of the integer input values is set to a floating point input value rounded, and the other integer input values are set to be a floating point input value rounded up by one.
  • the output error calculation module 31 is specifically configured to:
  • the input error integer input value - floating point input value
  • the output error obtained by inputting the integer input value to the digital-to-analog converter output accuracy * input error.
  • the absolute value of the first threshold is equal to the absolute value of the second threshold.
  • the output error of the digital-to-analog converter is calculated by inputting the floating-point type value, and compared with the preset threshold value, thereby adjusting the integer input value of the digital-to-analog converter according to the comparison result, thereby achieving high replacement without In the case of a resolution digital-to-analog converter and redesigning the circuit, an equivalent higher output accuracy is obtained.
  • Output error calculation module 31, error comparison module 32 and input adjustment module 33 may use a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA field programmable gate array
  • the discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein are implemented or executed.
  • a general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller or state machine.
  • the processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration.
  • the present disclosure also provides a non-transitory storage medium storing computer executable instructions arranged to perform the above-described method of improving the output precision of a digital to analog converter.
  • the present disclosure also provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer, The computer is caused to perform the above-described method of improving the output precision of the digital-to-analog converter.
  • the present disclosure also provides an electronic device including at least one processor 40 and a memory 41 communicatively coupled to the at least one processor, the memory 41 for storing
  • the instruction executed by the processor 40 when executed by the at least one processor 40, causes the at least one processor 40 to perform the above-described method of improving the output precision of the digital to analog converter.
  • the present disclosure also provides a digital to analog converter including the above described electronic device and digital to analog conversion circuit.
  • the digital to analog conversion circuit includes, for example, a resistor network and a switch.
  • the method and apparatus of the present disclosure for improving the output accuracy of a digital to analog converter achieve equivalently higher output accuracy without replacing the high resolution digital to analog converter and redesigning the circuit.

Landscapes

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

Abstract

一种提高数模转换器的输出精度的方法和装置。所述方法包括:根据数模转换器的输出精度和输入误差,计算数模转换器的输出误差(S11);获取至少一个所述输出误差,与预设阈值进行比较;根据比较结果对数模转换器的整型输入值进行调整(S12),能够利用低分辨率的数模转换器获得较高的输出精度。

Description

提高数模转换器的输出精度的方法和装置 技术领域
本公开涉及数模转换器,例如涉及一种提高数模转换器的输出精度的方法和装置。
背景技术
数模转换器(Digital to Analog Converter,DAC),是一种将二进制数字量形式的离散信号转换成以标准量(或参考量)为基准的模拟量的转换器。由数模转换器的工作原理可知,n位的数模转换器的分辨率为1/2n,输入精度为1。若实际应用中需要更高的分辨率,由于输入精度不能修改,则需要选择分辨率更高的数模转换器。但是分辨率越高的数模转换器越昂贵,并且数模转换器的分辨率不能无限地提高。
并且,因为数模转换器的输入是二进制的,所以能够输入一个整型数值,但不能输入浮点型数值。通常,在输入浮点型数值的时候,小数部分将被忽略,于是,小数部分成为输入误差。输入误差在短时间内的影响是小的,但是多次输入后,将会累计成为一个巨大的积分输出误差。
发明内容
本公开的目的在于提出一种提高数模转换器的输出精度的方法和装置,能够利用低分辨率的数模转换器获得较高的输出精度。
一方面,本公开提供一种提高数模转换器的输出精度的方法,包括:
根据数模转换器的输出精度和输入误差,计算数模转换器的输出误差;
获取至少一个所述输出误差,与预设阈值进行比较;
根据比较结果对数模转换器的整型输入值进行调整。
其中,获取至少一个所述输出误差,与预设阈值进行比较,根据比较结果对数模转换器的整型输入值进行调整,包括:
将多个连续的输出误差累加得到累计输出误差;
若所述累计输出误差大于第一阈值,则将数模转换器的整型输入值设置为浮点输入值取整,直到所述累计输出误差小于第二阈值;
若所述累计输出误差小于第二阈值,则将数模转换器的整型输入值设置为浮点输入值取整后加1,直到所述累计输出误差大于第一阈值。
其中,获取至少一个所述输出误差,与预设阈值进行比较,根据比较结果对数模转换器的整型输入值进行调整,包括:
根据数模转换器的输出精度和期望的精度,计算调整次数,所述调整次数≥数模转换器的输出精度/期望的精度;
若一个所述输出误差的绝对值大于预设阈值,则向数模转换器输入与调整次数相应数量的整型输入值;
其中一个所述整型输入值设置为浮点输入值取整,其他所述整型输入值设置为浮点输入值取整后加1。
其中,根据数模转换器的输出精度和输入误差,计算数模转换器的输出误差,包括:
获取浮点输入值;
对所述浮点输入值进行取整运算得到整型输入值;
计算输入误差,所述输入误差=整型输入值-浮点输入值;
所述整型输入值输入数模转换器后得到的输出误差=输出精度*输入误差。
可选地,所述第一阈值的绝对值等于所述第二阈值的绝对值。
另一方面,本公开提供一种提高数模转换器的输出精度的装置,包括:
输出误差计算模块,设置为根据数模转换器的输出精度和输入误差,计算数模转换器的输出误差;
误差比较模块,设置为获取至少一个所述输出误差,与预设阈值进行比较;以及
输入调整模块,设置为根据比较结果对数模转换器的整型输入值进行调整。
其中,输入调整模块具体设置为:
将多个连续的输出误差累加得到累计输出误差;
若所述累计输出误差大于第一阈值,则将数模转换器的整型输入值设置为浮点输入值取整,直到所述累计输出误差小于第二阈值;
若所述累计输出误差小于第二阈值,则将数模转换器的整型输入值设置为浮点输入值取整后加1,直到所述累计输出误差大于第一阈值。
其中,输入调整模块具体设置为:
根据数模转换器的输出精度和期望的精度,计算调整次数,所述调整次数≥数模转换器的输出精度/期望的精度;
若一个所述输出误差的绝对值大于预设阈值,则向数模转换器输入与调整次数相应数量的整型输入值;
其中一个所述整型输入值设置为浮点输入值取整,其他所述整型输入值设置为浮点输入值取整后加1。
其中,输出误差计算模块具体设置为:
获取浮点输入值;
对所述浮点输入值进行取整运算得到整型输入值;
计算输入误差,所述输入误差=整型输入值-浮点输入值;
所述整型输入值输入数模转换器后得到的输出误差=输出精度*输入误差。
可选地,所述第一阈值的绝对值等于所述第二阈值的绝对值。
本公开还提供一种非暂态存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行上述的提高数模转换器的输出精度的方法。
本公开还提供了一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述的提高数模转换器的输出精度的方法。
本公开还提供了一种电子设备,包括至少一个处理器和与所述至少一个处理器通信连接的存储器,所述存储器用于存储可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行时,使所述至少一个处理器执行上述的提高数模转换器的输出精度的方法。
本公开还提供一种数模转换器包括上述的电子设备或提高数模转换器的输出精度的装置。
本公开的提高数模转换器的输出精度的方法和装置通过计算输入浮点型数值时数模转换器的输出误差,并与预设阈值进行比较,从而根据比较结果对数模转换器的整型输入值进行调整,实现了在不更换高分辨率数模转换器且重新设计电路的情况下,得到等效的更高的输出精度。
附图说明
图1是本公开的实施例提供的提高数模转换器的输出精度的方法的流程图;
图2是本公开的实施例提供的对数模转换器的整型输入值进行调整的流程图;
图3是本公开的实施例提供的对数模转换器的整型输入值进行调整的流程图;
图4是本公开的实施例提供的提高数模转换器的输出精度的方法的流程图;以及
图5是本公开的实施例提供的电子设备的结构框图。
具体实施方式
为使本公开解决的技术问题、采用的技术方案和达到的技术效果更加清楚,下面将结合附图对本公开实施例的技术方案作进一步的详细描述,显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。
本公开的实施例提供一种提高数模转换器的输出精度的方法,适用于在数模转换器存在输出误差时,对其输入值进行调整,以消除输入浮点值时产生的输入误差。
图1是本公开的实施例提供的提高数模转换器的输出精度的方法的流程图。如图1所示,所述方法包括步骤S11和S12:
S11,根据数模转换器的输出精度和输入误差,计算数模转换器的输出误差。
获取浮点输入值;对所述浮点输入值进行取整运算得到整型输入值,所述取整运算为取浮点输入值的整数部分,将小数部分省略;计算输入误差,所述输入误差=整型输入值-浮点输入值;所述整型输入值输入数模转换器后得到的输出误差=输出精度*输入误差,输出精度=1/2n,n为数模转换器的位数。
例如,要输入浮点数值1.5,取整得到整型值为1,输入误差=1-1.5=-0.5;三位的数模转换器的输出精度为1/23=1/8=0.125,则输出误差=-0.5*0.125=-0.0625。
S12,获取至少一个所述输出误差,与预设阈值进行比较,根据比较结果对 数模转换器的整型输入值进行调整。
图2是本公开的实施例提供的对数模转换器的整型输入值进行调整的流程图,如图2所示,步骤S12包括步骤S121至步骤S123。
S121,将多个连续的输出误差累加得到累计输出误差。
S122,若所述累计输出误差大于第一阈值,则将数模转换器的整型输入值设置为浮点输入值取整,直到所述累计输出误差小于第二阈值。
S123,若所述累计输出误差小于第二阈值,则将数模转换器的整型输入值设置为浮点输入值取整后加1,直到所述累计输出误差大于第一阈值。
本实施例中,所述预设阈值包括第一阈值和第二阈值,根据需要调整的频率来设定,预设阈值的绝对值越小,调整越频繁,一般情况下,|预设阈值|<1,第一阈值≥0,第二阈值≤0,可选的,可设置所述第一阈值的绝对值等于所述第二阈值的绝对值。
数模转换器的等效输出精度=最大的累计输出误差/调整方法执行时间。例如,第一阈值=0.5,第二阈值=-0.5,假设第x次输入后,累计输出误差=0.5625,大于第一阈值,则开始进行调整,调整方法执行时间为40秒时,等效输出精度=0.5265/40=0.014,调整方法执行时间为200秒时,等效输出精度=0.5265/200=0.0028。调整方法执行时间越长,数模转换器的等效输出精度越高。
另外,还可通过增加调整频率达到更高的等效输出精度,一秒输入40个整型输入值,等效输出精度=0.5265/40=0.014,一秒输入200个整型输入值,等效输出精度=0.5265/200=0.0028。
根据具体应用的需求,可以将调整设置为不规则的输入,两次输入之间的时间间隔不相等也是可以的。
本实施例适用于对累计的输出误差进行调整的情况,通过调整数模转换器的整型输入值,将输出误差抹平,达到等效提高数模转换器的输出精度的效果。
可选地,本公开另一实施例提供的提高数模转换器的输出精度的方法包括 步骤S21和步骤S22。S21,根据数模转换器的输出精度和输入误差,计算数模转换器的输出误差。
S22,获取至少一个所述输出误差,与预设阈值进行比较,根据比较结果对数模转换器的整型输入值进行调整。
图3是本公开实施例提供的对数模转换器的整型输入值进行调整的流程图,如图3所示,步骤S22还可以包括步骤S221和步骤S222。
S221,根据数模转换器的输出精度和期望的精度,计算调整次数。
将数模转换器的输出精度除以期望的精度得到的值进行四舍五入得到调整次数,调整次数≥输出精度/期望的精度。
S222,若一个所述输出误差的绝对值大于预设阈值,则向数模转换器输入与调整次数相应数量的整型输入值。
其中一个所述整型输入值设置为浮点输入值取整,其他所述整型输入值设置为浮点输入值取整后加1。
例如,要使用输出精度为1/8的3位数模转换器输出1/32精度的数据,根据上述公式可计算出调整次数至少为4次,浮点输入值为1.5,取整后得到整型输入值为1,输入误差为-0.5,输出误差为-0.0625,输出误差的绝对值大于预设阈值1/32,第一次已经输入1,则接下来的3次输入,每次输入为1.5取整后加1,即2;4次输入完成后,累计输出误差为0.125,平均到每次输入上0.125/4=0.03125,在4次输入做到了等效1/32,等效的提高了精度。同理可得,如果期望获得更高的等效精度,只是需要更多的时间,或者相同时间内执行更多次的输入,这样可以通过计算,精确的控制数模转换器的输入和输出。
本实施例适用于需要利用低分辨率的数模转换器输出高精度数据的情况,低分辨率的数模转换器由于精度达不到要求,只要一次输入的输入误差就会造成输出误差超过预设阈值,则需要对接下来的几次输入进行调整。根据期望的精度和数模转换器的输出精度,计算需要输入整型值的个数,并且按照预设的 规则对整型输入值赋值,以达到多次低精度输入等效一次高精度输入的结果。
本公开的实施例还提供一种提高数模转换器的输出精度的装置,用于执行上述实施例所述的方法。
所述装置包括:输出误差计算模块31,误差比较模块32和输入调整模块33。
输出误差计算模块31,设置为根据数模转换器的输出精度和输入误差,计算数模转换器的输出误差;
误差比较模块32,设置为获取至少一个所述输出误差,与预设阈值进行比较;
输入调整模块33,设置为根据比较结果对数模转换器的整型输入值进行调整。
输入调整模块33具体设置为:
将多个连续的输出误差累加得到累计输出误差;
若所述累计输出误差大于第一阈值,则将数模转换器的整型输入值设置为浮点输入值取整,直到所述累计输出误差小于第二阈值;
若所述累计输出误差小于第二阈值,则将数模转换器的整型输入值设置为浮点输入值取整后加1,直到所述累计输出误差大于第一阈值。
可选地,输入调整模块33具体设置为:
根据数模转换器的输出精度和期望的精度,计算调整次数,所述调整次数≥数模转换器的输出精度/期望的精度;
若一个所述输出误差的绝对值大于预设阈值,则向数模转换器输入与调整次数相应数量的整型输入值;
其中一个所述整型输入值设置为浮点输入值取整,其他所述整型输入值设置为浮点输入值取整后加1。
输出误差计算模块31具体设置为:
获取浮点输入值;
对所述浮点输入值进行取整运算得到整型输入值;
计算输入误差,所述输入误差=整型输入值-浮点输入值;
所述整型输入值输入数模转换器后得到的输出误差=输出精度*输入误差。
可选地,所述第一阈值的绝对值等于所述第二阈值的绝对值。
本实施例通过计算输入浮点型数值时数模转换器的输出误差,并与预设阈值进行比较,从而根据比较结果对数模转换器的整型输入值进行调整,实现了在不更换高分辨率数模转换器且重新设计电路的情况下,得到等效的更高的输出精度。
输出误差计算模块31,误差比较模块32和输入调整模块33可以用通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或其它可编程逻辑装置、离散门或晶体管逻辑、离散硬件组件或经设计以执行本文所描述的功能的其任何组合来实施或执行。通用处理器可为微处理器,但在替代方案中,处理器可为任何常规处理器、控制器、微控制器或状态机。处理器还可实施为计算装置的组合,例如,DSP与微处理器的组合、多个微处理器、结合DSP核心的一个或一个以上微处理器或任何其它此类配置。
本公开还提供了一种非暂态存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行上述的提高数模转换器的输出精度的方法。
本公开还提供了一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述的提高数模转换器的输出精度的方法。
如图5所示,本公开还提供了一种电子设备,包括至少一个处理器40和与所述至少一个处理器通信连接的存储器41,所述存储器41用于存储可被所述至 少一个处理器40执行的指令,所述指令被所述至少一个处理器40执行时,使所述至少一个处理器40执行上述的提高数模转换器的输出精度的方法。
本公开还提供一种数模转换器,包括上述的电子设备和数模转换电路。数模转换电路例如包括电阻网络和开关。
以上结合具体实施例描述了本公开的技术原理。这些描述只是为了解释本公开的原理,而不能以任何方式解释为对本公开保护范围的限制。基于此处的解释,本领域的技术人员不需要付出创造性的劳动即可联想到本公开的其它具体实施方式,这些方式都将落入本公开的保护范围之内。
工业实用性
本公开的提高数模转换器的输出精度的方法和装置在不更换高分辨率数模转换器且重新设计电路的情况下,得到等效的更高的输出精度。

Claims (13)

  1. 一种提高数模转换器的输出精度的方法,包括:
    根据数模转换器的输出精度和输入误差,计算数模转换器的输出误差;
    获取至少一个所述输出误差,与预设阈值进行比较;以及
    根据比较结果对数模转换器的整型输入值进行调整。
  2. 根据权利要求1所述的方法,其中,获取至少一个所述输出误差,与预设阈值进行比较,根据比较结果对数模转换器的整型输入值进行调整,包括:
    将多个连续的输出误差累加得到累计输出误差;
    若所述累计输出误差大于第一阈值,则将数模转换器的整型输入值设置为浮点输入值取整,直到所述累计输出误差小于第二阈值;
    若所述累计输出误差小于第二阈值,则将数模转换器的整型输入值设置为浮点输入值取整后加1,直到所述累计输出误差大于第一阈值。
  3. 根据权利要求1所述的方法,其中,获取至少一个所述输出误差,与预设阈值进行比较,根据比较结果对数模转换器的整型输入值进行调整,包括:
    根据数模转换器的输出精度和期望的精度,计算调整次数,所述调整次数≥数模转换器的输出精度/期望的精度;
    若一个所述输出误差的绝对值大于预设阈值,则向数模转换器输入与调整次数相应数量的整型输入值;
    其中一个所述整型输入值设置为浮点输入值取整,其他所述整型输入值设置为浮点输入值取整后加1。
  4. 根据权利要求1所述的方法,其中,根据数模转换器的输出精度和输入误差,计算数模转换器的输出误差,包括:
    获取浮点输入值;
    对所述浮点输入值进行取整运算得到整型输入值;
    计算输入误差,所述输入误差=整型输入值-浮点输入值;
    所述整型输入值输入数模转换器后得到的输出误差=输出精度*输入误差。
  5. 根据权利要求2所述的方法,其中:
    所述第一阈值的绝对值等于所述第二阈值的绝对值。
  6. 一种提高数模转换器的输出精度的装置,包括:
    输出误差计算模块,设置为根据数模转换器的输出精度和输入误差,计算数模转换器的输出误差;
    误差比较模块,设置为获取至少一个所述输出误差,与预设阈值进行比较;以及
    输入调整模块,设置为根据比较结果对数模转换器的整型输入值进行调整。
  7. 根据权利要求6所述的装置,其中,输入调整模块具体设置为:
    将多个连续的输出误差累加得到累计输出误差;
    若所述累计输出误差大于第一阈值,则将数模转换器的整型输入值设置为浮点输入值取整,直到所述累计输出误差小于第二阈值;
    若所述累计输出误差小于第二阈值,则将数模转换器的整型输入值设置为浮点输入值取整后加1,直到所述累计输出误差大于第一阈值。
  8. 根据权利要求6所述的装置,其中,输入调整模块具体设置为:
    根据数模转换器的输出精度和期望的精度,计算调整次数,所述调整次数 ≥数模转换器的输出精度/期望的精度;
    若一个所述输出误差的绝对值大于预设阈值,则向数模转换器输入与调整次数相应数量的整型输入值;
    其中一个所述整型输入值设置为浮点输入值取整,其他所述整型输入值设置为浮点输入值取整后加1。
  9. 根据权利要求6所述的装置,其中,输出误差计算模块具体设置为:
    获取浮点输入值;
    对所述浮点输入值进行取整运算得到整型输入值;
    计算输入误差,所述输入误差=整型输入值-浮点输入值;
    所述整型输入值输入数模转换器后得到的输出误差=输出精度*输入误差。
  10. 根据权利要求7所述的装置,其中:
    所述第一阈值的绝对值等于所述第二阈值的绝对值。
  11. 一种非暂态存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行权利要求1至5任一项所述的提高数模转换器的输出精度的方法。
  12. 一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行权利要求1至5任一项所述的提高数模转换器的输出精度的方法。
  13. 一种电子设备,包括至少一个处理器和与所述至少一个处理器通信连接的存储器,所述存储器用于存储可被所述至少一个处理器执行的指令,所述 指令被所述至少一个处理器执行时,使所述至少一个处理器执行权利要求1至5任一项所述的数据处理方法。
PCT/CN2017/072061 2016-12-28 2017-01-22 提高数模转换器的输出精度的方法和装置 WO2018120346A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/474,108 US10917099B2 (en) 2016-12-28 2017-01-22 Method and device for improving output accuracy of digital-to-analogue converter

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611236988.7 2016-12-28
CN201611236988.7A CN106712770B (zh) 2016-12-28 2016-12-28 一种提高数模转换器的输出精度的方法和装置

Publications (1)

Publication Number Publication Date
WO2018120346A1 true WO2018120346A1 (zh) 2018-07-05

Family

ID=58903017

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/072061 WO2018120346A1 (zh) 2016-12-28 2017-01-22 提高数模转换器的输出精度的方法和装置

Country Status (3)

Country Link
US (1) US10917099B2 (zh)
CN (1) CN106712770B (zh)
WO (1) WO2018120346A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101056106A (zh) * 2006-04-12 2007-10-17 曹先国 数模转换器
CN101322313A (zh) * 2005-12-08 2008-12-10 模拟装置公司 包含校正数模转换器的数字校正连续逼近例程转换器
CN102545906A (zh) * 2012-02-10 2012-07-04 英特格灵芯片(天津)有限公司 电流型数模转换方法和装置
CN202713277U (zh) * 2012-08-23 2013-01-30 北京昆腾微电子有限公司 数模转换器
US8471737B2 (en) * 2011-07-13 2013-06-25 Renesas Electronics Corporation System and method for providing high resolution digital-to-analog conversion using low resolution digital-to-analog converters
CN103795415A (zh) * 2014-01-24 2014-05-14 中国人民解放军国防科学技术大学 基于双路组合数模转换器的高精度数模转换方法及装置

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5248970A (en) * 1991-11-08 1993-09-28 Crystal Semiconductor Corp. Offset calibration of a dac using a calibrated adc
US5381148A (en) * 1993-07-12 1995-01-10 Analog Devices, Inc. Method and apparatus for calibrating a gain control circuit
US6946983B2 (en) * 2002-04-26 2005-09-20 Telefonaktiebolaget L M Ericcson Digital-to-analog converter having error correction
JP2010093683A (ja) * 2008-10-10 2010-04-22 Nec Electronics Corp デジタルアナログ変換回路とその出力データの補正方法
US10348250B2 (en) * 2017-10-23 2019-07-09 Analog Devices Global Unlimited Company Amplifier with noise control and a digital to analog converter with reduced noise bandwidth

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101322313A (zh) * 2005-12-08 2008-12-10 模拟装置公司 包含校正数模转换器的数字校正连续逼近例程转换器
CN101056106A (zh) * 2006-04-12 2007-10-17 曹先国 数模转换器
US8471737B2 (en) * 2011-07-13 2013-06-25 Renesas Electronics Corporation System and method for providing high resolution digital-to-analog conversion using low resolution digital-to-analog converters
CN102545906A (zh) * 2012-02-10 2012-07-04 英特格灵芯片(天津)有限公司 电流型数模转换方法和装置
CN202713277U (zh) * 2012-08-23 2013-01-30 北京昆腾微电子有限公司 数模转换器
CN103795415A (zh) * 2014-01-24 2014-05-14 中国人民解放军国防科学技术大学 基于双路组合数模转换器的高精度数模转换方法及装置

Also Published As

Publication number Publication date
US10917099B2 (en) 2021-02-09
CN106712770A (zh) 2017-05-24
CN106712770B (zh) 2020-02-18
US20200127673A1 (en) 2020-04-23

Similar Documents

Publication Publication Date Title
US10560112B2 (en) Capacitor order determination in an analog-to-digital converter
US9306547B2 (en) Duty cycle adjustment with error resiliency
JP6929282B2 (ja) 時間ベースの遅延ラインアナログ・デジタルコンバータ
WO2016119133A1 (zh) 一种用于高精度模数转换器中的抖动电路
CN107302359B (zh) 高精度逐次逼近结构adc的变权重子dac校正方法
EP3370146B1 (en) Analog to digital conversion yielding exponential results
US9413319B2 (en) Gain calibration
WO2018120346A1 (zh) 提高数模转换器的输出精度的方法和装置
WO2018166538A1 (zh) 连续时间δ-σ模数转换器及其系数校准方法、存储介质
CN106656181B (zh) 一种数模转换器的控制方法及数模转换器
WO2018064720A1 (en) A device, system and method for digital-to-analogue conversion
US9823285B2 (en) Charge measurement
JP4270315B2 (ja) A/d変換回路の出力データ補正装置及びa/d変換出力データ補正方法
TW201935857A (zh) 連續逼近式類比數位轉換器的校正電路與校正方法
US20200106456A1 (en) Correction method and correction circuit for sigma-delta modulator
US11476861B2 (en) Error correction method and time-interleaved analog-to-digital converter
US9112500B2 (en) Method of outputting positioning pulse by PLC
KR20190084153A (ko) Adc 측정범위의 확장방법 및 장치
WO2015145675A1 (ja) 電圧信号検出装置および電圧信号調整方法
JP2007058733A (ja) 電子機器

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17889315

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17889315

Country of ref document: EP

Kind code of ref document: A1