.Modelica.Math.Matrices.integralExpT

Information

(phi,gamma,gamma1) = Matrices.integralExp(A,B);
(phi,gamma,gamma1) = Matrices.integralExp(A,B,T=1);

Description

This function computes the exponential phi = e^(AT) of matrix A and the integral gamma = integral(phi*dt)*B and the integral integral((T-t)*exp(A*t)*dt)*B, where A is a square (n,n) matrix and B, gamma, and gamma1 are (n,m) matrices.

The function calculates the matrices phi,gamma,gamma1 through the equation:

                                 [ A B 0 ]
[phi gamma gamma1] = [I 0 0]*exp([ 0 0 I ]*T)
                                 [ 0 0 0 ]

The matrices define the discretized first-order-hold equivalent of a state-space system:

      x(k+1) = phi*x(k) + gamma*u(k) + gamma1/T*(u(k+1) - u(k))

The first-order-hold sampling, also known as ramp-invariant method, gives more smooth control signals as the ZOH equivalent. First-order-hold sampling is, e.g., described in

K. J. Åström, B. Wittenmark:
Computer Controlled Systems - Theory and Design
Third Edition, p. 256

Interface

function integralExpT
  extends Modelica.Icons.Function;
  input Real A[:, size(A, 1)];
  input Real B[size(A, 1), :];
  input Real T = 1;
  output Real phi[size(A, 1), size(A, 1)] "= exp(A*T)";
  output Real gamma[size(A, 1), size(B, 2)] "= integral(phi)*B";
  output Real gamma1[size(A, 1), size(B, 2)] "= integral((T-t)*exp(A*t))*B";
end integralExpT;

Revisions

Release Notes:


Generated at 2020-06-05T07:38:22Z by OpenModelica 1.16.0~dev-420-gc007a39