10#ifndef PID_CONTROLLER_H
11#define PID_CONTROLLER_H
33 double Update(
double,
double);
52#ifdef PID_CONTROLLER_TUNING_AID_ADDRESS
double integralGain
Integral Gain (Ki) - Drift correction.
double targetValue
The desired buffer fill level in frames.
double integralSum
Accumulator for the I-term.
double maxOutput
Hard limit for output correction.
double maxIntegral
Anti-windup limit for the integral term.
double iTerm
Integral term.
double dTerm
Derivative term.
double proportionalGain
Proportional Gain (Kp) - Reaction strength.
double pTerm
Proportional term.
void SetTargetValue(double value)
bool firstRun
Flag for first run.
double previousError
Error from the previous step (for D-term)
double derivativeGain
Derivative Gain (Kd) - Dampening.
void Reset()
Reset the internal state (integral sum and error history).
double Update(double, double)
Calculate the new output value.