Skip to content

mick001/PID-Controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PID controller

A basic Python and C++ implementation of a simple PID controller.

The class implements a PID controller, however, should you decide to use either a PI or PD controller just set the Kd or Ki parameter, respectively, to zero.

Implemented methods (Python implementation):

  • output: returns the calculated PID output given a measurement of the y signal.
  • antiWindUp: applies anti-wind up to the PID integral block. Maximum thresholds can be set when initializing the controller.
  • transferFunction: returns a transfer function for further block integration or frequency domain analysis.

The C++ implementation does not provide the transferFunction method.

Examples

Check the file controllerPID_test.py for a simple test.

PID control set point and noise rejection plot

figure_3

Frequency response plot of a real PID (not an ideal one)

image2

License

See the LICENSE file for license rights and limitations (GPL 3.0).

About

PID controller implementation

Resources

License

Stars

13 stars

Watchers

4 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors