18#ifndef PID_CONTROLLER_H
19#define PID_CONTROLLER_H
33 double Update(
double,
double);
52#ifdef PID_CONTROLLER_TUNING_AID_ADDRESS
53 void SendTuningAidData(
double,
double,
double,
double,
double,
double);
double integralGain
Integral Gain (Ki) - Drift correction.
double targetValue
The desired buffer fill level in frames.
double integralSum
Accumulator for the I-term.
void Reset()
Resets the internal state (integral sum and error history)
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 Update(double, double)
Calculates the new output value.
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.