dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pid.c File Reference

PID Control algorithms. More...

#include "openpilot.h"
#include "physical_constants.h"
#include "misc_math.h"
#include "pid.h"

Go to the source code of this file.

Functions

float pid_apply (struct pid *pid, const float err)
 Methods to use the pid structures. More...
 
float pid_apply_antiwindup (struct pid *pid, const float err, float min_bound, float max_bound, float aw_bound)
 
float pid_apply_setpoint (struct pid *pid, struct pid_deadband *deadband, const float setpoint, const float measured)
 
float pid_apply_setpoint_antiwindup (struct pid *pid, struct pid_deadband *deadband, const float setpoint, const float measured, float min_bound, float max_bound, float aw_bound)
 
void pid_zero (struct pid *pid)
 
void pid_configure_derivative (float cutoff, float g)
 Configure the common terms that alter ther derivative. More...
 
void pid_configure (struct pid *pid, float p, float i, float d, float iLim, float dT)
 
void pid_configure_deadband (struct pid_deadband *deadband, float width, float slope)
 

Variables

static float deriv_tau = 7.9577e-3f
 Store the shared time constant for the derivative cutoff. More...
 
static float deriv_gamma = 1.0
 Store the setpoint weight to apply for the derivative term. More...
 

Detailed Description

PID Control algorithms.

Author
The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
Tau Labs, http://taulabs.org, Copyright (C) 2012-2014
See Also
The GNU Public License (GPL) Version 3

Definition in file pid.c.