NAVSEA Robosub Competition

The Naval Sea Systems Command (NAVSEA) sponsors an annual competition for autonomous robotic submarines (Robosubs). The competition is hosted in San Diego, CA, and challenges engineering skills across multiple disciplines. The competition team brings together engineers from across the Palouse, but this page highlights the efforts of the University of Idaho Capstone Design team.
==Problem Definition==
Our main goal for the year is to design and produce a working, autonomous submarine capable of completing specified goals and tasks while meeting club and competition needs and requirements
===Background===
Launched in 1997 and co-sponsored by the Association for Unmanned Vehicle Systems International (AUVSI) and the Office of Naval Research (ONR), Robosub aimed to advance development of Autonomous Underwater Vehicles (AUVs) by challenging new generations of engineers to perform realistic missions in an underwater environment. The competition is open to high school and college teams from around the world and is held each year at the U.S. Navy Space and Naval Warfare Systems Center Pacific's TRANSDEC Anechoic pool in San Diego, CA.
===Design Objectives===
The Autonomous Submarine must be able to complete numerous tasks designated by the competition. 
These tasks include:
 Going through a starting gate
 Navigating from task site to task site on a course using visual and audio cues
 Dropping markers at specified locations
 Accurately deploying torpedoes at targets
 Locate pinger and surface in appropriate area (typically an octagon)
How well each task is completed goes towards the overall team score for the competition. Other scoring can be attributed to subjective scoring.
These tasks include:
 Team Website
 Technical merit (Journal)
 Written Style (Journal)
 Tech accomplishments
 Craftsmanship
 Team Uniform
 Team Video
 Discretionary Static Points
===Specifications===
General Requirements 	Specific Requirements 	Marginal Targets 	Ideal Targets
Maneuverable 	Control in linear X,Y,Z directions 	Ability to travel in these directions at a rate of 1.5 ft/s	Ability to travel in these directions at a rate of 3 ft/s
Maneuverable 	Control over yaw 	Rotation of 360° in under 10 seconds 	Rotation of 360° in under 6 seconds
Maneuverable 	Minor Control over roll and pitch 	Corrections to roll or pitch within 2 seconds 	Corrections to roll or pitch within 1 seconds
Stable 	Statically Stable 	Center of mass bellow the center of buoyancy 	Center of mass bellow the center of buoyancy and balanced across centerlines
Stable 	Dynamically Stable 	Ability to travel 10 ft with minor corrections 	Ability to travel 30 ft with no corrections
Stable 	Positively Buoyant 	Buoyant by at least .5% of mass 	Buoyant by exactly .5% of mass
Reliable 	Watertight housings 	Watertight up to 30 ft depths 	Watertight up to 50 ft depths
Reliable 	Electronics remain cool 	Continuous operation time of 1 hour 	Unlimited continuous operation time
Small size and Low Weight	Small outer dimensions 	6' x 3' x 3' 	Less than 6' x 3' x 3'
Small size and Low Weight	Low weight in air 	Less than 125lb 	Less than 48.5lb
Easy to work on 	Modular components 	Some systems can be separated 	All main systems can be separated
Easy to work on 	Replacement Parts 	Main components can be replaced in 30 minutes 	Main and minor components can be replaced in 20 minutes
Easy to work on 	Easy to transport and store 	Easily carried by two people 	Easily carried by two people with a special container and stand
Accurate Peripherals 	Accurate Torpedo Launchers 	Torpedoes able to hit 12" target from a distance of 2 ft 	Torpedoes able to hit 7" target from a distance of 2 ft
Accurate Peripherals 	Accurate marker droppers 	Marker dropped within a 6" radius over a 3' distance 	Marker dropped within a 2" radius over a 3' distance
Accurate Peripherals 	Consistent PVC grabber 	Grasps and Releases PVC structure almost every time 	Grasps and Releases PVC structure every time
Safe 	Low open circuit voltage 	Less than 60VDC 	Less than 30VDC
Safe 	Prop shrouds 	At least 2" distance between prop and edges of shroud 	Shrouds and guards
Safe 	Easy-to-Operate kill switches 	Clearly marked and readily activated 	Clearly marked and readily activated with protection against accidental operation
Responsive 	Keyboard input operates the thrusters	All thrusters are controlled by keyboard 	Commands will effectively use all relevant thrusters to accomplish requested task
==Project Learning==
Organized by Team
===Mechanical Engineering===
 Sub Stand
 The submarine stand will make for better presentation and easier repairs/modifications. The stand is intended to both hold the sub and allow the user to rotate it along a central axis running parallel to the electrical components bay. This should be fairly easy to accomplish since it is fairly similar to an engine stand.
 This project will be completed by first examining current device that perform similarly to this one. If a device is readily available that can be modified, this option will be explored first. If not, the device will be engineered similarly, but customized for our particular needs.
 
 Camera Waterproofing
 The cameras selected by the other teams will be mounted to the sub and waterproofed by the mechanical engineering team. They will need to be mounted such that they will perform as required for the competition, but do not interfere with other devices. Depending on the cameras selected, the mechanical engineering team will first search for predesigned and waterproof certified cases. If no such cases are available, the mechanical engineering team will design cases that will be capable of being placed underwater to the max depth of the arena. Mounting will be designed accordingly to work with the case
 
 
 Additional Battery Tube
