KerMor  0.9
Model order reduction for nonlinear dynamical systems and nonlinear approximation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
error.DEIMEstimator Class Reference

DEIMEstimator: A-posteriori error estimation for DEIM reduced models. More...

Detailed Description

DEIMEstimator: A-posteriori error estimation for DEIM reduced models.

Author
Daniel Wirtz
Date
2012-05-10
Change in 0.6:
(Daniel Wirtz, 2012-06-11)
  • Added support for different norm-inducing matrices \(\vG\).
  • New property UseTrueDEIMErr to enable use of the actual DEIM approximation error within the alpha term computation (Experimental use)
New in 0.6:
(Daniel Wirtz, 2012-06-08)
  • Introduced the property JacMatDEIMMaxOrder to control the jacobian DEIM approximation quality
  • Made the JacMDEIM property private
  • Introduced flags for more expensive (comparison-purpose) estimators
  • Removed the ErrorOrder setting as the DEIMEstimator directly depends on the Order setting of the reduced model's DEIM approximation. Setting the DEIM order "remotely" from the error estimator introduced more trouble than necessary
  • Not re-using the previously computed JacMDEIM approximation upon new runs of offlineGenerations (mess)
  • Giving out a warning if no sufficient reduction by the similarity transformation is achieved and disabling it for less than 20% reduction.
  • Using an event listener for the DEIM OrderUpdated event to re-compute local error estimation matrices
Change in 0.6:
(Daniel Wirtz, 2012-05-26) Updated the computation to the new structure of systems (A + f components) and replaced the previous (errorneous) one
New in 0.6:
(Daniel Wirtz, 2012-05-10) Added this class.

This class is part of the framework

KerMor - Model Order Reduction using Kernels

Definition at line 18 of file DEIMEstimator.m.

Public Member Functions

 DEIMEstimator ()
 
function  offlineComputations (models.BaseFullModel fm)
 Overrides the method from BaseEstimator and performs additional computations. More...
 
function
prepared = 
prepareForReducedModel (models.ReducedModel rm)
 Prepares this estimator for use with a given reduced model. Basically uses the projection matrices and some other reduced quantities for local storage. More...
 
function ct = prepareConstants (colvec< double > mu,integer inputidx)
 
function a = getAlpha (colvec< double > x,double t,colvec< double > ut)
 More expensive variant, using the true DEIM approximation error instead of the estimated ones using M,M' technique. More...
 
function b = getBeta (colvec< double > x,double t)
 Old log lip const kernel learning code x = x .* (this.scale(:,2) - this.scale(:,1)) + this.scale(:,1); x = (x - this.scale(:,1)) ./ (this.scale(:,2) - this.scale(:,1)); b = this.kexp.evaluate(x, t, mu)*olderr + sqrt(abs(a));. More...
 
function eint = evalODEPart (colvec< double > x,double t,colvec< double > ut)
 Compose the ode function. More...
 
function time = postProcess (matrix< double > x,double t,integer inputidx)
 Postprocessing for the error estimate. More...
 
function copy = clone ()
 
function  plotSummary (pm, context)
 
- Public Member Functions inherited from error.BaseEstimator
function  offlineComputations (models.BaseFullModel model)
 Performs a validity check for the given model and sets up the estimator for use with the specified model. More...
 
function double ct = postProcess (unused1,rowvec t, unused2)
 Post-processes the error estimator ODE part after reduced simulation computation. More...
 
function  clear ()
 Clears the last error set by the estimator. More...
 
function copy = clone (copy)
 Creates a copy of this error estimator. Call only allowed from subclasses. More...
 
function e0 = getE0 (colvec< double > mu)
 Calls the inner initial error computation strategy. More...
 
function ct = prepareConstants (colvec< double > mu, unused1)
 
function
prepared = 
prepareForReducedModel (models.ReducedModel rmodel)
 Default implementation which simply clones this (subclass!)instance and returns the copy to use in reduced models. More...
 
virtual function eint = evalODEPart (colvec x,double t,double ut)
 Template method for evaluation of the auxiliary ode part of the error estimator. More...
 
