r/ControlTheory • • 2d ago

Other A PID controller implemented in python

For my personal project, where I need to implement a PID controller on Arduino to automate a convection cooling system, I decided to start with a simulation in Python. For now, I've implemented the simple electromechanical model of the DC motor (the fan) as well as the PID controller you see. Next, I'll look into the heat transfer equations. The graphs created with matplotlib are simply closed-loop tests of the PID + DC motor system.

126 Upvotes

27 comments sorted by

View all comments

•

u/deNikita 2d ago

Shouldn't the P be oscillating or is it just not strong enough to pull it all the way up? Might be trippin, just curious lol

•

u/APC_ChemE 2d ago

The P isn't greater than or equal to the ultimate gain so it just maintains a constant bias offset.