Error correction method for detection device

By using a neural network model and an adaptive mechanism to correct the error of the detection device, the problem of insufficient accuracy and reliability of existing error correction methods in complex environments is solved, and efficient and low-cost error correction is achieved.

CN119413220BActive Publication Date: 2025-10-31WUXI PROFESSIONAL COLLEGE OF SCI & TECH
View PDF 1 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing error correction methods for detection devices are insufficient in accuracy and reliability when faced with complex nonlinear errors, large-scale temperature changes, and dynamic changes. They also suffer from high hardware costs, high energy consumption, and poor robustness in processing noisy data.

Method used

Error correction is performed using a neural network model. By selecting appropriate sensors and microcontrollers, configuring modular interfaces, performing data preprocessing and deep learning, dynamically adjusting the parameters of the neural network model, and utilizing GPU acceleration and adaptive mechanisms for real-time error correction.

Benefits of technology

It improves the accuracy and reliability of detection data, can adapt to error characteristics under various environmental conditions, reduces hardware costs and energy consumption, reduces human error, and adapts to application scenarios that require rapid deployment and frequent adjustments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119413220B_ABST
    Figure CN119413220B_ABST
Patent Text Reader

Abstract

This invention provides an error correction method for a detection device, comprising: selecting and configuring sensors according to the physical quantities to be monitored; acquiring raw data from the sensors and preprocessing the raw data; training a neural network model using historical sensor data 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 the correction result of the real-time data. In this application, by utilizing a neural network model for error correction, the nonlinear errors and dynamic changes in the real-time data output by the sensors are more accurately simulated and corrected, achieving adaptability to error characteristics under various environmental conditions. This improves the accuracy and reliability of the detection data output by the sensor-containing detection device and ensures it is compatible with practical application scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of error correction technology for electronic devices, and more particularly to an error correction method for a detection device. Background Technology

[0002] The sensor is a detection unit containing a microcontroller. Electronic devices containing a sensor with a microcontroller (i.e., the detection device in this application) require error correction due to initial errors and drift caused by factors such as manufacturing tolerances, temperature changes, aging over time, and power fluctuations. While current methods for sensor error correction have played a crucial role in many practical applications, they still have a series of shortcomings and drawbacks. To detect environmental data, the detection device typically also needs to include components such as interfaces and power supplies.

[0003] First, traditional error correction methods typically rely on pre-defined mathematical models or empirical formulas, which are often based on idealized or overly simplified assumptions. For example, these methods may perform well when dealing with linear or small-range errors, but their accuracy and reliability often drop significantly when faced with complex nonlinear errors, large-scale temperature variations, or dynamic changes under different operating conditions. This is because traditional methods lack the flexibility and adaptability to change in the environment 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 lengthy preliminary testing. This not only increases the time and cost of development and debugging but may also lead to calibration failures due to changes in environmental or operating conditions during practical applications. For example, if there are significant differences between the deployment environment and the testing environment, traditional calibration methods for sensors or detection devices containing sensors may fail to provide accurate calibration results, leading to sensor performance degradation or even sensor and entire detection device failure. Furthermore, many existing calibration techniques require manual adjustment of parameters such as gain, bias, and other calibration coefficients during implementation. Manual parameter adjustment not only requires specialized technical knowledge but also often relies on expert judgment. This reliance makes the calibration process lack universality and repeatability, increasing the risk of human error.

[0005] Meanwhile, manual calibration of sensors or sensor-containing detection devices is typically iterative and time-consuming, which is particularly disadvantageous in applications requiring rapid deployment or frequent adjustments. Furthermore, many calibration methods have high hardware requirements, necessitating additional calibration chips or dedicated processors to implement complex calibration algorithms. This not only increases hardware costs but also raises the energy consumption of the detection device. In resource-constrained applications, such as portable detection devices or remote monitoring systems, where the device cannot be powered by mains electricity and relies on an internal battery, this increased hardware burden can lead to a reduced lifespan and increased maintenance difficulties. Therefore, traditional manual calibration significantly depletes the battery power of the detection device, impacting its lifespan and battery life.

[0006] Furthermore, existing calibration methods for sensor-integrated detection devices suffer from insufficient robustness when handling noisy and interference data. In practical applications, sensors and sensor-integrated detection devices may be affected by various noise and interference data, such as electromagnetic interference and mechanical vibration. Traditional error correction methods for detection devices often struggle to effectively distinguish between real detection data and noise data generated by actual sensor signals. This may result in the error-corrected detection data still containing unpredictable error components, or even erroneous detection data, significantly impacting subsequent decision-making and the accuracy of detection device control.

[0007] In view of this, it is necessary to improve the error correction methods of existing detection devices in order to solve the above problems. Summary of the Invention

[0008] The purpose of this 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, so as to conform to the actual application scenario.

[0009] To achieve the above objectives, the present invention provides an error correction method for a detection device, wherein the detection device has a built-in sensor containing a microcontroller, and the error correction method includes:

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

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

[0012] S3. Use historical sensor data to train a neural network model to obtain the trained neural network model;

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

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

[0015] Sub-step S11: Recommend the sensor type and microcontroller type using the following formula:

[0016]

[0017] Among them, s i p is a sensor performance indicator. i w is the weighting coefficient for sensor performance indicators. i p is the weighting adjustment factor for sensor performance indicators. i ∈(0,1), w i Take integers from 1 to 5;

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

[0019]

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

[0021] Sub-step S13: Dynamically adjust the microcontroller's performance configuration using the following formula:

[0022]

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

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

[0025]

[0026] Where, x j For sensor measurement data, μ j σ is the expected value of the sensor measurement data. j θ represents the standard deviation of the sensor measurement data. j This is the calibration coefficient.

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

[0028] Sub-step S21: Perform adaptive data acquisition using the following formula:

[0029]

[0030] Where p(s) is the real-time sampling parameter, γ is the amplification factor, θ is a 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: Perform 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: Perform multi-dimensional data normalization and feature extraction based on the following formula:

[0035]

[0036] Among them, v i For the i-th data dimension, κ i μ is the normalization factor. i Let σ be the mean of the i-th data dimension. i Let be 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] Where n is the number of network layers in the neural network model, d is the data complexity, and σ is the network width of the neural network model;

[0041] Sub-step S32: Apply ensemble learning and meta-learning using the following formulas:

[0042]

[0043] Where m is the number of neural network models, λ i L represents the learning rate of the neural network model.i This is the loss function for the neural network model;

[0044] Sub-step S33: Perform regularization and cross-validation using the following formula:

[0045]

[0046] Where 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 feedback-based dynamic learning algorithm dynamically adjusts the parameters of the neural network through reward and punishment mechanisms;

[0049] Sub-step S42: Design a data flow processing framework and use a GPU-accelerated deep learning model for inference;

[0050] Sub-step S43: Adaptive model fine-tuning is adopted, and the learning rate, number of network layers and activation function of the model are dynamically adjusted according to the feedback of the actual application scenario. The difference between the actual output and the expected output of the neural network model is monitored to correct the neural network model.

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

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

[0053]

[0054] Where 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, where τ 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-step S412: The reinforcement learning algorithm optimizes the network parameters, defines the reward function, and learns the output behavior under different operating conditions using the following formula:

[0056]

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

[0058] Sub-step S413: Automatically increase or decrease the number of network layers and nodes of the neural network model based on real-time feedback of the correction performance, and implement an adaptive network architecture using the following formula:

[0059]

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

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

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

[0063]

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

[0065] Sub-step S422: Use a GPU-accelerated deep learning model and perform error correction inference using the following formula, applying a compound exponential-log activation function to optimize the sensor's error characteristics:

[0066]

[0067] Where k is the sensitivity parameter of the deep learning model;

[0068] Sub-step S423: Perform the generalized Fourier transform using the following formula:

[0069]

[0070] Where e(x) represents the sensor error data, and F(k) represents the composite representation in the frequency domain.

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

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

[0073]

[0074] Where η0 is the initial learning rate, α and σ are both adjustment factors, and e actual (t) and e desired (t) represent the actual error and expected error of the adaptive model at time t, respectively, where η0∈(0,1), α∈(0,1), and σ∈(0,1);

[0075] Sub-step S432: Based on the adaptive selection mechanism, the configuration efficiency of different activation functions is evaluated using the following formula:

[0076]

[0077] Where f is the activation function, Φ is the network parameters, and x is the error data. Output the average 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; the preprocessing in step S2 includes noise reduction processing, filtering processing, and normalization processing.

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

[0080] Compared with the prior art, the beneficial effects of the present invention are:

[0081] In this application, error correction is performed using a trained neural network model, which enables more accurate simulation and correction of nonlinear errors and dynamic changes in sensor data. The powerful learning ability of the trained neural network model allows the sensor and the detection device containing the constant sensor to adapt to error characteristics under various environmental conditions, thereby improving the accuracy and reliability of the sensor output detection data. At the same time, this application can also dynamically adjust according to the real-time changes in the sensor's environment, which can not only cope with static errors, but also effectively handle dynamic errors caused by environmental changes. Attached Figure Description

[0082] Figure 1 This is an overall flowchart of the error correction method for the detection device of the present invention. Detailed Implementation

[0083] The present invention will now be described in detail with reference to the embodiments shown in the accompanying drawings. However, it should be noted that these embodiments are not intended to limit the present invention. Equivalent changes or substitutions in function, method, or structure made by those skilled in the art based on these embodiments are all within the scope of protection of the present invention.

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

[0085] Briefly speaking, an error correction method for a detection device is used to correct the detection device, and in particular, to correct the detection data output by the sensor in the detection device for detecting the 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 internally includes a sensor containing a single-chip microcomputer. The error correction method includes the following steps S1 to S4.

[0086] First, step S1 is executed, that is, the sensor is selected and configured according to the physical quantity to be monitored. Then step S2 is executed, that is, the original data is obtained from the sensor and the original data is preprocessed. Then step S3 is executed, that is, the historical sensor data is used to train the neural network model to obtain the trained neural network model. Finally, step S4 is executed, that is, the error correction of the real-time data of the detection device is performed based on the trained neural network model to output the correction result of the real-time data. The specific implementation steps and technical solutions included in the error correction method of the detection device are as follows. It should be noted that in this application, the term "model", without special explanation, is uniformly understood as a neural network model in its technical meaning.

[0087] The error correction method disclosed in this specific embodiment first involves selecting and configuring a detection device. At this stage, a suitable type and model of sensor must be selected based on the physical quantity to be monitored, such as temperature, pressure, and humidity. Different sensors have specific detection capabilities and ranges for different physical quantities; selecting the correct sensor type and model is crucial and a prerequisite for ensuring the accuracy and reliability of the detection data. Furthermore, a microcontroller with sufficient processing power needs to be selected. This microcontroller must be capable of processing the raw data from the sensor and supporting the operation of neural network algorithms. The selection of the microcontroller depends on its memory size, processing speed, and I / O interfaces, etc., and these characteristics must match the sensor's output and the computational requirements of the neural network and its model. The entire sensor configuration must ensure that the microcontroller can effectively collect and process sensor data while running complex neural network models for error correction, thus achieving the goals of high accuracy 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 selection and configuration of the sensor in step S1 includes the following sub-steps S11 to S14.

[0089] Sub-step S11: Recommend the sensor type and microcontroller type using the following formula:

[0090]

