COMBINED REDUCTION - Model Reduction by Combined State and Parameter Truncation using Empirical Gramians

emgr - Empirical Gramian Framework

Model Reduction Software

Model Reduction and Alike

Empirical gramians can be computed for linear and nonlinear control systems for purposes of model order reduction (MOR), uncertainty quantification (UQ) or system identification (SYSID). Model reduction using empirical gramians can be applied to the state space, to the parameter space or to both through combined reduction. For state reduction the empirical controllability gramian and the empirical observability gramian, for balanced truncation, are available, or alternatively the empirical cross gramian for (balancing-free) direct truncation and the empirical linear cross gramian for large-scale models. For parameter reduction, parameter identification and sensitivity analysis the empirical sensitivity gramian (controllability of parameters) or the empirical identifiability gramian (observability of parameters) are provided. Combined state and parameter reduction is enabled by the empirical joint gramian, which computes controllability and observability of states (cross gramian) and parameters (cross-identifiability gramian) concurrently. The emgr framework is a compact open-source toolbox for (empirical) GRAMIAN-based model reduction and compatible with OCTAVE and MATLAB.

Name

- Empirical Gramian framework for model reduction, system identification and uncertainty quantification.

Scope

Download

emgr box

Get emgr here: emgr.m (Version: 2.2)    [mirror]    [source]    [meta]

(emgr is written in the matlab programming language and requires Octave or Matlab)

License

All source code is licensed under the open source BSD 2-clause license:

Copyright (c) 2013-2014, Christian Himpe

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Usage

#emgr application matrix

General Usage: W = emgr(f,g,q,t,w,pr,nf,ut,us,xs,um,xm,yd);

Minimal Usage: W = emgr(f,g,q,t,w);

Parameters

Optional Parameters

Gramians

#emgr gramian relation flow

Options

Example

Get the source code here: testemgr.m

Utilities

Demos

State Reduction: Cross Gramian (WX)

This example reduces a large-scale linear time-invariant MIMO system. The number of states is reduced to the number of outputs using the empirical cross gramian. Generated random but symmetric and stable, this dynamic system is of the form: ẋ = A*x + B*u y = C*x Get the source code here: state_wx.m

#emgr state_wx reduction plot
Relative error in outputs over time.

State Reduction: Linear Cross Gramian (WY)

For the same linear system configuration as above there is an alternative way to compute a cross gramian. This method is closely related to Balanced POD and uses the controllability of the system and its adjoint for a faster computation. ẋ = [A 0;0 A']*x + [B;C']*u y = x Get the source code here: state_wy.m

#emgr state_wy reduction plot
Relative error in outputs over time.

State Reduction: Balanced Truncation (WC + WO)

For the same linear system configuration as above the balanced truncation approach is applied using the classic balancing. ẋ = A*x + B*u y = C*x Get the source code here: state_bt.m

#emgr state_bt reduction plot
Relative error in outputs over time.

State Reduction: Hierarchical System (WC)

This example demonstrates state reduction by square-root balancing of the empirical controllability gramian and empirical observability gramian (which is computed as the controllability gramian of the adjoint system). A 2-tree with 4 levels represented by single input sparse linear control system is reduced to the number of lowest level leafs equaling the outputs.

Get the source code here: hierarchy.m

#emgr hierarchical reduction plot
Relative error in outputs over time.

Parameter Reduction: Linear System with Source Term (WS)

Extended with a parametrized source term, a LTI system is reduced in parameters using the empirical sensitivity gramian. ẋ = A*x + B*u + p y = C*x Get the source code here: param_ws.m

#emgr param_ws reduction plot
Relative error in outputs over time.

Parameter Reduction: Linear System with Scaled States (WI)

Here a LTI system with parametrized scaling of states is reduced in parameters using the empirical identifiability gramian. ẋ = A*(p*x) + B*u y = C*x Get the source code here: param_wi.m

#emgr param_wi reduction plot
Relative error in outputs over time.

Combined Reduction: Nonlinear System (WJ)

Here a parametrized nonlinear control system is reduced in states and parameters using the empirical joint gramian. The nonlinearity is given by the hyperbolic tangent. ẋ = A*tanh(p*x) + B*u y = C*x Get the source code here: combined_wj.m

#emgr combined_wj reduction plot
Relative error in outputs over time.

Benchmark: Inverse Lyapunov Procedure (WC + WO)

The inverse lyapunov procedure can be used to generate random linear systems. Here, the required solution of the lyapunov equation is accomplished by the empirical gramians after factoring -1. The generated random system is then renduced by using balanced truncation. The ilp control system generator is available from the utilities section. 0 = A*WC + WC*A' - B'*B = (-1*a)*WC + WC*(-1*a') - B'*B = a*(-1*WC) + (-1*WC)*a' - B'*B Get the source code here: benchmark_ilp.m

#emgr benchmark_ilp reduction plot
Relative error in outputs over time.

Benchmark: Linear Model Reduction (WX)

A sample implementation of a model reduction benchmark from NICONET. Exemplary here the International Space Station 1r-component model is tested. The empirical cross gramian is utilized to reduce this second order system. ẋ = [0,1;-M⁻¹K,-M⁻¹D]*x + [0;-M⁻¹B]*u y = [0,C]*x Get the source code here: benchmark_lin.m

#emgr benchmark_lin plot
Relative error in outputs over time.

Benchmark: Nonlinear Model Reduction (WX)

An implementation of a model reduction benchmark from the MORwiki. Here the nonlinear RC-ladder benchmark is tested. The empirical cross gramian is utilized to reduce this nonlinear system. Get the source code here: benchmark_non.m

#emgr benchmark_non plot
Relative error in outputs over time.

Decentralized Control (WX)

Input-Output pairing is demonstrated here based on the empirical cross gramian with the aim to achieve decentralized control. The participation matrix is assembled from the trace of the cross gramian of each SISO subsystem.

Get the source code here: decentral.m

#emgr decentralized control plot
Relative error in outputs over time.

Nonlinearity Quantification (WC,WO,WX)

In this example the nonlinearity of a systems input-to-state, state-to-output and input-to-output map is quantified. The nonlinearity is given by the inverse hyperbolic sine (arsinh). A (scalar) parameter scales the argument of the arsinh, to fan out the image from the linear system around the fixed point zero. I = A*x + B*asinh(p*u) yI = C*x; ẋS = A*asinh(p*x) + B*u yS = C*x; ẋO = A*x + B*u yO = C*asinh(p*x); Get the source code here: measure.m

#emgr nonlinearity measure plot
Nonlinearity measure for varying parameter.

PDE Reduction: Advection Equation (WC)

Discretized with a first order upwind finite difference scheme, the advection partial differential equation is reduced by the empirical observability gramian and direct truncation. In this case by the adjoint system's empirical controllability gramian. du/dt = -a du/dx Get the source code here: advection.m

#emgr reduced advection plot
Reduced advection output over time.

Nonlinear Second Order Reduction: 5-body Choreography (WO)

A 5-body choreography, based on the gravitational N-body problem, resembling the figure eight is reduced in states.

Get the source code here: nbody.m

#emgr reduced nbody plot
Reduced 5-body orbits.

Parameter Identification: Stable Orbits Inside Black Holes (WS)

This is an implementation of: "Is there life inside black holes?" by V. Dokuchaev (2011), describing stable orbits of photons and planets inside the event horizon of a black hole. The underlying system is nonlinear and the output function is a coordinate transformation from Boyer-Lindquist to Cartesian coordinates. In the computation of planet and photon orbits the associated parameters are identified by the empirical sensitivity gramian.

Get the source code here: blackhole.m

#emgr blackhole orbit plot
Stable planet and photon orbits inside the event horizon of a black hole.


About

A gramian matrix is the result of all inner products of a set of vectors. The properties of linear control systems can be assessed by the system gramians quantifiying controllability and observability. Empirical gramians extend this approach to nonlinear control systems and thus enable nonlinear model reduction. For linear systems the empirical gramians are equal to the classic gramians. Yet empirical gramians contain more information about the underlying system; and the empirical cross gramian conveys even additional information. This makes empirical gramians a versatile tool for mathematical engineering!

#mor cross gramian

The Discrete Empirical Cross Gramian encloses information on the input-output behavior of the associated control system as well as approximate Hankel Singular Values and can be computed very efficiently. For extreme-scale systems, the Linear Cross Gramian, related to Balanced POD, can be utilized. And for parametrized systems, the Joint Gramian, derived from the cross gramian, is available for combined reduction. In case of custom input, an empirical covariance matrix can also be computed.

References

Contact

gramian.de qr code

Send feedback to: ch@gramian.de

Cite

Notes

See Also

Category

Λ