Nonlinear error suppression system and sensor based on neural network

文档序号:103904 发布日期:2021-10-15 浏览:39次 中文

阅读说明:本技术 一种基于神经网络的非线性误差抑制系统和传感器 (Nonlinear error suppression system and sensor based on neural network ) 是由 周斌 魏琦 郜振翼 张嵘 于 2021-07-12 设计创作,主要内容包括:本发明属于传感器信号处理技术领域,涉及一种基于神经网络的非线性误差抑制系统和传感器,包括:滑动滤波模块、MLP处理模块和参数存储模块;滑动滤波模块,用于根据滤波算法对输入信号进行滤波处理;MLP处理模块,用于根据神经网络算法对经过滤波处理的信号进行补偿,获得下一时刻的误差补偿值,用误差补偿值减去经过滤波处理的信号获得经过补偿的信号;参数存储模块,用于存储滑动滤波模块和MLP处理模块的信号和参数。其将滤波算法和神经网络算法结合,对传感器输出信号中的非线性误差进行处理,实时地进行误差补偿,支持最高3.2MHz的信号采样频率。(The invention belongs to the technical field of sensor signal processing, and relates to a nonlinear error suppression system and a sensor based on a neural network, which comprise: the device comprises a sliding filtering module, an MLP processing module and a parameter storage module; the sliding filtering module is used for filtering the input signal according to a filtering algorithm; the MLP processing module is used for compensating the filtered signals according to a neural network algorithm to obtain an error compensation value of the next moment, and subtracting the filtered signals from the error compensation value to obtain compensated signals; and the parameter storage module is used for storing the signals and parameters of the sliding filtering module and the MLP processing module. The method combines a filtering algorithm and a neural network algorithm, processes nonlinear errors in output signals of the sensor, compensates the errors in real time, and supports the signal sampling frequency of 3.2MHz at most.)

1. A neural network-based nonlinear error suppression system, comprising: the device comprises a sliding filtering module, an MLP processing module and a parameter storage module;

the sliding filtering module is used for filtering the input signal according to a filtering algorithm;

the MLP processing module is used for compensating the filtered signals according to a neural network algorithm to obtain an error compensation value of the next moment, and subtracting the filtered signals from the error compensation value to obtain compensated signals;

and the parameter storage module is used for storing the signals and parameters of the sliding filtering module and the MLP processing module.

2. The neural network-based nonlinear error suppression system of claim 1, wherein the sliding filter module comprises a plurality of intermediate sum registers, each intermediate sum register buffering an input signal, wherein a value of a k-th intermediate sum register is equal to a value of a k-1-th intermediate sum register plus a current input signal, after a delay of M clock cycles, an M-1-th intermediate register calculates a sum of M consecutive sample data, and averages the M sample data sums for continuously outputting the filtered signal after the delay of M clock cycles.

3. The neural network-based nonlinear error suppression system of claim 2, wherein the sliding filtering module uses a sliding frame to smooth the input signal, and the calculation formula is as follows:

wherein X (k + i) is the input signal of the kth intermediate sum register without being filtered,for the filtered signal, k denotes the kth intermediate sum register input signal.

4. The neural network-based nonlinear error suppression system of claim 1, wherein the MLP processing module includes a multiplication sub-module, an addition sub-module, an activation function sub-module, and a dot product sub-module;

the multiplication sub-module is used for performing multiplication on the filtered input signal and a characteristic weight coefficient matrix of the neural network to generate a characteristic array corresponding to the input signal;

the addition operation submodule is used for adding the characteristic array obtained by the multiplication operation submodule and the characteristic offset matrix;

the activation function submodule is used for updating the characteristic weight coefficient matrix of the neural network to obtain an optimal characteristic weight coefficient matrix;

and the dot product operation submodule is used for performing dot product operation on the calculation result of the addition operation submodule and the optimal characteristic weight coefficient matrix to obtain an error compensation value of the signal.

5. The neural network-based nonlinear error suppression system of claim 4, wherein the activation function is formulated as:

where α is a constant, x is the input vector to the activation function module, and f (x) is the output vector to the activation function module.

6. The neural network-based nonlinear error suppression system of claim 1, wherein the parameter storage module is a storage array comprised of a register file.

7. The neural network-based nonlinear error suppression system of any one of claims 1-6, further comprising a clock divider module for configuring a running clock of the system and an operating clock of each module.

8. The neural network-based nonlinear error suppression system of claim 7, wherein the input clock of the clock dividing module is from outside the system, and a low-speed clock is output by configuring a dividing coefficient, the low-speed clock is used for sampling a signal and driving the sliding filter module, and simultaneously an undivided clock is output, the undivided clock is used for driving the MLP processing system, and the undivided clock and the low-speed clock satisfy the following formula:

f=fs×(N+4)

where f is the undivided clock, fsIs a low speed clock, N is an input signalThe number of the cells.

9. The neural network-based nonlinear error mitigation system of any of claims 1-6, further comprising an APB interface module for inter-system data transfer.

10. A sensor is characterized by comprising a data acquisition module and a data processing module; the data processing module comprises a nonlinear error suppression system based on a neural network as claimed in any one of claims 1 to 9, and is used for suppressing nonlinear errors of signals in the data acquisition module.

Technical Field

The invention relates to a nonlinear error suppression system and a sensor based on a neural network, belongs to the technical field of sensor signal processing, and particularly relates to the technical field of nonlinear error suppression of sensors.

Background

High-precision sensor signals are important for signal measurement and system control, and are also main research targets in the field of sensor measurement and control. Mechanical noise, coupling errors, system noise, etc. act on the output signal of the sensor, so that the output signal contains real measured values and error components. The linear error in the error component can be compensated by calibration, while the non-linear error is difficult to correct by the equipment, and an additional suppression scheme is required.

Common non-linear error suppression schemes include filtering algorithms and modeling compensation schemes. The filtering scheme is to design a filter to remove the sensor error signal, and the scheme needs to perform spectrum analysis on the error signal in advance, obtain frequency information of an error component and design a corresponding filter. The filtering scheme has a good error suppression effect on non-linear errors including the determined frequency components. The modeling compensation scheme considers the error signal as a time series signal and establishes a time series model of the error. The compensation of the output signal is performed by predicting the error value at the next time. Typical modeling schemes include statistical models such as a sliding autoregressive mean model and a nonlinear sliding autoregressive model. And analyzing the signals by the cosine of the statistical model to obtain statistical characteristics, and calculating parameters of the fitting model. These schemes perform parameter calculation according to a specific paradigm, but the error suppression accuracy is limited by the accuracy of modeling. In recent years, a modeling scheme based on a neural network has a remarkable effect on the aspect of nonlinear error suppression, the model precision is high, but the time and space complexity of calculation is too large, and the modeling scheme is difficult to apply to real-time and online scenes.

Disclosure of Invention

In view of the above problems, it is an object of the present invention to provide a nonlinear error suppression system and a sensor based on a neural network, which combine a filtering algorithm and a neural network algorithm to process the nonlinear error in the output signal of the sensor, and perform error compensation in real time.

In order to achieve the purpose, the invention adopts the following technical scheme: a neural network-based nonlinear error suppression system, comprising: the device comprises a sliding filtering module, an MLP processing module and a parameter storage module; the sliding filtering module is used for filtering the input signal according to a filtering algorithm; the MLP processing module is used for compensating the filtered signals according to a neural network algorithm and subtracting the filtered signals from an error compensation value to obtain compensated signals; and the parameter storage module is used for storing the signals and parameters of the sliding filtering module and the MLP processing module.

Further, the sliding filtering module comprises a plurality of middle registers, each middle register caches an input signal, wherein the value of the kth middle register is equal to the value of the (k-1) th middle register plus the current input signal, after M clock cycles are delayed, the (M-1) th middle register calculates the sum of continuous M sampling data, and averages the M sampling data sums for continuously outputting the filtering signal after M clock cycles are delayed.

Further, the sliding filtering module adopts a sliding frame to smooth the input signal, and the calculation formula is as follows:

wherein X (k + i) is the input signal of the kth intermediate sum register without being filtered,for the filtered signal, k denotes the kth intermediate sum register input signal.

Furthermore, the MLP processing module comprises a multiplication operation submodule, an addition operation submodule, an activation function submodule and a dot product operation submodule; the multiplication sub-module is used for performing multiplication on the filtered input signal and the characteristic weight coefficient matrix of the neural network to generate a characteristic array corresponding to the input signal; the addition operation submodule is used for adding the characteristic array obtained by the multiplication operation submodule and the characteristic offset matrix; the activation function submodule is used for updating the characteristic weight coefficient matrix of the neural network to obtain an optimal characteristic weight coefficient matrix; and the dot product operation submodule is used for performing dot product operation on the calculation result of the addition operation submodule and the optimal characteristic weight coefficient matrix to obtain an error compensation value of the signal.

Further, the formula of the activation function is:

where α is a constant, x is the input vector to the activation function module, and f (x) is the output vector to the activation function module.

Further, the parameter storage module is a storage array composed of a register file.

Further, the nonlinear error suppression system further comprises a clock dividing module for configuring an operation clock of the system and an operation clock of each module.

Furthermore, the input clock of the clock frequency division module is from outside the system, a low-speed clock is output by configuring a frequency division coefficient, the low-speed clock is used for sampling signals and driving the sliding filter module, and simultaneously an undivided clock is output, the undivided clock is used for driving the MLP processing system, and the undivided clock and the low-speed clock meet the following formula:

f=fs×(N+4)

where f is the undivided clock, fsFor a low speed clock, N is the number of input signals.

Furthermore, the nonlinear error suppression system also comprises an APB interface module which is used for carrying out intersystem data transmission.

The invention also discloses a sensor, which comprises a data acquisition module and a data processing module; the data processing module comprises any one of the nonlinear error suppression systems based on the neural network, and is used for suppressing the nonlinear error of the signal in the data acquisition module.

Due to the adoption of the technical scheme, the invention has the following advantages:

1. the invention combines a filtering algorithm and a neural network algorithm, processes the nonlinear error in the output signal of the sensor, compensates the error in real time and supports the signal sampling frequency of 3.2MHz at most.

2. The invention processes the sequence data in the sensor to obtain the prediction data of the next moment, which can be used for not only the compensation of the prediction of the nonlinear error, but also the fitting and output prediction of the nonlinear system model.

3. The invention adopts the design scheme of the integrated circuit, is compatible with the APB interface, realizes the software configuration of the system parameters and can flexibly adjust the system parameters. The processing mode of the assembly line enables the compensation system to complete output compensation in a single clock cycle, and meets the requirements of real-time performance and online application.

4. The invention has three output modes, namely unprocessed direct output, filtering output and MLP compensation output, improves the flexibility of system work, and can adopt different output modes for signals according to actual requirements.

Drawings

FIG. 1 is a schematic diagram of a neural network based nonlinear error suppression system in accordance with an embodiment of the present invention;

FIG. 2 is a schematic diagram of a sliding filter module according to an embodiment of the invention;

FIG. 3 is a diagram of an MLP processing module in accordance with an embodiment of the present invention;

FIG. 4 is a schematic diagram of a clock divider module according to an embodiment of the invention;

fig. 5 is a schematic diagram of an APB interface module according to an embodiment of the present invention.

Detailed Description

The present invention is described in detail by way of specific embodiments in order to better understand the technical direction of the present invention for those skilled in the art. It should be understood, however, that the detailed description is provided for a better understanding of the invention only and that they should not be taken as limiting the invention. In describing the present invention, it is to be understood that the terminology used is for the purpose of description only and is not intended to be indicative or implied of relative importance.

The invention aims to provide a nonlinear error suppression system based on a neural network and a corresponding sensor, which are used for processing nonlinear errors in output signals of the sensor by combining a filtering algorithm and a neural network algorithm, performing error compensation in real time and supporting the signal sampling frequency of 3.2MHz at most. The solution of the invention is explained in detail below by means of two embodiments with reference to the accompanying drawings.

Example one

The embodiment discloses a nonlinear error suppression system based on a neural network, as shown in fig. 1, including: the device comprises a sliding filtering module, an MLP processing module and a parameter storage module.

And the sliding filtering module is used for filtering the input signal according to a filtering algorithm.

And the MLP processing module is used for compensating the filtered signals according to a neural network algorithm to obtain an error compensation value at the next moment, subtracting the filtered signals from the error compensation value to obtain compensated signals, and selecting to output unprocessed signals, signals after passing through the sliding filtering module or signals after passing through the MLP processing module according to the final output signals through a gating signal. The output mode improves the flexibility of system operation, and different output modes can be adopted for signals according to actual requirements.

And the parameter storage module is used for storing the signals and parameters of the sliding filtering module and the MLP processing module.

