Error correction method for detection device

By using neural network models to correct the error of sensor data, traditional methods solve the correction accuracy and reliability problems in the face of complex environment changes, achieving higher accuracy and adaptability of detection data.

CN119413220AActive Publication Date: 2025-02-11WUXI PROFESSIONAL COLLEGE OF SCI & TECH

Patent Information

Application Number
CN202411448539.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-02-11
Estimated Expiration
2044-10-17

AI Technical Summary

Technical Problem

The prior art has accuracy and reliability problems in sensor error correction, especially when faced with complex nonlinear errors, large-scale temperature changes and dynamic changes, traditional methods are difficult to adjust model parameters in real time, resulting in correction failure.

Method used

The neural network model is used to correct the error of sensor data, train the neural network model through historical data, and correct the error of real-time data, and dynamically adjust the neural network model to adapt to environmental changes.

Benefits of technology

It improves the accuracy and reliability of sensor output detection data, can adapt to error characteristics under various environmental conditions, and effectively handle static and dynamic errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119413220A_ABST
    Figure CN119413220A_ABST
Patent Text Reader

Abstract

The invention provides an error correction method of a detection device. The error correction method comprises the following steps: selecting and configuring a sensor according to a physical quantity needing to be monitored; acquiring original data from a sensor, and preprocessing the original data; training by using the historical sensor data and a neural network model to obtain a trained neural network model; and performing error correction on the real-time data of the detection device based on the trained neural network model to output a correction result of the real-time data. According to the invention, error correction is carried out by using the neural network model, so that nonlinear errors and dynamic changes in real-time data output by the sensor can be simulated and corrected more accurately, and error characteristics under various environmental conditions can be adaptively realized. Therefore, the accuracy and reliability of the detection data output by the detection device comprising the sensor are improved, and the detection device can conform to an actual application scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic equipment error correction, and in particular to an error correction method for a detection device. Background Art

[0002] The sensor is a detection unit including a single-chip microcomputer. The electronic device including the sensor of the single-chip microcomputer (i.e., the detection device in this application) needs to be corrected for the initial error and drift caused by factors such as manufacturing tolerance, temperature change, time aging, power supply fluctuation, etc. Although the current methods for sensor error correction have played a key role in many practical applications, they still have a series of shortcomings and disadvantages. In order to realize the detection of environmental data, the detection device usually also needs to include components such as interfaces and power supplies.

[0003] First, traditional error correction methods usually rely on preset mathematical models or empirical formulas, which are often based on idealized or oversimplified assumptions. For example, these methods may perform well when dealing with linear or small-range errors, but their correction accuracy and reliability are often greatly reduced when faced with complex nonlinear errors, large-range temperature changes, or dynamic changes under different operating conditions. This is because traditional methods lack the flexibility and adaptability to adapt to environmental changes and cannot adjust model parameters in real time to cope with unknown or changing error characteristics.

[0004] Secondly, many traditional calibration methods require a large amount of offline calibration data and long preliminary tests, which not only increases the time cost of development and debugging, but may also lead to calibration failure in actual applications due to changes in environmental or operating conditions. For example, once there is a significant difference between the deployment environment and the test environment, the traditional calibration method for sensors or detection devices containing sensors may not provide accurate calibration results, resulting in sensor performance degradation or even failure of the sensor and the entire detection device. Furthermore, many existing calibration technologies require manual adjustment of parameters such as gain, offset and other calibration coefficients during implementation. Manual adjustment of parameters not only requires professional technical knowledge, but also often relies on the experience and judgment of experts. This reliance makes the calibration process lack universality and repeatability, and increases the risk of human error.

[0005] At the same time, the manual calibration process of sensors or detection devices containing sensors is usually iterative and time-consuming, which is particularly disadvantageous in application scenarios that require rapid deployment or frequent adjustments. In addition, many calibration methods have high hardware requirements, for example, additional calibration chips or dedicated processors are required to implement complex calibration algorithms. This not only increases the hardware cost, but also increases the energy consumption of the detection device. In resource-constrained applications, such as portable detection devices or remote monitoring systems, the detection device cannot be powered by the mains and needs to rely on built-in batteries for power supply. This increased hardware burden may lead to a reduced service life of the detection device and increased maintenance difficulties. Therefore, traditional manual calibration will greatly consume the battery power contained in the detection device and affect the service life and battery life of the detection device.

[0006] In addition, the correction method for the detection device including the sensor in the prior art has the defect of insufficient robustness in processing noise data and interference data. In practical applications, the sensor and the detection device including the sensor may be affected by various noise data and interference data, such as electromagnetic interference, mechanical vibration, etc. The error correction method of the traditional detection device is often difficult to effectively distinguish the real detection data and noise data generated by the real sensor signal, which may cause the detection data after error correction to still contain unpredictable error components or even erroneous detection data, thereby greatly affecting the accuracy of subsequent decision-making and control of the detection device.

[0007] In view of this, it is necessary to improve the error correction method of the detection device in the prior art to solve the above problems. Summary of the invention

[0008] The purpose of the present invention is to disclose an error correction method for a detection device to solve the aforementioned technical problems, and in particular to improve the accuracy and reliability of the detection data output by the detection device and to be consistent with actual application scenarios.

[0009] To achieve the above object, the present invention provides an error correction method for a detection device, wherein the detection device has a built-in sensor including a single-chip microcomputer, and the error correction method comprises:

[0010] S1. Select and configure sensors according to the physical quantity to be monitored;

[0011] S2. Acquire raw data from the sensor and preprocess the raw data;

[0012] S3, using historical sensor data to train a neural network model to obtain a trained neural network model;

[0013] S4. Perform error correction on the real-time data of the detection device based on the trained neural network model to output the correction result of the real-time data.

[0014] As a further improvement of the present invention, the selecting and configuring of the sensor in step S1 includes the following sub-steps:

[0015] Sub-step S11: recommend sensor type and microcontroller type by the following formula:

[0016]

[0017] Among them, s i is the sensor performance index, p i is the weight coefficient of the sensor performance index, w i is the weight adjustment factor of the sensor performance index, p i ∈(0,1),w i Take an integer from 1 to 5;

[0018] Sub-step S12: designing a modular sensor interface using the following formula:

[0019]

[0020] Wherein, T(t) is the sensor target interface configuration variable, R(t) is the current sensor interface configuration variable, k is the sensor target interface dynamic response speed coefficient, γ is the sensor target interface steady-state error coefficient, k∈(0,1), γ∈(0,1);

[0021] Sub-step S13: dynamically adjust the performance configuration of the single-chip microcomputer by the following formula:

[0022]

[0023] Wherein, f is the data processing frequency function of the single chip microcomputer, m is the time quantity of the single chip microcomputer, P(f,m) is a composite function with f and m as variables, α, β, δ are all performance adjustment parameters of the single chip microcomputer, and the α∈(0,1), the β∈(0,1), and the δ∈(0,1);

[0024] Sub-step S14: performing sensor calibration and diagnosis based on the following formula:

[0025]

[0026] Among them, x j is the sensor measurement data, μ j is the expected value of the sensor measurement data, σ j is the standard deviation of the sensor measurement data, θ j is the calibration factor.

[0027] As a further improvement of the present invention, the data collection and preprocessing in step S2 includes the following sub-steps:

[0028] Sub-step S21, using the following formula to perform adaptive data collection:

[0029]

[0030] Where p(s) is the real-time sampling parameter, γ is the amplification factor, ω is the function of the real-time sampling parameter p(s), k is the sensitivity factor, θ is the physical quantity threshold, γ>1, k∈(0,1);

[0031] Sub-step S22: performing neural network deep learning based on the following formula to remove noise data from the original data:

[0032]

[0033] Where x is the noise data in the original data, α(x) is the amplification ratio of the noise data, β(x) is a constant, and δ(x) is the phase offset;

[0034] Sub-step S23: performing multi-dimensional data normalization and feature extraction based on the following formula:

[0035]

[0036] Among them, v i is the i-th data dimension, κ i is the normalization factor, μ i is the mean of the i-th data dimension, σ i is the standard deviation of the i-th data dimension.

[0037] As a further improvement of the present invention, step S3 includes the following sub-steps:

[0038] Sub-step S31: construct a dynamically adjusted neural network model using the following formula:

[0039]

[0040] Among them, n is the number of network layers of the neural network model, d is the data complexity, and σ is the network width of the neural network model;

[0041] Sub-step S32: applying ensemble learning and meta-learning through the following formula:

[0042]

[0043] Where m is the number of neural network models, λ i is the learning rate of the neural network model, Li is the loss function of the neural network model;

[0044] Sub-step S33, performing regularization and cross-validation by the following formula:

[0045]

[0046] Among them, x is the model parameter, α and β are regularization weight coefficients, x∈(-1,1), α∈(0,1), β∈(0,1).

[0047] As a further improvement of the present invention, the error correction algorithm in step S4 includes the following sub-steps:

[0048] Sub-step S41, a dynamic learning algorithm based on feedback, dynamically adjusting the parameters of the neural network through a reward and penalty mechanism;

[0049] Sub-step S42: designing a data stream processing framework and using a GPU-accelerated deep learning model for inference;

[0050] Sub-step S43, using adaptive model fine-tuning, dynamically adjusting the model's learning rate, number of network layers and activation function according to feedback from actual application scenarios, monitoring the difference between the actual output and expected output of the neural network model, so as to correct the neural network model.

[0051] As a further improvement of the present invention, the weight and structure of the optimized network in the sub-step S41 includes the following sub-sub-steps:

[0052] Sub-step S411: Analyze the error data of the sensor in real time, adjust the number of network layers and nodes of the neural network model according to the error data, and use the following formula to perform correction of the error data in a dynamic environment:

[0053]

[0054] Among them, d is the network depth, v is the rate of environmental change, e is the environmental state, t is time, τ is the time constant, α is the adjustment coefficient, and e c is the critical value of the environmental state, τ is the time required for the environmental state data to decay from the maximum value to 1 / e of the maximum value, and α∈(0,1);

[0055] Sub-sub-step S412, the reinforcement learning algorithm optimizes the network parameters, defines the reward function, and learns the output behavior under different operating conditions through the following formula:

[0056]

[0057] Where p is the performance index of sensor calibration, and δ is the improvement of sensor calibration;

[0058] Sub-sub-step S413, automatically increasing or decreasing the number of network layers and nodes of the neural network model according to the real-time feedback of the correction performance, and executing the adaptive network architecture using the following formula:

[0059]

[0060] Among them, f is the performance feedback, c is the current network complexity, k, β, and f0 are adjustment factors, k∈(0,1), β∈(0,1), f0∈(0,1).

[0061] As a further improvement of the present invention, the data stream processing framework construction in the sub-step S42 includes the following sub-sub-steps:

[0062] Sub-sub-step S421, using an asynchronous data stream processing architecture designed for sensor error data, processing the sensor error data stream in real time through an event-driven mechanism, and performing parallel processing on the error data through the following formula:

[0063]

[0064] Among them, u is the error data flow state of the sensor, c is the adjustment wave speed, γ is the damping coefficient, and f(u,t) is the adjustment function based on environmental changes;

[0065] Sub-sub-step S422, using a GPU-accelerated deep learning model, and using the following formula for error correction inference, applying a compound exponential logarithmic activation function to optimize the error characteristics of the sensor:

[0066]

[0067] Among them, k is the sensitivity parameter of the deep learning model;

[0068] Sub-sub-step S423, performing generalized Fourier transform using the following formula:

[0069]

[0070] Among them, e(x) is the error data of the sensor, and F(k) is the composite representation in the frequency domain.

[0071] As a further improvement of the present invention, the adaptive model fine-tuning in the sub-step S43 includes the following sub-sub-steps:

[0072] Sub-sub-step S431, based on the adaptive selection mechanism, and through real-time feedback data, dynamically adjust the learning rate, number of network layers and activation function of the neural network model through the following formula:

[0073]

[0074] Among them, η0 is the initial learning rate, α and σ are adjustment factors, and e actual (t) and e desired (t) are the actual error and expected error corresponding to the adaptive model at time t, η0∈(0,1), α∈(0,1), σ∈(0,1);

[0075] Sub-sub-step S432: Based on the adaptive selection mechanism, the following formula is used to evaluate the configuration performance of different activation functions:

[0076]

[0077] Among them, f is the activation function, Φ is the network parameter, x is the error data, Outputs the mean value for the activation function.

[0078] As a further improvement of the present invention, the physical quantities in step S1 include: temperature, pressure, humidity, light, and carbon dioxide concentration; and the preprocessing in step S2 includes denoising, filtering, and normalization.

[0079] As a further improvement of the present invention, the historical data in step S3 includes an output value of a sensor and a correct value corresponding to the output value of the sensor.

[0080] Compared with the prior art, the present invention has the following beneficial effects:

[0081] In the present application, by using the trained neural network model for error correction, it is possible to more accurately simulate and correct the nonlinear errors and dynamic changes in the sensor data. The powerful learning ability of the trained neural network model enables the sensor and the detection device including the constant sensor to adapt to the error characteristics under various environmental conditions, thereby improving the accuracy and reliability of the sensor output detection data; at the same time, the present application can also be dynamically adjusted according to the real-time changes in the environment in which the sensor is located, so that it can not only deal with static errors, but also effectively deal with dynamic errors caused by environmental changes. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] Figure 1 It is an overall flow chart of the error correction method of the detection device of the present invention. DETAILED DESCRIPTION

[0083] The present invention is described in detail below in conjunction with the various embodiments shown in the accompanying drawings, but it should be noted that these embodiments are not limitations of the present invention, and any equivalent transformations or substitutions in functions, methods, or structures made by ordinary technicians in the field based on these embodiments are all within the scope of protection of the present invention.

[0084] Ginseng Figure 1 As shown, it shows a specific implementation of an error correction method for a detection device of the present invention (hereinafter referred to as "error correction method").

[0085] In brief, an error correction method for a detection device is used to calibrate the detection device, and in particular to calibrate the detection data output by the sensor in the detection device for detecting an object to be detected, so as to ensure the accuracy and reliability of the detection data output by the sensor and the detection device including the sensor. The detection device has a built-in sensor including a single-chip microcomputer. The error correction method includes the following steps S1 to S4.

[0086] First, execute step S1 to select and configure the sensor according to the physical quantity to be monitored. Then execute step S2 to obtain raw data from the sensor and preprocess the raw data. Then execute step S3 to train the neural network model using historical sensor data to obtain a trained neural network model. Finally, execute step S4 to perform error correction on the real-time data of the detection device based on the trained neural network model to output the correction result of the real-time data. The specific implementation steps and technical solutions contained in the error correction method of the detection device are described as follows. It should be noted that in this application, the technical meaning of the term "model" is uniformly understood as a neural network model unless otherwise specified.

[0087] The error correction method disclosed in this specific embodiment first involves selecting and configuring a detection device. At this stage, it is necessary to select a sensor of the appropriate type and type (or model) according to the physical quantity to be monitored, such as temperature, pressure, humidity, etc. Different sensors have special detection capabilities and ranges for different physical quantities. Selecting the correct sensor type and model is the key and prerequisite for ensuring that the detection data is accurate and reliable. In addition, it is also necessary to select a single-chip microcomputer with sufficient processing power. This single-chip microcomputer needs to be able to process the raw data from the sensor and support the operation of the neural network algorithm. The choice of the single-chip microcomputer depends on its memory size, processing speed, and I / O interface, etc. These characteristics must match the output of the sensor and the computing requirements of the neural network and the neural network model. The configuration of the entire sensor must ensure that the single-chip microcomputer can effectively collect and process sensor data, while running complex neural network models for error correction, so as to achieve the goals of high precision and real-time response in practical applications. Specifically, the aforementioned neural network models include but are not limited to models based on Convolutional Neural Networks (CNN), models based on Feedback Neural Networks (FNN), models based on Recurrent Neural Networks (RNN), or models based on Graph Convolutional Networks (GCN).

