Main Content

Forward Substitution

Solve LX = B for X when L is lower triangular matrix

  • Forward Substitution block

Libraries:
DSP System Toolbox / Math Functions / Matrices and Linear Algebra / Linear System Solvers

Description

The Forward Substitution block solves the linear system LX = B by simple forward substitution of variables, where:

  • L is the lower triangular M-by-M matrix input to the L port.

  • B is the M-by-N matrix input to the B port.

  • X is the M-by-N output matrix and is the solution of the system of equations.

The block does not check the rank of the inputs. The block only uses the elements in the lower triangle of input L and ignores the upper elements. When you select Input L is unit-lower triangular, the block assumes the elements on the diagonal of L are 1s. This is useful when matrix L is the result of another operation, such as an LDL decomposition, that uses the diagonal elements to represent the D matrix.

Ports

Input

expand all

Specify the input lower triangular M-by-M matrix L through this port. Inputs L and B must have the same number of rows.

When the input L is fixed-point, it is signed only.

Data Types: single | double | int8 | int16 | int32 | fixed point
Complex Number Support: Yes

Specify the B matrix in the LX = B equation as an M-by-N matrix or a M-by-1 vector.

When you specify an M-by-1 vector, the block treats the length-M vector input at port B as an M-by-1 matrix. Inputs L and B must have the same number of rows.

When the input B is fixed-point, it is signed only.

Data Types: single | double | int8 | int16 | int32 | fixed point
Complex Number Support: Yes

Output

expand all

The block returns the output as an M-by-N matrix or an M-by-1 matrix. The size of X matrix is same as the size of the B matrix.

When the inputs are fixed-point, the output matrix X is signed only fixed-point.

Data Types: single | double | int8 | int16 | int32 | fixed point
Complex Number Support: Yes

Parameters

expand all

Main Tab

Select this check box only when all elements on the diagonal of L have a value of 1. When you do so, the block optimizes its behavior by skipping an unnecessary division operation.

Do not select this check box if any elements on the diagonal of L do not have a value of 1. When you clear the Input L is unit-lower triangular check box, the block always performs the division operation.

Select to optimize simulation speed when the diagonal elements of complex input L are real.

Note

When L is a complex fixed-point signal, you must select either Input L is unit-lower triangular or Diagonal of complex input L is real. In these cases, the block ignores any imaginary part of the diagonal of L.

Dependencies

This parameter is visible only when Input L is unit-upper triangular is not selected.

Data Types Tab

Note

Floating-point inheritance takes precedence over the data type settings defined on this pane. When inputs are floating point, the block ignores these settings, and all internal data types are floating point.

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.

When 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.

Product output specifies the data type of the output of a product operation in the Backward Substitution block. For more information on the product output data type, see Fixed-Point Data Types and Multiplication Data Types.

  • 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 first input — The block specifies the product output data type to be the same as the first input data type.

  • fixdt(1,16,0) — The block specifies a signed, binary-point, scaled, fixed-point data type with a word length of 16 bits and a fraction length of 0.

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 specifies the data type of the output of an accumulation operation in the Backward Substitution block. For illustrations on how to use the accumulator data type in this block, see the Fixed-Point Data Types section.

  • 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 product output — The block specifies the accumulator data type to be the same as the product output data type.

  • Inherit: Same as first input — The block specifies the accumulator data type to be the same as the first input data type.

  • fixdt(1,16,0) — The block specifies a signed, binary-point scaled, fixed-point data type with a word length of 16 bits and a fraction length of 0.

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 specifies the data type of the output of the Backward Substitution block. For more information on the output data type, see the Fixed-Point Data Types section.

  • Inherit: Same as first input — The block specifies the output data type to be the same as the first input data type.

  • fixdt(1,16,0) — The block specifies a signed, binary-point scaled, fixed-point data type with 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).

Specify the minimum value 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.

Specify the maximum value 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.

Select this parameter to prevent the fixed-point tools from overriding the data types you specify in the block dialog box.

Block Characteristics

Data Types

double | fixed point | integer | single

Direct Feedthrough

no

Multidimensional Signals

no

Variable-Size Signals

no

Zero-Crossing Detection

no

More About

expand all

Extended Capabilities

Fixed-Point Conversion
Design and simulate fixed-point systems using Fixed-Point Designer™.

Version History

Introduced before R2006a