A covariance matrix inversion method based on pipeline optimization and an FPGA implementation architecture thereof

By employing a step-by-step matrix inversion algorithm based on Cholesky LDL decomposition and pipeline optimization, the resource and accuracy issues of covariance matrix inversion methods in FPGA implementations for medium- and low-scale array applications are resolved, achieving low-latency and high-throughput matrix inversion computation.

CN123115576APending Publication Date: 2026-11-17XIDIAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611279031.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-21
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing FPGA-based methods for covariance matrix inversion are difficult to simultaneously meet the requirements of low resource consumption and high precision in medium-to-low-scale array applications, and there is room for improvement in the continuous inversion output interval and pipelined parallel efficiency.

Method used

A step-by-step matrix inversion algorithm based on Cholesky LDL decomposition is adopted, which divides matrix inversion into three steps: LDL decomposition, upper triangular matrix inversion, and matrix multiplication. Through pipeline optimization of the LDL decomposition unit, upper triangular matrix inversion unit, and matrix multiplication unit, combined with state machine control of data flow to drive the computing unit, an efficient FPGA implementation architecture is achieved.

Benefits of technology

While ensuring computational accuracy, it reduces storage access pressure and FPGA resource consumption, improves pipelined processing capability and steady-state output efficiency under continuous matrix input conditions, and is suitable for engineering applications such as UHF communication and space-time adaptive processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123115576A_ABST
    Figure CN123115576A_ABST
Patent Text Reader

Abstract

A pipeline-optimized method for covariance matrix inversion and its FPGA implementation architecture are presented. The method involves LDL decomposition of the matrix to be inverted, yielding a lower triangular matrix and a diagonal matrix. The reciprocal of the pivot element of the diagonal matrix is ​​then calculated to obtain the diagonal inverse matrix. The lower triangular matrix is ​​transposed to obtain an upper triangular matrix, which is then inverted to obtain its inverse matrix. These inverse matrices are calculated synchronously. Finally, matrix multiplication is performed to obtain the inverse matrix of the matrix to be inverted. Based on LDL decomposition in the form of an outer product and a block-based triangular matrix inversion algorithm, this invention proposes a three-level FPGA implementation architecture, consisting of a cascaded LDL decomposition unit, an upper triangular matrix inversion unit, and a matrix multiplication unit. Each unit employs a design that separates the control state machine from the computational pipeline, with data buffering between cascaded units via dual-port RAM. The three computation modules overlap and run in parallel, processing continuous input matrices without interruption, achieving high throughput and low latency with relatively low FPGA resource consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of array signal processing technology, specifically a method for inverting the covariance matrix based on pipeline optimization and its FPGA implementation architecture. Background Technology

[0002] In the field of array signal processing, adaptive digital beamforming algorithms are widely used to suppress interference and improve the signal-to-interference-plus-noise ratio (SNR) of target signals. In these applications, the system typically needs to calculate the anti-interference weights within a finite timeframe, thus placing high demands on the computation link for low latency and high throughput. The inversion of the sampling covariance matrix is ​​a core computational step in the relevant algorithms, characterized by high computational complexity and strong data dependency, making it a critical technical aspect affecting the real-time performance of such applications.

[0003] General matrix inversion algorithms mainly include elementary transformation methods, adjoint matrix methods, and Gaussian elimination methods. However, these methods involve a large number of determinant calculations and iterative operations, resulting in high computational complexity and complex data dependencies, making them difficult to meet the requirements of high real-time performance and low resource consumption in engineering applications. Compared to direct inversion methods such as adjoint matrix methods, matrix decomposition is commonly used in engineering implementations. The original matrix is ​​decomposed into easily invertible forms such as triangular or diagonal matrices, and the inverse matrix is ​​obtained based on the decomposition results through triangulation or explicit inversion. This approach reduces high-order determinant calculations, improves numerical stability, and is more conducive to hardware parallelization.

[0004] Field-Programmable Gate Arrays (FPGAs) are widely used in real-time signal processing fields such as space-time adaptive processing and adaptive digital beamforming due to their parallel processing capabilities and reconfigurability. Existing FPGA-based covariance matrix inversion engineering implementations are mostly geared towards large-scale array applications such as phased array radar and massive MIMO, typically employing highly parallel structures such as pulse arrays to improve computational throughput. However, such implementations have relatively complex hardware structures and still consume significant resources. For medium- and low-scale array applications such as VHF / UHF communication, although the covariance matrix is ​​relatively small, the available FPGA resources are more limited, while computational latency remains a critical factor. Existing implementations for large-scale scenarios struggle to achieve an optimal balance between resource overhead and processing latency.

[0005] Chinese patent document CN120296292A discloses a method for inverting a variable-order covariance matrix. The pipelined approach primarily focuses on the computational state within a single computational stage or a single matrix, failing to fully reflect the cross-stage parallel processing capabilities of different computational stages such as matrix decomposition, triangular matrix inversion, and matrix multiplication under continuous matrix input conditions. For applications requiring continuous covariance matrix inversion and online weight updates, stage waiting and resource scheduling gaps may still exist between matrices, leaving room for further optimization of continuous throughput and steady-state output intervals. In the experiments disclosed in this patent, the inversion of an 8th-order covariance matrix was completed in 38.21 μs using an XC7VX690T chip at a 250MHz clock frequency, with an FPGA computation error of 10. -5 The magnitude indicates that it can meet the basic accuracy requirements, but when facing application scenarios with medium and low scale arrays, limited resources, and requirements for continuous low-latency output, there is still room to further reduce the interval between continuous inversion outputs and improve the efficiency of pipelined parallelism.

[0006] Chinese patent document CN116451002A discloses a general conjugate symmetric matrix inversion architecture, method, and application based on FPGA. This method struggles to achieve time overlap between the decomposition, inversion, and matrix multiplication stages when inverting multiple matrices consecutively. The published experiments, conducted at a 250 MHz clock, provide the single-pass inversion time for matrices of different orders: 12.224 μs for an 8th order matrix, 32.24 μs for a 16th order matrix, and 118.352 μs for a 32nd order matrix. The error for a 63rd order matrix compared to MATLAB results is 10%. -5 The scale is significant. Therefore, this scheme has a certain advantage in terms of single-strike inversion time, but its published content focuses more on the single matrix inversion process and order universality, and does not fully address steady-state pipeline intervals under continuous input conditions, cross-stage parallel processing, and throughput optimization under resource-constrained platforms.

[0007] In summary, existing methods have not fully explored the parallel potential of algorithms, and there is still room for performance improvement. Therefore, it is of great significance to study an FPGA implementation method that is suitable for small- and medium-scale sampling covariance matrices and balances low resource consumption with high precision. Summary of the Invention

[0008] To address the shortcomings of existing technologies, this invention aims to provide a pipeline-optimized method for covariance matrix inversion and its FPGA implementation architecture. Based on the LDL decomposition algorithm in the form of outer product and the fixed-block lower triangular matrix inversion method, an efficient three-level FPGA implementation architecture is proposed. The computational units of each pipeline stage are designed using a direct mapping approach. A state machine controls the data flow to drive each computational unit to perform the calculations of each step in the algorithm, achieving high computational accuracy and low computational latency with minimal resource overhead. This solves the problem that existing covariance matrix inversion algorithms, especially in low-to-medium scale, resource-constrained application scenarios, struggle to simultaneously balance processing latency, parallel implementation efficiency, resource overhead, and computational accuracy in FPGA engineering implementations.

[0009] To achieve the above-mentioned objectives, the technical solution adopted by this invention is as follows: A method for inverting the covariance matrix based on pipeline optimization employs a step-by-step matrix inversion algorithm based on Cholesky LDL decomposition, dividing the matrix inversion into three steps: Step 1: Find the inverse matrix of the matrix to be inverted. Perform LDL decomposition to obtain the lower triangular matrix. and diagonal matrix ; diagonal matrix Find the reciprocal of the principal component to obtain the diagonal inverse matrix. ; Step 2: Decompose the lower triangular matrix. The upper triangular matrix is ​​obtained by performing conjugate transpose. For upper triangular matrices Inverting the matrix yields the upper triangular inverse matrix. And simultaneously calculate to obtain ; Step 3: Put and Matrix multiplication is performed to obtain , which is the inverse matrix of the matrix to be inverted.

[0010] In step 1, the LDL decomposition algorithm based on the outer product form is used to invert the matrix to be solved. Divide the process into blocks, and read the inverse matrix to be calculated in each round. Calculate the lower triangular matrix from one column. A column and a diagonal matrix A diagonal element.

[0011] In step 2, a triangular matrix inversion algorithm based on fixed block division is used to invert the upper triangular matrix. To perform the inverse calculation, that is, with To minimize the number of blocks, in each round, the blocks on the main diagonal are first calculated by direct inversion; then, based on the already calculated partial inverse matrices, the inverse matrices of the off-diagonal blocks are calculated sequentially until the upper triangular inverse matrix is ​​calculated. .

[0012] An FPGA implementation architecture for a covariance matrix inversion method based on pipeline optimization includes: an LDL decomposition unit, an upper triangular matrix inversion unit, and a matrix multiplication unit; LDL decomposition unit: includes an LDL decomposition control state machine and an LDL decomposition calculation module. The LDL decomposition calculation module is used to calculate the inverse matrix to be found. Perform LDL decomposition to obtain the lower triangular matrix. and diagonal matrix ; diagonal matrix Find the reciprocal of the principal component to obtain the diagonal inverse matrix. The LDL decomposition control state machine is used to control the pipelined calculation process of the LDL decomposition calculation module. The upper triangular matrix inversion unit includes an upper triangular matrix inversion control state machine and an upper triangular matrix inversion calculation module; the upper triangular matrix inversion calculation module is used to process the decomposed lower triangular matrix. The upper triangular matrix is ​​obtained by performing conjugate transpose. For upper triangular matrices Inverting the matrix yields the upper triangular inverse matrix. And simultaneously calculate to obtain The upper triangular matrix inversion control state machine is used to control the pipelined calculation process of the upper triangular matrix inversion calculation module. Matrix multiplication unit: includes a matrix multiplication control state machine and a matrix multiplication calculation module; the matrix multiplication calculation module is used to... and Matrix multiplication is performed to obtain , which is the inverse matrix of the matrix to be inverted; the matrix multiplication control state machine is used to control the pipelined calculation process of the matrix multiplication calculation module.

[0013] The specific execution process of the LDL decomposition unit is as follows: Step 1.1: Convert the matrix to be inverted Write the matrix to be decomposed to RAM1 in column-major order for caching; Step 1.2: Let the column index of the current iteration be... The current effective processing order is Based on the current order, the LDL decomposition control state machine reads the matrix to be decomposed from the RAM1 storage. Column elements and historical cumulative update volume The column elements Compared with historical cumulative update volume Perform column vector update calculations to obtain the subtraction result vector; during the calculation of the first column, the historical cumulative update amount is... Set to zero; Step 1.3: The upper triangular matrix inversion module extracts the first element of the subtraction result vector as the diagonal matrix. A diagonal element, with that diagonal element as the divisor, divides the diagonal matrix. Perform division on all off-diagonal elements to obtain the decomposed lower triangular matrix. The column vector; and the reciprocal of the diagonal element; Step 1.4: Traverse the matrix to be inverted The remaining submatrix region in the middle is utilized using the lower triangular matrix. Perform multiplication on the column vectors to calculate the historical cumulative amount. And accumulate it to the cache matrix. , cache matrix The first column serves as the historical cumulative update value for subsequent columns to perform subtraction operations. ; Step 1.5: After completing the traversal and calculation of the current remaining submatrix, determine the current processing status; if the current column index has not reached the last column, increment the column index by 1 and execute the calculation of the next column; if the current column index has reached the last column, end the loop, i.e., the lower triangular matrix... The decomposition is complete; Step 1.6: After all columns have been calculated, the LDL decomposition control state machine enters a delayed waiting state and displays the resulting lower triangular matrix. The conjugate transpose of the upper triangular matrix and diagonal inverse matrix The upper triangular matrix and the diagonal inverse matrix are written to RAM2 for storage. After the results are written, the system pulls up the LDL decomposition calculation completion flag signal, and the LDL decomposition control state machine returns to the idle state, ready to receive the next matrix data.

