Intelligent real-time sensor signal compensation system and method based on NPU

By designing an intelligent real-time sensor signal compensation system based on NPU, the challenges of sensor signal compensation in real-time performance and data quality are solved, and high-precision and efficient signal compensation are achieved, meeting the high requirements in complex environments.

CN119961854APending Publication Date: 2025-05-09西安翔腾微电子科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411749849.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-05-09

AI Technical Summary

Technical Problem

The NPU-based intelligent real-time sensor signal compensation system faces challenges in real-time performance, data quality, system stability, energy efficiency and multi-sensor fusion, and needs to be solved through optimization algorithms and hardware design to ensure efficient operation in complex environments.

Method used

An intelligent real-time sensor signal compensation system based on NPU is designed, including a high-speed bus transceiver module, a central processing module and an NPU unit module. Real-time compensation of sensor signals is achieved through signal acquisition, data preprocessing, feature extraction and neural network compensation algorithm deployment and execution.

Benefits of technology

Through the combination of software and hardware, the accuracy and operational convenience of signal compensation are significantly improved, the robustness of the system under different working conditions is enhanced, and the high requirements for real-time and accuracy of signal compensation in the fields of autonomous driving, intelligent manufacturing, etc.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119961854A_ABST
    Figure CN119961854A_ABST
Patent Text Reader

Abstract

The invention relates to an intelligent real-time sensor signal compensation system and method based on an NPU. The system comprises a high-speed bus receiving and transmitting module, a central processing module and an NPU unit module, the high-speed bus receiving and transmitting module is connected with the central processing module, the central processing module is connected with the NPU unit module, and the high-speed bus receiving and transmitting module is used for collecting and transmitting signals and receiving or sending data of an external computer or a sensor. The central processing module is used for signal transfer and preprocessing and is responsible for transferring and distributing data in the high-speed bus transceiver module; performing data preprocessing on the data received or sent by the high-speed bus transceiver module, wherein the data preprocessing comprises normalization, standardization and dimension scaling operation; performing feature extraction, including wavelet transform and Fourier transform, on the processed data; the NPU unit module is used for deploying and executing a neural network compensation algorithm; and the central processing module is responsible for completing forward reasoning, real-time analysis and sensor signal compensation of a neural network algorithm, returning a result to the central processing module for data processing and transfer, and finally outputting the result through the high-speed bus receiving and transmitting module. According to the invention, the precision and operation convenience of signal compensation can be improved, and real-time compensation of sensor signals is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of instruments and meters, and in particular relates to an intelligent real-time sensor signal compensation system and method based on NPU (neural network processing unit). Background Art

[0002] NPU-based intelligent real-time sensor signal compensation systems are widely used in fields such as autonomous driving, intelligent manufacturing, the Internet of Things, smart homes, and medical monitoring. They can compensate high-frequency sensor data in real time and improve data accuracy and reliability. However, such systems face challenges such as real-time performance, data quality, system stability, energy efficiency, and multi-sensor fusion, which need to be solved through optimized algorithms and hardware design to ensure efficient operation in complex environments. Summary of the invention

[0003] In order to solve the above technical problems existing in the background technology, the present invention provides an intelligent real-time sensor signal compensation system and method based on NPU, which can improve the accuracy and operation convenience of signal compensation and realize real-time compensation of sensor signals. The present invention is suitable for a large number of sensor signal real-time correction and compensation application scenarios, such as industrial automation equipment, environmental monitoring equipment and medical equipment.

[0004] The technical solution of the present invention is: the present invention is an intelligent real-time sensor signal compensation system based on NPU, and its special feature is: the intelligent real-time sensor signal compensation system based on NPU includes a high-speed bus transceiver module, a central processing module and an NPU unit module, the high-speed bus transceiver module is connected to the central processing module, the central processing module is connected to the NPU unit module, the high-speed bus transceiver module is used for signal acquisition and transmission, receiving or sending data from an external computer or sensor, the central processing module is used for signal transfer and preprocessing, and is responsible for transferring and distributing the data in the high-speed bus transceiver module; performing data preprocessing on the data received or sent by the high-speed bus transceiver module, including normalization, standardization, and dimensional scaling operations; performing feature extraction on the processed data, including physical feature extraction, statistical feature extraction, and frequency feature extraction; the NPU unit module is used for the deployment and execution of the neural network compensation algorithm; is responsible for completing the forward reasoning of the neural network algorithm, real-time analysis and compensation of sensor signals, and returning the results to the central processing module for data processing and transfer, and finally outputting through the high-speed bus transceiver module.

[0005] Furthermore, the high-speed bus transceiver module adopts a 1394 bus transceiver module or a signal transceiver module, and the 1394 bus transceiver module or the signal transceiver module is connected to an external computer or a sensor system to collect data.

[0006] Furthermore, the central processing module uses a CPU or a DSP as a processing carrier.

[0007] Furthermore, the NPU unit module adopts the neural network acceleration module NPU as a carrier for deploying the neural network algorithm.

[0008] A method for implementing the above-mentioned NPU-based intelligent real-time sensor signal compensation system is special in that the method comprises the following steps:

[0009] 1) Signal acquisition and transmission; the high-speed bus transceiver module receives or sends data from external computers or sensors;

[0010] 2) Signal transfer and preprocessing: The central processing module transfers and distributes the data in the high-speed bus transceiver module; performs data preprocessing on the data received or sent by the high-speed bus transceiver module, including normalization, standardization, and dimension scaling operations; performs feature extraction on the processed data, including physical feature extraction, statistical feature extraction, and frequency feature extraction;

[0011] 3) Deployment and execution of neural network compensation algorithm; the NPU unit module is responsible for completing the forward reasoning of the neural network algorithm;

[0012] 4) The NPU unit module returns the results to the central processing module for data processing and transfer.

[0013] Furthermore, in step 1), the high-speed bus transceiver module is equipped with a signal transmission protocol, such as a 1394 signal transmission protocol, and the specific steps are as follows:

[0014] 1.1) The system receives data signals from external devices through a high-speed bus transceiver module to ensure the stability and integrity of the signal;

[0015] 1.2) During data transmission, the high-speed bus transceiver module adopts asynchronous or synchronous transmission mode and supports switching of multiple data rates;

[0016] 1.3) The received data is parsed and processed through the control logic inside the high-speed bus transceiver module, and the data packets are packaged and reassembled as needed;

[0017] 1.4) In the sending stage, the high-speed bus transceiver module sends the processed data to the central processing module through the 1394 signal transmission protocol, realizing high-bandwidth real-time data transmission.

[0018] Furthermore, in step 2), the central processing module is equipped with data preprocessing, data transfer algorithm and feature extraction algorithm. Data preprocessing includes cleaning "dirty" data to correct missing values, outliers / outliers, redundant attributes, and smooth noise data in the original data set; the data transfer algorithm completes the data interaction between the data interface module and the NPU module through the data reading and writing of the register to improve the data transfer efficiency, reduce latency and improve the overall performance of the system; the feature extraction algorithm is divided into physical feature extraction, statistical feature extraction and frequency feature extraction. Physical feature extraction uses interpretable physical formulas to convert raw data into higher-level and more abstract feature representations, and can convert different types of data into unified features. Statistical feature extraction extracts raw data through Pearson correlation coefficient method, Spearman correlation coefficient method, distance correlation coefficient method, principal component analysis (PCA) method or weighted moving average linear regression analysis method; frequency feature extraction uses empirical mode decomposition method to extract frequency features of the original signal.

[0019] Furthermore, the specific steps for cleaning the "dirty" data in step 2) are as follows:

[0020] 1) Find the n known point pairs (x1,y1),(x2,y2)…(x n ,y n ) all order difference quotient formulas

[0021]

[0022] 2) Combine the above difference quotient formulas to establish the following interpolation polynomial f(x):

[0023] f(x)=f(x1)+(x-x1)f[x2,x1]+(x-x1)(x-x2)f[x3,x2,x1]+

[0024] (x-x1)(x-x2)(x-x3)f[x4,x3,x2,x1]+…+

[0025] (x-x1)(x-x2)…(x n-1 )f[x n ,x n-1 ,…,x2,x1]+

[0026] (x-x1)(x-x2)…(x n )f[x n ,x n-1 ,…,x1,x]

[0027] =P(x)+R(x)

[0028] in:

[0029] P(x)=f(x1)+(x-x1)f[x2,x1]+(x-x1)(x-x2)f[x3,x2,x1]+

[0030] (x-x1)(x-x2)(x-x3)f[x4,x3,x2,x1]+…+

[0031] (x-x1)(x-x2)…(x n-1 )f[x n ,x n-1 ,…,x2,x1]

[0032] R(x)=(x-x1)(x-x2)…(x n )f[x n ,x n-1 ,…,x1,x]

[0033] P(x) is the Newton interpolation approximation function, and R(x) is the error function;

[0034] 3) Substitute the point x corresponding to the missing value into the interpolation polynomial to obtain the approximate value f(x) of the missing value.

[0035] Furthermore, the specific steps of the empirical mode decomposition method in step 2) are as follows:

[0036] First, according to the local upper and lower extreme points of the original time signal X(t), the upper and lower envelopes of X(t) are obtained; the mean of the upper and lower envelopes is calculated to obtain the mean line m1(t); X(t) is subtracted from m1(t) to obtain:

[0037] h1(t)=X(t)-m1(t)

[0038] Determine whether h1(t) can meet the two requirements of IMF; if so, h1(t) is a first-order IMF; if not, repeat the above operation based on h1(t) to obtain the mean line of the upper and lower envelopes of h1(t) minus get:

[0039]

[0040] At this time, check Can the required conditions be met? If so, Become a first-tier IMF. If not satisfied, Based on, repeat the above method k times until Until the IMF's conditions are met; Depend on and Mean line of upper and lower envelopes Subtracting them, we get:

[0041]

[0042] Where:

[0043] ——The first-order IMF, denoted as c1(t), contains the highest-frequency component in X(t);

[0044] Subtracting c1(t) from X(t) gives the lower frequency residual r1(t), expressed as:

[0045] r1(t)=X(t)-c1(t)

[0046] Consider r1(t) as a new signal and follow the above operation to get all r after multiple calculations. j (t), expressed as:

[0047] r j (t) = r j-1 (t)-c j (t) (j=2,3,…,n)

[0048] When the condition c is met n (t) or r n (t) is less than the given error or residual r n When X(t) is a monotonic function and IMF can no longer be extracted from it, the EMD decomposition process of the time series stops, and X(t) is finally decomposed into:

[0049]

[0050] Furthermore, in step 3), the NPU unit module completes the forward reasoning of the neural network. The neural network uses the structure of the reserve pool calculation model. The process of predicting the chaotic system is as follows:

[0051] The real measurable state variables of the sensor in the past period of time are known, and the state variables at that moment are recorded as u(t)∈R M ; The process of using the reserve pool to calculate and predict its state variables can be divided into three stages: training, verification and prediction; split the given data into training set, verification set and prediction set in a ratio of 8:1:1; in the training stage, take out a part of the data first, let the reserve pool idle for a period of time, and warm up the randomly initialized reservoir state; after warming up, use the remaining data of the training set to train the reserve pool parameter W out and c; then, the validation set is used to determine the optimal values ​​of the hyperparameters in the reserve pool calculation model; finally, the reserve pool calculation model is trained using the optimal hyperparameter combination, and the prediction error of the model is tested on the prediction set, where the prediction error selects the mean relative error;

[0052] In the training phase, the state variables of the system from -T to 0 are known and used as training data to predict the state variables at t>0. The training data is divided into three parts: (a) making the reservoir state independent of the random initial state, with a length of L a ; (b) used to train the reserve pool parameters W out and c, with a length of L b ; (c) used in Choose the optimal regularization coefficient β * , length L c ; The iteration equation of the reservoir state is as follows:

[0053] r(t+Δt)=tanh[Ar(t)+W in u(t)] (12)

[0054] where Δt is a relatively short time step; A∈R N×N is the weighted adjacency matrix of the reservoir, and the input u(t) is linearly input to the matrix W in ∈R N×M N nodes connected to the reservoir, the output is a linear function of the reservoir state

[0055]

[0056] Where W out ∈R M×N , c∈R M ;

[0057] A complete input-reservoir-output loop consists of equations (12) and (13), using the input u(t) to obtain the output To approximate the target value u(t+Δt); use a sparse random Erdos-Renyi network with an average degree of D to generate an adjacency matrix A, where each non-zero element obeys an independent uniform distribution [-a, a], so that the spectral radius of A is ρ; W in Each row of non-zero elements is selected from a uniform distribution on [-σ,σ], and σ can be called the model input weight ratio; the core of the reserve pool calculation is to train the reserve pool parameters W out and c, so that its output is close to the system state variables in the training phase; this is obtained by minimizing the following objective function:

[0058]

[0059] Where ||q|| 2 =q T q, regularization coefficient β>0 to prevent overfitting;

[0060] If the training is successful, the prediction phase begins. The output of the reserve pool calculation is used as the input for the next moment, so that the reserve pool system operates autonomously according to the following iterative equation:

[0061]

[0062] In the formula and c * is the optimal solution of equation (15), that is

[0063]

[0064] in I is the N×N identity matrix, δR means the lth column is The matrix of , δU is similar.

[0065] The present invention provides an intelligent real-time sensor signal compensation system and method based on NPU, which is designed to meet the application of sensor information fusion and compensation algorithm, and has the advantages of strong real-time and high precision. The present invention adopts a method combining software and hardware, and the system is mainly composed of a data transmission interface, a central processing unit, and a multi-core NPU chip. It aims to compensate high-frequency sensor data in real time, thereby significantly improving the accuracy and reliability of the data. The method of the present invention utilizes an advanced neural network processing unit (NPU) and an optimized algorithm architecture to achieve rapid compensation and adjustment of sensor signals, and can effectively resist environmental noise and interference. At the same time, through neural network adaptive learning and multi-sensor data fusion, the robustness of the system under different working conditions is enhanced, meeting the high requirements for real-time and accuracy of signal compensation in fields such as autonomous driving and intelligent manufacturing. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 is a system block diagram of the present invention;

[0067] Figure 2 This is the hardware data flow diagram of the present invention. DETAILED DESCRIPTION

[0068] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0069] See also Figure 1The present invention includes a high-speed bus transceiver module, a central processing module and an NPU unit module. The high-speed bus transceiver module is connected to the central processing module, and the central processing module is connected to the NPU unit module. The high-speed bus transceiver module is used for signal acquisition and transmission, and receives or sends data from an external computer or sensor. The central processing module is used for signal transfer and preprocessing, and is responsible for transferring and distributing the data in the high-speed bus transceiver module; performing data preprocessing on the data received or sent by the high-speed bus transceiver module, including normalization, standardization, and dimension scaling operations; performing feature extraction on the processed data, including physical feature extraction, statistical feature extraction, and frequency feature extraction; the NPU unit module is used for the deployment and execution of the neural network compensation algorithm; it is responsible for completing the forward reasoning of the neural network algorithm, real-time analysis and compensation of sensor signals, and returning the results to the central processing module for data processing and transfer, and finally outputting through the high-speed bus transceiver module.

[0070] The system of the present invention receives sensor data through a high-speed bus transceiver module, and after being parsed by a central processing module, transmits the data to an NPU unit module for analysis, correction and compensation. The corrected and compensated data can be returned to an external system through the central processing module and the high-speed bus transceiver module.

[0071] The high-speed bus transceiver module adopts a 1394 bus transceiver module or a signal transceiver module, and the 1394 bus transceiver module or the signal transceiver module is connected to an external computer or a sensor system to collect data.

[0072] The central processing module uses CPU or DSP as the processing carrier.

[0073] The NPU unit module uses the neural network acceleration module NPU as the carrier for deploying neural network algorithms.

[0074] See also Figure 2 In the method of a specific embodiment of the present invention, the high-speed bus transceiver module is a data transmission interface module, which is equipped with a signal transmission protocol. This embodiment is specifically equipped with a 1394 signal transmission protocol, which is intended to achieve high-speed data transmission and efficient device interconnection. Its workflow is described as follows. First, the system receives data signals from external devices through the 1394 module to ensure the stability and integrity of the signal. During the data transmission process, the module adopts an asynchronous or synchronous transmission mode and supports the switching of multiple data rates. Next, the received data is parsed and processed by the control logic inside the module, and the data packets are packaged and reorganized as needed. In the sending stage, the module sends the processed data to the target device through the 1394 signal transmission protocol to achieve high-bandwidth real-time data transmission. Finally, the system can adjust the transmission parameters according to the feedback of the received signal to optimize the overall communication performance.

[0075] The central processing module is equipped with data processing, data transfer and feature extraction algorithms: In most cases, there are class imbalances and outliers in the data set to be trained, which may affect the training and reasoning of the neural network model. The data set required by this system is sensor sequence data, and the prediction task type is a regression task, so there is no class imbalance in the original data.

[0076] Cleaning "dirty" data is the most basic preprocessing work, which mainly focuses on correcting missing values, outliers / outliers, redundant attributes, smoothing noise data, etc. In this section, Newton interpolation method is used to fill missing values ​​and replace outliers. The main implementation process and principle are as follows:

[0077] 1) Find the n known point pairs (x1,y1),(x2,y2)…(x n ,y n ) all order difference quotient formulas

[0078]

[0079]

[0080] 2) Combine the above difference quotient formulas to establish the following interpolation polynomial f(x):

[0081]

[0082] in:

[0083]

[0084] R(x)=(x-x1)(x-x2)…(x n )f[x n ,x n-1 ,…,x1,x] (5)

[0085] P(x) is the Newton interpolation approximation function, and R(x) is the error function.

[0086] 3) Substitute the point x corresponding to the missing value into the interpolation polynomial to obtain the approximate value f(x) of the missing value.

[0087] The data transfer algorithm mainly reads and writes data from registers, aiming to complete the data interaction between the data interface module and the NPU module to improve data transfer efficiency, reduce latency and improve the overall performance of the system.

