Freescale Cup Competition. Abdulahi Abu Amber Baruffa Mike Diep Xinya Zhao. Author: Amber Baruffa

Similar documents
Deriving Consistency from LEGOs

UNIVERSITÉ DE MONCTON FACULTÉ D INGÉNIERIE. Moncton, NB, Canada PROJECT BREAKPOINT 2015 IGVC DESIGN REPORT UNIVERSITÉ DE MONCTON ENGINEERING FACULTY

Project Report Cover Page

SP4 DOCUMENTATION. 1. SP4 Reference manual SP4 console.

Setup and Programming Manual

Quick Guide. Unipro Laptimer Version Go faster faster. UNIPRO ApS

The seal of the century web tension control

ROBOT C CHALLENGE DESIGN DOCUMENT TEAM NAME. Sample Design Document. Bolt EVA. Lightning. RoboGirls. Cloud9. Femmebots

WHITE PAPER Autonomous Driving A Bird s Eye View

Roehrig Engineering, Inc.

SAE Baja - Drivetrain

DCCDPro. Aftermarket standalone Automatic DCCD Controller for JDM and USDM 6-Speed Transmissions as well as for the older 5-Speed DCCD transmissions.

SHOCK DYNAMOMETER: WHERE THE GRAPHS COME FROM

Greenpower Challenge. Student support sheet

Controller Ground (dual black 12awg) should be connected to chassis ground as close as possible to the battery.

CHASSIS DYNAMICS TABLE OF CONTENTS A. DRIVER / CREW CHIEF COMMUNICATION I. CREW CHIEF COMMUNICATION RESPONSIBILITIES

MIPRover: A Two-Wheeled Dynamically Balancing Mobile Inverted Pendulum Robot

Application Note. Case study Early fault detection of unique pump bearing faults at a major US refinery

Eurathlon Scenario Application Paper (SAP) Review Sheet

How Regenerative Braking Works

GCAT. University of Michigan-Dearborn

StepSERVO Tuning Guide

Introduction to hmtechnology

Page 2. The go-kart always had the same mass and used the same motor.

CPW Current Programmed Winder for the 890. Application Handbook. Copyright 2005 by Parker SSD Drives, Inc.

MiR Hook. Technical Documentation

PROJECT IDEA SUBMISSION

[0. Title] Biased Weight Alignment Procedure for Bent Axle Alignment by Stan Pope, 4 August 2013

Mash Tun / RIMS Tube Controller

Test Plans & Test Results

Flying Fox DARPA Grand Challenge. Report to Sponsors. May 5, 2005

2015 AUVSI UAS Competition Journal Paper

Using cloud to develop and deploy advanced fault management strategies

BOBSLED RACERS. DESIGN CHALLENGE Build a miniature bobsled that can win a race down a slope.

RR Concepts. The StationMaster can control DC trains or DCC equipped trains set to linear mode.

DELHI TECHNOLOGICAL UNIVERSITY TEAM RIPPLE Design Report

EXTREME TESTIMONIALS. Bakery Category

Inverter control of low speed Linear Induction Motors

Festival Nacional de Robótica - Portuguese Robotics Open. Rules for Autonomous Driving. Sociedade Portuguesa de Robótica

2016 IGVC Design Report Submitted: May 13, 2016

Super Squadron technical paper for. International Aerial Robotics Competition Team Reconnaissance. C. Aasish (M.

The RCS-6V kit. Page of Contents. 1. This Book 1.1. Warning & safety What can I do with the RCS-kit? Tips 3

Autonomously Controlled Front Loader Senior Project Proposal

Subaru BRZ Toyota GT86 Scion FR-S

Arms Race Prosthetic Arm Engineering Challenge: FINAL REPORT

Renewable Energy Endurance Marathon

Servo Creel Development

Electromechanical Steering with Parallel-axis Drive

20th. SOLUTIONS for FLUID MOVEMENT, MEASUREMENT & CONTAINMENT. Do You Need a Booster Pump? Is Repeatability or Accuracy More Important?

index Page numbers shown in italic indicate figures. Numbers & Symbols

Attitude Control. Actuators and Attitude Control

ilcas: Intelligent Lane Changing Advisory System using Connected Vehicle Technology

INSTRUCTIONS FOR TRI-METRIC BATTERY MONITOR May 8, 1996

Functional Algorithm for Automated Pedestrian Collision Avoidance System

Warning! Before continuing further, please ensure that you have NOT mounted the propellers on the MultiRotor.

CS 440RC. Solid De-icer Controller Closed-Loop Gate Control

Autonomous Quadrotor for the 2014 International Aerial Robotics Competition

Hydraulics for high-quality deep-drawn parts

Conoco Phillips Ferndale Condition Monitoring Success

Fuel Strategy (Exponential Decay)

Getting to Know: Matthew Tongue, Norbar Torque Tools Ltd

Introduction: Problem statement

Technical Robustness and Quality

EECS 461 Final Project: Adaptive Cruise Control

Freescale Race Challenge 2009 Students Competition

RED RAVEN, THE LINKED-BOGIE PROTOTYPE. Ara Mekhtarian, Joseph Horvath, C.T. Lin. Department of Mechanical Engineering,

Motor Tuning Instructions

Laboratory Exercise 12 THERMAL EFFICIENCY

There are changes to the fuel system leak detection and threshold resetting procedure.

Deep Learning Will Make Truly Self-Driving Cars a Reality

Design of the Target Injection and Tracking Experimental System

Understanding the benefits of using a digital valve controller. Mark Buzzell Business Manager, Metso Flow Control

MAGPOWR Spyder-Plus-S1 Tension Control

Index. sequencing, 21, 26 starting off, 22 using, 28 code sequence, 28 custom pallete, 28

1. An inverter can be programmed to stop an AC motor quickly by enabling

Miscellaneous Measuring Devices

ABB Ability Performance Optimization for power generation

Permanent Multipath Clamp-On Transit Time Flow Meter

Quick Guide. Unipro Laptimer Version September Go faster faster. UNIPRO ApS

Unit WorkBook 2 Level 4 ENG U16 Instrumentation and Control Systems 2018 UniCourse Ltd. All Rights Reserved. Sample

Application Note Original Instructions Development of Gas Fuel Control Systems for Dry Low NOx (DLN) Aero-Derivative Gas Turbines

Smart Grid Automation and Centralized FISR

Department of Electrical and Computer Science

Tech Tip: Trackside Tire Data

Adult Sized Humanoid Robot: Archie

Electric Motors and Drives

GPS Robot Navigation Bi-Weekly Report 2/07/04-2/21/04. Chris Foley Kris Horn Richard Neil Pittman Michael Willis

Module 9. DC Machines. Version 2 EE IIT, Kharagpur

RaceROM Features Subaru FA20 DIT

BIG BAR SOFT SPRING SET UP SECRETS

Tuning the System. I. Introduction to Tuning II. Understanding System Response III. Control Scheme Theory IV. BCU Settings and Parameter Ranges

FLL Workshop 1 Beginning FLL Programming. Patrick R. Michaud University of Texas at Dallas September 8, 2016

Chapter 9 Motion Exam Question Pack

MANOEUVERS. You will be asked by the DSA examiner to carry out one of the following manoeuvres during your test:

Lab 9: Faraday s and Ampere s Laws

Amazing127_RobotCDesignDoc

BigStuff3 - GEN3. 1st Gear Spark Retard with Spark Retard Traction Control System (SR 2 ) Rev

ELITE 625 With Dial Display Control

Pre-lab Questions: Please review chapters 19 and 20 of your textbook

CT6 SUPER CRUISE Convenience & Personalization Guide. cadillac.com

Transcription:

Freescale Cup Competition The Freescale Cup is a global competition where student teams build, program, and race a model car around a track for speed. Abdulahi Abu Amber Baruffa Mike Diep Xinya Zhao The car must be able to continue to follow the track if it crosses at a 90º angle or curves tightly, using the sensors to follow the line and the camera to detect turns and adjust speed. Author: Amber Baruffa 1/9/2013

Freescale Cup Competition 1 Table of Contents Overview... 2 Risk Specification... 2 Risk Investigation... 2 Risk Mitigation Design... 3 Parts List... 6 Testing Strategy... 7 Uncertainties... 8 Appendicies... 9

Freescale Cup Competition 2 I. Overview The racecar will encounter different obstacles while traversing the racetrack. One of the more challenging aspects involves the car s ability to navigate turns. The camera attached to the top of car must detect the turn coming up in advance. Then an algorithm is used to adjust the speed of the car accordingly to avoid derailment. A PID controller is used to keep the car following the track at all times. While the car is going around a tight curve or going into a loop by crossing the track at a 90º angle, the sensor array on the bottom of the car must be able to continue to follow the track and not be thrown off by the black lines in close proximity. II. Risk Specification Needs: 1. The car must use hardware and software to propel and steer the car 2. The car must use software to detect the track and stay on the track 3. The car must follow all hardware specifications Engineering Requirement Need(s) Justification The car must detect changes in the track and turn using sensors 2 Competition Rules The car needs to be able The top camera will look ahead to detect future turns and to stay on the track 1 determine speed during turns by not going too fast Cannot have more than 16 sensors 3 Competition Rules III. Risk Investigation The reflective eight sensor array was chosen for the sensor to be mounted on the front of the car. A sensor array was chosen over a single sensor for increased accuracy while reading the line that serves as the track. The sensor in particular that was chosen was the QTR-8RC. It is specifically good for line reading and each sensor gives a separate output. It also has eight sensors so it good for accurately reading the line, while only using half of the maximum sensors so more can be added later if design changes need to be made. The three axis accelerometer was chosen to be able to determine the acceleration of the car as it goes around the track. This is important in being able to speed up and slow down the car to the right speeds in the case of turns, ramps, or tunnels. This particular model was chosen because of the ability to get the part for free, but it also has low power consumption which is good for the project as there is only one battery to power all the on board electronics.

Freescale Cup Competition 3 The line reading camera was provided by Freescale for the competition. The servo that will be holding the camera and allowing it to move left and right to view upcoming turns was chosen to be GWS Servo S03T STD. It has high torque and allows for the camera to move 90º. It was determined that a PID controller was the best way to control the steering of the car around the track. No one in the group has pervious control system experience and since a PID controller is the most common controller, there is a lot of information on how to write the code for a controller. A PID controller will keep the car centered on the track and adjust the wheels when needed. At first the camera was going to be used to read the line directly in front of a car and sensors would be used to pick up turns coming up on the track. After some research, it was realized that the sensors could only pick up line that were very close to the sensor (about.125 ). Therefore, the sensors had to be mounted low on the car and would have to be used for the close line reading. It was then decided that the camera would be placed above the car and mounted on a servo to pick up the upcoming track. Before a control system was chosen, there was an idea to go through the track at one slow speed while reading the line and remembering the track. Then the second time through the camera would be shut off and the car would go quickly through the track knowing where all the obstacles are. This was the plan because the car has two laps around the track and the fastest lap is counted as the team s time. After some research, it was determined that this was not a good plan because it was too complicated for the short amount of time allotted for this project and the power consumption could be too high. IV. Risk Mitigation Design A PID controller will be used to control the steering of the car as it navigates the track. The line reading camera will be mounted on a servo and reside above the car to pick up turns on the track in advance. An algorithm will then slow down the car based off of the distance and angle of the turn. Once the turn is completed and the camera picks up a straight track, the system will speed up the car and turn the wheels straight. The sensor array will take over for staying centered on the current track. It is also responsible for staying on the correct path in the case of the track crossing at a right angle. In the case of wavy lines, the system will be able to determine the angle of these small turns and either keep the car going straight down the center of the lines or turn the car accordingly. The line scan camera is a 128 pixel array camera that reads black as one and white as zero. This is how to determine where the black line is on the track. The camera is mounted above the car so that the camera can look ahead in the track and see when

Freescale Cup Competition 4 different obstacles are coming, such as a ramp or a turn. The camera reads in the track as the car moves forward. Each time the camera reads the track, the position is stored as in an XY grid. For example, when the car is centered on the track and is going straight, the position is 0, 0 and as a turn occurs to the right the position could go up to 0, 15. Fifteen of these locations are stored at once and when a sixteenth value is read, the first value gets pushed out to keep the position updated. When a turn is detected in this way, line interpolation is used to find where the turn will go and the angle is determined. The acceleration at each of these turns will be determined with trial and error. During testing, the car will be tested on tracks with turns at many different angles using different accelerations. When the fastest speed for a turn without the car derailing is found, the acceleration will be put into a look-up table. Then when the car is actually running on the track, the angle is found using the method above, and the correct speed is chosen from the look-up table. This fulfills part of the need of the top camera looking ahead to detect future turns and determine speed by reading the track ahead of the car. The flow diagram depicting the algorithm can be seen below in Figure 1.1. Camera Reads Line Straight line detected Turn is detected Entire line of black is detected (crossing line) Car accelerates if not at maximum speed Angle is calculated Small angle & Opposite turn detected no change Reads acceleration Car adjusts speed based on look-up table Figure 1.1 Algorithm for the acceleration control

Freescale Cup Competition 5 A proportional integral derivative controller, or PID, controller was chosen to control the steering of the car. Three values are used to control a process. They are the proportional value, which is the current error, the integral value, which is the past error, and the derivative value, which is the future error. The sum of the three values is what controls the process. The block diagram of a PID controller can be seen below in Figure 1.2. The controller first calculates the position of the car and then calculates the error of how far the car is off from the center of the line. This error is used in the finding the three values. The proportional value is found by multiplying the proportional constant by the error. It then tells the car to turn a lot with a high error or a little with a small error. The integral control fixes the car over time if it is still not centered adding in the accumulated error over time. Since the integral error value may cause overshoot, the derivative control is used to stop the car from constantly moving to either side of the line. The correction value from the error sums each time adjusts the servo and steers the car around the track. This repeats the entire time the car is traveling along the track. The tricky part of implementing this controller in the embedded code is the constants that are used to find the three values. These constants have to be adjusted many times before finding the correct value to correctly steer the car. Code for a basic algorithm for the PID controller can be seen in Figure 1.3. Figure 1.2 Diagram of a PID Controller PID Controller loop forever Error = Center of the line Current position on the line Proportional error = Error * Proportional constant Integral error = Integral error + Error Integral error = Integral error * Integral constant Derivative error = Error Previous _error Correction = Proportional error + Integral error + Derivative error end Figure 1.3 Basic PID controller algorithm

Freescale Cup Competition 6 The sensor array works with the PID controller to stay centered on the track. The sensor is used to find the error by finding the position of the car on the line. Since the array is eight sensors wide, it should be easy to determine if the car is in the center of the line or a little to the left or right. This should be able to keep the car centered on the track even during sharp turns since the sensor array is used to stay on the current track instead of the camera. This fulfills the requirement that the car must detect changes in the track and turn using sensors, and also meets the hardware requirements of having sixteen or less sensors. It is possible for the track to cross at a 90º angle. This could possibly mess up the readings of both the sensor and the camera and lead to wrong calculations and possible derailment. This means that the sensor array will see a black line at the input of each sensor. When this happens, the algorithm will ignore this and not use it to update the position of the car. It will continue to go straight until a new reading and update of the servo position is done. This also has to happen for the camera. When the camera outputs a majority of ones, it will ignore it and not use it to do any angle calculations. Designing the car this way eliminates the aforementioned risk of the car not performing correctly on the track while making turns. With the variables tuned correctly, the PID controller should always keep the car on the track whether the track is straight or curving. If the car has changed to the right speed, the controller should move the servo to the right or left and the car should remain on the track. Using the camera to detect turns is the best decision because sensors cannot pick-up lines from far away. Since the turn and angle are determined in advance, the car has time to slow down as to not overshoot the turn. In the case of loops on the track, the camera and sensor have to ignore the crossing lines. Otherwise, it could mess up the readings. The line scan camera will be mounted above the car on the camera servo, no higher than 12 inches to be able to go through a tunnel. This is the best placement to allow for the camera to see upcoming turns in the track. The sensor array will be put on the front of the car and be centered between the front wheels. This will allow the PID controller to work with the sensor to keep the car directly centered on the line. The accelerometer will be mounted on the car in order to get current information about the speed of the car. V. Parts List Component Description Cost Cost to Team Availability Camera $0 $0 Provided by Freescale Camera Control Board $0 $0 Provided by Freescale Camera Servo $12 $12 Available for purchase Reflective Sensor Array $15 $15 Available for purchase Three Axis Accelerometer $1.50 $1.50 Available for purchase

Freescale Cup Competition 7 VI. Testing Strategy What is Being Tested Test Description Expected Results Camera functionality Camera functionality, Embedded Code, Proportional Control Front sensor functionality Sensor and camera functionality, embedded code Embedded code, hardware. Camera and sensor functionality Embedded code, hardware. Camera and sensor functionality Embedded code, hardware, Camera and sensor functionality Embedded code, hardware, Camera and sensor functionality Place camera in front of thick black line Set up a straight line track with a signal curve. Place camera on track before a turn occurs Set up a straight line track with a signal curve. Attach sensor array to the front of the car Add right and left turns at both acute and obtuse angles to track to test if the camera can detect the change Set up a straight line track with a signal curve. Test car on the track containing curves Test car on track that crosses paths at a 90º angle and loops around Test car on track that has wavy lines Camera should be able to read a line Camera should detect turn and read angle and determine the correct speed for the car The sensors should be able to read the lines right in front of them Algorithm should calculate correct speed of the car based on the angle of the turn Speeds should be calculated correctly and the car speeds up, slows down, and car turns using the servo Car should slow down when approaching and taking turns and speed up when the track is straight The car should ignore any right turns and continue on the correct path The car should ignore the curves and continue straight at the same speed Date of Testing 1/7/13 1/13 1/7/13 1/13 2/13 2/13 2/13 2/13

Freescale Cup Competition 8 VII. Uncertainties The team is confident that the hardware and software designs used and the components chosen for the racecar will lead to a successful product that will be able to navigate the different aspects of any racetrack presented on the day of the race.

Freescale Cup Competition 9 A. Appendices QTR-8RC Application Notes: http://www.pololu.com/docs/0j13/1 QTR-8RC Specifications: http://www.pololu.com/docs/0j12/1 GWS Servo S03T STD Specifications: http://www.pololu.com/catalog/product/507/specs MMA8450Q Information: http://www.freescale.com/files/sensors/doc/fact_sheet/mma8450qfs.pdf