Search Results for

    Show / Hide Table of Contents

    Class UnitDataSet

    The data for a porition of a process, containg only one output and one or multiple inputs that influence it

    Inheritance
    object
    UnitDataSet
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: TimeSeriesAnalysis.Dynamic
    Assembly: TimeSeriesAnalysis.dll
    Syntax
    public class UnitDataSet

    Constructors

    | Edit this page View Source

    UnitDataSet(string)

    Constructor for data set without inputs - for "autonomous" processes such as sinusoids, rand walks or other disturbancs.

    Declaration
    public UnitDataSet(string name = null)
    Parameters
    Type Name Description
    string name

    optional internal name of dataset

    | Edit this page View Source

    UnitDataSet((double[], DateTime[]), (double[], DateTime[]), string)

    Create a dataset for single-input system from two signals that have separate but overlapping time-series(each given as value-date tuples)

    Declaration
    public UnitDataSet((double[], DateTime[]) u, (double[], DateTime[]) y_meas, string name = null)
    Parameters
    Type Name Description
    (double[], DateTime[]) u

    tuple of values and dates describing u

    (double[], DateTime[]) y_meas

    tuple of values and dates describing y

    string name

    name of dataset

    | Edit this page View Source

    UnitDataSet(UnitDataSet)

    Create a copy of an existing data set

    Declaration
    public UnitDataSet(UnitDataSet otherDataSet)
    Parameters
    Type Name Description
    UnitDataSet otherDataSet
    | Edit this page View Source

    UnitDataSet(UnitDataSet, double, int)

    Create a downsampled copy of an existing data set

    Declaration
    public UnitDataSet(UnitDataSet originalDataSet, double downsampleFactor, int keyIndex = 0)
    Parameters
    Type Name Description
    UnitDataSet originalDataSet
    double downsampleFactor

    factor by which to downsample the original dataset

    int keyIndex

    index around which to center the downsampling

    Fields

    | Edit this page View Source

    IndicesToIgnore

    Indices that are ignored in Y during fitting.

    Declaration
    public List<int> IndicesToIgnore
    Field Value
    Type Description
    List<int>

    Properties

    | Edit this page View Source

    BadDataID

    Some systems for storing data do not support "NaN", but instead some other magic value is reserved for indicating that a value is bad or missing.

    Declaration
    public double BadDataID { get; set; }
    Property Value
    Type Description
    double
    | Edit this page View Source

    D

    Additve output disturbance D (Y = X+ D)

    Declaration
    public double[] D { get; set; }
    Property Value
    Type Description
    double[]
    | Edit this page View Source

    ProcessName

    Name

    Declaration
    public string ProcessName { get; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    Times

    Timestamps

    Declaration
    public DateTime[] Times { get; set; }
    Property Value
    Type Description
    DateTime[]
    | Edit this page View Source

    U

    Input U (given)

    Declaration
    public double[,] U { get; set; }
    Property Value
    Type Description
    double[,]
    | Edit this page View Source

    U_sim

    Input U(simulated) - in the case of PID-control

    Declaration
    public double[,] U_sim { get; set; }
    Property Value
    Type Description
    double[,]
    | Edit this page View Source

    Warnings

    list of warings during identification

    Declaration
    public List<UnitWarnings> Warnings { get; set; }
    Property Value
    Type Description
    List<UnitWarnings>
    | Edit this page View Source

    Y_meas

    Output Y (measured)

    Declaration
    public double[] Y_meas { get; set; }
    Property Value
    Type Description
    double[]
    | Edit this page View Source

    Y_proc

    The simulated output of the process, this is a non-measured variable that excludes the disturbance

    Declaration
    public double[] Y_proc { get; set; }
    Property Value
    Type Description
    double[]
    | Edit this page View Source

    Y_setpoint

    Setpoint - (if sub-process includes a PID-controller)

    Declaration
    public double[] Y_setpoint { get; set; }
    Property Value
    Type Description
    double[]
    | Edit this page View Source

    Y_sim

    Output Y(simulated)

    Declaration
    public double[] Y_sim { get; set; }
    Property Value
    Type Description
    double[]

    Methods

    | Edit this page View Source

    Concat(UnitDataSet)

    Appends/concatenate another dataset to the end of this one

    Declaration
    public bool Concat(UnitDataSet otherDataSet)
    Parameters
    Type Name Description
    UnitDataSet otherDataSet
    Returns
    Type Description
    bool
    | Edit this page View Source

    CreateTimeStamps(double, DateTime?)

    If data is already given to object, this method will fill out the timstamps member

    Declaration
    public void CreateTimeStamps(double timeBase_s, DateTime? t0 = null)
    Parameters
    Type Name Description
    double timeBase_s

    the time in seconds bewteen time samples

    DateTime? t0

    the date of the first datapoint in the dataset

    | Edit this page View Source

    DetermineIndicesToIgnore(FittingSpecs)

    Tags indices to be removed if either of the output is outside the range defined by [Y_min,Y_max], an input is outside [u_min, umax] or if any data matches badDataId

    Results are stored in "IndicesToIgnore", not outputted.

    Declaration
    public void DetermineIndicesToIgnore(FittingSpecs fittingSpecs)
    Parameters
    Type Name Description
    FittingSpecs fittingSpecs
    | Edit this page View Source

    GetAverageU()

    Get the average value of each input in the dataset. This is useful when defining model local around a working point.

    Declaration
    public double[] GetAverageU()
    Returns
    Type Description
    double[]

    an array of averages, each corrsponding to one column of U. Returns null if it was not possible to calculate averages

    | Edit this page View Source

    GetNumDataPoints()

    Returns the number of datapoints in the dataset

    Declaration
    public int GetNumDataPoints()
    Returns
    Type Description
    int
    | Edit this page View Source

    GetOversampledFactor(out int)

    Identify the oversampled factor of the dataset. The oversamples need to be evenly spread in the dataset. Subsets of oversamples in an otherwise non-oversampled dataset will not be taken into account here.

    Declaration
    public double GetOversampledFactor(out int keyIndex)
    Parameters
    Type Name Description
    int keyIndex
    Returns
    Type Description
    double

    the average distance between two unique values in the dataset arrays and a key index where the first new value occurs

    | Edit this page View Source

    GetTimeBase()

    Gets the time between samples in seconds, returns zero if times are not set

    Declaration
    public double GetTimeBase()
    Returns
    Type Description
    double
    | Edit this page View Source

    GetTimeSpan()

    Get the time spanned by the dataset

    Declaration
    public TimeSpan GetTimeSpan()
    Returns
    Type Description
    TimeSpan

    The time spanned by the dataset, or null if times are not set

    | Edit this page View Source

    SetU(double[], double[], double[], double[], double[], double[])

    Helper to set column of U to uValues.

    Declaration
    public bool SetU(double[] uValues1, double[] uValues2 = null, double[] uValues3 = null, double[] uValues4 = null, double[] uValues5 = null, double[] uValues6 = null)
    Parameters
    Type Name Description
    double[] uValues1

    first input array

    double[] uValues2

    second input array(can be null)

    double[] uValues3

    third input array(can be null)

    double[] uValues4

    third input array(can be null)

    double[] uValues5

    third input array(can be null)

    double[] uValues6

    third input array(can be null)

    Returns
    Type Description
    bool

    true if succesful, otherwise false

    | Edit this page View Source

    SubsetInd(int, int)

    Create a copy of the data set that is a subset with given start/end indices

    Declaration
    public UnitDataSet SubsetInd(int startInd, int endInd)
    Parameters
    Type Name Description
    int startInd
    int endInd
    Returns
    Type Description
    UnitDataSet
    | Edit this page View Source

    SubsetPrc(double, double)

    Create a subset of the dataset that is defined in terms of percentages

    Declaration
    public UnitDataSet SubsetPrc(double startPrc, double endPrc)
    Parameters
    Type Name Description
    double startPrc

    A value 0-100%. Should be a value smaller than endPrc

    double endPrc

    A value 0-100%. Should be a value bigger than startPrc

    Returns
    Type Description
    UnitDataSet
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX