10#ifndef SEMF_UTILS_PROCESSING_PIDCONTROLLER_H_
11#define SEMF_UTILS_PROCESSING_PIDCONTROLLER_H_
36 double deltaMax = DBL_MAX);
124 void reset(
double yStart = 0);
131 virtual double calculate(
double currentValue);
Implementation of an pid (proportional integral derivative) regulator.
PidController(double kp, double ki, double kd, double sampleTime, double yMin, double yMax, double setpoint=0, double yStart=0, double deltaMax=DBL_MAX)
Constructor.
double maxOuput() const
Returns the maximum value which the output is allowed to have.
void setKd(double kd)
Set the gain of the derivative.
void setSetpoint(double setpoint)
Set the controller set point.
void reset(double yStart=0)
Resets the past sampled values which will be used for the calculation of the integral and derivative.
void setKp(double kp)
Set the proportional gain.
void setMinOutput(double min)
Set the minimum possible output.
virtual double calculate(double currentValue)
Calculates the output value dependent to the actual value. This method must be called cyclically at t...
void setKi(double ki)
Set the gain of the integral.
virtual ~PidController()=default
double ki() const
Get the gain of the integral.
void setSampleTime(double sampleTime)
Set the sample time of the controller.
double kp() const
Returns the proportional gain.
void setMaxDelta(double delta)
Set the max delta of the output between two samples.
void setMaxOutput(double max)
Limits the maximum value of the output.
double setpoint() const
Returns the current set point.
double kd() const
Returns the gain of the derivative.
double maxDelta() const
Returns Set the max delta of the output between two samples.
double sampleTime() const
Returns the current configured sample time.
double minOutput() const
Returns the minimum possible output.