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), Controllers.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

TypeNameDefaultDescription
Integernin (from MIMO)1Number of inputs
Integernout (from MIMO)1Number of outputs
BooleanmatrixOnFilefalseTrue, if matrix should be read from file
StringfileNameModelica_LinearSystems2.DataDir + "k.mat"Name of the matrix data file
StringmatrixName"K"Name of the matrix
Real[:,:]K[1]Matrix gain

Connectors

TypeNameDefaultDescription
RealInput[nin]u (from MIMO)Connector of Real input signals
RealOutput[nout]y (from MIMO)Connector of Real output signals