Search Results for

    Show / Hide Table of Contents

    Class GainSchedModel

    Simulatable gain-scheduled model.

    A model for systems that cannot be adequately modelled by UnitModel,because they either have time constants or gains or both that vary signficantly depending on the value of one of the inputs.

    One input is selected as the "scheduling varible" and one ore more thresholds are given for this scheduling variable. The thresholds can be set indepently for time-contant and linear gain.

    Remember that with more thresholds defined, the higher the requirement for information content in data will be if the model is to be identified from it.

    This should not be confused with "gain-scheduled" PID-control, which is a similar concept but applied to PID-control parameters.

    See also: GainSchedParameters
    Inheritance
    object
    ModelBaseClass
    GainSchedModel
    Implements
    ISimulatableModel
    Inherited Members
    ModelBaseClass.ID
    ModelBaseClass.ModelInputIDs
    ModelBaseClass.additiveInputIDs
    ModelBaseClass.outputID
    ModelBaseClass.outputIdentID
    ModelBaseClass.processModelType
    ModelBaseClass.comment
    ModelBaseClass.x
    ModelBaseClass.y
    ModelBaseClass.color
    ModelBaseClass.GetID()
    ModelBaseClass.SetID(string)
    ModelBaseClass.SetProcessModelType(ModelType)
    ModelBaseClass.GetProcessModelType()
    ModelBaseClass.SetInputIDs(string[], int?)
    ModelBaseClass.AddSignalToOutput(string)
    ModelBaseClass.GetModelInputIDs()
    ModelBaseClass.GetAdditiveInputIDs()
    ModelBaseClass.GetBothKindsOfInputIDs()
    ModelBaseClass.SetOutputID(string)
    ModelBaseClass.GetOutputID()
    ModelBaseClass.GetOutputIdentID()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: TimeSeriesAnalysis.Dynamic
    Assembly: TimeSeriesAnalysis.dll
    Syntax
    public class GainSchedModel : ModelBaseClass, ISimulatableModel

    Constructors

    | Edit this page View Source

    GainSchedModel()

    Empty constructor

    Declaration
    public GainSchedModel()
    | Edit this page View Source

    GainSchedModel(GainSchedParameters, string)

    Constructor

    Declaration
    [JsonConstructor]
    public GainSchedModel(GainSchedParameters modelParameters, string ID = "not_named")
    Parameters
    Type Name Description
    GainSchedParameters modelParameters

    model parameter object

    string ID

    a unique string that identifies this model in larger process models

    Fields

    | Edit this page View Source

    modelParameters

    Model parameters

    Declaration
    public GainSchedParameters modelParameters
    Field Value
    Type Description
    GainSchedParameters

    Methods

    | Edit this page View Source

    Clone(string)

    Create deep copy/clone

    Declaration
    public ISimulatableModel Clone(string IDexternal = null)
    Parameters
    Type Name Description
    string IDexternal
    Returns
    Type Description
    ISimulatableModel
    | Edit this page View Source

    GetFittedDataSet()

    Returns the fitted dataset

    Declaration
    public UnitDataSet GetFittedDataSet()
    Returns
    Type Description
    UnitDataSet
    | Edit this page View Source

    GetLengthOfInputVector()

    Returns the number of external inputs U of the model. Note that this model may have an disturbance signal added to the output in addition to the other signals.

    Declaration
    public override int GetLengthOfInputVector()
    Returns
    Type Description
    int
    Overrides
    ModelBaseClass.GetLengthOfInputVector()
    | Edit this page View Source

    GetModelParameters()

    Get the objet of model paramters contained in the model

    Declaration
    public GainSchedParameters GetModelParameters()
    Returns
    Type Description
    GainSchedParameters

    Model paramter object

    | Edit this page View Source

    GetOutputSignalType()

    Get the type of output signal

    Declaration
    public override SignalType GetOutputSignalType()
    Returns
    Type Description
    SignalType
    Overrides
    ModelBaseClass.GetOutputSignalType()
    | Edit this page View Source

    GetSteadyStateInput(double, int, double[])

    Calcuate the steady-state input if the output and all-but-one input are known

    Declaration
    public double? GetSteadyStateInput(double x0, int inputIdx = 0, double[] givenInputs = null)
    Parameters
    Type Name Description
    double x0

    If no additive inputs y=x, otherwise subtract additive inputs from y to get x

    int inputIdx

    the index of the input

    double[] givenInputs
    Returns
    Type Description
    double?
    | Edit this page View Source

    GetSteadyStateOutput(double[], double)

    Get the steady state output y for a given input(including additive terms)

    Declaration
    public double? GetSteadyStateOutput(double[] u0, double badDataID = -9999)
    Parameters
    Type Name Description
    double[] u0
    double badDataID

    optional special value that indicates "Nan"

    Returns
    Type Description
    double?
    | Edit this page View Source

    IsModelSimulatable(out string)

    Answers if model is simulatable, i.e. has given inputs that are sensible and sufficent.

    Declaration
    public bool IsModelSimulatable(out string explainStr)
    Parameters
    Type Name Description
    string explainStr
    Returns
    Type Description
    bool
    | Edit this page View Source

    Iterate(double[], double, double)

    Iterates the process model state one time step, based on the inputs given

    Declaration
    public double[] Iterate(double[] inputs, double timeBase_s, double badValueIndicator = -9999)
    Parameters
    Type Name Description
    double[] inputs

    vector of inputs U. Optionally the output disturbance D can be added as the last value.

    double timeBase_s

    vector of inputs U.Optionally the output disturbance D can be added as the last value.

    double badValueIndicator

    value in U that is to be treated as NaN

    Returns
    Type Description
    double[]

    the updated process model state(x) - the output without any output noise or disturbance. NaN is returned if model was not able to be identfied, or if no good values U values yet have been given. If some data points in U inputsU are NaN or equal to badValueIndicator, the last good value is returned

    | Edit this page View Source

    SetFittedDataSet(UnitDataSet)

    Sets the fitted dataset

    Declaration
    public void SetFittedDataSet(UnitDataSet dataset)
    Parameters
    Type Name Description
    UnitDataSet dataset
    | Edit this page View Source

    SetModelParameters(GainSchedParameters)

    Update the paramter object of the model

    Declaration
    public void SetModelParameters(GainSchedParameters parameters)
    Parameters
    Type Name Description
    GainSchedParameters parameters
    | Edit this page View Source

    ToString()

    Create a nice human-readable summary of all the important data contained in the model object. This is especially useful for unit-testing and development.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()
    | Edit this page View Source

    WarmStart(double[], double)

    Warm-starting

    Declaration
    public void WarmStart(double[] inputs = null, double output = 0)
    Parameters
    Type Name Description
    double[] inputs

    not used, leave as null

    double output

    not used, leave as null

    Implements

    ISimulatableModel
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX