jonathan wong chong 14.8v polymer li-ion batteries o only powering thrusters 19v 4ah li-ion external...

48
RoboSub System-Level Design Team #5 - RoboSub

Upload: pierce-york

Post on 22-Dec-2015

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

RoboSub System-Level Design

Team #5 - RoboSub

Page 2: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Overview• Mechanical System• Electrical and Power System• Software System

• Vision• SLAM• Task Manager• Path Planning• Decision Making• Motion Control• IMU/ Stabilization

• Budget , Schedule, Risks• Questions

Jonathan Wong Chong

Page 3: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Project Management• Matthew Neafie• Vision

• Object Recognition/ Color Recognition

• Path Planning• Mono- simultaneous localization and mapping (SLAM)

• Daniel Cifredo• IMU• Data Acquisition for Hydrophones and IMU• Data Storage

Jonathan Wong Chong

Page 4: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Project Management• Julius Cobb• Decision Controlling• Motion Controlling• Stabilization

• Jonathan Wong Chong• Electrical and Power• Decision Controller/ PID• Torpedo Fire Controller/ Claw

Jonathan Wong Chong

Page 5: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Mechanical System

Jonathan Wong Chong -- Team #5 - RoboSub

Page 6: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Mechanical System• Reuse the Design from Last Year• Fixed Camera Cases

Jonathan Wong Chong

Page 7: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Power and Electrical

Jonathan Wong Chong -- Team #5 - RoboSub

Page 8: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Power Components Jonathan Wong Chong

• 14.8V Polymer Li-Ion Batterieso Only powering thrusters

• 19v 4Ah Li-Ion External Laptop Batteryo Powers main CPU unito Lasts roughly 2-3 hourso Essentially powers all

USB devices as well

• 12v Li-Ion 18650 Box Batteryo Regulated to power

actuation system

Page 9: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Thruster System Jonathan Wong Chong

Page 10: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Final Product Jonathan Wong Chong

Page 11: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Software System Design Matthew Neafie -- Team #5 - RoboSub

Page 12: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Software Overview Matthew Neafie

Page 13: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Vision General OverviewMatthew Neafie

Page 14: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

VisionThe vision system is the software module that satisfies all of the necessary image

processing needs of the AUV. Modules from this system will be called when needed by the top-level control software. Written using OpenCV and Castle’s SLAM, this module will implement object recognition, a frequently occurring problem in the contest.

Color Recognition and Tracking

OpenCV Library• #include <cv.h> • #include <highgui.h>

Calls SURF class

Matthew Neafie

Psuedo steps//capture image from camera//create windows for debugging purposes//cycle through each frame//smooth the original image using Gaussian kernel//Convert from BGR to HSV//Create a binary image with the set color

threshold//smooth and clean image

The AUV will now have a color image which can be used for other purposes.

Page 15: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

VisionSURF, Speeded Up Robust Features

OpenCV Library• #include <features2d.hpp> • #include <highgui.hpp> • #include <imgproc_c.h>

Calls SLAM

Matthew Neafie

Psuedo steps//capture image from camera//create windows for debugging purposes//cycle through each frame//Convert the RGB image obtained from camera into Grayscale //Define sequence for storing surf keypoints and descriptors//Extract SURF points by initializing parameters//draw the keypoints on the captured frame//compare keypoints from captured image to stored image

The AUV will now have compared the current visual image to that of the competition obstacles.

Page 16: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

SLAM Overview Matthew Neafie

Page 17: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

SLAMSimultaneous Localization and MappingRobert Castle’s PTAMM (Parallel Tracking and Multiple Mapping) software

•Libraries needed and why:1. TooN - a header library for linear algebra.2. libCVD - a library for image handling, video capture and computer

vision.3. Gvars3 - a runtime configuration/scripting library, this is a subproject

of libCVD.4. lib3ds - a library for handling 3DS model files.

• Stores map into file system for access by other subsystems (Path planning and decision making).• Calls Task manager, Path Planning, and Decision-maker.

Matthew Neafie

Page 18: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

SLAMSimultaneous Localization and MappingRobert Castle’s PTAMM (Parallel Tracking and Multiple Mapping) software

PTAMM RUNNING 3D Mapping Feature

Matthew Neafie

Images from Robert Castle

Page 19: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Task Manager OverviewMatthew Neafie

Page 20: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Task ManagerStack of Tasks•Recognized by Vision and Mapped•Unrecognized

Gate

Parking

Torpedo

TASKS

Matthew Neafie

Page 21: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Task ManagerStack of Tasks•Recognized by Vision and Mapped•Unrecognized

Gate

Parking

Torpedo

TASKSRemoved

Matthew Neafie

Page 22: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Task Manager

