Table of Contents

Class PidIdentifier

Namespace
TimeSeriesAnalysis.Dynamic
Assembly
TimeSeriesAnalysis.dll

Class that attempts to identify the parameters (such as Kp and Ti) of a PID-controller from a given set of time-series of the input and output of said controller.

public class PidIdentifier
Inheritance
PidIdentifier
Inherited Members

Constructors

PidIdentifier(PidScaling, double, PidControllerType)

Default constructor

public PidIdentifier(PidScaling pidScaling = null, double badValueIndicatingValue = -9999, PidControllerType type = PidControllerType.Unset)

Parameters

pidScaling PidScaling
badValueIndicatingValue double
type PidControllerType

Methods

GetSimulatedU(PidParameters, UnitDataSet, bool, List<int>, bool)

Returns the simulated time series of the manipulated variable u as given by the PID-controller.

public (double[], int) GetSimulatedU(PidParameters pidParams, UnitDataSet dataset, bool isPIDoutputDelayOneSample, List<int> indToIgnore, bool doVariableTimeBase = false)

Parameters

pidParams PidParameters
dataset UnitDataSet

dataset, including including the "indicesToIgnore"

isPIDoutputDelayOneSample bool
indToIgnore List<int>
doVariableTimeBase bool

Returns

(double[], int)

the simulated value, and the number of restarts

Identify(ref UnitDataSet, bool, bool)

Identifies a PID-controller from a UnitDataSet

public PidParameters Identify(ref UnitDataSet dataSet, bool tryDownsampling = true, bool tryVariableTimeBase = false)

Parameters

dataSet UnitDataSet

a UnitDataSet, where .Y_meas, .Y_setpoint and .U are analyzed

tryDownsampling bool

try identification against a downsampled copy of the dataset internally

tryVariableTimeBase bool

experimental: default is false (if set to true,several unit tests fail because "flipKp" is triggered.)

Returns

PidParameters

the identified parameters of the PID-controller

Identify_Level1(ref UnitDataSet, bool, bool)

Identifies a PID-controller from a UnitDataSet

public PidParameters Identify_Level1(ref UnitDataSet dataSet, bool doDetectFrozenData, bool doVariableTimeBase)

Parameters

dataSet UnitDataSet

a UnitDataSet, where .Y_meas, .Y_setpoint and .U are analyzed

doDetectFrozenData bool

if true, the model attempts to find and ignore portions of frozen data(will also detect oversampled data)

doVariableTimeBase bool

if true, the model will attempt to vary the time base internally to improve fit

Returns

PidParameters

the identified parameters of the PID-controller