[0088] Feature extraction algorithms are divided into physical feature extraction, statistical feature extraction, and frequency domain feature extraction. Among them, physical feature extraction of data uses interpretable physical formulas to convert raw data into higher-level and more abstract feature representations, and can convert different types of data into unified features, thereby reducing the dimension of the data. This helps to reduce the complexity of the neural network model and the computational burden during training, while improving the generalization ability of the model. Secondly, by extracting the physical features of the data, noise and irrelevant information can be removed, so that the neural network pays more attention to the task-related features in the data. This helps to improve the robustness of the model to the input data, so that it performs better in the face of noise and changes; statistical feature extraction can help to mine hidden information and potential laws in the data and make full use of the information value of the data. By extracting different statistical features, the characteristics of the data can be described more comprehensively, and the utilization rate and information density of the data can be improved. This case mainly uses the Pearson correlation coefficient method, the Spearman correlation coefficient method, the distance correlation coefficient method, the principal component analysis (PCA) method, and the weighted moving average linear regression analysis method to extract statistical features of the raw data; frequency feature extraction, frequency feature extraction can effectively analyze the periodicity and frequency components in the signal, thereby revealing the dynamic change characteristics of the data. This process improves the depth and accuracy of data analysis by identifying and extracting the main frequency components in the signal. This case mainly uses the empirical mode decomposition (EMD) method to extract the frequency features of the original signal. Through EMD, complex signals can be decomposed into multiple intrinsic mode functions (IMFs), thereby more clearly capturing the changes in different frequency components and improving the signal's analysis capabilities and feature description. In the EMD process, each IMF needs to have the following two elements:

[0089] 1) In the entire data segment, the number of extreme values ​​is the same as the number of points crossing the time axis or differs by no more than 1.

[0090] 2) At any point in the data segment, the mean of the envelope formed by the local maximum and minimum points is 0.

[0091] The decomposition process using the EMD method is as follows:

[0092] First, based on the local upper and lower extreme points of the original time signal X(t), the upper and lower envelopes of X(t) are obtained. The mean of the upper and lower envelopes is calculated to obtain the mean line m1(t). Subtracting X(t) from m1(t) yields equation (6):

[0093] h1(t)=X(t)-m1(t) (6)

[0094] Determine whether h1(t) can meet the two requirements of IMF. If it does, h1(t) is a first-order IMF. If it does not, repeat the above operation based on h1(t) to obtain the mean line of the upper and lower envelopes of h1(t). minus We get formula (7):

[0095]

[0096] At this time, check Can the required conditions be met? If so, Become a first-tier IMF. If not satisfied, Based on, repeat the above method k times until Until the IMF's conditions are met. Depend on and Mean line of upper and lower envelopes Subtracting them, we get:

[0097]

[0098] Where:

[0099] ——The first-order IMF, denoted as c1(t), contains the highest frequency component in X(t).

[0100] Subtracting c1(t) from X(t) yields the lower frequency residual r1(t), expressed as formula (9):

[0101] r1(t)=X(t)-c1(t) (9)

[0102] Consider r1(t) as a new signal and follow the above operation to get all r after multiple calculations. j (t), expressed as:

[0103] r j (t) = r j-1 (t)-c j (t)(j=2,3,…,n) (10)

[0104] When the condition c is met n (t) or r n (t) is less than the given error or residual r n When (t) is a monotonic function and IMF can no longer be extracted from it, the EMD decomposition process of the time series stops, and X(t) is finally decomposed into the form of formula (11):

[0105]

[0106] EMD is an adaptive decomposition method that does not require prior assumptions about the mathematical form or basis functions of the signal. It decomposes the signal by finding the local characteristics of the signal at different time scales, thereby better capturing the local oscillation components of the signal. The ability of EMD is used to decompose complex output labels into easy-to-handle frequency components, and the accuracy and generalization ability of the model are improved by predicting each component separately.

[0107] In practical applications, EMD is generally used to decompose the signal to be predicted (the expected result is decomposed in the training phase), and each modal component is modeled and predicted after completion. Finally, the predicted modal components are added to obtain the original output features. Using the decomposed modal components for data prediction can reduce the nonlinearity and non-stationarity of the original sequence. Secondly, the input variables of the EMD decomposition model can be used to deeply extract the frequency characteristics of the input variables to expand the representation dimension of the data, and the frequency characteristics of each input data can be deeply integrated using a neural network to obtain the final prediction result.

[0108] Given the poor versatility of neural network algorithms in different scenarios, this step involves customizing neural network algorithms, including custom model design, custom model compilation, and custom model execution. Model design includes but is not limited to LSTM models, MLP models, Transformer models, etc. The model compilation tool is selected based on the NPU platform. If the selected NPU model is HKN201, the NNIE framework compiler to which it belongs is selected. The model execution API is selected based on the NPU platform. If the selected NPU model is HKN201, the NNIE framework to which it belongs is selected for reasoning.

[0109] The NPU unit module is equipped with a neural network to complete the forward reasoning of the neural network. The neural network can use the structure of the reserve pool calculation model. The process of predicting the chaotic system is as follows. The real measurable state variables of the sensor over the past period of time are known, and the state variables at the moment are recorded as u(t)∈R M The process of using the reserve pool to calculate and predict its state variables can be divided into three stages: training, validation, and prediction. Split the given data into training set, validation set, and prediction set in a ratio of 8:1:1. In the training stage, take out a part of the data (for example, one tenth of the training set) and let the reserve pool idle for a while to warm up the randomly initialized reservoir state. After warming up, use the remaining data of the training set to train the reserve pool parameters W out and c. Next, the validation set is used to determine the optimal values ​​of the hyperparameters in the reserve pool calculation model. Finally, the reserve pool calculation model is trained using the optimal hyperparameter combination, and the prediction error of the model is tested on the prediction set, where the prediction error selects the mean relative error.

[0110] In the training phase, the state variables of the system from -T to 0 are known and used as training data to predict the state variables at t>0. The training data is divided into three parts: (a) Make the reservoir state independent of the random initial state, with a length of L a ; (b) used to train the reserve pool parameters W out and c, with a length of L b ; (c) used in Choose the optimal regularization coefficient β * , length L c The iteration equation of the reservoir state is as follows:

[0111] r(t+Δt)=tanh[Ar(t)+W in u(t)] (12)

[0112] Where Δt is a relatively short time step. A∈R N×N is the weighted adjacency matrix of the reservoir, and the input u(t) is linearly input to the matrix W in ∈R N×M N nodes connected to the reservoir, the output is a linear function of the reservoir state

[0113]

[0114] Where W out ∈R M×N , c∈R M .

[0115] A complete input-reservoir-output loop consists of equations (12) and (13), using the input u(t) to obtain the output To approximate the target value u(t+Δt). Generate the adjacency matrix A using a sparse random Erdos-Renyi network with an average degree of D, where each non-zero element is independently and uniformly distributed between [-a, a], so that the spectral radius of A is ρ. W in Each row of non-zero elements is selected from a uniform distribution on [-σ,σ]. We can call σ the model input weight ratio. The core of the reserve pool calculation is to train the reserve pool parameters W out and c, so that its output is close to the system state variables in the training phase. This is obtained by minimizing the following objective function:

[0116]

[0117] Where ||q|| 2 =q T q, regularization coefficient β>0 to prevent overfitting.

[0118] If the training is successful, the prediction phase begins. The output of the reserve pool calculation is used as the input for the next moment, so that the reserve pool system operates autonomously according to the following iterative equation:

[0119]

[0120] In the formula and c * is the optimal solution of equation (15), that is

[0121]

[0122] in I is the N×N identity matrix, δR means the lth column is The matrix of , δU is similar.

[0123] In order to evaluate the cash box reasoning effect of the NPU module, this embodiment uses the quantitative method provided by the error quantification index to evaluate the prediction performance of the model to help determine whether the model has achieved the expected effect. To evaluate the prediction effect of the model, the mean absolute error (MAE) is selected to measure the error when the absolute value of the true value is less than 1, the mean absolute percentage error (MAPE) is used to measure the error when the absolute value of the true value is greater than 1, and the determination coefficient (R2) and the average error are used to measure the overall prediction effect. The corresponding calculation formula is as follows:

[0124]

[0125] Where: n is the total number of predicted values, y i represents the true value, represents the predicted value, Represents the mean of the true values.

[0126] MAE and MAPE represent the degree of deviation between the predicted value and the true value. The closer to 0, the higher the model accuracy. R2 is used to measure the degree of fit between the predicted value and the true value. Its value is generally in the range of [0,1]. The higher the R2, the closer the predicted value is to the true value, and the higher the model prediction accuracy. The average error is to calculate the relative error when the absolute value of the true value is greater than 1, and the absolute error when the absolute value of the true value is less than 1, and finally take the average value.

[0127] The above are only specific embodiments disclosed in the present invention, but the protection scope of the present invention is not limited thereto. The protection scope of the present invention shall be based on the protection scope of the claims.

[0128] The content of the present invention and the technical content not specifically described in the above embodiments are the same as the prior art.

[0129] The present invention is not limited to the above embodiments, and all of the contents of the present invention can be implemented and have the above good effects.

Claims

1. An intelligent real-time sensor signal compensation system based on NPU, characterized by: The NPU-based intelligent real-time sensor signal compensation system includes a high-speed bus transceiver module, a central processing module and an NPU unit module. The high-speed bus transceiver module is connected to the central processing module, and the central processing module is connected to the NPU unit module. The high-speed bus transceiver module is used for signal acquisition and transmission, receiving or sending data from an external computer or sensor. The central processing module is used for signal transfer and preprocessing, and is responsible for transferring and distributing the data in the high-speed bus transceiver module; performing data preprocessing on the data received or sent by the high-speed bus transceiver module, including normalization, standardization, and dimensional scaling operations; performing feature extraction on the processed data, including physical feature extraction, statistical feature extraction, and frequency feature extraction; the NPU unit module is used for the deployment and execution of the neural network compensation algorithm; is responsible for completing the forward reasoning of the neural network algorithm, real-time analysis and compensation of sensor signals, and returning the results to the central processing module for data processing and transfer, and finally outputting through the high-speed bus transceiver module.

2. The intelligent real-time sensor signal compensation system based on NPU according to claim 1, characterized in that: The high-speed bus transceiver module adopts a 1394 bus transceiver module or a signal transceiver module, and the 1394 bus transceiver module or the signal transceiver module is connected to an external computer or a sensor system to collect and transmit data.

3. The NPU-based intelligent real-time sensor signal compensation system according to claim 2 is characterized in that the central processing module uses a CPU or a DSP as a processing carrier.

4. The intelligent real-time sensor signal compensation system based on NPU according to claim 3 is characterized in that: The NPU unit module uses the neural network acceleration module NPU as a carrier for deploying the neural network algorithm.

5. A method for implementing the NPU-based intelligent real-time sensor signal compensation system of claim 1, characterized in that: The method comprises the following steps: 1) Signal acquisition and transmission; the high-speed bus transceiver module receives or sends data from external computers or sensors; 2) Signal transfer and preprocessing: The central processing module transfers and distributes the data in the high-speed bus transceiver module; performs data preprocessing on the data received or sent by the high-speed bus transceiver module, including normalization, standardization, and dimension scaling operations; performs feature extraction on the processed data, including physical feature extraction, statistical feature extraction, and frequency feature extraction; 3) Deployment and execution of neural network compensation algorithm; the NPU unit module is responsible for completing the forward reasoning of the neural network algorithm; 4) The NPU unit module returns the results to the central processing module for data processing and transfer.

6. The method of the NPU-based intelligent real-time sensor signal compensation system according to claim 5, characterized in that: In the step 1), the high-speed bus transceiver module is equipped with a signal transmission protocol, such as a 1394 signal transmission protocol, and the specific steps are as follows: 1.1) The system receives data signals from external devices through a high-speed bus transceiver module to ensure the stability and integrity of the signal; 1.2) During data transmission, the high-speed bus transceiver module adopts asynchronous or synchronous transmission mode and supports switching of multiple data rates; 1.3) The received data is parsed and processed through the control logic inside the high-speed bus transceiver module, and the data packets are packaged and reassembled as needed; 1.4) In the sending stage, the high-speed bus transceiver module sends the processed data to the central processing module through the 1394 signal transmission protocol, realizing high-bandwidth real-time data transmission.

7. The method of the NPU-based intelligent real-time sensor signal compensation system according to claim 6, characterized in that: In the step 2), the central processing module is equipped with data preprocessing, data transfer algorithm and feature extraction algorithm. Data preprocessing includes cleaning "dirty" data to correct missing values, outliers / outliers, redundant attributes, and smooth noise data in the original data set; the data transfer algorithm reads and writes data from the register to complete the data interaction between the data interface module and the NPU module to improve the data transfer efficiency, reduce latency and improve the overall performance of the system; the feature extraction algorithm is divided into physical feature extraction, statistical feature extraction and frequency feature extraction. The physical feature extraction uses an interpretable physical formula to convert the original data into a higher-level and more abstract feature representation, and can convert different types of data into a unified feature. The statistical feature extraction extracts the original data through the Pearson correlation coefficient method, the Spearman correlation coefficient method, the distance correlation coefficient method, the principal component analysis method or the weighted moving average linear regression analysis method; Frequency feature extraction uses empirical mode decomposition method to extract frequency features of original signals.

8. The method of the NPU-based intelligent real-time sensor signal compensation system according to claim 7, characterized in that: The specific steps of cleaning the "dirty" data in step 2) are as follows: 1) Find the n known point pairs (x1,y1),(x2,y2)…(x n ,y n ) all order difference quotient formulas (1)(2) 2) Combine the above difference quotient formulas to establish the following interpolation polynomial f(x): f(x)=f(x1)+(x-x1)f[x2,x1]+(x-x1)(x-x2)f[x3,x2,x1]+(x-x1)(x-x2)(x-x3)f[x4,x3,x2,x1]+…+(x-x1)(x-x2)…(x-x n-1 )f[x n ,x n-1 ,…,x2,x1]+(x-x1)(x-x2)…(x-x n )f[x n ,x n-1 ,…,x1,x] =P(x)+R(x) in: P(x)=f(x1)+(x-x1)f[x2,x1]+(x-x1)(x-x2)f[x3,x2,x1]+ (x-x1)(x-x2)(x-x3)f[x4,x3,x2,x1]+…+ (x-x1)(x-x2)…(xx n-1 )f[x n ,x n-1 ,…,x2,x1] R(x)=(x-x1)(x-x2)…(xx n )f[x n ,x n-1 ,…,x1,x] P(x) is the Newton interpolation approximation function, and R(x) is the error function; 3) Substitute the point x corresponding to the missing value into the interpolation polynomial to obtain the approximate value f(x) of the missing value.

