Factor square Hermitian positive definite matrices into lower, upper, and diagonal components
DSP System Toolbox / Math Functions / Matrices and Linear Algebra / Matrix Factorizations
The LDL Factorization block uniquely factors the square Hermitian positive definite input matrix S as
where L is a lower triangular square matrix with unity diagonal elements, D is a diagonal matrix, and L* is the Hermitian (complex conjugate) transpose of L. Only the diagonal and lower triangle of the input matrix are used. Any imaginary component of the diagonal entries is disregarded.
LDL factorization requires half the computation of Gaussian elimination (LU decomposition), and is always stable. It is more efficient than Cholesky factorization because it avoids computing the square roots of the diagonal elements.
Port_1
— Input signalInput signal, specified as a square matrix.
The algorithm requires that the input be square and Hermitian positive definite. When the input is not positive definite, the block reacts as specified by the Non-positive definite input parameter.
If the input is fixed point, it must be signed fixed point with a power-of-two slope and zero bias.
Data Types: single
| double
| int8
| int16
| int32
| fixed point
Port_1
— Output signalThe output is a composite matrix with lower triangle elements lij from L, diagonal elements dij from D and upper triangle elements uij from L*, where L is a lower triangular square matrix that has unity diagonal elements, D is a diagonal matrix, and L* is the Hermitian (complex conjugate) transpose of L.
The output format is shown below for a 5-by-5 matrix.
Data Types: single
| double
| int8
| int16
| int32
| fixed point
Non-positive definite input
— Non-positive definite input actionWarning
(default) | Ignore
| Error
Specify the action when nonpositive definite matrix inputs occur:
Ignore
— Proceed with
the computation and do not issue an alert. The output is not
a valid factorization. A partial factorization is present in
the upper-left corner of the output.
Warning
— Display a
warning message in the MATLAB® Command Window and continue the simulation.
The output is not a valid factorization. A partial
factorization is present in the upper-left corner of the
output.
Error
— Display an error
dialog box and terminate the simulation.
Rounding mode
— Method of rounding operationFloor
(default) | Ceiling
| Convergent
| Nearest
| Round
| Simplest
| Zero
Specify the rounding mode for fixed-point operations as one of the following:
Floor
Ceiling
Convergent
Nearest
Round
Simplest
Zero
For more details, see rounding mode.
Saturate on integer overflow
— Method of overflow actionWhen you select this parameter, the block saturates the result of its
fixed-point operation. When you clear this parameter, the block wraps
the result of its fixed-point operation. For details on
saturate
and wrap
, see overflow
mode for fixed-point operations.
Intermediate product
— Intermediate product data typeInherit: Same as
input
(default) | fixdt(1,16,0)
Specify the intermediate product data type. As shown in Fixed-Point Conversion section in Extended Capabilities, the output of the multiplier is cast to the intermediate product data type before the next element of the input is multiplied into it. You can set the data type to:
A rule that inherits a data type, for example,
Inherit: Same as input
An expression that evaluates to a valid data type, for
example, fixdt(1,16,0)
Alternatively, you can set the Intermediate
product data type by using the Data Type
Assistant. To use the assistant, click the
Show data type assistant button.
For more information, see Specify Data Types Using Data Type Assistant (Simulink).
Product output
— Product output data typeInherit: Inherit via internal
rule
(default) | Inherit: Same as input
| fixdt([],16,0)
Product output specifies the data type of the output of a product operation in the LDL Factorization block.
Inherit: Inherit via internal rule
— The block inherits the product output data type based
on an internal rule. For more information on this rule, see
Inherit via Internal Rule.
Inherit: Same as input
— The
block specifies the product output data type to be the same as
the input data type.
fixdt([],16,0)
— The block
specifies an autosigned, binary-point, scaled, fixed-point data
type that has a word length of 16 bits and a fraction length of
0.
For more information, see Multiplication Data Types and Fixed-Point Conversion in Extended Capabilities.
Alternatively, you can set the Product output
data type by using the Data Type Assistant. To use
the assistant, click the Show data type assistant button.
For more information on the data type assistant, see Specify Data Types Using Data Type Assistant (Simulink).
Accumulator
— Accumulator data typeInherit: Inherit via internal
rule
(default) | Inherit: Same as input
| Inherit: Same as product output
| fixdt([],16,0)
Accumulator specifies the data type of the output of an accumulation operation in the LDL Factorization block.
Inherit: Inherit via internal rule
— The block inherits the accumulator data type based on
an internal rule. For more information on this rule, see Inherit via Internal Rule.
Inherit: Same as input
— The
block specifies the accumulator data type to be the same as the
input data type.
Inherit: Same as product output
— The block specifies the accumulator data type to be the
same as the product output data type.
fixdt([],16,0)
— The block
specifies an autosigned, binary-point, scaled, fixed-point data
type that has a word length of 16 bits and a fraction length of
0.
For illustrations on how to use the accumulator data type in this block, see Fixed-Point Conversion in Extended Capabilities.
Alternatively, you can set the Accumulator data
type by using the Data Type Assistant. To use the
assistant, click the Show data type assistant button.
For more information on the data type assistant, see Specify Data Types Using Data Type Assistant (Simulink).
Output
— Output data typeInherit: Same as
input
(default) | fixdt([],16,0)
Output specifies the data type of the output of the LDL Factorization block. For more information on the output data type, see the 'Fixed-Point Conversion' section in Extended Capabilities.
Inherit: Same as input
— The
block specifies the output data type to be the same as the input
data type.
fixdt([],16,0)
— The block
specifies an autosigned, binary-point, scaled, fixed-point data
type that has a word length of 16 bits and a fraction length of
0.
Alternatively, you can set the Output data type
by using the Data Type Assistant. To use the
assistant, click the Show data type assistant button.
For more information on the data type assistant, see Specify Data Types Using Data Type Assistant (Simulink).
Output Minimum
— Minimum value that block can output[]
(default) | scalarSpecify the minimum value that the block can output. Simulink® software uses this minimum value to perform:
Simulation range checking. See Specify Signal Ranges (Simulink).
Automatic scaling of fixed-point data types.
Output Maximum
— Maximum value that block can output[]
(default) | scalarSpecify the maximum value that the block can output. Simulink software uses this maximum value to perform:
Simulation range checking. See Specify Signal Ranges (Simulink).
Automatic scaling of fixed-point data types.
Lock data type settings against changes by the fixed-point tools
— Prevent fixed-point tools from overriding data typesoff
(default) | on
Select this parameter to prevent the fixed-point tools from overriding the data types you specify on the block dialog.
Data Types |
|
Direct Feedthrough |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Zero-Crossing Detection |
|
[1] Golub, G. H., and C. F. Van Loan. Matrix Computations. 3rd ed. Baltimore, MD: Johns Hopkins University Press, 1996.
Generated code relies on memcpy
or
memset
functions (string.h
) under certain
conditions.
If the input is fixed point, it must be signed integer or signed fixed point with power-of-two slope and zero bias.
Fixed-Point Data Types
This diagram shows the data types used within the LDL Factorization block for fixed-point signals.
You can set the intermediate product, product output, accumulator, and output data types in the block dialog box.
When the input is real, the output of the second multiplier is in the product output data type. When the input is complex, the result of the multiplication is in the accumulator data type. For details on the complex multiplication performed, see Multiplication Data Types.