PIDController Class Reference

#include <pidcontroller.h>

List of all members.

Public Member Functions

 PIDController (std::string name, float Kp, float Ki, float Kd, float period, float outputlowerlimit, float outputupperlimit)
 ~PIDController ()
float doControl (float input)
void setTarget (float target)
void clearState ()

Constructor & Destructor Documentation

PIDController::PIDController ( std::string  mname,
float  mKp,
float  mKi,
float  mKd,
float  mperiod,
float  moutputlowerlimit,
float  moutputupperlimit 
)

PID Controller:

Author:
Jason Kulk

NUbots (c) 2008 All Rights Reserved

Create a generic PID Controller

Parameters:
mname the name of the PID controller (this is used to idenitify it)
mKp the proportional gain
mKi the integra gain
mKd the derivative gain
mperiod the control loop period
moutputlowerlimit the actuator lower limit
moutputupperlimit the actuator upper limit
PIDController::~PIDController (  ) 

Destroys the PID controller


Member Function Documentation

void PIDController::clearState (  ) 

Clear the controller's state.

This will reset the integral and derivative terms, as well as reset any historical values. Use this just prior to turning the motor back on, or when turning the motor off

float PIDController::doControl ( float  input  ) 

The controller function; call this inside the control loop.

Parameters:
input the measured value
Returns:
the calculated control output
void PIDController::setTarget ( float  mtarget  ) 

Set the controller's set point

Parameters:
mtarget the target current (A)

The documentation for this class was generated from the following files:

Generated on Fri Oct 9 13:42:12 2009 for naowalkoptimiser by  doxygen 1.6.1