[0014] The specific execution process of the upper triangular matrix inversion unit is as follows: Step 2.1: From the upper triangular matrix Extract the diagonal block matrix of the current round. The elements of the diagonal block matrix Inverting the off-diagonal elements yields the inverse matrix. And store it in the upper triangular inverse matrix RMA4; the diagonal block matrix For the current round Diagonal block matrix; Step 2.2: Read the off-diagonal block of the current round from RAM2, which stores the upper triangular matrix and its diagonal inverse matrix. The column vector data is read sequentially into the local buffer register; Step 2.3: The upper triangular matrix inversion calculation module synchronously reads the upper left submatrix that has been inverted in the previous round. Diagonal block inverse matrix and off-diagonal block matrices Based on the inverse matrix of the 2×2 diagonal blocks in the current round The structure was obtained. Intermediate results and divide them into the first column vector Second column vector , the first column vector As the inverse matrix of the off-diagonal block in the current round The first column, the second column vector With the first column vector Inverse matrix of 2×2 diagonal blocks The top-right element is used to perform column vector multiplication and addition to update the matrix, resulting in the inverse matrix of the off-diagonal block for the current round. The second column ultimately yields the inverse matrix of the off-diagonal block in the current round. And temporarily stored in the buffer queue; Step 2.4: Determine the block index Has the total number of matrix blocks been reached? ;like Then let And jump back to step 2.2 to process the next batch of blocks; if Then the inverse calculation of the upper triangular matrix is ​​completed, and the inverse upper triangular matrix is ​​obtained. ; Step 2.5: Inverse the upper triangular matrix and diagonal inverse matrix Perform multiplication to obtain ;Will The weighted upper triangular inverse matrix is ​​written to RAM3 for storage, and the lower triangular inverse matrix is ​​stored thereafter. The results are written to the lower triangular inverse matrix storage RAM4 for storage; after all results are written, the system pulls up the upper triangular matrix inversion completion flag signal and the upper triangular matrix inversion control state machine returns to the idle state, waiting for the next matrix inversion calculation to start.

[0015] The specific execution process of the matrix multiplication unit is as follows: Step 3.1: Based on the current matrix block cycle, the matrix multiplication control state machine first reads the matrix sequentially from the weighted upper triangular inverse matrix storage RMA3. The column vectors are read sequentially from the lower triangular inverse matrix storage RAM4. The row-block data stream inputs two data streams to... A parallel multiply-accumulate array performs matrix multiplication to calculate the final covariance matrix inverse. ; Step 3.2: After completing the inner product operation of the current data block, calculate the corresponding local elements of the final inverse matrix using... The matrix blocks are output in parallel. The vector loading and multiplication-addition calculations are repeated until the calculation is completed. The system then raises the calculation completion flag signal, and the entire process of inverting the covariance matrix is ​​completed. The final inverted matrix is ​​then output.

[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention constructs an explicit matrix inversion framework based on LDL decomposition, which breaks down the covariance matrix inversion process into computational stages such as LDL decomposition, upper triangular matrix inversion, and matrix multiplication. This avoids the hardware implementation complexity caused by square root operations in Cholesky decomposition and is conducive to modular and pipelined implementation in FPGA.

[0017] 2. This invention introduces a cache matrix and a delayed update mechanism in the LDL decomposition stage. The historical outer product update amount during the submatrix update process is temporarily stored in the cache matrix, and the cumulative update vector is used to complete the delayed correction during subsequent column reading. This reduces repeated reading and writing of the input matrix storage unit, reduces memory access overhead, and improves the data continuous processing capability of the LDL decomposition unit.

[0018] 3. This invention organizes the data flow by reading matrix columns, correcting cumulative update vectors, separating principal components and column vectors, and accumulating outer product update amounts. This integrates the input matrix reading process with the update calculation process, reduces the coupling between submatrix updates and memory access operations in traditional outer product LDL decomposition, and improves the utilization of computing units and pipeline processing efficiency.

[0019] 4. This invention adopts a fixed-block iterative inversion method for upper triangular matrices and simplifies the column update process by combining the structural characteristics of upper triangular matrices. It transforms some column update calculations into regular vector multiplication and addition operations, which reduces the amount of calculation in a single iteration, simplifies the control logic, and improves the implementation efficiency of the upper triangular matrix inversion unit on FPGA.

[0020] 5. By leveraging the structural features of the diagonal block matrix, this invention optimizes the matrix multiplication calculation in the upper triangular matrix inversion unit, reduces redundant multiplication and addition operations, and makes the data transfer between the LDL decomposition unit, the upper triangular matrix inversion unit, and the matrix multiplication unit more regular, which is conducive to forming a segmented pipeline processing structure.

[0021] In summary, this invention proposes an FPGA-based inversion architecture that combines local parallelism and global pipelining. Targeting the structural characteristics of the covariance matrix, it deeply integrates LDL decomposition in the form of outer products with a block inversion algorithm for upper triangular matrices, enabling three independent computation modules to overlap and run in parallel over time. This eliminates processing wait times between matrices and achieves high-throughput continuous output of the inverse matrix. While maintaining the accuracy of matrix inversion calculations, this invention reduces storage access pressure and FPGA resource consumption, improves pipelining capabilities and steady-state output efficiency under continuous matrix input conditions, and is suitable for engineering applications with high requirements for real-time performance and resource consumption, such as anti-interference in UHF communication and space-time adaptive processing. Attached Figure Description

[0022] Figure 1 This is the overall flowchart of the covariance matrix inversion method based on pipeline optimization.

[0023] Figure 2 This is a schematic diagram of the FPGA implementation architecture of the covariance matrix inversion method based on pipeline optimization.

[0024] Figure 3 This is a schematic diagram of the structure of an LDL decomposition unit.

[0025] Figure 4 This is a schematic diagram of the structure of the inverse unit of an upper triangular matrix.

[0026] Figure 5 This is a schematic diagram of the matrix multiplication unit.

[0027] Figure 6 This is a schematic diagram of the inverse computation pipeline. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the embodiments described herein are merely illustrative and not intended to limit the invention.

[0029] In the engineering implementation of array signal processing algorithms such as adaptive digital beamforming, the inversion of the sampling covariance matrix is ​​a core computational step. Employing a matrix decomposition-based inversion algorithm can significantly reduce the engineering implementation difficulty of inversion. The Cholesky LDL decomposition-based inversion algorithm avoids complex calculations such as square root extraction. Since the sampling covariance matrix itself possesses the property of a complex Hermitian positive definite matrix, the computational load in the decomposition and upper triangular matrix inversion processes can be further reduced. Based on this characteristic, this invention employs a Cholesky LDL decomposition algorithm based on the outer product form. It designs the LDL decomposition unit, upper triangular matrix inversion unit, and matrix multiplication unit in a data flow-driven computational pipeline, and organizes each computational unit in a global pipeline manner, thereby achieving low-latency, high-throughput inversion computation with low resource consumption.

[0030] The matrix to be inverted For the covariance matrix to have the property of being complex Hermitian positive definite, its LDL decomposition is expressed as: (1) in, It is a unit lower triangular matrix with all 1s on the main diagonal; It is a real diagonal matrix. It is a unit upper triangular matrix. This indicates the conjugate transpose.

[0031] Inverting equation (1) yields: (2) Therefore, matrix inversion involves three steps: dealing with the matrix to be inverted... Perform LDL decomposition to obtain the unit lower triangular matrix. diagonal matrix and unit upper triangular matrix ; diagonal matrix Finding the reciprocal of the pivot element yields For upper triangular matrices Inverse is obtained ;Will and Multiplication yields Based on the calculated and Perform matrix multiplication to obtain the inverse matrix. inverse matrix .

[0032] The LDL decomposition algorithm based on the outer product form first divides the matrix to be inverted... Divide into blocks: (3) in, Let N be the matrix whose inversion is to be found. yes The first element in the top left corner, yes First column removed A column vector consisting of the elements below, yes Remove the right side of the first row A row vector consisting of elements other than those in the row vector is The conjugate transpose of . yes The submatrix remaining after removing the first row and first column.

[0033] The LDL decomposition form of equation (3) is: (4) in, diagonal matrix The first element in the top left corner, It is a lower triangular matrix The first column consists of the column vector containing all elements except 1. yes The row vector consisting of the elements on the right side of the first row, excluding 1, is The conjugate transpose of; yes The submatrix remaining after removing the first row and first column, yes The submatrix remaining after removing the first row and first column.

[0034] Calculating matrix multiplication on the right side of the equals sign and then comparing it with the corresponding block on the left side yields the following result: (5) The corresponding diagonal matrix can be obtained. A diagonal element and a unit lower triangular matrix One of the columns: (6) The submatrix is ​​then updated as follows: (7) The updated submatrix is ​​also divided into blocks, and the diagonal matrix can be calculated in each round. A diagonal element and a lower triangular matrix A column.

[0035] During the submatrix update process, repeated reads and writes to the input matrix storage RAM are required. This invention introduces a cached matrix and a delayed update mechanism to temporarily store the historical update vector of the outer product and update the vector as needed, avoiding repeated reads and writes to the input RAM. Let the... During each iteration, the column vectors actually involved in the decomposition are: (8) in, The historical cumulative update amount represents the cache matrix. The first column; , indicating that the current input matrix to be inverted is being read. One of the columns; Extract column vectors The first element in the matrix is ​​used as the diagonal matrix. A diagonal element The remaining non-diagonal elements ; With this diagonal element Performing division on the divisor yields the decomposed lower triangular matrix. The corresponding column vector, i.e., the upper triangular matrix Row vectors: (9) Using the newly generated row vector The multiply-accumulate array first performs multiplication operations to obtain the historical cumulative amount for subsequent column subtraction operations. Add it to the cache matrix : (10) The historical cumulative update vector used for the next round of column vector subtraction operations comes from the cache matrix. The first column: This avoids writing back to the input RAM during the submatrix update process.

[0036] A triangular matrix inversion algorithm based on fixed blocks is used to find the unit upper triangular matrix. To perform the inversion, that is, to find the inverse of the unit upper triangular matrix. In the inversion process, a fixed block size is used. .for diagonal pieces Its inverse matrix is: (11) in, This represents the elements on the second diagonal of the inverse matrix; by To minimize the number of blocks, each round first calculates the blocks on the main diagonal by directly inverting the matrix; then, based on the partially inverse matrix that has been calculated, the values ​​of the inverse matrices of the off-diagonal blocks are calculated sequentially until the complete inverse matrix is ​​calculated. Unit upper triangular matrix according to The smallest sub-block partition is in the form of: Its inverse matrix form is: (12) Now for the unit upper triangular matrix To find the inverse, perform the recursive calculation step by step using the method described above. For the ... The matrix required for round iteration The following is an expression: (13) in, It is the top-left submatrix that has already been inverted in the previous round; It is the connection block matrix between the processed regions and the current new block, i.e., the off-diagonal block matrix; It is a new addition in the current round. Diagonal block matrix; then the matrix The inverse matrix is: (14) Based on the top left submatrix obtained in the previous round inverse matrix And the newly added bottom right diagonal block matrix in the current round , The inverse matrix can be obtained from equation (11), and the off-diagonal blocks are calculated. The inverse matrix is ​​given by the following formula: (15) use The structure allows us to simplify one matrix multiplication into a single column update calculation, resulting in... Intermediate results, for this Intermediate results are divided into columns: (16) in, , express The first and second columns of the intermediate results; Substituting equations (11) and (16) into equation (15), the off-diagonal blocks are calculated. The inverse matrix is ​​represented as follows: (17) Each round yields a non-diagonal block from the inverse upper triangular matrix. After multiple rounds of off-diagonal blocks After splicing, the inverse unit upper triangular matrix is ​​calculated. The final calculation steps are thus simplified.

[0037] In the triangular matrix multiplication stage, calculation is performed directly. and The product of the two terms can be reduced by using the upper and lower triangular structures to simplify the multiplication and accumulation calculations.

[0038] Based on the aforementioned algorithm steps, this invention designs corresponding computational unit modules using a direct algorithm mapping approach. The entire computation process is divided into three steps, with a corresponding computational unit designed for each step. Each computational unit adopts a structure that separates the control and computational parts. A corresponding computational pipeline is designed according to the computational characteristics, with the control part generating data flow to drive the computational part to complete the computation. Dual-port RAM is used as an intermediate data cache between different computational units, and the three steps are divided into three computational pipeline segments, allowing the overall computational process to be performed in a pipelined manner. like Figure 2 As shown, an FPGA implementation architecture for a covariance matrix inversion method based on pipeline optimization is presented. The architecture includes: an LDL decomposition unit, an upper triangular matrix inversion unit, and a matrix multiplication unit. The LDL decomposition unit includes an LDL decomposition control state machine and an LDL decomposition calculation module. The upper-level control module of the matrix inversion module is connected to the signal input terminal of the LDL decomposition control state machine through a control interface; the signal output terminal of the LDL decomposition control state machine is connected to the signal input terminal of the LDL decomposition calculation module; the data output terminal of the matrix to be decomposed storage RAM1 is connected to the data input terminal of the LDL decomposition calculation module; the data output terminal of the LDL decomposition calculation module is connected to the data input terminal of the upper triangular matrix and diagonal inverse matrix storage RAM2; the LDL decomposition calculation module includes a subtractor, a divider, a multiplier, an adder, and a column counter.

[0039] The upper triangular matrix inversion unit includes an upper triangular matrix inversion control state machine and an upper triangular matrix inversion calculation module. The signal output of the LDL decomposition control state machine is connected to the signal input of the upper triangular matrix inversion control state machine, and the signal output of the upper triangular matrix inversion control state machine is connected to the signal input of the upper triangular matrix inversion calculation module. The data output of the upper triangular matrix and diagonal inverse matrix storage RAM2 is connected to the data input of the upper triangular matrix inversion calculation module. The data output of the upper triangular matrix inversion calculation module is connected to the data inputs of the weighted upper triangular inverse matrix storage RAM3 and the lower triangular inverse matrix storage RAM4, respectively. The upper triangular matrix inversion calculation module includes a multiplier and an adder.

[0040] The matrix multiplication unit includes a matrix multiplication control state machine and a matrix multiplication calculation module. The signal output of the upper triangular matrix inversion control state machine is connected to the signal input of the matrix multiplication control state machine, and the signal output of the matrix multiplication control state machine is connected to the signal input of the matrix multiplication calculation module. The data outputs of the weighted upper triangular inverse matrix storage RAM3 and the lower triangular inverse matrix storage RAM4 are both connected to the data input of the matrix multiplication calculation module. The matrix multiplication calculation module includes a multiplier and an adder.

[0041] The inverse method specifically includes the following steps: Step 1: Find the inverse matrix of the matrix to be inverted. Perform LDL decomposition to obtain the upper triangular matrix. and diagonal matrix ; In finding the diagonal matrix Simultaneously for diagonal matrices Find the reciprocal of the principal component to obtain the diagonal inverse matrix. ,like Figure 2 and Figure 3 As shown; Step 1.1: Set the matrix order through configuration parameters, input data in fixed-point format, and configure the RAM1 interface for storing the matrix to be decomposed; input the matrix to be inverted. Store the matrix to be decomposed in RAM1 in column-major order, and then complete the inverse matrix calculation. After writing and caching, the calculation process begins; Step 1.2: Let the outer column index of the current iteration be... (initial The current effective processing order is Based on the current order, the LDL decomposition control state machine generates a continuous read address sequence according to the timing, and synchronously reads the matrix to be decomposed from the RAM1 storage. Original data and the historical cumulative update amount in the internal vector register ; For the column elements of the original matrix read Compared with historical cumulative update volume The column vector is updated using a subtractor to obtain the subtraction result vector; in the first column... When calculating, this historical cumulative update volume Set to zero.

[0042] Step 1.3: The LDL decomposition calculation module extracts the first element of the subtraction result vector as a diagonal matrix. The diagonal element is taken as the diagonal element, and the remaining off-diagonal elements are simultaneously fed into the divider. Using the diagonal element as the divisor, division is performed on all off-diagonal elements to obtain the decomposed lower triangular matrix. The column vector is output; at the same time, the reciprocal of the diagonal element is output and latched as a parameter for the subsequent inversion operation.

[0043] Step 1.4: Current column element After the calculation is complete, traverse the matrix to be inverted. The remaining submatrix region in the middle is utilized using the lower triangular matrix. The column vectors are multiplied by a multiplier to calculate the historical cumulative amount. Then, the result is accumulated into the cache matrix via an adder. , cache matrix The first column serves as the historical cumulative update value for subsequent columns to perform subtraction operations. .

[0044] Step 1.5: After completing the traversal calculation of the current remaining submatrix, determine the current processing status using a column counter: if the current column index has not reached the last column, increment the column index by 1 and execute the calculation for the next column; if the current column index has reached the last column, end the loop, i.e., the lower triangular matrix... The decomposition is complete.

[0045] Step 1.6: After all columns have been calculated, the LDL decomposition control state machine enters a delayed waiting state to compensate for the inherent delay of the pipeline, ensuring that all the final data has been calculated and the resulting lower triangular matrix has been decomposed. The conjugate transpose of the upper triangular matrix and diagonal inverse matrix The upper triangular matrix and its diagonal inverse matrix are stored in RAM2. After all results are written, the system pulls high the LDL decomposition calculation completion flag signal, and the LDL decomposition control state machine returns to the idle state, ready to receive the next matrix data.

[0046] Step 2: Decompose to obtain the lower triangular matrix The upper triangular matrix is ​​obtained by performing conjugate transpose. For upper triangular matrices Inverting the matrix yields the upper triangular inverse matrix. And simultaneously calculate to obtain ,like Figure 2 and Figure 4 As shown; When the LDL decomposition phase ends and a control signal is received from the LDL decomposition control state machine, the upper triangular matrix is ​​activated. The process of finding the inverse of the upper triangular matrix. The upper triangular matrix is ​​loaded into the control state machine through inverting the upper triangular matrix. and diagonal inverse matrix Perform the inversion calculation of the upper triangular matrix to obtain the upper triangular inverse matrix. and the lower triangular inverse matrix This process adopts a method based on... A recursive algorithm for finding the inverse of the block matrix of the basic sub-blocks. Define the sub-block dimension as... The block index of the current iteration is Initially set to ; Step 2.1: In the first At the start of the round calculation, begin with the upper triangular matrix. Extract the current round Diagonal block matrix The elements; due to It is a unit upper triangular matrix. Diagonal block matrix Finding the inverse simply requires inverting the off-diagonal elements of the diagonal block matrix, directly yielding the result. Diagonal block inverse matrix It is then stored in the upper triangular inverse matrix RMA4 as the basis for subsequent calculations.

[0047] Step 2.2: For Diagonal block matrix After processing is complete, based on the current round The corresponding vector dimension is read from the upper triangular matrix and the diagonal inverse matrix stored in RAM2, representing the off-diagonal block matrix of the current round. The column vector data is read sequentially into the local buffer register. This prepares for subsequent pipelined multiplication and accumulation vector multiplication calculations.

[0048] Step 2.3: Based on the derivation formula for inverting a block matrix (Equation 14), the upper triangular matrix inversion calculation module synchronously reads the upper left submatrix that has been inverted in the previous round. Extracted in step 2.1 Diagonal block inverse matrix and the off-diagonal block matrix read in step 2.2 Based on the inverse matrix of the 2×2 diagonal blocks in the current round The structure was obtained. Intermediate results and divide them into the first column vector Second column vector , the first column vector As the inverse matrix of the off-diagonal block in the current round The first column, the second column vector With the first column vector Inverse matrix of 2×2 diagonal blocks The top-right element is used to perform column vector multiplication and addition to update the matrix, resulting in the inverse matrix of the off-diagonal block for the current round. The second column ultimately yields the inverse matrix of the off-diagonal block in the current round. And temporarily stored in the buffer queue.

[0049] Step 2.4: After this round of block inversion update and write-back, determine the block index. Has the total number of matrix blocks been reached? ;like Then let Increase the depth of the column vectors to be processed in the next round, and jump back to step 2.1 to process the next stage of block division; if This indicates that the inversion of the upper triangular matrix is ​​complete, and the upper triangular inverse matrix is ​​obtained. ; Step 2.5: Inverse the upper triangular matrix With the diagonal inverse matrix in step 1.6 Perform multiplication to obtain ;Will The weighted upper triangular inverse matrix is ​​written to RAM3 for storage, and the upper triangular inverse matrix is ​​stored therein. The conjugate transpose of the lower triangular inverse matrix. The results are written to the lower triangular inverse matrix storage RAM4 for storage. After all results are written, the system pulls up the upper triangular matrix inversion completion flag signal and the upper triangular matrix inversion control state machine returns to the idle state, waiting for the next matrix inversion calculation to start. Step 3: Use the calculated and Matrix multiplication is performed to obtain , which is the inverse matrix of the matrix to be inverted.

[0050] Step 3.1: Based on the current matrix block cycle, the matrix multiplication control state machine first reads the left multiplication matrix sequentially from the weighted upper triangular inverse matrix storage RMA3. The column vectors are read sequentially from the lower triangular inverse matrix storage RAM4. The row-block data stream inputs two data streams to... A parallel multiply-accumulate array performs matrix multiplication to calculate the final covariance matrix inverse. ; Step 3.2: After completing the inner product operation of the current data block, calculate the corresponding local elements of the final inverse matrix using... The matrix blocks are output in parallel. The vector loading and multiplication-addition calculations are repeated until the calculation is completed. Then, the system raises the matrix multiplication completion flag signal, and the entire process of inverting the covariance matrix is ​​completed. The final inverted matrix is ​​then output.

[0051] like Figure 6As shown, a three-level hardware pipeline scheduling mechanism is employed to achieve high throughput. In actual operation, after the first-level LDL decomposition unit completes the decomposition of the first matrix and writes the data into RAM2 (the storage of the middle upper triangular matrix and the diagonal inverse matrix), it immediately starts reading and decomposing the next matrix. Simultaneously, the second-level upper triangular matrix inversion unit begins reading the data of the first matrix from RAM2 and starts the inversion operation. When the data stream of the first matrix enters the third-level matrix multiplication module to perform the final multiplication operation, the second-level and first-level units are already synchronously processing the second and third consecutively input matrices, respectively. Through these three independent computation units, the computation process of the previous matrix and the loading process of the next matrix overlap in time, thereby achieving continuous output of the inverse matrix.

[0052] This invention further verifies the implemented covariance matrix inversion process. The verification platform used was the Fudan Microelectronics JFM7VX690T FPGA development board, with the inversion module operating at a frequency of 200MHz; the Xilinx Vivado 2019.1 development platform was used, and the design and experiments were conducted according to the FPGA implementation architecture proposed in this invention; the results were analyzed using Matlab software.

[0053] Experimental steps: An array signal is generated through Matlab simulation modeling, and a 12th-order covariance matrix is ​​calculated. This covariance matrix is ​​then used as a COE file to initialize the matrix inversion module and input into matrix RAM1. An inversion test project is built, a bitstream file is generated, and downloaded to the development board. The actual calculation results are captured using ILA and exported to Matlab for accuracy analysis.

[0054] The maximum absolute error between the final on-board test results and the Matlab-based double-precision floating-point calculation results is within [a certain range]. The throughput is on the order of magnitude. At a clock frequency of 200MHz, timing convergence is achieved, with the inversion of the 12th-order covariance matrix taking 41.44 μs. Thanks to the three-stage pipelined computation structure of this invention, in the case of continuous inversion, an inversion result is output every 25.69 μs, corresponding to a throughput of approximately... The resource usage of the FPGA used for the final matrix inversion in LUTs (Look-Up Tables), BRAM (Block Random Access Memory), Registers, and DSPs (Digital Signal Processing Slices) is shown in Table 1. A comparison of the resource usage and performance of the present invention with existing matrix inversion FPGA implementations is shown in Table 2.

[0055] As shown in Tables 1 and 2, this invention achieves continuous inversion computation with low LUT, BRAM, Registers, and DSP resource consumption in the scenario of inverting a 12th-order covariance matrix, and obtains a throughput of 3.89 × 10⁴ inv / s. Compared with the algorithms in existing literature 1-4, this invention balances resource utilization efficiency and continuous processing performance while ensuring the matrix processing scale, and has good engineering application value.

[0056] Table 1. FPGA resource usage for inverting the 12th order covariance matrix. resource LUT BRAM Registers DSPs Occupy 12465 9 31622 117 percentage 2.88% 3.65% 3.65% 0.61% Table 2 Comparison of resource consumption and performance between the present invention and existing FPGA implementations of matrix inversion. Comparison parameters Reference 1 Reference 2 Reference 3 Reference 4 This invention Algorithm selection LDL decomposition Diagonal Algorithm Givens-QR decomposition Cholesky decomposition LDL decomposition Matrix size 8th order 8th order 7th level 8th order 12th order LUT 15867 15415 103744 10240 13126 BRAM 13 10 N / A 38 9 DSP48 132 104 744 84 117 Clock frequency Fmax (MHz) 250 300 200 250 200 Delay (μs) 20.38 12.07 29.29 38.21 41.44 Throughput (×10⁴ inv / s) 4.91 8.28 3.41 2.61 3.89 Document 1: ZHANG XW, ZUO L, LI M, et al. High-throughput FPGA implementation of matrix inversion for control systems[J]. IEEE Transactionson Industrial Electronics, 2021, 68(7): 6205-6215. Document 2: YAN D, WANG WX, ZUO L, et al Revisiting the adjoint matrix forFPGA calculating the triangularmatrix inversion[J]. IEEE Transactions onCircuits and Systems II: Express Briefs, 2021, 68(6):2127-2131. Reference 3: Huang Guohua. High-precision matrix calculation based on FPGA [D]. Lanzhou: Lanzhou University, 2025. Reference 4: Sun Wuyuan, Wang Ao, Lü Dong, et al. A method for inverting a covariance matrix of variable order: CN120296292A[P] China. 2025.

Claims

1. A method of covariance matrix inversion based on pipelining optimization, characterized in that: The step-by-step matrix inversion algorithm based on Cholesky LDL decomposition is adopted, which divides the matrix inversion into three steps: Step 1: Let A be the matrix to be inverted Perform LDL decomposition to get lower triangular matrix L and diagonal matrix D ; Invert the diagonal elements of D to get inverse diagonal matrix D -1 ; Step 2: Upper triangular matrix obtained by decomposing the lower triangular matrix Step 3: Upper triangular matrix obtained by performing conjugate transpose on the upper triangular matrix Step 4: Upper triangular inverse matrix obtained by performing inverse on the upper triangular matrix Step 5: Lower triangular inverse matrix obtained by performing inverse on the lower triangular matrix Step 6: Obtained by simultaneously calculating ; Step 3: Perform matrix multiplication calculation on and to obtain , which is the inverse matrix of the inverse matrix to be solved.

2. The method for inverting the covariance matrix according to claim 1, characterized in that: In step 1, the LDL decomposition algorithm based on the exterior product form is applied to the matrix to be inverted The matrix to be inverted is blocked, and one column of the matrix to be inverted is read in each round to calculate one column of the lower triangular matrix and one diagonal element of the diagonal matrix .

3. The method for inverting the covariance matrix according to claim 1, characterized in that: In step 2, a triangular matrix inversion algorithm based on fixed block division is used to invert the upper triangular matrix. To perform the inverse calculation, that is, with To minimize the number of blocks, in each round, the blocks on the main diagonal are first calculated by direct inversion; then, based on the already calculated partial inverse matrices, the inverse matrices of the off-diagonal blocks are calculated sequentially until the upper triangular inverse matrix is ​​calculated. .

4. An FPGA implementation architecture of a pipelined optimized covariance matrix inversion method, characterized by: include: LDL decomposition unit, upper triangular matrix inversion unit, matrix multiplication unit; LDL decomposition unit: includes an LDL decomposition control state machine and an LDL decomposition calculation module. The LDL decomposition calculation module is used to calculate the inverse matrix to be found. Perform LDL decomposition to obtain the lower triangular matrix. and diagonal matrix ; diagonal matrix Find the reciprocal of the principal component to obtain the diagonal inverse matrix. ; The LDL decomposition control state machine is used to control the pipelined calculation process of the LDL decomposition calculation module. The upper triangular matrix inversion unit includes an upper triangular matrix inversion control state machine and an upper triangular matrix inversion calculation module; the upper triangular matrix inversion calculation module is used to process the decomposed lower triangular matrix. The upper triangular matrix is ​​obtained by performing conjugate transpose. For upper triangular matrices Inverting the matrix yields the upper triangular inverse matrix. And simultaneously calculated to obtain The upper triangular matrix inversion control state machine is used to control the pipelined calculation process of the upper triangular matrix inversion calculation module. Matrix multiplication unit: includes a matrix multiplication control state machine and a matrix multiplication calculation module; The matrix multiplication calculation module is used to calculate... and Matrix multiplication is performed to obtain , which is the inverse matrix of the matrix to be inverted; The matrix multiplication control state machine is used to control the pipelined calculation process of the matrix multiplication calculation module.

5. The FPGA implementation architecture according to claim 4, characterized in that: The specific execution process of the LDL decomposition unit is as follows: Step 1.1: Convert the matrix to be inverted Write the matrix to be decomposed to RAM1 in column-major order for caching; Step 1.2: Let the column index of the current iteration be... The current effective processing order is ; Based on the current order, the LDL decomposition control state machine reads the matrix to be decomposed from the RAM1 storage. Column elements and historical cumulative update volume The column elements Compared with historical cumulative update volume Perform column vector update calculations to obtain the subtraction result vector; during the calculation of the first column, the historical cumulative update amount is... Set to zero; Step 1.3: The upper triangular matrix inversion module extracts the first element of the subtraction result vector as the diagonal matrix. A diagonal element, with that diagonal element as the divisor, divides the diagonal matrix. Perform division on all off-diagonal elements to obtain the decomposed lower triangular matrix. The column vector; and the reciprocal of the diagonal element; Step 1.4: Traverse the matrix to be inverted The remaining submatrix region in the middle is utilized using the lower triangular matrix. Perform multiplication on the column vectors to calculate the historical cumulative amount. And accumulate it to the cache matrix. , cache matrix The first column serves as the historical cumulative update value for subsequent columns to perform subtraction operations. ; Step 1.5: After completing the traversal and calculation of the current remaining submatrix, determine the current processing status; if the current column index has not reached the last column, increment the column index by 1 and execute the calculation of the next column; if the current column index has reached the last column, end the loop, i.e., the lower triangular matrix... The decomposition is complete; Step 1.6: After all columns have been calculated, the LDL decomposition control state machine enters a delayed waiting state and displays the resulting lower triangular matrix. The conjugate transpose of the upper triangular matrix and diagonal inverse matrix The upper triangular matrix and the diagonal inverse matrix are written to RAM2 for storage. After the results are written, the system pulls up the LDL decomposition calculation completion flag signal, and the LDL decomposition control state machine returns to the idle state, ready to receive the next matrix data.

6. The FPGA implementation architecture according to claim 4, characterized in that: The specific execution process of the upper triangular matrix inversion unit is as follows: Step 2.1: From the upper triangular matrix Extract the diagonal block matrix of the current round. The elements of the diagonal block matrix Inverting the off-diagonal elements yields the diagonal block inverse matrix. And store it in the upper triangular inverse matrix RMA4; the diagonal block matrix For the current round Diagonal block matrix; Step 2.2: Read the off-diagonal block matrix of the current round from RAM2, which stores the upper triangular matrix and its diagonal inverse matrix. The column vector data is read sequentially into the local buffer register; Step 2.3: The upper triangular matrix inversion calculation module synchronously reads the upper left submatrix that has been inverted in the previous round. Diagonal block inverse matrix and off-diagonal block matrices Based on the inverse matrix of the 2×2 diagonal blocks in the current round The structure was obtained. Intermediate results and divide them into the first column vector Second column vector , the first column vector As the inverse matrix of the off-diagonal block in the current round The first column, the second column vector With the first column vector Inverse matrix of 2×2 diagonal blocks The top-right element is used to perform column vector multiplication and addition to update the matrix, resulting in the inverse matrix of the off-diagonal block for the current round. The second column ultimately yields the inverse matrix of the off-diagonal block in the current round. And temporarily stored in the buffer queue; Step 2.4: Determine the block index Has the total number of matrix blocks been reached? ;like Then let And jump back to step 2.2 to process the next batch of blocks; if Then the inverse calculation of the upper triangular matrix is ​​completed, and the inverse upper triangular matrix is ​​obtained. ; Step 2.5: Inverse the upper triangular matrix and diagonal inverse matrix Perform multiplication to obtain ;Will The weighted upper triangular inverse matrix is ​​written to RAM3 for storage, and the lower triangular inverse matrix is ​​stored thereafter. The results are written to the lower triangular inverse matrix storage RAM4 for storage; after all results are written, the system pulls up the upper triangular matrix inversion completion flag signal and the upper triangular matrix inversion control state machine returns to the idle state, waiting for the next matrix inversion calculation to start.

7. The FPGA implementation architecture according to claim 4, characterized in that: The specific execution process of the matrix multiplication unit is as follows: Step 3.1: Based on the current matrix block cycle, the matrix multiplication control state machine first reads the matrix sequentially from the weighted upper triangular inverse matrix storage RMA3. The column vectors are read sequentially from the lower triangular inverse matrix storage RAM4. The row-block data stream inputs two data streams to... A parallel multiply-accumulate array performs matrix multiplication to calculate the final covariance matrix inverse. ; Step 3.2: After completing the inner product operation of the current data block, calculate the corresponding local elements of the final inverse matrix using... The matrix blocks are output in parallel. The vector loading and multiplication-addition calculations are repeated until the calculation is completed. The system then raises the calculation completion flag signal, and the entire process of inverting the covariance matrix is ​​completed. The final inverted matrix is ​​then output.

Citation Information

Patent Citations

  • General conjugate symmetric matrix inversion architecture and method based on FPGA and application

    CN116451002A

  • Variable-order covariance matrix inversion method

    CN120296292A