blockMatrixGain
Output the product of a gain matrix with the input signal vector. The matrix can be loaded from a file optionally
Extends from Modelica.Blocks.Interfaces.MIMO (Multiple Input Multiple Output continuous control block), Controller.Icons.PartialBlockIcon (Icon for a discrete/continuous block).
Information
This block is similar to Modelica.Blocks.Math.MatrixGain. Additionally this block offers to load the matrix from a MATLAB-file. It computes output vector y as product of the gain matrix K with the input signal vector u:
y = K * u;
Example:
parameter: K = [0.12 2; 3 1.5]
results in the following equations:
| y[1] | | 0.12 2.00 | | u[1] |
| | = | | * | |
| y[2] | | 3.00 1.50 | | u[2] |
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | nin (from MIMO) | 1 | Number of inputs |
| Integer | nout (from MIMO) | 1 | Number of outputs |
| Boolean | matrixOnFile | false | True, if matrix should be read from file |
| String | fileName | Modelica_LinearSystems2.DataDir + "k.mat" | Name of the matrix data file |
| String | matrixName | "K" | Name of the matrix |
| Real[:,:] | K | [1] | Matrix gain |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| RealInput[nin] | u (from MIMO) | Connector of Real input signals | |
| RealOutput[nout] | y (from MIMO) | Connector of Real output signals |