# DescriptorSystems.jl

A descriptor system is a generalized state-space representation of the form

```
Eλx(t) = Ax(t) + Bu(t),
y(t) = Cx(t) + Du(t),
```

where `x(t)`

is the state vector, `u(t)`

is the input vector, and `y(t)`

is the output vector, and where `λ`

is either the differential operator `λx(t) = dx(t)/dt`

for a continuous-time system or the advance operator `λx(t) = x(t + ΔT)`

for a discrete-time system with the sampling time `ΔT`

. In all what follows, we assume `E`

is square and possibly singular, and the pencil `A − λE`

is regular (i.e., `det(A − λE) ̸≡ 0`

). If `E = I`

, we call the above representation a *standard* state-space system.

The corresponding input-output representation is

`Y(λ) = G(λ)U(λ),`

where, depending on the system type, `λ = s`

, the complex variable in the Laplace transform for a continuous-time system, or `λ = z`

, the complex variable in the `Z`

-transform for a discrete-time system, `Y(λ)`

and `U(λ)`

are the Laplace- or `Z`

-transformed output and input vectors, respectively, and `G(λ)`

is the rational *transfer function matrix* (TFM) of the system, defined as

```
-1
G(λ) = C(λE − A) B + D.
```

It is well known that the descriptor system representation is the most general description for a linear time-invariant system. Continuous-time descriptor systems arise frequently from modelling interconnected systems containing algebraic loops or constrained mechanical systems which describe contact phenomena. Discrete-time descriptor representations are frequently used to model economic processes. A main apeal of descriptor system models is that the manipulation of rational and polynomial matrices can be easily performed via their descriptor system representations, since each rational or polynomial matrix can be interpreted as the TFM of a descriptor system. For an introductory presentation of the main concepts, see [1].

The theoretical background for the analysis of descriptor systems closely relies on investigating the properties of certain linear matrix pencils, as the regular *pole pencil* `P(λ) = A-λE`

, or the generally singular *system matrix pencil* `S(λ) = [A-λE B; C D]`

. Therefore, the main analysis tools of descriptor systems are pencil manipulation techniques (e.g., reductions to various Kronecker-like forms), as available in the MatrixPencils package [2]. Among the main applications of pencil manipulation algorithms, we mention the computation of minimal nullspace bases, the computation of poles and zeros, the determination of the normal rank of polynomial and rational matrices, computation of various factorizations of rational matrices, as well as the solution of linear equations with polynomial or rational matrices. Important additional computational ingredients in these applications are tools for solving matrix equations, as various Lyapunov, Sylvester and Riccati equations. These tools are provided by the MatrixEquations package [3].

The available functions in the `DescriptorSystems.jl`

package cover both standard and descriptor systems with real or complex coefficient matrices. The current version of the package includes the following functions:

**Building descriptor system state-space models**

Construction of descriptor state-space models.`dss`

Extraction of matrix-data from a descriptor state-space model.`dssdata`

**Building rational transfer functions**

Construction of rational transfer function objects.`RationalTransferFunction`

Building rational transfer functions.`rtf`

**Interconnecting descriptor system models**

Building aggregate models by appending the inputs and outputs.`append`

Connecting models in parallel (also overloaded with`parallel`

).`+`

Connecting models in series (also overloaded with`series`

).`*`

Horizontal concatenation of descriptor system models (also overloaded with`horzcat`

).`[ * * ]`

Vertical concatenation of descriptor system models (also overloaded with`vertcat`

).`[ *; * ]`

**Basic operations on descriptor system models**

Inversion of a system.`inv`

Left division for two systems (also overloaded with`ldiv`

).`\`

Right division for two systems (also overloaded with`rdiv`

).`/`

Building the dual of a descriptor system (also overloaded with`gdual`

)`transpose`

Building the conjugate transpose of a system (also overloaded with`ctranspose`

and`adjoint`

).`'`

Building the adjoint of a system.`adjoint`

**Basic conversions on descriptor system models**

Balancing of a descriptor system.`gprescale`

Discretization of continuous-time descriptor systems.`c2d`

Rational transfer function matrix of a descriptor system.`dss2rm`

Polynomial transfer function matrix of a descriptor system.`dss2pm`

Generalized bilinear transformation of a descriptor system.`gbilin`

**Some operations on rational transfer functions and matrices**

Pole-zero cancellation.`simplify`

Normalization of a rational transfer function to monic denominator.`normalize`

Applying a conformal mapping transformation to a rational transfer function or rational transfer function matrix.`confmap`

Computation of zeros, poles and gain of a rational transfer function.`zpk`

Generation of common bilinear transformations and their inverses.`rtfbilin`

**Simplification of descriptor system models**

Minimal realization of descriptor systems.`gminreal`

Irreducible realization of descriptor systems.`gir`

Reduced-order approximations of descriptor systems using balancing related methods.`gbalmr`

Conversion to SVD-like forms without non-dynamic modes.`gss2ss`

Conversion of descriptor systems to standard form.`dss2ss`

**Descriptor system analysis**

Test whether a descriptor system has a regular pole pencil.`isregular`

Poles of a descriptor system.`gpole`

Poles and pole structure information of a descriptor system.`gpoleinfo`

Test whether a descriptor system is proper.`isproper`

Test whether a descriptor system is stable.`isstable`

Zeros of a descriptor system.`gzero`

Zeros and zero structure information of a descriptor system.`gzeroinfo`

Normal rank of the transfer function matrix of a descriptor system.`gnrank`

Hankel norm of a proper and stable descriptor system.`ghanorm`

`gl2norm`

`L2`

norm of a descriptor system.`gh2norm`

`H2`

norm of a descriptor system.`glinfnorm`

`L∞`

norm of a descriptor system.`ghinfnorm`

`H∞`

norm of a descriptor system.ν-gap distance between two descriptor systems.`gnugap`

Frequency response of a descriptor system.`freqresp`

Time response of a descriptor system.`timeresp`

Step response of a descriptor system.`stepresp`

Evaluation of the scaling quality of the matrices of a descriptor system.`gbalqual`

Evaluation of the scaling quality of the matrices of a linear pencil.`pbalqual`

**Factorization of descriptor systems**

Right coprime factorization with proper and stable factors.`grcf`

Left coprime factorization with proper and stable factors.`glcf`

Right coprime factorization with inner denominator.`grcfid`

Left coprime factorization with inner denominator.`glcfid`

Normalized right coprime factorization.`gnrcf`

Normalized left coprime factorization.`gnlcf`

Inner-outer/QR-like factorization.`giofac`

Co-outer-co-inner/RQ-like factorization.`goifac`

Right spectral factorization of`grsfg`

`γ^2*I-G'*G`

.Left spectral factorization of`glsfg`

`γ^2*I-G*G'`

.

**Advanced operations on transfer function matrices**

Additive spectral decompositions.`gsdec`

Right nullspace basis of a transfer function matrix.`grnull`

Left nullspace basis of a transfer function matrix.`glnull`

Range space basis of a transfer function matrix.`grange`

Coimage space basis of a transfer function matrix.`gcrange`

Solution of the linear rational matrix equation`grsol`

`G(λ)*X(λ) = F(λ)`

.Solution of the linear rational matrix equation`glsol`

`X(λ)*G(λ) = F(λ)`

.Right minimum dynamic cover of Type 1 based order reduction.`grmcover1`

Left minimum dynamic cover of Type 1 based order reduction.`glmcover1`

Right minimum dynamic cover of Type 2 based order reduction.`grmcover2`

Left minimum dynamic cover of Type 2 based order reduction.`glmcover2`

Generalized inverses.`ginv`

**Solution of model-matching problems**

Generalized Nehari approximation.`gnehari`

Solution of the least distance problem.`glinfldp`

Approximate solution of the linear rational matrix equation`grasol`

`G(λ)*X(λ) = F(λ)`

.Approximate solution of the linear rational matrix equation`glasol`

`X(λ)*G(λ) = F(λ)`

.

## Release Notes

## Main developer

License: MIT (expat)

## References

[1] A. Varga, Solving Fault Diagnosis Problems – Linear Synthesis Techniques, Vol. 84 of Studies in Systems, Decision and Control, Springer International Publishing, 2017.

[2] A. Varga, MatrixPencils.jl: Matrix pencil manipulation using Julia. Zenodo: https://doi.org/10.5281/zenodo.3894503.

[3] A. Varga, MatrixEquations.jl: Solution of Lyapunov, Sylvester and Riccati matrix equations using Julia. Zenodo: https://doi.org/10.5281/zenodo.3556867.