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
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 Automatic Gain Control
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 1 / 5
Automatic Gain Control
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 2 / 5
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
Automatic Gain Control
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 4 / 5
Automatic Gain Control
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
Automatic Gain Control
◮ Don’t need to read garbage frames!
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 6 / 5
Automatic Gain Control
◮ 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
Automatic Gain Control
void take_pic(int mode ){ SI High; CLK High; SI Low; for(i=0 to 128){ CLK High; if (mode == 1)// Read camera[i] = read_adc (); CLK_Low; } if (mode == 0)// Delay delay(camera_delay ); else // Read adjust_camera_delay (); // How might you do this? } void pit_handler (){ /* Clock out garbage data & expose new image */ take_pic (0); /* Read new image and update exposure delay */ take_pic (1); }
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 8 / 5
Automatic Gain Control
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
Automatic Gain Control
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
Mechanical Tuning
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 11 / 5
Mechanical Tuning
◮ I’m not a mechanical engineer
◮ I’ve tuned exactly zero cars
◮ Information here from various Internet
◮ (it passes the “smell test”)
◮ If it sounds wrong, it might really be...
from knowyourmeme.com
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 12 / 5
Mechanical Tuning Motivation
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 13 / 5
Mechanical Tuning Motivation
◮ Reduce race time
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
Mechanical Tuning Motivation
◮ Reduce race time
◮ High acceleration - speed on straights ◮ Fast cornering - fast through turns ◮ High deceleration - slowing for turns
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
Mechanical Tuning Motivation
◮ Reduce race time
◮ High acceleration - speed on straights ◮ Fast cornering - fast through turns ◮ High deceleration - slowing for turns
◮ Maximize tire grip!
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
Mechanical Tuning Tires
◮ Tire grip is nonlinear with load ◮ Diminishing returns with more pressure
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 14 / 5
Mechanical Tuning Tires
◮ Tire grip is nonlinear with load ◮ Diminishing returns with more pressure
◮ Completely even ◮ Don’t trade a loss of larger amount of grip
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 14 / 5
Mechanical Tuning Suspension Tuning
◮ Positive if tilting outwards ◮ Negative if tilting inwards
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 15 / 5
Mechanical Tuning Suspension Tuning
◮ Positive if tilting outwards ◮ Negative if tilting inwards
◮ 0 degree, ideally
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 15 / 5
Mechanical Tuning Suspension Tuning
◮ Positive if tilting outwards ◮ Negative if tilting inwards
◮ 0 degree, ideally
◮ Increases camber angle during turns ◮ So slightly negative camber (1°-4°) to
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 15 / 5
Mechanical Tuning Suspension Tuning
◮ Positive if tilting outwards ◮ Negative if tilting inwards
◮ 0 degree, ideally
◮ Increases camber angle during turns ◮ So slightly negative camber (1°-4°) to
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 15 / 5
Mechanical Tuning Suspension Tuning
◮ Positive when steering axis line intersects
think shopping cart “caster” wheels
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 16 / 5
Mechanical Tuning Suspension Tuning
◮ Positive when steering axis line intersects
think shopping cart “caster” wheels ◮ Self-centering effect
◮ Contact patch “trails” steering axis
◮ 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
Mechanical Tuning Suspension Tuning
◮ Toe-in (positive): inwards towards front ◮ Toe-out (negative): outwards towards front
◮ Toe-in provides straight-line stability ◮ Toe-out provides better turn-in but
◮ Small changes produces noticable effect ◮ Recommended range (front): -3°-1°
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 17 / 5
Mechanical Tuning Suspension Tuning
◮ Toe-in (positive): inwards towards front ◮ Toe-out (negative): outwards towards front
◮ Toe-in provides straight-line stability ◮ Toe-out provides better turn-in but
◮ Small changes produces noticable effect ◮ Recommended range (front): -3°-1°
◮ Wheels rub against road - reduces tire life
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 17 / 5
Mechanical Tuning Weight Tuning
◮ Front wheels: steering ◮ Rear wheels: power
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 18 / 5
Mechanical Tuning Weight Tuning
◮ Front wheels: steering ◮ Rear wheels: power
◮ Towards front: more steering grip ◮ Towards back: more acceleration traction
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 18 / 5
Vehicle Dynamics
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 19 / 5
Vehicle Dynamics Weight Transfer
assume stiff suspension for simplicity analysis with springs much more involved
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 20 / 5
Vehicle Dynamics Weight Transfer
assume stiff suspension for simplicity analysis with springs much more involved ◮ Inward turning force from wheels ◮ Applies torque, rolling to outer side of turn ◮ Increases pressure on outer wheel ◮ Decreases pressure on inner wheel
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 20 / 5
Vehicle Dynamics Weight Transfer
assume stiff suspension for simplicity analysis with springs much more involved ◮ Inward turning force from wheels ◮ Applies torque, rolling to outer side of turn ◮ Increases pressure on outer wheel ◮ Decreases pressure on inner wheel
◮ Note lever effect of turning force ◮ Shorten lever to reduce torque
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 20 / 5
Vehicle Dynamics Weight Transfer
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 21 / 5
Vehicle Dynamics Weight Transfer
◮ Acceleration force produced at rear wheel ◮ Applies torque pitching up ◮ Increases traction on motor wheels ◮ Decreases grip on steering wheels
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 21 / 5
Vehicle Dynamics Weight Transfer
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 22 / 5
Vehicle Dynamics Weight Transfer
◮ Need to clear uneven surfaces
◮ Like the courtyard tile gaps ◮ Or the Freescale Cup hump
◮ Don’t drag your chassis
◮ you know who you are...
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 22 / 5
Vehicle Dynamics Steering
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 23 / 5
Vehicle Dynamics Steering
◮ Different turn radius for inner/outer wheels ◮ Ackermann steering: angular difference
◮ A result of the different lengths / angles of
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 23 / 5
Vehicle Dynamics Steering
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 24 / 5
Vehicle Dynamics Steering
◮ Understeer: turns less than intended ◮ Turning radius increased
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 24 / 5
Vehicle Dynamics Steering
◮ Understeer: turns less than intended ◮ Turning radius increased
◮ Oversteer: turns more than intended ◮ Turning radius decreased
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 24 / 5
Vehicle Dynamics Steering
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 25 / 5
Vehicle Dynamics Steering
◮ Straight-line acceleration ◮ Maximum cornering velocity ◮ Minimum cornering radius
◮ Try to benchmark and measure results ◮ Have a known-good configuration
◮ “The better is the enemy of the good”
◮ Sensor and control algorithms important
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 25 / 5
Summary
◮ Demo: adjusting suspension parameters ◮ Maximize grip to maximize acceleration to reduce track times ◮ Tune camber (slightly negative), caster (slightly positive), toe ◮ Lower center of gravity: minimize weight transfer ◮ Measure, measure, measure ◮ Many topics not covered: tires, springs, shocks, sprung roll
◮ Any topics people want to see?
Ducky (UCB EECS) Mechatronics Design Lab 15 & 16 Apr 2015 (Week 12) 26 / 5