public class StateStack

Map<String, IState> mStates = new Map<String, IState>();

List<IState> mStack = List<IState>();

public void Update(float elapsedTime)

public void Render()

public void Push(String name)

public IState Pop()

Matthew Neafie

Page 23: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Path Planning OverviewMatthew Neafie

Page 24: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Path Planning Matthew Neafie

The Path Planning algorithm can be viewed as a greedy algorithm because it always chooses the closest vertex in V - S to add to S.

//insert all vertices into priority queue//Extract-min (first extraction is simply s)//for each neighbor

//RELAX(u,v,w) //update label of neighbor,

//decrease-key v.d in priority queue

Fibonacci Heap – O(|V|log|V| + E) timeUses map from SLAM, Goal from Task Manager, calls decision-maker

Page 25: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

DMCS Overview Matthew Neafie

Page 26: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Decision-making Control System• What to do and how to do it• Mission Planning • Path Planning • Deployment • Diagnose & Correct

• Goal Directed • Obstacle Avoidance • Pose Holding• Depth Holding

Weighted Total Output

Matthew Neafie

Page 27: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Decision Making Control System - Continued

Julius Cobb -- Team #5 - RoboSub

Page 28: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Decision Making Control System – A PID

• The DMCS module acts as an abstract Proportional Integral Derivative feedback controller• Two systems: Rational Behavior

and Perceptual Behavior• One system uses sensory data

from other threads to generalize the current behavior of the AUV

• Second system uses the above as input to adjust process control parameters• sendDataToMotionControl()

Julius Cobb

Page 29: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Motion Control - Software

• Interpret commands sent from the DMCS • distributeThrust() – process input to the

module and generate low-level commands to thrusters

Julius Cobb

Page 30: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Motion Control - Hardware

• Arduino Mega 2560• Single microcontroller that

will be used for thruster control

• Currently tied to four separate motor controllers as well as the Inertial Measurement Unit

• USB port is a power source from the MPU as well as the main UART serial communication port

• Baud Rate: 19200 bit/s

• Parity: None

• Hardware Control Flow: None

Julius Cobb

Page 31: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Motion Control – Hardware

• L298 H-Bridge Motor Controller• Two different brands, very

similar specs• Input voltage from 6 to at

least 25V• 4A total drive current (2 x

2A)• Motor direction LEDs

• Handles varied output by writing PWM signal to the ENABLE pin

Julius Cobb

Page 32: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Motion Control - Hardware

• Seabotix BTD-150 Thrusters• Max operating voltage of 19.1V• Max continuous current draw of

4.25A

• Utilizing the two graphs, following conclusions can be drawn:• If motor controller running in

normal mode, thrusters can achieve max of 1.05 lbs of thrust each (input voltage is 9.58V)

• If motor controller running in bridged mode, thrusters can achieve max thrust of 2.01 lbs (input voltage is 14.8V)

Julius Cobb

Page 33: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Motion Control – Software to Hardware

• Arduino Mega waits for serial data from MPU containing new thrust level

• Once the data is available, read the new thrust percentage and write the respective PWM signal to motor controller

Julius Cobb

Page 34: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Stabilization - Software

• Consists of two generic PID controllers implemented in C++• One system for minimizing error in pitch• One system for minimizing error roll

• For both systems, controller would:• Read state from IMU• Subtract measurement from desired

reference to generate an error value• Adjust process inputs (thruster levels) to

manage error• (P) proportional term “handles the present”• (I) integral term “recovers from the past”• (D) derivative term “anticipates the future”

Julius Cobb

Page 35: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Stabilization - Hardware

• IMU – Sparkfun Razor with 9 degrees of freedom

• Interfaces directly with the Arduino Mega• Receives 3.3V input voltage from

the Arduino’s 3.3V output pin• Establish UART serial

communication link by connecting TX and RX pins to TX1 and RX1 on Arduino• Baud Rate MUST BE set at 56200 bit/s

on both devices for optimal serial data transmission

• Parity: None• Hardware Control Flow: None

Julius Cobb

Page 36: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Stabilization – Software to Hardware

• Arduino will read data from IMU at set intervals

• Upon receiving data from IMU, Arduino then sends the data to MPU to be processed in Stabilization thread• IMU outputs all measurements

(xyz gyroscope, xyz accelerometer and xyz magnetometer) so the serial stream will have to be parsed

Julius Cobb

Page 37: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Schedule, Budget, Risks

Daniel Cifredo -- Team #5 - RoboSub

Page 38: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Schedule – Gantt GraphDaniel Cifredo

Page 39: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Schedule – Gantt GraphDaniel Cifredo

Page 40: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Schedule – Gantt GraphDaniel Cifredo

Page 41: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Schedule – Table

Page 42: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

AUV Estimated BudgetA. PersonnelName Job Description Base/hr Hours/wks Total

Jon Wong ChongTeam Lead Lead Electrical Systems $38.00 15/25 14250

Julius Cobb III Test Engineer $35.00 15/25 13125Matthew Neafie Lead Program Designer $35.00 15/25 13125Daniel Cifredo Secretary Treasurer $30.00 15/25 11250Subtotal of Personnel   51750B. Fringe Benefits = 15% of A 7762.5C. Total Personnel Expenses =A+B 59512.5D. Parts and Materials

Name Description Quantity(#of units)Price including estimated

taxes and shipping CostsHydrophones Pinger Detection 4 $300 1,200.00Traxxas #2056 Waterproof Servo

A servo that is used with the ball drop 1 $15 $16

PVC - 10 ft Build obstacle course 8 $5.50 $47 PVC connector - elbow Build obstacle course 2 $2.50 $5 PVC connector - Cap Build obstacle course 4 $2.50 $11 Orange Duct Tape 15 yd Build obstacle course 4 $5 $21 PVC glue Build obstacle course 3 $5 $16 Subtotal of Parts and Materials   1,316.63Total Direct Costs   60,829.13Overhead Costs =45% of Direct Costs 27373.1085E. Total Costs   88,202.24F. Travel Costs   1600G. Shipping Costs   900H. Total Project Costs   90,702.24

Budget Exercise Daniel Cifredo

Page 43: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Hydrophones Pinger Detection 4 $300 1,200.00

Traxxas #2056 Waterproof Servo

A servo that is used with the ball drop 1 $15 $16

PVC - 10 ft Build obstacle course 8 $5.50 $47

PVC connector - elbow Build obstacle course 2 $2.50 $5

PVC connector - Cap Build obstacle course 4 $2.50 $11

Orange Duct Tape 15 yd Build obstacle course 4 $5 $21

PVC glue Build obstacle course 3 $5 $16 Subtotal of Parts and Materials   1,316.63

Budget Exercise

Part Pricing with Hydrophones

Hydrophones Traxxas #2056 Waterproof Servo

PVC - 10 ft PVC connector - elbow

PVC connector - Cap Orange Duct Tape 15 yd

PVC glue

Part Prices without Hydrophones

Traxxas #2056 Waterproof Servo PVC - 10 ft

PVC connector - elbow PVC connector - Cap

Orange Duct Tape 15 yd PVC glue

Daniel Cifredo

Page 44: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Risk Arduino mega board malfunction

Probability Low

Consequence Catastrophic

Strategy 1. Ensure proper hookups2. Circuit analysis to keep current under max rating3. Save all programs in safe locations

Risk Zotac computer malfunction or damaged

Probability Low

Consequence Catastrophic

Strategy 1. Ensure all cables properly connected2. Ensure watertight seal maintained3. Check battery charge4. Save all programs in safe locations

Risk Thrusters draw maximum current

Probability Very Low

Consequence Severe

Strategy 1. Write code to prevent max draw2. Circuit Analysis to determine max current draw allowed

Risk Assessment - Technical Daniel Cifredo

Page 45: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Risk Computer Vision Fails during use

Probability Moderate

Consequence Catastrophic

Strategy 1. Ensure camera sensors are waterproofed2. Calibrate camera sensors when change in environment occurs3. Use OpenCV library

Risk Camera code incorrect

Probability Moderate

Consequence Catastrophic

Strategy 1. Develop pseudo-code for camera data2. Develop testing methods for camera

Risk Data Storage Process does not work

Probability Moderate

Consequence High

Strategy 1. Develop understanding of SQL2. Check to ensure enough memory is available to store data

Risk Assessment - Technical Daniel Cifredo

Page 46: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Risk Path Planning process failsProbability ModerateConsequence CatastrophicStrategy 1. Develop understanding of SQL

2. Develop understanding of OpenCV3. Verify algorithm for planning path is correct

Risk Decision Making process fails

Probability Moderate

Consequence Catastrophic

Strategy 1. Develop understanding of SQL2. Develop understanding of OpenCV3. Verify algorithm for determining next step is correct4. Verify tasks are implemented correctly

Risk Assessment - Technical Daniel Cifredo

Page 47: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Conclusion• Continue Work on Thrusters, IMU, Vision• On Schedule• 1st Testing Demonstration to be completed by Spring• Thank You!

Jonathan Wong Chong

Page 48: Jonathan Wong Chong 14.8V Polymer Li-Ion Batteries o Only powering thrusters 19v 4Ah Li-Ion External Laptop Battery o Powers main CPU unit

Questions?