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.IterationCompLemmaEstimator Class Reference

IterationCompLemmaEstimator: A-posteriori error estimator for kernel-based systems using local lipschitz constants. More...

Detailed Description

IterationCompLemmaEstimator: A-posteriori error estimator for kernel-based systems using local lipschitz constants.

Implementation as in [WH10], but with updated ExtraODEDims and numerical computation.

Model requirements
ReducedModel.System.f is an instance of AKernelCoreFun FullModel.Approx is an instance of CompwiseKernelCoreFun
Author
Daniel Wirtz
Date
2010-08-10
Change in 0.5:
(Daniel Wirtz, 2011-07-07)
  • New properties smallz_flag to correctly transform the input space dimension on beta-computation depending on whether rotation invariant kernels are used or not.
  • Also made the estimator work with kernels.ParamTimeKernelExpansions
Change in 0.5:
(Daniel Wirtz, 2011-07-04) Changed this class name to "IterationCompLemmaEstimator".
Change in 0.4:
(Daniel Wirtz, 2011-05-29)
  • Changed this classes name to "LocalKernelEstimator".
  • Restructured the error estimators to better adopt to the current formulation. Now the KernelEstimators have a function getBeta instead of implementing the evalODEPart by themselves.
Change in 0.4:
(Daniel Wirtz, 2011-05-25) Changed the computations to the comparison lemma type. This reduced the needed extra ODE dimensions to one and speeds up the evaluation process.
Change in 0.4:
(Daniel Wirtz, 2011-05-23) Adopted to the new error.BaseEstimator interface with separate output error computation.
Change in 0.3:
(Daniel Wirtz, 2011-05-02) Changed the implementation of the evalODEPart so that only two extra ODE dimensions are needed. This avoids NaN entries when exponential values grow too big.
Change in 0.3:
(Syed Ammar, 2011-04-23) Implemented Setters for the properties LocalLipschitzFcn and UseTimeDiscreteC
New in 0.1:
(Daniel Wirtz, 2010-08-10) Added this class.

This class is part of the framework

KerMor - Model Order Reduction using Kernels

Definition at line 18 of file IterationCompLemmaEstimator.m.

Public Member Functions

function copy = clone ()
 Creates a deep copy of this estimator instance. More...
 
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 b = getBeta (colvec xfull, t)
 Compute the local lipschitz constant estimations. More...
 
function  clear ()
 
function ct = prepareConstants (colvec< double > mu,integer inputidx)
 Return values: ct: The time needed for preprocessing. More...
 
function ct = postProcess (colvec< double > x,double t,integer inputidx)
 Return values: ct: The time needed for postprocessing. More...
 
- Public Member Functions inherited from error.BaseCompLemmaEstimator
 BaseCompLemmaEstimator ()
 
function  offlineComputations (models.BaseFullModel model)
 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 e = evalODEPart (colvec x,double t,double ut)
 Evaluates the auxiliary ode part for the comparison-lemma based error estimators. More...
 
function ct = prepareConstants (colvec< double > mu,integer inputidx)
 
function copy = clone (copy)
 The interface method with returns a copy of the current class instance. More...
 
function  clear ()
 
function a = getAlpha (colvec< double > x,double t,colvec< double > ut)
 Convenience access method for semi-implicit euler method. More...
 
function ct = postProcess (colvec< double > x,double t,integer inputidx)
 Return values: ct: The time needed for postprocessing. More...
 
virtual function b = getBeta (colvec x,double t)
 Computes the \(\beta(t)\) term from the error estimation ODE for given time and place. More...
 
- 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...
 
- 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)
 Validations. More...
 
static function res = test_IterationCompLemmaEstimator ()
 
- Static Public Member Functions inherited from error.BaseCompLemmaEstimator
static function errmsg = validModelForEstimator (models.BaseFullModel model)
 Validations. 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

error.lipfun.Base LocalLipschitzFcn
 The internal kernel Lipschitz function to use. More...
 
 Iterations
 Determines how many postprocessing iterations for the estimator are performed. More...
 
logical UseTimeDiscreteC = true
 For the local Lipschitz constant estimation the parameter C can be chosen to equal the error from the last time step. This has to be investigated more thoroughly as integration errors from the solver may lead to a loss of rigorousity. More...
 
 d_iValues
 The \(d_i(t)\) values for each integration time-step \(t\). More...
 
- Public Attributes inherited from error.BaseCompLemmaEstimator
 EstimationData = "[]"
 \(3\times n\) matrix containing the \(t,\alpha(t),\beta(t)\) values at each time step. More...
 
 aComp
 
- 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...
 

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)
 
- 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)
 
- Protected Attributes inherited from error.BaseCompLemmaEstimator
 StepNr
 The current step. More...
 

Member Function Documentation

function error.IterationCompLemmaEstimator.clear ( )

Definition at line 332 of file IterationCompLemmaEstimator.m.

References d_iValues.

Referenced by prepareForReducedModel().

Here is the caller graph for this function:

function copy = error.IterationCompLemmaEstimator.clone ( )

Creates a deep copy of this estimator instance.

Generated fields of copy:

Definition at line 179 of file IterationCompLemmaEstimator.m.

References handle.addlistener, ICloneable.clone(), d_iValues, Iterations, LocalLipschitzFcn, and UseTimeDiscreteC.

