Skip to Content
Learn Robotics Programming
book

Learn Robotics Programming

by Danny Staple
November 2018
Beginner
472 pages
13h 5m
English
Packt Publishing
Content preview from Learn Robotics Programming

Tuning the PID controller settings

I start with a proportional constant of 0.1, and raise it, using Nano to make quick edits on the PI, until the robot starts to overshoot—that is, it goes past its target, then returns far back—then I halve this proportional constant value.

It may then have a constant error, so I then start raising the integral constant by about 0.01 until that is smoothed. It is a slow process: start by getting the object close to dead center and by tuning speed_pid until it's pretty good, then come back for direction_pid.

Do not try to tweak all the values at once—rather, change one thing and retry.

For a deeper look at this, see Tuning A PID Controller in the Further Reading section.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learn Robotics Programming - Second Edition

Learn Robotics Programming - Second Edition

Danny Staple

Publisher Resources

ISBN: 9781789340747Supplemental Content