[0088] The step of selecting and configuring the sensor in step S1 includes the following sub-steps S11 to S14 .

[0089] Sub-step S11: recommend sensor type and microcontroller type by the following formula:

[0090]

[0091] Among them, s i is the sensor performance index, p i is the weight coefficient of the sensor performance index, w i is the weight adjustment factor of the sensor performance index, p i ∈(0,1),w i Take an integer from 1 to 5; the weight adjustment factor w of the sensor performance index i Take an integer from 1 to 5 to divide the weight of the sensor performance index into five levels, w i 1 means the least favored, w i 5 is the most important value, and the custom weight of the sensor performance indicator can be adjusted by setting different values.

[0092] Sub-step S12: designing a modular sensor interface using the following formula:

[0093]

[0094] Wherein, T(t) is the sensor target interface configuration variable, R(t) is the current sensor interface configuration variable, k is the dynamic response speed coefficient of the sensor target interface, γ is the steady-state error coefficient of the sensor target interface, k∈(0,1), γ∈(0,1); the sensor target interface can be customized in the software interface and form a modular interface to facilitate interface replacement to meet the different detection requirements of different detection scenarios.

[0095] Sub-step S13: dynamically adjust the performance configuration of the single-chip microcomputer by the following formula:

[0096]

[0097] Where, f is the data processing frequency function of the single-chip microcomputer, m is the time quantity of the single-chip microcomputer, P(f,m) is a composite function with f and m as variables, α, β, δ are all performance adjustment parameters of the single-chip microcomputer, α∈(0,1), β∈(0,1), δ∈(0,1);

[0098] Sub-step S14: performing sensor calibration and diagnosis based on the following formula:

[0099]

[0100] Among them, x j is the sensor measurement data, μ j is the expected value of the sensor measurement data, σ j is the standard deviation of the sensor measurement data, θ j is the calibration factor.

[0101] Then, the raw data is collected and preprocessed, and specifically, the raw data can be obtained from the sensor through the data acquisition program. The data acquisition program (not shown) is stored in the single-chip microcomputer. It should be noted that the detection device disclosed in the present application includes a single-chip microcomputer and peripheral circuits (for example, a communication circuit, a power supply voltage stabilization module, an AD circuit, etc.), and the sensor is a sensor system including a single-chip microcomputer. The raw data usually contains various noise data and error data, so it is necessary to optimize the quality of the raw data through a series of preprocessing to ensure that the neural network model can accurately perform error correction and reduce the computational overhead of subsequent error correction processing.

[0102] The first step of preprocessing is denoising and filtering. Denoising and filtering usually involve the use of filters (e.g., low-pass filters, high-pass filters, or band-pass filters) to remove random fluctuations or frequency interference in the original data. Then, normalization is performed to adjust all the original data to a uniform scale, usually between 0 and 1 or -1 and 1, excluding endpoints 0, endpoint -1, and endpoint 1. In this way, the technical problem of poor data convergence performance caused by excessive scale differences of dependent variables during the training process of the neural network model is avoided. Another common data preprocessing method is standardization, which adjusts the distribution of the original data by subtracting the mean and dividing by the standard deviation so that the original data has zero mean and unit variance, which helps the neural network model to learn and understand data patterns more effectively.

[0103] Following data collection and preprocessing, a neural network model is designed and trained to build a neural network model that can accurately perform error correction. First, when designing a neural network model suitable for error correction, it is necessary to consider the structure of the neural network model, such as the number of network layers, the number of neurons in each layer of the network, and the type of activation function. These factors will affect the performance and correction accuracy of the neural network model. Next, the neural network model is trained using the collected and preprocessed historical sensor data. The historical data should contain the actual output value of the sensor and the corresponding correct value so that the neural network model can learn how to reduce or eliminate these errors. Cross-validation is used in the training process, and specifically the data set is divided into multiple groups, one of which is used to train the neural network model, and the other is used to verify the performance of the neural network model to ensure that the neural network model can also perform well on new data or unseen data (i.e., new data), and the aforementioned good performance refers to the good performance of correcting the data detected by the detection device containing the sensor based on the trained neural network model. In addition, the error correction method disclosed in the present application can reduce the overfitting of the neural network model by introducing regularization (such as L1 or L2 regularization) and cross-checking or validation, and prevent the neural network model from being overly dependent on specific samples in the training data, thereby improving the generalization ability and stability of the neural network model in actual operation. These steps together ensure that the neural network model can effectively correct sensor errors in practical applications and improve the overall measurement accuracy and reliability. Cross-validation and regularization techniques are used during the training process to prevent overfitting. Specifically, the data acquisition and preprocessing in step S2 include the following sub-steps.

[0104] Sub-step S21, using the following formula to perform adaptive data collection:

[0105]

[0106] Where p(s) is the real-time sampling parameter, γ is the amplification factor, ω is the function of the real-time sampling parameter p(s), k is the sensitivity factor, θ is the physical quantity threshold, γ>1, k∈(0,1);

[0107] Sub-step S22: performing neural network deep learning based on the following formula to remove noise data from the original data:

[0108]

[0109] Where x is the noise data in the original data, α(x) is the amplification ratio of the noise data, β(x) is a constant, and δ(x) is the phase offset;

[0110] Sub-step S23: performing multi-dimensional data normalization and feature extraction based on the following formula:

[0111]

[0112] Among them, v i is the i-th data dimension, κ i is the normalization factor, μ i is the mean of the i-th data dimension, σ i is the standard deviation of the i-th data dimension.

[0113] Then, step S3 is executed, and the error correction algorithm is introduced. In step S3, the error correction of real-time data is mainly performed using the trained neural network model. The error correction algorithm is divided into three main links: data input, model inference and correction output. First, the data input link involves inputting the sensor data collected in real time into the neural network model. These data should have undergone necessary preprocessing, such as denoising and normalization, to ensure that the quality of the data meets the input requirements of the neural network model. Next, in the neural network model inference link, the neural network model calculates and infers based on the input data and outputs the predicted error correction value. This step is the core of error correction. The neural network predicts and corrects the potential errors of new data by learning the error patterns in historical data, so as to correct the error data. Finally, in the correction output link, the predicted output of the neural network model is applied to the actual data to correct the errors caused by the sensor errors, so as to obtain more accurate measurement results. In addition, according to the correction results output by the neural network model and the feedback of the actual application scenario, the parameters of the neural network model, such as the learning rate of the neural network model and the weight of the sensor performance index, will be dynamically adjusted to optimize the correction effect and adapt to different operating environments.

[0114] In this embodiment, configuring the type and model of the sensor is a key initial step. This process function F(s) is used to recommend the sensor type and microcontroller. The function F(s) is as follows:

[0115]

[0116] Among them, s i For each sensor’s performance indicator, p i and w i are the weight coefficients and adjustment factors of the sensor performance indicators respectively. The setting of the aforementioned weight coefficients and adjustment factors reflects the importance of different performance indicators and their impact on the sensor output.

[0117] For example, a sensor that needs to be configured for an environment with precise temperature and humidity measurements will be particularly concerned with the sensor's response speed, accuracy, and environmental adaptability. Set the following performance indicators, weight coefficients, and adjustment factors: s1 is the response speed, with a range of 0, 1, p1 = 0.5, w1 = 2; s2 is the accuracy, with a range of 0, 1, p2 = 1.0, w2 = 3; s3 is the environmental adaptability, with a range of 0, 1, p3 = 0.8, w3 = 2. Taking the response speed s1 = 0.8, accuracy s2 = 0.9, and environmental adaptability s3 = 0.7 as an example, calculate the function F(s) to determine the most suitable sensor and microcontroller type. Substitute the above-mentioned response speed s1, accuracy s2, and environmental adaptability s3 into the function F(s) for calculation. The specific calculation process is as follows:

[0118]

[0119] The calculated results will recommend the most suitable sensor type based on the combined weight of these indicators. This approach comprehensively considers multiple performance indicators and weights them according to their importance, so that the final device selection can maximize the overall performance and efficiency of the sensor.

[0120] Following the aforementioned sensor selection and configuration, the second step involves designing a modular sensor interface in the error correction method of the detection device. The key to this link is to manage the flexible replacement and upgrade of the sensor interface to adapt to different monitoring needs or environmental changes while maintaining the overall stability and high performance of the sensor.

[0121] The differential equation used is as follows:

[0122] Among them, T(t) is the target interface configuration state, that is, the sensor interface state that you want to achieve; R(t) is the current sensor interface configuration variable, which is the actual monitored state; k and γ are used to adjust the sensor dynamic response speed and steady-state error coefficient respectively.

[0123] The current sensor interface configuration needs to be adjusted from a low response speed to a high response speed, which is very common in high-speed dynamic environment monitoring. Set T(t) as the new interface state, R(t) as the old state, and select k = 0.3 and γ = 0.05 to achieve a smooth and rapid transition.

[0124] Insert the values ​​of k and γ into the following differential equation for calculation. The specific calculation process is as follows:

[0125]

[0126] Set at the initial time t = 0, T(0) = 1 (full response state), R(0) = 0 (no response state). The aforementioned differential equation will help simulate the dynamic changes of the sensor target interface variables and predict the time to reach the target state, so that the upgrade and replacement of the sensor can be effectively managed to ensure that each change is controlled and predictable, thereby minimizing the steady-state error of the sensor and improving the response efficiency. Generally, the performance of a sensor or a detection device including a sensor has certain bottlenecks. Therefore, through the aforementioned technical solution, it is possible to more accurately determine the physical quantity that the sensor or detection device needs to detect, and select the appropriate type of sensor and detection device including the sensor.

[0127] Then, the adaptive configuration technology of the single-chip microcomputer is implemented, and specifically includes dynamically adjusting the operating frequency and power consumption of the single-chip microcomputer according to the data processing requirements, so as to optimize the performance of the single-chip microcomputer and the sensor containing the single-chip microcomputer and reduce energy consumption, which is particularly suitable for real-time monitoring environments with many changes. The dynamic adjustment formula used for the above-mentioned dynamic adjustment of the performance configuration of the single-chip microcomputer is as follows:

[0128]

[0129] Among them, f(t) is the data processing frequency function of the microcontroller, m is the time quantity of the microcontroller, and α, β and δ are parameters used to adjust the performance of the microcontroller. The variable of the data processing frequency function is time t.

[0130] For example, in industrial automation, the MCU needs to process a large amount of data from multiple sensors. In this case, the data processing requirements will change over time, and the configuration of the MCU needs to be flexibly adjusted to adapt to these changes. Set at a specific moment, set f(t) = t (a linear function of time), which means that the processing frequency increases linearly with time, m = 10 seconds, and adjust the parameters α = 0.5, β = 0.3, and δ = 0.1. Inserting these values ​​into the previous formula, the performance adjustment plan of the MCU can be calculated within 10 seconds. The specific calculation process is shown in the following formula:

[0131] The integral result of the above formula shows the overall strategy of dynamically adjusting the MCU operating frequency and power consumption according to the data processing frequency within 10 seconds. Through calculation, the performance of the MCU can be predicted and adjusted to ensure the optimal performance and energy efficiency ratio under different workloads.

[0132] After implementing the adaptive configuration technology of the microcontroller, the final step involves integrating sensor calibration and diagnostic functions. The core of this link is to use high-order correction equations to ensure the accuracy of the sensor output detection data and the reliability of the sensor. The high-order correction equation used is shown below:

[0133]

[0134] Among them, x j is the measured data, μ j and σ j are the expected value and standard deviation of the data, θ j is the calibration coefficient. The aforementioned data and parameters are introduced to ensure that they are suitable for specific sensors and application scenarios. The parameter n in the summation operation is the number of sensors, and usually, one sensor is deployed at one detection location (i.e., test point) to measure a specific physical quantity at a specific location.

[0135] For example, in industrial manufacturing, the vibration of a machine is monitored. The sensor measures the vibration intensity of a part (e.g., the main shaft) during the operation of the machine, and x j Represents the actual vibration data collected from the sensor. There are three different vibration monitoring points, that is, n = 3, and the expected vibration level μ is set for each test point. j are 0.5, 0.3 and 0.4 respectively, and the standard deviation of the measured data σ j They are 0.05, 0.03 and 0.04 respectively. Calibration coefficient θ j Set to 1.2, 1.5 and 1.3 respectively.

[0136] Substitute the aforementioned measured data, expected value, standard deviation and calibration coefficient into the aforementioned high-order correction equation. The specific calculation process is shown below.

[0137]

[0138] The results calculated by the above-mentioned high-order calibration equations will be used to evaluate the deviation between the vibration monitoring data and the expected data including the vibration evaluation index output by the expected neural network model, and apply correction to ensure the accuracy of the monitoring data output by the sensor. This enables the sensor to identify and correct any error data or deviation data in real time, thereby ensuring the quality control and normal operation of the sensor and the detection device containing the sensor during the manufacturing process.

[0139] In this specific implementation, step S3 includes the following sub-steps S31 to S33.

[0140] Sub-step S31: construct a dynamically adjusted neural network model using the following formula:

[0141]

[0142] Among them, n is the number of network layers of the neural network model, d is the data complexity, and σ is the network width of the neural network model;

[0143] Sub-step S32: applying ensemble learning and meta-learning through the following formula:

[0144]

[0145] Where m is the number of neural network models, λ i is the learning rate of the neural network model, L i is the loss function of the neural network model;

[0146] Sub-step S33, performing regularization and cross-validation by the following formula:

[0147]

[0148] Among them, x is the model parameter, α and β are regularization weight coefficients, x∈(-1,1), α∈(0,1), β∈(0,1).

[0149] In this embodiment, data acquisition and preprocessing are crucial steps to ensure the quality and accuracy of input data, thereby improving the correction effect of the overall detection data. Therefore, the error correction method disclosed in this application creatively adopts an adaptive data acquisition algorithm to dynamically adjust the acquisition parameters to optimize data quality. The aforementioned adaptive data acquisition algorithm method is implemented by the following formula:

[0150]

[0151] Among them, p(s) is a real-time sampling parameter, involving real-time readings of sensor data such as temperature, pressure, humidity, etc. Parameters γ, ω, k, and θ are coefficients that are dynamically adjusted according to environmental feedback to adapt to different monitoring environments and conditions.

[0152] For example, when setting the need to deploy sensors and detection devices containing sensors in a chemical plant, monitor the temperature and pressure of specific equipment to ensure that it operates under safe environmental conditions. The real-time sampling parameter p(s) is set as follows: the temperature reading range is 20°C to 50°C; the pressure reading range is 100kPa to 500kPa; the value of the selected adjustment parameter is set to: γ = 1.5, by introducing a factor to enhance the response speed of the sampled data; ω(p) = 2p, adjust the weight according to the sensor data; k = 0.1, k is the sensitivity factor of the control function; θ = 30°C or θ = 200kPa, which are the thresholds of the temperature and pressure to be measured, respectively. 30°C and 200kPa are both physical quantity thresholds, and are determined according to the type of physical quantity that the sensor needs to detect. This embodiment exemplarily shows two physical quantity thresholds. It can be understood that one or three or more physical quantities can also be selected, and the same or different physical quantity thresholds can be set.

[0153] Assume that at a certain moment, the temperature reading p(s) is stable at 40°C. To calculate the data collection adjustment S(p,1 hour ), where 1 hour is equal to 3600 seconds, the calculation process of the above-mentioned adaptive data collection is shown as the following integral:

[0154]

[0155] By calculating the above integral equation, the total amount of adjustment of data acquisition parameters according to temperature changes within one hour can be obtained. This not only helps to accurately control the data quality, but also helps to optimize the subsequent error correction processing of the detection data.

[0156] Following the aforementioned sub-step S21 of adaptive data collection, sub-step S22 is then executed, and neural network deep learning is specifically performed to remove noise data from the original data to improve the quality and accuracy of the sensor data. The specific formula is as follows:

[0157]

[0158] Among them, x is the original data with noise data collected from the sensor, α(x) is the amplification ratio of the noise data, and δ(x) is the phase offset. δ(x) is a nonlinear function obtained by dynamic learning of the neural network, which is used to extract useful signals from the noise data under various environmental conditions, so as to accurately extract the real sensor data formed by the physical quantity to be tested.

[0159] For example, in an industrial monitoring system, the sensor data (i.e., detection data) collected by the sensor is affected by the vibration and electromagnetic interference caused by the operation of the equipment. The challenge here is to accurately extract the machine's operating status signal from these noise data. Set the range of the noise data x between -10 and 10. According to the actual situation, set the specific value range of the adjustment coefficient as follows: α(x) = 0.8x, the amplification ratio of the noise data, used to enhance the characteristics of the noise data. β(x) = 2 and is a constant, used to control the frequency of the sine function. δ(x) = 0.5x, the phase offset of the sine function, used to separate the noise data and the real signal. By substituting α(x), β(x) and δ(x) into the above formula for calculation, the specific calculation process is as follows:

[0160]

[0161] The calculation results of the above integral equation will reflect how to extract useful signals from the noise background. By introducing denoising technology, the accuracy of the final corrected and output detection data is significantly improved, which is particularly suitable for occasions where the environmental noise data changes greatly, such as industrial production lines or external environment monitoring.

[0162] Then, sub-step S23 is executed to perform multi-dimensional data normalization and feature extraction based on the following formula. Sub-step S23 aims to extract useful information from the sensor data while ensuring that the data is in an appropriate format and scale before being input into the neural network model. The formula used in sub-step S23 is as follows:

[0163]

[0164] Among them, v i is the i-th data dimension. For example, in environmental monitoring, the aforementioned multiple data dimensions may be data dimensions corresponding to physical indicators such as temperature, humidity, and air pressure; i is the normalization factor, μ i and σ i are the mean and standard deviation of the i-th data dimension respectively. Normalization factor κ i Different data dimensions are given different weights to reflect their importance in error correction.

[0165] For example, in a smart manufacturing factory, the detection device is needed to monitor the temperature, vibration and sound level of the equipment to predict equipment failure. The specific statistical information of the temperature, vibration and sound data is set as follows: temperature v1, mean μ1 = 20 ° C, standard deviation σ1 = 2 ° C; vibration v2, mean μ2 = 50 Hz, standard deviation σ2 = 5 Hz; sound v3, mean μ3 = 70 dB, standard deviation σ3 = 10 dB.

[0166] In order to reflect the different importance of these indicators in fault prediction, the normalization factor κ1=1.0 (used to characterize the temperature indicator), the normalization factor κ2=0.8 (used to characterize the vibration indicator), and the normalization factor κ3=0.5 (used to characterize the sound indicator) are set. Substituting the normalization factor, the mean and standard deviation of the i-th data dimension into the above formula, the normalization value N(v) can be calculated, thereby realizing multi-dimensional data normalization and feature extraction. The specific calculation process is shown below.

[0167]

[0168] For example, if at a certain moment, the actual temperature of the equipment is v1 = 22°C, the vibration is v2 = 55Hz, and the sound is v3 = 75dB, substituting these values ​​into the calculation of N(v) can help understand the contribution of various monitoring indicators to the equipment status assessment under these actual conditions.

[0169] In this embodiment, it is crucial to construct a neural network model, and first of all, it is necessary to design and implement a dynamically adjusted neural network model, dynamically adjust the structure of the network according to the complexity of the input data, so as to optimize the learning efficiency and generalization ability of the neural network model.

[0170] The formula used in sub-step S31 is as follows:

[0171] Where n is the number of network layers of the neural network model, d is the data complexity, and σ is the network width of the neural network model. The above formula is used to dynamically adjust the network depth of the neural network model to better process data of different complexities.

[0172] Specifically, we are processing sensor data from a complex industrial system, which involves multiple parameters, such as temperature parameters, pressure parameters, and vibration parameters. The data complexity d can be specifically quantified as 0.8, and the value range of data complexity d is 0-1, and does not contain endpoint values; where data complexity d tends to 1, indicating that the data has extremely high complexity, and data complexity d tends to 0, indicating that the data has extremely low complexity). The network width σ of the neural network model is selected as 0.5 to ensure that the network structure of the neural network model is flexible while avoiding overfitting.

[0173] The initial exploration range of the number of network layers n is set from 1 to 10. Applying the above formula to calculate the architecture fitness A(n,d) corresponding to different network layers n can help determine the optimal number of network layers to cope with the input data complexity d. For example, the fitness formula for calculating n=5 is as follows:

[0174]

[0175] Through calculation, the fitness value of each network layer can be obtained, so as to select the most optimized network structure to ensure that the neural network model can process highly complex data without wasting computing resources or reducing training efficiency due to too many network layers. The above architecture is the architecture of the neural network model.

[0176] After designing a dynamically adjusted neural network model, the second step is to apply ensemble learning and meta-learning techniques, which aim to improve the generalization ability and learning efficiency of the neural network model. Ensemble learning improves the accuracy and robustness of predictions by combining multiple neural network models, while meta-learning focuses on accelerating the learning process so that the neural network model can quickly adapt to new tasks. The specific formula is as follows:

[0177]

[0178] Where m is the number of models, λ i is the learning rate of each neural network model, L i is the loss function of each neural network model. The purpose of this formula is to effectively integrate the advantages of each neural network model by adjusting the learning rate of each neural network model, so as to achieve better overall performance.

[0179] For example, in the quality monitoring system of an automobile manufacturing line, it is necessary to monitor multiple key parameters on the assembly line, such as screw tightening force, component alignment accuracy, etc. The monitoring of these parameters relies on multiple sensors, each of which has its own independent data characteristics and error patterns. It is assumed that five small neural network models (m=5) are designed, each of which handles a specific monitoring task.

[0180] Set the learning rate λ i The range is between 0.01 and 0.05. The loss function L of each neural network model in the initial training stage is i The values ​​are 0.2, 0.15, 0.18, 0.16 and 0.14. The loss function L of the neural network model i The value reflects the initial efficiency of each neural network model in processing its corresponding task. i With L i Insert it into the above formula to calculate the performance of the integrated neural network model. The specific calculation process is as follows:

[0181] E(5,λ)=log(e 0.01·0.2 +e 0.02·0.15 +e 0.03·0.18 +e 0.04·0.16 +e 0.05·0.14 ).

[0182] The calculated results will reflect the performance of the entire ensemble neural network model and guide how to optimize the learning rate to achieve the best overall performance. In this way, each neural network model can quickly learn and adapt in its own area of ​​expertise, while the ensemble learning strategy ensures the optimization of the overall performance.

[0183] The final stage is to implement advanced regularization and cross-validation techniques, which aim to improve the generalization ability of the neural network model and prevent overfitting, which is key to ensuring the reliability and accuracy of the neural network model in practical applications. The regularization formula used is as follows:

[0184]

[0185] Among them, x is the model parameter, α and β are regularization weight coefficients, which are used to balance the complexity of the neural network model and prevent overfitting, while helping the neural network model to better handle nonlinear problems.

[0186] A neural network model is being developed to predict industrial machine failures. The neural network model needs to process complex data from multiple sensors, including temperature, pressure, vibration, etc. In order to ensure that the neural network model does not only fit the noise data in the training data, but also generalizes to new data that has not been seen, the regularization weight coefficients are selected as follows: α = 0.05 and β = 0.03.

[0187] Setting the specific range of the model parameter x, such as parameter values ​​from -1 to 1, can simulate the actual operation situation. By calculating the regularization term:

[0188] 1. Calculate ∫x 2 dx, within a given range, this integral is equal to

[0189] 2. Calculation Using the result of Gaussian integral, the integral is approximated by

[0190] Substituting these values ​​into the regularization formula, we obtain

[0191] The above calculation results provide a quantitative evaluation of the regularization of the neural network model, helping to understand how regularization affects the complexity and performance of the neural network model. The above technical solution not only helps the neural network model to prevent overfitting, but also enhances the explanatory power and predictive ability of the neural network model by adjusting the processing of nonlinear terms.

[0192] Optimizing the weights and structure of the network includes the following sub-steps S411 to 413.

[0193] Sub-step S411: Analyze the error data of the sensor in real time, adjust the number of network layers and nodes of the neural network model according to the error data, and use the following formula to perform correction of the error data in a dynamic environment:

[0194]

[0195] Among them, d is the network depth, v is the rate of environmental change, e is the environmental state, t is time, τ is the time constant, α is the adjustment coefficient, and e c is the critical value of the environmental state, t = ten minutes, τ is the time required for the environmental state data to decay from the maximum value to 1 / e of the maximum value, α∈(0,1); wherein the environmental state data includes physical quantities such as environmental temperature and environmental vibration. The sensor detects the aforementioned environmental state data to output and form detection data. τ is a constant.

[0196] Sub-sub-step S412, the reinforcement learning algorithm optimizes the network parameters, defines the reward function, and learns the output behavior under different operating conditions through the following formula:

[0197]

[0198] Where p is the performance index of sensor calibration, and δ is the improvement of sensor calibration;

[0199] Sub-sub-step S413, automatically increasing or decreasing the number of network layers and nodes of the neural network model according to the real-time feedback of the correction performance, and executing the adaptive network architecture using the following formula:

[0200]

[0201] Among them, f is the performance feedback, c is the current network complexity, k, β, and f0 are adjustment factors, k∈(0,1), β∈(0,1), f0∈(0,1).

[0202] In this embodiment, the application of dynamic learning algorithms based on feedback and dynamic adjustment strategies for environmental perception is the core component, combined with reinforcement learning and real-time data analysis, so that the sensor can adapt to different environmental conditions and usage scenarios. In this way, the parameters, weights and structures of the neural network are dynamically adjusted according to the real-time monitored environmental data to optimize the error correction efficiency and accuracy.

[0203] For example, in an application scenario deployed in an industrial automation environment, the MCU needs to monitor and correct sensor data from the production line in real time, including temperature, humidity, and vibration. Given a specific monitoring period (e.g., ten minutes or a day), the temperature (e) detected by the sensor changes greatly due to machine operation, and the structure and parameters of the neural network need to be dynamically adjusted to adapt to this environment.

[0204] Referring to the above sub-step S411, the initial depth of the neural network is set to d = 5 layers, the environmental change rate v = 1.2 (the environmental change rate v is a standardized value, indicating the speed of environmental state change), the current environmental state e = 35 ° C (that is, the environmental state data is the ambient temperature), the time constant τ = 600 seconds, the adjustment coefficient α = 0.1, and the critical value of the environmental state e c =30℃.

[0205] Substitute these values ​​into the formula and perform the calculation. The specific calculation process is as follows:

[0206]

[0207] This calculation will provide a quantified adjustment value indicating how to adjust the structure and parameters of the neural network in response to the current environmental changes.

[0208] The reinforcement learning algorithm is used to refine and optimize the network parameters, define the reward function, and learn the behavior of the output under different operating conditions through the following formula. This step is implemented by defining a reward function that not only depends on the corrected performance indicator, but also dynamically adjusts based on the improvement amount. The defined reward function is shown in the following formula:

[0209]

[0210] Among them, p represents the performance index of the correction, and δ represents the improvement of the correction. The reward function is introduced to reward those network behaviors that can effectively correct errors under various operating conditions, while punishing those network behaviors that are not effective or have no obvious improvement. The so-called output behavior mentioned above refers to the behavior of the sensor outputting sensor data (i.e., the corrected detection data) under different operating conditions.

[0211] In a certain test, after the detection device was initially adjusted, the performance index p of the sensor correction increased from 1.0 to 1.5, indicating that the sensor correction effect has improved, and the improvement of sensor correction is δ 0.5. These specific values ​​can be substituted to calculate the reward function to verify the effectiveness of this reinforcement learning method.

[0212] The calculation steps and results are as follows: Substitute p = 1.5 and δ = 0.5 into the following reward function formula, and the specific calculation process is as follows: Calculate 1.5×0.5 in the numerator 2 = 0.375. Calculate log(1+0.5)≈0.4055 in the denominator. Calculate the first part of the reward function as: For points Its value is about 0.4936. Combining these values, we get: R(1.5,0.5)=0.925+0.4936≈1.4186. The results of the above reward function calculations show that in the specific improvement scenario, the reinforcement learning algorithm gives a reward value of 1.4186, which reflects that there is a positive reward for this level of improvement, and the incentive model continues to optimize in this direction.

[0213] The last step involves the use of adaptive network architecture technology and allows the structure of the neural network to be dynamically adjusted based on real-time feedback of the correction performance, that is, the number of layers and nodes of the network is automatically increased or decreased. Doing so ensures that the network structure always keeps pace with the complexity and changes of the processing tasks, thereby optimizing performance and reducing resource consumption. The formula used in this process is as follows:

[0214]

[0215] Among them, f is the performance feedback, c is the complexity of the current network, and k, β, f0 are all adjustment factors used to adjust the responsiveness of the network; specifically, k∈(0,1), β∈(0,1), f0∈(0,1).

[0216] For example, this method is used in an intelligent transportation system to optimize a neural network for monitoring traffic flow (i.e., a lower concept of physical quantity). The current network complexity c is set to 100 (i.e., the baseline network size), and the score obtained from the measurement of performance feedback f is 0.8. The aforementioned score reflects the prediction accuracy of the current neural network model for traffic flow or other performance indicators. Specifically, in this embodiment, the adjustment factor k = 0.5, β = 0.1, and f0 = 0.5.

[0217] Based on these parameters, the proportion of network structure adjustment can be calculated. The specific calculation process is shown below.

[0218] calculate Set tan(1.6)≈5.67. Calculate exp(-β(f-f0))=exp(-0.1(0.8-0.5)), that is, exp(-0.03)≈0.97. Inserting these values ​​into the above formula introduced by the above adaptive network architecture technology, the specific calculation process is as follows:

[0219]

[0220] N(f,c)≈338.58 indicates that based on the performance feedback f and the current network complexity, the current network size needs to be increased to approximately 3.39 times the original size to optimize the performance. Therefore, the adaptive adjustment disclosed in the present application enables the network to more effectively handle current task requirements, for example, enhancing the accuracy of traffic flow prediction while reducing unnecessary computational overhead and resource consumption.

[0221] In this embodiment, designing a data stream processing framework is a crucial step, which aims to use GPU-accelerated deep learning models for inference and realize the processing of real-time data under low latency conditions, ensuring seamless processing of data from input to corrected output. Sub-step S42 includes sub-sub-steps S421 to S423.