9. The method of the NPU-based intelligent real-time sensor signal compensation system according to claim 7, characterized in that: The specific steps of the empirical mode decomposition method in step 2) are as follows: First, according to the local upper and lower extreme points of the original time signal X(t), the upper and lower envelopes of X(t) are obtained; the mean of the upper and lower envelopes is calculated to obtain the mean line m1(t); X(t) is subtracted from m1(t) to obtain: h1(t)=X(t)-m1(t) Determine whether h1(t) can meet the two requirements of IMF; if so, h1(t) is a first-order IMF; if not, repeat the above operation based on h1(t) to obtain the mean line of the upper and lower envelopes of h1(t) minus get: At this time, check Can the required conditions be met? If so, Become a first-tier IMF. If not satisfied, Based on, repeat the above method k times until Until the IMF's conditions are met; Depend on and Mean line of upper and lower envelopes Subtracting them, we get: Where: ——The first-order IMF, denoted as c1(t), contains the highest-frequency component in X(t); Subtracting c1(t) from X(t) gives the lower frequency residual r1(t), expressed as: r1(t)=X(t)-c1(t) Consider r1(t) as a new signal and follow the above operation to get all r after multiple calculations. j (t), expressed as: r j (t)=r j-1 (t)-c j (t)(j=2,3,…,n) When the condition c is met n (t) or r n (t) is less than the given error or residual r n When X(t) is a monotonic function and IMF can no longer be extracted from it, the EMD decomposition process of the time series stops, and X(t) is finally decomposed into:

10. The method of the NPU-based intelligent real-time sensor signal compensation system according to claim 9, characterized in that: In step 3), the NPU unit module completes the forward reasoning of the neural network. The neural network uses the structure of the reserve pool calculation model. The process of predicting the chaotic system is as follows: The real measurable state variables of the sensor in the past period of time are known, and the state variables at that moment are recorded as u(t)∈R M ; The process of using the reserve pool to calculate and predict its state variables can be divided into three stages: training, verification and prediction; Split the given data into training set, validation set and prediction set in a ratio of 8:1:1; in the training stage, take out a part of the data first, let the reserve pool idle for a while, and warm up the randomly initialized reservoir state; after warming up, use the remaining data of the training set to train the reserve pool parameter W out and c; then, the validation set is used to determine the optimal values ​​of the hyperparameters in the reserve pool calculation model; finally, the reserve pool calculation model is trained using the optimal hyperparameter combination, and the prediction error of the model is tested on the prediction set, where the prediction error selects the mean relative error; In the training phase, the state variables of the system from -T to 0 are known and used as training data to predict the state variables at t>0. The training data is divided into three parts: (a) making the reservoir state independent of the random initial state, with a length of L a ; (b) used to train the reserve pool parameters W out and c, with a length of L b ; (c) For use in Choose the optimal regularization coefficient β * , length L c ; The iteration equation of the reservoir state is as follows: r(t+Δt)=tanh[Ar(t)+W in u(t)] (12) where Δt is a relatively short time step; A∈R N×N is the weighted adjacency matrix of the reservoir, and the input u(t) is linearly input to the matrix W in ∈R N×M N nodes connected to the reservoir, the output is a linear function of the reservoir state Where W out ∈R M×N , c∈R M ; A complete input-reservoir-output loop consists of equations (12) and (13), using the input u(t) to obtain the output To approximate the target value u(t+Δt); Generate an adjacency matrix A using a sparse random Erdos-Renyi network with average degree D, where each non-zero element is independently and uniformly distributed between [-a, a], so that the spectral radius of A is ρ; W in Each row of non-zero elements is selected from a uniform distribution on [-σ,σ], and σ can be called the model input weight ratio; the core of the reserve pool calculation is to train the reserve pool parameters W out and c, so that its output is close to the system state variables in the training phase; this is obtained by minimizing the following objective function: Where ||q|| 2 =q T q, regularization coefficient β>0 to prevent overfitting; If the training is successful, the prediction phase begins. The output of the reserve pool calculation is used as the input for the next moment, so that the reserve pool system operates autonomously according to the following iterative equation: In the formula and c * is the optimal solution of equation (15), that is in I is the N×N identity matrix, δR means the lth column is The matrix of , δU is similar.