Skip to main content

Class PidControllerBase

Represents a PID controller

Assembly: Meadow.Foundation.dll
View Source
Declaration
public abstract class PidControllerBase : IPidController

Derived:
Meadow.Foundation.Controllers.Pid.IdealPidController

Implements:
Meadow.Peripherals.Controllers.PID.IPidController

Properties

ActualInput

Represents the ProcessVariable (PV), or the actual signal reading of the system in its current state. For example, when heating a cup of coffee to 75°, if the temp sensor says the coffee is currently at 40°, the 40� is the actual input value.

View Source
Declaration
public float ActualInput { get; set; }

TargetInput

Represents the SetPoint (SP), or the reference target signal to achieve. For example, when heating a cup of coffee to 75°, 75° is the target input value.

View Source
Declaration
public float TargetInput { get; set; }

OutputMin

Output minimum value

View Source
Declaration
public float OutputMin { get; set; }

OutputMax

Output maximum value

View Source
Declaration
public float OutputMax { get; set; }

ProportionalComponent

Proportional gain

View Source
Declaration
public virtual float ProportionalComponent { get; set; }

IntegralComponent

Integral gain

View Source
Declaration
public virtual float IntegralComponent { get; set; }

DerivativeComponent

Derivative gain

View Source
Declaration
public virtual float DerivativeComponent { get; set; }

OutputTuningInformation

Whether or not to print the calculation information to the output console in an comma-delimited form. Useful for pasting into a spreadsheet to graph the system control performance when tuning the PID controller corrective action gains.

View Source
Declaration
public bool OutputTuningInformation { get; set; }

Fields

_lastUpdateTime

Last update time

View Source
Declaration
protected DateTime _lastUpdateTime

_lastError

Last error value

View Source
Declaration
protected float _lastError

_integral

Integral

View Source
Declaration
protected float _integral

_lastControlOutputValue

Last control output value

View Source
Declaration
protected float _lastControlOutputValue

Methods

ResetIntegrator()

Reset integral

View Source
Declaration
public void ResetIntegrator()

CalculateControlOutput()

Calculates the control output based on the Target and Actual, using the current PID values

View Source
Declaration
public abstract float CalculateControlOutput()
Returns

System.Single

Implements

  • Meadow.Peripherals.Controllers.PID.IPidController