MotorWare f2806x Module API Documentation
Data Structures | Typedefs | Functions
float/pid.h File Reference

Contains the public interface to the Proportional-Integral-Derivative (PID) controller module routines. More...

#include "sw/modules/types/src/types.h"
#include "sw/modules/filter/src/float/filter_fo.h"
#include "sw/modules/math/src/float/math.h"

Go to the source code of this file.

Data Structures

struct  _PID_Obj_
 Defines the PID controller object. More...
 

Typedefs

typedef struct _PID_Obj_ PID_Obj
 Defines the PID controller object. More...
 
typedef struct _PID_Obj_PID_Handle
 Defines the PID handle. More...
 

Functions

void PID_getDerFilterParams (PID_Handle handle, float_t *b0, float_t *b1, float_t *a1, float_t *x1, float_t *y1)
 Gets the derivative filter parameters. More...
 
static float_t PID_getFbackValue (PID_Handle handle)
 Gets the feedback value in the PID controller. More...
 
static float_t PID_getFfwdValue (PID_Handle handle)
 Gets the feedforward value in the PID controller. More...
 
static void PID_getGains (PID_Handle handle, float_t *pKp, float_t *pKi, float_t *pKd)
 Gets the gains in the PID controller. More...
 
static float_t PID_getKd (PID_Handle handle)
 Gets the derivative gain in the PID controller. More...
 
static float_t PID_getKi (PID_Handle handle)
 Gets the integral gain in the PID controller. More...
 
static float_t PID_getKp (PID_Handle handle)
 Gets the proportional gain in the PID controller. More...
 
static void PID_getMinMax (PID_Handle handle, float_t *pOutMin, float_t *pOutMax)
 Gets the minimum and maximum output value allowed in the PID controller. More...
 
static float_t PID_getOutMax (PID_Handle handle)
 Gets the maximum output value allowed in the PID controller. More...
 
static float_t PID_getOutMin (PID_Handle handle)
 Gets the minimum output value allowed in the PID controller. More...
 
static float_t PID_getRefValue (PID_Handle handle)
 Gets the reference value in the PID controller. More...
 
static float_t PID_getUi (PID_Handle handle)
 Gets the integrator start value in the PID controller. More...
 
PID_Handle PID_init (void *pMemory, const size_t numBytes)
 Initializes the PID controller. More...
 
void PID_setDerFilterParams (PID_Handle handle, const float_t b0, const float_t b1, const float_t a1, const float_t x1, const float_t y1)
 Sets the derivative filter parameters. More...
 
static void PID_setFbackValue (PID_Handle handle, const float_t fbackValue)
 Sets the feedback value in the PID controller. More...
 
static void PID_setFfwdValue (PID_Handle handle, const float_t ffwdValue)
 Sets the feedforward value in the PID controller. More...
 
static void PID_setGains (PID_Handle handle, const float_t Kp, const float_t Ki, const float_t Kd)
 Sets the gains in the PID controller. More...
 
static void PID_setKd (PID_Handle handle, const float_t Kd)
 Sets the derivative gain in the PID controller. More...
 
static void PID_setKi (PID_Handle handle, const float_t Ki)
 Sets the integral gain in the PID controller. More...
 
static void PID_setKp (PID_Handle handle, const float_t Kp)
 Sets the proportional gain in the PID controller. More...
 
static void PID_setMinMax (PID_Handle handle, const float_t outMin, const float_t outMax)
 Sets the minimum and maximum output value allowed in the PID controller. More...
 
static void PID_setOutMax (PID_Handle handle, const float_t outMax)
 Sets the maximum output value allowed in the PID controller. More...
 
static void PID_setOutMin (PID_Handle handle, const float_t outMin)
 Sets the minimum output value allowed in the PID controller. More...
 
static void PID_setRefValue (PID_Handle handle, const float_t refValue)
 Sets the reference value in the PID controller. More...
 
static void PID_setUi (PID_Handle handle, const float_t Ui)
 Sets the integrator start value in the PID controller. More...
 
static void PID_run_parallel (PID_Handle handle, const float_t refValue, const float_t fbackValue, const float_t ffwdValue, float_t *pOutValue)
 Runs the parallel form of the PID controller. More...
 
static void PID_run_series (PID_Handle handle, const float_t refValue, const float_t fbackValue, const float_t ffwdValue, float_t *pOutValue)
 Runs the series form of the PID controller. More...
 

Detailed Description

Contains the public interface to the Proportional-Integral-Derivative (PID) controller module routines.

(C) Copyright 2014, Texas Instruments, Inc.

Definition in file float/pid.h.

Function Documentation

static float_t PID_getFbackValue ( PID_Handle  handle)
inlinestatic

Gets the feedback value in the PID controller.

Parameters
[in]handleThe PID controller handle
Returns
The feedback value in the PID controller

Definition at line 121 of file float/pid.h.

References _PID_Obj_::fbackValue.

static float_t PID_getKd ( PID_Handle  handle)
inlinestatic

Gets the derivative gain in the PID controller.

Parameters
[in]handleThe PID controller handle
Returns
The derivative gain in the PID controller

Definition at line 160 of file float/pid.h.

References _PID_Obj_::Kd.

Referenced by PID_run_parallel(), and PID_run_series().

static float_t PID_getKi ( PID_Handle  handle)
inlinestatic

Gets the integral gain in the PID controller.

Parameters
[in]handleThe PID controller handle
Returns
The integral gain in the PID controller

Definition at line 171 of file float/pid.h.

References _PID_Obj_::Ki.

Referenced by PID_run_parallel(), and PID_run_series().

static float_t PID_getKp ( PID_Handle  handle)
inlinestatic

Gets the proportional gain in the PID controller.

Parameters
[in]handleThe PID controller handle
Returns
The proportional gain in the PID controller

Definition at line 182 of file float/pid.h.

References _PID_Obj_::Kp.

Referenced by PID_run_parallel(), and PID_run_series().

static float_t PID_getOutMax ( PID_Handle  handle)
inlinestatic

Gets the maximum output value allowed in the PID controller.

Parameters
[in]handleThe PID controller handle
Returns
The maximum output value allowed

Definition at line 208 of file float/pid.h.

References _PID_Obj_::outMax.

Referenced by PID_run_parallel(), and PID_run_series().

static float_t PID_getOutMin ( PID_Handle  handle)
inlinestatic

Gets the minimum output value allowed in the PID controller.

Parameters
[in]handleThe PID controller handle
Returns
The minimum output value allowed

Definition at line 219 of file float/pid.h.

References _PID_Obj_::outMin.

Referenced by PID_run_parallel(), and PID_run_series().

static float_t PID_getRefValue ( PID_Handle  handle)
inlinestatic

Gets the reference value in the PID controller.

Parameters
[in]handleThe PID controller handle
Returns
The reference value in the PID controller

Definition at line 230 of file float/pid.h.

References _PID_Obj_::refValue.

static float_t PID_getUi ( PID_Handle  handle)
inlinestatic

Gets the integrator start value in the PID controller.

Parameters
[in]handleThe PID controller handle
Returns
The integrator start value for the PID controller

Definition at line 241 of file float/pid.h.

References _PID_Obj_::Ui.

Referenced by PID_run_parallel(), and PID_run_series().