[go: up one dir, main page]

CN107621279B - Data processing method, sensor data calibration method and device - Google Patents

Data processing method, sensor data calibration method and device Download PDF

Info

Publication number
CN107621279B
CN107621279B CN201710816751.4A CN201710816751A CN107621279B CN 107621279 B CN107621279 B CN 107621279B CN 201710816751 A CN201710816751 A CN 201710816751A CN 107621279 B CN107621279 B CN 107621279B
Authority
CN
China
Prior art keywords
data
error
fitting
feature
fitting data
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
CN201710816751.4A
Other languages
Chinese (zh)
Other versions
CN107621279A (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.)
Weifang Goertek Microelectronics Co Ltd
Original Assignee
Goertek Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Goertek Inc filed Critical Goertek Inc
Priority to CN201710816751.4A priority Critical patent/CN107621279B/en
Publication of CN107621279A publication Critical patent/CN107621279A/en
Application granted granted Critical
Publication of CN107621279B publication Critical patent/CN107621279B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Indication And Recording Devices For Special Purposes And Tariff Metering Devices (AREA)
  • Testing Or Calibration Of Command Recording Devices (AREA)

Abstract

The invention discloses a data processing method, a data calibration method and a data calibration device for a sensor. And determining a conversion model obtained by fitting true value data based on the parameters to be measured and the raw output data of the sensor. And obtaining an error model of the fitted data of the raw output of the sensor and the measured data based on the conversion model. And determining a plurality of characteristic error data according to the data change trend of the error model, and determining fitting data corresponding to the characteristic error data as characteristic fitting data based on the error model to obtain a characteristic fitting data group. And obtaining fitting data based on the conversion model, and searching any two feature fitting data which are adjacent to the fitting data numerical value. And calculating to obtain a compensation error based on the characteristic error data corresponding to any two characteristic fitting data, and calculating to obtain calibration data of the fitting data based on the compensation error and the fitting data. The invention realizes the accurate calibration of the sensor data, greatly reduces the measurement error of the sensor and improves the sensor precision.

Description

Data processing method, sensor data calibration method and device
Technical Field
The invention belongs to the technical field of electronics, and particularly relates to a data processing method and device and a sensor data calibration method and device.
Background
With the rapid development of electronic technology, sensors play more and more important roles in science and technology, industrial and agricultural production and daily life.
Due to the electrical characteristics of the electronic element of the sensor, the manufacturing process of the sensor and the like, the true value data of the parameter to be detected, which is obtained by the detection of the sensor, and the original output data of the sensor form a certain functional relationship, and a curve fitting method is adopted to obtain a conversion model of the sensor in order to establish the functional relationship between the true value data of the parameter to be detected and the original output data of the sensor. The conversion model is a functional relation of true value data of the parameters to be measured of the sensor converted into fitting data of original output data of the sensor, and the fitting data is output data calculated based on the conversion model after the sensor detects and acquires the true value data of any parameter to be measured in the range.
However, the fitting data obtained by calculation by using the curve fitting algorithm and the corresponding true value data have a large fitting error, so that the measurement of the sensor is not accurate enough, and the accuracy of the sensor is influenced.
Disclosure of Invention
In view of the above, the present invention provides a data processing method and apparatus, and a sensor data calibration method and apparatus, so as to further reduce fitting errors and improve sensor accuracy based on fitting data obtained by conversion model calculation.
In order to solve the above technical problems, the present invention provides various data processing methods, including:
determining a conversion model obtained by fitting based on truth value data of the parameters to be measured and the original output data of the sensor;
based on the conversion model, obtaining fitting data of the original output data of the sensor and an error model of the true value data of the parameter to be measured;
determining a plurality of characteristic error data representing the data change trend according to the data change trend of the error model, and taking fitting data corresponding to the plurality of characteristic error data as characteristic fitting data to obtain a characteristic fitting data group;
the conversion model is used for calculating fitting data corresponding to original output data obtained by detecting parameters to be detected by the sensor; the feature fitting data set is used for determining any two feature fitting data which are numerically adjacent to the fitting data; calculating to obtain a compensation error based on the feature error data respectively corresponding to the any two feature fitting data; and calculating calibration data for obtaining the fitting data based on the compensation error and the fitting data.
Preferably, the determining, according to the data change trend of the error model, a plurality of feature error data indicating the data change trend, and fitting data corresponding to each of the plurality of feature error data as feature fitting data includes:
and determining error peak/valley values according to the data change trend of the error model, and taking the fitting data corresponding to each error peak/valley value as feature fitting data.
Preferably, the determining, according to the data change trend of the error model, a plurality of feature error data indicating the data change trend, and fitting data corresponding to each of the plurality of error data as feature fitting data includes:
and determining error peak/valley values and at least one characteristic error data between any two adjacent error peak values and error valley values according to the data change trend of the error model, and respectively corresponding fitting data of each error peak/valley value and at least one characteristic error data between any adjacent error peak values and error valley values as characteristic fitting data.
The invention also discloses a data calibration method of the sensor, which comprises the following steps:
acquiring fitting data obtained based on a conversion model when the sensor detects the parameter to be detected;
searching any two feature fitting data adjacent to the fitting data numerical value; the characteristic fitting data correspond to characteristic error data representing data change trend in the error model, and the error model is obtained by calculation based on the fitting data of the original output data of the sensor and the truth value data of the parameter to be measured; fitting data of the raw output data of the sensor is obtained through calculation based on the conversion model;
calculating to obtain a compensation error based on the feature error data respectively corresponding to the any two feature fitting data;
and calculating calibration data for obtaining the fitting data based on the compensation error and the fitting data.
Preferably, the calculating the compensation error based on the feature error data corresponding to any two of the feature fitting data includes:
calculating to obtain the compensation error according to a compensation error calculation formula based on the feature error data respectively corresponding to the any two feature fitting data;
the compensation error calculation formula is as follows:
D=(D2-D1)(P-P2)/(P2-P1)+D2
wherein P represents the fitting data, D represents the compensation error, P1、P2Representing any two feature fit data numerically adjacent to said fit data, D1Representing said feature fitting data P1Corresponding characteristic error data, D2Representing said feature fitting data P2Corresponding characteristic error data.
Preferably, the calculating calibration data for obtaining the fitting data based on the compensation error and the fitting data comprises:
and superposing the compensation error to the fitting data, and calculating to obtain calibration data of the fitting data.
The present invention provides a data processing apparatus, comprising:
the first determination module is used for determining a conversion model obtained by fitting based on the true value data of the parameter to be measured and the original output data of the sensor;
an error model obtaining module, configured to obtain, based on the conversion model, an error model of fitting data of the sensor raw output data and true value data of the parameter to be measured;
the second determination module is used for determining a plurality of characteristic error data representing the data change trend according to the data change trend of the error model;
a feature fitting data acquisition module, configured to use test data corresponding to the plurality of feature error data as feature fitting data to obtain a feature fitting data set;
the conversion model is used for calculating fitting data of original output data obtained by detecting parameters to be detected by the sensor; the feature fitting data set is used for determining any two feature fitting data which are numerically adjacent to the fitting data; calculating to obtain a compensation error based on the feature error data respectively corresponding to the any two feature fitting data; and calculating calibration data for obtaining the fitting data based on the compensation error and the fitting data.
Preferably, the second determining module is specifically configured to:
determining an error peak/valley value according to the data change trend of the error model;
the feature fitting data acquisition module is specifically configured to:
and taking the fitting data corresponding to each error peak/valley value as characteristic fitting data.
Preferably, the second determining module is specifically configured to:
determining error peak/valley values and at least one characteristic error data between any adjacent error peak values and error valley values according to the data change trend of the error model;
the feature fitting data acquisition module is specifically configured to:
and fitting data corresponding to each error peak/valley value and at least one characteristic error data between any adjacent error peak values and error valley values are used as characteristic fitting data.
The invention also provides a data calibration device of the sensor, which comprises:
the first acquisition module is used for acquiring fitting data obtained based on a conversion model when the sensor detects a parameter to be detected;
the searching module is used for searching any two characteristic fitting data adjacent to the fitting data numerical value; the characteristic fitting data correspond to characteristic error data representing data change trend in the error model, and the error model is obtained by calculation based on the fitting data of the original output data of the sensor and the truth value data of the parameters to be measured; fitting data of the raw output data of the sensor is obtained through calculation based on the conversion model;
the first calculation module is used for calculating to obtain a compensation error based on the feature error data respectively corresponding to the any two feature fitting data;
and the second calculation module is used for calculating and obtaining calibration data of the fitting data based on the compensation error and the fitting data.
Preferably, the first calculation module is specifically configured to:
calculating to obtain the compensation error according to a compensation error calculation formula based on the feature error data respectively corresponding to the any two feature fitting data;
the compensation error calculation formula is as follows:
D=(D2-D1)(P-P2)/(P2-P1)+D2
wherein P represents the fitting data, D represents the compensation error, P1、P2Representing any two feature fit data numerically adjacent to said fit data, D1Representing said feature fitting data P1Corresponding characteristic error data, D2Representing said feature fitting data P2Corresponding characteristic error data.
Preferably, the second calculation module is specifically configured to:
and superposing the compensation error to the fitting data, and calculating to obtain calibration data of the fitting data.
Compared with the prior art, the invention can obtain the following technical effects:
the invention provides a data processing method and device and a sensor data calibration method and device. And based on the conversion model, obtaining an error model of fitting data of the original output data of the sensor and true value data of the parameter to be measured. And determining a plurality of characteristic error data representing the data change trend according to the data change trend of the error model, and determining fitting data corresponding to the characteristic error data as characteristic fitting data based on the error model to obtain a characteristic fitting data group. And when the sensor detects the parameter to be detected, calculating the obtained fitting data based on the conversion model. And searching any two feature fitting data adjacent to the fitting data numerical value based on the feature fitting data group. And calculating to obtain a compensation error based on the characteristic error data respectively corresponding to the any two characteristic fitting data, and calculating to obtain calibration data of the fitting data based on the compensation error and the fitting data. The calibration data is used as the output data of the sensor, so that the further calibration of the fitting data of the sensor is realized, the fitting error of the fitting data can be greatly reduced, and the accuracy of the sensor is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
FIG. 1 is a flow chart of one embodiment of a data processing method of an embodiment of the present invention;
FIG. 2 is a flow chart of another embodiment of a method for calibrating sensor data in accordance with an embodiment of the present invention;
FIG. 3 is a schematic diagram of an error model in a sensor data calibration method according to an embodiment of the invention;
FIG. 4 is a block diagram of an embodiment of a data processing apparatus according to the present invention;
fig. 5 is a schematic structural diagram of an embodiment of a sensor data calibration apparatus according to an embodiment of the present invention.
Detailed Description
The following detailed description of the embodiments of the present invention will be provided with reference to the accompanying drawings and examples, so that how to implement the embodiments of the present invention by using technical means to solve the technical problems and achieve the technical effects can be fully understood and implemented.
With the rapid development of electronic technology, sensors have been applied to the fields of science and technology, industrial and agricultural production and daily life, and play more and more important roles in various fields.
The sensors can be classified into photosensitive sensors, acoustic sensors, pressure-sensitive sensors, temperature-sensitive sensors, humidity-sensitive sensors, and the like according to their functions, and the sensors with different functions can detect different parameters to be detected, such as light, sound, pressure, temperature, humidity, and the like. In practical applications, the sensor is usually disposed at a detection position of an object to be detected or disposed in an environment to be detected, and a parameter to be detected is obtained through detection of a sensitive element of equipment in the sensor. However, since the physical data of the parameter to be detected, which is the non-electric quantity, is obtained by detection, the user cannot directly read the physical data, and the parameter to be detected needs to be converted into an electric signal or other information form to output data according to a certain rule, and the output data is displayed in a pointer rotation or display mode, so that data detection of the object to be detected or the environment to be detected is realized.
In the prior art, for any parameter to be measured, the data to be measured obtained by the sensor detection is fitting data obtained by converting the parameter to be measured based on a conversion model. The conversion model is a functional relation of converting data to be detected by the sensor into sensor fitting data, and the fitting data is the fitting data of the original output data calculated based on the conversion model after the sensor acquires any parameter to be detected in the measuring range. Specifically, when the sensor is manufactured, the conversion model is established by selecting true value data of a plurality of parameters to be measured in the range of the sensor and acquiring corresponding original output data, and establishing the conversion model through a curve fitting algorithm based on the true value data and the original output data of the parameters to be measured. The curve fitting algorithm may include a least squares method, a piecewise interpolation method, and the like.
However, in the method for obtaining the conversion model by the curve fitting algorithm, a known function is approximated by constructing a difference function, so that a large fitting error still exists between the obtained fitting data and the true value data of the parameter to be measured, thereby causing inaccurate measurement of the sensor and influencing the accuracy of the sensor.
The method aims to solve the technical problem that the fitting data and the corresponding true value data of the parameters to be measured have large fitting errors. The invention provides a data processing method, a sensor data calibration method and a sensor data calibration device. And based on the conversion model, obtaining an error model of fitting data of the original output data of the sensor and true value data of the parameter to be measured. And determining a plurality of characteristic error data representing the data change trend according to the data change trend of the error model, and determining fitting data corresponding to the characteristic error data as characteristic fitting data based on the error model to obtain a characteristic fitting data group. And when the sensor detects the parameter to be detected, calculating the obtained fitting data based on the conversion model. And searching any two feature fitting data adjacent to the fitting data numerical value based on the feature fitting data group. And calculating to obtain a compensation error based on the characteristic error data respectively corresponding to the any two characteristic fitting data, and calculating to obtain calibration data of the fitting data based on the compensation error and the fitting data. The calibration data is used as the output data of the sensor, thereby realizing the further calibration of the fitting data of the sensor, greatly reducing the fitting error of the fitting data and improving the accuracy of the sensor
The technical solution of the present invention will be described in detail below with reference to the accompanying drawings.
Fig. 1 is a flow chart of an embodiment of a data processing method applied to a sensor, according to an embodiment of the present invention, where the method may include:
101: and determining a conversion model obtained by fitting based on the true value data of the parameter to be measured and the raw output data of the sensor.
The parameter to be measured is determined based on the sensor function. For example, if the sensor is a temperature-sensitive sensor, the corresponding parameter to be measured is temperature; if the pressure sensor is used, the corresponding parameter to be measured is pressure; the parameter to be measured corresponding to the acoustic sensor is an acoustic signal. In the present invention, the specific parameter to be measured is not limited, and may be any parameter to be measured.
102: and obtaining fitting data of the original output data of the sensor and an error model of the true value data of the parameter to be measured based on the conversion model.
The conversion model represents the corresponding relation between the true value data of the parameter to be measured and the fitting data of the original output data of the sensor, namely the corresponding relation between the input data and the output data of the sensor. When the sensor is produced, in order to determine a conversion model of the sensor, the true value data and the corresponding original output data of a plurality of parameters to be measured in the range of the sensor are obtained in advance through testing. Because the truth value data obtained by the test and the original output data of the sensor are discrete values, in order to obtain the original output data corresponding to all the truth value data in the range of the sensor, the curve fitting needs to be performed on the knitting data of the parameters to be tested obtained by the test and the corresponding original output data through a segmented interpolation method or a minimum binary method to obtain a conversion model.
Meanwhile, the truth value data of the parameters to be measured can be fitted to obtain a corresponding truth value model. And obtaining fitting data of the original output data corresponding to the parameter to be measured and an error model of the true value data based on a conversion model and the true value model. Alternatively, the error model may be obtained by subtracting the output value of the conversion model and the output value of the true value model.
103: and determining a plurality of characteristic error data representing the data change trend according to the data change trend of the error model.
Alternatively, the error model may be a curve function, and a plurality of characteristic error data that may indicate a variation trend of the error data in the error model are determined according to the variation trend.
104: and taking fitting data corresponding to the plurality of characteristic error data as characteristic fitting data to obtain a characteristic fitting data group.
The conversion model is used for calculating fitting data of the to-be-detected parameters obtained by sensor detection; the feature fitting data set is used for determining any two feature fitting data which are numerically adjacent to the fitting data; calculating to obtain a compensation error based on the feature error data respectively corresponding to the any two feature fitting data; and calculating calibration data for obtaining the fitting data based on the compensation error and the fitting data.
Optionally, as another embodiment, the determining, according to a data change trend of the error model, a plurality of feature error data indicating the data change trend, and fitting data corresponding to the plurality of feature error data respectively as feature fitting data may include:
and determining error peak/valley values according to the data change trend of the error model, and taking the fitting data corresponding to each error peak/valley value as feature fitting data.
Alternatively, after obtaining the error model, by calculating the extreme points of the error model, the characteristic error data that may represent the variation trend of the error model data may be determined, and the characteristic error data may be error peaks/valleys, where the extreme points of the error model obtained by calculation may be multiple, each extreme point corresponds to an error peak/valley and fitting data, and fitting data corresponding to the determined error peak/valley is taken as the characteristic fitting data.
Optionally, as another embodiment, the determining, according to a data change trend of the error model, a plurality of feature error data indicating the data change trend, and fitting data corresponding to each of the plurality of feature error data as feature fitting data includes:
and determining error peak/valley values and at least one characteristic error data between any two adjacent error peak values and error valley values according to the data change trend of the error model, and respectively corresponding fitting data of each error peak/valley value and at least one characteristic error data between any two adjacent error peak values and error valley values as characteristic fitting data.
In order to further improve the calculation accuracy, in addition to determining the error peak/valley value by calculating the extreme point of the error model, at least one characteristic error data may be determined between any two adjacent error peak values and error valley values, for example, an intermediate value between any two adjacent error peak values and error valley values may be determined to indicate the data variation trend. And using each determined error peak/bottom value and at least one error data between any two adjacent error peak values and error bottom values as the characteristic error data.
Optionally, the determined feature error data and the corresponding feature fitting data may be pre-stored in a register of the sensor as a feature fitting data set, so that the feature fitting data and the corresponding feature error data in the feature fitting data set can be read at any time.
In this embodiment, fitting data of the parameter to be measured and an error model of the parameter to be measured are obtained based on a conversion model. And determining a plurality of characteristic error data representing the variation trend of the error model data, and determining fitting data corresponding to the characteristic error data as characteristic fitting data based on the error model. The obtained feature fitting data set including the feature error data and the corresponding feature fitting data thereof is stored in the sensor in advance so as to realize further calibration of the fitting data.
FIG. 2 is a flow chart of one embodiment of a method for calibrating sensor data, as applied to a sensor, that may include:
201: and acquiring fitting data obtained based on a conversion model when the sensor detects the parameter to be detected.
202: and searching any two characteristic fitting data which are adjacent to the fitting data numerical value.
The characteristic fitting data correspond to characteristic error data representing data change trend in the error model, and the error model is obtained by calculation based on the fitting data of the original output data of the sensor and the truth value data of the parameter to be measured; fitting data of the raw output data of the sensor is obtained based on the conversion model calculation.
203: and calculating to obtain a compensation error based on the feature error data respectively corresponding to the any two feature fitting data.
Optionally, any two feature fitting data adjacent to the fitting data and the feature error data corresponding to the any two adjacent feature fitting data may be obtained by searching the feature fitting data stored in the sensor register and comparing each feature fitting data in the feature fitting data group with the fitting data. And calculating to obtain a compensation error based on the feature error data respectively corresponding to the two arbitrary feature fitting data.
204: and calculating calibration data for obtaining the fitting data based on the compensation error and the fitting data.
Optionally, in some embodiments, the calculating the compensation error based on the feature error data corresponding to any two feature fitting data respectively may include:
calculating to obtain the compensation error according to a compensation error calculation formula based on the feature error data respectively corresponding to the any two feature fitting data;
the compensation error calculation formula may be:
D=(D2-D1)(P-P2)/(P2-P1)+D2
wherein P represents the fitting data, D represents the compensation error, P1、P2Representing any two feature fit data numerically adjacent to said fit data, D1Representing said feature fitting data P1Corresponding characteristic error data, D2Representing said feature fitting data P2Corresponding characteristic error data.
Optionally, in some embodiments, the calculating calibration data for obtaining the fitting data based on the compensation error and the fitting data includes:
and superposing the compensation error to the fitting data, and calculating to obtain calibration data of the parameter to be measured of the fitting data.
Calculating to obtain a compensation error D based on a compensation error calculation formula, wherein the calibration data for obtaining the parameters to be measured of the fitting data is as follows: p + D.
In this embodiment, after obtaining fitting data through conversion model calculation, based on the feature fitting data and the corresponding feature error data pre-stored in the embodiment of fig. 1, any two feature fitting data adjacent to the fitting data and feature error data respectively corresponding to the any two feature fitting data are searched. And calculating by a compensation error calculation formula to obtain a compensation error corresponding to the fitting data, and superposing the compensation error on the fitting data to further calibrate the fitting data to obtain calibration data. Compared with the fitting data, the calibration data can reduce the error between the calibration data and the measured data in a multiplied way, thereby greatly reducing the measurement error of the sensor and improving the accuracy of the sensor.
Alternatively, in a practical application, the curve shown in fig. 3 is the original output of the pressure parameter obtained in advance based on the conversion model of the pressure sensorAnd (4) an error model of fitting data of the data and true value data of the pressure parameter is obtained. D1、D2、D3Three characteristic error data representing the data variation trend are determined according to the data variation trend of the error model, wherein D1、D2Error peaks and valleys corresponding to the error model, D3The intermediate value between the two error peak values and the error valley value; p1、P2、P3Respectively corresponding to the three characteristic error data, and determining P1、P2、P3I.e. feature fitting data. Three characteristic error data D which are obtained by calculation and represent the variation trend of the error model data1、D2、D3And its corresponding feature fitting data P1、P2、P3Is stored in advance in a register of the pressure sensor.
While monitoring the pressure applied to the detected object using the pressure sensing, the fitting data is calibrated based on the determined conversion model to obtain fitting data P.
Finding two feature fitting data P adjacent to the fitting data P from the register1、P2And determining P1、P2Corresponding characteristic error data D1、D2Calculating fitting data P based on a compensation error calculation formula, wherein the corresponding compensation error D is (D)2-D1)(P-P2)/(P2-P1)+D2. And then, the compensation error D is superposed on the fitting data P to obtain calibration data P + D of the fitting data. Therefore, the error between the calibration data and the measured data is greatly reduced, and the precision of the pressure sensor is improved.
Fig. 4 is a schematic structural diagram of an embodiment of a data processing apparatus according to an embodiment of the present invention, the apparatus being applied to a sensor, and the apparatus may include:
the first determining module 401 is configured to determine a conversion model obtained by fitting based on the true value data of the parameter to be measured and the raw output data of the sensor.
The parameter to be measured is determined based on the sensor function. For example, if the sensor is a temperature-sensitive sensor, the corresponding parameter to be measured is temperature; if the pressure sensor is used, the corresponding parameter to be measured is pressure; the parameter to be measured corresponding to the acoustic sensor is an acoustic signal. In the present invention, the specific parameter to be measured is not limited, and may be any parameter to be measured.
An error model obtaining module 402, configured to obtain, based on the conversion model, an error model of fitting data of the raw output data of the sensor and true value data of the parameter to be measured.
The conversion model represents the corresponding relation between the true value data of the parameter to be measured and the fitting data of the original output data of the sensor, namely the corresponding relation between the input data and the output data of the sensor. When the sensor is produced, in order to determine a conversion model of the sensor, the true value data and the corresponding original output data of a plurality of parameters to be measured in the range of the sensor are obtained in advance through testing. Because the truth value data obtained by the test and the original output data of the sensor are discrete values, in order to obtain the original output data corresponding to all the truth value data in the range of the sensor, the curve fitting needs to be performed on the knitting data of the parameters to be tested obtained by the test and the corresponding original output data through a segmented interpolation method or a minimum binary method to obtain a conversion model.
Meanwhile, the truth value data of the parameters to be measured can be fitted to obtain a corresponding truth value model. And obtaining fitting data of the original output data corresponding to the parameter to be measured and an error model of the true value data based on a conversion model and the true value model. Alternatively, the error model may be obtained by subtracting the output value of the conversion model and the output value of the true value model.
A second determining module 403, configured to determine, according to the data variation trend of the error model, a plurality of feature error data representing the data variation trend.
Alternatively, the error model may be a curve function, and a plurality of characteristic error data that may indicate a variation trend of the error data with the data size of the fitting data in the error model are determined.
A feature fitting data obtaining module 404, configured to use fitting data corresponding to the plurality of feature error data as feature fitting data to obtain a feature fitting data set.
The conversion model is used for calculating fitting data of original output data obtained by detecting parameters to be detected by the sensor; the feature fitting data set is used for determining any two feature fitting data which are numerically adjacent to the fitting data; calculating to obtain a compensation error based on the feature error data respectively corresponding to the any two feature fitting data; and calculating calibration data for obtaining the fitting data based on the compensation error and the fitting data.
Optionally, as another embodiment, the second determining module 403 is specifically configured to:
determining an error peak/valley value according to the data change trend of the error model;
the feature fitting data obtaining module 404 may be specifically configured to: and taking the fitting data corresponding to each error peak/valley value as characteristic fitting data.
Alternatively, after obtaining the error model, by calculating the extreme points of the error model, the characteristic error data that may represent the variation trend of the error model data may be determined, and the characteristic error data may be error peaks/valleys, where the extreme points of the error model obtained by calculation may be multiple, each extreme point corresponds to an error peak/valley and fitting data, and fitting data corresponding to the determined error peak/valley is taken as the characteristic fitting data.
Optionally, as another embodiment, the second determining module 403 is specifically configured to:
determining error peak/valley values and at least one characteristic error data between any two adjacent error peak values and error valley values according to the data change trend of the error model;
the feature fitting data obtaining module 404 may be specifically configured to: and fitting data corresponding to each error peak/valley value and at least one characteristic error data between any two adjacent error peak values and error valley values are used as characteristic fitting data.
In order to further improve the calculation accuracy, in addition to determining the error peak/valley value by calculating the extreme point of the error model, at least one characteristic error data may be determined between any two adjacent error peak values and error valley values, for example, an intermediate value between any two adjacent error peak values and error valley values may be determined to indicate the data variation trend. And using each determined error peak/bottom value and at least one error data between any two adjacent error peak values and error bottom values as the characteristic error data.
Optionally, the determined feature error data and the corresponding feature fitting data may be pre-stored in a register of the sensor as a feature fitting data set, so that the feature fitting data and the corresponding feature error data in the feature fitting data set can be read at any time.
In this embodiment, fitting data of the parameter to be measured and an error model of the parameter to be measured are obtained based on a conversion model. And determining a plurality of characteristic error data representing the variation trend of the error model data, and determining fitting data corresponding to the characteristic error data as characteristic fitting data based on the error model. The obtained feature fitting data set including the feature error data and the corresponding feature fitting data thereof is stored in the sensor in advance so as to realize further calibration of the fitting data.
Fig. 5 is a schematic structural diagram of an embodiment of a sensor data calibration apparatus according to an embodiment of the present invention, which is applied to a sensor, and the apparatus may include:
the first obtaining module 501 is configured to obtain fitting data obtained based on a conversion model when the sensor detects a parameter to be detected.
A searching module 502, configured to search any two feature fitting data that are adjacent to the fitting data value.
The characteristic fitting data correspond to characteristic error data representing data change trend in the error model, and the error model is obtained by calculation based on the fitting data of the original output data of the sensor and the truth value data of the parameter to be measured; fitting data of the raw output data of the sensor is obtained based on the conversion model calculation.
A first calculating module 503, configured to calculate and obtain a compensation error based on feature error data corresponding to the any two feature fitting data, respectively.
Optionally, any two feature fitting data adjacent to the fitting data and error data corresponding to any two adjacent feature fitting data may be obtained by searching for feature fitting data stored in the sensor register and comparing each feature fitting data with the fitting data. And calculating to obtain a compensation error based on the error data respectively corresponding to any two characteristic fitting data.
A second calculating module 504, configured to calculate calibration data of the parameter to be measured based on the compensation error and the fitting data.
Optionally, in some embodiments, the first calculating module 503 may be specifically configured to:
calculating to obtain the compensation error according to a compensation error calculation formula based on the feature error data respectively corresponding to the any two feature fitting data;
the compensation error calculation formula may be:
D=(D2-D1)(P-P2)/(P2-P1)+D2
wherein P represents the fitting data, D represents the compensation error, P1、P2Representing any two feature fit data numerically adjacent to said fit data, D1Representing said feature fitting data P1Corresponding characteristic error data, D2Representing said characteristic error data P2Corresponding characteristic error data.
Optionally, in some embodiments, the second calculating module 504 may be specifically configured to:
and superposing the compensation error to the fitting data, and calculating to obtain calibration data of the fitting data.
And calculating to obtain a compensation error D based on a compensation error calculation formula, wherein the calibration data for obtaining fitting data is as follows: p + D.
In this embodiment, after obtaining fitting data through conversion model calculation, based on the feature fitting data and the corresponding feature error data pre-stored in the embodiment of fig. 1, any two feature fitting data adjacent to the fitting data and feature error data respectively corresponding to the any two feature fitting data are searched. And calculating by a compensation error calculation formula to obtain a compensation error corresponding to the fitting data, and superposing the compensation error on the fitting data to further calibrate the fitting data to obtain calibration data. Compared with the fitting data, the calibration data can reduce the error between the calibration data and the measured data in a multiplied way, thereby greatly reducing the measurement error of the sensor and improving the accuracy of the sensor.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
As used in the specification and in the claims, certain terms are used to refer to particular components. As one skilled in the art will appreciate, manufacturers may refer to a component by different names. This specification and claims do not intend to distinguish between components that differ in name but not function. In the following description and in the claims, the terms "include" and "comprise" are used in an open-ended fashion, and thus should be interpreted to mean "include, but not limited to. "substantially" means within an acceptable error range, and a person skilled in the art can solve the technical problem within a certain error range to substantially achieve the technical effect. Furthermore, the term "coupled" is intended to encompass any direct or indirect electrical coupling. Thus, if a first device couples to a second device, that connection may be through a direct electrical coupling or through an indirect electrical coupling via other devices and couplings. The following description is of the preferred embodiment for carrying out the invention, and is made for the purpose of illustrating the general principles of the invention and not for the purpose of limiting the scope of the invention. The scope of the present invention is defined by the appended claims.
It is also noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a good or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such good or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a commodity or system that includes the element
The foregoing description shows and describes several preferred embodiments of the invention, but as aforementioned, it is to be understood that the invention is not limited to the forms disclosed herein, but is not to be construed as excluding other embodiments and is capable of use in various other combinations, modifications, and environments and is capable of changes within the scope of the inventive concept as expressed herein, commensurate with the above teachings, or the skill or knowledge of the relevant art. And that modifications and variations may be effected by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (12)

1. A data processing method, comprising:
determining a conversion model obtained by fitting based on truth value data of the parameters to be measured and the original output data of the sensor;
based on the conversion model, obtaining fitting data of the original output data of the sensor and an error model of the true value data of the parameter to be measured;
determining a plurality of characteristic error data representing the data change trend according to the data change trend of the error model, and taking fitting data corresponding to the plurality of characteristic error data as characteristic fitting data to obtain a characteristic fitting data group;
the conversion model is used for calculating fitting data corresponding to original output data obtained by detecting parameters to be detected by the sensor; the feature fitting data set is used for determining any two feature fitting data which are numerically adjacent to the fitting data; calculating to obtain a compensation error based on the feature error data respectively corresponding to the any two feature fitting data; and calculating calibration data for obtaining the fitting data based on the compensation error and the fitting data.
2. The method according to claim 1, wherein the determining a plurality of feature error data indicating the data change trend according to the data change trend of the error model, and the fitting data corresponding to each of the plurality of feature error data as the feature fitting data includes:
and determining error peak/valley values according to the data change trend of the error model, and taking fitting data corresponding to each error peak/valley value as feature fitting data.
3. The method according to claim 1, wherein the determining a plurality of feature error data indicating the data change trend according to the data change trend of the error model, and the fitting data corresponding to each of the plurality of feature error data as the feature fitting data includes:
and determining error peak/valley values and at least one characteristic error data between any two adjacent error peak values and error valley values according to the data change trend of the error model, and respectively corresponding fitting data of each error peak/valley value and at least one characteristic error data between any two adjacent error peak values and error valley values as characteristic fitting data.
4. A method of calibrating data for a sensor, comprising:
acquiring fitting data obtained based on a conversion model when the sensor detects the parameter to be detected;
searching any two feature fitting data adjacent to the fitting data numerical value; the characteristic fitting data correspond to characteristic error data representing data change trend in an error model, and the error model is obtained by calculation based on fitting data of the original output data of the sensor and truth value data of the parameter to be measured; fitting data of the raw output data of the sensor is obtained through calculation based on the conversion model;
calculating to obtain a compensation error based on the feature error data respectively corresponding to the any two feature fitting data;
and calculating calibration data for obtaining the fitting data based on the compensation error and the fitting data.
5. The method according to claim 4, wherein the calculating the compensation error based on the feature error data corresponding to each of the two feature fitting data comprises:
calculating to obtain the compensation error according to a compensation error calculation formula based on the feature error data respectively corresponding to the any two feature fitting data;
the compensation error calculation formula is as follows:
D=(D2-D1)(P-P2)/(P2-P1)+D2
wherein P represents the fitting data, D represents the compensation error, P1、P2Representing any two feature fit data numerically adjacent to said fit data, D1Representing said feature fitting data P1Corresponding characteristic error data, D2Representing said feature fitting data P2Corresponding characteristic error data.
6. The method of claim 5, wherein calculating calibration data to obtain the fitting data based on the compensation error and the fitting data comprises:
and superposing the compensation error to the fitting data, and calculating to obtain calibration data of the fitting data.
7. A data processing apparatus, comprising:
the first determination module is used for determining a conversion model obtained by fitting based on the true value data of the parameter to be measured and the original output data of the sensor;
an error model obtaining module, configured to obtain, based on the conversion model, an error model of fitting data of the sensor raw output data and true value data of the parameter to be measured;
the second determination module is used for determining a plurality of characteristic error data representing the data change trend according to the data change trend of the error model;
a feature fitting data acquisition module, configured to use fitting data corresponding to the plurality of feature error data as feature fitting data to obtain a feature fitting data set;
the conversion model is used for calculating fitting data of original output data obtained by detecting parameters to be detected by the sensor; the feature fitting data set is used for determining any two feature fitting data which are numerically adjacent to the fitting data; calculating to obtain a compensation error based on the feature error data respectively corresponding to the any two feature fitting data; and calculating calibration data for obtaining the fitting data based on the compensation error and the fitting data.
8. The apparatus of claim 7, wherein the second determining module is specifically configured to:
determining an error peak/valley value according to the data change trend of the error model;
the feature fitting data acquisition module is specifically configured to:
and taking the fitting data corresponding to each error peak/valley value as characteristic fitting data.
9. The apparatus of claim 7, wherein the second determining module is specifically configured to:
determining error peak/valley values and at least one characteristic error data between any two adjacent error peak values and error valley values according to the data change trend of the error model;
the feature fitting data acquisition module is specifically configured to:
and respectively corresponding fitting data of each error peak/valley value and at least one characteristic error data between any two adjacent error peak values and error valley values to serve as characteristic fitting data.
10. A data calibration device for a sensor, comprising:
the first acquisition module is used for acquiring fitting data obtained based on a conversion model when the sensor detects a parameter to be detected;
the searching module is used for searching any two characteristic fitting data adjacent to the fitting data numerical value; the characteristic fitting data correspond to characteristic error data representing data change trend in an error model, and the error model is obtained by calculation based on fitting data of the original output data of the sensor and the truth value data of the parameters to be measured; fitting data of the raw output data of the sensor is obtained through calculation based on the conversion model;
the first calculation module is used for calculating to obtain a compensation error based on the feature error data respectively corresponding to the any two feature fitting data;
and the second calculation module is used for calculating and obtaining calibration data of the fitting data based on the compensation error and the fitting data.
11. The apparatus of claim 10, wherein the first computing module is specifically configured to:
calculating to obtain the compensation error according to a compensation error calculation formula based on the feature error data respectively corresponding to the any two feature fitting data;
the compensation error calculation formula is as follows:
D=(D2-D1)(P-P2)/(P2-P1)+D2
wherein P represents the fitting data, D represents the compensation error, P1、P2Representing any two feature fit data numerically adjacent to said fit data, D1Representing said feature fitting data P1Corresponding characteristic error data, D2Representing said feature fitting data P2Corresponding characteristic error data.
12. The apparatus of claim 10, wherein the second computing module is specifically configured to:
and superposing the compensation error to the fitting data, and calculating to obtain calibration data of the fitting data.
CN201710816751.4A 2017-09-12 2017-09-12 Data processing method, sensor data calibration method and device Active CN107621279B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710816751.4A CN107621279B (en) 2017-09-12 2017-09-12 Data processing method, sensor data calibration method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710816751.4A CN107621279B (en) 2017-09-12 2017-09-12 Data processing method, sensor data calibration method and device

Publications (2)

Publication Number Publication Date
CN107621279A CN107621279A (en) 2018-01-23
CN107621279B true CN107621279B (en) 2020-01-10

Family

ID=61089390

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710816751.4A Active CN107621279B (en) 2017-09-12 2017-09-12 Data processing method, sensor data calibration method and device

Country Status (1)

Country Link
CN (1) CN107621279B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109631973B (en) * 2018-11-30 2021-04-16 苏州数言信息技术有限公司 Automatic calibration method and system for sensor
CN110312225B (en) * 2019-07-30 2022-06-03 平顶山学院 Wireless sensor hardware device
CN112557996B (en) * 2019-09-26 2023-11-03 深圳电蚂蚁数据技术有限公司 Electric energy measurement system convenient for error verification and error verification method
CN110657833B (en) * 2019-10-12 2023-02-10 湖南银河电气有限公司 Novel calibration method for high-precision source meter integrated measuring equipment
CN114152811B (en) * 2020-09-08 2024-03-15 武汉国测数据技术有限公司 Electric energy meter with three-way array structure and measuring system and measuring method formed by electric energy meter
CN114152791B (en) * 2020-09-08 2024-03-15 武汉国测数据技术有限公司 Three-meter-method three-phase electric energy meter structure with user self-checking error and checking method
CN114152806B (en) * 2020-09-08 2024-03-15 武汉国测数据技术有限公司 Electric energy sensor with three-way array structure and measurement system and method formed by same
CN114152810B (en) * 2020-09-08 2024-03-15 武汉国测数据技术有限公司 Three-phase electric energy sensor with three-way array structure and measuring system and method thereof
CN114152809B (en) * 2020-09-08 2024-03-15 武汉国测数据技术有限公司 Smart electric meter with error self-checking function and checking method thereof

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101968496A (en) * 2010-06-30 2011-02-09 中山市嘉科电子有限公司 Automatic Calibration System of Acceleration Sensor
CN103499337A (en) * 2013-09-26 2014-01-08 北京航空航天大学 Vehicle-mounted monocular camera distance and height measuring device based on vertical target
CN103884284A (en) * 2012-12-20 2014-06-25 上海砺晟光电技术有限公司 Embedded laser displacement sensor and normalization processing method thereof
CN103983997A (en) * 2014-05-09 2014-08-13 北京航空航天大学 Vehicle-mounted integrated navigation method of resisting to failure of global positioning system
CN105528000A (en) * 2016-01-07 2016-04-27 北京航天发射技术研究所 Intelligent temperature control meter for aircraft

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6651020B2 (en) * 1997-12-24 2003-11-18 Edward S. More Method and apparatus for economical drift compensation in high resolution measurements
KR101682407B1 (en) * 2015-03-10 2016-12-05 한국과학기술연구원 Method for determining optimum reference count number for smoothing measured data and method for correcting measured data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101968496A (en) * 2010-06-30 2011-02-09 中山市嘉科电子有限公司 Automatic Calibration System of Acceleration Sensor
CN103884284A (en) * 2012-12-20 2014-06-25 上海砺晟光电技术有限公司 Embedded laser displacement sensor and normalization processing method thereof
CN103499337A (en) * 2013-09-26 2014-01-08 北京航空航天大学 Vehicle-mounted monocular camera distance and height measuring device based on vertical target
CN103983997A (en) * 2014-05-09 2014-08-13 北京航空航天大学 Vehicle-mounted integrated navigation method of resisting to failure of global positioning system
CN105528000A (en) * 2016-01-07 2016-04-27 北京航天发射技术研究所 Intelligent temperature control meter for aircraft

Also Published As

Publication number Publication date
CN107621279A (en) 2018-01-23

Similar Documents

Publication Publication Date Title
CN107621279B (en) Data processing method, sensor data calibration method and device
US8476910B2 (en) Capacitive sensor having calibration mechanism and capacitive sensing method
US10359308B2 (en) Flow meter and a method of calibration
CN113607248B (en) Hydraulic weighing method and hydraulic weighing device
CN114199451A (en) Pressure detection method and system based on temperature compensation and storage medium
CN112556927B (en) Pressure sensor self-correcting method, equipment, storage medium and device
CN102096057A (en) Calibration method and device of capacitance measurement circuit
CN109211268A (en) A kind of gauge pointer calibration method, device and computer readable storage medium
CN113670478A (en) Temperature data correction method, system, device and medium based on thermodetector
CN116593060A (en) Temperature compensation method, circuit and device for pressure sensor
CN113218527A (en) Thermistor-based temperature detection method, device, equipment, medium and system
CN113804232A (en) Sensor calibration method and device and terminal equipment
CN110220945B (en) Full-range temperature compensation method of semiconductor gas sensor
CN115326276A (en) Temperature compensation of Pirani vacuum gauge, calculation method and equipment of ambient vacuum degree
CN107607144B (en) Sensor baseline drift correction method and detection equipment
CN117491848B (en) Device, method, equipment and system for determining circuit attribute
CN112731815A (en) Method for improving analog quantity acquisition precision
CN117131469B (en) Error checking method of intelligent differential pressure transmitter
CN117761124A (en) Pressure product correction method and device with temperature compensation
CN113625368B (en) A fixed-frequency humidity measurement system and method and a readable storage medium
CN113655093B (en) Gas concentration detection method, device, equipment and medium
CN118230003B (en) Temperature and humidity determining method and device, electronic equipment and storage medium
CN112816752A (en) Temperature compensation method and equipment for capacitor transformer
KR102363172B1 (en) Measurement variable sensor having internal data memory
CN117630515B (en) Noise level detection method and device of temperature measurement system

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
TR01 Transfer of patent right

Effective date of registration: 20200608

Address after: 261031 building 10, Geer phase II Industrial Park, No. 102, Ronghua Road, Ronghua community, Xincheng street, high tech Zone, Weifang City, Shandong Province

Patentee after: Weifang goer Microelectronics Co.,Ltd.

Address before: 261031 No. 268 Dongfang Road, Weifang hi tech Industrial Development Zone, Shandong, Weifang

Patentee before: GOERTEK Inc.

TR01 Transfer of patent right