Multivariable filtering method and system based on FPGA
The fourth-order tensor parallelized Tucker decomposition and quantum particle swarm optimization algorithm are constructed through FPGA, and combined with extended Kalman filtering, the problems of low efficiency and inaccurate parameter setting in multivariate data processing are solved, achieving the optimal filtering effect in complex environments.
Patent Information
- Application Number
- CN202510366374.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2045-03-26
AI Technical Summary
The existing multivariate data processing methods are inefficient in high-dimensional data processing, and the filtering parameters are inaccurate, making it difficult to adaptively adjust in complex and changeable environments to achieve the best filtering effect.
The original data is synchronously collected through the multi-channel ADC of FPGA, fourth-order tensors are constructed and preprocessed, and the core tensors and factor matrices are extracted using the parallelized Tucker decomposition engine to construct a multivariate correlation matrix, and the parameter tuning is adjusted through quantum particle swarm optimization, combined with extended Kalman filtering to perform feedback adjustment.
It realizes efficient data structure and high-quality input, improves data processing speed and accuracy, and adaptively adjusts filter parameters in complex and changeable environments to achieve the best filtering effect.
Smart Images

Figure CN120342360A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of signal processing and optimization, and particularly to a multi-variable filtering method and system based on FPGA. Background Art
[0002] In the field of modern signal processing, especially in the real-time processing and analysis of multi-variable data, efficient data acquisition and filtering technologies are particularly important. With the continuous progress of sensor technology and computing platforms (such as FPGA), multi-channel ADC synchronous acquisition technology has been widely applied and developed. This technology can simultaneously obtain data from multiple sensors and perform real-time processing through a high-performance computing platform.
[0003] Existing multi-variable data processing methods still have deficiencies. First, they rely on traditional matrix decomposition algorithms, which are inefficient in processing high-dimensional data and difficult to meet real-time requirements. Second, most existing filtering methods are based on single-parameter settings and lack in-depth understanding and optimization of multi-variable correlations. This makes it difficult to adaptively adjust parameters to achieve the best filtering effect under complex and changing environmental conditions. Summary of the Invention
[0004] In view of the above existing problems, the present invention is proposed.
[0005] Therefore, the present invention provides a multi-variable filtering method based on FPGA, which solves the problems of low efficiency in high-dimensional data processing and inaccurate tuning of filtering parameters in the prior art.
[0006] To solve the above technical problems, the present invention provides the following technical solutions:
[0007] In a first aspect, the present invention provides a multi-variable filtering method based on FPGA, which includes synchronously acquiring raw data including uranium ion fluorescence signals, temperature, and humidity through the multi-channel ADC of the FPGA, constructing the raw data into a fourth-order tensor including time, channel, wavelet frequency band, and environmental variables, and performing preprocessing; decomposing the preprocessed fourth-order tensor through the parallel Tucker decomposition engine of the FPGA to obtain a core tensor and factor matrices, and constructing a multi-variable correlation matrix; realizing quantum particle swarm optimization parameter tuning for the multi-variable correlation matrix within the FPGA to generate global optimal parameters; dynamically filtering the global optimal parameters through the extended Kalman filter within the FPGA to generate filtered signals and residual sequences; calculating dynamic signal-to-noise ratio improvement amounts and channel correlation errors based on the residual sequences, and performing feedback adjustment.
[0008] A preferred solution of the FPGA-based multivariable filtering method of the present invention is as follows: constructing the original data into a fourth-order tensor including time, channels, wavelet frequency bands, and environmental variables, and performing preprocessing. The specific steps are as follows,
[0009] Perform wavelet transform on the original signal data to obtain wavelet coefficients, perform non-linear coupling in combination with environmental variables, and generate a fourth-order tensor through time-frequency domain data fusion;
[0010] Preprocess the fourth-order tensor through cross-dimensional interaction modeling and tensor normalization and storage.
[0011] A preferred solution of the FPGA-based multivariable filtering method of the present invention is as follows: decomposing the preprocessed fourth-order tensor through the FPGA parallel Tucker decomposition engine. The specific steps are as follows,
[0012] Through tensor block division and parallel expansion, divide the fourth-order tensor into sub-blocks, and perform Mode-n expansion on each sub-block to generate an expansion matrix;
[0013] Calculate the covariance matrix of each expansion matrix, perform SVD decomposition on the covariance matrix, and obtain the eigenvector matrix.
[0014] A preferred solution of the FPGA-based multivariable filtering method of the present invention is as follows: obtaining the core tensor and factor matrices, and constructing a multivariable correlation matrix. The specific steps are as follows,
[0015] Perform weighted merging on the eigenvector matrices of all sub-blocks to generate a global factor matrix;
[0016] Calculate the initial core tensor according to the global factor matrix;
[0017] Define an optimization objective function, and use the gradient descent method to iteratively optimize the initial core tensor to generate a core tensor;
[0018] Construct a multivariable correlation matrix through non-zero element analysis of the core tensor, generation and normalization of the correlation matrix.
[0019] A preferred solution of the FPGA-based multivariable filtering method of the present invention is as follows: realizing quantum particle swarm optimization parameter tuning within the FPGA for the multivariable correlation matrix to generate global optimal parameters. The specific steps are as follows,
[0020] Generate an initial particle position according to the multivariable correlation matrix, initialize the particle swarm, and encode the parameters to be optimized as particle positions;
[0021] Update the particle positions through the quantum particle swarm optimization algorithm to generate global optimal parameters.
[0022] This is a preferred solution for the FPGA-based multivariable filtering method of the present invention. Among them: the global optimal parameters are dynamically filtered through the extended Kalman filter in the FPGA to generate the filtered signal and the residual sequence. The specific steps are as follows.
[0023] Pass the global optimal parameters through the extended Kalman filter to update the state equation and the observation equation, calculate the Kalman gain, and update the state estimate and the covariance matrix.
[0024] Extract the filtered signal from the updated state estimate and calculate the residual sequence.
[0025] This is a preferred solution for the FPGA-based multivariable filtering method of the present invention. Among them: the following are the specific steps for performing feedback adjustment.
[0026] Trigger the feedback adjustment according to the dynamic signal-to-noise ratio improvement amount and the channel correlation error.
[0027] In a second aspect, the present invention provides an FPGA-based multivariable filtering system, including a data acquisition module for synchronously acquiring raw data including uranyl ion fluorescence signals, temperature, and humidity through the multi-channel ADC of the FPGA, constructing the raw data into a fourth-order tensor including time, channel, wavelet frequency band, and environmental variables, and performing preprocessing; a Tucker decomposition module for decomposing the preprocessed fourth-order tensor through the parallelized Tucker decomposition engine of the FPGA to obtain the core tensor and the factor matrix, and constructing a multivariable correlation matrix; a parameter optimization module for implementing quantum particle swarm optimization parameter tuning for the multivariable correlation matrix in the FPGA to generate global optimal parameters; a verification and adjustment module for dynamically filtering the global optimal parameters through the extended Kalman filter in the FPGA to generate the filtered signal and the residual sequence; calculating the dynamic signal-to-noise ratio improvement amount and the channel correlation error based on the residual sequence, and performing feedback adjustment.
[0028] In a third aspect, the present invention provides a computer device, including a memory and a processor, where the memory stores a computer program. Among them: when the computer program is executed by the processor, it implements any step of the FPGA-based multivariable filtering method described in the first aspect of the present invention.
[0029] In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored. Among them: when the computer program is executed by the processor, it implements any step of the FPGA-based multivariable filtering method described in the first aspect of the present invention.
[0030] The beneficial effects of the present invention are as follows: By synchronously collecting raw data through a multi-channel ADC and constructing a fourth-order tensor for preprocessing, efficient data structuring and high-quality input are achieved; then, a parallel Tucker decomposition engine is used to extract key information, and a quantum particle swarm optimization algorithm is used to generate globally optimal parameters to ensure the optimal performance of the filter. This improves the speed and accuracy of data processing, as well as the ability to adaptively adjust filter parameters in a complex and changing environment, thereby achieving the best filtering effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0032] Figure 1 It is a flowchart of the multi-variable filtering method based on FPGA in Embodiment 1.
[0033] Figure 2 It is a flowchart of tensor construction and Tucker decomposition in Embodiment 1.
[0034] Figure 3 It is a flowchart of quantum particle swarm optimization in Embodiment 1.
[0035] Figure 4 It is a flowchart of EKF filtering and feedback adjustment in Embodiment 1. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0036] In order to make the above objects, features, and advantages of the present invention more obvious and understandable, the following will provide a detailed description of the specific embodiments of the present invention with reference to the accompanying drawings of the specification.
[0037] In the following description, many specific details are set forth in order to fully understand the present invention. However, the present invention can also be implemented in other ways different from those described herein. Those skilled in the art can make similar generalizations without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.
[0038] Secondly, the so-called "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that can be included in at least one implementation manner of the present invention. The appearances of "in one embodiment" in different places in this specification do not all refer to the same embodiment, nor are they separate or alternative embodiments that are mutually exclusive with other embodiments.
[0039] Embodiment 1, refer to Figures 1 to 4, which is the first embodiment of the present invention. This embodiment provides a multi-variable filtering method based on FPGA, including the following steps:
[0040] S1: Synchronously collect the original signal data and environmental variables through the multi-channel ADC of the FPGA, construct the original signal data and environmental variables into a fourth-order tensor, and perform preprocessing;
[0041] S1.1: Synchronously collect the original signal data and environmental variables through the multi-channel ADC of the FPGA;
[0042] The original signal data is a fluorescence signal. 1024 points are continuously collected per channel (time window 1.024 ms), the data format is 14-bit two's complement, and it is transmitted to the FPGA through the LVDS interface;
[0043] The environmental variables include temperature and humidity. The temperature and humidity are read once every 1 ms and converted into 16-bit fixed-point numbers.
[0044] S1.2: Construct the original signal data and environmental variables into a fourth-order tensor;
[0045] Perform wavelet transform on the original signal data to obtain wavelet coefficients, perform non-linear coupling with the environmental variables, and generate a fourth-order tensor through time-frequency domain data fusion. The expression is:
[0046]
[0047] Among them, x(t, s, f, e) is the fourth-order tensor at the time t, channel s, wavelet frequency band f, and environmental variable e. t is the time index, s is the channel index, f is the current wavelet frequency band index, e is the type of environmental variable, is the value of channel s and wavelet frequency band f at time t, E e (t) is the original value of the environmental variable e at time t, is the mean value of the environmental variable e, is the standard deviation of the environmental variable e, α e is the standard deviation of the environmental variable e, k is all wavelet frequency band indices, N f is the number of frequency bands of wavelet decomposition, ∈ is a constant to prevent division by zero;
[0048] Furthermore, decompose the original signal data into multiple frequency bands through discrete wavelet transform, and extract the approximation coefficients of each channel as wavelet coefficients;
[0049] Perform standardization processing on the environmental variables, map the normalized deviation of the environmental variables to a weight factor through an exponential function, and perform non-linear coupling with the wavelet coefficients;
[0050] The result after coupling eliminates the amplitude differences between channels through frequency-domain energy normalization, generating a fourth-order tensor that integrates multi-dimensional information of time domain, spatial domain, frequency domain, and environmental variables.
[0051] S1.3: Preprocess the fourth-order tensor through cross-dimensional interaction modeling and tensor standardization and storage;
[0052] Perform cross-dimensional interaction modeling on the fourth-order tensor to generate an optimized fourth-order tensor. The specific steps are as follows:
[0053] Calculate the partial derivative of the fourth-order tensor with respect to the environmental variable by the central difference method;
[0054] Generate an environmental sensitivity mask through the Sigmoid function to suppress the environmental coupling noise in the low-energy frequency band;
[0055] Combine the partial derivative with the environmental sensitivity mask through element-wise multiplication to generate a weighted interaction term;
[0056] Limit the weighted interaction term within the range of [-1, 1] through the tanh function to avoid gradient explosion;
[0057] Generate an optimized fourth-order tensor by multiplying the interaction term with the fourth-order tensor element-wise through the Hadamard product.
[0058] It should be noted that when calculating the partial derivative of the fourth-order tensor with respect to the environmental variable by the central difference method, first set a small perturbation step size for each environmental variable parameter, apply positive and negative perturbations at its current value respectively to generate corresponding perturbed fourth-order tensor instances; then analyze the numerical differences between the perturbed fourth-order tensor and the original fourth-order tensor at the four-dimensional index, calculate the partial derivative components through calculation, and construct a complete partial derivative field after traversing all environmental variables and four-dimensional indices. Based on this partial derivative field, design an environmental sensitivity mask according to the energy distribution characteristics: map the frequency-domain energy of the fourth-order tensor into the Sigmoid function to generate mask weights. Multiply the partial derivative field with the environmental sensitivity mask element-wise to generate a weighted interaction term, so that the gradient features in the high-sensitivity frequency band are strengthened and the noise in the low-sensitivity region is suppressed. Further apply a non-linear transformation to the weighted interaction term through the hyperbolic tangent function tanh to force its value range to be constrained within [-1, 1] to avoid abnormal growth of the gradient amplitude. Finally, perform element-wise multiplication of the constrained interaction term with the original fourth-order tensor through the Hadamard product, dynamically adjust the weight ratio of each element in the fourth-order tensor, so that the optimized fourth-order tensor can significantly reduce the environmental noise coupling coefficient while retaining the high-frequency effective information.
[0059] Eliminate the influence of outliers in the fourth-order tensor through tensor standardization and storage, achieve environment-adaptive standardization processing, and store the fourth-order tensor in a specified format to provide structured data for subsequent analysis. The specific steps are as follows:
[0060] Calculate the mean and standard deviation of each channel and frequency band through a sliding window or global statistical method;
[0061] Calculate the global environmental perturbation factor through the mean absolute deviation;
[0062] Dynamically adjust the normalization intensity through a scaling factor and perform normalization in combination with the environmental perturbation factor;
[0063] Limit the fourth-order tensor values within the range of [-θ, θ] through the Clip function to eliminate outliers;
[0064] Map the fourth-order tensor elements to the linear address through the Mode-1 priority order.
[0065] It should be noted that when calculating the mean and standard deviation of each channel and frequency band through a sliding window or global statistical method, first divide local windows or cover all data along the channel dimension and frequency band dimension of the fourth-order tensor, and statistically calculate the arithmetic mean and standard deviation of the elements in each window; calculate the global environmental perturbation factor through the mean absolute deviation. The specific method is to extract the absolute value mean of all elements of the fourth-order tensor and calculate its absolute deviation from the theoretical steady-state value to quantify the perturbation intensity of environmental noise on the overall distribution of the fourth-order tensor. In the normalization stage, dynamically adjust the normalization intensity through a scaling factor: normalize the original fourth-order elements. After normalization, apply the Clip function to perform a hard limit on the fourth-order values, and forcefully truncate the elements outside the range of the environment-adaptive truncation threshold [-θ, θ] to the boundary values to eliminate outliers caused by environmental mutations or sensor abnormalities. Finally, map the fourth-order tensor to the linear address space through the Mode-1 priority order: expand the elements along the first dimension (Mode-1) of the fourth-order tensor according to the priority, and convert the index to the linear address.
[0066] S2: Decompose the preprocessed fourth-order tensor through the FPGA parallel Tucker decomposition engine to obtain the core tensor and factor matrices, and construct a multivariate correlation matrix;
[0067] S2.1: Divide the fourth-order tensor into sub-blocks through tensor block division and parallel expansion;
[0068] Furthermore, divide the fourth-order tensor into sub-blocks along the time dimension;
[0069] Use the BlockRAM of the FPGA to store the sub-block data for address mapping;
[0070] Perform Mode-n expansion on each sub-block to generate a matrix. The specific steps are as follows:
[0071] The Mode-1 expansion is to expand the time dimension into rows and merge the other dimensions into columns;
[0072] The Mode-2 expansion unfolds the channel dimension into rows and merges the other dimensions into columns;
[0073] The Mode-3 expansion unfolds the frequency band dimension into rows and merges the other dimensions into columns;
[0074] The Mode-4 expansion unfolds the environmental variable dimension into rows and merges the other dimensions into columns;
[0075] Implement data pipelining transmission using the AXI-Stream interface of the FPGA to ensure efficient data flow.
[0076] S2.2: Calculate the factor matrix by parallelizing the SVD decomposition to capture the main features of the tensor in different dimensions, providing a basis for subsequent core tensor calculations;
[0077] Furthermore, use the DSPSlice array of the FPGA to implement parallel matrix multiplication to calculate the covariance matrix of each unfolded matrix;
[0078] It should be noted that by using the DSPSlice array of the FPGA to implement parallel matrix multiplication, perform element-by-element multiplication and addition operations on each unfolded matrix and its transposed matrix to generate the covariance matrix; utilize the parallel computing power of the DSPSlice to decompose the matrix multiplication into multiple subtasks, and each DSPSlice is responsible for calculating one element of the covariance matrix to ensure efficient completion of the covariance matrix calculation task.
[0079] Use the SVD IP core of the FPGA to achieve acceleration, perform SVD decomposition on the covariance matrix to obtain the eigenvector matrix;
[0080] It should be noted that by using the SVD IP core of the FPGA to achieve acceleration, perform singular value decomposition (SVD) on the covariance matrix, which is decomposed into an eigenvector matrix, a singular value matrix, and a transposed eigenvector matrix; utilize the hardware acceleration ability of the SVD IP core to decompose the covariance matrix decomposition task into multiple parallel computing units, and each unit is responsible for calculating part of the eigenvectors and singular values to ensure efficient acquisition of the eigenvector matrix.
[0081] Weight and merge the eigenvector matrices of all sub-blocks to generate the global factor matrix.
[0082] S2.3: Calculate the initial core tensor through tensor contraction operations and optimize the core tensor by the gradient descent method to improve the accuracy of Tucker decomposition;
[0083] Furthermore, according to the global factor matrix, use the multiply-accumulate unit of the FPGA to implement parallel tensor contraction operations to calculate the initial core tensor;
[0084] It should be noted that according to the global factor matrix, the parallel tensor contraction operation is implemented using the multiply-accumulate units of the FPGA. The preprocessed fourth-order tensor and the transpose of the factor matrix are contracted dimension by dimension to calculate the initial core tensor. The tensor contraction operation is decomposed into multiple subtasks, and each multiply-accumulate unit is responsible for calculating part of the tensor elements, and the calculation task of the initial core tensor is efficiently completed through a parallel pipeline structure.
[0085] Define the optimization objective function, and use the gradient descent method to iteratively optimize and optimize the initial core tensor to generate the core tensor.
[0086] It should be noted that based on the product form of the original fourth-order tensor, the core tensor, and its factor matrix, the reconstruction error is calculated. The reconstruction error and the regularization term are weighted and summed to construct the optimization objective function. Through minimization, the global optimization of the core tensor is achieved, ensuring the balance between the reconstruction accuracy and the model generalization ability. The initial core tensor is iteratively optimized by the gradient descent method, the gradient of each iteration is calculated and the core tensor is updated. Through multiple iterations of optimization, the objective function gradually converges to generate the finally optimized core tensor.
[0087] S2.4: Construct a multivariable correlation matrix through non-zero element analysis of the core tensor, correlation matrix generation, and normalization;
[0088] Furthermore, extract the significant non-zero elements in the core tensor, quantify the correlation strength between different channels, and provide basic data for generating the correlation matrix;
[0089] It should be noted that the mean and standard deviation of the core tensor are calculated. By traversing the core tensor, the significant non-zero elements greater than half of the standard deviation of the core tensor are extracted. For each pair of channel combinations, all the significant non-zero elements related to this pair of channels are extracted. By accumulating the sum of the absolute values of these elements, the correlation strength value of the channel pair is calculated. The correlation strength values of all channel pairs form a symmetric channel correlation matrix. The channel correlation matrix is globally maximally normalized, and the elements of the normalized matrix are smoothed to suppress the oversaturation phenomenon in the high-value region and enhance the contrast in the low-value region to generate the channel correlation strength, providing basic data for generating the correlation matrix.
[0090] Generate a multivariable correlation matrix according to the channel correlation strength, and through normalization and symmetrization processing, ensure the consistency and robustness of the matrix;
[0091] It should be noted that the correlation matrix is initialized according to the channel correlation strength, and the matrix elements are scaled to the range [0, 1] through normalization processing. The symmetric processing is performed on the normalized correlation matrix to ensure the consistency and robustness of the matrix, providing reliable multi-channel coupling information for subsequent filtering analysis.
[0092] S3: Implement quantum particle swarm optimization parameter tuning in the FPGA for the multivariate correlation matrix to generate the globally optimal parameters;
[0093] S3.1: Initialize the particle swarm and encode the parameters to be optimized as particle positions;
[0094] Furthermore, generate the initial particle positions according to the multivariate correlation matrix and use the LUT of the FPGA to store the initialization parameters;
[0095] It should be noted that the noise covariance matrix is expanded into a 9-dimensional vector, and the diagonal elements of the observation noise covariance matrix are extracted as a 4-dimensional vector, jointly constituting a 13-dimensional particle position; the initial particle positions are generated according to the multivariate correlation matrix, and their means are calculated through the product of the multivariate correlation matrix and the identity matrix and the diagonal elements of the multivariate correlation matrix, and the covariance matrix is generated through the column variances of the multivariate correlation matrix. The initial particle positions are sampled from the normal distribution of the mean and covariance; to efficiently store these initialization parameters, the lookup table (LUT) of the FPGA is used for storage, and each particle occupies 52 bytes of space to ensure that the 13-dimensional 32-bit floating-point data can be quickly accessed and processed. This step provides a reasonable initial search space for the subsequent quantum particle swarm optimization algorithm, ensuring that the optimization process can start from an effective starting point and improving the efficiency and accuracy of parameter tuning.
[0096] S3.2: Design a fitness function to quantify the performance of the parameters and accelerate particle evaluation through the parallel computing ability of the FPGA;
[0097] Furthermore, design a fitness function by combining the filtering error and the consistency of the multivariate correlation matrix, and the expression is:
[0098]
[0099] where, J p is the fitness function of the p-th particle, M is the total number of sampling points, y[m] is the true signal value of the m-th sampling point, is the estimated signal value of the m-th sampling point output by the extended Kalman filter of the p-th particle, γ is the regularization coefficient, B is the multivariate correlation matrix, is the predicted multivariate correlation matrix of the p-th particle, p is the particle index, and F represents the Frobenius norm;
[0100] It should be noted that a multi-dimensional evaluation index is constructed based on the mean square error of the filtered signal, the variance of the residual sequence, and the trace of the covariance matrix, and a fitness function is formed through weighted linear combination; combined with a dynamic penalty term, the fitness cost is increased when the parameter deviates from the reference value to control the parameter search range; for the real-time requirement, a computational complexity index is additionally superimposed, and a normalization factor is used for mapping to achieve the balance between accuracy and resources; finally, the parameter space is traversed by Monte Carlo sampling, and a complete filtering process is executed and calculated for each candidate parameter set, and the search and verification of the global optimal parameter are driven by minimizing the function value.
[0101] The parallel particle evaluation is implemented using the DSP Slice array of the FPGA, and each DSP Slice processes one particle.
[0102] It should be noted that the parallel particle evaluation is implemented using the DSP Slice array of the FPGA. The calculation task of the fitness function for each particle is assigned to an independent DSP Slice. Each DSP Slice is responsible for calculating the filtering error and the correlation matrix consistency of one particle; through a parallel pipeline structure, the DSP Slices evaluate multiple particles simultaneously, calculate the filtering error and the correlation matrix consistency, and generate the fitness function value through accumulation; by utilizing the parallel computing ability of the FPGA, the latency of particle evaluation is significantly reduced, ensuring the efficient completion of the fitness function calculation task.
[0103] S3.3: Based on the fitness function, update the particle positions through the quantum particle swarm optimization algorithm to search for the global optimal parameters.
[0104] It should be noted that based on the fitness function, the particle positions are updated through the quantum particle swarm optimization algorithm. For each particle, the center of the quantum potential well of each particle is calculated based on its fitness function value through a weighted average formula, and a new particle position is generated based on the Monte Carlo method. The linear feedback shift register and CORDIC algorithm of the FPGA are used for calculation to ensure the efficient generation of the new particle position; the updated particle positions are used to search for the global optimal parameters. Through multiple iterations of optimization, the global optimal solution is gradually approached; the quantum particle swarm optimization algorithm enhances the global search ability by combining the quantum potential well and randomness, avoids falling into local optima, and ensures the efficiency and robustness of parameter tuning.
[0105] S3.4: Select the global optimal parameters and solidify them into the Flash memory of the FPGA to provide high-precision parameters for the subsequent filtering module.
[0106] It should be noted that in the process of selecting the global optimal parameters, the particle position with the minimum fitness is first screened out from the particle swarm. The particle position with the minimum fitness corresponds to the optimal process noise covariance matrix and observation noise covariance matrix. By extracting the first 9 elements of the minimum particle position and reshaping them into a 3×3 matrix, the global optimal parameters including the optimal process noise covariance and observation noise covariance are obtained.
[0107] S4: Filter the global optimal parameters dynamically through the extended Kalman filter in the FPGA to generate the filtered original signal data and the residual sequence;
[0108] S4.1: Update the state equation and the observation equation by passing the global optimal parameters through the extended Kalman filter to ensure that the filtering algorithm can adapt to environmental changes;
[0109] Furthermore, the global optimal parameters obtained by offline optimization are transmitted in real time to the register of the EKF module in the FPGA through the high-speed AXI bus; in the state equation update stage, the process noise covariance is substituted into the covariance prediction formula to dynamically adjust the uncertainty quantization weight in the state transition process; in the observation equation update stage, the observation noise covariance is substituted into the Kalman gain calculation formula to real-time correct the influence of the observation noise on the filtering result; at the same time, the iterative equations of the state vector and the covariance matrix are updated based on the process noise covariance and the observation noise covariance to match the parameters of the Jacobian matrix sum with the dynamic characteristics of the environment, and finally the adaptive adjustment of the Kalman gain is realized through parameter dynamic injection, suppressing noise coupling and improving the state estimation accuracy when the environment changes suddenly.
[0110] S4.2: Calculate the Kalman gain, update the state estimate and the covariance matrix to ensure the accuracy of the filtering result;
[0111] It should be noted that based on the predicted covariance matrix and the Jacobian matrix of the observation matrix, the Kalman gain is calculated, and the weight ratio of the prediction error and the observation noise is dynamically balanced through matrix multiplication and inversion operations; subsequently, the state estimate value is updated using the Kalman gain, and the observation residual is multiplied by the Kalman gain and then superimposed on the predicted state to correct the state estimate towards the direction of the observation data, and the projection matrix is used to compress the uncertainty range of the predicted covariance to avoid overfitting; this process completes matrix operations through parallel DSP Slices in the FPGA, and the calculation delay is reduced using the pipeline structure.
[0112] S4.3: Extract the filtered signal from the updated state estimate and calculate the residual sequence to provide data support for subsequent analysis;
[0113] It should be noted that based on the state vector output by the EKF module, the target signal dimension is located according to the preset signal index rule. The elements in the corresponding dimension of the state vector are arranged in chronological order to generate a continuous time series as the filtered signal. At the same time, in each observation update stage, the original observation values are collected in real time, and the theoretical observation values are calculated through the linear combination of the observation matrix and the predicted state, and then the instantaneous residuals are generated. The instantaneous residuals are stored in the pre-allocated storage medium according to the time stamps to form a residual sequence, and the time alignment mechanism is used to ensure that the sampling points of the residual sequence and the continuous time series correspond one by one. Both the filtered signal and the residual sequence are stored in the format of a structured array, including three fields: time stamp, value, and confidence label, which support data calls for subsequent spectrum analysis, noise distribution modeling, and parameter optimization algorithms. The residual sequence is further statistically calculated through a sliding window to obtain the mean, variance, and autocorrelation function, which are used to dynamically evaluate the deviation of the filtering performance and trigger the condition for parameter adaptive update.
[0114] S5: Calculate the dynamic signal-to-noise ratio improvement amount and the channel association error based on the residual sequence, and perform feedback adjustment.
[0115] S5.1: By calculating the dynamic signal-to-noise ratio improvement amount, quantify the improvement or decline of the filtering performance, and provide a basis for feedback adjustment;
[0116] It should be noted that based on the time-frequency distribution of the original signal data and the filtered signal, the energy of each frequency band is extracted through a sliding window, and the original signal-to-noise ratio and the filtered signal-to-noise ratio are calculated. According to the historical data, the performance improvement threshold and the performance degradation threshold are set. For each frequency band, the signal-to-noise ratio improvement amount is calculated, and the global improvement amount is obtained through weighted accumulation of different frequency bands.
[0117] If the global improvement amount is greater than the performance improvement threshold, a positive feedback adjustment instruction is generated to reduce the update step size of the process noise covariance to stabilize the parameters;
[0118] If the global improvement amount is less than the performance degradation threshold, a dynamic recalibration mechanism is triggered to adjust the injection weight of the observation noise covariance through backpropagation gradient;
[0119] The improvement amount data is normalized by Fisher-Z transformation and stored in the historical performance queue to construct a moving average baseline to eliminate the influence of environmental transient interference on the quantization result.
[0120] S5.2: By calculating the channel association error, evaluate the difference between the predicted association matrix and the true association matrix, and provide a basis for feedback adjustment;
[0121] Construct a true correlation matrix based on multi-channel observation data, calculate the correlation coefficients of each channel pair through the covariance matrix to form a symmetric matrix; at the same time, use the state prediction model to generate a predicted correlation matrix, which is obtained by linearly transforming the covariance matrix of the predicted state vector. The channel correlation error is quantified by the Frobenius norm, and the local error is calculated independently for each channel pair. The local error is statistically generated by a sliding window to obtain the error mean and variance, and the channel correlation error threshold is set according to historical data;
[0122] When the mean is greater than the channel correlation error threshold, feedback regulation is triggered. The weight coefficients of the Jacobian matrix in the state prediction model are adjusted through the backpropagation algorithm, and an adaptive penalty factor is applied to the high-error channel pairs according to the distribution characteristics of the local error, forcing the channel correlation relationships with significant deviations to be corrected preferentially during the iterative process. Finally, the updated parameters are injected into the prediction model to reduce the difference in the correlation matrix. When the mean is less than or equal to the channel correlation error threshold, the current parameters are kept stable.
[0123] This embodiment also provides a multi-variable filtering system based on FPGA, including: a data acquisition module, which is used to synchronously acquire raw data including uranium ion fluorescence signals, temperature, and humidity through the multi-channel ADC of the FPGA, construct the raw data into a fourth-order tensor including time, channel, wavelet frequency band, and environmental variables, and perform preprocessing; a Tucker decomposition module, which is used to decompose the preprocessed fourth-order tensor through the parallel Tucker decomposition engine of the FPGA to obtain the core tensor and factor matrices, and construct a multi-variable correlation matrix; a parameter optimization module, which is used to implement quantum particle swarm optimization parameter tuning for the multi-variable correlation matrix within the FPGA to generate globally optimal parameters; a verification and regulation module, which is used to filter the globally optimal parameters dynamically through the extended Kalman filter within the FPGA to generate the filtered signal and residual sequence; calculate the dynamic signal-to-noise ratio improvement amount and channel correlation error based on the residual sequence, and perform closed-loop verification and feedback regulation. This embodiment also provides a computer device, which is applicable to the case of the multi-variable filtering method based on FPGA, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the multi-variable filtering method based on FPGA as proposed in the above embodiment.
[0124] The computer device may be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a carrier network, NFC (Near Field Communication), or other technologies. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or may be a button, a trackball, or a touchpad provided on the computer device housing, or may also be an external keyboard, touchpad, or mouse, etc.
[0125] This embodiment also provides a storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the method for realizing multi-variable filtering based on FPGA as proposed in the above embodiment; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM for short), Electrically Erasable Programmable Read-Only Memory (EEPROM for short), Erasable Programmable Read-Only Memory (EPROM for short), Programmable Read-Only Memory (PROM for short), Read-Only Memory (ROM for short), magnetic memory, flash memory, a magnetic disk, or an optical disc.
[0126] In summary, the present invention: synchronously collects raw data through multiple channels of ADCs and constructs a fourth-order tensor for preprocessing, achieving efficient data structuring and high-quality input; then uses a parallelized Tucker decomposition engine to extract key information, and generates global optimal parameters through a quantum particle swarm optimization algorithm to ensure the optimal performance of the filter. It improves the speed and accuracy of data processing, as well as adaptively adjusts filtering parameters in a complex and changing environment, so as to achieve the best filtering effect.
[0127] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered within the scope of the claims of the present invention.
Claims
1. A multi-variable filtering method based on FPGA, characterized in that: including, synchronously collecting raw data through a multi-channel ADC of an FPGA, constructing the raw data into a fourth-order tensor, and performing preprocessing; the raw data includes uranyl ion fluorescence signals, temperature, and humidity, and the fourth-order tensor includes time, channels, wavelet frequency bands, and environmental variables; decomposing the preprocessed fourth-order tensor through an FPGA-parallelized Tucker decomposition engine to obtain a core tensor and factor matrices, and constructing a multi-variable correlation matrix; implementing quantum particle swarm optimization parameter tuning within the FPGA for the multi-variable correlation matrix to generate global optimal parameters; dynamically filtering the global optimal parameters through extended Kalman filtering within the FPGA to generate a filtered signal and a residual sequence; calculating the dynamic signal-to-noise ratio improvement amount and channel correlation error based on the residual sequence, and performing feedback adjustment.
2. The multi-variable filtering method based on FPGA according to claim 1, wherein: The steps of constructing the raw data into a fourth-order tensor and performing preprocessing are as follows: performing wavelet transform on the raw signal data to obtain wavelet coefficients, performing non-linear coupling in combination with environmental variables, and generating a fourth-order tensor through time-frequency domain data fusion; performing preprocessing on the fourth-order tensor through cross-dimensional interaction modeling and tensor normalization and storage.
3. The multi-variable filtering method based on FPGA according to claim 2, characterized in that: The steps of decomposing the preprocessed fourth-order tensor through an FPGA-parallelized Tucker decomposition engine are as follows: dividing the fourth-order tensor into sub-blocks through tensor block division and parallel expansion, and performing Mode-n expansion on each sub-block to generate expansion matrices; calculating the covariance matrix of each expansion matrix, performing SVD decomposition on the covariance matrix to obtain an eigenvector matrix.
4. The multi-variable filtering method based on FPGA according to claim 3, wherein: The steps of obtaining the core tensor and factor matrices and constructing a multi-variable correlation matrix are as follows: weightedly combining the eigenvector matrices of all sub-blocks to generate a global factor matrix; calculating an initial core tensor based on the global factor matrix; defining an optimization objective function, and using the gradient descent method to iteratively optimize the initial core tensor to generate a core tensor; constructing a multi-variable correlation matrix through non-zero element analysis of the core tensor, correlation matrix generation, and normalization.
5. The multi-variable filtering method based on FPGA according to claim 4, characterized in that: The steps of generating the global optimal parameters are as follows: generating an initial particle position based on the multi-variable correlation matrix, initializing the particle swarm, and encoding the parameters to be optimized as particle positions; updating the particle positions through the quantum particle swarm optimization algorithm to generate global optimal parameters.
6. The multi-variable filtering method based on FPGA according to claim 5, characterized in that: The steps of dynamically filtering the global optimal parameters through extended Kalman filtering within the FPGA to generate a filtered signal and a residual sequence are as follows: passing the global optimal parameters through extended Kalman filtering to update the state equation and observation equation, calculating the Kalman gain, and updating the state estimate and covariance matrix; extracting a filtered signal from the updated state estimate and calculating a residual sequence.
7. The FPGA-based multi-variable filtering method according to claim 1, wherein: triggering feedback adjustment according to the dynamic signal-to-noise ratio improvement amount and channel correlation error.
8. A multi-variable filtering system based on FPGA, based on the multi-variable filtering method based on FPGA according to any one of claims 1 to 7, characterized in that: including a data acquisition module, a Tucker decomposition module, a parameter optimization module, a filtering processing module, and a verification and adjustment module. The data acquisition module is used to synchronously acquire raw data including uranyl ion fluorescence signals, temperature, and humidity through the multi-channel ADC of the FPGA, construct the raw data into a fourth-order tensor including time, channel, wavelet frequency band, and environmental variables, and perform preprocessing; The Tucker decomposition module is used to decompose the preprocessed fourth-order tensor through the parallel Tucker decomposition engine of the FPGA, obtain the core tensor and factor matrices, and construct a multivariate correlation matrix; The parameter optimization module is used to implement quantum particle swarm optimization parameter tuning for the multivariate correlation matrix within the FPGA to generate the globally optimal parameters; The verification and adjustment module is used to filter the globally optimal parameters dynamically through the extended Kalman filter within the FPGA to generate the filtered signal and residual sequence; Calculate the dynamic signal-to-noise ratio improvement amount and channel correlation error based on the residual sequence, and perform feedback adjustment.
9. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the FPGA-based multivariate filtering method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the FPGA-based multivariate filtering method according to any one of claims 1 to 7.
Citation Information
Patent Citations
A tensor decomposition and reconstruction method based on GPU
CN109033030A
Magnetic resonance image noise reduction method based on signal domain and image domain joint filtering
CN114283086A
Cloud service dynamic QoS prediction method based on Kalman filtering correction
CN115913995A
Unsupervised microseismic denoising method and system based on multichannel Kalman filter network
CN119126230A
Radar target echo characteristic dynamic simulation method based on unmanned aerial vehicle
CN119148086A