Notifications
Clear all

PID Controller  

  RSS

MSimmons
(@msimmons)
Active Member
Joined: 3 weeks ago
Posts: 14
2020-11-17 10:42 pm  

I've seen many YouTubers using PID algorithms in their projects that require precise control of DC motors. PID seem to be commonplace in quadcopters and, in the model railroad hobby, all DCC locomotive decoders use PID to obtain smooth performance from the small motors. I have experimented, unsuccessfully, with PID in my own linear actuator project. I've watch many online tutorials on PID, and have studied the PID libraries that are in the Arduino IDE library manager. But my understanding of PID is still foggy. I would think Bill's teaching style could help my understanding and probably benefit many others needing precise motor control.


Anibal liked
Quote
Foxy
 Foxy
(@foxy)
Eminent Member
Joined: 4 weeks ago
Posts: 23
2020-11-18 2:36 pm  

P I D  mean proportional, integral, and differential.  The idea is popular because the concept appears to be intuitively simple but when you try to use it you quickly find that the simplicity is very deceptive.  It appears that you simply find the 3 constants, Kp, Ki, and Kd by experiment, and they magically add up to a good controller. However, when you get into the mathematics you find that they are not independent at all but interact with each other so with 3 of them you end up going in perpetual circles.  For the layman this is very discouraging and can quickly lead to giving up in frustration.

I've contemplated doing a writeup on regulator design and offering it to Bill for publication or not as he sees fit.  But the problem is that this is almost impossible without resorting to laplace transforms and I doubt that most people here are familiar with them.  Does anyone have an opinion on this?  


ReplyQuote
sj_h1
(@sj_h1)
Eminent Member
Joined: 2 months ago
Posts: 27
2020-11-18 3:06 pm  

Sounds good to me

 


ReplyQuote
Anibal
(@anibal)
Eminent Member
Joined: 12 months ago
Posts: 45
2020-11-18 6:46 pm  

@foxy

I think M Simmons suggestion to treat PID in somewhat detail while presenting a project would be most welcome. I am anticipating use of PID in one of my projects and I need to learn about how to use it to control motors and I imagine (hope) servos. Paul McWhoter has a video or two on the subject. See TopTechBoy.com.

Best,

Anibal
stay safe 


ReplyQuote
Foxy
 Foxy
(@foxy)
Eminent Member
Joined: 4 weeks ago
Posts: 23
2020-11-19 9:08 pm  

@anibal

PID seems to be the sexy term but I'm not very enthralled by it.  I grew up using loop gain or crossover of the bode diagram and a lead or two in the control algorithm to compensate for lags in the controlled system, which again show up on the bode diagram--and if you get it right it's surprising how well they work, particularly when you have a system which must be decently controlled the first time you turn it on. 

Just my thoughts.


ReplyQuote
Anibal
(@anibal)
Eminent Member
Joined: 12 months ago
Posts: 45
2020-11-19 9:47 pm  
  • @foxy

  • Thank you Foxy, until now, about a year ago I haven’t heard of PID and that was while listening to Paul McWhoter perhaps while talking about wheels and the motors that turn them. In that video I get the impression one needs to be careful about code like any code but more so when using PID. My own need is turning a lazy Susan arrangement and accuracy/ target is vital. PID I will approach with mathematical accuracy just like the rest of my project demands. After all isn’t that the function of PID?

Thank you for your feedback.

 

best,

Anibal


ReplyQuote
frogandtoad
(@frogandtoad)
Honorable Member
Joined: 1 year ago
Posts: 540
2020-11-21 8:44 am  

@anibal

I agree with @foxy.

I have no real world experience with PID, but I have studied it for a while, and from what I see, too many people think that's what they need, and have absolutely no idea what it is or how it works, but they just know they need it, because some, website said so! 🙂

PID involves a lot of tuning that is rarely spoken about, and you need the tools to properly test the results rather than just relying on, hey it looks good, or it seems to work OK type opinions.  Would that approach be acceptable for a rocket launch into space? I think not!  What about a landing mission on another planet? I think not!  When absolute accuracy is required, you need to tune and test, again and again, and there is no way around that.

How accurate do you want your robot to be?
If not so much as accurate as what I have described, then why do you need PID at all?

These are the real questions people need to ask themselves... do I need it for my requirements, and if so why?  Is there another way to satisfy my requirements?

Cheers.


ReplyQuote
Anibal
(@anibal)
Eminent Member
Joined: 12 months ago
Posts: 45
2020-11-21 2:12 pm  

@frogandtoad

Thank you frogsndtoad for the benefit of your experience. Indeed the consideration if I need it or not is the first thing I think about. It’s important I don’t waste my time but if I need it I use it. I know circuits and code need tweaking at time and if you (I) need to think like an engineer or technician that what it needs.

Again thank you foxy and frogandtoad for your guidance and thoughts on this topic. You guys have been very helpful .

Best

Anibal 


ReplyQuote