[go: up one dir, main page]

CN107154802B - Method and device for correcting measurement data - Google Patents

Method and device for correcting measurement data Download PDF

Info

Publication number
CN107154802B
CN107154802B CN201610124865.8A CN201610124865A CN107154802B CN 107154802 B CN107154802 B CN 107154802B CN 201610124865 A CN201610124865 A CN 201610124865A CN 107154802 B CN107154802 B CN 107154802B
Authority
CN
China
Prior art keywords
data
correction coefficient
analog
output voltage
voltage value
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
CN201610124865.8A
Other languages
Chinese (zh)
Other versions
CN107154802A (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.)
Shenzhen Goodix Technology Co Ltd
Original Assignee
Shenzhen Goodix 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 Shenzhen Goodix Technology Co Ltd filed Critical Shenzhen Goodix Technology Co Ltd
Priority to CN201610124865.8A priority Critical patent/CN107154802B/en
Publication of CN107154802A publication Critical patent/CN107154802A/en
Application granted granted Critical
Publication of CN107154802B publication Critical patent/CN107154802B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Indication And Recording Devices For Special Purposes And Tariff Metering Devices (AREA)
  • Analogue/Digital Conversion (AREA)

Abstract

The invention discloses a method and a device for correcting measurement data, wherein the method comprises the following steps: when a starting command of a main controller is received, enabling the ADC to convert analog measurement data into digital data, dividing the digital data into a plurality of data ranges with preset quantity, obtaining a correction coefficient corresponding to each data range according to a known standard voltage input into the ADC, a theoretical output voltage value and an actual output voltage value corresponding to the known standard voltage, and correcting the digital data according to the correction coefficient. The invention divides the data output by the ADC into a plurality of sections of linear data ranges, calculates the correction parameter corresponding to each section of data range, and corrects the nonlinear error output by the ADC according to the correction parameter so as to improve the measurement precision of the ADC.

Description

Method and device for correcting measurement data
Technical Field
The invention belongs to the technical field of electronics, and particularly relates to a method and a device for correcting measurement data.
Background
An analog-to-Digital Converter (ADC) is a commonly used component in circuit design, and functions to convert continuous analog quantity into discrete Digital signals, and an input value of an ideal ADC design circuit is identical to a theoretical output voltage value and linearly changes.
In the prior art, methods for improving the measurement accuracy of the ADC mainly include the following two methods:
the first mode is analog correction, that is, an additional circuit is added to control an ADC device, and the analog correction method requires additional hardware resources, thereby increasing the test cost;
the second method is digital correction, that is, data acquired by the ADC is corrected by an algorithm, which is suitable for the ADC to change linearly in the whole input and output ranges, however, when the range is nonlinear, the result of the correction operation will have a large error, resulting in a failure of the correction.
Disclosure of Invention
The invention provides a method and a device for correcting measurement data, which divide a multi-section linear data range of data output by an ADC (analog to digital converter), calculate a correction parameter corresponding to each section of data range, and correct the data output by the ADC according to the correction parameter so as to improve the measurement precision of the ADC.
The invention provides a method for correcting measurement data, which comprises the following steps:
when a starting command of a main controller is received, enabling an analog-to-digital converter to convert analog measurement data into digital data, dividing the digital data into a plurality of data ranges with preset quantity, and obtaining a correction coefficient corresponding to each data range according to a known standard voltage input into the analog-to-digital converter, a theoretical output voltage value and an actual output voltage value corresponding to the known standard voltage; correcting the digital data in accordance with the correction coefficient.
The invention provides a device for correcting measurement data, which comprises:
the enabling module is used for enabling the analog-to-digital converter to convert the analog measurement data into digital data when receiving a starting command of the main controller; the dividing module is used for dividing the digital data into a plurality of data ranges with preset quantity; the calculation module is used for obtaining a correction coefficient corresponding to each section of the data range according to the known standard voltage input into the analog-to-digital converter, and a theoretical output voltage value and an actual output voltage value corresponding to the known standard voltage; and the correction module is used for correcting the digital data according to the correction coefficient.
As can be seen from the foregoing embodiments of the present invention, analog measurement data is converted into digital data by the ADC, the digital data output by the ADC is divided into multiple linear data ranges, the nonlinear data range output by the ADC is differentiated into multiple approximately linear data ranges, a correction parameter corresponding to each data range is calculated, and then the data output by the ADC is corrected according to the correction parameter, so as to correct an error of the nonlinear data output by the ADC, improve the accuracy of an output signal of the ADC, and further improve the measurement accuracy of the ADC. On the basis of not increasing the equipment cost, the problem that the error correction effect of nonlinear data in the prior art is poor is solved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a schematic diagram of an application scenario of a method for correcting measurement data according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating an implementation of a method for calibrating measurement data according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating an implementation of a method for correcting measurement data according to a second embodiment of the present invention;
FIG. 4 is a diagram illustrating a coefficient storage unit storing correction coefficients according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of an apparatus for calibrating measurement data according to a third embodiment of the present invention;
fig. 6 is a schematic structural diagram of an apparatus for correcting measurement data according to a fourth embodiment of the present invention.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a main controller 10 and a calibration device 20 are connected in a Universal Serial Bus (USB) manner, a WIFI manner, or other wired or wireless manners, and data exchange can be performed between the two. Similarly, the calibration device 20 is connected to the ADC30 for data exchange.
The main controller 10 is configured to initiate a start command to the calibration device 20 to start the calibration device 20 to calibrate the data output by the ADC 30.
The calibration device 20 is configured to, when receiving a start command from the main controller 10, enable the ADC30 to convert the analog measurement data into digital data, filter the digital data to filter noise data in the digital data, specifically, to filter high-frequency noise data therein, divide the filtered data into a preset number of data ranges, obtain a calibration coefficient corresponding to each data range according to a known standard voltage input to the analog-to-digital converter, a theoretical output voltage value and an actual output voltage value corresponding to the known standard voltage, correct the filtered data according to the calibration coefficient, transmit the corrected data back to the main controller 10, and display the corrected data on the main controller 10.
Specifically, the calibration device 20 may be further divided into a plurality of modules, including a data acquisition module, a data filtering module, an address generation module, a preprocessing module, a coefficient storage module, a calculation unit module, and the like.
The data acquisition module can be used for acquiring data converted by the ADC 30; the data filtering module can be used for filtering the data; the address generation module can be used for generating a correction coefficient storage address according to the data obtained after filtering; the preprocessing module can be used for generating a correction coefficient and storing the correction coefficient into the coefficient storage module; the coefficient storage module can be used for storing a correction coefficient; the calculation unit module is further configured to correct the data obtained after filtering according to the correction coefficient after obtaining the correction coefficient and the data obtained after filtering.
The ADC30 is used for receiving an instruction of the calibration apparatus 20, and converting the analog test data input to the ADC30 into digital data, that is, converting the analog test signal into a digital signal.
The main controller 10, the calibration device 20, and the ADC30 implement the above functions, please refer to the following descriptions of various embodiments.
Referring to fig. 2, fig. 2 is a schematic flow chart of a method for calibrating measurement data according to a first embodiment of the present invention, which can be applied to the calibration apparatus 20 shown in fig. 1, and mainly includes the following steps:
201. when a starting command of the main controller is received, enabling the analog-to-digital converter to convert the analog measurement data into digital data;
the correction device receives a start command from the main controller and triggers correction of data output by the ADC according to the start command.
When a start command of the main controller is received, the ADC is enabled to convert analog measurement data input to the ADC into digital data. In this embodiment, the ADC bit width is N bits, ADC conversion is enabled, analog measurement data is converted into digital data, and the digital data is read back from a pre-designated ADC interface according to an interface protocol predefined by the system. If the ADC Interface is a Serial bus, for example, a Serial Peripheral Interface (SPI) bus, the digital data needs to be converted from Serial to parallel, and N bits of digital data are finally obtained.
202. Dividing the digital data into a plurality of data ranges with preset number, and obtaining a correction coefficient corresponding to the data of each data range according to the known standard voltage input to the analog-to-digital converter, and a theoretical output voltage value and an actual output voltage value corresponding to the known standard voltage;
the digital data converted by the ADC is finely divided into a preset number of multi-segment data ranges, so that the divided multi-segment data ranges are approximate linear curves. The data is divided into a plurality of sections of linear data, and then the corresponding correction is carried out in sections, so that the aim of improving the correction precision can be achieved.
And obtaining correction coefficients corresponding to the data of each data range according to the known standard voltage input into the ADC, and a theoretical output voltage value and an actual output voltage value corresponding to the known standard voltage, wherein the correction coefficients are divided into two groups, and therefore, the data of each data range corresponds to two groups of correction coefficients.
204. The digital data is corrected by a correction factor.
And correcting the converted digital data according to the correction coefficient corresponding to the data of each data range, transmitting the corrected data back to the main controller, and displaying the corrected data on the main controller or displaying the corrected data through a display device connected with the main controller.
In the embodiment of the invention, analog measurement data is converted into digital data through an ADC, the digital data output by the ADC is divided into a plurality of sections of linear data ranges, the nonlinear data range output by the ADC is differentiated into a plurality of sections of approximate linear data ranges, a correction parameter corresponding to each section of data range is obtained through calculation, and then the data output by the ADC is corrected according to the correction parameters, so that the error of the nonlinear data output by the ADC is corrected, the precision of an output signal of the ADC is improved, and the measurement precision of the ADC is further improved. On the basis of not increasing the equipment cost, the problem that the error correction effect of nonlinear data in the prior art is poor is solved.
Referring to fig. 3, fig. 3 is a schematic flow chart of a method for calibrating measurement data according to a second embodiment of the present invention, which can be applied to the calibration apparatus 20 shown in fig. 1, and includes the following steps:
301. when a starting command of the main controller is received, enabling the analog-to-digital converter to convert the analog measurement data into digital data;
302. filtering the digital data to filter noise data in the digital data;
filtering is typically achieved using a low pass filter. Common low pass filters include: finite Impulse Response (FIR) filters and Infinite Impulse Response (IIR) filters. In terms of performance, the IIR filter can obtain a higher filtering effect with a lower filter order, uses less memory units, and is economical and efficient, but the high efficiency is at the cost of phase nonlinearity. In contrast, FIR filters can obtain strict linear phase, but because the poles of the FIR filter transfer function are fixed at the origin, high filtering effects can be achieved only with higher orders. The filter selection here can be determined according to the system design requirements, for example, the acquisition signal does not care about the phase relationship (such as direct current signal) and the system resources are relatively tight, an IIR filter can be selected, and an FIR filter can be selected otherwise.
The embodiment of the invention preferably selects the FIR filter, and the digital data is filtered by the FIR filter to filter the high-frequency noise data in the digital data. By filtering, useless data which may affect the calculation result are further filtered, so that the accuracy of data correction is improved.
303. Dividing the data obtained after filtering into 2mSegment data ranges;
the data obtained after filtering is nonlinear data, and the nonlinear data is divided into 2mAfter segment data range, so that divided 2mThe segment data ranges are all approximated as linear data ranges. That is, the nonlinear data is divided into a plurality of linear data segments, and then the corresponding correction is performed in segments, so as to achieve the purpose of improving the correction accuracy.
304. Inputting a known standard voltage from an input end of the analog-to-digital converter;
and obtaining a correction coefficient corresponding to the data of each data range according to the known standard voltage Vi input into the ADC, the theoretical output voltage value X corresponding to the Vi and the actual output voltage value Y. The known standard voltage Vi is set according to the maximum input voltage of the ADC, which is a known value.
Specifically, when Vi denotes the known standard voltage, and Vi is related to the maximum input voltage Vref of the ADC, the relationship between the known standard voltage Vi and the maximum input voltage Vref of the ADC is:
Vi=Vref/2m(2m-n)
wherein n is more than or equal to 0 and less than or equal to 2mN has an initial value of 2m;m>0。
When the initial value of n is 2mWhen Vi is 0, n is gradually decreased, and when n is 2mWhen Vi is Vref.
305. Calculating to obtain a theoretical output voltage value of the analog-to-digital converter corresponding to the known standard voltage according to the ideal performance parameter of the analog-to-digital converter, and reading an actual output voltage value which is output by the output end of the analog-to-digital converter and corresponds to the known standard voltage;
the ideal performance parameter of the ADC means that after the ADC converts analog data into digital data, the digital data has no error.
And calculating a theoretical output voltage value X corresponding to the known standard voltage according to the ideal performance parameters of the ADC and the known standard voltage.
And reading the actual output voltage value Y which is output by the output end of the ADC and corresponds to the known standard voltage.
The relationship among Vi, Vref, X, Y is shown in the following table:
Figure BDA0000935245080000071
306. respectively calculating a correction coefficient corresponding to each section of data range according to a preset algorithm according to the theoretical output voltage value and the actual output voltage value;
and respectively calculating correction coefficients corresponding to each section of data range according to the calculated theoretical output voltage value X and the read actual output voltage value Y and a preset algorithm, wherein the correction coefficients comprise a first correction coefficient A and a second correction coefficient B.
The preset algorithm is calculated as follows:
Figure BDA0000935245080000072
wherein m is more than 0.
The filtered data is nonlinear data, which is finely divided into 2mAnd the data range is divided into a plurality of data ranges which are approximate to linear curves. I.e. dividing the non-linear dataThe data are divided into a plurality of sections of linear data, and then the corresponding correction is carried out in sections, so that the aim of improving the correction precision is fulfilled.
It should be noted that the preprocessing module in the correction device 20 may store the calculated correction coefficient in the coefficient storage module, the storage address is generated by the address generation module, and after storing the storage address, the calculation unit module also reads the correction coefficient from the storage address. The memory address needs to be generated before the correction factor is calculated.
Specifically, an address for reading the correction coefficient is generated from the upper m bits of the filtered data, and the correction coefficient is read from the address.
Wherein, using N to represent the total bit width of the data obtained after filtering, the total bit width can be divided into high bits and low bits, generating an address for reading the correction coefficient at high m bits of the high bits, reading the correction coefficient from the address, m represents the address bit width of the read correction coefficient, 0 < m < N, then the relationship between the address bit width of the read correction coefficient and the total bit width of the data obtained after filtering is:
address(m-1:0)=data(N-1:N-m)
preferably, if N is 16 and m is 4, then address (4-1:0) is data (16-1: 16-4).
Referring to fig. 4, the coefficient storage unit may be divided into a first coefficient storage unit for storing the first correction coefficient a and a second coefficient storage unit for storing the second correction coefficient B. The first correction coefficient a and the second correction coefficient B are 2m correction coefficients per group, and the read addresses in the coefficient storage units are the same. And the calculation unit module can read the first correction coefficient and the second correction coefficient from the read address simultaneously.
307. And correcting the data obtained after filtering according to the correction coefficient.
The filtered data is multiplied by a first correction coefficient A and added to a second correction coefficient B to correct the filtered data.
Data D obtained after filteringLAnd corrected data DRThe relationship of (1) is:
DR=DL×A+B
and transmitting the corrected data back to the main controller in a format which can be identified by the main controller, and displaying the corrected data on the main controller or displaying the corrected data through a display device connected with the main controller.
In the embodiment of the invention, analog measurement data is converted into digital data through the ADC, and the digital data output by the ADC is divided into 2 after being filteredmAnd (3) dividing the range of the nonlinear data output by the ADC into a range of multi-section approximate linear data, calculating to obtain two groups of correction parameters corresponding to each section of data range, and correcting the data output by the ADC according to the correction parameters, so that the error of the nonlinear data output by the ADC is corrected well, the precision of the output signal of the ADC is improved, and the measurement precision of the ADC is further improved. On the basis of not increasing the equipment cost, the problem that the error correction effect of nonlinear data in the prior art is poor is solved.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an apparatus for calibrating measurement data according to a third embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown. The device for correcting measurement data illustrated in fig. 5 may be an implementation subject of the method for correcting measurement data provided in the embodiments illustrated in fig. 2 and 3, such as the correction device 20 or one of the control modules. The apparatus for correcting measurement data illustrated in fig. 5 includes: an enabling module 501, a dividing module 502, a calculating module 503, and a correcting module 504.
The above functional modules are described in detail as follows:
the enabling module 501 is configured to enable the analog-to-digital converter to convert the analog measurement data into digital data when receiving a start command of the host controller.
A dividing module 502 for dividing the digital data into a preset number of multi-segment data ranges.
The calculating module 503 is configured to obtain a correction coefficient corresponding to each segment of the data range according to the known standard voltage input to the analog-to-digital converter, and the theoretical output voltage value and the actual output voltage value corresponding to the known standard voltage.
A correction module 504 for correcting the digital data according to the correction factor.
For details that are not described in the present embodiment, please refer to the description of the embodiment shown in fig. 1 to fig. 3, which will not be described herein again.
It should be noted that, in the embodiment of the apparatus for correcting measurement data illustrated in fig. 5, the division of the functional modules is only an example, and in practical applications, the above functions may be allocated to different functional modules according to needs, for example, configuration requirements of corresponding hardware or convenience of implementation of software, that is, the internal structure of the apparatus for correcting measurement data is divided into different functional modules to complete all or part of the above described functions. In addition, in practical applications, the corresponding functional modules in this embodiment may be implemented by corresponding hardware, or may be implemented by corresponding hardware executing corresponding software. The above description principles can be applied to various embodiments provided in the present specification, and are not described in detail below.
In the embodiment of the invention, analog measurement data is converted into digital data through an ADC, the digital data output by the ADC is divided into a plurality of sections of linear data ranges, the nonlinear data range output by the ADC is differentiated into a plurality of sections of approximate linear data ranges, a correction parameter corresponding to each section of data range is obtained through calculation, and then the data output by the ADC is corrected according to the correction parameters, so that the error of the nonlinear data output by the ADC is corrected, the precision of an output signal of the ADC is improved, and the measurement precision of the ADC is further improved. On the basis of not increasing the equipment cost, the problem that the error correction effect of nonlinear data in the prior art is poor is solved.
Referring to fig. 6, a schematic structural diagram of an apparatus for calibrating measurement data according to a fourth embodiment of the present invention is shown, and the apparatus for calibrating measurement data illustrated in fig. 6 may be an executing entity of the method for calibrating measurement data provided in the embodiments shown in fig. 2 and fig. 3, such as the calibrating apparatus 20 or one of the control modules. The device mainly includes: an enabling module 601, a filtering module 602, a dividing module 603, a calculating module 604, an input module 6041, a first calculating sub-module 6042, a reading module 6043, a second calculating sub-module 6044, a correcting module 605, and an address generating module 606. The above functional modules are described in detail as follows:
the enabling module 601 is configured to enable the analog-to-digital converter to convert the analog measurement data into digital data when receiving a start command of the main controller.
A filtering module 602, configured to filter the digital data to filter noise data in the digital data. The filtering module 602 is specifically configured to filter the digital data through a finite long unit impulse response filter to filter high-frequency noise data in the digital data.
A dividing module 603, configured to divide the filtered data into a preset number of multiple data ranges;
the calculating module 604 is configured to obtain a correction coefficient corresponding to each segment of the data range according to the known standard voltage input to the analog-to-digital converter, and the theoretical output voltage value and the actual output voltage value corresponding to the known standard voltage.
And a correction module 605 for correcting the filtered data according to the correction factor.
The device can further comprise a sending module for transmitting the corrected data back to the main controller.
Further, the dividing module 603 is further configured to divide the filtered data into 2mSegment data range.
The calculation module 604 may further include:
an input module 6041, configured to input a known standard voltage from an input terminal of the analog-to-digital converter;
a first calculating submodule 6042, configured to calculate, according to an ideal performance parameter of the analog-to-digital converter, a theoretical output voltage value of the analog-to-digital converter corresponding to the known standard voltage;
a reading module 6043, configured to read an actual output voltage value output by the output end of the analog-to-digital converter and corresponding to the known standard voltage;
a second calculating submodule 6044, configured to calculate, according to the theoretical output voltage value and the actual output voltage value, a correction coefficient corresponding to each segment of the data range according to a preset algorithm;
further, the input module 6041 is specifically configured to input a known standard voltage Vi from an input end of the analog-to-digital converter, where the relationship between the known standard voltage Vi and the maximum input voltage Vref of the analog-to-digital converter is:
Vi=Vref/2m(2m-n)
wherein n is more than or equal to 0 and less than or equal to 2mN has an initial value of 2m;m>0;
The second calculating submodule 6044 is specifically configured to calculate, according to the theoretical output voltage value X and the actual output voltage Y, a correction coefficient corresponding to each segment of the data range according to a preset algorithm, where the correction coefficient includes: a first correction coefficient a and a second correction coefficient B;
wherein, the calculation formula of the preset algorithm is as follows:
Figure BDA0000935245080000111
the apparatus still further comprises:
an address generating module 606, configured to generate an address for reading a correction coefficient according to the high m bits of the filtered data;
wherein, N represents the total data bit width obtained after the filtering, m represents the address bit width of the read correction coefficient, and m is greater than 0 and less than N, then the relationship between the address bit width of the read correction coefficient and the total data bit width is:
address(m-1:0)=data(N-1:N-m)
further, the correcting module 605 is specifically configured to multiply the filtered data by the first correction coefficient a and add the multiplied data to the second correction coefficient B to correct the filtered data.
For details that are not described in the present embodiment, please refer to the description of the embodiment shown in fig. 2 to fig. 3, which will not be described herein again.
In the embodiment of the invention, analog measurement is carried out through ADCConverting data into digital data, filtering the digital data output by ADC and dividing the digital data into 2mAnd (3) dividing the range of the nonlinear data output by the ADC into a range of multi-section approximate linear data, calculating to obtain two groups of correction parameters corresponding to each section of data range, and correcting the data output by the ADC according to the correction parameters, so that the error of the nonlinear data output by the ADC is corrected well, the precision of the output signal of the ADC is improved, and the measurement precision of the ADC is further improved. On the basis of not increasing the equipment cost, the problem that the error correction effect of nonlinear data in the prior art is poor is solved.
In the embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and in actual implementation, there may be other divisions, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication link may be an indirect coupling or communication link of some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present invention is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no acts or modules are necessarily required of the invention.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In view of the above description of the method and apparatus for calibrating measurement data provided by the present invention, those skilled in the art will recognize that changes may be made in the embodiments and applications of the method and apparatus according to the teachings of the present invention.

Claims (11)

1. A method of correcting measurement data, the method comprising:
when a starting command of a main controller is received, enabling an analog-to-digital converter to convert analog measurement data into digital data, and filtering the digital data to filter noise data in the digital data;
dividing the data obtained after filtering into 2mAnd obtaining a correction coefficient corresponding to each section of the data range according to the known standard voltage input to the analog-to-digital converter, and the theoretical output voltage value and the actual output voltage value corresponding to the known standard voltage, wherein the method specifically comprises the following steps:
inputting a known standard voltage from an input end of the analog-to-digital converter, and calculating a theoretical output voltage value of the analog-to-digital converter corresponding to the known standard voltage according to ideal performance parameters of the analog-to-digital converter;
reading an actual output voltage value which is output by the output end of the analog-to-digital converter and corresponds to the known standard voltage;
respectively calculating a correction coefficient corresponding to each section of the data range according to a preset algorithm according to the theoretical output voltage value and the actual output voltage value;
and correcting the data obtained after filtering according to the correction coefficient.
2. The method of claim 1, wherein the filtering the digital data to filter out noise data in the digital data comprises:
and filtering the digital data through a finite-length single-bit impulse response filter to filter high-frequency noise data in the digital data.
3. The method of claim 2, wherein inputting a known standard voltage from an input of the analog-to-digital converter comprises:
inputting a known standard voltage Vi from an input end of the analog-to-digital converter, wherein the relation between the known standard voltage Vi and a maximum input voltage Vref of the analog-to-digital converter is as follows:
Vi=Vref/2m(2m-n)
wherein n is more than or equal to 0 and less than or equal to 2mN has an initial value of 2m;m>0。
4. The method of claim 3, wherein calculating the correction factor corresponding to each segment of the data range according to a preset algorithm based on the theoretical output voltage value and the actual output voltage value comprises:
respectively calculating a correction coefficient corresponding to each section of the data range according to the theoretical output voltage value X and the actual output voltage Y and a preset algorithm, wherein the correction coefficient comprises: a first correction coefficient a and a second correction coefficient B;
wherein, the calculation formula of the preset algorithm is as follows:
Figure FDA0002704469620000021
5. the method of claim 4, wherein the dividing the filtered data into the preset number of multi-segment data ranges further comprises:
generating an address for reading a correction coefficient according to the high m bits of the data obtained after filtering;
wherein, N represents the total data bit width obtained after the filtering, m represents the address bit width of the read correction coefficient, and m is greater than 0 and less than N, then the relationship between the address bit width of the read correction coefficient and the total data bit width is:
address(m-1:0)=data(N-1:N-m)。
6. the method of claim 5, wherein said correcting said filtered data by said correction factor comprises:
and multiplying the filtered data by a first correction coefficient A and adding the multiplied data to a second correction coefficient B to correct the filtered data.
7. An apparatus for correcting measurement data, the apparatus comprising:
the enabling module is used for enabling the analog-to-digital converter to convert the analog measurement data into digital data when receiving a starting command of the main controller;
the filtering module is used for filtering the digital data to filter noise data in the digital data;
a dividing module for dividing the filtered data into 2mSegment data ranges;
the calculation module is used for obtaining a correction coefficient corresponding to each section of the data range according to the known standard voltage input into the analog-to-digital converter, and a theoretical output voltage value and an actual output voltage value corresponding to the known standard voltage;
the calculation module specifically includes:
the input module is used for inputting a known standard voltage from the input end of the analog-to-digital converter;
the first calculation submodule is used for calculating to obtain a theoretical output voltage value of the analog-to-digital converter corresponding to the known standard voltage according to the ideal performance parameters of the analog-to-digital converter;
the reading module is used for reading an actual output voltage value which is output by the output end of the analog-to-digital converter and corresponds to the known standard voltage;
the second calculation submodule is used for respectively calculating a correction coefficient corresponding to each section of the data range according to a preset algorithm according to the theoretical output voltage value and the actual output voltage value;
and the correction module is used for correcting the data obtained after the filtering according to the correction coefficient.
8. The apparatus according to claim 7, wherein the filtering module is specifically configured to filter the digital data through a finite long unit impulse response filter to filter out high-frequency noise data in the digital data.
9. The apparatus of claim 8, wherein:
the input module is specifically configured to input a known standard voltage Vi from an input end of the analog-to-digital converter, where a relationship between the known standard voltage Vi and a maximum input voltage Vref of the analog-to-digital converter is as follows:
Vi=Vref/2m(2m-n)
wherein n is more than or equal to 0 and less than or equal to 2mN has an initial value of 2m;m>0;
The second calculating submodule is specifically configured to calculate, according to the theoretical output voltage value X and the actual output voltage value Y, a correction coefficient corresponding to each segment of the data range according to a preset algorithm, where the correction coefficient includes: a first correction coefficient a and a second correction coefficient B;
Figure FDA0002704469620000031
10. the apparatus of claim 9, further comprising:
the address generating module is used for generating an address for reading a correction coefficient according to the high m bits of the data obtained after filtering;
wherein, N represents the total data bit width obtained after the filtering, m represents the address bit width of the read correction coefficient, and m is greater than 0 and less than N, then the relationship between the address bit width of the read correction coefficient and the total data bit width is:
address(m-1:0)=data(N-1:N-m)。
11. the apparatus according to claim 10, wherein the correction module is specifically configured to multiply the filtered data by a first correction coefficient a and add the multiplied data to a second correction coefficient B to correct the filtered data.
CN201610124865.8A 2016-03-04 2016-03-04 Method and device for correcting measurement data Active CN107154802B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610124865.8A CN107154802B (en) 2016-03-04 2016-03-04 Method and device for correcting measurement data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610124865.8A CN107154802B (en) 2016-03-04 2016-03-04 Method and device for correcting measurement data