[0091] Among them, s i p is a sensor performance indicator. i w is the weighting coefficient for sensor performance indicators. i p is the weighting adjustment factor for sensor performance indicators. i ∈(0,1), w i Take an integer from 1 to 5; the weighting adjustment factor w for sensor performance indicators i Use integers from 1 to 5 to divide the weights of sensor performance indicators into five levels, w i Taking 1 indicates the least important value, w i Setting 5 indicates the highest priority, allowing for the adjustment of custom weights for sensor performance metrics by setting different values.

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

[0093]

[0094] Where T(t) is the sensor target interface configuration variable, H(t) is the current sensor interface configuration variable, k is the sensor target interface dynamic response speed coefficient, and γ is the sensor target interface steady-state error coefficient, 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 and adapt to different detection needs in different detection scenarios.

[0095] Sub-step S13: Dynamically adjust the microcontroller's performance configuration using the following formula:

[0096]

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

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

[0099]

[0100] Where, x j For sensor measurement data, μ j σ is the expected value of the sensor measurement data. j θ represents the standard deviation of the sensor measurement data. j This is the calibration coefficient.

[0101] Then, raw data is acquired and preprocessed, specifically by acquiring raw data from the sensor through a data acquisition program. The data acquisition program (not shown) is stored in the microcontroller. It should be noted that the detection device disclosed in this application includes a microcontroller and peripheral circuits (e.g., communication circuits, power supply regulator modules, AD circuits, etc.), while the sensor is a sensor system including a microcontroller. Raw data typically contains various noise and error data; therefore, a series of preprocessing steps are needed to optimize the quality of the raw data 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 in preprocessing is denoising and filtering. Denoising and filtering typically involve using filters (e.g., low-pass, high-pass, or band-pass filters) to remove random fluctuations or frequency interference from the raw data. Then, normalization is performed to adjust all the raw data to a uniform scale, typically between 0 and 1 or -1 and 1, excluding endpoints 0, -1, and 1. This avoids the technical problem of poor convergence performance caused by excessive scale differences in the dependent variable during neural network model training. Another common data preprocessing method is standardization, which adjusts the distribution of the raw data by subtracting the mean and dividing by the standard deviation, giving the raw data zero mean and unit variance. This helps the neural network model learn and understand data patterns more effectively.

[0103] Following data acquisition and preprocessing, a neural network model was designed and trained to accurately perform error correction. First, when designing a neural network model suitable for error correction, the model's structure needs to be considered, such as the number of layers, the number of neurons per layer, and the type of activation function. These factors all affect the performance and correction accuracy of the neural network model. Next, the neural network model was trained using collected and preprocessed historical sensor data. This historical data should include the actual output values ​​of the sensors and their corresponding correct values, allowing the neural network model to learn how to reduce or eliminate these errors. Cross-validation was employed during training, specifically dividing the dataset into multiple groups. One group was used to train the neural network model, while another group was used to validate its performance. This ensured that the neural network model performed well on new or unseen data (i.e., new data), meaning it performed well on new data based on the trained neural network model, correcting data detected by the sensor-containing detection device. Furthermore, the error correction method disclosed in this application, by introducing regularization (such as L1 or L2 regularization) and cross-validation, can reduce overfitting of the neural network model and prevent it from becoming overly reliant on specific samples in the training data, thereby improving the generalization ability and stability of the neural network model in practical applications. These steps collectively ensure that the neural network model can effectively correct sensor errors in practical applications, improving overall measurement accuracy and reliability. Cross-validation and regularization techniques are used during training to prevent overfitting. Specifically, the data acquisition and preprocessing in step S2 includes the following sub-steps.

[0104] Sub-step S21: Perform adaptive data acquisition using the following formula:

[0105]

[0106] Where p(s) is the real-time sampling parameter, γ is the amplification factor, θ is a 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: Perform deep learning of the neural network based on the following formula to remove noisy 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: Perform multi-dimensional data normalization and feature extraction based on the following formula:

[0111]

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

[0113] Then, step S3 is executed, introducing an error correction algorithm. In step S3, the pre-trained neural network model is primarily used to correct errors in real-time data. The error correction algorithm consists of three main stages: data input, model inference, and correction output. First, the data input stage involves inputting real-time acquired sensor data into the neural network model. This data should have undergone necessary preprocessing, such as denoising and normalization, to ensure that the data quality meets the input requirements of the neural network model. Next, in the neural network model inference stage, the neural network model calculates and infers based on the input data, outputting the predicted error correction value. This step is the core of error correction; the neural network predicts and corrects potential errors in new data by learning error patterns in historical data, thus facilitating the correction of error data. Finally, in the correction output stage, the predicted output of the neural network model is applied to the actual data to correct errors caused by sensor errors, thereby obtaining more accurate measurement results. Furthermore, based on the correction results output by the neural network model and feedback from the actual application scenario, the parameters of the neural network model, such as the learning rate and the weights of sensor performance indicators, are 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 crucial initial step. The process function F(s) recommends the sensor type and microcontroller, as shown below:

[0115]

[0116] Among them, s i For each sensor's performance metrics, p i and w i These are the weighting coefficients and adjustment factors for the sensor performance indicators. The settings of the aforementioned weighting coefficients and adjustment factors reflect the importance of different performance indicators and their impact on the sensor output.

[0117] For example, when configuring sensors for an environment requiring precise temperature and humidity measurements, the sensor's response speed, accuracy, and environmental adaptability are of particular concern. The following performance indicators, weighting coefficients, and adjustment factors are set: s1 is the response speed, ranging from 0 to 1, with p1 = 0.5 and w1 = 2; s2 is the accuracy, ranging from 0 to 1, with p2 = 1.0 and w2 = 3; s3 is the environmental adaptability, ranging from 0 to 1, with p3 = 0.8 and w3 = 2. Taking a response speed of s1 = 0.8, accuracy of s2 = 0.9, and environmental adaptability of s3 = 0.7 as an example, the function F(s) is calculated to determine the most suitable sensor and microcontroller type. The aforementioned response speed s1, accuracy s2, and environmental adaptability s3 are substituted into the function F(s) for calculation. The specific calculation process is shown below:

