Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   General Forum (http://www.chiefdelphi.com/forums/forumdisplay.php?f=16)
-   -   2015 Lessons Learned: The Negative (http://www.chiefdelphi.com/forums/showthread.php?t=136938)

Monochron 12-05-2015 09:03

Re: 2015 Lessons Learned: The Negative
 
Quote:

Originally Posted by jtrv (Post 1481643)
When kids aren't taught Calculus until junior (2 years ahead of schedule) or senior year (1 year ahead), it's kinda difficult to introduce advanced control systems in addition to learning the ins and outs of coding a robot. Coding a robot is far different than your standard software programming, which is what we are taught in our CS classes offered here.

Even so, using the PID classes in WPI lib is relatively simple and made much more so by the plethora of tutorials found online. It is a much better approach to understand the control systems math going on in the library implementation, but that is wholly unnecessary to create a function PID loop.

In college you can likely expect to have to create the internals of the PID classes used in WPIlib (by which I mean programatically [or in some form of hardware] creating the feedback loop and designing the plant) necessitating full understanding of the system. WPILib makes it so that all you have to do for a basic loop is to just tweak k, i, and d values.

jtrv 12-05-2015 16:25

Re: 2015 Lessons Learned: The Negative
 
Quote:

Originally Posted by Monochron (Post 1481649)
Even so, using the PID classes in WPI lib is relatively simple and made much more so by the plethora of tutorials found online. It is a much better approach to understand the control systems math going on in the library implementation, but that is wholly unnecessary to create a function PID loop.

In college you can likely expect to have to create the internals of the PID classes used in WPIlib (by which I mean programatically [or in some form of hardware] creating the feedback loop and designing the plant) necessitating full understanding of the system. WPILib makes it so that all you have to do for a basic loop is to just tweak k, i, and d values.

And that's true. As for me personally, when I first started programming the bot, neither I nor the lead programmer at the time even knew about the built in PID libraries. So we tried making them by hand.

A year later, when a programming mentor joined, we hand wrote them, and never used WPI at all. And suddenly something clicked and I realized how simple it was. Just error, change in current value since last iteration, and a Riemann sum for the current and last value vs time. Plus the constants that you have to adjust.

Maybe we just didn't look in the obvious places, but even adjusting the three constants is relatively time consuming and frustrating if you don't know which value you should be adjusting for which behavior - because in reality, they aren't completely independent of each other.


All times are GMT -5. The time now is 05:10.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi