Method and Device for Compensating for Sensor Drift
20230332926 · 2023-10-19
Inventors
- Sungil Kim (Ulsan, KR)
- Ju Hui Lee (Ulsan, KR)
- Chie Hyeon Lim (Ulsan, KR)
- Jung Hye Lee (Ulsan, KR)
- Ye Jin Kim (Ulsan, KR)
- Ye Ram Kim (Ulsan, KR)
- Nam U Kim (Ulsan, KR)
- Se Won Kim (Ulsan, KR)
- Yong Kyung Oh (Ulsan, KR)
Cpc classification
G01D3/02
PHYSICS
G01D3/028
PHYSICS
International classification
Abstract
A method and a device for compensating for sensor drift are disclosed. A method for compensating for sensor drift, according to one embodiment, comprises the steps of: confirming the suitability of sensor data; defining a transformation model for transforming the sensor data; setting a loss function on the basis of the transformation model; and optimizing the transformation model on the basis of the loss function.
Claims
1. A method of compensating for sensor drift, the method comprising the steps of: confirming the suitability of sensor data; defining a transformation model for transforming the sensor data; setting a loss function on the basis of the transformation model; and optimizing the transformation model on the basis of the loss function.
2. The method of claim 1, wherein the confirming of the suitability comprises analyzing a cause of a variation comprised in the sensor data.
3. The method of claim 1, wherein the confirming of the suitability comprises analyzing a correlation between the sensor data and an external environmental variable.
4. The method of claim 1, wherein the transformation model is a transformation model that transforms the sensor data, based on an external environmental variable and a model parameter.
5. The method of claim 1, wherein the loss function comprises at least one of a loss function set by reflecting prior knowledge of the sensor data and a loss function set by reflecting a difference between a plurality of measurement results.
6. The method of claim 1, wherein the optimizing of the transformation model comprises calculating a model parameter of the transformation model that maximizes or minimizes the loss function.
7. The method of claim 6, wherein the calculating of the model parameter comprises calculating the model parameter by using a genetic algorithm.
8. A non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to perform the method of any one of claims 1 through 7.
9. A device for compensating for sensor drift, the device comprising: a memory configured to comprise instructions; and a processor configured to execute the instructions, wherein, when the instructions are executed by the processor, the processor is configured to confirm the suitability of sensor data, define a transformation model for transforming the sensor data, set a loss function on the basis of the transformation model, and optimize the transformation model based on the loss function.
10. The device of claim 9, wherein the processor is configured to analyze a cause of a variation comprised in the sensor data.
11. The device of claim 9, wherein the processor is configured to analyze a correlation between the sensor data and an external environmental variable.
12. The device of claim 9, wherein the transformation model is a transformation model that transforms the sensor data, based on an external environmental variable and a model parameter.
13. The device of claim 9, wherein the loss function comprises at least one of a loss function set by reflecting prior knowledge of the sensor data and a loss function set by reflecting a difference between a plurality of measurement results.
14. The device of claim 9, wherein the processor is configured to calculate a model parameter of the transformation model that maximizes or minimizes the loss function.
15. The device of claim 14, wherein the processor is configured to calculate the model parameter by using a genetic algorithm.
Description
BRIEF DESCRIPTION OF DRAWINGS
[0023]
[0024]
[0025]
[0026]
[0027]
BEST MODE FOR CARRYING OUT THE INVENTION
[0028] Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. However, various alterations and modifications may be made to the embodiments. Here, the embodiments are not meant to be limited by the descriptions of the present disclosure. The embodiments should be understood to include all changes, equivalents, and replacements within the idea and the technical scope of the disclosure.
[0029] The terminology used herein is for the purpose of describing particular embodiments only and is not to be limiting of the embodiments. The singular forms “a”, “an”, and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises/comprising” and/or “includes/including” when used herein, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and/or groups thereof.
[0030] Unless otherwise defined, all terms including technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which examples belong. It will be further understood that terms, such as those defined in commonly-used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
[0031] When describing the examples with reference to the accompanying drawings, like reference numerals refer to like constituent elements and a repeated description related thereto will be omitted. In the description of the examples, a detailed description of well-known related structures or functions will be omitted when it is deemed that such description will cause ambiguous interpretation of the present disclosure.
[0032] Also, in the description of the components, terms such as first, second, A, B, (a), (b) or the like may be used herein when describing components of the present disclosure.
[0033] These terms are used only for the purpose of discriminating one constituent element from another constituent element, and the nature, the sequences, or the orders of the constituent elements are not limited by the terms. When one constituent element is described as being “connected”, “coupled”, or “attached” to another constituent element, it should be understood that one constituent element can be connected or attached directly to another constituent element, and an intervening constituent element can also be “connected”, “coupled”, or “attached” to the constituent elements.
[0034] The same name may be used to describe an element included in the examples described above and an element having a common function. Unless otherwise mentioned, the descriptions of the embodiments may be applicable to the following embodiments and thus, duplicated descriptions will be omitted for conciseness.
[0035]
[0036] A device 100 for compensating for sensor drift may compensate for sensor drift occurring in a sensor. For example, the device 100 for compensating for sensor drift may compensate for sensor drift in a sensor of an electronic nose system for classifying mixed gases.
[0037] The device 100 for compensating for sensor drift may include a memory 130 and a processor 150. The processor 150 may execute computer-readable code (for example, software) stored in the memory 130 and instructions triggered by the processor 150.
[0038] The processor 150 may be a hardware-implemented data processing device having a physically structured circuit for executing desired operations. For example, the desired operations may include code or instructions in a program.
[0039] For example, the hardware-implemented data processing device may include a microprocessor, a central processing unit (CPU), a processor core, a multi-core processor, a multiprocessor, an application-specific integrated circuit (ASIC), and a field-programmable gate array (FPGA).
[0040] The memory 130 may store instructions (or a program) executable by the processor. For example, the instructions may include instructions to perform an operation of the processor and/or an operation of each element of the processor.
[0041] The memory 130 may be implemented as a volatile or non-volatile memory device.
[0042] The volatile memory device may be implemented as dynamic random-access memory (DRAM), static random-access memory (SRAM), thyristor RAM (T-RAM), zero capacitor RAM (Z-RAM), or twin transistor RAM (TTRAM).
[0043] The non-volatile memory device may be implemented as electrically erasable programmable read-only memory (EEPROM), flash memory, magnetic RAM (MRAM), spin-transfer torque-MRAM (STT-MRAM), conductive bridging RAM (CBRAM), ferroelectric RAM (FeRAM), phase change RAM (PRAM), resistive RAM (RRAM), nanotube RRAM, polymer RAM (PoRAM), nano-floating gate memory (NFGM), holographic memory, a molecular electronic memory device, or insulator resistance change memory.
[0044]
[0045] An electronic nose may be a device used for detecting odors and/or smells by mimicking the human sense of smell. The electronic nose may be a system that analyzes a unique signal pattern of a specific odor, using a sensor array including different types of sensors, and may detect odors and/or smells by using an oxidation-reduction reaction of semiconductors.
[0046] Sensor drift may occur when the electronic nose measures a certain gas through a sensor. For example, there may be a variation between a value measured by the electronic nose and an ideal value to be actually measured. Such a variation may include a systematic variation caused by an abnormal cause and a variation, such as random noise, caused by an accidental cause. In general, it may be impossible or costly to reduce a variation caused by random noise, whereas a variation caused by an abnormal cause may be reduced by an engineering technique at a relatively low cost.
[0047] The sensor drift may refer to the inconsistency of a sensor caused by an abnormal cause of an external environmental factor. For example, the sensor drift may refer to a change in a sensor measurement value, which may be caused by factors, such as contamination, aging, temperature, humidity, and/or the like of a material sensed by a sensor.
[0048] When gases are classified based on sensor data of the gases measured by using an electronic nose, the sensor drift may change the sensor data, thus greatly degrading the accuracy of gas classification.
[0049] The sensor drift may need to be compensated for to ensure the stability and/or reliability of a sensor system and to obtain an analysis result of meaningful sensor data.
[0050] The device 100 for compensating for sensor drift may use external environment data to compensate for the sensor drift.
[0051] The device 100 for compensating for sensor drift may assume that an external environmental variable occupies a large proportion of abnormal causes triggering the sensor drift. That is, the device 100 for compensating for sensor drift may assume that other abnormal causes, such as contamination and/or aging of the sensor, are absent or negligible.
[0052] Actual data X may indicate ideal sensor data without variation with respect to a specific gas. Sensor data X′ may indicate sensor data with sensor drift generated by external environmental factors, such as temperature and/or humidity. That is, the sensor data X′ may be a data matrix including sensor data in which a plurality of sensors measure an object over time, and the actual data X may be a data matrix including ideal data that the sensor data X′ is supposed to have.
[0053] When a specific gas or a mixed gas is measured, the sensor may measure a change in a sensor value over time for a certain period and repeat the measurement. In this case, since the external environmental factors, such as temperature and/or humidity, may change with time, a measured value may be different every time the sensor measures the value.
[0054]
[0055] Although
[0056] Lines in each graph may represent results of five repeated experiments. Ideally, the five lines of each graph may need to be identical when all of external environments are the same.
[0057] A method of compensating for sensor drift in the related art may attempt to restore the actual data X from the sensor data X′, whereas the device 100 for compensating for sensor drift may use a method of transforming the sensor data X′ into transformation data X. For example, the device 100 for compensating for sensor drift may obtain the transformation data X″ that is not required to be similar to the actual data X and may obtain a desired result based on the sensor data X′.
[0058] The device 100 for compensating for sensor drift may obtain the transformation data X″ instead of attempting to restore the actual data X, based on the sensor data X′, thus achieving a desired purpose with a small number of pieces of data, and may improve a determination function based on the sensor data X′.
[0059]
[0060] The processor 150 may confirm the suitability of sensor data before compensating for sensor drift in operation 410. For example, the processor 150 may determine whether sensor data is suitable for compensating for sensor drift.
[0061] The processor 150 may determine, through analysis of variance (ANOVA), a proportion of systematic variations, which are triggered by an abnormal cause, among the total variations included in the sensor data. For example, the processor 150 may decompose an ANOVA variation to identify a statistically meaningful impact of the systematic variations on the total variations, through hypothesis testing.
[0062] The processor 150 may determine that it is not suitable to compensate for sensor drift, when most of the variations of the sensor data are analyzed as random noise generated by an accidental cause.
[0063] The processor 150 may also determine whether a significant correlation exists between the sensor data and an external environmental variable, such as temperature and/or humidity. For example, the processor 150 may assume a specific linear model and learn the model to estimate a parameter included in the model and may confirm whether the estimated parameter is positive or negative so as to determine whether the variable has a positive correlation, a negative correlation, or no relationship, with an independent variable. The processor 150 may determine whether the estimated parameter is meaningful through the hypothesis test.
[0064] The processor 150 may determine that it is not suitable to perform sensor drift compensation on the sensor data when there is no meaningful relationship between the external environment variable and the sensor data.
[0065] The processor 150 may compensate the sensor data, which is determined to be appropriate, for sensor drift.
[0066] The processor 150 may define a transformation model f.sub.a(X′, Z) for transforming the sensor data and a loss function according to a set purpose in operation 430.
[0067] The transformation model f.sub.a(X′, Z) may be a transformation model for transforming the sensor data X′ into the transformation data X″ as shown in Equation 1. The transformation model f.sub.a(X′, Z) may include all models, such as a linear transformation or a nonlinear transformation.
[0068] Input data of the transformation model f.sub.a(X′, Z) may be the sensor data X′ and an external environmental variable Z for temperature and/or humidity, and the like. The transformation model f.sub.a(X′, Z) may transform the sensor data X′ into the transformation data X″, based on a model parameter a, and output the transformation data X″. The sensor data X′ and the external environmental variable Z may be measured values, and the processor 150 may obtain the transformation data X″ desired, through a value of the appropriate parameter α.
[0069] In operation 450, the processor 150 may optimize the transformation model f.sub.a(X′, Z) based on a set purpose. For example, the processor 150 may define a loss function based on the set purpose and obtain the optimal parameter α based on the loss function.
[0070] The processor 150 may define the loss function by reflecting domain knowledge. In this case, the domain knowledge may mean prior knowledge of a sensor measurement value of a specific mixed gas. For example, the processor 150 may define the loss function based on the prior knowledge that a sensor measurement value of a high concentration gas should be greater than that of a medium concentration gas and a sensor measurement value of a medium concentration gas should be greater than that of a low concentration gas, with respect to the sensor measurement values according to the concentrations.
[0071] The processor 150 may define the loss function for greater data quality. For example, since sensor measurement values, which are repeatedly measured, ideally remain the same under the assumption that external environmental conditions are the same, the processor 150 may define the loss function, so that the repeatedly measured sensor data remains the same.
[0072] The processor 150 may define each loss function for each purpose but may define one loss function by combining a plurality of purposes.
[0073] The processor 150 may optimize the transformation model f.sub.a(X′, Z) based on the defined loss function. For example, the processor 150 may optimize the transformation model f.sub.a(X′, Z) by obtaining an optimization parameter α* that minimizes the loss function. The processor 150 may obtain the optimization parameter α* as shown in Equation 2.
[0074] The processor 150 may estimate the optimization parameter α*, using a genetic algorithm. The genetic algorithm may be a parallel and global search algorithm and an algorithm that expresses possible solutions to an issue to be solved in a data structure of a fixed form and then produces better solutions by gradually transforming the solutions.
[0075] The processor 150 may obtain the transformation model f.sub.a(X′, Z), which is optimized and transforms the sensor data X′ into the transformation data X″ capable of accurately classifying measurement objects. The processor 150 may also improve a classification accuracy for other measurement objects based on the transformation model f.sub.a(X′, Z).
[0076]
[0077] Hereinafter, an operation, in which a device 100 for compensating for sensor drift transforms sensor data shown in
[0078] A processor 150 may define a transformation model as in Equation 3 for sensor data obtained from one sensor and, based thereon, define a transformation model as in Equation 4 for sensor data obtained from a plurality of sensors.
z.sub.1=(α.sub.1T.sub.i+α.sub.2RH.sub.i+α.sub.3)y.sub.I+α.sub.4T.sub.i+α.sub.5RH.sub.i [Equation 3]
z.sub.ij=(α.sub.j1T.sub.ij+α.sub.j2RH.sub.ij+α.sub.j3)y.sub.ij+α.sub.j4T.sub.ij+α.sub.j5RH.sub.ij [Equation 4]
[0079] In Equation 3, y.sub.i, z.sub.iT.sub.i, and RH.sub.i may denote a measured value, a transformed value, a temperature, and a relative humidity in an i.sup.th measurement over time, respectively. α.sub.i, α.sub.2, α.sub.3, α.sub.4, and as may denote each element of a model parameter for a sensor. That is, the processor 150 may estimate each element α.sub.1, α.sub.2, α.sub.3, α.sub.4, and as of the model parameter for one sensor, based on a loss function.
[0080] Equation 4 may denote a transformation model for sensor data measured in the i.sup.th measurement through a j.sup.th sensor among the plurality of sensors. That is, in Equation 4 y.sub.ij, z.sub.ij, T.sub.ij, and RH.sub.ij may denote a measured value, a transformed value, a temperature, and a relative humidity at the i.sup.th measurement over time at the j.sup.th sensor, respectively. α.sub.j1, α.sub.j2, α.sub.j3, α.sub.j4, and α.sub.j5 may denote each element of the model parameter of the j.sup.th sensor. The processor 150 may estimate each element α.sub.j1, α.sub.j2, α.sub.j3, α.sub.j4, and α.sub.j5 of the model parameter for each sensor, based on the loss function.
[0081] The processor 150 may define a loss function J1 reflecting domain knowledge as in Equation 5.
J.sub.2=(min l.sub.C−max u.sub.B)+(min l.sub.B−max u.sub.A)+(min l.sub.C−max u.sub.A) [Equation 5]
[0082] In this case, l.sub.A, u.sub.A, l.sub.B, u.sub.B, l.sub.C, and u.sub.c may denote the maximum and minimum values of transformed data of measured values for mixed gases with a low concentration, a medium concentration, and a high concentration, respectively.
[0083] The processor 150 may obtain an optimization parameter α of a transformation model in which a loss function J.sub.1 may be maximized That is, the processor 150 may optimize the transformation model to transform sensor data, so that sensor data measured in a mixed gas having a medium concentration has a greater value than in a mixed gas having a low concentration and sensor data measured in a mixed gas having a high concentration has a greater value than in a mixed gas having a medium concentration.
[0084] The processor 150 may define a loss function J.sub.2 for improving data quality as in Equation 6.
[0085] Here, s.sub.b and s.sub.w may denote indicators of scatteredness, s.sub.b may denote between-class scatter, and s.sub.w may denote within-class scatter. A great s.sub.b may refer to a great difference in data values between different classifications, and a great s.sub.w may refer to a great difference in data values in the same classification.
[0086] s.sub.b and s.sub.w may be expressed as in Equations 7 and 8, respectively.
S.sub.w=Σ.sub.i=1 .sup.n(x.sub.i−μ.sub.yi) (x.sub.i−μ.sub.yi).sup.T [Equation 7]
S.sub.b=Σ.sub.k=1.sup.nn.sub.k(μ.sub.k−μ) (μ.sub.k−μ).sup.T [Equation 8]
[0087] I ed value included in a classification y.sub.i, and μ.sub.yi may denote an average or measured values included in the classification y.sub.i. μ.sub.k may denote an average of measured values included in a kth classification, μ may denote an average of μ.sub.k, and n.sub.k may denote a weight for each classification.
[0088] In another example, s.sub.b and s.sub.w may be expressed as in Equations 9 and 10, respectively.
[0089] The processor 150 may improve a data quality by obtaining the optimization parameter a of the transformation model capable of maximizing a loss function J.sub.2. That is, the processor 150 may optimize the transformation model to transform sensor data, so that repeatedly measured values of the same gas may have similar values to one another.
[0090]
[0091] The device 100 for compensating for sensor drift may improve the classification accuracy of a measurement object by setting and optimizing a transformation model for transforming sensor data.
[0092] The methods according to the above-described examples may be recorded in non-transitory computer-readable media including program instructions to implement various operations of the above-described examples. The media may also include, alone or in combination with the program instructions, data files, data structures, and the like. The program instructions recorded on the media may be those specially designed and constructed for the purposes of examples, or they may be of the kind well-known and available to those having skill in the computer software arts. Examples of non-transitory computer-readable media include magnetic media such as hard disks, floppy disks, and magnetic tape; optical media such as CD-ROM discs or DVDs; magneto-optical media such as optical discs; and hardware devices that are specially configured to store and perform program instructions, such as read-only memory (ROM), random access memory (RAM), flash memory, and the like. Examples of program instructions include both machine code, such as produced by a compiler, and files including higher-level code that may be executed by the computer using an interpreter. The above-described devices may be configured to act as one or more software modules in order to perform the operations of the above-described embodiments, or vice versa.
[0093] The software may include a computer program, a piece of code, an instruction, or some combination thereof, to independently or uniformly instruct or configure the processing device to operate as desired. Software and data may be embodied permanently or temporarily in any type of machine, component, physical or virtual equipment, computer storage medium or device, or in a propagated signal wave capable of providing instructions or data to or being interpreted by the processing device. The software also may be distributed over network-coupled computer systems so that the software is stored and executed in a distributed fashion. The software and data may be stored by one or more non-transitory computer-readable recording mediums.
[0094] While this disclosure includes specific examples, it will be apparent to one of ordinary skill in the art that various changes in form and details may be made in these examples without departing from the spirit and scope of the claims and their equivalents. The examples described herein are to be considered in a descriptive sense only, and not for purposes of limitation. Descriptions of features or aspects in each example are to be considered as being applicable to similar features or aspects in other examples. Suitable results may be achieved if the described techniques are performed in a different order, and/or if components in a described system, architecture, device, or circuit are combined in a different manner, and/or replaced or supplemented by other components or their equivalents.
[0095] Accordingly, other implementations are within the scope of the following claims.