Here is the call graph for this function:

function b = error.IterationCompLemmaEstimator.getBeta ( colvec  xfull,
  t 
)

Compute the local lipschitz constant estimations.

Parameters
xfullThe current state variable vector
tThe current time \(t\)
muThe current parameter \(\mu\)

Definition at line 287 of file IterationCompLemmaEstimator.m.

References d_iValues, error.lipfun.Base.evaluate(), models.BaseFirstOrderSystem.f, Iterations, LocalLipschitzFcn, error.BaseEstimator.mu, error.BaseEstimator.ReducedModel, error.BaseCompLemmaEstimator.StepNr, models.BaseModel.System, t, UseTimeDiscreteC, and models.ReducedModel.V.

Here is the call graph for this function:

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

Overrides the method from BaseEstimator and performs additional computations.

Parameters
fmThe full model.
Required fields of fm:

Definition at line 210 of file IterationCompLemmaEstimator.m.

References models.BaseFullModel.Approx, models.BaseFirstOrderSystem.f, Utils.getBoundingBox(), LocalLipschitzFcn, models.BaseModel.System, and X.

Here is the call graph for this function:

function ct = error.IterationCompLemmaEstimator.postProcess ( colvec< double x,
double  t,
integer  inputidx 
)

Return values: ct: The time needed for postprocessing.

Parameters
xThe state variable vector \(\vx(t)\)
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.

Definition at line 372 of file IterationCompLemmaEstimator.m.

References error.BaseEstimator.getE0(), Iterations, error.BaseEstimator.mu, models.BaseModel.ODESolver, error.BaseEstimator.ReducedModel, and error.BaseEstimator.StateError.

Here is the call graph for this function:

function ct = error.IterationCompLemmaEstimator.prepareConstants ( colvec< double mu,
integer  inputidx 
)

Return values: ct: The time needed for preprocessing.

Parameters
muThe currently used parameter \(\vmu\). Set to \([]\) if not used.
inputidxThe index \(i\) of the currently used input function \(u_i(t)\). Set to \([]\) if not used.

Definition at line 338 of file IterationCompLemmaEstimator.m.

References handle.addlistener, Iterations, LocalLipschitzFcn, models.BaseModel.ODESolver, error.BaseEstimator.ReducedModel, and UseTimeDiscreteC.

function prepared = error.IterationCompLemmaEstimator.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
Return values
preparedA clone of this estimator, with accordingly projected components
Required fields of rm:
Generated fields of prepared:

Definition at line 248 of file IterationCompLemmaEstimator.m.

References handle.addlistener, models.BaseFullModel.Approx, clear(), models.BaseFirstOrderSystem.f, models.ReducedModel.FullModel, models.BaseModel.G, models.BaseModel.ODESolver, dscomponents.ACoreFun.project(), models.BaseModel.System, t, models.ReducedModel.V, and models.ReducedModel.W.

Here is the call graph for this function:

static function res = error.IterationCompLemmaEstimator.test_IterationCompLemmaEstimator ( )
static

Definition at line 547 of file IterationCompLemmaEstimator.m.

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

Validations.

Parameters
modelA KerMor full model
Required fields of model:

Definition at line 526 of file IterationCompLemmaEstimator.m.

References models.BaseFullModel.Approx, models.BaseFirstOrderSystem.f, and models.BaseModel.System.

Member Data Documentation

error.IterationCompLemmaEstimator.d_iValues

The \(d_i(t)\) values for each integration time-step \(t\).

Note
This property has the MATLAB attribute Transient set to true.
This property has non-standard access specifiers: SetAccess = Private, GetAccess = Public
Matlab documentation of property attributes.

Definition at line 127 of file IterationCompLemmaEstimator.m.

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

error.IterationCompLemmaEstimator.Iterations

Determines how many postprocessing iterations for the estimator are performed.

Has computationally no effect if UseTimeDiscreteC is switched on.

Default: 0

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

Definition at line 97 of file IterationCompLemmaEstimator.m.

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

error.IterationCompLemmaEstimator.LocalLipschitzFcn

The internal kernel Lipschitz function to use.

Depending on the underlying kernel, a specific lipschitz constant estimation can be used. Each kernel has the method "getLipschitzFcn" which is by default implemented in BaseKernel. The resulting function handle is used by default; however, to enhance customizability, one can manually define a lipschitz estimation function here. (For an example: see the BellFunction kernel interface for different possibilities)

Function handle signature
di: The distances from the reduced system to the centers C: The locality constant that determines how far away the true system can maximally be (can be \(\infty\)) t: The current time \(t\) mu: The current parameter \(\mu\)
See Also
kernels.BaseKernel kernels.BellFunction error.lipfun.Base
Note
This property has custom functionality when its value is changed.

Definition at line 70 of file IterationCompLemmaEstimator.m.

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

error.IterationCompLemmaEstimator.UseTimeDiscreteC = true

For the local Lipschitz constant estimation the parameter C can be chosen to equal the error from the last time step. This has to be investigated more thoroughly as integration errors from the solver may lead to a loss of rigorousity.

Default: true

Defaults to true. (As is best estimator atm)

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

Definition at line 110 of file IterationCompLemmaEstimator.m.

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


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