Sensor temperature error compensation method and device based on artificial intelligence
Through a deep learning-based neural network model, combining convolutional neural network and long-term memory network, the measurement data deviation problem of sensors under different temperature conditions is solved, and more efficient temperature error compensation is achieved, improving the accuracy and reliability of the sensor. sex.
Patent Information
- Application Number
- CN202411153967.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-12-13
AI Technical Summary
The working performance of the sensor under different temperature conditions is affected, resulting in deviations in the measurement data. The existing temperature error compensation method is difficult to deal with complex nonlinear relationships, and the model generalization ability is limited, so it is unable to effectively deal with various operating conditions. Sensor temperature error.
Using a neural network model based on deep learning, the sensor measurement data and temperature data are preprocessed to construct a convolutional neural network and a long and short-term memory network, combined with multi-layer attention mechanism and generalized inverse matrix solution method to optimize temperature error compensation performance.
It significantly improves the accuracy and reliability of sensor measurement data, can more effectively deal with sensor errors under complex temperature conditions, and improves the generalization ability and adaptability of the model.
Smart Images

Figure CN119124243A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence, and in particular to a sensor temperature error compensation method and device based on artificial intelligence. Background Art
[0002] With the continuous development of sensor technology, sensors have been widely used in various industrial, automotive and consumer electronic products. However, the working performance of sensors under different temperature conditions is often affected by temperature, resulting in deviations in measurement data. This temperature-induced error not only reduces the measurement accuracy of the sensor, but may also have a negative impact on the overall performance of the system that relies on these measurement data. Therefore, how to compensate for the temperature error of the sensor's measurement data has become a key technical issue in improving the reliability and accuracy of the sensor.
[0003] Traditional temperature error compensation methods usually rely on empirical formulas or simple mathematical models to correct temperature-induced errors by modeling the relationship between known temperatures and measured data. However, these methods often have difficulty handling complex nonlinear relationships, and the generalization ability of the model is limited, making it difficult to cope with sensor temperature errors under various working conditions.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present invention provide a sensor temperature error compensation method and device based on artificial intelligence, so as to at least solve the technical problem that the sensor has low accuracy due to the influence of temperature.
[0006] According to one aspect of an embodiment of the present invention, there is provided a sensor temperature error compensation method based on artificial intelligence, comprising: collecting measurement data and temperature data of a sensor; based on the temperature data, performing temperature error compensation on the measurement data using a neural network model based on deep learning to obtain error-compensated measurement data; wherein the neural network model is obtained based on the following training: preprocessing training data in a training data set, and calculating an error value of the neural network model based on the preprocessed training data; and updating network parameters of the neural network model based on the error value.
[0007] According to another aspect of an embodiment of the present invention, there is also provided a sensor temperature error compensation device based on artificial intelligence, comprising: an acquisition module, configured to acquire measurement data and temperature data of a sensor; a compensation module, configured to perform temperature error compensation on the measurement data based on the temperature data using a neural network model based on deep learning to obtain error-compensated measurement data; wherein the neural network model is obtained based on the following training: preprocessing the training data in a training data set, and calculating the error value of the neural network model based on the preprocessed training data; and updating the network parameters of the neural network model based on the error value.
[0008] In an embodiment of the present invention, measurement data and temperature data of a sensor are collected; based on the temperature data, a neural network model based on deep learning is used to perform temperature error compensation on the measurement data to obtain error-compensated measurement data, thereby solving the technical problem that the sensor is affected by temperature and has low accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0010] Figure 1 is a flow chart of a sensor temperature error compensation method based on artificial intelligence according to an embodiment of the present invention;
[0011] Figure 2 is a flow chart of another sensor temperature error compensation method based on artificial intelligence according to an embodiment of the present invention;
[0012] Figure 3 is an architecture diagram of a convolutional neural network according to an embodiment of the present invention;
[0013] Figure 4 is an architecture diagram of a long short-term memory network according to an embodiment of the present invention;
[0014] Figure 5 is a flow chart of a training method for a neural network model according to an embodiment of the present invention;
[0015] Figure 6 A schematic structural diagram of a sensor temperature error compensation device based on artificial intelligence suitable for implementing an embodiment of the present disclosure is shown;
[0016] Figure 7 A schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0017] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0018] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0019] According to an embodiment of the present invention, a method embodiment of a sensor temperature error compensation method based on artificial intelligence is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0020] Figure 1 is a sensor temperature error compensation method based on artificial intelligence according to an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:
[0021] Step S102, collecting sensor measurement data and temperature data;
[0022] Step S104: Based on the temperature data, a neural network model based on deep learning is used to perform temperature error compensation on the measurement data to obtain error-compensated measurement data.
[0023] 1) Build a neural network model
[0024] A convolutional neural network layer is constructed, and the convolutional neural network layer is used to convolve the temperature data and the measurement data respectively to extract data features; an LSTM layer is constructed, and the LSTM layer is used to convert the data features into label vectors, and back-propagate the measurement data in time to obtain the relationship between the measurement data and time.
[0025] 2) Train the neural network model.
[0026] First, the training data in the training data set are preprocessed, and the error value of the neural network model is calculated based on the preprocessed training data; for example, back propagation is performed in the time direction, by calculating the error gradient of the current time step at each time step, the error value of the neuron in each time step is determined, and the time direction error is obtained based on the error value of the neuron in each time step; back propagation is performed in the depth direction, by starting from the output layer, calculating and propagating the error gradient layer by layer, the error value between neurons in each layer is determined, and the depth direction error is obtained based on the error value between neurons in each layer.
[0027] Next, based on the error value, the network parameters of the neural network model are updated. Based on the error value, the error gradient is calculated; based on the error gradient, the weight matrix and the bias vector of the neural network model are adjusted to update the network parameters of the neural network model. For example, based on the exponential moving mean of the first-order matrix solution of the parameter controlling exponential decay and the previous gradient of the error gradient, the exponential moving mean of the current gradient is determined; based on the exponential moving weighted mean of the exponential moving of the parameter controlling exponential decay and the previous gradient of the error gradient, the exponential moving weighted mean of the current gradient is determined; based on the exponential moving mean of the first-order matrix solution and the exponential moving weighted mean, the correction value of the current gradient is calculated; using the correction value, the update step size of the weight matrix and the bias vector of the neural network model is determined, and based on the determined update step size, the weight matrix and the bias vector of the neural network model are updated.
[0028] In some embodiments, the following method can be used to calculate the corrected value of the current gradient, determine the exponential decay parameter for calculating the exponential moving mean of the first-order matrix solution and the exponential decay parameter for calculating the exponential moving weighted mean; based on the exponential decay parameter for calculating the exponential moving mean of the first-order matrix solution and the exponential decay parameter for calculating the exponential moving weighted mean, use the exponential moving mean of the first-order matrix solution of the previous time step and the exponential moving weighted mean to calculate the corrected first-order moment solution and the corrected second-order moment solution; based on the corrected first-order moment solution and the corrected second-order moment solution, calculate the corrected value of the current gradient.
[0029] The embodiment of the present application also provides another sensor temperature error compensation method based on artificial intelligence, which optimizes the performance of temperature error compensation by introducing a complex convolutional neural network (CNN) and a long short-term memory network (LSTM) structure, combined with a multi-layer attention mechanism and a generalized inverse matrix solution method. Specifically, Figure 2 As shown, the method comprises the following steps:
[0030] Step S202, collecting the measurement data and temperature data of the sensor.
[0031] First, the original measurement data and corresponding temperature data of the target sensor are obtained. The measurement data includes but is not limited to the output signals of sensors such as voltage, current, and pressure, while the temperature data is collected synchronously through an independent temperature sensor or a multi-sensor system.
[0032] Step S204: multi-scale feature extraction and data preprocessing.
[0033] In order to improve the data characterization capability, the temperature data and measurement data are preprocessed first.
[0034] Step S206, constructing a deep learning model.
[0035] In the process of model construction, the following Figure 3 The convolutional neural network (CNN) shown in Figure 4 The structure shown in the figure is combined with the long short-term memory network (LSTM) and further introduces a multi-layer attention mechanism to improve the model's perception ability and ability to capture temporal information.
[0036] First, multiple convolution layers are constructed to extract the spatial features of temperature data and measurement data. Each convolution operation is accompanied by a pooling operation to reduce the dimension of the feature map and retain important information. The size and number of convolution kernels are determined by cross-validation, and a batch normalization layer is added after each convolution layer to accelerate model convergence.
[0037] The main function of a convolutional neural network (CNN) is to extract specific features from a set model. After the data undergo a series of preprocessing, they are input into the convolutional neural network. For the time series of sensor signals, one-dimensional convolution is usually used for processing. However, in order to remove the outliers of the multi-beam single-island complementary high-precision flexible digital intelligent sensor and extract the features between the sensor and the temperature, the present embodiment selects a two-dimensional convolution processing method. Before applying the two-dimensional convolution, the three-axis intelligent sensor data and its corresponding temperature data are first regarded as three features and used as three channels in the convolutional network. Subsequently, the data of these three channels are subjected to sliding window processing, and the window size is set to 20. This processing method can not only extract the features between the output of the high-precision flexible digital intelligent sensor and the temperature, but also effectively avoid feature redundancy and network overfitting. The processed data will be input into the convolution layer.
[0038] Secondly, a long short-term memory network layer (LSTM) is constructed. The features extracted from the convolutional layer are input into the LSTM layer, and the time series data is processed through the gating mechanism. The LSTM layer can not only capture the relationship between the measurement data and the temperature data over time, but also store long-term dependencies. The output of each LSTM unit is weighted and summed through the attention mechanism to generate a more representative label vector.
[0039] Finally, the error compensation of the label vector output by the LSTM layer is performed by solving the generalized inverse matrix. The optimized model parameters are obtained by minimizing the square error between the predicted output and the actual measured value.
[0040] Step S208: model training and parameter optimization.
[0041] During the model training process, a dynamic learning rate adjustment mechanism and a second-order optimization method are used to improve the convergence speed and stability of the model. Figure 5 As shown, the following steps are included:
[0042] Step S2082, calculating the error value of the neural network model.
[0043] 1) Error calculation in the time direction.
[0044] In the time direction, the bidirectional backpropagation through time (BPTT) algorithm is used to more accurately capture the dependencies of time series data. The specific steps are as follows:
[0045] First, perform back propagation. Perform bidirectional back propagation through the bidirectional LSTM network to obtain the forward hidden state of each time step and the reverse hidden state
[0046] Next, the error is calculated. At each time step t, the error gradient of the current time step is calculated by combining the forward and reverse hidden states:
[0047]
[0048] in, and represent the forward and reverse error gradients respectively.
[0049] Then, dynamic adjustment is performed. The time step weight adjustment mechanism is introduced to achieve dynamic distribution of errors in time by adaptively adjusting the error impact weight of each time step:
[0050]
[0051] Among them, ωt is the weight factor of time step t, α is the control parameter used to adjust the steepness of the curve of the time step weight factor, and T is the total number of time steps. Among them, α can be dynamically updated according to the gradient change of the current time step to better adapt to the data characteristics in different time periods. The specific adjustment formula can be as follows:
[0052]
[0053] Among them, α t-1 is the weight factor of the previous time step, η is the learning rate, is the gradient of the loss function with respect to the time step.
[0054] Finally, based on the error gradient at each time step and the corresponding weight factor, the total error in the time direction is obtained:
[0055]
[0056] In the embodiment of the present application, back propagation is performed in the time direction. At each time step t, the error gradient of the current time step is calculated by combining the forward and reverse hidden states; the weight factor of time step t is determined based on the control parameter α used to adjust the steepness of the curve of the time step weight factor and the total number of time steps; the total error in the time direction is obtained based on the weight factor and the error at each time step. The above scheme, by performing back propagation in the time direction, combines the forward and reverse hidden states, accurately calculates the error gradient of the current time step at each time step t, thereby improving the accuracy of gradient calculation. The steepness of the curve of the time step weight factor is adjusted based on the control parameter, and the weight factor of time step t is determined in combination with the total number of time steps, so that the contribution of different time steps to the total error can be flexibly adjusted during the back propagation process, thereby ensuring that the relative importance of each time step is taken into account in the time direction, and avoiding the problem of gradient disappearance or explosion in long sequence training. Finally, by calculating the total error in the time direction based on these weight factors and the errors at each time step, the convergence speed and training effect of the model can be significantly improved, especially when dealing with tasks with long time series dependencies, it shows better stability and accuracy.
[0057] 2) Error calculation in the depth direction:
[0058] In the depth direction, the gradient accumulation mechanism and the multiscale error propagation (MSEP) algorithm are introduced to improve the error propagation efficiency of the deep network. The specific steps are as follows:
[0059] First, inter-layer gradient accumulation is performed. In the back propagation process starting from the output layer, the error gradient is calculated and accumulated layer by layer. The error gradient of each layer depends not only on the error of the current layer, but also on the accumulated errors from adjacent layers:
[0060] △l j =△l j+1 +γ j ·δ j
[0061] Among them, Δlj is the accumulated error gradient of the jth layer, γj is the error propagation coefficient, and δj is the error gradient of the current layer.
[0062] Next, multi-scale error propagation is performed. In each layer of the neural network, a multi-scale error propagation strategy is introduced to decompose the errors of each layer into different scales and propagate these decomposed errors throughout the network:
[0063]
[0064] in, is the error of the jth layer at scale s, S is the number of scales, λs is the scale weight factor, It represents the error gradient obtained by decomposing δj through the sth scale in the jth layer of the neural network.
[0065] Then, the total error in the depth direction is calculated. The total error in the depth direction is obtained by weighted aggregation of the multi-scale errors of each layer:
[0066]
[0067] Among them, L is the number of layers of the neural network.
[0068] This application determines the cumulative error gradient of the current layer based on the error propagation coefficient and the error gradient of the current layer; and based on the number of scales and the weight factor of each scale, decomposes the cumulative error gradient of the current layer in each scale dimension of multiple scales to obtain the decomposed error gradient; weighted aggregation is performed on the decomposed error gradient of each layer to obtain the depth error. This application determines the cumulative error gradient by combining the error propagation coefficient and the error gradient of the current layer, and decomposes and weighted aggregates it in multiple scale dimensions, thereby improving the accuracy of error propagation and the model's ability to capture multi-scale features. This not only enhances the generalization ability of the model, but also optimizes the efficiency of error propagation, making the model more adaptable and stable in complex scenarios.
[0069] 3) Total error calculation and optimization:
[0070] Based on the time direction error and depth direction error, the error fusion algorithm is used to perform weighted synthesis of the two to obtain the total error value:
[0071] Edepth total =β time ·E time +β depth ·E depth
[0072] Among them, βtime and βdepth are the error weight factors in the time direction and depth direction respectively. By dynamically adjusting these two weight factors, the error distribution is optimized, and then the parameters of the neural network model are adjusted to improve the accuracy and robustness of the model.
[0073] This application significantly improves the model's ability to capture dependencies in time series data and reduces information loss through bidirectional backpropagation and time step weight adjustment. In addition, the introduction of gradient accumulation and multi-scale error propagation mechanisms makes error propagation in the depth direction more effective, avoiding the gradient vanishing and explosion problems. Finally, by dynamically adjusting the error weights in the time and depth directions, error optimization is achieved across the entire network, improving the training efficiency and accuracy of the model.
[0074] Step S2084, updating the network parameters of the neural network model.
[0075] Calculating an error gradient based on the error value;
[0076] Based on the error gradient, the weight matrix and bias vector of the neural network model are adjusted to update the network parameters of the neural network model.
[0077] 1) Based on the parameters controlling exponential decay and the exponential moving mean of the first-order matrix solution of the previous gradient of the error gradient, determine the exponential moving mean of the first-order matrix solution of the current gradient; first, set the exponential decay control parameter, which determines the degree of influence of the gradient history data on the current calculation during the calculation process. Then, use the exponential moving weighted mean of the previous gradient as a reference value, which is calculated by weighted averaging. The weight will decrease over time to ensure that the response to the recent gradient is more sensitive. Then, combine the current gradient with this reference value, and calculate the exponential moving weighted mean of the current gradient by adjusting the exponential decay factor. In this way, the gradient change can be effectively smoothed, the interference of gradient noise on model training can be reduced, and the stability and convergence speed of the optimization process can be improved.
[0078] 2) Based on the parameter controlling exponential decay and the exponential moving weighted mean of the previous gradient of the error gradient, determine the exponential moving weighted mean of the current gradient. First, a parameter controlling exponential decay needs to be set, which determines the degree of influence of the gradient history on the current calculation. Then, the exponential moving weighted mean of the previous gradient is calculated by weighting the historical mean and the current gradient. After obtaining the current gradient, the exponential moving weighted mean of the current gradient is calculated by combining the exponential moving weighted mean of the previous gradient with the current gradient.
[0079] 3) Based on the exponential moving mean and the exponential moving weighted mean of the first-order matrix solution, calculate the corrected value of the current gradient; for example, determine the exponential decay parameter for calculating the exponential moving mean of the first-order matrix solution and the exponential decay parameter for calculating the exponential moving weighted mean; based on the exponential decay parameter for calculating the exponential moving mean of the first-order matrix solution and the exponential decay parameter for calculating the exponential moving weighted mean, use the exponential moving mean and the exponential moving weighted mean of the first-order matrix solution of the previous time step to calculate the corrected first-order moment solution and the corrected second-order moment solution; calculate the corrected value of the current gradient based on the corrected first-order moment solution and the corrected second-order moment solution. The present application can significantly improve the effect of gradient optimization by calculating the corrected value of the current gradient based on the exponential moving mean and the exponential moving weighted mean of the first-order matrix solution. Specifically, first determine the exponential decay parameters of the exponential moving mean and the exponential moving weighted mean used to calculate the first-order matrix solution. These parameters adjust the influence of the gradient history on the current calculation. Then, by using the corrected first-order moment solution and the corrected second-order moment solution of the previous time step, the corrected value of the current time step is calculated, which helps to accurately adjust the update direction and amplitude of the gradient. Finally, the corrected value of the current gradient is calculated based on the corrected first-order moment solution and the corrected second-order moment solution, which can effectively reduce the gradient noise, improve the stability and convergence speed of model training, and thus improve the overall optimization performance.
[0080] In some cases, for example, the corrected value of the current gradient can also be calculated by bias correction:
[0081]
[0082] Here, ρ and ν are weights used in the calculation of the control correction value. It is the exponential moving mean of the first-order moment solution of the current time step t, which smoothes the gradient changes and reduces noise by weighted averaging the current and historical gradients. is the exponential moving weighted mean, gt is the original gradient at the current time step t, which represents the derivative of the loss function relative to the model parameters, and μ is the momentum term, which is used to smooth the gradient update, reduce oscillation, and increase the convergence speed. Wt is the weighted matrix at the current time step t. It is used to make a weighted adjustment to the current gradient gt to further accurately control the influence of the gradient; η t is the bias correction factor; ∈ is a very small constant used to prevent the denominator from being zero. It ensures numerical stability when computing the corrected gradient.
[0083] In the example of this application, the weight parameters ρ and ν are introduced to control the weights in the correction value calculation, which effectively smooths the gradient change and reduces the gradient noise. At the same time, the combination of the momentum term μ and the weight matrix Wt further accurately controls the update direction and amplitude of the gradient and reduces the oscillation in the optimization process. Bias correction factor η t The numerical stability and robustness of the calculation are ensured, thereby significantly improving the stability and convergence speed of model training.
[0084] 4) Using the correction value, determine the update step size of the weight matrix and the bias vector of the neural network model, and based on the determined update step size, update the weight matrix and the bias vector of the neural network model.
[0085] The present application also provides a sensor temperature error compensation device based on artificial intelligence, such as Figure 6 As shown, the acquisition module 62 is configured to acquire the measurement data and temperature data of the sensor; the compensation module 64 is configured to perform temperature error compensation on the measurement data based on the temperature data using a neural network model based on deep learning to obtain error-compensated measurement data; wherein the neural network model is obtained based on the following training: preprocessing the training data in the training data set, and calculating the error value of the neural network model based on the preprocessed training data; and updating the network parameters of the neural network model based on the error value.
[0086] It should be noted that: the sensor temperature error compensation device based on artificial intelligence provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the sensor temperature error compensation device based on artificial intelligence provided in the above embodiment and the sensor temperature error compensation method embodiment based on artificial intelligence belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0087] Figure 7FIG. 1 shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiment of the present disclosure. It should be noted that: Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0088] like Figure 7 As shown, the electronic device includes a central processing unit (CPU) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage part 1008 into a random access memory (RAM) 1003. In the RAM 1003, various programs and data required for system operation are also stored. The CPU 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0089] The following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed, so that a computer program read therefrom is installed into the storage section 1008 as needed.
[0090] In particular, according to an embodiment of the present disclosure, the process described below with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1009, and / or installed from the removable medium 1011. When the computer program is executed by the central processing unit (CPU) 1001, various functions defined in the method and apparatus of the present application are executed. In some embodiments, the electronic device may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0091] It should be noted that the computer-readable medium shown in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0092] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0093] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, and the units described may also be arranged in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0094] As another aspect, the present application further provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device.
[0095] The computer-readable medium carries one or more programs, and when the one or more programs are executed by an electronic device, the electronic device implements the method described in the following embodiments. For example, the electronic device can implement each step of the method embodiment.
[0096] As another aspect, the present application further provides an electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication. The memory stores a computer program executable by the at least one processor, and the computer program is used to enable the electronic device to perform the method of the embodiment of the present application when executed by the at least one processor.
[0097] As another aspect, the present application further provides a computer program product, including a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to execute the method of the embodiment of the present application.
[0098] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0099] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0100] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0101] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0102] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0103] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0104] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A sensor temperature error compensation method based on artificial intelligence, characterized in that: include: Collect sensor measurement data and temperature data; Based on the temperature data, using a neural network model based on deep learning to perform temperature error compensation on the measurement data to obtain error-compensated measurement data; Wherein, the neural network model is obtained based on the following training: preprocessing the training data in the training data set, and calculating the error value of the neural network model based on the preprocessed training data; And based on the error value, the network parameters of the neural network model are updated.
2. The method according to claim 1, characterized in that: Calculating the error value of the neural network model based on the preprocessed training data includes: Back propagation is performed in the time direction, by calculating the error gradient of the current time step at each time step, determining the error value of the neuron in each time step, and obtaining the time direction error based on the error value of the neuron in each time step; Back propagation is performed in the depth direction, starting from the output layer, calculating and propagating the error gradient layer by layer, determining the error value between neurons in each layer, and obtaining the depth direction error based on the error value between neurons in each layer.
3. The method according to claim 1, characterized in that Based on the error value, updating the network parameters of the neural network model includes: Calculating an error gradient based on the error value; Based on the error gradient, the weight matrix and bias vector of the neural network model are adjusted to update the network parameters of the neural network model.
4. The method according to claim 3, characterized in that The weight matrix and the bias vector of the neural network model are adjusted to update the network parameters of the neural network model, including: Determine an exponential moving mean of a first-order matrix solution of a current gradient based on a parameter controlling exponential decay and an exponential moving mean of a first-order matrix solution of a previous gradient of the error gradient; Determine an exponential moving weighted mean of a current gradient based on a parameter controlling exponential decay and an exponential moving weighted mean of a previous gradient of the error gradient; Calculate a corrected value of the current gradient based on the exponential moving mean solved by the first-order matrix and the exponential moving weighted mean; The correction value is used to determine the update step size of the weight matrix and the bias vector of the neural network model, and based on the determined update step size, the weight matrix and the bias vector of the neural network model are updated.
5. The method according to claim 4, characterized in that Calculating a corrected value of the current gradient based on the exponential moving mean and the exponential moving weighted mean solved by the first-order matrix, including: determining an exponential decay parameter for computing an exponential moving mean for a first-order matrix solution and an exponential decay parameter for computing an exponential moving weighted mean; Based on the exponential decay parameter for calculating the exponential moving mean of the first-order matrix solution and the exponential decay parameter for calculating the exponential moving weighted mean, the exponential moving mean of the first-order matrix solution and the exponential moving weighted mean of the previous time step are used to calculate the modified first-order moment solution and the modified second-order moment solution of the current time step; Based on the modified first-order moment solution and the modified second-order moment solution, a modified value of the current gradient is calculated.
6. The method according to claim 1, characterized in that The neural network model comprises: A convolutional neural network layer, wherein the convolutional neural network layer is used to convolve the temperature data and the measurement data respectively to extract data features; The LSTM layer is used to convert the data features into label vectors and perform back propagation on the measurement data in time to obtain a relationship between the measurement data and time.
7. A sensor temperature error compensation device based on artificial intelligence, characterized in that: include: An acquisition module is configured to acquire measurement data and temperature data of the sensor; A compensation module is configured to perform temperature error compensation on the measurement data based on the temperature data by using a neural network model based on deep learning to obtain error-compensated measurement data; Wherein, the neural network model is obtained based on the following training: preprocessing the training data in the training data set, and calculating the error value of the neural network model based on the preprocessed training data; And based on the error value, the network parameters of the neural network model are updated.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 6.
9. A computer device, characterized in that: include: Memory and processor, The memory stores a computer program; The processor is used to execute the computer program stored in the memory, and when the computer program is run, the processor is enabled to execute the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Self-calibration method and device for platinum resistance thermometer based on LSTM (Long Short Term Memory)
CN120593920A
Laser power meter and control method thereof
CN120869342A
A laser power meter and a control method thereof
CN120869342B
Low-temperature measured value traceability method based on LSTM and multimode calibration system
CN120907695A
