eecs 192 mechatronics design lab
play

EECS 192: Mechatronics Design Lab Discussion 12: AGC & - PowerPoint PPT Presentation

EECS 192: Mechatronics Design Lab Discussion 12: AGC & Mechanical Tuning GSI: Varun Tolani 15 & 16 Apr 2015 (Week 12) 1 Automatic Gain Control Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 1 / 5 Automatic


  1. EECS 192: Mechatronics Design Lab Discussion 12: AGC & Mechanical Tuning GSI: Varun Tolani 15 & 16 Apr 2015 (Week 12) 1 Automatic Gain Control Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 1 / 5

  2. Automatic Gain Control Automatic Gain Control Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 2 / 5

  3. Automatic Gain Control ◮ So the lighting on the 3rd floor is different than in the lab? ◮ Solutions ◮ External Lights (LED, flashlights, etc.) ◮ Robust line detection (derivatives, LPF, cross correlation- see discussion 8) ◮ Automatic Gain Control!! Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 3 / 5

  4. Automatic Gain Control TSL1401 Timing- No Automatic Gain Control Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 4 / 5

  5. Automatic Gain Control Pseudocode void take_pic (){ SI High; CLK High; SI Low; for(i=0 to 128){ CLK High; camera[i] = read_adc (); CLK_Low; } } ◮ Each call to take pic reads out the previous capacitor voltages ◮ There is currently no exposure control ◮ Next up → Let’s run take pic() on a PIT! Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 5 / 5

  6. Automatic Gain Control TSL1401 PIT Timing- AGC v1 ◮ Don’t need to read garbage frames! Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 6 / 5

  7. Automatic Gain Control TSL1401 PIT Timing- AGC v2 ◮ Don’t need to read garbage frames! ◮ Removing read adc speed’s up code execution significantly Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 7 / 5

  8. Automatic Gain Control Pseudocode void take_pic(int mode ){ void pit_handler (){ SI High; /* Clock out CLK High; garbage data SI Low; & expose new image */ for(i=0 to 128){ take_pic (0); CLK High; /* Read new image if (mode == 1) // Read and update exposure camera[i] = read_adc (); delay */ CLK_Low; take_pic (1); } } if (mode == 0) // Delay delay(camera_delay ); else // Read adjust_camera_delay (); // How might you do this? } Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 8 / 5

  9. Automatic Gain Control Code Structure v1 int main (){ take_pic (0); take_pic (1); find_line (); estimate_velocity (); calculate_new_controls (); telemetry.do_io (); } void pit_handler (){ apply_servo_control (); apply_motor_control (); } ◮ Pro- Interrupt executes very quickly- potentially easier to debug ◮ Con- Potentially updating servo/motor control on old sensor readings Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 9 / 5

  10. Automatic Gain Control Code Structure v2 int main (){ telemetry.do_io (); } void pit_handler (){ take_pic (0); take_pic (1); find_line (); estimate_velocity (); calculate_new_controls (); apply_servo_control (); apply_motor_control (); } ◮ Pro- Updating servo/motor control on newest sensor readings ◮ Con- Interrupt execution time must fit within interrupt period Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 10 / 5

  11. Mechanical Tuning Mechanical Tuning Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 11 / 5

  12. Mechanical Tuning Disclaimer ◮ I’m not a mechanical engineer ◮ I’ve tuned exactly zero cars ◮ Information here from various Internet sources, which hopefully is correct ◮ (it passes the “smell test”) ◮ If it sounds wrong, it might really be... not actually that bad from knowyourmeme.com Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 12 / 5

  13. Mechanical Tuning Motivation Goals What’s the ultimate goal here? Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 13 / 5

  14. Mechanical Tuning Motivation Goals What’s the ultimate goal here? ◮ Reduce race time How do we do that? what you want from Big Rigs: Over the Road Racing a game that you should never touch Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 13 / 5

  15. Mechanical Tuning Motivation Goals What’s the ultimate goal here? ◮ Reduce race time How do we do that? ◮ High acceleration - speed on straights ◮ Fast cornering - fast through turns ◮ High deceleration - slowing for turns Essentially maximizing acceleration. How? what you want from Big Rigs: Over the Road Racing a game that you should never touch Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 13 / 5

  16. Mechanical Tuning Motivation Goals What’s the ultimate goal here? ◮ Reduce race time How do we do that? ◮ High acceleration - speed on straights ◮ Fast cornering - fast through turns ◮ High deceleration - slowing for turns Essentially maximizing acceleration. How? ◮ Maximize tire grip! what you want from Big Rigs: Over the Road Racing a game that you should never touch Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 13 / 5

  17. Mechanical Tuning Tires Tire Grip Curves Tire Grip vs. Load Curve ◮ Tire grip is nonlinear with load ◮ Diminishing returns with more pressure So I have 4 tires - what’s the optimal distribution? tire grip curve Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 14 / 5

  18. Mechanical Tuning Tires Tire Grip Curves Tire Grip vs. Load Curve ◮ Tire grip is nonlinear with load ◮ Diminishing returns with more pressure So I have 4 tires - what’s the optimal distribution? ◮ Completely even ◮ Don’t trade a loss of larger amount of grip for a gain of smaller amount of grip tire grip curve Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 14 / 5

  19. Mechanical Tuning Suspension Tuning Camber Camber: angle between wheel and vertical (from front) ◮ Positive if tilting outwards ◮ Negative if tilting inwards positive camber What’s optimal to maximize contact area? negative camber Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 15 / 5

  20. Mechanical Tuning Suspension Tuning Camber Camber: angle between wheel and vertical (from front) ◮ Positive if tilting outwards ◮ Negative if tilting inwards What’s optimal to maximize contact area? ◮ 0 degree, ideally But need to account for turning chassis roll Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 15 / 5

  21. Mechanical Tuning Suspension Tuning Camber Camber: angle between wheel and vertical (from front) ◮ Positive if tilting outwards ◮ Negative if tilting inwards What’s optimal to maximize contact area? ◮ 0 degree, ideally But need to account for turning chassis roll ◮ Increases camber angle during turns ◮ So slightly negative camber (1 ° -4 ° ) to increase traction when cornering Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 15 / 5

  22. Mechanical Tuning Suspension Tuning Camber Camber: angle between wheel and vertical (from front) ◮ Positive if tilting outwards ◮ Negative if tilting inwards What’s optimal to maximize contact area? ◮ 0 degree, ideally But need to account for turning chassis roll ◮ Increases camber angle during turns ◮ So slightly negative camber (1 ° -4 ° ) to increase traction when cornering camber effects from turning Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 15 / 5

  23. Mechanical Tuning Suspension Tuning Caster Caster: angle between steering axis and vertical ◮ Positive when steering axis line intersects road ahead of contact patch caster What are the stability effects of positive caster? think shopping cart “caster” wheels Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 16 / 5

  24. Mechanical Tuning Suspension Tuning Caster Caster: angle between steering axis and vertical ◮ Positive when steering axis line intersects road ahead of contact patch caster What are the stability effects of positive caster? think shopping cart “caster” wheels ◮ Self-centering effect ◮ Contact patch “trails” steering axis self-centering effect ◮ Typically 3 ° -5 ° recommended ◮ Less may increase steering at stability cost ◮ Overall effect is fairly small Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 16 / 5

  25. Mechanical Tuning Suspension Tuning Toe Toe: angle between wheels, viewed from top ◮ Toe-in (positive): inwards towards front ◮ Toe-out (negative): outwards towards front Effects of toe: ◮ Toe-in provides straight-line stability toe-in ◮ Toe-out provides better turn-in but amplifies disturbances ◮ Small changes produces noticable effect ◮ Recommended range (front): -3 ° -1 ° Why might toe be bad? toe-out Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 17 / 5

  26. Mechanical Tuning Suspension Tuning Toe Toe: angle between wheels, viewed from top ◮ Toe-in (positive): inwards towards front ◮ Toe-out (negative): outwards towards front Effects of toe: ◮ Toe-in provides straight-line stability toe-in ◮ Toe-out provides better turn-in but amplifies disturbances ◮ Small changes produces noticable effect ◮ Recommended range (front): -3 ° -1 ° Why might toe be bad? ◮ Wheels rub against road - reduces tire life toe-out Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 17 / 5

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend