110 likes | 261 Views
Kevin Watson and Rich Petras. Robot Sensors. Overview. Sensors Micro Switch Gyro Encoders Command Sequencing PID Control. MicroSwitch. Digital input Be sure to set as an input in User_Initialization(). Encoders. Kinds Mechanical Optical Types of output Resolution. Gyros.
E N D
Kevin Watson and Rich Petras Robot Sensors
Overview • Sensors • Micro Switch • Gyro • Encoders • Command Sequencing • PID Control
MicroSwitch • Digital input • Be sure to set as an input in User_Initialization()
Encoders • Kinds • Mechanical • Optical • Types of output • Resolution
Gyros • Types • Mechanical • Ring Laser • MEMS • Using • Bias • Drift • Integration
Command Sequencing • Why do we want to do this? • How does it work? • Robot example....
What is PID Control ? • PID control can be used any time you have a variable that you want to control and a way of measuring that variable.
P I D • P - Proportional - The amount of control is based on (proportional to) the error between where we want to be and where we are. • I - Integral - The amount of control is based on the total error over time - the summation or integral • D - Differential - The amount of control is based on how fast the error is changing - the difference.
What are Gains ? • The gains tell you how important each of the PID terms are. • Kp - Proportional Gain - Determines how fast your system reacts to error • Ki - Integral Gain - Determines how hard your system will push to overcome error. • Kd - Differential Gain - Limits the change in response to error. Helps to dampen or smooth the reactions.
How do I Tune my System ? • Start by setting the gains low. You can set Ki and Kd to zero to start. • Increase Kp until the system starts to react quickly enough. It will overshoot if you set it too high. • Now increase Kd to compensate for overshoot. Now the system should react smoothly.
How do I Tune my System ? • But you might notice that it never reaches the goal. That is because resistance in the system is holding it back and as you near the goal, the proportional term gets smaller. • Now it is time to increase Ki. Over time the error will build and the I term allows the system to overcome resistance. • Now go back and adjust each of the terms to get the response you want.