Make an additional waterproof carrying tube for the sub’s battery which allows for hot swapping during testing. This saves the team critical time that would otherwise be wasted with the monotonous activity replacing the battery inside its waterproof casing, rather than just swapping out the case .
 
 
 Bottom Claw Systems
 Design and manufacture bottom claws for the sub that will operate using pneumatics. We want to put multiple less robust claws on the bottom so that we have the opportunity to grab more than one object at a time.
 Pin Removal System
 Design and manufacture a pin removal System (PRS) for the sub that will operate using pneumatics. Mounted to the front of the sub the PRS will be used for removing a magnetic pin from a wall and reattach it in an alternate place . 
 
 Marker Dropper
 The current marker dropper system on the submarine is integrated into the forward claws. This year we would like to separate the two systems so neither relies upon the other. We want all of our systems to work independently of one another. This should allow us to build specific designs which alternatively may help increase the accuracy and speed of each. Markers must be expendable.
 
 New Pneumatic Housing
 Currently we only have one system running off of air. We are planning on switching both of the claws, forward and bottom, to pneumatics. To do this we will need a new pneumatic housing to hold all of the required components. Not only does the size of the tube need to change, but also location. 
 Electronics Bracket
 The current 3d printed brackets allows for too much of the electronic piece to be open to the environment. This causes a problem for other electronics due to the majority of the piece being exposed while electricity is running through it. A new design is needed to fully house the piece while only allowing the pins on the top to be exposed.
 Buoyancy
 Confirm the new volume of the submarine to determine 0.5% of total mass and buoyancy. This is important because the competition rules states that “All vehicles must be buoyant by at least one half of one percent (0.5%) of their mass when they have been shut off through the kill switch.”
 
===Computer Science===
 New Cameras
 The Robosub will be getting new cameras that have fish eye lenses. Calibration will be necessary to remove the radial distortion (fish-eye effect) and tangential distortion (distortion caused when the lens is not parallel to the plane). Since the front of the sub will have two cameras we will also need stereoscopic calibration.
 
 Computer Vision
 The Robosub's vision components are being redesigned from the ground up to include dynamic filter tree systems to improve aquatic object recognition. The OpenCV library will be used heavily in the implementation. The vision will be an area with constant room for improvement, however the direct goals are to successfully identify various shapes and sizes of colored objects in a pool, regardless of interference surface light. 
 
 Artificial Intelligence
 The artificial intelligence needed for the Robosub to complete tasks requires a fresh implementation of mission/task controllers. These systems will correctly prioritize and communicate actions back to the rest of the submarine through the network communications hub.
 
 Simulation Environment
 The Robosub relies heavily on pool tests for testing and they only happen once a month. Simulation environments are being researched to work around this problem. With such an environment tests could be run regardless of even having the sub or a pool.
 
 Movement Logic
 The movement systems rely upon 'fuzzy logic' so as to keep the Robosub's movement responses smooth and consistent. It must be able to keep consistent depth despite natural buoyancy while responding to the AI's requests for movement in a timely and controlled fashion.
 
