🔥 emgr 4 COMBINED REDUCTION - Combined State and Parameter Reduction using Empirical Gramians

emgr - Empirical Gramian Framework

Model Reduction Software

Name

- Empirical Gramian framework for model reduction of input-output systems.

Synopsis

Empirical gramians can be computed for linear and nonlinear state-space control systems for purposes of model order reduction (MOR), system identification (SYSID) and uncertainty quantification (UQ). 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, balanced truncation of the empirical controllability gramian and the empirical observability gramian, or alternatively, direct truncation (approximate balancing) of the empirical cross gramian or the empirical linear cross gramian for large-scale linear systems, is available. 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 observability of parameters (cross-identifiability gramian) concurrently. The empirical gramian framework is a compact open-source toolbox for (empirical) GRAMIAN-based model reduction and compatible with OCTAVE and MATLAB. emgr provides a common interface for the computation of empirical gramians and empirical covariance matrices.

Scope

Download

(image) #emgr carton box

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

(emgr is written in the matlab programming language and requires Octave or Matlab. emgr has no dependencies on other toolboxes or packages.)

License

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

Copyright (c) 2013-2016, 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

(chart) #emgr application matrix

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

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

About Info Usage: v = emgr('version');

Arguments

Optional Arguments

Gramians

(flowchart) gramian interrelations The empirical non-symmetric cross gramian WZ can be selected by option nf(7)=1 and is compatible with the empirical cross gramian WX, the empirical linear cross gramian and the empirical joint gramian WJ.

Flags

Configuration

Ralston's Runge-Kutta schematic

Extra

Tests

A set of basic sanity tests is conducted in emgrtest.m. Further tests are performed on a time-invariant, linear, state-space symmetric MIMO system, with a negative Lehmer matrix A and optional linear parametrization: ẋ = A*x + B*u + p y = C*x
(plot) test_wx reduction #emgr
WX: State-space reduction by the empirical cross gramian (test_wx.m).
(plot) test_wy reduction #emgr
WY: State-space reduction by the empirical linear cross gramian (test_wy.m).
(plot) test_bt reduction #emgr
WC+WO: State-space reduction by empirical balanced truncation (test_bt.m).
(plot) test_bt2 reduction #emgr
WC+WC*: State-space reduction by empirical linear balanced truncation (test_bt2.m).
(plot) test_wz reduction #emgr
WZ: State-space reduction by the empirical non-symmetric cross gramian (test_wz.m).
(plot) test_wz2 reduction #emgr
WZ2: State-space reduction by the empirical non-symmetric linear cross gramian (test_wz2.m).
(plot) test_dwx reduction #emgr
DWX: State-space reduction by the distributed empirical cross gramian (test_dwx.m).
(plot) test_dwz reduction #emgr
DWZ: State-space reduction by the distributed empirical non-symmetric cross gramian (test_dwz.m).
(plot) test_pwx reduction #emgr
PWX: Parametric state-space reduction by the empirical cross gramian (test_pwx.m).
(plot) test_pwy reduction #emgr
PWY: Parametric state-space reduction by the empirical linear cross gramian (test_pwy.m).
(plot) test_pbt reduction #emgr
PBT: Parametric state-space reduction by empirical balanced truncation (test_pbt.m).
(plot) test_pwz reduction #emgr
PWZ: Parametric state-space reduction by the empirical non-symmetric cross gramian (test_pwz.m).
(plot) test_ws reduction #emgr
WS: Parameter-space reduction by the empirical sensitivity gramian (test_ws.m).
(plot) test_wi reduction #emgr
WI: Parameter-space reduction by the empirical identifiability gramian (test_wi.m).
(plot) test_wj reduction #emgr
WJ: Parameter-space reduction by the empirical cross-identifiability gramian (test_wj.m).
(plot) test_dwj reduction #emgr
DWJ: Parameter-space reduction by the distributed empirical cross-identifiability gramian (test_dwj.m).
(plot) test_kwx reduction #emgr
KWX: State-space reduction by the empirical kernel cross gramian (test_kwx.m).
(plot) test_wi2 reduction #emgr
WI2: Parameter-space reduction by the detailed empirical identifiability gramian (test_wi2.m).
(plot) test_wj2 reduction #emgr
WJ2: Parameter-space reduction by the detailed empirical cross-identifiability gramian (test_wj2.m).
(plot) test_dwjz reduction #emgr
DWJZ: Parameter-space reduction by the distributed empirical non-symmetric cross-identifiability gramian (test_dwjz.m).
(plot) test_cws reduction #emgr
CWS: Combined state and parameter reduction by the empirical sensitivity gramian (test_cws.m).
(plot) test_cwi reduction #emgr
CWI: Combined state and parameter reduction by the empirical identifiability gramian (test_cwi.m).
(plot) test_cwj reduction #emgr
CWJ: Combined state and parameter reduction by the empirical joint gramian (test_cwj.m).
(plot) test_cwj reduction #emgr
CWJZ: Combined state and parameter reduction by the empirical non-symmetric joint gramian (test_cwjz.m).

Demos

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 a hyperbolic tangent with parametrized argument. This is a parametrized hyperbolic network model from "Modeling and control based on a new neural network model" by Y. Quan et al (2001). ẋ = A*tanh(p.*x) + B*u y = C*x Get the source code here: combined_wj.m

(plot) combined_wj reduction #emgr
Relative L2 output error for varying state and parameter dimension.

State Reduction: Balanced Gains (WX)

Cross-gramian-based state-space reduction using balanced gains from "Balanced systems and model reduction" by A.M. Davidson (1986) for a state-space symmetric system. ẋ = A*x + B*u y = C*x Get the source code here: gains_wx.m

(plot) combined_wj reduction #emgr
Relative L1, L2, L∞ output error for varying state dimension.

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.m control system generator is available from the MORwiki 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

(plot) benchmark_ilp reduction #emgr
Relative L1, L2, L∞ output error for varying state dimension.

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

(plot) benchmark_lin #emgr
Relative L1, L2, L∞ output error for varying state dimension.

Benchmark: Nonlinear Model Reduction (WX)

An implementation of a model reduction benchmark from the MORwiki. Here the nonlinear RC-ladder benchmark, a resistor-capacitor cascade with nonlinear resistors (diodes), is tested. The empirical cross gramian is utilized to reduce this nonlinear system. Get the source code here: benchmark_non.m

(plot) benchmark_non #emgr
Relative L1, L2, L∞ output error for varying state dimension.

State Reduction: Non-Square and Nonlinear (WZ)

In this example the non-symmetric cross gramian is used to reduce a non-square nonlinear MISO system. The nonlinear output functional is given by the dot-product of the state and system is of the form: ẋ = A*x + B*u y = x'*x Get the source code here: energy_wz.m

(plot) energy_wz reduction #emgr
Relative L1, L2, L∞ output error for varying state dimension.

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

(plot) nonlinearity measure #emgr
Nonlinearity measure for varying parameter.

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 for each SISO subsystem.

Get the source code here: decentral.m

(plot) decentralized control #emgr
Participation matrix.

PDE Reduction: Advection Equation (WC)

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

(plot) reduced advection #emgr
Reduced order 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

(plot) reduced nbody #emgr
Reduced order 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

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


About

A gramian matrix W is the result of all inner products of a set of vectors V = (v1 ... vn), in other words: W = V' V. Properties of (linear) control systems can be assessed by the system gramian matrices, which are based on the controllability and observability operators. Classically, the controllability gramian and observability gramian are utilized in balancing method. The cross gramian combines controllability and observability information into a single matrix and thus does not require explicit balancing. 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.

trace(H) = trace(WX)

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

Send feedback to: ch@gramian.de

Cite

gramian.de qr code

Notes

(plot) cross gramian surface #emgr

Troubleshooting

See Also

Category

Λ