主要内容

本页翻译不是最新的。点击此处可查看最新英文版本。

Simulink 中的定点矩阵运算

R2026a
优化的基于 CORDIC 的定点矩阵求解器和矩阵分解模块,用于高效 HDL 代码

使用模块的 Fixed-Point Designer™ HDL Optimized 库来执行基于 CORDIC 的定点矩阵运算,并生成高效的 HDL 代码。这些模块对线性方程组的设计模式进行建模并执行核心矩阵运算(例如 QR 分解和奇异值分解),以便在 FPGA 上进行硬件高效的实现。有关为您的应用选择合适模块的帮助,请参阅Choose a Block for HDL-Optimized Fixed-Point Matrix Operations。使用包含的 Fixed-Point Designer 函数以解析方式确定线性系统求解器和矩阵分解模块的最佳定点数据类型。使用 HDL Coder™ 为包含这些模块的设计生成 HDL 代码。

有关这些算法的基于 MATLAB® 的实现,请参阅MATLAB 中的定点矩阵运算。有关 MATLAB 和 Simulink® 中数学运算的基于 CORDIC 和其他嵌入式高效实现,请参阅MATLAB 和 Simulink 中的定点数学运算。

模块

全部展开

求解 AX = B

Real Burst Matrix Solve Using QR Decomposition blockReal Burst Matrix Solve Using QR DecompositionCompute the value of x in the equation Ax = B for real-valued matrices using QR decomposition
Complex Burst Matrix Solve Using QR Decomposition blockComplex Burst Matrix Solve Using QR DecompositionCompute the value of x in the equation Ax = B for complex-valued matrices using QR decomposition
Real Partial Systolic Matrix Solve Using QR Decomposition blockReal Partial-Systolic Matrix Solve Using QR DecompositionCompute value of x in the equation Ax = B for real-valued matrices using QR decomposition
Complex Partial-Systolic Matrix Solve Using QR Decomposition blockComplex Partial-Systolic Matrix Solve Using QR DecompositionCompute value of x in the equation Ax = B for complex-valued matrices using QR decomposition
Systolic Matrix Solve Using QR Decomposition blockSystolic Matrix Solve Using QR DecompositionCompute value of X in the equation AX = B using QR decomposition (自 R2024a 起)

求解 A'AX = B

Real Burst Matrix Solve Using Q-less QR Decomposition blockReal Burst Matrix Solve Using Q-less QR DecompositionCompute the value of X in the equation A'AX = B for real-valued matrices using Q-less QR decomposition
Complex Burst Matrix Solve Using Q-less QR Decomposition blockComplex Burst Matrix Solve Using Q-less QR DecompositionCompute the value of X in the equation A'AX = B for complex-valued matrices using Q-less QR decomposition
Screenshot of Real Burst Asynchronous Matrix Solve Using Q-less QR Decomposition blockReal Burst Asynchronous Matrix Solve Using Q-less QR DecompositionCompute the value of X in the equation A'AX = B for real-valued matrices using asynchronous Q-less QR decomposition (自 R2022b 起)
Screenshot of Complex Burst Asynchronous Matrix Solve Using Q-less QR Decomposition blockComplex Burst Asynchronous Matrix Solve Using Q-less QR DecompositionCompute the value of X in the equation A'AX = B for complex-valued matrices using asynchronous Q-less QR decomposition (自 R2022b 起)
Real Partial-Systolic Matrix Solve Using Q-less QR Decomposition blockReal Partial-Systolic Matrix Solve Using Q-less QR DecompositionCompute value of X in the equation A'AX = B for real-valued matrices using Q-less QR decomposition
Complex Partial Systolic Matrix Solve Using Q-less QR Decomposition blockComplex Partial-Systolic Matrix Solve Using Q-less QR DecompositionCompute the value of X in the equation A'AX = B for complex-valued matrices using Q-less QR decomposition

求解使用无限 tall A 矩阵的 A'AX = B

Screenshot of Real Burst Matrix Solve Using Q-less QR Decomposition with Forgetting Factor blockReal Burst Matrix Solve Using Q-less QR Decomposition with Forgetting FactorCompute the value of X in the equation A'AX = B for real-valued matrices with infinite number of rows using asynchronous Q-less QR decomposition (自 R2022b 起)
Screenshot of Complex Burst Matrix Solve Using Q-less QR Decomposition with Forgetting Factor blockComplex Burst Matrix Solve Using Q-less QR Decomposition with Forgetting FactorCompute the value of X in the equation A'AX = B for complex-valued matrices with infinite number of rows using asynchronous Q-less QR decomposition (自 R2022b 起)
Real Partial-Systolic Matrix Solve Using Q-less QR Decomposition with Forgetting Factor blockReal Partial-Systolic Matrix Solve Using Q-less QR Decomposition with Forgetting FactorCompute value of X in the equation A'AX = B for real-valued matrices with infinite number of rows using Q-less QR decomposition
Complex Partial-Systolic Matrix Solve Using Q-less QR Decomposition with Forgetting Factor blockComplex Partial-Systolic Matrix Solve Using Q-less QR Decomposition with Forgetting FactorCompute the value of X in the equation A'AX = B for complex-valued matrices with infinite number of rows using Q-less QR decomposition

QR 分解

Real Burst QR Decomposition blockReal Burst QR DecompositionQR decomposition for real-valued matrices
Complex Burst QR Decomposition blockComplex Burst QR DecompositionQR decomposition for complex-valued matrices
Real Partial Systolic QR Decomposition blockReal Partial-Systolic QR DecompositionQR decomposition for real-valued matrices
Complex Partial-Systolic QR Decomposition blockComplex Partial-Systolic QR DecompositionQR decomposition for complex-valued matrices
Systolic QR Decomposition blockSystolic QR DecompositionQR decomposition for matrices (自 R2024a 起)

Q-less QR 分解

Real Burst Q-less QR Decomposition blockReal Burst Q-less QR DecompositionQ-less QR decomposition for real-valued matrices
Complex Burst Q-less QR Decomposition blockComplex Burst Q-less QR DecompositionQ-less QR decomposition for complex-valued matrices
Screenshot of Real Burst Q-less QR Decomposition Whole R Output blockReal Burst Q-less QR Decomposition Whole R OutputQ-less QR decomposition for real-valued matrices (自 R2022b 起)
Screenshot of Complex Burst Q-less QR Decomposition Whole R Output blockComplex Burst Q-less QR Decomposition Whole R OutputQ-less QR decomposition for complex-valued matrices (自 R2022b 起)
Real Partial-Systolic Q-less QR Decomposition blockReal Partial-Systolic Q-less QR DecompositionQ-less QR decomposition for real-valued matrices
Complex Partial-Systolic Q-less QR Decomposition blockComplex Partial-Systolic Q-less QR DecompositionQ-less QR decomposition for complex-valued matrices

使用遗忘因子的 Q-less QR 分解

Screenshot of Real Burst Q-less QR Decomposition with Forgetting Factor Whole R OutputReal Burst Q-less QR Decomposition with Forgetting Factor Whole R OutputQ-less QR decomposition for real-valued matrices with infinite number of rows (自 R2022b 起)
Screenshot of Complex Burst Q-less QR Decomposition with Forgetting Factor Whole R OutputComplex Burst Q-less QR Decomposition with Forgetting Factor Whole R OutputQ-less QR decomposition for complex-valued matrices with infinite number of rows (自 R2022b 起)
Real Partial Systolic Q-less QR Decomposition with Forgetting Factor blockReal Partial-Systolic Q-less QR Decomposition with Forgetting FactorQ-less QR decomposition for real-valued matrices with infinite number of rows
Complex Partial-Systolic Q-less QR Decomposition with Forgetting Factor blockComplex Partial-Systolic Q-less QR Decomposition with Forgetting FactorQ-less QR decomposition for complex-valued matrices with infinite number of rows

奇异值分解

Image of Square Jacobi SVD HDL Optimized block.Square Jacobi SVD HDL OptimizedFixed-point singular value decomposition (自 R2023a 起)
Image of Non-Square Jacobi SVD HDL Optimized block.Non-Square Jacobi SVD HDL OptimizedFixed-point singular value decomposition (自 R2023b 起)

函数

全部展开

fixed.qrFixedpointTypesDetermine fixed-point types for transforming A and R and B to C=Q'B in-place, where QR=A is QR decomposition of A
fixed.qlessqrFixedpointTypesDetermine fixed-point types for transforming A to R in-place, where R is upper-triangular factor of QR decomposition of A, without computing Q
fixed.realQRMatrixSolveFixedpointTypesDetermine fixed-point types for matrix solution of real-valued AX=B using QR decomposition
fixed.complexQRMatrixSolveFixedpointTypesDetermine fixed-point types for matrix solution of complex-valued AX=B using QR decomposition
fixed.realQlessQRMatrixSolveFixedpointTypesDetermine fixed-point types for matrix solution of real-valued A'AX=B using QR decomposition
fixed.complexQlessQRMatrixSolveFixedpointTypesDetermine fixed-point types for matrix solution of complex-valued A'AX=B using QR decomposition
fixed.realSingularValueLowerBoundEstimate lower bound for smallest singular value of real-valued matrix
fixed.complexSingularValueLowerBoundEstimate lower bound for smallest singular value of complex-valued matrix
fixed.singularValueUpperBoundUpper bound of largest singular value of matrix (自 R2022b 起)
fixed.realConditionNumberUpperBoundEstimate of upper bound for 2-norm condition number of real-valued matrix (自 R2022b 起)
fixed.complexConditionNumberUpperBoundEstimate of upper bound for 2-norm condition number of complex-valued matrix (自 R2022b 起)
fixed.forgettingFactorCompute forgetting factor required for streaming input data
fixed.forgettingFactorInverseCompute the inverse of the forgetting factor required for streaming input data
fixed.realQuantizationNoiseStandardDeviationEstimate standard deviation of quantization noise of real-valued signal
fixed.complexQuantizationNoiseStandardDeviationEstimate standard deviation of quantization noise of complex-valued signal
embblk.latency.systolicQRBlockTimingCompute minimum number of cycles between valid input samples and latency of Systolic QR Decomposition block (自 R2024a 起)
embblk.latency.systolicQRMatrixSolverBlockTimingCompute minimum number of cycles between valid input samples and latency of Systolic Matrix Solve Using QR Decomposition block (自 R2024a 起)
embblk.latency.cordicSqrtHDLOptimizedLatencyCompute latency and total number of iterations of CORDIC Square Root HDL Optimized block (自 R2024a 起)

工具

数据类型代理

主题

通用

线性系统求解器:求解 AX = B

线性系统求解器:求解 A'AX = B

线性系统求解器:求解使用无限 tall A 矩阵的 A'AX = B

矩阵分解:QR 分解

矩阵分解:Q-less QR 分解

矩阵分解:使用遗忘因子的 Q-less QR 分解

矩阵分解:奇异值分解

以解析方式确定线性系统求解器和矩阵分解的定点数据类型

精选示例