The present invention relates to a computer-implemented method for compensating a sensor, especially a pressure sensor, through machine learning during the manufacturing of the sensor, a data processing system comprising means for carrying out the method, a computer program, a computer-readable medium as well as a sensor, especially a pressure sensor for use in process and/or automation technology.
Sensors, as for example pressure sensors or also called pressure transducers, are very sensitive to cross influences, as for example temperature. Therefore, these sensors undergo an elaborate compensation process during their manufacturing. Compensation is used to increase and/or to ensure the sensor's accuracy in a given measurement range under given cross influences.
The compensation process is a costly part of the whole manufacturing process. This is because a high number of setpoints are necessary, which are taking the cross influence as well as the measured value of the sensor into account. As for example in case of a pressure transducer and the temperature as cross influence, a high number of temperature and pressure setpoints are needed to approximate the analytical relation between the sensor output and the actual pressure value. As one can imagen, to set/generate this setpoints a lot of time is needed. In case of the before given example a temperature chamber is typically used to set the various temperature points, so that a corresponding pressure value can be measured with the sensor. Ordinarily, at least two temperature cycles, i.e. at 80° C. and −20° C. are set with the temperature chamber. Minimizing the time needed for this process ensures lower manufacturing costs as well as less energy consumption, since heating and cooling is not only time-consuming but also creates a large CO2 footprint.
Therefore, the objective technical problem underlaying the present invention is to reduce the time which is needed to compensate a sensor during its manufacturing.
The object is achieved by the computer-implemented method according to claim 1, the data processing system according to claim 10, the computer program according to claim 11, as the computer-readable medium according to claim 12 as well as a sensor for use in process and/or automation technology.
With respect to the method, the objective technical problem is solved by a computer-implemented method for compensating a sensor, especially a pressure sensor, through machine learning during the manufacturing of the sensor, the method comprising at least the steps of:
Neural networks (NN), belonging to the field of machine learning, are based on a plurality of interconnected units called artificial neurons which are typically organized in various layers and are able to detect complex and nonlinear relationships. With respect to the present invention, the use of a neural network for determining compensation coefficients for a sensor, especially for a pressure transducer results in a less time-consuming compensation process. For the purpose of this application, compensation coefficients are understood to mean coefficients of a compensation equation that is used for calculating the compensated sensor output (via the sensor).
A preferred embodiment of the method according to the present invention provides that the compensation coefficients are determined for a given first function via the neuronal network. Especially the given first function is a polynomial function. A high-order polynomial/polynomial function is a good choice for their low memory footprint on the memory/ASIC of the sensor. As for example a polynomial function in the form of s=c0·p(T)+c1·p(T)·T+c2 can be used, wherein c0, c1, c2 are the coefficient to be determined, T is a specific temperature and p(T) is the sensor value read out by the sensor at the specific temperature.
A further preferred embodiment of the method according to the present invention provides that at least a further function, preferably a linear or polynomial function, is given, which normalizes/scales a measuring raw value of the sensor, especially a pressure or temperature raw value of the pressure sensor, to a normalized/scaled measuring value, preferably a normalized/scaled pressure or temperature value.
A further preferred embodiment of the method according to the present invention provides that further coefficients for the at least further function are determined using a further neural network, especially a hypernetwork NNT.
A further preferred embodiment of the method according to the present invention provides that normalized/scaled measuring values of the sensor, especially normalized/scaled pressure or temperature values of the pressure sensor, are calculated with the help of the further given function and/or the further coefficients and wherein the calculated normalized/scaled measuring values, especially the normalized/scaled pressure or temperature values are used as data provided to the neuronal network for determining the compensation coefficients.
A further preferred embodiment of the method according to the present invention provides that as data data is used that was determined during previous manufacturing steps of the sensor, especially the pressure sensor, as for example physical parameters of a measuring element, a resistance value, and/or a capacity value of the sensor.
A further preferred embodiment of the method according to the present invention provides that the neuronal network is trained before the compensation coefficients are determined.
A further preferred embodiment of the method according to the present invention provides that for training the neuronal network historical data from the entire production line and/or data from subsequent manufacturing steps after the compensation of the plurality of pressure sensors that have already been manufactured and/or compensated are used.
The objective technical problem is also achieved by means of a data processing system comprising means for carrying out the method according to the present invention.
The objective technical problem is also achieved by a computer program comprising instructions which, when the program is executed by a computer, cause the computer to carry out the steps of the method according to the present invention, by a computer-readable medium comprising instructions which, when executed by a computer, cause the computer to carry out the method according to the present invention and finally, by a sensor, especially a pressure sensor for use in process and/or automation technology comprising a memory having saved the determined coefficients according to the method and wherein the sensor, especially the pressure sensor is adapted to output a compensated sensor value, especially a compensated pressure value using the determined coefficients.
It shall be noted that the embodiments described in connection with the method are mutatis mutandis applicable to the data processing system, the computer program, the computer-readable medium as well as the sensor, especially the pressure sensor.
The invention will be explained in more detail with reference to the following figures.
The further description of the invention is illustrated by means of a pressure sensor, since pressure sensors are the most prevalent sensor type in use. However, the invention is not limited to pressure sensor at all.
A sub-step toward the compensation step is the scaling or normalization step. For this optionally sub-step a mathematical function f0 is used to normalize or scale a measuring raw value, like praw and/or Traw, for the pressure sensor.
The mathematical function, which is used, depends on the kind of the pressure sensor (e.g. capacitive or resistive pressure sensor) and can be for example a linear or a polynomial function. For the further explanations a linear function is used for the pressure scaling and can be for example in the following form:
For determining the coefficients ap1 and ap2, a ground truth pressure per can be converted to obtain a scaled ground truth pressure psg in the same unit as raw pressure praw. Afterwards a least-squares-algorithm can be used to fit the raw pressure praw and the scaled ground truth pressure psg to determine the coefficients ap1 and ap2 of the pressure scaling equation 1 in a determined or overdetermined measurement set. This function can then be used to convert raw pressure values praw to scaled pressure values psg.
Additionally, or alternative a temperature scaling or normalization can be performed in the sup-step using e.g. the following equation:
For normalizing the raw temperature values Traw a local min-max normalization procedure to obtain normalized raw temperature TS can be used. This normalization scheme can use raw temperature points Traw from each sensor in the training dataset to calculate the minimum and maximum value of the respective quantity. These values can then be used to normalize Traw to obtain TS for each sensor. Only the M points of the not skipped temperature cycles from the raw temperature values Traw are processed in the forward pass of a scaling hypernetwork NNT to predict the scaling polynomial coefficients bT1 and bT2. The temperature scaling polynomial in equation 2 is provided with all N points of raw temperature values Traw to obtain scaled temperature values TS. The hypernetwork NNT can be a polynomial hypernetwork, which is preferably trained, as shown in
The determined pressure and temperature scaling coefficients are used for the corresponding scaling function for obtaining ps, Ts, which are stored in the pressure sensor at this manufacturing step 200. For sake of clarity in
After the sub step of scaling or normalization further steps (fn-1) can optionally be performed bevor according to the invention the coefficients c0-cn of a compensating function are being determined using a neuronal network or a compensation look-up table is provided by the neuronal network. These optional steps can be for example that the output values, which are calculated with the help of the scaling function(s), are passed through a global min-max norm and/or a Fourier mapping fn-1. In
After these steps according to the invention the determination of the coefficients c0-cn of a compensating function takes place. For this step a neuronal network, preferred a convolutional neuronal network, is used to predict the coefficients c0-cn for a given compensation function or a compensation look-up table. In a preferred embodiment the first half of the neuronal network architecture consists of 1D convolution layers “conv1D1” to “conv1D3” and in the second half maxpool layer (“maxpool”) and linear layers (“Linear1” to “Linear3”) are used. The dimensions of the input to “conv1D1” i.e. Mp can be 2 in case of two inputs like temperature and pressure as it is explained in the embodiment before. Alternative, Mp can also be higher than 2, e.g., in case of performing further steps (fn-1) as for example a Fourier mapping. The output of “Linear3” i.e. Cn represents the number of the coefficients necessary for a compensating or a scaling function (e.g. Cn=2 for the temperature scaling function or Cn=10 for the compensating function of this example). The filter of maxpool layer is adaptable to input size Is, whereas Input size Is is the number of measurement points that will be removed later. A preferred architecture of the neuronal network is summarized in the following table:
However, the invention is not limited to the specific dimensions for the in- or output, nor to this specific network layout.
The given function (compensation function) in this case preferably is a high-order polynomial/polynomial function with the compensation coefficients c0-cn. As for example the given function (compensation function) can be:
To predict the compensation coefficients c0-cn data is determined, which is feed to neuronal network. As can be seen in
In a preferred embodiment of the invention normalized/scaled pressure and/or temperature values ps, Ts of the pressure sensor that is being manufactured are also used as data to feed the neuronal network, as can be seen in
Optionally, for training historical data dhis from subsequent manufacturing steps after the compensation of the plurality of pressure sensors that have already been manufactured and/or compensated may be used, as can be seen in
In a last step according to the invention the determined compensation coefficients c0-cn are saved/stored in the pressure sensor that is being manufactured. The saving/storing can be for example occur in separate memory chip of the sensor or integrated in an ASIC or a microprocessor of the pressor sensor. The saving/storing is symbolized in
After the manufacturing (including the compensation step) has been finished for the current pressure sensor it can be used, e.g. in a process and/or automation plant, to output the compensated pressure values pc. For this purpose, the pressure sensor 10 is arranged to internally provide raw pressure and temperature praw, Traw values. These values are internally, e.g. with a microprocessor, scaled to form ps and Ts using the internally stored scaling polynomial function with the corresponding coefficients. The scaled values can internally be optionally normalized with the help of a further normalization function and passed to the stored compensation polynomial function with the corresponding coefficients to obtain the final compensated pressure pc, which are outputted by the pressor sensor.
Number | Date | Country | Kind |
---|---|---|---|
10 2021 130 043.6 | Nov 2021 | DE | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/EP2022/081085 | 11/8/2022 | WO |