Publications (2)

Publication Number Publication Date
CN107154802A CN107154802A (en) 2017-09-12
CN107154802B true CN107154802B (en) 2021-02-02

Family

ID=59791939

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610124865.8A Active CN107154802B (en) 2016-03-04 2016-03-04 Method and device for correcting measurement data

Country Status (1)

Country Link
CN (1) CN107154802B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111010180B (en) * 2019-12-19 2024-11-15 广东纳睿雷达科技股份有限公司 Analog-to-digital converter calibration system and method
WO2021196088A1 (en) * 2020-04-01 2021-10-07 深圳市汇顶科技股份有限公司 Analog-to-digital conversion method, apparatus, and chip, electronic device, and storage medium
CN114062824B (en) * 2021-11-19 2023-12-26 河北新大长远电力科技股份有限公司 Power quality monitoring method and device based on distribution room
CN116204029A (en) * 2022-11-04 2023-06-02 海的电子科技(苏州)有限公司 Voltage correction method and device
CN118624987B (en) * 2024-08-09 2024-10-18 四川纳拓新材料技术有限公司 A system and method for measuring contact resistance between conductive coating and current collector

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051339A (en) * 2012-04-27 2013-04-17 深圳市正弦电气股份有限公司 Correcting method and system of AD (Analogue to Digital) sampling value
US8922401B1 (en) * 2013-09-25 2014-12-30 Raytheon Company Methods and apparatus for interference canceling data conversion
CN104779954A (en) * 2015-04-13 2015-07-15 浙江大学 Successive approximation type analog-to-digital converter and error code detection based digital correction method thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8164495B2 (en) * 2009-11-12 2012-04-24 Intersil Americas Inc. Integrated non-linearity (INL) and differential non-linearity (DNL) correction techniques for digital-to-analog converters (DACS)

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051339A (en) * 2012-04-27 2013-04-17 深圳市正弦电气股份有限公司 Correcting method and system of AD (Analogue to Digital) sampling value
US8922401B1 (en) * 2013-09-25 2014-12-30 Raytheon Company Methods and apparatus for interference canceling data conversion
CN104779954A (en) * 2015-04-13 2015-07-15 浙江大学 Successive approximation type analog-to-digital converter and error code detection based digital correction method thereof