- Public Member Functions inherited from KerMorObject
 KerMorObject ()
 Constructs a new KerMor object. More...
 
function  display ()
 disp(object2str(this)); More...
 
function bool = eq (B)
 Checks equality of two KerMor objects. More...
 
function bool = ne (B)
 Checks if two KerMorObjects are different. More...
 
function cn = getClassName ()
 Returns the simple class name of this object without packages. More...
 
- Public Member Functions inherited from DPCMObject
 DPCMObject ()
 Creates a new DPCM object. More...
 
 DPCMObject ()
 

Static Public Member Functions

static function errmsg = validModelForEstimator (models.BaseFullModel model)
 Abstract static method that forces subclasses to specify whether an estimator can be used for a given model or not. More...
 
- Static Public Member Functions inherited from error.BaseEstimator
static function est = getEstimator (models.BaseFullModel model)
 Factory method that creates a suitable error estimator for the given model. More...
 
static function errmsg = validModelForEstimator (models.ReducedModel rmodel)
 Abstract static method that forces subclasses to specify whether an estimator can be used for a given model or not. More...
 

Public Attributes

integer JacSimTransMaxSize = 50
 The maximum size of the similarity transformation. More...
 
integer JacMatDEIMMaxOrder = 50
 Maximum order for the DEIM approximation of the state space jacobian. More...
 
data.selection.ASelector TrainDataSelector
 The selector that chooses the full model's trajectory points that are used for the MatrixDEIM approximation of the jacobian and the partial similarity transformation. More...
 
 UseFullJacobian = false
 "Expensive version": Using the full system's jacobian for logarithmic norm computation. Included for easy error estimator comparison. More...
 
 UseTrueLogLipConst = false
 "Even More Expensive version": Precompute the full solution and use the true logarithmic lipschitz constant of \(f\) in computations. Included for easy error estimator comparison. More...
 
 UseJacobianLogLipConst = false
 "Even More Expensive version 2": Precompute the full solution and use the true logarithmic lipschitz constant of the jacobian of \(f\) in computations. Included for easy error estimator comparison. More...
 
 UseJacobianNorm = false
 Expensive conservative guess. More...
 
 UseTrueDEIMErr = false
 "Expensive" version that uses the true approximation error between the DEIM approximation and the full system function instead of the \(M'\) variant. More...
 
matrix< doubleQFull = "[]"
 The complete similarity transformation \(\vQ\) matrix of size \(d \times JacSimTransMaxSize\). More...
 
rowvec< doubleQSingVals = "[]"
 The singular values computed by the SimTransPOD in the offline stage. More...
 
general.MatrixDEIM JacMDEIM
 The MatrixDEIM instance used to approximate the state space jacobian matrices. More...
 
 M3 = "[]"
 
 M4 = "[]"
 
 M5 = "[]"
 
 M6 = "[]"
 
 M7 = "[]"
 
 M8 = "[]"
 
 M9 = "[]"
 
 M10 = "[]"
 
 M11 = "[]"
 
 M12 = "[]"
 
 Ah
 the \(\hat{A}\) component More...
 
 Bh
 the \(\hat{B}\) component More...
 
 Aln
 The precomputed logarithmic norms of the system's A components. More...
 
 scale
 Stores zi min- and max scaling. More...
 
 LastAlpha
 
 LastBeta
 
 kexp
 The local logarithmic norm estimation. More...
 
integer JacSimTransSize
 The size of the partial similarity transform to apply to the matrix DEIM approximated jacobians. More...
 
integer JacMatDEIMOrder
 The actual order of the DEIM approximation for the system's jacobian. More...
 
- Public Attributes inherited from error.BaseEstimator
 Enabled
 Flag that indicates whether error estimation is used or not. More...
 
 StateError = "[]"
 The reduction state-space error from the last simulation. More...
 
 ExtraODEDims = 0
 The dimensions added to the ODE function by the estimator. More...
 
 OutputError = "[]"
 The output error from the last simulation. More...
 
models.ReducedModel ReducedModel = "[]"
 The reduced model associated with the error estimator. More...
 
 mu
 
- Public Attributes inherited from DPCMObject
 WorkspaceVariableName = ""
 The workspace variable name of this class. Optional. More...
 
 ID = "[]"
 An ID that allows to uniquely identify this DPCMObject (at least within the current MatLab session/context). More...
 
 PropertiesChanged = "[]"
 The Dictionary containing all the property settings as key/value pairs. More...
 
- Public Attributes inherited from handle
 addlistener
 Creates a listener for the specified event and assigns a callback function to execute when the event occurs. More...
 
 notify
 Broadcast a notice that a specific event is occurring on a specified handle object or array of handle objects. More...
 
 delete
 Handle object destructor method that is called when the object's lifecycle ends. More...
 
 disp
 Handle object disp method which is called by the display method. See the MATLAB disp function. More...
 
 display
 Handle object display method called when MATLAB software interprets an expression returning a handle object that is not terminated by a semicolon. See the MATLAB display function. More...
 
 findobj
 Finds objects matching the specified conditions from the input array of handle objects. More...
 
 findprop
 Returns a meta.property objects associated with the specified property name. More...
 
 fields
 Returns a cell array of string containing the names of public properties. More...
 
 fieldnames
 Returns a cell array of string containing the names of public properties. See the MATLAB fieldnames function. More...
 
 isvalid
 Returns a logical array in which elements are true if the corresponding elements in the input array are valid handles. This method is Sealed so you cannot override it in a handle subclass. More...
 
 eq
 Relational functions example. See details for more information. More...
 
 transpose
 Transposes the elements of the handle object array. More...
 
 permute
 Rearranges the dimensions of the handle object array. See the MATLAB permute function. More...
 
 reshape
 hanges the dimensions of the handle object array to the specified dimensions. See the MATLAB reshape function. More...
 
 sort
 ort the handle objects in any array in ascending or descending order. More...
 

Static Protected Member Functions

static function obj = loadobj (obj)
 
- Static Protected Member Functions inherited from DPCMObject
static function obj = loadobj (obj, from)
 Re-register any registered change listeners! More...
 
static function obj = loadobj (obj, from)
 

Additional Inherited Members

- Protected Member Functions inherited from KerMorObject
function  checkType (obj, type)
 Object typechecker. More...
 
- Protected Member Functions inherited from DPCMObject
function  registerProps (varargin)
 Call this method at any class that defines DPCM observed properties. More...
 
function  registerProps (varargin)
 

Constructor & Destructor Documentation

error.DEIMEstimator.DEIMEstimator ( )

Definition at line 349 of file DEIMEstimator.m.

References error.BaseEstimator.ExtraODEDims, and TrainDataSelector.

Member Function Documentation

function copy = error.DEIMEstimator.clone ( )
function eint = error.DEIMEstimator.evalODEPart ( colvec< double x,
double  t,
colvec< double ut 
)

Compose the ode function.

Parameters
xThe state variable vector \(\vx(t)\)
tThe current time(s) \(t \in [0, T]\)
utThe value \(\vu(t)\) of the current input function \(\vu\) at time \(t\), [] else.

Definition at line 656 of file DEIMEstimator.m.

References getAlpha(), and getBeta().

Here is the call graph for this function:

function a = error.DEIMEstimator.getAlpha ( colvec< double x,
double  t,
colvec< double ut 
)

More expensive variant, using the true DEIM approximation error instead of the estimated ones using M,M' technique.

Parameters
xThe state variable vector \(\vx(t)\)
tThe current time(s) \(t \in [0, T]\)
utThe value \(\vu(t)\) of the current input function \(\vu\) at time \(t\), [] else.

Definition at line 507 of file DEIMEstimator.m.

References models.BaseFirstOrderSystem.A, dscomponents.LinearCoreFun.evaluate(), models.BaseFirstOrderSystem.f, models.ReducedModel.FullModel, LastAlpha, Norm.LG(), M11, M12, M4, M5, M6, M7, M8, M9, error.BaseEstimator.mu, error.BaseEstimator.ReducedModel, models.BaseModel.System, and UseTrueDEIMErr.

Referenced by evalODEPart(), and postProcess().

Here is the call graph for this function:

Here is the caller graph for this function:

function b = error.DEIMEstimator.getBeta ( colvec< double x,
double  t 
)

Old log lip const kernel learning code x = x .* (this.scale(:,2) - this.scale(:,1)) + this.scale(:,1); x = (x - this.scale(:,1)) ./ (this.scale(:,2) - this.scale(:,1)); b = this.kexp.evaluate(x, t, mu)*olderr + sqrt(abs(a));.

Parameters
xThe state variable vector \(\vx(t)\)
tThe current time(s) \(t \in [0, T]\)

Definition at line 580 of file DEIMEstimator.m.

References Aln, general.MatrixDEIM.evaluate(), models.BaseFirstOrderSystem.f, models.ReducedModel.FullModel, dscomponents.ACoreFun.getStateJacobian(), JacMDEIM, LastBeta, Utils.logNorm(), error.BaseEstimator.mu, error.BaseEstimator.ReducedModel, models.BaseModel.System, UseFullJacobian, UseJacobianLogLipConst, UseJacobianNorm, and UseTrueLogLipConst.

Referenced by evalODEPart(), and postProcess().

Here is the call graph for this function:

Here is the caller graph for this function:

static function obj = error.DEIMEstimator.loadobj (   obj)
staticprotected

Definition at line 1044 of file DEIMEstimator.m.

References handle.addlistener.

function error.DEIMEstimator.offlineComputations ( models.BaseFullModel  fm)

Overrides the method from BaseEstimator and performs additional computations.

Parameters
fmThe full model.
Required fields of fm:

Definition at line 356 of file DEIMEstimator.m.

References models.BaseFirstOrderSystem.A, Aln, KerMor.App(), Utils.logNorm(), and models.BaseModel.System.

Here is the call graph for this function:

function error.DEIMEstimator.plotSummary (   pm,
  context 
)
virtual

Implements IReductionSummaryPlotProvider.

Definition at line 770 of file DEIMEstimator.m.

References QSingVals.

function time = error.DEIMEstimator.postProcess ( matrix< double x,
double  t,
integer  inputidx 
)

Postprocessing for the error estimate.

t, mu, inputidx do nothing

Parameters
xThe whole just computed trajectory
tThe current time(s) \(t \in [0, T]\)
inputidxThe index \(i\) of the currently used input function \(u_i(t)\). Set to \([]\) if not used.
vararginAny further arguments that are passed, but ignored here as not necessary.

Definition at line 670 of file DEIMEstimator.m.

References getAlpha(), getBeta(), LastAlpha, LastBeta, error.BaseEstimator.mu, error.BaseEstimator.ReducedModel, models.BaseModel.scaledTimes, and error.BaseEstimator.StateError.

Here is the call graph for this function:

function ct = error.DEIMEstimator.prepareConstants ( colvec< double mu,
integer  inputidx 
)
function prepared = error.DEIMEstimator.prepareForReducedModel ( models.ReducedModel  rm)

Prepares this estimator for use with a given reduced model. Basically uses the projection matrices and some other reduced quantities for local storage.

Parameters
rmThe reduced model
Required fields of rm:
Generated fields of prepared:

Definition at line 402 of file DEIMEstimator.m.

References handle.addlistener, models.BaseFirstOrderSystem.f, models.ReducedModel.FullModel, G, JacMDEIM, general.MatrixDEIM.project(), models.BaseModel.System, t, models.ReducedModel.V, and models.ReducedModel.W.

Here is the call graph for this function:

function errmsg = error.DEIMEstimator.validModelForEstimator ( models.BaseFullModel  model)
static

Abstract static method that forces subclasses to specify whether an estimator can be used for a given model or not.

Parameters
modelA KerMor full model
Required fields of model:

Definition at line 1054 of file DEIMEstimator.m.

References models.BaseFirstOrderSystem.A, models.BaseFullModel.Approx, models.BaseFirstOrderSystem.B, and models.BaseModel.System.

Member Data Documentation

error.DEIMEstimator.Ah

the \(\hat{A}\) component

Note
This property has non-standard access specifiers: SetAccess = Private, GetAccess = Public
Matlab documentation of property attributes.

Definition at line 231 of file DEIMEstimator.m.

Referenced by clone().

error.DEIMEstimator.Aln

The precomputed logarithmic norms of the system's A components.

Note
This property has non-standard access specifiers: SetAccess = Private, GetAccess = Public
Matlab documentation of property attributes.

Definition at line 250 of file DEIMEstimator.m.

Referenced by clone(), getBeta(), and offlineComputations().

error.DEIMEstimator.Bh

the \(\hat{B}\) component

Note
This property has non-standard access specifiers: SetAccess = Private, GetAccess = Public
Matlab documentation of property attributes.

Definition at line 240 of file DEIMEstimator.m.

Referenced by clone().

error.DEIMEstimator.JacMatDEIMMaxOrder = 50

Maximum order for the DEIM approximation of the state space jacobian.

Default: 50

Definition at line 80 of file DEIMEstimator.m.

Referenced by clone().

error.DEIMEstimator.JacMatDEIMOrder

The actual order of the DEIM approximation for the system's jacobian.

Upper bounded by JacMatDEIMMaxOrder and defaults to the ceiled half of the maximum size (set during offlineComputations)

Default: ceil(JacMatDEIMMaxOrder/2)

See Also
JacMatDEIMMaxOrder
Note
This property has the MATLAB attribute Dependent set to true.
Matlab documentation of property attributes.

Definition at line 310 of file DEIMEstimator.m.

error.DEIMEstimator.JacMDEIM

The MatrixDEIM instance used to approximate the state space jacobian matrices.

The default MaxOrder setting is 50.

Note
This property has non-standard access specifiers: SetAccess = Private, GetAccess = Public
Matlab documentation of property attributes.

Definition at line 193 of file DEIMEstimator.m.

Referenced by clone(), getBeta(), prepareConstants(), and prepareForReducedModel().

error.DEIMEstimator.JacSimTransMaxSize = 50

The maximum size of the similarity transformation.

Set to empty if not wanted. The BaseFullModel sets this value at offline generations phase

Default: 50

See Also
JacSimTransSize
Note
This property has custom functionality when its value is changed.

Definition at line 65 of file DEIMEstimator.m.

Referenced by clone().

error.DEIMEstimator.JacSimTransSize

The size of the partial similarity transform to apply to the matrix DEIM approximated jacobians.

Upper bounded by JacSimTransMaxSize and defaults to the ceiled half of the maximum size (set during offlineComputations)

Default: ceil(JacSimTransMaxSize/2)

See Also
JacSimTransMaxSize
Note
This property has the MATLAB attribute Dependent set to true.
Matlab documentation of property attributes.

Definition at line 291 of file DEIMEstimator.m.

error.DEIMEstimator.kexp

The local logarithmic norm estimation.

Note
This property has non-standard access specifiers: SetAccess = Private, GetAccess = Public
Matlab documentation of property attributes.

Definition at line 278 of file DEIMEstimator.m.

Referenced by clone(), and prepareConstants().

error.DEIMEstimator.LastAlpha

Definition at line 272 of file DEIMEstimator.m.

Referenced by getAlpha(), postProcess(), and prepareConstants().

error.DEIMEstimator.LastBeta

Definition at line 275 of file DEIMEstimator.m.

Referenced by getBeta(), postProcess(), and prepareConstants().

error.DEIMEstimator.M10 = "[]"

Definition at line 225 of file DEIMEstimator.m.

Referenced by clone().

error.DEIMEstimator.M11 = "[]"

Definition at line 227 of file DEIMEstimator.m.

Referenced by clone(), and getAlpha().

error.DEIMEstimator.M12 = "[]"

Definition at line 229 of file DEIMEstimator.m.

Referenced by clone(), and getAlpha().

error.DEIMEstimator.M3 = "[]"

Definition at line 211 of file DEIMEstimator.m.

Referenced by clone().

error.DEIMEstimator.M4 = "[]"

Definition at line 213 of file DEIMEstimator.m.

Referenced by clone(), and getAlpha().

error.DEIMEstimator.M5 = "[]"

Definition at line 215 of file DEIMEstimator.m.

Referenced by clone(), and getAlpha().

error.DEIMEstimator.M6 = "[]"

Definition at line 217 of file DEIMEstimator.m.

Referenced by clone(), getAlpha(), and prepareConstants().

error.DEIMEstimator.M7 = "[]"

Definition at line 219 of file DEIMEstimator.m.

Referenced by clone(), getAlpha(), and prepareConstants().

error.DEIMEstimator.M8 = "[]"

Definition at line 221 of file DEIMEstimator.m.

Referenced by clone(), getAlpha(), and prepareConstants().

error.DEIMEstimator.M9 = "[]"

Definition at line 223 of file DEIMEstimator.m.

Referenced by clone(), getAlpha(), and prepareConstants().

error.DEIMEstimator.QFull = "[]"

The complete similarity transformation \(\vQ\) matrix of size \(d \times JacSimTransMaxSize\).

(Debug/testing use)

Default: []

Note
This property has non-standard access specifiers: SetAccess = Private, GetAccess = Public
Matlab documentation of property attributes.

Definition at line 161 of file DEIMEstimator.m.

Referenced by clone().

error.DEIMEstimator.QSingVals = "[]"

The singular values computed by the SimTransPOD in the offline stage.

(Debug/testing use)

Default: []

Note
This property has non-standard access specifiers: SetAccess = Private, GetAccess = Public
Matlab documentation of property attributes.

Definition at line 177 of file DEIMEstimator.m.

Referenced by clone(), and plotSummary().

error.DEIMEstimator.scale

Stores zi min- and max scaling.

Note
This property has non-standard access specifiers: SetAccess = Private, GetAccess = Public
Matlab documentation of property attributes.

Definition at line 261 of file DEIMEstimator.m.

Referenced by clone().

error.DEIMEstimator.TrainDataSelector

The selector that chooses the full model's trajectory points that are used for the MatrixDEIM approximation of the jacobian and the partial similarity transformation.

Default:
data.selection.DefaultSelector
Note
This property has custom functionality when its value is changed.

Definition at line 91 of file DEIMEstimator.m.

Referenced by clone(), and DEIMEstimator().

error.DEIMEstimator.UseFullJacobian = false

"Expensive version": Using the full system's jacobian for logarithmic norm computation. Included for easy error estimator comparison.


Default: false

Definition at line 104 of file DEIMEstimator.m.

Referenced by clone(), and getBeta().

error.DEIMEstimator.UseJacobianLogLipConst = false

"Even More Expensive version 2": Precompute the full solution and use the true logarithmic lipschitz constant of the jacobian of \(f\) in computations. Included for easy error estimator comparison.


Default: false

Definition at line 127 of file DEIMEstimator.m.

Referenced by getBeta(), and prepareConstants().

error.DEIMEstimator.UseJacobianNorm = false

Expensive conservative guess.


Default: false

Definition at line 139 of file DEIMEstimator.m.

Referenced by getBeta().

error.DEIMEstimator.UseTrueDEIMErr = false

"Expensive" version that uses the true approximation error between the DEIM approximation and the full system function instead of the \(M'\) variant.


Default: false

Definition at line 148 of file DEIMEstimator.m.

Referenced by clone(), and getAlpha().

error.DEIMEstimator.UseTrueLogLipConst = false

"Even More Expensive version": Precompute the full solution and use the true logarithmic lipschitz constant of \(f\) in computations. Included for easy error estimator comparison.


Default: false

Definition at line 115 of file DEIMEstimator.m.

Referenced by clone(), getBeta(), and prepareConstants().


The documentation for this class was generated from the following file: