morlab – the model order reduction laboratory

17
MORLAB – The Model Order Reduction LABoratory Peter Benner * Steffen W. R. Werner Abstract For an easy use of model order reduction techniques in applications, software solutions are needed. In this paper, we describe the MORLAB, Model Order Reduction LABoratory, toolbox as an efficient implementation of model reduction techniques for dense, medium- scale linear time-invariant systems. Giving an introduction to the underlying programming principles of the toolbox, we show the basic idea of spectral splitting and present an overview about implemented model reduction techniques. Two numerical examples are used to illustrate different use cases of the MORLAB toolbox. 1 Introduction For the modeling of natural processes as, e.g., fluid dynamics, chemical reactions or the behavior of electronic circuits, power or gas transportation networks, dynamical input-output systems are used G : 0= f (x(t), Dx(t),...,D k x(t),u(t)), y(t)= h(x(t), Dx(t),...,D k x(t),u(t)), (1) with states x(t) R n , inputs u(t) R p and outputs y(t) R p . The operator D j denotes the derivative or shift operator of order j N in case of underlying continuous- or discrete- time dynamics. Due to the demand for increasing the accuracy of models, the number of states describing (1) is drastically increasing and, consequently, there is a high demand for computational resources (time and memory) when using (1) in simulations or controller design. A solution to this problem is given by model order reduction, which aims for the construction of a surrogate model G, with a much smaller number of internal states ˆ x(t) R r , r n, which approximates the input-to-output behavior of (1) such that y - ˆ ytol·u, for an appropriately defined norm, a given tolerance tol and all admissible inputs u, where ˆ y is the output of the reduced-order system. A software solution for model order reduction of dynamical systems is the MORLAB, Model Order Reduction LABoratory, toolbox. Originating from [6], the toolbox is mainly developed as efficient open source implementation of established matrix equation-based model reduction meth- ods. Nowadays, it is one of the most efficient model reduction toolboxes for dense, medium-scale, linear time-invariant systems, with an implementation compatible with MathWorks MATLAB and * Max Planck Institute for Dynamics of Complex Technical Systems, Sandtorstr. 1, 39106 Magdeburg, Germany. E-mail: [email protected] Otto von Guericke University, Faculty of Mathematics, Universit¨atsplatz 2, 39106 Magdeburg, Germany. E-mail: [email protected] Max Planck Institute for Dynamics of Complex Technical Systems, Sandtorstr. 1, 39106 Magdeburg, Germany. E-mail: [email protected] 1 arXiv:2002.12682v1 [cs.MS] 28 Feb 2020

Upload: others

Post on 05-Jun-2022

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: MORLAB – The Model Order Reduction LABoratory

MORLAB – The Model Order ReductionLABoratory

Peter Benner∗ Steffen W. R. Werner†

AbstractFor an easy use of model order reduction techniques in applications, software solutions

are needed. In this paper, we describe the MORLAB, Model Order Reduction LABoratory,toolbox as an efficient implementation of model reduction techniques for dense, medium-scale linear time-invariant systems. Giving an introduction to the underlying programmingprinciples of the toolbox, we show the basic idea of spectral splitting and present an overviewabout implemented model reduction techniques. Two numerical examples are used to illustratedifferent use cases of the MORLAB toolbox.

1 IntroductionFor the modeling of natural processes as, e.g., fluid dynamics, chemical reactions or the behaviorof electronic circuits, power or gas transportation networks, dynamical input-output systems areused

G :{

0 = f(x(t), Dx(t), . . . , Dkx(t), u(t)),y(t) = h(x(t), Dx(t), . . . , Dkx(t), u(t)),

(1)

with states x(t) ∈ Rn, inputs u(t) ∈ Rp and outputs y(t) ∈ Rp. The operator Dj denotesthe derivative or shift operator of order j ∈ N in case of underlying continuous- or discrete-time dynamics. Due to the demand for increasing the accuracy of models, the number of statesdescribing (1) is drastically increasing and, consequently, there is a high demand for computationalresources (time and memory) when using (1) in simulations or controller design. A solution tothis problem is given by model order reduction, which aims for the construction of a surrogatemodel G, with a much smaller number of internal states x(t) ∈ Rr, r � n, which approximatesthe input-to-output behavior of (1) such that

‖y − y‖ ≤ tol·‖u‖,

for an appropriately defined norm, a given tolerance tol and all admissible inputs u, where y is theoutput of the reduced-order system.

A software solution for model order reduction of dynamical systems is the MORLAB, ModelOrder Reduction LABoratory, toolbox. Originating from [6], the toolbox is mainly developed asefficient open source implementation of established matrix equation-based model reduction meth-ods. Nowadays, it is one of the most efficient model reduction toolboxes for dense, medium-scale,linear time-invariant systems, with an implementation compatible with MathWorks MATLAB and∗Max Planck Institute for Dynamics of Complex Technical Systems, Sandtorstr. 1, 39106 Magdeburg, Germany.

E-mail: [email protected] von Guericke University, Faculty of Mathematics, Universitatsplatz 2, 39106 Magdeburg, Germany.E-mail: [email protected]

†Max Planck Institute for Dynamics of Complex Technical Systems, Sandtorstr. 1, 39106 Magdeburg, Germany.E-mail: [email protected]

1

arX

iv:2

002.

1268

2v1

[cs

.MS]

28

Feb

2020

Page 2: MORLAB – The Model Order Reduction LABoratory

Table 1: Code meta data of the latest MORLAB version [13].name (shortname) Model Order Reduction LABoratory (MORLAB)

version (release-date) 5.0 (2019-08-23)identifier (type) doi: 10.5281/zenodo.3332716 (doi)

authors Peter Benner, Steffen W. R. Wernerorcids 0000-0003-3362-4103, 0000-0003-1667-4862

topic (type) Model Reduction (Toolbox)license (type) GNU Affero General Public License v3.0 (open)

languages MATLABdependencies MATLAB (≥ 2012b), Octave (≥ 4.0.0)

systems Linux, MacOS, Windowswebsite http://www.mpi-magdeburg.mpg.de/projects/morlab

GNU Octave. In the latest version [13], MORLAB gives a large variety of balancing-based modelreduction methods and also some non-projective methods. Most of those are not known to beimplemented somewhere else. In contrast to other software solutions, the general philosophy ofMORLAB is to work on invariant subspaces rather than with spectral decompositions or projec-tions on hidden manifolds, which results in fast and accurate implementations. Mainly the twospectral projection methods, the matrix sign function and the right matrix pencil disk function, areused in the underlying implementations. Therefore, MORLAB is suited as backend source code formulti-step model reduction approaches, for example, using a pre-reduction step; see, e.g., [25, 35].Additionally to model order reduction methods, the toolbox implements efficient matrix equationsolvers, system-theoretic subroutines and evaluation routines to examine original and reduced-order systems in the frequency and time domain. Due to the brevity of the paper, the additionalmain features are not further considered in detail.

In this paper, we will describe the underlying principles and structures of the MORLAB toolboxand give some applications of the software. The meta data of the latest MORLAB version [13] canbe found in Table 1. In the following, Section 2 starts with an introduction of the programmingprinciples that were used in MORLAB. Afterwards, Section 3 gives the underlying ideas of thespectral splitting, on which the toolbox bases, followed by Section 4 with an overview about theimplemented model reduction methods. In Section 5, two applications of using MORLAB asbackend software are presented. The paper is concluded by Section 6.

2 Code design principlesThe main aim of the MORLAB toolbox is to give efficient and comparable implementations of manydifferent model reduction methods. Following certain design principles, which will be explained inmore detail in the upcoming subsections, the following list of main features briefly summarizes theMORLAB toolbox.

Feature checklist

Open source and free The toolbox is running under the GNU Affero General Public Li-cense v3.0 and is freely available on the project website and onZenodo.

Fast and exact Using spectral projection methods, the toolbox can outperformother established software in terms of accuracy and speed.

Unified framework All model reduction routines share the same interface and allow forquick exchange and easy comparison between the methods.

Modular Each subroutine can be called on its own by the user to be used andcombined in varies ways.

2

Page 3: MORLAB – The Model Order Reduction LABoratory

Table 4: Currently supported system classes.Class System equations Routine name

Continuous-time standard systems x(t) = Ax(t) +Bu(t),y(t) = Cx(t) +Du(t) ct ss

Discrete-time standard systems xk+1 = Axk +Buk,yk = Cxk +Duk

dt ss

Continuous-time descriptor systems Ex(t) = Ax(t) +Bu(t),y(t) = Cx(t) +Du(t) ct dss

Discrete-time descriptor systems Exk+1 = Axk +Buk,yk = Cxk +Duk

dt dss

Continuous-time second-order systems Mx(t) = −Kx(t)− Ex(t) +Buu(t),y(t) = Cpx(t) + Cvx(t) +Du(t) ct soss

Portable No binary extensions are required, which allows for running thetoolbox with bare MATLAB or Octave installations.

In general, MORLAB uses spectral projection methods for all steps of the model reductionprocedure. Fig. 1 shows the different stages in MORLAB from the full-order to the reduced-order model. First, the full-order model is decomposed into (at most) three subsystems that canusually be considered independently of each other for the application of model reduction techniques.This first main step, the additive system decomposition, is discussed in more detail in Section 3.Afterwards, the model reduction methods are applied to the resulting subsystems. An overview ofthose can be found in Section 4. At the end, the reduced subsystems are coupled for the resultingreduced-order model. Based on this basic workflow, the different design principles applied inMORLAB are explained in the following. For the sake of brevity, mainly the model reductionroutines are considered.

2.1 Toolbox structureThe routines in MORLAB follow a strict structure and naming scheme to make them easy to findand interpret in terms of their objective. Describing first the general structure, the routines of thetoolbox are divided by their purpose into the following subdirectories:

checks/ Contains subroutines that are used for internal checks of data, e.g., if thesystem structures fit to the model reduction methods.

demos/ Contains example scripts showing step-by-step explanations of the differentmain features of the toolbox.

eqn solvers/ Contains the matrix equation solvers.evaluation/ Contains functions to evaluate the full-order or reduced-order models in the

time or frequency domain.mor/ Contains the model reduction routines.subroutines/ Contains auxiliary and system-theoretic routines that are used by the model

reduction techniques, matrix equation solvers or evaluation functions.

Considering to the naming scheme of MORLAB, each function starts with ml as assignmentto the toolbox. This makes MORLAB routines easier to distinguish from other source codes andalso allows for easy searching. Mainly the model reduction routines, but also some subroutines are

3

Page 4: MORLAB – The Model Order Reduction LABoratory

Full-OrderSystem

G

Stable PartGs

PolynomialPartG∞

Anti-StablePartGu

ProperReduction

Gs

ImproperReduction

G∞

Reduced-Order SystemG = G∞ + Gs + Gu

Full-OrderModel

Additive SystemDecomposition

Reduction ofSubsystems

Coupling ofReduced Subsystems

Figure 1: General MORLAB workflow.

additionally named after the system classes they can be applied to. Currently, there are routines forcontinuous- (ct) and discrete-time (dt) dynamical system with equations that describe standard(ss), descriptor (dss) or second-order state spaces (soss). The resulting different system classes,supported in the latest MORLAB version, are summarized in Table 4 with their names, systemequations and the corresponding naming schemes.

2.2 Function interfacesA typical function call in MORLAB can be seen in Fig. 2. From before, we know that the calledfunction is a MORLAB routine for continuous-time standard systems (see Table 4). The actualfunction name, bt, stands for the balanced truncation method. Fig. 2 shows the principle idea inMORLAB to give an easy interface to the user. Here, sys contains the data of the original system,while rom gives the resulting reduced-order model in exactly the same format as the original modelwas given, indicating the purpose of using reduced-order models as surrogates for the originalsystem. In general, MORLAB supports three different interfaces for model reduction methods.It is possible to pass directly the system matrices to the function (e.g., ml ct ss bt(A, B, C,D, opts)) or to construct the system as an object by using the native data type struct, withappropriate naming of fields, or the state-space object (ss) introduced by the Control SystemToolboxTM in MATLAB or the ’control’ package in Octave. The latter format allows for easyinterconnection to other model reduction software and also for using system-theoretic routinesimplemented in the two mentioned software libraries.

The second important part of the MORLAB interface for nearly all routines are the opts andinfo structs, as shown in Fig. 2. Supporting the feature of configurability, the opts struct allowsthe user the rearrangement of all computational parameters, which would be usually set by thefunction itself during runtime. In general, each MORLAB function that allows the user to changeoptional parameters for the computations has an opts struct for that purpose. As result, higherlevel routines can contain nested structs to change computational parameters of used subroutines.Fig. 3 shows an example opts struct for the ml ct ss bt. This struct again contains entries endingon opts denoting also opts structs for subroutines that are called by the main function. Besidechanging computational parameters, a second aim of the opts struct is the a priori determination of

4

Page 5: MORLAB – The Model Order Reduction LABoratory

[rom, info] = ml ct ss bt(sys, opts)

sys = struct / ss

A: [n x n double]B: [n x m double]C: [p x n double]D: [p x m double]

opts = struct

infdecopts: [1x1 struct]stabdecopts: [1x1 struct]

Method: ’sr’Tolerance: 1.0e-02

...

rom = struct / ss

A: [r x r double]B: [r x m double]C: [p x r double]D: [p x m double]

info = struct

AbsErrBoundHsviHsvp

infoLYAPDL...

Figure 2: Example function call of a model reduction routine in MORLAB.

lyapdlopts: [ 1x1 struct | {ml_morlabopts(’ml_lyapdl_sgn_fac’)} ]Method: [ ’bfsr’ | {’sr’} ]Order: [ positive integer | {min(10,length(Hsv)) + Nu} ]

OrderComputation: [ ’order’ | {’tolerance’} ]stabsignmopts: [ 1x1 struct | {ml_morlabopts(’ml_signm’)} ]stabsylvopts: [ 1x1 struct | {ml_morlabopts(’ml_sylv_sgn’)} ]

StoreProjection: [ 1 | {0} ]Tolerance: [ nonnegative scalar | {1.0e-02} ]UnstabDim: [ integer | {-1} ]

For more details see ml_ct_ss_bt.

Figure 3: Example opts struct for the ml ct ss bt function.

system information. For example, if a system is known to be stable, the additive decomposition intothe stable and anti-stable subsystems can be turned off using the opts struct to avoid unnecessarycomputations. For easy application, only entries, which the user wants to change, need to beexisting in the struct. Also, the toolbox comes with an option constructor (ml morlabopts),which creates a complete but empty opts struct for a given function name. The consistent namingof optional parameters between different routines allows the easy reuse of opts structs for differentfunctions.

The counterpart of the opts struct is the info struct. Here, information about the performanceand results of the routine are collected. As for opts, the info struct can be nested as it containsstructs starting with info, which give information about used subroutines. Also, this struct isused for optional outputs, e.g., projection matrices of a model reduction method can be stored inhere.

2.3 DocumentationMORLAB comes with an extensive documentation that is accessible in several ways. Each routinehas a complete inline documentation, which can be displayed by the help command, containingthe syntax, description and literature references for background information. Besides, a completeoverview about the existing MORLAB routines with short description can be generated by helpmorlab. As usual for MATLAB toolboxes, a full HTML documentation is provided in the toolboxand demo scripts can be used as a starting how-to to get into the main features of the toolbox.

5

Page 6: MORLAB – The Model Order Reduction LABoratory

3 Additive system decomposition approachMost model order reduction methods are in a certain sense restricted with respect to the spectrumof the underlying system matrices, e.g., the classical balanced truncation method can only be ap-plied to first-order systems with finite stable matrix pencils. Other software solutions use thereforeither an eigendecomposition of the system matrices in the beginning or apply projections ontothe hidden manifolds. In MORLAB, this problem is solved by working directly with the corre-sponding invariant subspaces of the matrix pencil. As shown in Fig. 1, this results in the additivedecomposition of the full-order system into independent reducable subsystems, in the literatureknown as additive decomposition of the transfer function, which will be coupled at the end again.MORLAB has two different approaches for this additive decomposition based on either the solutionof a Sylvester equation or on a block wise projection approach. This gives MORLAB the advantageof handling unstructured systems, while staying efficient and accurate due to only computing thenecessary deflating subspaces. For both approaches, the matrix sign and disk functions are used,as quickly defined below.

Let Y ∈ Rn×n be a matrix with no purely imaginary eigenvalues, then the Jordan canonicalform of Y can be written as

Y = S

[J− 00 J+

]S−1, (2)

where S is an invertible transformation matrix, J− contains the k eigenvalues of Y with negativereal parts and J+ the n− k eigenvalues with positive real parts. The matrix sign function is thendefined as

sign(Y ) = S

[−Ik 0

0 In−k

]S−1, (3)

with S the transformation matrix from (2); see, e.g., [34]. Efficient computations can be based ona Newton scheme.

Let λX−Y , with X,Y ∈ Rn×n, be a regular matrix pencil with no eigenvalues on the unit circleand its Weierstrass canonical form be written as

λX − Y = W

[λIk − J0 0

0 λN − J∞

]T−1, (4)

where W,T are invertible transformation matrices, λIk − J0 contains the k eigenvalues inside theunit disk and λN − J∞ the n − k eigenvalues outside the unit disk. The right matrix pencil diskfunction is then defined by

disk(Y,X) = T

[0 00 In−k

]−[Ik 00 0

])T−1, (5)

with T , the right transformation matrix from (4). The computation follows the inverse-free itera-tion [1, 5] and a subspace extraction method [7, 36].

In the following subsections, the ideas of the additive decomposition for two general systemclasses are quickly summarized.

3.1 Standard system caseAssume a continuous-time standard system

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

(6)

with A ∈ Rn×n, B ∈ Rn×m, C ∈ Rp×m, D ∈ Rp×m, A having no eigenvalues on the imaginaryaxis and its representation in the frequency domain by the corresponding transfer function

G(s) = C(sIn −A)−1B +D,

6

Page 7: MORLAB – The Model Order Reduction LABoratory

for s ∈ C. Most model reduction methods can only be applied to asymptotically stable systems,which means in case of (6) that A has only eigenvalues with negative real parts. Nevertheless,model reduction methods can be applied by decomposing the system (6) into two subsystems,where the system matrices contain either the stable or anti-stable system part, i.e., we search fora transformation matrix T such that

T−1AT =[As 00 Au

],

where As contains only the stable and Au the anti-stable eigenvalues. Using T as state-spacetransformation and partitioning accordingly the input and output matrices yields the additivesystem decomposition of the system’s transfer function

G(s) = Gs(s) +Gu(s).

Applying the matrix sign function (3) to A gives the appropriate spectral splitting, where thespectral projectors onto the deflating subspaces are given as

Ps = 12(In − sign(A)) and Pu = 1

2(In + sign(A)).

Let QRΠT = In− sign(A) be a pivoted QR decomposition, the dimension of the deflating subspacecorresponding to the eigenvalues with negative real part is given by 0.5(n + tr(sign(A))) and weget

QTAQ =[As WA

0 Au

].

By solving the standard Sylvester equation

−AuX +XAs −WA = 0, (7)

the final transformation matrix and its inverse are given by

T = Q

[Ik X0 In−k

]and T−1 =

[Ik −X0 In−k

]QT. (8)

The MORLAB implementation uses the Newton iteration with Frobenius norm scaling for thecomputation of the matrix sign function as well as a matrix sign function-based solver for theSylvester equation (7). Note that the actual transformation matrix (8) is never setup completelybut only applied block wise on the original system to avoid unnecessary computations.

Remark 1 (Splitting of discrete-time standard systems). In case of discrete-time standard systems,the implementation involves the matrix sign function of (A + In)−1(A − In) and the solution ofthe discrete-time Sylvester equation A−1

u XAs −X − A−1u WA = 0 for doing the spectral splitting

with respect to the unit circle.

3.2 Descriptor system caseNow, we consider the case of continuous-time descriptor systems

Ex(t) = Ax(t) +Bu(t),y(t) = Cx(t) +Du(t),

(9)

with E,A ∈ Rn×n, B ∈ Rn×m, C ∈ Rp×m, D ∈ Rp×m, λE − A having no finite eigenvalues onthe imaginary axis and its representation in the frequency domain by the corresponding transferfunction

G(s) = C(sE −A)−1B +D, s ∈ C.

7

Page 8: MORLAB – The Model Order Reduction LABoratory

In contrast to the previous section, an additional splitting for the algebraic part corresponding tothe infinite eigenvalues of λE − A is necessary, i.e., we search for transformation matrices W,Tsuch that

W (λE −A)T = λ

Es 0 00 Eu 00 0 E∞

As 0 00 Au 00 0 A∞

, (10)

where λEs −As contains the finite stable eigenvalues, λEu −Au the finite anti-stable eigenvaluesand λE∞ − A∞ only infinite eigenvalues. Then, the system and its transfer function accordinglydecouple into the different parts

G(s) = Gs(s) +Gu(s) +G∞(s),

as shown in Fig. 1. For this purpose, the Theorem 3 from [11] is used to construct block wiseorthogonal transformation matrices.

First, the splitting of the algebraic part is performed as G = Gsu+G∞ by using the matrix diskfunction. In fact, the inverse-free iteration is applied to the matrix pencil λ(αA)−E for appropriatescaling parameter α to compute matrices A and E, whose null spaces are the deflating subspacesof λ(αA) − E corresponding to the eigenvalues inside and outside the unit circle, respectively;see [1,5]. Using a stabilized subspace extraction method [7,36], the orthogonal projection matricescan be obtained and according to [11] combined into appropriate transformation matrices to get

W (λE −A)T = λ

[Esu 0

0 E∞

]−[Asu 0

0 A∞

],

where λEsu − Asu contains all the finite eigenvalues. Afterwards, the generalized matrix signfunction, working implicitly on the spectrum of E−1

su Asu, is used such that the null spaces ofEsu − sign(Asu, Esu) and Esu + sign(Asu, Esu) are the deflating subspaces corresponding to theeigenvalues left and right of the imaginary axis, respectively. Using the same subspace extractionmethod and block transformation, the block diagonalization (10) is accomplished.

Remark 2 (Splitting of discrete-time descriptor systems). In the discrete-time descriptor case, thesecond splitting with respect to the imaginary axis needs to be replaced by a splitting with respectto the unit disk. Although, this is the actual nature of the matrix disk function, for performancereasons, the generalized matrix sign function is used as sign(Asu − Esu, Asu + Esu) replaces thesign functions above.

4 Model reduction with the MORLAB toolboxMost of the model reduction methods in MORLAB belong to the class of projection-based modelreduction, i.e., we are searching for truncation matrices W,T ∈ Rn×r, which are used to projectthe state-space, x ≈ T x, and the corresponding equations. For example, given a continuous-timedescriptor system (9), the reduced-order system is computed by

WTET︸ ︷︷ ︸E

˙x(t) = WTAT︸ ︷︷ ︸A

x(t) +WTB︸ ︷︷ ︸B

u(t),

y(t) = CT︸︷︷︸C

x(t) + D︸︷︷︸D

u(t),(11)

with E, A ∈ Rr×r, B ∈ Rr×m, C ∈ Rp×r and D = D. In the following, a very brief overview aboutthe implemented model reduction methods in MORLAB is provided.

4.1 First-order methodsFor the sake of generality in the MORLAB setting, only the method abbreviations are mentionedhere. According to the naming scheme, see Section 2 and Fig. 2, the abbreviations have to beconnected with the system classes to give the actual MORLAB function.

8

Page 9: MORLAB – The Model Order Reduction LABoratory

Table 5: First-order model reduction methods.Method Routine name Comment References

Balanced truncation bt - preserves stability [26,28]Balanced stochastic truncation bst - preserves minimal phase [9, 21]Frequency-limited balanced truncation flbt - local frequency approx. [19,23]Time-limited balanced truncation tlbt - local time approx. [19,22]LQG balanced truncation lqgbt - unstable system reduction [9, 24]H∞ balanced truncation hinfbt - unstable system reduction [29]Positive-real balanced truncation prbt - preserves passivity [18,33]Bounded-real balanced truncation brbt - preserves contractivity [31,33]

Modal truncation mt - preserves spectrum parts [8, 17]Hankel-norm approximation hna - best approx. in Hankel-norm [11,20]

One of the oldest ideas for model reduction, and fitting with the spectral splitting approachfrom before, is modal truncation. While originally a part of the eigenvector basis was used forthe projection [17], the deflating subspaces from Section 3 are an appropriate choice when usingshifting and scaling on the spectrum of the system matrices.

A large part of the model reduction methods in MORLAB are so-called balancing-related meth-ods. In classical balanced truncation [28], the continuous-time Lyapunov equations

AP + PAT +BBT = 0,ATQ+QA+ CTC = 0,

(12)

are solved for the system Gramians P and Q, which are then used by, e.g., the square rootor balancing-free square root method to compute the reduced-order projection matrices; see,e.g., [26, 38]. The balancing-related methods are based on the idea of balanced truncation butreplace the Lyapunov equations (12) by other matrix equations, which infuse different propertiesto the resulting methods. Some comments on the implementation of balancing-related methods inMORLAB are given for previous versions in [10] for the standard system case and the general ideaof the implementation of model reduction for descriptor systems is given in [12].

Also, the Hankel-norm approximation is implemented. This method is non-projection-based,i.e., by construction, there are no W,T fulfilling (11) and also D = D does not hold anymore. Thismethod solves the optimal approximation problem in the Hankel semi-norm and is also a goodguess for the H∞ approximation problem [11, 20]. It can be seen as a refinement of the balancedtruncation method, since it is also based on the solution of (12).

As an overview for the current MORLAB version, Table 5 shows all the implemented modelreduction methods for first-order continuous-time systems, with their routine abbreviation, a com-ment on their properties and references for the standard and descriptor versions.Remark 3 (Discrete-time model reduction methods). Currently, only the methods mt, bt andlqgbt have discrete-time implementations for the standard and descriptor system case. Discrete-time equivalents of the continuous-time matrix equations are solved for those methods.

4.2 Second-order methodsIn case of systems with second-order time derivatives, the toolbox implements different structure-preserving approaches. Given the system structure from Table 4, the reduced-order models willalso have the form

M ¨x(t) = −Kx(t)− E ˙x(t) + Buu(t),y(t) = Cpx(t) + Cv ˙x(t) + Du(t),

(13)

with M E, K ∈ Rr×r, Bu ∈ Rr×m, Cp, Cv ∈ Rp×r and D ∈ Rp×m. MORLAB implements thesecond-order balanced truncation and balancing-related methods for this purpose. Originating

9

Page 10: MORLAB – The Model Order Reduction LABoratory

100 102 104 106 10810−12

10−7

10−2

Frequency ω (rad/sec)

Mag

nitu

de

(a) Frequency response.

100 102 104 106 10810−6

10−1

104

Frequency ω (rad/sec)

Mag

nitu

de

(b) Relative errors.

Original p (r = 12) pm (r = 12) pv (r = 11) vp (r = 20)vpm (r = 20) v (r = 12) fv (r = 12) so (r = 12)

Figure 4: Frequency domain results for the butterfly gyroscope.

in [16, 27, 32], the second-order balanced truncation approach uses a first-order realization of theoriginal second-order system and then restricts to parts of the system Gramians to result in (13).In [14], a collection of the different construction formulas can be found that are all implementedin MORLAB, as well as the frequency- and time-limited second-order balanced truncation meth-ods, which are also implemented in MORLAB. The naming of the methods follows the previoussubsection.

5 Numerical examplesIn the following, two benchmark examples are shown to demonstrate possible applications of theMORLAB toolbox. The experiments reported here have been executed on a machine with 2Intel(R) Xeon(R) Silver 4110 CPU processors running at 2.10GHz and equipped with 192 GBtotal main memory. The computer is running on CentOS Linux release 7.5.1804 (Core) and usingMATLAB 9.4.0.813654 (R2018a) and the MORLAB toolbox version 5.0 [13].

The source code of the implementations used to compute the presented results can beobtained from

https://doi.org/10.5281/zenodo.3678213

and is authored by Jens Saak and Steffen W. R. Werner.

5.1 Butterfly gyroscopeAs a first numerical example, we consider the butterfly gyroscope benchmark example from [30];see [15] for the background. We will use the MORLAB toolbox as backend software for a two-step model reduction approach. Thereby, a fast pre-reduction step is used to create an accurate,medium-scale approximation of the original model and, afterwards, more sophisticated model re-duction methods are used to construct the final reduced-order model, see, e.g., [25,35]. The modelwe consider now involves second-order time derivatives as it has the form

Mx(t) + Ex(t) +Kx(t) = Buu(t),y(t) = Cpx(t),

with a state-space dimension n = 17 361 and m = 1, p = 12 inputs and outputs, respectively.As in [35], we use the structure-preserving interpolation framework from [4] as efficient pre-

reduction method that preserves the system structure in the intermediate medium-scale approxi-mation. We compute a single projection basis the same way as in [35] using the sampling points

10

Page 11: MORLAB – The Model Order Reduction LABoratory

±logspace(0, 8, 100)i. After orthogonalization by the economy size QR decomposition, theintermediate reduced-order model has the state-space dimension 2 600. Now, we apply the second-order balanced truncation methods from MORLAB to the intermediate model. The toolbox sup-ports an all-at-once approach for balancing-related model reduction, i.e., the underlying Gramiansare computed once and then used for several different reduced-order models. Therefore, we cancompute all 8 different second-order balancing formulas from [14] at the same time and comparethem afterwards.

Fig. 4 shows the resulting reduced-order models in the frequency domain. The relative error wascomputed

‖G(iω)− G(iω)‖2‖G(iω)‖2

,

in the frequency range ω ∈ [100, 108]. Both plots were directly generated with the MORLABroutine ml sigmaplot, which computes sigma and error plots for an arbitrary number of givenmodels. The notation in the legend follows the formulas from [14]. Except for the pm and vpmmodels, all other reduced-order models are stable. Clearly, the winners are p, v, pv and so, whichall have basically the same size and error behavior.

5.2 Parametric thermal block modelAs second example, we consider the parametric thermal block model as described in [37] withthe single parameter setup. Following this description, we consider the first-order generalizedstate-space system

Ex(t;µ) = A(µ)x(t;µ) +Bu(t),y(t;µ) = Cx(t;µ),

(14)

where A(µ) = A0 + µ (0.2A1 + 0.4A2 + 0.6A3 + 0.8A4) , with the parameter µ ∈ [10−6, 102], thestate-space dimension n = 7 488 and m = 1, p = 4 inputs and outputs, respectively. The matrixpencil λE −A(µ) is finite and stable for all parameter values µ in the range of interest.

Although MORLAB does not implement parametric system classes yet, we want to use thetoolbox as model reduction backend for two-step parametric model reduction methods. The firstidea is taken from [3]. Given some non-parametric reduced-order models Gj computed for param-eter samples µj , j = 1, . . . , k, a global parameter interpolating system can be constructed in thefrequency domain using Lagrange interpolation as

G(s, µ) =k∑

j=1`j(µ)Gj(s), (15)

with `j(µ) Lagrange basis functions in the parameter µ with the knot vector µ1, . . . , µk. Rewritingthe sum (15) gives a realization for the interpolating reduced-order model

E =

E1 . . .

Ek

, A =

A1 . . .

Ak

,

B =

B1...Bk

, C =

[`1(µ)C1, . . . , `k(µ)Ck

],

where Ej , Aj , Bj , Cj are the matrices of the local reduced-order models. Thinking of other scalarfunction approximation methods, easy extensions of (15) come into mind. Replacing the Lagrangebasis functions `j(µ) by linear B-splines b1,j(µ) over the knot vector µ1, . . . , µk, we can constructa piecewise linear interpolating reduced-order model. Another idea would be to use the variationdiminishing B-spline approximation, which just needs some modifications of the knot vector used

11

Page 12: MORLAB – The Model Order Reduction LABoratory

10−4 10−2 100 102 10410−6

10−4

10−2

100

102

Frequency ω (rad/sec)

Para

met

erµ

(a) TwoPW (r = 63).

10−4 10−2 100 102 10410−6

10−4

10−2

100

102

Frequency ω (rad/sec)

Para

met

erµ

(b) OnePW (r = 107).

10−4 10−2 100 102 10410−6

10−4

10−2

100

102

Frequency ω (rad/sec)

Para

met

erµ

(c) InterpLag (r = 108).

10−4 10−2 100 102 10410−6

10−4

10−2

100

102

Frequency ω (rad/sec)

Para

met

erµ

(d) InterpBspline (r = 108).

10−4 10−2 100 102 10410−6

10−4

10−2

100

102

Frequency ω (rad/sec)

Para

met

erµ

(e) VarDABspline (r = 108).

10−7 10−6 10−5 10−4 10−3 10−2 10−1 100 101 102 103 104

Figure 5: Relative errors in the frequency domain of different parametric extensions for the thermalblock model.

for the basis functions. In general, this transfer function interpolation-based approach comes withseveral advantages. First, it does not matter how the local reduced-order models were computedor which size they have. If all local reduced-order models were stable, the global interpolatingone will be stable by construction, too. Also, instead of setting up the complete reduced-ordermodel, it can be advantageous to use the local reduced-order models for simulations in paralleland combine the results at the end by the parametric output matrix.

A different approach is given by the piecewise approximation; see, e.g., [2]. For this method, letthe local reduced-order models be computed by projection methods and the projection matricesbe collected as W = [W1, . . . ,Wk] and T = [T1, . . . , Tk]. The parametric reduced-order system isthen computed using W,T as projection matrices on the original system, as in (11). Concerning

12

Page 13: MORLAB – The Model Order Reduction LABoratory

0 0.2 0.4 0.6 0.8 110−6

10−4

10−2

100

102

Time t

Para

met

erµ

(a) OnePW (r = 107).

0 0.2 0.4 0.6 0.8 110−6

10−4

10−2

100

102

Time t

Para

met

erµ

(b) InterpLag (r = 108).

0 0.2 0.4 0.6 0.8 110−6

10−4

10−2

100

102

Time t

Para

met

erµ

(c) InterpBspline (r = 108).

0 0.2 0.4 0.6 0.8 110−6

10−4

10−2

100

102

Time tPa

ram

eter

µ

(d) VarDABspline (r = 108).

10−6 10−5 10−4 10−3 10−2 10−1 100 101 102 103

Figure 6: Relative errors in the time simulation of different parametric extensions for the thermalblock model.

the parametric matrix A(µ) in (14), we note that

WTA(µ)T = WTA0T + µ(0.2WTA1T + 0.4WTA2T + 0.6WTA3T + 0.8WTA4T

)

= A0 + µ(

0.2A1 + 0.4A2 + 0.6A3 + 0.8A4

).

Using this method, we can preserve the exact parameter dependency in the reduced-order model.Variants of it, for example, use column compression of T and W to control the size of the resultingreduced-order model. Also, it needs to be noted that by concatenation of the projection matrices,original properties like stability preservation can be lost. Therefore, modifications like a one-sidedprojection by combining [W,T ] into a single basis can be used to handle most systems.

For our numerical example, we will use the following setup. For the parameter sampling points,we use 10 logarithmically distributed Chebyshev roots, i.e., let ν1, . . . , νk be the Chebyshev rootsin the interval [−6, 2], the sampling points are given as µj = 10νj . The local reduced-order modelsare computed by the balanced truncation routine from MORLAB (ml ct dss bt) using 10−4 forthe absolute error bound and we save the reduced-order models as well as the projection matricesfor the parametric approaches. The following different parametric reduced-order models are thencomputed:

• two-sided piecewise approximation (TwoPW), where the final truncated projection matriceswere compressed using singular value decompositions and a relative truncation tolerance of10−4,

• one-sided piecewise approximation (OnePW), where the final truncated projection matrixwas compressed using the basis concatenation and the singular value decomposition withrelative truncation tolerance 10−4,

• transfer function interpolation using Lagrange basis functions (InterpLag),

13

Page 14: MORLAB – The Model Order Reduction LABoratory

• transfer function interpolation using linear B-splines (InterpBspline),

• transfer function approximation using the variation diminishing approximation with quadra-tic B-spline basis functions (VarDABspline).

Fig. 5 shows the results in the frequency domain, where we computed the point wise relativeerrors as

‖G(iω, µ)− G(iω, µ)‖2‖G(iω, µ)‖2

,

in the ranges ω ∈ [10−4, 104] and µ ∈ [10−6, 102]. The piecewise methods, TwoPW and OnePW,are the clear winners of the comparison. We note that TwoPW is unstable for all parameters,while OnePW is stable. Also, the interpolation approaches work nicely, where the interpolationproperty is clearly visible in the plots. The variation diminishing B-spline result, VarDABspline,seems to be a smoother version of InterpBspline.

In the time domain, we simulate the parametric systems with using a pre-sampled white noiseinput signal. The relative errors shown in Fig. 6 are computed by

√√√√4∑

j=1

|yj(t;µ)− yj(t;µ)|2|yj(t;µ)|2

in the ranges t ∈ [0, 1] and µ ∈ [10−6, 102]. The TwoPW is not shown in Fig. 6, since due to theinstability in all parameters, no useful results were computed during the simulation. For the rest,we see that again OnePW performs overall very good. Also we see that the B-spline approachesand classical Lagrange interpolation give more or less the same results.

6 ConclusionsWe presented the MORLAB toolbox as efficient software solution for model reduction of dense,medium-scale linear time-invariant systems. We gave an overview about the main features andstructure of the toolbox, as well as underlying programming principles. An important point whenconsidering unstructured systems is the spectral splitting, which we showed in MORLAB to bebased on spectral projection methods. Following the computational steps led to an overview aboutthe implemented model reduction methods in MORLAB. We gave two numerical examples toillustrate how MORLAB can be used as backend software for different system types. In the firstexample, MORLAB provided the efficient, structure-preserving implementation of sophisticatedmodel reduction methods that are used in two-step approaches. In the second example, we usedMORLAB to generate local reduced-order models that were afterwards combined by differenttechniques to construct parametric reduced-order systems.

AcknowledgmentThis work was supported by the German Research Foundation (DFG) Research Training Group2297 “MathCoRe”, Magdeburg.

References[1] Z. Bai, J. Demmel, and M. Gu. An inverse free parallel spectral divide and conquer

algorithm for nonsymmetric eigenproblems. Numer. Math., 76(3):279–308, 1997. doi:10.1007/s002110050264.

[2] U. Baur, C. A. Beattie, P. Benner, and S. Gugercin. Interpolatory projection methods forparameterized model reduction. SIAM J. Sci. Comput., 33(5):2489–2518, 2011. doi:10.1137/090776925.

14

Page 15: MORLAB – The Model Order Reduction LABoratory

[3] U. Baur and P. Benner. Modellreduktion fur parametrisierte Systeme durch balanciertesAbschneiden und Interpolation (Model Reduction for Parametric Systems Using BalancedTruncation and Interpolation). at-Automatisierungstechnik, 57(8):411–420, 2009. doi:10.1524/auto.2009.0787.

[4] C. A. Beattie and S. Gugercin. Interpolatory projection methods for structure-preservingmodel reduction. Syst. Control Lett., 58(3):225–232, 2009. doi:10.1016/j.sysconle.2008.10.016.

[5] P. Benner. Contributions to the Numerical Solution of Algebraic Riccati Equations and RelatedEigenvalue Problems. Logos–Verlag, Berlin, Germany, 1997. Also: Dissertation, Fakultat furMathematik, TU Chemnitz–Zwickau, 1997.

[6] P. Benner. A MATLAB repository for model reduction based on spectral projection. In 2006IEEE Conference on Computer Aided Control System Design, 2006 IEEE International Con-ference on Control Applications, 2006 IEEE International Symposium on Intelligent Control,pages 19–24, October 2006. doi:10.1109/CACSD-CCA-ISIC.2006.4776618.

[7] P. Benner. Partial stabilization of descriptor systems using spectral projectors. InP. Van Dooren, S. P. Bhattacharyya, R. H. Chan, V. Olshevsky, and A. Routray, editors,Numerical Linear Algebra in Signals, Systems and Control, volume 80 of Lect. Notes Electr.Eng., pages 55–76. Springer Netherlands, 2011. doi:10.1007/978-94-007-0602-6\_3.

[8] P. Benner and E. S. Quintana-Ortı. Model reduction based on spectral projection methods.In P. Benner, V. Mehrmann, and D. Sorensen, editors, Dimension Reduction of Large-ScaleSystems, volume 45, pages 5–45, Berlin/Heidelberg, Germany, 2005. Springer. doi:10.1007/3-540-27909-1\_1.

[9] P. Benner and T. Stykel. Model order reduction for differential-algebraic equations: A survey.In Achim Ilchmann and Timo Reis, editors, Surveys in Differential-Algebraic Equations IV,Differential-Algebraic Equations Forum, pages 107–160. Springer International Publishing,Cham, March 2017. doi:10.1007/978-3-319-46618-7\_3.

[10] P. Benner and S. W. R. Werner. Balancing related model reduction with the MORLABtoolbox. Proc. Appl. Math. Mech., 18(1):e201800083, 2018. doi:10.1002/pamm.201800083.

[11] P. Benner and S. W. R. Werner. Hankel-norm approximation of large-scale descriptor systems.e-print 1612.06205, arXiv, 2018. To appear in Adv. Comput. Math. URL: http://arxiv.org/abs/1612.06205.

[12] P. Benner and S. W. R. Werner. Model reduction of descriptor systems with the MOR-LAB toolbox. IFAC-PapersOnLine 9th Vienna International Conference on MathematicalModelling MATHMOD 2018, Vienna, Austria, 21–23 February 2018, 51(2):547–552, 2018.doi:10.1016/j.ifacol.2018.03.092.

[13] P. Benner and S. W. R. Werner. MORLAB – Model Order Reduction LABoratory (version5.0), 2019. see also: http://www.mpi-magdeburg.mpg.de/projects/morlab. doi:10.5281/zenodo.3332716.

[14] P. Benner and S. W. R. Werner. Frequency- and time-limited balanced truncation for large-scale second-order systems. e-print 2001.06185, arXiv, 2020. math.OC. URL: http://arxiv.org/abs/2001.06185.

[15] D. Billger. The butterfly gyro. In P. Benner, V. Mehrmann, and D. C. Sorensen, editors,Dimension Reduction of Large-Scale Systems, volume 45 of Lecture Notes in ComputationalScience and Engineering, pages 349–352. Springer-Verlag, Berlin/Heidelberg, Germany, 2005.doi:10.1007/3-540-27909-1\_18.

[16] Y. Chahlaoui, D. Lemonnier, A. Vandendorpe, and P. Van Dooren. Second-order balancedtruncation. Linear Algebra Appl., 415(2–3):373–384, 2006. doi:10.1016/j.laa.2004.03.032.

15

Page 16: MORLAB – The Model Order Reduction LABoratory

[17] E. J. Davison. A method for simplifying linear dynamic systems. IEEE Trans. Autom. Control,AC–11:93–101, 1966. doi:10.1109/TAC.1966.1098264.

[18] U. B. Desai and D. Pal. A transformation approach to stochastic model reduction. IEEETrans. Autom. Control, 29(12):1097–1100, 1984. doi:10.1109/TAC.1984.1103438.

[19] W. Gawronski and J.-N. Juang. Model reduction in limited time and frequency intervals. Int.J. Syst. Sci., 21(2):349–376, 1990. doi:10.1080/00207729008910366.

[20] K. Glover. All optimal Hankel-norm approximations of linear multivariable systemsand their L∞-error norms. Internat. J. Control, 39(6):1115–1193, 1984. doi:10.1080/00207178408933239.

[21] M. Green. A relative error bound for balanced stochastic truncation. IEEE Trans. Autom.Control, 33(10):961–965, 1988. doi:10.1109/9.7255.

[22] K. Haider, A. Ghafoor, M. Imran, and F. M. Malik. Model reduction of large scale descriptorsystems using time limited Gramians. Asian J. Control, 19(3):1217–1227, 2017. doi:10.1002/asjc.1444.

[23] M. Imran and A. Ghafoor. Model reduction of descriptor systems using frequency limitedGramians. J. Franklin Inst., 352(1):33–51, 2015. doi:10.1016/j.jfranklin.2014.10.013.

[24] E. A. Jonckheere and L. M. Silverman. A new set of invariants for linear systems – applicationto reduced order compensator design. IEEE Trans. Autom. Control, 28(10):953–964, 1983.doi:10.1109/TAC.1983.1103159.

[25] M. Lehner and P. Eberhard. A two-step approach for model reduction in flexible multibodydynamics. Multibody Syst. Dyn., 17(2-3):157–176, 2007. doi:10.1007/s11044-007-9039-5.

[26] V. Mehrmann and T. Stykel. Balanced truncation model reduction for large-scale systems indescriptor form. In P. Benner, V. Mehrmann, and D. C. Sorensen, editors, Dimension Re-duction of Large-Scale Systems, volume 45, pages 83–115. Springer-Verlag, Berlin/Heidelberg,Germany, 2005. doi:10.1007/3-540-27909-1\_3.

[27] D. G. Meyer and S. Srinivasan. Balancing and model reduction for second-order form linearsystems. IEEE Trans. Autom. Control, 41(11):1632–1644, 1996. doi:10.1109/9.544000.

[28] B. C. Moore. Principal component analysis in linear systems: controllability, observability,and model reduction. IEEE Trans. Autom. Control, AC–26(1):17–32, 1981. doi:10.1109/TAC.1981.1102568.

[29] D. Mustafa and K. Glover. Controller reduction by H∞-balanced truncation. IEEE Trans.Autom. Control, 36(6):668–682, 1991. doi:10.1109/9.86941.

[30] Oberwolfach Benchmark Collection. Butterfly gyroscope. hosted at MORwiki – ModelOrder Reduction Wiki, 2004. URL: http://modelreduction.org/index.php/Butterfly_Gyroscope.

[31] P. C. Opdenacker and E. A. Jonckheere. A contraction mapping preserving balanced reductionscheme and its infinity norm error bounds. IEEE Trans. Circuits Syst., 35(2):184–189, 1988.doi:10.1109/31.1720.

[32] T. Reis and T. Stykel. Balanced truncation model reduction of second-order systems. Math.Comput. Model. Dyn. Syst., 14(5):391–406, 2008. doi:10.1080/13873950701844170.

[33] T. Reis and T. Stykel. Positive real and bounded real balancing for model reduction of de-scriptor systems. Internat. J. Control, 83(1):74–88, 2010. doi:10.1080/00207170903100214.

[34] J. D. Roberts. Linear model reduction and solution of the algebraic Riccati equation byuse of the sign function. Internat. J. Control, 32(4):677–687, 1980. (Reprint of TechnicalReport No. TR-13, CUED/B-Control, Cambridge University, Engineering Department, 1971).doi:10.1080/00207178008922881.

16

Page 17: MORLAB – The Model Order Reduction LABoratory

[35] J. Saak, D. Siebelts, and S. W. R. Werner. A comparison of second-order model order reductionmethods for an artificial fishtail. at-Automatisierungstechnik, 67(8):648–667, 2019. doi:10.1515/auto-2019-0027.

[36] X. Sun and E. S. Quintana-Ortı. Spectral division methods for block generalized Schurdecompositions. Mathematics of Computation, 73(248):1827–1847, 2004. doi:10.1090/S0025-5718-04-01667-9.

[37] The MORwiki Community. Thermal block. hosted at MORwiki – Model Order Reduc-tion Wiki, 2020. URL: https://morwiki.mpi-magdeburg.mpg.de/morwiki/index.php/Thermal_Block.

[38] A. Varga. Efficient minimal realization procedure based on balancing. In Prepr. of the IMACSSymp. on Modelling and Control of Technological Systems, volume 2, pages 42–47, 1991.

17