[0118]

[0119] The calculated results will recommend the most suitable sensor type based on the comprehensive weighting of these metrics. This approach, by comprehensively considering multiple performance metrics and weighting them according to their importance, ensures that the final device selection maximizes 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 for the detection device. The key to this step lies in managing 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 shown below:

[0122] Where T(t) is the target interface configuration state, i.e. the desired sensor interface state; R(t) is the current sensor interface configuration variable, which represents the actual monitored state; k and γ are used to adjust the sensor's dynamic response speed and steady-state error coefficient, respectively.

[0123] This section describes how to adjust the current sensor interface configuration to transition from a low response speed to a high response speed, a common practice in high-speed dynamic environment monitoring. T(t) is set as the new interface state, and R(t) as the old state. k = 0.3 and γ = 0.05 are chosen to achieve a smooth and rapid transition.

[0124] The values ​​of k and γ are inserted into the following differential equation for calculation. The specific calculation process is shown below:

[0125]

[0126] At the initial time t = 0, T(0) = 1 (full response state) and R(0) = 0 (no response state). The aforementioned differential equations will help simulate the dynamic changes of the sensor target interface variables and predict the time to reach the target state, thereby effectively managing sensor upgrades and replacements, ensuring that each change is controlled and predictable, thus minimizing the sensor's steady-state error and improving response efficiency. Typically, the performance of sensors or detection devices containing sensors has certain bottlenecks. Therefore, through the aforementioned technical solution, the physical quantities that the sensor or detection device needs to detect can be more accurately determined, and suitable types of sensors and detection devices containing sensors can be selected.

[0127] Then, an adaptive configuration technique for the microcontroller is implemented, specifically including dynamically adjusting the microcontroller's operating frequency and power consumption according to data processing requirements. This optimizes the performance of the microcontroller and the sensors containing it, while reducing energy consumption, making it particularly suitable for dynamic real-time monitoring environments. The dynamic adjustment formula used for the aforementioned dynamic adjustment of the microcontroller's performance configuration is as follows:

[0128]

[0129] Where 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, a microcontroller needs to process large amounts of data from multiple sensors. In this case, the data processing requirements change over time, and the microcontroller configuration needs to be flexibly adjusted to adapt to these changes. Let's define a specific moment, where f(t) = t (a linear function of time), meaning the processing frequency increases linearly with time, m = 10 seconds, and the adjustment parameters α = 0.5, β = 0.3, and δ = 0.1. By inserting these values ​​into the aforementioned formula, we can calculate the microcontroller's performance adjustment scheme within 10 seconds. The specific calculation process is shown in the following formula:

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

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

[0133]

[0134] Where, x j It is measurement data, μ j and σ j These are the expected value and standard deviation of the data, θ j These are calibration coefficients. By introducing the aforementioned data and parameters, we ensure suitability for specific sensors and application scenarios. The parameter n in the summation operation represents the number of sensors, and typically, one sensor is deployed at a detection location (i.e., a test point) to measure a specific physical quantity at that specific location.

[0135] For example, monitoring machine vibration during industrial manufacturing. The sensor measures the intensity of vibration generated by a component (e.g., a spindle) during mechanical operation, while x... j This represents the actual vibration data collected from the sensor. Three different vibration monitoring points are set, i.e., n=3, and the expected vibration level μ is set for each test point. j The values ​​were 0.5, 0.3, and 0.4, respectively, while the standard deviation σ of the measurement data... j The values ​​are 0.05, 0.03, and 0.04, respectively. Calibration coefficient θ j They were set to 1.2, 1.5, and 1.3 respectively.

[0136] Substituting the aforementioned measurement data, expected value, standard deviation, and calibration coefficient into the aforementioned higher-order correction equation, the specific calculation process is as follows.

[0137]

[0138] The results calculated by the aforementioned higher-order calibration equation will be used to assess the deviation between the vibration monitoring data and the expected data containing vibration evaluation indicators output by the anticipated neural network model, and to apply corrections to ensure the accuracy of the monitoring data output by the sensor. This enables the sensor to identify and correct any error or deviation data in real time, thereby ensuring quality control during the manufacturing process of the sensor and the detection device containing the sensor, and ensuring the normal operation of the equipment.

[0139] In this specific embodiment, 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] Where n is the number of network layers in the neural network model, d is the data complexity, and σ is the network width of the neural network model;

[0143] Sub-step S32: Apply ensemble learning and meta-learning using the following formulas:

[0144]

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

[0146] Sub-step S33: Perform regularization and cross-validation using the following formula:

[0147]

[0148] Where 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 aimed at ensuring the quality and accuracy of the input data, thereby improving the overall correction effect on the detection data. Therefore, the error correction method disclosed in this application creatively employs an adaptive data acquisition algorithm to dynamically adjust acquisition parameters to optimize data quality. The aforementioned adaptive data acquisition algorithm is implemented using the following formula:

[0150]

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

[0152] For example, when deploying sensors and sensor-containing detection devices within a chemical plant to monitor the temperature and pressure of specific equipment to ensure safe operation, the real-time sampling parameters p(s) are set as follows: temperature reading range of 20°C to 50°C; pressure reading range of 100 kPa to 500 kPa; the selected adjustment parameters are set as follows: γ = 1.5, introducing a factor to enhance the response speed of the sampling data; ω(p) = 2p, adjusting the weights based on the sensor data; k = 0.1, where k is the sensitivity factor of the control function; θ = 30°C or θ = 200 kPa, which are the threshold values ​​for the temperature and pressure to be measured, respectively. Both 30°C and 200 kPa are physical quantity thresholds, determined based on the type of physical quantity the sensor needs to detect. This embodiment exemplifies two physical quantity thresholds. It is understood that one, three, or more physical quantities can also be selected, and the same or different physical quantity thresholds can be set.

[0153] Assuming that at a certain moment, the temperature reading p(s) stabilizes at 40℃, we need to calculate the data acquisition adjustment S(p, 1) over one hour. hour ), where 1 hour is defined as 3600 seconds, the aforementioned calculation process for adaptive data acquisition is shown in the following integral:

[0154]

[0155] Calculating the aforementioned integral equation yields the total amount of data acquisition parameters adjusted based on temperature changes within one hour. This not only helps in precisely controlling data quality but also facilitates optimizing subsequent error correction processing of the detection data.

[0156] Following the aforementioned adaptive data acquisition sub-step S21, sub-step S22 is executed, specifically performing neural network deep learning to remove noise data from the original data, thereby improving the quality and accuracy of the sensor data. The specific formula is shown below:

[0157]

[0158] Where x represents the raw data with noise acquired from the sensor, α(x) is the amplification ratio of the noise data, and δ(x) is the phase offset. δ(x) is a nonlinear function dynamically learned by a neural network, 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 under test.

[0159] For example, in an industrial monitoring system, the sensor data (i.e., detection data) collected by sensors is affected by vibrations and electromagnetic interference caused by equipment operation. The challenge here is to accurately extract the machine's operating status signal from this noise data. The noise data x is set to range from -10 to 10. Based on the actual situation, the specific values ​​of the adjustment coefficients are set 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 shift of the sine function, used to separate the noise data from the real signal. The calculation is performed by substituting α(x), β(x), and δ(x) into the aforementioned formula, as shown in the following calculation process:

[0160]

[0161] The calculation results of the aforementioned integral equation will reflect how to extract useful signals from a noisy background. By introducing denoising techniques, the accuracy of the final calibrated and output detection data is significantly improved, making it particularly suitable for situations where environmental noise data varies greatly, such as industrial production lines or external environmental monitoring.

[0162] Then, sub-step S23 is performed, which involves 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 the appropriate format and scale before being input into the neural network model. The formula used in sub-step S23 is shown below:

[0163]

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

[0165] For example, in a smart manufacturing plant, this detection device needs to monitor the temperature, vibration, and sound levels of equipment to predict equipment failures. The specific statistical information for temperature, vibration, and sound data is set as follows: Temperature v1, mean μ1 = 20℃, standard deviation σ1 = 2℃; Vibration v2, mean μ2 = 50Hz, standard deviation σ2 = 5Hz; Sound v3, mean μ3 = 70dB, standard deviation σ3 = 10dB.

[0166] To reflect the different importance of these indicators in fault prediction, normalization factors κ1 = 1.0 (for temperature), κ2 = 0.8 (for vibration), and κ3 = 0.5 (for sound). Substituting the normalization factors, the mean and standard deviation of the i-th data dimension into the aforementioned formula, the normalized value N(v) can be calculated, thus achieving 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 = 55 Hz, and the sound is v3 = 75 dB, substituting these values ​​into the calculation of N(v) can help understand the contribution of various monitoring indicators to the equipment condition assessment under these actual conditions.

[0169] In this embodiment, constructing a neural network model is crucial. First, it is necessary to design and implement a dynamically adjusted neural network model, which dynamically adjusts the network structure according to the complexity of the input data, thereby optimizing 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 in the neural network model, d is the data complexity, and σ is the network width of the neural network model. The aforementioned formula is used to dynamically adjust the network depth of the neural network model in order to better handle data of different complexities.

[0172] Specifically, we are processing sensor data from a complex industrial system. This sensor data involves multiple parameters, such as temperature, pressure, and vibration. The data complexity 'd' can be quantified as 0.8, and its value ranges from 0 to 1, excluding endpoints. A data complexity 'd' approaching 1 indicates extremely high data complexity, while a data complexity 'd' approaching 0 indicates extremely low data complexity. The network width σ of the neural network model is chosen to be 0.5 to ensure that the network structure remains flexible while avoiding overfitting.

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

[0174]

[0175] By calculating the fitness values ​​of each network layer, the optimal network structure can be selected to ensure that the neural network model can handle highly complex data without wasting computational resources or reducing training efficiency due to an excessive number of network layers. The aforementioned architecture is the architecture of the neural network model.

[0176] Following the design of dynamically adjustable neural network models, the second step is to apply ensemble learning and meta-learning techniques, aiming to improve the generalization ability and learning efficiency of the neural network models. Ensemble learning enhances prediction accuracy and robustness by combining multiple neural network models, while meta-learning focuses on accelerating the learning process, enabling the neural network model to quickly adapt to new tasks. The specific formula is as follows:

[0177]

[0178] Where m is the number of models, λ i L is the learning rate of each neural network model. i This is the loss function for each neural network model. The purpose of this formula is to effectively integrate the strengths of each neural network model by adjusting the learning rate of each model, thereby achieving better overall performance.

[0179] For example, in a quality monitoring system for an automotive manufacturing line, it is necessary to monitor several key parameters on the assembly line, such as screw tightening force and component alignment accuracy. Monitoring these parameters relies on multiple sensors, each with its own independent data characteristics and error patterns. Five small neural network models (m=5) are envisioned, each handling a specific monitoring task.

[0180] Set the learning rate λ i The range is between 0.01 and 0.05, and the loss function L of each neural network model in the initial training phase is... i The values ​​are 0.2, 0.15, 0.18, 0.16, and 0.14. The loss function L for the neural network model... i The value reflects the initial efficiency of each neural network model in processing its corresponding task. Let λ... i With L i Inserting this into the aforementioned formula to calculate the performance of the ensemble 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 approach, each neural network model can learn and adapt rapidly within its own domain of expertise, while the ensemble learning strategy ensures optimal overall performance.

[0183] The final stage involves implementing advanced regularization and cross-validation techniques to improve the generalization ability of the neural network model and prevent overfitting. This is crucial for ensuring the reliability and accuracy of the neural network model in real-world applications. The regularization formula used is shown below:

[0184]

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

[0186] A neural network model is being developed to predict industrial machine failures. The model needs to process complex data from multiple sensors, including temperature, pressure, and vibration. To ensure the model doesn't merely fit noisy training data and can generalize to unseen new data, the regularization weights are chosen as follows: α = 0.05 and β = 0.03.

[0187] Setting a specific range for the model parameter x, such as from -1 to 1, can simulate real-world scenarios. This is achieved by calculating the regularization term:

[0188] 1. Calculate ∫x 2 dx, within a given range, the integral equals

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

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

[0191] The aforementioned calculation results provide a quantitative evaluation of the regularization of neural network models, helping to understand how regularization affects the complexity and performance of neural network models. Through the aforementioned technical solution, not only is overfitting prevented from being prevented, but the explanatory power and predictive ability of neural network models are also enhanced by adjusting the handling of nonlinear terms.

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

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

[0194]

[0195] Where 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 Let α be the critical value of the environmental state, t = ten minutes, and τ be the time required for the environmental state data to decay from its maximum value to 1 / e of its maximum value, α ∈ (0, 1). The environmental state data includes physical quantities such as ambient temperature and ambient vibration. The sensor detects the aforementioned environmental state data to output and form the detection data. τ is a constant.

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

[0197]

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

[0199] Sub-step S413: Automatically increase or decrease the number of network layers and nodes of the neural network model based on real-time feedback of the correction performance, and implement an adaptive network architecture using the following formula:

[0200]

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

[0202] In this embodiment, the core components are a feedback-based dynamic learning algorithm and an environmentally-aware dynamic adjustment strategy. Combined with reinforcement learning and real-time data analysis, this enables the sensor to adapt to different environmental conditions and usage scenarios. Through this method, the parameters, weights, and structure of the neural network are dynamically adjusted based on real-time monitored environmental data, optimizing error correction efficiency and accuracy.

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

[0204] Referring to the aforementioned 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 representing the speed of change in the environmental state), the current environmental state e = 35℃ (i.e., 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 shown below:

[0206]

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

[0208] Reinforcement learning algorithms are used to refine and optimize network parameters, define a reward function, and learn the output behavior under different operating conditions using the following formula. This step is implemented by defining a reward function that not only depends on the performance metrics of the correction but is also dynamically adjusted based on the improvement amount. The defined reward function is shown in the following formula:

[0209]

[0210] Here, p represents the performance index of the correction, and δ represents the amount of improvement achieved through correction. A reward function is introduced to reward network behaviors that effectively correct errors under various operating conditions, while penalizing those that are ineffective or show little improvement. The aforementioned output behavior 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 initial adjustments to the detection device, the sensor calibration performance index p improved from 1.0 to 1.5, indicating an improvement in the sensor calibration effect. The improvement in sensor calibration δ was 0.5. These specific values ​​can be substituted into the calculation of 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. The specific calculation process is shown below: Calculate the 1.5 × 0.5 in the molecule. 2 =0.375. Calculate log(1+0.5)≈0.4055 in the denominator. The first part of the reward function is calculated as follows: 0.925. (Regarding the integral) Its value is approximately 0.4936. Combining these values, we get: The results of the aforementioned reward function calculation show that, in the specific improvement scenario, the reinforcement learning algorithm provides a reward value of 1.4186, which reflects that there is a positive reward for this level of improvement, and incentivizes the model to continue optimizing in this direction.

[0213] The final step involves employing adaptive network architecture techniques, allowing the neural network structure to be dynamically adjusted based on real-time feedback from the correction performance—that is, automatically increasing or decreasing the number of layers and nodes. This ensures that the network structure remains synchronized with the complexity and changes in the task being processed, thereby optimizing performance and reducing resource consumption. The formula used in this process is shown below:

[0214]

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

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

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

[0218] calculate Let tan(1.6) ≈ 5.67. Calculate exp(-β(f-f0)) = exp(-0.1(0.8-0.5)), that is, exp(-0.03) ≈ 0.97. Insert these values ​​into the aforementioned formula introduced by the adaptive network architecture technique. 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 its original size to optimize performance. Therefore, the adaptive adjustment disclosed in this application enables the network to handle current task requirements more effectively, such as improving the accuracy of traffic flow prediction, while reducing unnecessary computational overhead and resource consumption.

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

[0222] First, execute sub-step S421. Design an asynchronous data stream processing architecture for the sensor's error data. This architecture processes the sensor's error data stream in real-time using an event-driven mechanism. This design allows the sensor to react quickly upon receiving new data without waiting for the entire data batch to complete, thus significantly improving processing efficiency and reducing response time. Specifically, the data stream is described and processed using high-order partial differential equations:

[0223] In the aforementioned higher-order partial differential equation, u represents the sensor's error data stream state, c is a parameter for adjusting the wave velocity, c is the data propagation speed (unit: m / s), γ is the damping coefficient used to control the smoothing of the data stream, and f(u, t) is an adjustment function based on environmental changes. This adjustment function can dynamically adjust the data processing method according to the real-time environment or sensor state.

[0224] For example, in industrial automation, sensors monitor the performance and accuracy of devices in real time. Sensor data streams on the production line need to be calibrated in real time to ensure product quality. The data propagation speed can be set to c = 2.0 m / s, and γ = 0.1 s / s, where γ is the damping coefficient, to ensure the stability of data processing.

[0225] Then, sub-step S422 is executed. By substituting these parameters into the aforementioned higher-order partial differential equation and defining f(u, t) as a function dynamically adjusted based on the current sensor error, sensor errors can be predicted and corrected through real-time simulation of this equation. This not only enables rapid response to environmental changes but also allows for processing of large-scale data via GPU acceleration, ensuring low latency and high efficiency.

[0226] Next, a GPU-accelerated deep learning model is used for error correction, particularly by applying the compound exponential-logarithmic activation function, which effectively enhances the neural network model's ability to handle nonlinear data. The compound exponential-logarithmic activation function is defined as follows: Here, k is a key sensitivity parameter of the neural network model. This key sensitivity parameter k allows the neural network model to self-adjust based on the dynamic range of the input data, optimizing the sensor's error characteristics. This activation function is designed to improve the neural network model's sensitivity to small changes in the input data, thereby enhancing the accuracy of sensor data correction. GPU acceleration utilizes mature existing technologies, which will not be elaborated upon here.

[0227] Data is being processed from industrial sensors that monitor the machine's vibration frequency. The detected data for this vibration frequency includes noise data caused by machine wear or external interference. To ensure the accuracy of error correction, the value of k can be selected to adjust the response sensitivity of the activation function. K = 0.5 is set as the initial test value.

[0228] Furthermore, within a specific measurement period, the sensor output data is set to range 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's state or trigger maintenance procedures. Using GPU acceleration ensures that these calculations can be performed in near real-time, especially in high-data-throughput environments, ensuring efficient sensor operation and continuous machine stability.

[0231] Finally, sub-step S423 is executed: a generalized Fourier transform is performed, and error preprocessing and inference of the continuous flow are carried out. The aforementioned process, by incorporating the generalized Fourier transform, improves the efficiency of data processing and optimizes the accuracy of error correction.

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

[0233] Where e(x) represents the sensor error data, and F(k) represents the composite representation in the frequency domain.

[0234] The purpose and function of performing the 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 flow. For example, monitoring the accuracy of a robotic arm in an automated production line. The error data e(x) captured by the sensor is assumed to be mainly caused by mechanical vibration, and the error data e(x) can be simulated as a signal containing both high-frequency and low-frequency components. To process this data (i.e., the error data e(x)), k=1 is chosen as the parameter in the generalized Fourier transform. By applying the generalized Fourier transform, the error data is analyzed in the frequency domain, converting it 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 This partially helps capture periodic changes in error data, while Partially, it helps handle singularities and discontinuities in error data, smoothing sharp variations in sensor data through a sine wave. This approach effectively optimizes the entire processing flow from data acquisition to error correction output, making it particularly suitable for automated and high-precision manufacturing scenarios requiring high-speed and continuous data processing. The generalized Fourier transform not only accelerates error data processing 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 adoption of adaptive model fine-tuning technology is a key step. It dynamically adjusts the learning rate, number of layers, and activation function of the neural network model based on feedback from the actual application scenario, thereby ensuring minimal difference between the neural network model's output and the desired output. Adaptive model fine-tuning technology primarily improves the adaptability and accuracy of the neural network model by monitoring its performance in real time and adjusting based on performance feedback. The Adaptive Model Adjustment Framework (AMAF) utilizes real-time feedback data to dynamically adjust the parameters of the neural network, particularly the learning rate, number of network layers, and activation function.

[0238] The aforementioned adjustments were achieved through a custom learning rate adjustment formula:

[0239]

[0240] Where η0 is the initial learning rate, α and σ are both adjustment factors, and e actual (t) and e desired(t) represent the actual error and expected error of the adaptive model at time t, respectively. Therefore, by introducing and executing the aforementioned formula, the learning rate can be adjusted according to the magnitude and duration of the error, aiming to quickly reduce the error and optimize the performance of the neural network model.

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

[0242]

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

[0244] Next, an adaptive selection mechanism for the hierarchy and activation function (i.e., the LAAF mechanism) is implemented. By introducing an adaptive selection mechanism, this application can dynamically adjust the network hierarchy and activation function according to the characteristics and distribution of the error data, ensuring optimal network configuration to achieve the best correction effect.

[0245] The LAAF mechanism uses a specific metric to evaluate the performance of different activation function configurations, as shown below:

[0246] Where f is the activation function in the network, Φ is the network parameters, and x is the input error data, and This is the average value of the activation function's output. This metric allows us to evaluate the adaptability and effectiveness of different activation functions in processing error data.

[0247] Considering the impact of periodic interference on sensor data, to determine the most suitable activation function configuration, a set of parameters Φ is first defined, and the error data x is processed. Within a specific measurement period, there is a series of error data x1, x2, ..., x... n (Note: Discrete data points), each error data point is processed by the activation function tanh(f(x; Φ)) to produce the output f(x). i Next, the average value of these output error data is calculated. The value of D(f, Φ) is calculated using the formula above. 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 through integration reflects the adaptability of the current activation function configuration to error correction. A high D(f, Φ) value indicates that the current activation function configuration does not match the characteristics of the error data and needs adjustment. Conversely, a low D(f, Φ) value indicates that the activation function matches the error data well and therefore does not require adjustment.

[0249] In summary, the error correction method disclosed in the specific embodiments of this application enables the sensor and the detection device including the constant sensor to adapt to error characteristics under various environmental conditions, thereby improving the accuracy and reliability of the sensor output detection data. Furthermore, it can dynamically adjust according to the real-time changes in the sensor's environment. This not only addresses and eliminates static errors but also effectively handles dynamic errors caused by environmental changes, ultimately improving the accuracy and reliability of the sensor and the detection device including the sensor in detecting various physical quantities.

[0250] The detailed descriptions listed above are merely specific descriptions of feasible embodiments of the present invention, and are not intended to limit the scope of protection of the present invention. All equivalent embodiments or modifications made without departing from the spirit of the present invention should be included within the scope of protection of the present invention.

[0251] It will be apparent to those skilled in the art that the present 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 its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

[0252] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments 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 containing a microcontroller, characterized in that, The error correction method includes: S1. Select and configure sensors according to the physical quantities to be monitored; S2. Acquire raw data from the sensor and preprocess the raw data; S3. Use historical sensor data to train a neural network model to obtain the trained neural network model; S4. Based on the trained neural network model, perform error correction on the real-time data of the detection device to output the correction result of the real-time data; The selection and configuration of the sensor in step S1 includes the following sub-steps: Sub-step S11: Recommend the sensor type and microcontroller type using the following formula: Among them, s i p is a sensor performance indicator. i w is the weighting coefficient for sensor performance indicators. i p is the weighting adjustment factor for sensor performance indicators. i ∈(0,1), w i Take integers from 1 to 5; Sub-step S12: Design a modular sensor interface using the following formula: Where 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, and γ is the sensor target interface steady-state error coefficient, where k∈(0,1) and γ∈(0,1); Sub-step S13: Dynamically adjust the microcontroller's performance configuration using the following formula: Where f is the data processing frequency function of the microcontroller, m is the time quantity of the microcontroller, P(f,m) is a composite function with f and m as variables, and α, β, δ are all performance adjustment parameters of the microcontroller, where α∈(0,1), β∈(0,1), and δ∈(0,1). Sub-step S14: Perform sensor calibration and diagnosis based on the following formula: Where, x j For sensor measurement data, μ j σ is the expected value of the sensor measurement data. j θ represents the standard deviation of the sensor measurement data. j For calibration coefficients; The data acquisition and preprocessing in step S2 includes the following sub-steps: Sub-step S21: Perform adaptive data acquisition using the following formula: Where p(s) is the real-time sampling parameter, γ is the amplification factor, ω is a 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: Perform neural network deep learning based on the following formula to remove noise data from the original data: Where x represents the noise data in the original data, α(x) represents the amplification ratio of the noise data, β(x) is a constant, and δ(x) is the phase offset; Sub-step S23: Perform multi-dimensional data normalization and feature extraction based on the following formula: Among them, v i For the i-th data dimension, κ i μ is the normalization factor. i Let σ be the mean of the i-th data dimension. i Let be the standard deviation of the i-th data dimension.

2. The error correction method according to claim 1, characterized in that, Step S3 includes the following sub-steps: Sub-step S31: Construct a dynamically adjusted neural network model using the following formula: Where n is the number of network layers in the neural network model, d is the data complexity, and σ is the network width of the neural network model; Sub-step S32: Apply ensemble learning and meta-learning using the following formulas: Where m is the number of neural network models, λ i L represents the learning rate of the neural network model. i This is the loss function for the neural network model; Sub-step S33: Perform regularization and cross-validation using the following formula: Where x is the model parameter, α and β are regularization weight coefficients, x∈(-1,1), α∈(0,1), β∈(0,1).

3. 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 feedback-based dynamic learning algorithm dynamically adjusts the parameters of the neural network through reward and punishment mechanisms; Sub-step S42: Design a data flow processing framework and use a GPU-accelerated deep learning model for inference; Sub-step S43: Adaptive model fine-tuning is adopted, and the learning rate, number of network layers and activation function of the model are dynamically adjusted according to the feedback of the actual application scenario. The difference between the actual output and the expected output of the neural network model is monitored to correct the neural network model.

4. The error correction method according to claim 3, characterized in that, The optimization of network weights and structure in sub-step S41 includes the following sub-steps: Sub-step S411: Analyze the sensor error data in real time, adjust the number of network layers and nodes of the neural network model according to the error data, and perform error data correction in a dynamic environment using the following formula: Where 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, where τ 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-step S412: The reinforcement learning algorithm optimizes the network parameters, defines the reward function, and learns the output behavior under different operating conditions using the following formula: Where p is the performance index of sensor calibration, and δ is the improvement amount of sensor calibration; Sub-step S413: Automatically increase or decrease the number of network layers and nodes of the neural network model based on real-time feedback of the correction performance, and implement an adaptive network architecture using the following formula: Where f is the performance feedback, c is the current network complexity, and k, β, and f0 are all adjustment factors, k∈(0,1), β∈(0,1), and f0∈(0,1).

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

6. The error correction method according to claim 3, characterized in that, The adaptive model fine-tuning in sub-step S43 includes the following sub-steps: Sub-step S431: Based on the adaptive selection mechanism, and using real-time feedback data, dynamically adjust the learning rate, number of network layers, and activation function of the neural network model using the following formula: Where η0 is the initial learning rate, α and σ are both adjustment factors, and e actual (t) and e desired (t) represent the actual error and expected error of the adaptive model at time t, respectively, where η0∈(0,1), α∈(0,1), and σ∈(0,1); Sub-step S432: Based on the adaptive selection mechanism, the configuration efficiency of different activation functions is evaluated using the following formula: Where f is the activation function, Φ is the network parameters, and x is the error data. Output the average value for the activation function.

7. 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 noise reduction, filtering, and normalization.

8. The error correction method according to claim 1, characterized in that, The historical sensor data in step S3 includes the sensor's output value and the correct value corresponding to the sensor's output value.

Citation Information

Patent Citations

  • Incremental training of machine learning tools

    WO2020167490A1