ECE 192: NATCAR Team (Triton X) Sponsored by IEEE ( Vincent Bantigue, Joseph Formanes, Henry Kao, Puneet Khattar, Advisor: Dr. Clark Guest Week 7, 2/18/05
Agenda: Tasks Accomplished this week PID Control Theory IR Sensors Upcoming Tasks for next week
Tasks Accomplished this week: Acquired IR sensor parts In the process of building IR sensor circuit Continued creating MATLAB models of IR sensor system Continued microcontroller programming I/O Programming learned I/O Programming learned PWM Output learned PWM Output learned Studied PID (Proportional, Integral, Derivative) Control Theory
PID Control Theory: To control speed and steering using PID, an algorithm manipulates one control output to force a process value towards a reference point. Analogy: Cruise Control System Control Output is acceleration Control Output is acceleration Process Value is current speed Process Value is current speed Reference point is target speed Reference point is target speed Analogy courtesy of
PID (cont’d)- Proportional: e n = y n – r n e n is error, y n is process value, and r n is reference point (target). e n is error, y n is process value, and r n is reference point (target). All three components of PID are driven by the error, e n All three components of PID are driven by the error, e n uP n = K p * e n u n is control output, K p = proportionality constant u n is control output, K p = proportionality constant Problem: Need to know when u n = 0 (when e n = 0) Problem: Need to know when u n = 0 (when e n = 0)
PID (cont’d)- Integral: uI n = K i * Σ 0 n (e n * dt) Over time, the larger the summation gets, this component contributes more to the control output In the example of the cruise control, if the integral increases over time, the acceleration increases to get to the target speed faster In the example of the cruise control, if the integral increases over time, the acceleration increases to get to the target speed faster
PID (cont’d)- Derivative: uD n = K d * de n / dt The rate of the change of the error with respect to time. Effect: holds back PID system. Prevents oscillations by predicting future of error. Prevents oscillations by predicting future of error. When the error is approaching stability, derivative component is less. When the error is approaching stability, derivative component is less. Usually K d is small because its highly sensitive to noise
PID (cont’d): u n = K p * uP n + K i * uP i + K d * uP d The total control output is a sum of the proportional, integral and derivative components.
Row Sensor
Sensors: Rate of Change Response Create a history of past line center points (LCPs) Error (E): Distance from row’s center point Desire Decreasing Error over time If E n < E n-1, Decreasing Average Error: Check Over Previous k errors { int(En T { int(En T Where T is some threshold > k/2 s.t. the majority of the Error differences are decreasing over time Where T is some threshold > k/2 s.t. the majority of the Error differences are decreasing over time If Avg Error increase, Alter turn degree
Accurate Path Calculation Create a good model for the car Need the acceleration graph of the motor Need true velocity of the car (place optical sensors on motor shaft Need Arc Sensing ability (possibly with multirow arrays)
Upcoming Tasks for next week: Finish working prototype Assemble Motor Controller Assemble Motor Controller Finish assembling IR sensor array circuit Finish assembling IR sensor array circuit Assemble DC-DC converter Assemble DC-DC converter Complete basic Program Complete basic Program Begin testing