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
pidScalingPidScalingbadValueIndicatingValuedoubletypePidControllerType
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
pidParamsPidParametersdatasetUnitDataSetdataset, including including the "indicesToIgnore"
isPIDoutputDelayOneSampleboolindToIgnoreList<int>doVariableTimeBasebool
Returns
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
dataSetUnitDataSeta UnitDataSet, where .Y_meas, .Y_setpoint and .U are analyzed
tryDownsamplingbooltry identification against a downsampled copy of the dataset internally
tryVariableTimeBaseboolexperimental: 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
dataSetUnitDataSeta UnitDataSet, where .Y_meas, .Y_setpoint and .U are analyzed
doDetectFrozenDataboolif true, the model attempts to find and ignore portions of frozen data(will also detect oversampled data)
doVariableTimeBaseboolif true, the model will attempt to vary the time base internally to improve fit
Returns
- PidParameters
the identified parameters of the PID-controller