70 float p00, p01, p10, p11;
83 #define QPID_AUTOTUNING_UNDEFINED ( 0xFFFFFFFEUL )
93 float kc, ki, kd, b, c, dt, min, max, epsilon, kw, kt, D, u1, beta, uSat;
101 qNumA_IntegrationMethod_t integrate;
240 const float manualInput );
265 const float *modelRef,
306 const uint32_t tEnable );
327 const float lambda );
342 qNumA_IntegrationMethod_t im );
int qPID_SetDirection(qPID_controller_t *const c, const qPID_Direction_t d)
Set the PID control action direction.
Definition qpid.c:55
qPID_Mode_t
Enumeration with the operational modes for the PID controller.
Definition qpid.h:48
qPID_Direction_t
Direction modes of the PID controller.
Definition qpid.h:57
float qPID_Control(qPID_controller_t *const c, const float w, const float y)
Computes the control action for given PID controller instance.
Definition qpid.c:265
int qPID_AutoTuningComplete(const qPID_controller_t *const c)
Verifies that the auto tuning process has finished with new gains set on the controller.
Definition qpid.c:480
int qPID_SetParams(qPID_controller_t *const c, const float kc, const float ti, const float td)
Set/Change the PID controller gains by using the [Kc, Ti Td ] triplet.
Definition qpid.c:68
int qPID_Reset(qPID_controller_t *const c)
Reset the internal PID controller calculations.
Definition qpid.c:118
int qPID_SetManualInput(qPID_controller_t *const c, const float manualInput)
Set the PID manual input mode. This value will be used as the manual input when the controller it set...
Definition qpid.c:224
int qPID_SetSeries(qPID_controller_t *const c)
Convert the controller gains to conform the series or interacting form.
Definition qpid.c:151
int qPID_AutoTuningSetParameters(qPID_controller_t *const c, const float mu, const float alfa, const float lambda)
Change parameters of the auto-tuning algorithm.
Definition qpid.c:494
int qPID_SetExtraGains(qPID_controller_t *const c, const float kw, const float kt)
Set/Change extra PID controller gains.
Definition qpid.c:103
int qPID_SetSaturation(qPID_controller_t *const c, const float min, const float max)
Setup the output saturation for the PID controller.
Definition qpid.c:136
int qPID_BindAutoTuning(qPID_controller_t *const c, qPID_AutoTuning_t *const at)
Binds the specified instance to enable the PID controller auto tuning algorithm.
Definition qpid.c:320
int qPID_EnableAutoTuning(qPID_controller_t *const c, const uint32_t tEnable)
Set the number of time steps where the auto tuner algorithm will modify the controller gains.
Definition qpid.c:358
int qPID_SetReferenceWeighting(qPID_controller_t *const c, const float gb, const float gc)
Set the PID Reference(Set-Point) Weighting. This value is used in order to avoid the increase of the ...
Definition qpid.c:209
int qPID_SetDerivativeFilter(qPID_controller_t *const c, const float beta)
Set the tuning parameter for the derivative filter.
Definition qpid.c:183
int qPID_SetMode(qPID_controller_t *const c, const qPID_Mode_t m)
Change the controller operational mode. In qPID_Automatic mode, the computed output of the PID contro...
Definition qpid.c:196
int qPID_SetMRAC(qPID_controller_t *const c, const float *modelRef, const float gamma)
Enable the additive MRAC(Model Reference Adaptive Control) feature.
Definition qpid.c:237
int qPID_SetIntegrationMethod(qPID_controller_t *const c, qNumA_IntegrationMethod_t im)
Set integration method for the PID controller.
Definition qpid.c:539
qPID_Type_t
Enumeration class with the operational modes for the PID controller.
Definition qpid.h:38
int qPID_SetGains(qPID_controller_t *const c, const float kc, const float ki, const float kd)
Set/Change the PID controller gains.
Definition qpid.c:85
int qPID_Setup(qPID_controller_t *const c, const float kc, const float ki, const float kd, const float dt)
Setup and initialize the PID controller instance.
Definition qpid.c:25
int qPID_SetEpsilon(qPID_controller_t *const c, const float eps)
Set the minimum value considered as error.
Definition qpid.c:170
@ qPID_Manual
Definition qpid.h:50
@ qPID_Automatic
Definition qpid.h:49
@ qPID_Backward
Definition qpid.h:59
@ qPID_Forward
Definition qpid.h:58
@ qPID_TYPE_PD
Definition qpid.h:40
@ qPID_TYPE_P
Definition qpid.h:39
@ qPID_TYPE_PI
Definition qpid.h:41
@ qPID_TYPE_PID
Definition qpid.h:42
A PID Auto-tuning object.
Definition qpid.h:68
PID Gains structure.
Definition qpid.h:29
float Kc
Definition qpid.h:30
float Ki
Definition qpid.h:31
float Kd
Definition qpid.h:32
A PID controller object.
Definition qpid.h:91