This journey covers the very basics of PID control. The goal is to give you an intuitive understanding of the controller, how to implement it in code, and how to tune it. Plus, if you're up for the challenge, at the end of the journey you can test one out on hardware. It is broken up into several sections:
- Introduce the basic concepts - an overview of the PID control with minimal mathematics
- Write your own controller - give it a shot!
- Tuning introduction - different ways to approach tuning (model-based and heuristics)
- Additional topics - Cascade control and discrete PID
- Try it yourself - build a PID controller on hardware and test it out
Introduce the basic concepts - I think it's helpful to get a good intuitive sense of what a PID controller is trying to accomplish before we jump into any of the mathematics. In this video, the thing you should take away is understanding why the three terms of a PID controller are suitable for so many types of control problems. Once you can think of P as 'responding to current error', I as 'responding to the past error', and I as 'responding to future error', I think it'll be easier to set up, tune, and test your controller.
Chances are you’ve interacted with something that uses a form of this control law, even if you weren’t aware of it. That’s why it is worth learning a bit more about what this control law is...See More
Write your own controller - These articles by Brett Beauregard are a must read! This will get you beyond thinking of PID control as just a simple 3-term function and get you thinking about the practical implementation of the controller. This is important to understand for when we are writing our own controller from scratch later in this journey.
Tuning introduction - This video doesn't go into any particular tuning method for PID, but it does provide an overview of different approaches you can take. I think it'll help make sense of all of the different PID tuning resources you'll come across later.
It can be difficult to navigate all the resources that promise to explain the secrets of PID tuning. Some proclaim that PID tuning is an art that requires finesse and experience, while...See More
Tuning introduction - This video is focused on building a mathematical model of your system. I'm putting it in the 'tuning introduction' section because going forward we're going to lean heavily on model-based techniques for PID controller design and you need a good model of your system in order to use them!
Tuning a PID controller requires that you have a representation of the system you’re trying to control. This could be the physical hardware or a mathematical representation of that hardware...See More
Tuning introduction - Now that we understand what goes into building a model of your system, this video covers some of the ways to use that model to tune a PID controller.
The previous video showed three different approaches to developing a mathematical model of your physical system. Now that we have this model, we can use it to tune a PID controller that will...See More
Additional topics - Most PID controllers are implemented on a digital computer, which means we're not dealing with a continuous system but a discrete system. This video introduces discrete PID control (and as a bonus it also talks about cascaded control loops, win-win!)
Now that you ’ve gotten an overview of PID tuning techniques, this video moves on to discussing two important concepts in PID control: cascaded loops and discrete systems. Both concepts are...See More
Additional topics - If watching videos on PID control is not for you, this resource covers some of the above information with easy-to-understand text.
Try it yourself - I think the best way to learn PID control is to try it out yourself! The Temperature Control Lab is a nice kit that contains an Arduino, a couple of temp sensors, and a couple of heaters. This lab is easy to use and there are tons of great resources for it on John Hedengren's website. The next resource in this journey follows along with one of his PID controller design examples.
Try it yourself - Once you have the Temperature Control Lab, check out this PID controller example. And while you're on the site, definitely check out all of the other resources that use the TCL.