Intro to PID control manual

because of all the questions people have been putting here about PID loops I wanted to make a guide, that explained in much more detail than I could in my little video, and gave everyone the info they needed to make a PID control regardless of programing language (easyC or robotC)

I wanted to open it up here for community critique and feed back, please let me know if you see any mistakes, or if you have advice on how to make it more clear or easy to understand

1 Like

Thats a really nice manual :slight_smile: Good Job! love the images and very visual approach.

A few suggestions, heres a really nice image that shows how the tuning of a PID loop affects how it works:

You might also consider including images that shows the ‘cycle’ of PID. Something like this (although probably not this, its just the first example I could find).

I also think you should add some real sample code, even if its just from your video, having some real code to look at can be a real help to people who are reading it. In fact, you should also link your video :stuck_out_tongue:

Finally when you are finished editing it, i think you should export this to a format when you can have nice looking code boxes and stuff. Because at the moment your pseudocode looks a little out of place.

@Jij wrote a PID guide back in 2012. Maybe take a look at that to see what to improve on. No point in re-inventing the wheel :stuck_out_tongue:

I took most of your advice evolvingJon, The updates can be seen now, I am thinking of exporting to PDF format so every one can see it

Nallen01 - I read the guide, it seems like a more surface view of what I have, shorter, and more accessible. one thing I noticed was he included tables of values, do you guys think it would be beneficial to include this in my guide

Well done, it’s clear you’ve put a lot of time and effort into this. The real test of how helpful it is will come when someone uses it in order to try to learn PID, but it does seem quite extensive and practical compared to other guides. I would just recommend you edit it for grammar. I’d be willing to help you edit it if you want (PM me if you’re interested).

Great that you are moving forward with learning this stuff.

As we discussed in this thread:

It is a very bad idea to do this:

The Power = Power + P + I + D is incorrect, because what you get is:

Power = II + I + P + C, with no D, so you may adjust your Kd term thinking that your are adjusting the D and you are actually adjusting the P. Same for P, it is now I. Same for I, it is now II (integral of the integral).

It is easier to see if you know calculus. for:
Power += PID
you are integrating the PID output. So just take the integral of the original PID equation and see what you get. I showed it in the above thread as algebraic to make it easier to follow in piecewise steps, but it is the same result.

A regular PID will work fine for a lift as PID, since I will hold the 0 error power.

You may want to include the terms over damped, underdamped and critically damped. This will tie in well with the PID tuning.