210 likes | 375 Views
Roberto - Balancing Robot. RIT Computer Engineering Senior Design Project. Group Members. Jeff Mahmood Paul Krausman Dave Froman. Project Description. Two-wheel balancing robot Balances on any angled surface Remains balances indefinitely Remote controlled “Inverted Pendulum”
E N D
Roberto - Balancing Robot RIT Computer Engineering Senior Design Project
Group Members • Jeff Mahmood • Paul Krausman • Dave Froman
Project Description • Two-wheel balancing robot • Balances on any angled surface • Remains balances indefinitely • Remote controlled • “Inverted Pendulum” • PID Controller
PID Algorithm • Means to control some output from a combination of different factors • Differential equations solved in the frequency domain • We will solve experimentally
PID Algorithm (cont.) • PID is “Proportional Integral Derivative” • Output based on the aggravate of 3 factors • Error • Error Derivative • Error Integral • PID algorithm combines these 3 factors to determine appropriate output
Error Definition • Error: Difference between set point and actual • Error can be positive or negative Set Point Error Actual
PID Equation • Proportional Integral Derivative • Output = P*Θ + I*Θ + D*Θ’ • P is the Proportional constant • Current error • I is Integral constant • Sum of past errors • D is Derivative constant • Rate of change of error
Proportional • Torque applied to motors is proportional to amount of error 0° 40° Θ
Integral • Sum of all errors over time • Biases output so all errors cancel over time
Derivative • Torque applied to motors proportional to derivative of error • Velocity of error 0° 300°/sec
Tuning PID Controllers • Goal: • Find coefficients for P, I, and D terms • Robot should “snap” back to set point after any disturbances • Prevent any oscillations • Robot should remain at set point indefinitely
Finding P Term • Set I and D terms to 0 • Set P term to 1 • Increase P term until strong oscillations occur • Some references recommend setting P to 60% of this value
Finding D Term • Slowly increase D until oscillations begin to slow • Fine-tune D • Robot will oscillate if D is too high • Robot will fall over is D is too low • Robot should “snap” back to set point after any disturbances
Finding I Term • More difficult than P and D • Generally inverse of D • Limit sum to prevent saturation • Sliding window
Increase Performance • Robot may seem sluggish • If either P or D is set too low, robot will be slow to respond • Robot may oscillate • If either P or D is set too high, robot will oscillate before settling on set point • Tweak P and D terms until optimal performance is achieved
Sensors • Accelerometer • Measures tilt (proportional error) • Slow response, but accurate • Gives sense of “up” • Gyro • Measures velocity (derivative error) • Fast response, but inaccurate • Suffers from drift over time
User Interface - Remote Control • Two axis control – left and right motors • 2 commands for each side – move forward, back • Uses 4 bit encoding/decoding(8 values used) • Each switch press has unique encode value, which is transmitted and received
Remote Control • Momentary rocker switches are used for intuitive remote controlled car feel • Robot moves by pressing both switches in the same direction, turns by alternating directions
The End • Questions???