===Electrical Engineering===
 Printed Circuit Board Redesign
 After last years competition it became clear the current printed circuit boards (PCBs) have multiple errors in their component layout and functionality. Several component footprints must be reconfigured and incorrect component values must be replaced.
 
 Printed Circuit Board Edge Connectors
 The current printed circuit boards are difficult to remove from the sub due to a rat's nest of wires connected to the boards. The new boards will have edge connectors implemented into their design to allow for quick removal and to decrease the chances of damage to the boards from excessive handling.
 
Microcontroller Code Organization
 The submarine microcontroller code that was previously written wasn't thoroughly checked and debugged before the competition in the summer of 2014. Each microcontroller file must be meticulously verified and documented in an online drive account hosted by Robosub of the Palouse. 
 
==Current Designs==
===Mechanical===
250px|thumb|left|Marker Dropper
Hydrophone Test Bracket
 Since the Robosub project requires students from both University of Idaho and Washington State University to work together in producing an autonomous submarine, it is easy to see how a problem would arise in submarine possession. Instead of having to leave the submarine at WSU so the Electrical Engineers could test the hydrophone system, we created a mock-up of the front end of the sub which includes brackets to hold the hydrophones so we can keep the sub at the University of Idaho to further our progress on different projects.
Camera Housing
 The Computer Science and Electrical Engineering teams have chosen a new camera for the 2014-2015 submarine. With this the mechanical engineering team has designed and built underwater housings that properly stabilize the cameras while protecting them from not only water, but other types of physical damage as well. Three cameras will be mounted in different locations around the sub. Locations include two forward for main vision and one on bottom for location of target/deployment of markers with the newly designed marker dropper system.
Marker Droppers
 The previous years marker droppers were integrated into their forward claw which we wanted to separate and design an independent system for. The design is similar to that of a couple years ago where a pneumatic actuator is mounted with one end fixed and the other variable, depending on if the cylinder is in on/off position. The system is then sent a signal to either open or close depending on the action the sub wishes to take. When the submarine enters the water the position is closed. Once the sub reaches the obstacle requiring it's operation, which the camera and AI will identify, the cylinder is actuated pulling back a slide, letting the "marker" drop into the designated target location. With how simple this system has been built, we not only hope to have high target efficiency, but reliability as well.
Hoist Connection
 Last year's team used 1/4" rope for the hoist connections when picking up/setting down the submarine into the pool. At competition last year the divers and lift operator were confused when it came to how to make and remove the connections. To avoid this confusion, as well as make a safer system, we have decided to simply remove the rope and, in its stead, use eye bolts. Not only do they have much more strength but this will be easier for the divers to identify how to hook up the sub.
Battery Tube
 This year both the Electrical Engineering and Computer Science teams requested an alternate battery tube for hot swapping during pool sessions. With this we decided to take it a step further and alter the current battery tube to gain more points in the presentation portion of the Robosub competition. While the previous design included an aluminum cylinder that housed the battery, we decided to change the material to acrylic as well as include blue LED's for a more aesthetically pleasing design. We also chose to remount the battery tube in he aft of the submarine allowing room for the new pneumatic housing that will be worked on second semester.
New Pneumatic Housing
 The pneumatic housing will be a 3-D printed box what is capable of holding 6 solenoids. We will have four in total, two for the torpedo launcher, two for the marker dropper system, and two extra in case they are needed for next year's competition. The solenoid we've decided on is the same one that was used two years ago by the 2012-2013 team (Clippard MME-41NES-D012). It proved to be reliable for their competition and with its simple mounting procedures it will make for an easy addition anywhere we choose to place it.
Sub Stand
 Due to the submarine's inability to be fully assembled while sitting on a table (BCS disrupts its safe static positioning), we are forced to remove the claw to work on it. To alleviate this problem we have decided to design a stand that will hold the sub when it is out of water. Features include up/down maneuverability, set rotation at 45° angles, and all terrain wheels. Current scope involves designing/building a stand and verifying it will hold the required weight. Next semester, if time permits, a acrylic case will be added for presentation.
Brush Guards
 The submarine operates optimally when it is perfectly balanced. To achieve this we have added guards to both sides and cut them specifically to redistribute weight around the vehicle. In addition to balance, the guards provide stabilization to prevent rolling during strafing as well as protection for crucial mechanical and electrical components during operation. The guards also allow for protection of base components, such as bottom thruster and camera, so the submarine can be set down without damaging hardware.
===Software===
Architecture
Each module of the Robosub must be able to effectively communicate with other modules in a timely fashion. The communication model is that of publishers and subscribers, with each module broadcasting updates on their respective processes to be received by each subscribed module. Modules also form a tree of children and parent ownership to accomplish their various tasks.
Vision
Filter Tree - The Robosub will employ a variety of video filtering techniques in order to address the vehicle's various needs. These combinations of compatible and incompatible filters will form a tree of outputs each with specific goals such distance filtering, object detection, etc.
Filter GUI - Manipulating these filter combinations will often require a human element, and so requires a simple GUI for calibration in varying environments.
Object Detection - Using the edge detection algorithms, the vision module will report sighted objects of classic geometries to the artificial intelligence.
Calibration - The cameras will need calibration settings in order to account for camera defects as well as the wide visual perspectives provided by the new fisheye lenses.
Movement
 300px | thumb | right | This diagram shows the positive direction of rotation and translation in the unusual coordinate system used for the sub. Note that Z is positive downward and X is positive left. 
Other students working on the project have constructed the convention that the positive direction of the Z axis should be downward, making it "depth" rather than "height." In order to keep a right-hand coordinate system, this had several consequences. X is positive left and Y is positive forward. The positive directions of pitch and yaw are downward and starboard, respectively. The diagram at right demonstrates these poroperties. 
The sub needs to be able to maintain a steady position as well as move to a target position. In order to accomplish this in an aquatic environment full of uncertainty, we will make use of fuzzy logic controllers. Last year's home-made 'fuzzy logic' system was missing several critical pieces of fuzzy logic controllers. The Fuzzy-Lite library will enable us to have accurate calculations for the fuzzy logic controllers to rely upon, but the logical design and consequence must still be fine tested and fine tuned. 	The sub needs to be able to maintain a steady position as well as move to a target position. In order to accomplish this in an aquatic environment full of uncertainty, we will make use of fuzzy logic controllers. Last year's home-made 'fuzzy logic' system was missing several critical pieces of fuzzy logic controllers. The Fuzzy-Lite library will enable us to have accurate calculations for the fuzzy logic controllers to rely upon, but the logical design and consequence must still be fine tested and fine tuned.
 	
In a fuzzy logic controller, an input value is received and interpreted according to the terms of an input variable. The diagram above shows the input variable Depth with terms Low, OK, and High. In the example at right, an input value is interpreted as 0.3 Low, 0.7 OK, and 0 High. Rules associate input variable terms to output variable terms. The diagram shows several of these. Output variables get scaled corresponding to the value of the input variable term associated. In the example at right, Up is scaled to 0.3 of its size because the input value was 0.3 Low. The centroid of the area given by all output terms involved is the output value given by the fuzzy logic engine.	In a fuzzy logic controller, an input value is received and interpreted according to the terms of an input variable. The diagram above shows the input variable Depth with terms Low, OK, and High. In the example at right, an input value is interpreted as 0.3 Low, 0.7 OK, and 0 High. Rules associate input variable terms to output variable terms. The diagram shows several of these. Output variables get scaled corresponding to the value of the input variable term associated. In the example at right, Up is scaled to 0.3 of its size because the input value was 0.3 Low. The centroid of the area given by all output terms involved is the output value given by the fuzzy logic engine.
In our system, fuzzy logic input/output is handled by FuzzyDimension objects in the MovementModule that correspond to each degree of freedom the sub has (X, Y, Z, Pitch, Yaw), as shown by the class diagram. The MovementModule reads the values from these dimensions and translates them to actual thruster values. For example, if the Y output is positive, both Y thrusters need to fire forward. But if the Pitch is positive, one of the Y thrusters will need to fire backward to perform the rotation. These values are summed and scaled before being given to the thruster microcontrollers.
AI
Mission Planner - The Robosub will need to be adaptable to a variety of planned mission types, with varying degrees of priority. This system will allow for preflight mission planning. These mission plans will also be saved and be able to be replayed for repeated testing, or similar objectives.
Task Controller - This will handle the individual tasks such as start gate, and call specific task modules. These include dive, move and whatever other simple commands we can give.
===Electrical===
PCB Redesign
 The current circuit board system is difficult to maneuver due to the excessive wires. The large number of connections also cause excessive wear on the circuit boards when trying to remove them from the sub. The new system will feature PCBs with edge connectors that will allow for easy and quick removal of the boards and result in more space inside the sub.
 
 	
Current system is cluttered and difficult to troubleshoot.	New system will allow for quick removal and inspection.
==Team Information==
Picture	Bio 	Dicipline
 	Chet McKinnon: Chet is a senior at the University of Idaho and working towards his Bachelor of Science in Mechanical Engineering. He hopes to pursue his interests in robotics and fluid mechanics/dynamics with the Robosub project and looks to continue his work after the project with graduate studies. In his spare time he enjoys being outside and spending time with friends/family. Hobbies include snowboarding, cliff diving, mountain biking, listening as well as playing music (both saxophone and guitar), cooking and much more.	ME
 	Michael Moreno: A mechanical engineering/ applied physics student at the University of Idaho, Michael Moreno has been working with robotics since sophomore year in high school when he originally competed in this same competition with Riverbend Technical Academy. His interests are designing cool things, playing video games, and socializing. After he graduates he plans to start his own design firm with a specialty in robotics. 	ME and PHYS
 	Woovin Yi: He is a South Korean American​ Senior student at University of Idaho working on a Bachelors of Science degree in Mechanical Engineering. He plans on graduating in spring 2015. Some of his interests include socializing, playing piano, swimming, basketball, going to the gym, and watching t.v./movies. 	ME
 	Cody Litzko:Cody is a senior Mechanical Engineering student at the University of Idaho. Very involved in his fraternity he has held seats of president, scholarship chairman, and new member educator. He chose the field of mechanical engineering after spending much of his childhood in his father’s automotive shop learning how to fix simple problems and tearing apart components to figure out how they work. Through this he found a love for machines, and the physical components that make them up. 	ME
 	Jeff Crocker: As a senior working towards a degree in Computer Science, Jeff expects to graduate in the Spring of 2015. His particular areas of focus are security and front-end development. He is a double major in Physics, and hopes to apply the numerical methods used in Physics to improve the behavior and design of the Robosub. 	CS
 	Sean Shepherd: Sean is a senior in Computer Science. He started out as a Mechanical engineer, switched to Electrical engineer, and after his first computer science class he switched majors. He plans on graduating in the spring of 2016. Sean loves to talk about artificial intelligence and philosophy given the opportunity. 	CS
 	Tyler Jaszkowiak: Tyler is a pursuing Bachelor of Science degrees in Mathematics and Computer Science at the University of Idaho. His research interests include artificial intelligence, which was a large incentive for getting involved with this project. He is involved on campus both as a member of the Homecoming Committee and an executive in his fraternity. Additional hobbies include running, water sports, and watching TV. 	CS
 	Craig Allen: Craig is a senior Computer Science student interested in user interfacing and artificial intelligence, especially social AIs. He is prone to deep philosophical discussion, especially those that involve his particular fields of interest. In his free time he plays quite a lot of tabletop games, such as Dungeons & Dragons or Pathfinder, as well as video games, especially those which have a strong social element or a focus on multiplayer. 	CS
100x100px	Cameron Morton: Cameron is a senior in Electrical Engineering at the University of Idaho emphasizing in circuit design and electronics. He has always been a very hands-on person with a passion for engineering. One of his first memories as a child was him trying to build a TV set from random electronic garbage and a cardboard box that he found out on the curb of his street. When not at school he enjoys time with his wife and four children. 	EE
==Document Archive==