Table of Contents

Class UnitIdentifier

Namespace
TimeSeriesAnalysis.Dynamic
Assembly
TimeSeriesAnalysis.dll

Identifier of the "Default" process model - a dynamic process model with time-constant, time-delay, linear process gain and optional (nonlinear) curvature process gains.

This model class is sufficent for real-world linear or weakly nonlinear dynamic systems, yet also introduces the fewest possible parameters to describe the system in an attempt to avoid over-fitting/over-parameterization.

The "default" process model is identified using a linear-in-parameters parameterization (parameters a,b,c), so that it can be solved by linear regression and identification should thus be both fast and stable. The issue with the parameterization (a,b,c) is that the meaning of each parameter is less intuitive, for instance the time constant depends on a, but linear gain depends on both a and b, while curvature depends on a and c. Looking at the unceratinty of each parameter to determine if the model should be dynamic or static or what the uncertainty of the time constant is, is very hard, and this observation motivates re-parameterizing the model after identification.

When assessing and simulating the model, parameters are converted into the more intuitive parameters "time constant", "linear gains" and "curvature gain" which are a different parameterization. The UnitIdentifier, UnitModel and UnitParameters classes handle this transition seamlessly to the user. Uncertainty is expressed in terms of this more intuitive parameterization, to allow for a more intuitive assessment of the parameters.

Another advantage of the parameterization is that the model internally separates between steady-state and transient state. You can at any instance "turn off" dynamics and request the steady-state model output for the current input. This is useful if you have transient data that you want to analyze in the steady-state, as you can then fit the model to all available data-points without having to select what data points you believe are at steady state, then you can disable dynamic terms to do a static analysis of the dynamic model.

Time-delay is an integer parameter, and finding the time-delay alongside continuous parameters turns the identification problem into a linear mixed-integer problem. The time delay identification is done by splitting the time-delay estimation from continuous parameter identification, turning the solver into a sequential optimization solver. This logic to re-run estimation for multiple time-delays and selecting the best estimate of time delay is deferred to TimeSeriesAnalysis.Dynamic.UnitTimeDelayIdentifier.

Since the aim is to identify transients/dynamics, the regression is done on model differences rather than absolute values.

public static class UnitIdentifier
Inheritance
UnitIdentifier
Inherited Members

Methods

Identify(ref UnitDataSet, FittingSpecs, bool)

Identifies the "Default" process model that best fits the dataSet given

public static UnitModel Identify(ref UnitDataSet dataSet, FittingSpecs fittingSpecs = null, bool doEstimateTimeDelay = true)

Parameters

dataSet UnitDataSet

The dataset containing the ymeas and U that is to be fitted against, a new y_sim is also added

fittingSpecs FittingSpecs

optional fitting specs object for tuning data

doEstimateTimeDelay bool

(default:true) if set to false, time delay estimation is disabled (can drastically speeed up identification)

Returns

UnitModel

the identified model parameters and some information about the fit

IdentifyLinear(ref UnitDataSet, FittingSpecs, bool)

Identifies the "Default" process model that best fits the dataSet given, but disables curvatures

public static UnitModel IdentifyLinear(ref UnitDataSet dataSet, FittingSpecs fittingSpecs, bool doEstimateTimeDelay = true)

Parameters

dataSet UnitDataSet

The dataset containing the ymeas and U that is to be fitted against, a new y_sim is also added

fittingSpecs FittingSpecs

optionally set constraints on the identification

doEstimateTimeDelay bool

if set to false, estimation of time delays are disabled

Returns

UnitModel

the identified model parameters and some information about the fit

IdentifyLinearAndStatic(ref UnitDataSet, FittingSpecs, bool)

Identifies the "Default" process model that best fits the dataSet given, but disables curvatures and time-constants

public static UnitModel IdentifyLinearAndStatic(ref UnitDataSet dataSet, FittingSpecs fittingSpecs, bool doEstimateTimeDelay = true)

Parameters

dataSet UnitDataSet

The dataset containing the ymeas and U that is to be fitted against, a new y_sim is also added

fittingSpecs FittingSpecs

object of specifications for

doEstimateTimeDelay bool

set to false to disable time delay estimation (this speeds up identification manyfold)

Returns

UnitModel

the identified model parameters and some information about the fit

IdentifyLinearAndStaticDiff(ref UnitDataSet, FittingSpecs, bool)

Identifies the process model that best fits the dataSet given by minimizing differences y[k]-y[k-1], but disables curvatures and time-constants.

public static UnitModel IdentifyLinearAndStaticDiff(ref UnitDataSet dataSet, FittingSpecs fittingSpecs, bool doEstimateTimeDelay = true)

Parameters

dataSet UnitDataSet

The dataset containing the ymeas and U that is to be fitted against, a new y_sim is also added

fittingSpecs FittingSpecs

Optionally sets the local working point, constraints etc. for id.

doEstimateTimeDelay bool

if set to false, modeling does not identify time-delays

Returns

UnitModel

the identified model parameters and some information about the fit

IdentifyLinearAndStaticWhileKeepingLinearGainFixed(UnitDataSet, int, double, double, double)

Freezed one input to a given pre-determined value, but re-identifies other static paramters. This is useful if doing a "global search" where varying a single gain.

public static UnitModel IdentifyLinearAndStaticWhileKeepingLinearGainFixed(UnitDataSet dataSet, int inputIdxToFix, double inputProcessGainValueToFix, double u0_fixedInput, double uNorm_fixedInput)

Parameters

dataSet UnitDataSet
inputIdxToFix int

the index of the value to freeze

inputProcessGainValueToFix double

the linear gain to freeze the at

u0_fixedInput double
uNorm_fixedInput double

Returns

UnitModel

identified model, to check if identification suceeded, check .modelParameters.Fitting.WasAbleToIdentify

IdentifyLinearDiff(ref UnitDataSet, FittingSpecs, bool)

Identifies the process model based on differences y[k]-y[k-1] that best fits the dataSet given, but disables curvatures

public static UnitModel IdentifyLinearDiff(ref UnitDataSet dataSet, FittingSpecs fittingSpecs, bool doEstimateTimeDelay = true)

Parameters

dataSet UnitDataSet

The dataset containing the ymeas and U that is to be fitted against, a new y_sim is also added

fittingSpecs FittingSpecs

optionally set constraints on the identification

doEstimateTimeDelay bool

if set to false, estimation of time delays are disabled(default is true)

Returns

UnitModel

the identified model parameters and some information about the fit

IdentifyStatic(ref UnitDataSet, FittingSpecs)

Identifies the "Default" process model that best fits the dataSet given, but no time-constants

public static UnitModel IdentifyStatic(ref UnitDataSet dataSet, FittingSpecs fittingSpecs = null)

Parameters

dataSet UnitDataSet

The dataset containing the ymeas and U that is to be fitted against, a new element y_sim is also added to this dataset

fittingSpecs FittingSpecs

Returns

UnitModel

the identified model parameters and some information about the fit