# Control Laws

## Alias: PID based control equations

This paper will present an introduction to the "science" of writing control equations for robots.  While doing so professionally is indeed a science with a lot of complex mathematics, there is a lot you can do based on intuition and some good hacking.  I'm going to try to give you an understanding of what goes into such equations and a bit of a feel as to how they work, how to design them for your application, and how to modify them to make them work better.  In particular, a simulation of steering equations is provided where you can experiment with the P,I and D gains and see the resulting performance.

The control equations I'm going to describe are suited for real-time control of various basic robot functions; for example, speed control and steering of wheeled robots.  We'll use speed control, steering and navigation as examples in this paper, but the concepts can be applied to any other motion based control; like controlling an arm and/or hand.

Most such equations are based on the three PID equations.  PID is an acronym standing for Proportional, Integral and Derivative.  These are three basic terms which may be used individually or together to generate control command outputs.  In some simple applications, these three terms alone may be adequate to build a control system.  But in "the real world", additional computation terms and logic is often necessary to get good performance.

Outline:

[Only the items marked as links are completed so far.  But, if I wait until it is all done, I'll probably never publish]

First, some definitions and background:
Control System overview
Small Angle Approximations
Description of Example robots

Now, into the real stuff:
PID equations
Proportional
Derivative
Proportional/Derivative
Integral
Proportional/Integral/Derivative
PID training simulator
Designing a system
What are the sensor inputs, the target references and the control outputs?
Determining which PID terms are appropriate
What can go wrong?
What limits, filters and other logic may be needed?
Signal calibration
Sample designs
Single motor speed control
Two motor speed control
Steering a front wheel steering robot
Steering a two wheel differential steering robot