The sliding filter module, as shown in fig. 2, includes a plurality of intermediate registers, each intermediate register buffers an input signal, when each input signal arrives, the data in the register sequentially shifts to the right by one bit according to the address, the initial buffered data is lost, and the current sampling data is buffered in the 0 th buffered register. The value of the kth intermediate sum register is equal to the value of the kth-1 intermediate sum register plus the current input signal, the value of the 0 th register is equal to the current input signal, after M clock cycles are delayed, the M-1 th intermediate register calculates the sum of continuous M sampling data, and averages the M sampling data sum to continuously output a filtering signal after M clock cycles are delayed. I.e. multiplying the value of the M-1 intermediate sum register by 1/M to obtain a slip filtered signal. For the system, 1/M is a constant, configured through the APB interface module.

The sliding filtering module adopts a sliding frame to carry out smoothing processing on the input signal, and the calculation formula is as follows:

wherein X (k + i) is the input signal of the kth intermediate sum register without being filtered,for the filtered signal, k denotes the kth intermediate sum register input signal.

The MLP processing module, as shown in fig. 3, includes a multiplication operation sub-module, an addition operation sub-module, an activation function sub-module, and a dot product operation sub-module; the multiplication sub-module is used for performing multiplication on the filtered input signal and the characteristic weight coefficient matrix of the neural network to generate a characteristic array corresponding to the input signal; the addition operation submodule is used for adding the characteristic array obtained by the multiplication operation submodule and the characteristic offset matrix; the activation function submodule is used for updating the characteristic weight coefficient matrix of the neural network to obtain an optimal characteristic weight coefficient matrix; and the dot product operation submodule is used for performing dot product operation on the calculation result of the addition operation submodule and the optimal characteristic weight coefficient matrix to obtain an error compensation value of the signal. Wherein the characteristic bias is a dc bias of the output layer.

The formula for the activation function is:

where α is a constant, x is the input vector to the activation function module, and f (x) is the output vector to the activation function module.

In this embodiment, the parameter storage module is a storage array composed of a register file, and is configured to store signals and parameters of each module, where the parameters include a gating mode of an interface signal, a sliding frame size of a sliding filter circuit, a sliding filter multiplication coefficient, a hidden layer weight parameter of an MLP processing circuit, a hidden layer bias parameter, a constant α of an activation function, a frequency division coefficient of a frequency division circuit, and the like.

The nonlinear error suppression system further comprises a clock division module for configuring an operation clock of the system and an operation clock of each module. As shown in fig. 4, the input clock of the clock frequency dividing module is from outside the system, and a low-speed clock is output by configuring a frequency dividing coefficient, the low-speed clock is used for performing signal acquisition and driving the sliding filter module, and simultaneously an undivided clock is output, the undivided clock is used for driving the MLP processing system, and the undivided clock and the low-speed clock satisfy the following formula:

f=fs×(N+4)

where f is the undivided clock, fsFor a low speed clock, N is the number of input signals. The clock frequency division module comprises a counter, the counter is accumulated on the rising edge of the input clock, and after the counter is accumulated to a count value, the output clock register is turned over, so that the frequency division output of the clock is realized. The counting value of the counter is configured through the APB interface module to obtain different frequency division coefficients.

As shown in fig. 5, the nonlinear error suppression system further includes an APB interface module for performing intersystem data transmission. The APB interface module adopts APB2.0 protocol for encapsulation, and the interface circuit can read and write circuit parameters through an AMBA bus to configure compensation circuit parameters. The input signal is firstly subjected to bit width expansion so as to be converted into a signed 32-bit fixed point number, if the sampled data is signed and is less than 32 bits, the sampled data is sequentially connected from a high bit to a low bit through a selector, and the low bit is complemented by 0 to complete the expansion of the bit width to the 32 bits. For unsigned sampling signals, subtracting a constant 0x80000000 from the signals with the expanded bit width to obtain signed numbers; the sampled signal having a symbol is directly output. The two processing modes can be selected according to the form of the signal, and the configuration of the gating signal is carried out through an APB protocol.

Example two

Based on the same inventive concept, the embodiment discloses a sensor, which comprises a data acquisition module and a data processing module; the data processing module comprises any one of the nonlinear error suppression systems based on the neural network, and is used for suppressing the nonlinear error of the signal in the data acquisition module.

Finally, it should be noted that: the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting the same, and although the present invention is described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: modifications and equivalents may be made to the embodiments of the invention without departing from the spirit and scope of the invention, which is to be covered by the claims. The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application should be defined by the claims.

9页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种制作三维立体传感器的方法及传感器

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!