Also Published As

Publication number Publication date
CN107154802A (en) 2017-09-12

Similar Documents

Publication Publication Date Title
CN107154802B (en) Method and device for correcting measurement data
CN103051339B (en) A kind of AD sampling value correcting method and system
CN114362754A (en) Multichannel analog signal acquisition and processing system
CN103176503A (en) Digital display scope (DDS) signal generator and amplitude control method thereof
CN114900184B (en) Method for realizing high-precision AD acquisition based on domestic AD conversion chip
CN113285719B (en) Audio digital-to-analog conversion circuit
CN118433843B (en) Wireless sensor
CN104575890A (en) Potentiometer and resistance value adjusting method
CN107708145B (en) Synchronous detection method and synchronous detection equipment
CN105425194B (en) A kind of setting method of the meter constant of electric instrument
JP2009158996A (en) A / D conversion circuit and electronic device
CN118174693A (en) Design method of one-dimensional variable fractional delay filter with coefficient correlation
EP1645027A1 (en) Method and apparatus for generation of arbitrary mono-cycle waveforms
CN115913227A (en) Analog-to-digital converter nonlinear correction method, device, equipment and storage medium
TWI571052B (en) Serial finite impulse response filter and signal processing method thereof
CN108731836B (en) Temperature measuring method, circuit and cooking utensil
CN115459775A (en) AD sampling circuit, sampling method and sampling device thereof, and household appliance
CN115826675B (en) Waveform synthesis system and chip
CN112114265B (en) Method for obtaining battery capacity
CN206249141U (en) Low spurious DDS sources
CN106026970A (en) IIR (Infinite Impulse Response) digital filter construction method based on MATLAB
CN102868385B (en) Digital filter capable of configuring coefficient and implementation method
CN104779934B (en) A kind of RC filtering methods and RC wave filters for being used for blood pressure and heart rate test
CN108871385B (en) Encoder, motor, encoder data processing method and storage medium
CN110719079A (en) Signal amplification filtering conditioning card

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