WOLFRAM SYSTEM MODELER

# integralExp

Return the exponential and the integral of the exponential of a matrix # Wolfram Language

In:= `SystemModel["Modelica.Math.Matrices.integralExp"]`
Out:= # Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

#### Syntax

```(phi,gamma) = Matrices.integralExp(A,B);
(phi,gamma) = 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.

The function uses a Taylor series expansion with Balancing and scaling/squaring to approximate the integral Ψ of the matrix exponential Φ=e^(AT):

```                                 AT^2   A^2 * T^3          A^k * T^(k+1)
Ψ = int(e^(As))ds = IT + ---- + --------- + ... + --------------
2!        3!                (k+1)!
```

Φ is calculated through Φ = I + A*Ψ, so A may be singular. Γ is simply Ψ*B.

The algorithm runs in the following steps:

1. Balancing
2. Scaling
3. Taylor series expansion
4. Re-scaling
5. Re-Balancing

Balancing put the bad condition of a square matrix A into a diagonal transformation matrix D. This reduce the effort of following calculations. Afterwards the result have to be re-balanced by transformation D*Atransf *inv(D).
Scaling halfen T  k-times, until the norm of A*T is less than 0.5. This guarantees minimum rounding errors in the following series expansion. The re-scaling based on the equation  exp(A*2T) = exp(AT)^2. The needed re-scaling formula for psi thus becomes:

```         Φ = Φ'*Φ'
I + A*Ψ = I + 2A*Ψ' + A^2*Ψ'^2
Ψ = A*Ψ'^2 + 2*Ψ'
```

where psi' is the scaled result from the series expansion while psi is the re-scaled matrix.

The function is normally used to discretize a state-space system as the zero-order-hold equivalent:

```      x(k+1) = Φ*x(k) + Γ*u(k)
y(k) = C*x(k) + D*u(k)
```

The zero-order-hold sampling, also known as step-invariant method, gives exact values of the state variables, under the assumption that the control signal u is constant between the sampling instants. Zero-order-hold sampling is described in

K. J. Åström, B. Wittenmark:
Computer Controlled Systems - Theory and Design
Third Edition, p. 32
```Syntax:
(phi,gamma) = Matrices.expIntegral(A,B,T)
A,phi: [n,n] square matrices
B,gamma: [n,m] input matrix
T: scalar, e.g., sampling time
```

The Algorithm to calculate psi is taken from

H. D. Joos, G. Grübel:
RASP'91 Regulator Analysis and Synthesis Programs
DLR - Control Systems Group 1991

# Syntax

(phi, gamma) = integralExp(A, B, T)

# Inputs (3)

A Type: Real[:,size(A, 1)] Type: Real[size(A, 1),:] Default Value: 1 Type: Real

# Outputs (2)

phi Type: Real[size(A, 1),size(A, 1)] Description: = exp(A*T) Type: Real[size(A, 1),size(B, 2)] Description: = integral(phi)*B

# Revisions

Release Notes:

• July 5, 2002 by H. D. Joos and Nico Walther
Implemented.