pymor.reductors.loewner
¶
Module Contents¶
- class pymor.reductors.loewner.LoewnerReductor(s, Hs, partitioning='even-odd', ordering='regular', conjugate=True, mimo_handling='random')[source]¶
Bases:
pymor.core.cache.CacheableObject
Reductor based on Loewner interpolation framework.
The reductor implements interpolation based on the Loewner framework as in [ALI17].
Parameters
- s
NumPy array
of shape (n,) containing the frequencies.- Hs
NumPy array
of shape (n, p, m) for MIMO systems with p outputs and m inputs orNumPy array
of shape (n,) for SISO systems where theNumPy arrays
resemble the transfer function samples. Alternatively,TransferFunction
orModel
withtransfer_function
attribute.- partitioning
str
ortuple
of length 2. Strings can either be ‘even-odd’ or ‘half-half’ defining the partitioning rule. A user-defined partitioning can be defined by passing a tuple of the left and right indices. Defaults toeven-odd
.- ordering
The ordering with respect to which the partitioning rule is executed. Can be either ‘magnitude’, ‘random’ or ‘regular’. Defaults to ‘regular’.
- conjugate
Whether to guarantee realness of reduced
LTIModel
by keeping complex conjugates in the same partitioning or not. IfTrue
will automatically generate conjugate data if necessary.- mimo_handling
Option indicating how to treat MIMO systems. Can be:
'random'
for using random tangential directions.'full'
for fully interpolating all input-output pairs.Tuple
(ltd, rtd)
whereltd
corresponds to left andrtd
to right tangential directions.
Methods
Constructs a Loewner quadruple as
NumPy arrays
.Reduce using Loewner framework.
- loewner_quadruple()[source]¶
Constructs a Loewner quadruple as
NumPy arrays
.The Loewner quadruple [ALI17]
\[(\mathbb{L},\mathbb{L}_s,V,W)\]consists of the Loewner matrix \(\mathbb{L}\), the shifted Loewner matrix \(\mathbb{L}_s\), left interpolation data \(V\) and right interpolation data \(W\).
Returns
- L
Loewner matrix as a
NumPy array
.- Ls
Shifted Loewner matrix as a
NumPy array
.- V
Left interpolation data as a
NumPy array
.- W
Right interpolation data as a
NumPy array
.
- reduce(r=None, tol=1e-12)[source]¶
Reduce using Loewner framework.
Parameters
- r
Integer for target order of reduced model. If an interpolant with order less than r exists then the output will have the minimal order of an interpolant. Otherwise, the output will be an
LTIModel
with order r. IfNone
the order of the reduced model will be the minimal order of an interpolant.- tol
Truncation tolerance for rank of Loewner matrices.
Returns
- rom
Reduced
LTIModel
.