[0222] First, execute sub-substep S421. Design an asynchronous data stream processing architecture for the sensor's error data. This architecture uses an event-driven mechanism to instantly process the sensor's error data stream. This design allows the sensor to respond quickly when receiving new data without waiting for the entire data batch to be processed, thereby significantly improving processing efficiency and reducing response time, and specifically describing and processing the data stream through a high-order partial differential equation:

[0223] In the above-mentioned high-order partial differential equation, u is the error data flow state of the sensor, c is the parameter for adjusting the wave speed, c is the data propagation speed (unit: m / s), γ is the damping coefficient and is used to control the smoothing of the data flow, and f(u,t) is the adjustment function based on environmental changes. The adjustment function based on environmental changes can dynamically adjust the data processing method according to the real-time environment or sensor status.

[0224] For example, in industrial automation, sensors monitor the performance and accuracy of devices in real time. The sensor data stream on the production line needs to be corrected in real time to ensure product quality. You can set c = 2.0 m / s as the data propagation speed, γ = 0.1 s / s, and γ as the damping coefficient to ensure the stability of data processing.

[0225] Then, sub-step S422 is executed. If these parameters are substituted into the above-mentioned high-order partial differential equation, and f(u, t) is set as a function dynamically adjusted according to the current error of the sensor, the sensor error can be predicted and corrected by simulating this equation in real time. In this way, it is not only possible to respond quickly to environmental changes, but also to process large-scale data through GPU acceleration, ensuring low latency and high efficiency.

[0226] Then, the GPU-accelerated deep learning model is used for error correction, especially by applying the compound exponential logarithmic activation function, which can effectively enhance the ability of the neural network model to handle nonlinear data. The compound exponential logarithmic activation function is defined as: Among them, k is the key neural network model sensitivity parameter. The key neural network model sensitivity parameter k allows the neural network model to adjust itself according to the dynamic range of the input data and optimize the error characteristics of the sensor. This activation function is designed to increase the sensitivity of the neural network model to small changes in the input data, thereby improving the correction accuracy of the sensor data. GPU acceleration uses mature existing technologies, which will not be elaborated here.

[0227] We are processing data from industrial sensors that monitor the vibration frequency of a machine. The detection data corresponding to the vibration frequency contains noise data caused by machine wear or external interference. To ensure the accuracy of error correction, we can select the value of k to adjust the response sensitivity of the activation function. We set k = 0.5 as the initial test value.

[0228] It is further assumed that in a specific measurement period, the sensor outputs data from x = -1.0 to x = 1.0. The corrected output value can be calculated by substituting these values ​​into the activation function formula:

[0229]

[0230] By calculating these corrected output values, specific corrected outputs can be obtained, which will be used to adjust the machine status or trigger maintenance procedures. The use of GPU acceleration ensures that these calculations can be completed in almost real time, especially in high data throughput environments, ensuring efficient operation of sensors and continuous stability of machines.

[0231] Finally, perform sub-substep S423: perform generalized Fourier transform and implement continuous flow error preprocessing and inference pipeline. The above process can improve the efficiency of data processing and optimize the accuracy of error correction by combining generalized Fourier transform.

[0232] The formula for the generalized Fourier transform is as follows:

[0233] Among them, e(x) is the error data of the sensor, and F(k) is the composite representation in the frequency domain.

[0234] The purpose and function of performing a generalized Fourier transform in this application is to represent error data in the frequency domain, thereby utilizing the processing advantages of the frequency domain to optimize the entire data processing process. For example, monitoring the accuracy of a robotic arm in an automated production line. Assuming that the error data e(x) captured by the sensor is mainly caused by mechanical vibration, the error data e(x) can be simulated as a signal containing high-frequency and low-frequency components. In order to process this data (ie, the error data e(x)), k=1 is selected as a parameter in the generalized Fourier transform. By applying the generalized Fourier transform, the error data is analyzed in the frequency domain and converted into a form that is easier to process and analyze. Specifically, the calculation process for obtaining the error representation in the frequency domain by calculating F(1) is as follows:

[0235] Among them, e -2πix The part helps capture periodic changes in the error data, while The generalized Fourier transform not only speeds up the processing of error data, but also improves the accuracy and robustness of the correction algorithm through frequency domain analysis.

[0236] Sub-step S43 includes sub-sub-step S431 and sub-sub-step S432.

[0237] In this embodiment, the use of adaptive model fine-tuning technology is a key step, and the learning rate, number of layers and activation function of the neural network model can be dynamically adjusted according to the feedback of the actual application scenario, thereby ensuring the minimum difference between the output of the neural network model and the expected output. The adaptive model fine-tuning technology mainly improves the adaptability and accuracy of the neural network model through the performance of the real-time neural network model and adjusts it according to performance feedback. The adaptive model adjustment framework AMAF uses real-time feedback data to dynamically adjust the parameters of the neural network, especially the learning rate, number of network layers and activation function.

[0238] The above adjustment is achieved through a custom learning rate adjustment formula:

[0239]

[0240] Among them, η0 is the initial learning rate, α and σ are adjustment factors, and e actual (t) and e desired(t) are the actual error and expected error of the adaptive model at time t. Therefore, by introducing and executing the above formula, the learning rate can be adjusted according to the size and duration of the error, in order to quickly reduce the error and optimize the performance of the neural network model.

[0241] For example, consider the error correction for a temperature sensor, where the sensor is often affected by external ambient temperature fluctuations. Set the initial learning rate η0 = 0.01, the adjustment factors α = 0.05 and σ = 0.1. If the average difference between the actual error and the expected error of the neural network model is 0.02 during one day of monitoring (set T = 24 hours), the adjustment of the learning rate can be expressed by the following calculation:

[0242]

[0243] This means that according to the accumulation of errors, the learning rate is adjusted from the initial value of 0.01 to about 0.00787 to promote the neural network model to adapt to environmental changes faster and reduce errors. This method enables the neural network model to self-correct more effectively, ensuring high accuracy and stability of sensor output.

[0244] Then, an adaptive selection mechanism for the level and activation function (ie, LAAF mechanism) is implemented. By introducing an adaptive selection mechanism, the present application can dynamically adjust the network level and activation function according to the characteristics and distribution of the error data, ensuring the optimization of the network configuration to achieve the best correction effect.

[0245] The LAAF mechanism uses a specific metric formula to evaluate the effectiveness of different activation function configurations. The formula is as follows:

[0246] Among them, f is the activation function in the network, Φ is the network parameter, x is the input error data, and is the average value of the activation function output. Through this metric, the adaptability and effect of different activation functions on error data processing can be evaluated.

[0247] Consider that the sensor data is affected by periodic interference. In order to determine the most suitable activation function configuration, first set a set of parameters Φ and process the error data x. Suppose that within a specific measurement period, there is a series of error data x1, x2, …, x n (Note: discrete data points), each error data is processed by the activation function tanh(f(x; Φ)) to generate the output f(x i ; Φ). Then, calculate the average value of these output error data The value of D(f,Φ) is calculated using the above formula. The parameters are set as follows: the activation function f is tanh(f(x;Φ)), the network parameter Φ is randomly initialized, and the error data x is the actual error data collected from the sensor.

[0248] The D(f,Φ) value obtained by integral calculation will reflect the adaptability of the current activation function configuration to error correction. If the D(f,Φ) value is high, it indicates that the current configuration of the activation function does not match the characteristics of the error data and needs to be adjusted. Conversely, if the D(f,Φ) value is low, it indicates that the activation function is well matched to the error data and therefore does not need to be adjusted.

[0249] In summary, through the error correction method disclosed in the specific implementation mode of the present application, the sensor and the detection device including the constant sensor can adapt to the error characteristics under various environmental conditions, thereby improving the accuracy and reliability of the detection data output by the sensor, and can also be dynamically adjusted according to the real-time changes of the environment in which the sensor is located. In this way, not only can static errors be dealt with and eliminated, but also dynamic errors caused by environmental changes can be effectively handled, thereby ultimately improving the accuracy and reliability of the sensor and the detection device including the sensor in detecting various physical quantities.

[0250] The series of detailed descriptions listed above are only specific descriptions of feasible implementation methods of the present invention. They are not intended to limit the scope of protection of the present invention. Any equivalent implementation methods or changes that do not deviate from the technical spirit of the present invention should be included in the scope of protection of the present invention.

[0251] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.

[0252] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.

Claims

1. An error correction method for a detection device, wherein the detection device has a built-in sensor including a single-chip microcomputer, characterized in that: The error correction method comprises: S1. Select and configure sensors according to the physical quantity to be monitored; S2. Acquire raw data from the sensor and preprocess the raw data; S3, using historical sensor data to train a neural network model to obtain a trained neural network model; S4. Perform error correction on the real-time data of the detection device based on the trained neural network model to output the correction result of the real-time data.

2. The error correction method according to claim 1, characterized in that: The step S1 of selecting and configuring the sensor includes the following sub-steps: Sub-step S11: recommend sensor type and microcontroller type by the following formula: Among them, s i is the sensor performance index, p i is the weight coefficient of the sensor performance index, w i is the weight adjustment factor of the sensor performance index, p i ∈(0,1),w i Take an integer from 1 to 5; Sub-step S12: designing a modular sensor interface using the following formula: Wherein, T(t) is the sensor target interface configuration variable, R(t) is the current sensor interface configuration variable, k is the sensor target interface dynamic response speed coefficient, γ is the sensor target interface steady-state error coefficient, k∈(0,1), γ∈(0,1); Sub-step S13: dynamically adjust the performance configuration of the single-chip microcomputer by the following formula: Wherein, f is the data processing frequency function of the single chip microcomputer, m is the time quantity of the single chip microcomputer, P(f,m) is a composite function with f and m as variables, α, β, δ are all performance adjustment parameters of the single chip microcomputer, and the α∈(0,1), the β∈(0,1), and the δ∈(0,1); Sub-step S14: performing sensor calibration and diagnosis based on the following formula: Among them, x j is the sensor measurement data, μ j is the expected value of the sensor measurement data, σ j is the standard deviation of the sensor measurement data, θ j is the calibration factor.

3. The error correction method according to claim 1, characterized in that: The data collection and preprocessing in step S2 includes the following sub-steps: Sub-step S21, using the following formula to perform adaptive data collection: Where p(s) is the real-time sampling parameter, γ is the amplification factor, ω is the function of the real-time sampling parameter p(s), k is the sensitivity factor, θ is the physical quantity threshold, γ>1, k∈(0,1); Sub-step S22: performing neural network deep learning based on the following formula to remove noise data from the original data: Among them, x is the noise data in the original data, α(x) is the amplification ratio of the noise data, β(x) is a constant, and δ(x) is the phase offset; Sub-step S23: performing multi-dimensional data normalization and feature extraction based on the following formula: Among them, v i is the i-th data dimension, κ i is the normalization factor, μ i is the mean of the i-th data dimension, σ i is the standard deviation of the i-th data dimension.

4. The error correction method according to claim 1, characterized in that: The step S3 comprises the following sub-steps: Sub-step S31: construct a dynamically adjusted neural network model using the following formula: Among them, n is the number of network layers of the neural network model, d is the data complexity, and σ is the network width of the neural network model; Sub-step S32: applying ensemble learning and meta-learning through the following formula: Where m is the number of neural network models, λ i is the learning rate of the neural network model, L i is the loss function of the neural network model; Sub-step S33, performing regularization and cross-validation by the following formula: Among them, x is the model parameter, α and β are regularization weight coefficients, x∈(-1,1), α∈(0,1), β∈(0,1).

5. The error correction method according to claim 1, characterized in that: The error correction algorithm in step S4 includes the following sub-steps: Sub-step S41, a dynamic learning algorithm based on feedback, dynamically adjusting the parameters of the neural network through a reward and penalty mechanism; Sub-step S42: designing a data stream processing framework and using a GPU-accelerated deep learning model for inference; Sub-step S43, using adaptive model fine-tuning, dynamically adjusting the model's learning rate, number of network layers and activation function according to feedback from actual application scenarios, monitoring the difference between the actual output and expected output of the neural network model, so as to correct the neural network model.

6. The error correction method according to claim 5, characterized in that: The weight and structure of the optimized network in the sub-step S41 includes the following sub-steps: Sub-step S411: Analyze the error data of the sensor in real time, adjust the number of network layers and nodes of the neural network model according to the error data, and use the following formula to perform correction of the error data in a dynamic environment: Among them, d is the network depth, v is the rate of environmental change, e is the environmental state, t is time, τ is the time constant, α is the adjustment coefficient, and e c is the critical value of the environmental state, τ is the time required for the environmental state data to decay from the maximum value to 1 / e of the maximum value, and α∈(0,1); Sub-sub-step S412, the reinforcement learning algorithm optimizes the network parameters, defines the reward function, and learns the output behavior under different operating conditions through the following formula: Where p is the performance index of sensor calibration, and δ is the improvement of sensor calibration; Sub-sub-step S413, automatically increasing or decreasing the number of network layers and nodes of the neural network model according to the real-time feedback of the correction performance, and executing the adaptive network architecture using the following formula: Among them, f is the performance feedback, c is the current network complexity, k, β, and f0 are adjustment factors, k∈(0,1), β∈(0,1), f0∈(0,1).

7. The error correction method according to claim 5, characterized in that: The data stream processing framework construction in the sub-step S42 includes the following sub-sub-steps: Sub-sub-step S421, using an asynchronous data stream processing architecture designed for sensor error data, processing the sensor error data stream in real time through an event-driven mechanism, and performing parallel processing on the error data through the following formula: Among them, u is the error data flow state of the sensor, c is the adjustment wave speed, γ is the damping coefficient, and f(u,t) is the adjustment function based on environmental changes; Sub-sub-step S422, using a GPU-accelerated deep learning model, and using the following formula for error correction inference, applying a compound exponential logarithmic activation function to optimize the error characteristics of the sensor: Among them, k is the sensitivity parameter of the deep learning model; Sub-sub-step S423, performing generalized Fourier transform using the following formula: Among them, e(x) is the error data of the sensor, and F(k) is the composite representation in the frequency domain.

8. The error correction method according to claim 5, characterized in that: The adaptive model fine-tuning in sub-step S43 includes the following sub-sub-steps: Sub-sub-step S431, based on the adaptive selection mechanism, and through real-time feedback data, dynamically adjust the learning rate, number of network layers and activation function of the neural network model through the following formula: Among them, η0 is the initial learning rate, α and σ are adjustment factors, and e actual (t) and e desired (t) are the actual error and expected error corresponding to the adaptive model at time t, η0∈(0,1), α∈(0,1), σ∈(0,1); Sub-sub-step S432: Based on the adaptive selection mechanism, the following formula is used to evaluate the configuration performance of different activation functions: Among them, f is the activation function, Φ is the network parameter, x is the error data, Outputs the mean value for the activation function.

9. The error correction method according to claim 1, characterized in that: The physical quantities in step S1 include: temperature, pressure, humidity, light, and carbon dioxide concentration; the preprocessing in step S2 includes denoising, filtering, and normalization.

10. The error correction method according to claim 1, characterized in that: The historical data in step S3 includes an output value of a sensor and a correct value corresponding to the output value of the sensor.

Citation Information

Patent Citations

  • Incremental training of machine learning tools

    WO2020167490A1

Cited By

  • Data correction method of temperature, pressure, flow and humidity integrated monitor

    CN119901326A

  • Data calibration method for a temperature, pressure, flow rate and humidity integrated monitor

    CN119901326B

  • Wearable device data stable calibration method

    CN120063361A

  • Automatic test equipment error calibration method and device, terminal equipment and storage medium

    CN120067831A

  • Equipment operation data acquisition and processing system based on intelligent sensor

    CN120123651A