2015 IEEE International Conference on and Automation (ICRA) Washington State Convention Center Seattle, Washington, May 26-30, 2015

A Multi-level Motion Controller for Low-Cost Underwater Gliders

Guilherme Aramizo Ribeiro, Anthony Pinar, Eric Wilkening, Saeedeh Ziaeefard, and Nina Mahmoudian

Abstract— An underwater glider named ROUGHIE (Research deploying UGs [23] for submarine tracking. With a valida- Oriented Underwater Glider for Hands-on Investigative Engineer- tion platform, researchers will be able to better understand ing) is designed and manufactured to provide a test platform and glider dynamics [24] and improve UG effectiveness in littoral framework for experimental underwater automation. This paper presents an efficient multi-level motion controller that can be used zones. Additionally, underwater localization and positioning to enhance underwater glider control systems or easily modified and path planning in high risk areas will be improved. for additional sensing, computing, or other requirements for ROUGHIE is 1 m long and weighs 12 kg (payload 1 kg) advanced automation design testing.The ultimate goal is to have with minimum operating endurance of 8 hours and maximum a fleet of modular and inexpensive test platforms for addressing depth of 40 m. At 10% of the cost of commercial underwater the issues that currently limit the use of autonomous underwater vehicles (AUVs). Producing a low-cost vehicle with maneuvering gliders, a ROUGHIE fleet is affordable without compromis- capabilities and a straightforward expansion path will permit easy ing the sophisticated control systems and maneuverability experimentation and testing of different approaches to improve (See the detailed characteristics in Table I). underwater automation. In this paper, the mechanical and electrical components of the ROUGHIE are introduced in Section I as a plant for the INTRODUCTION controller design. Section II outlines the multi-level control Recent developments in underwater glider (UG) control system, appropriate sensor integration, and preliminary test- systems portend greater predictive modeling and path plan- ing results. Section III concludes with the summary of the ning efficiency [1]–[10], more accurate localization [11], im- work and plans for future developments. proved autonomous cooperation [12]–[14], improved glider navigation [15] and a broader field of applications for UGs [16]. Unfortunately, progress is delayed by the lack of a robust, affordable test platform. The size, weight, and cost of legacy gliders [17]–[19] prevent them from being a viable option for testing purposes. This is evident as universities spend resources developing their own test platforms [20], [21]. To provide a universal UG testing platform for control system validation, Michigan Tech’s Nonlinear Autonomous Systems Laboratory has designed and fabricated ROUGHIE, the Research-Oriented Underwater Glider for Hands-on In- vestigative Engineering (Figure 1). ROUGHIE was designed at a low cost to increase avail- ability across universities, providing a platform on which most control systems can be evaluated. The basic design was Fig. 1. Final ROUGHIE Design and Prototype detailed in [22], under the concept design name GALUR. The price allows researchers to explore hazardous environ- ments such as high traffic harbors or under-ice waters without I.ROUGHIEDESIGN significant expense in case of glider loss. Furthermore, coop- A. Mechanical System erative control systems can also be inexpensively validated, The ROUGHIE was designed to have clean, simple hydro- as a fleet of ROUGHIEs costs less than a single legacy glider. dynamic surfaces minimizing drag and assembly time. The Expanding access of validation tools to more researchers front nose cone is a standard ogive that mates directly with will unlock new applications for UGs. Already NATO is the 0.13 m outer diameter hull. This hull is a single, o.83 This material is based upon work supported by the Office of Naval m long aluminum cylinder with no protrusions or gaps. The Research under Grant No. N00014-14-1-0032. intent is to keep the boundary layer completely intact along G. Aramizo Ribeiro ([email protected]) and S. Ziaeefard the entire hull. Figure 1 shows the glider with an acrylic hull ([email protected]) are graduate research assistants, E. Wilkening ([email protected]) is an undergraduate research assistant, and used for testing purposes. The Reynolds number remains in N. Mahmoudian ([email protected]) is an assistant professor in the the laminar region due to the short length of ROUGHIE, Department of Mechanical Engineering-Engineering Mechanics, A. Pinar allowing the design to forgo complicated geometry as seen ([email protected]) is a graduate research assistant in the De- partment of Electrical & Computer Engineering, Michigan Technological on Seaglider [18]. To reduce separation, the back end cap is University, Houghton, MI 49931, USA shaped as a revolved NACA 0051 airfoil, post max thickness.

978-1-4799-6923-4/15/$31.00 ©2015 IEEE 1131 Metric Value piston in the water reservoir is found by reading the analog Dimensions (m) 1.3 (d) x 1 (l) output of a draw-wire sensor, which provides feedback to Wingspan (m) 0.6 the Arduino so it can determine when to turn the water Total Mass (kg) 12 pump on and off. The draw-wire sensor, shown in Figure Payload Mass (kg) 1 2, is a retractable cable that actuates a potentiometer inside Endurance (hr) 8 the sensor housing. The linear mass is moved using a non- Maximum Depth (m) 40 continuous servo whose shaft is coupled to a large gear that Optimal Glide Angle (degrees) 35 meshes with a linear rack. The servo has built-in electronics Displacement (mL) 400 that communicate with the Arduino using RS-485, providing Battery Chemistry LiPO the Arduino with a means to both command the servo shaft to a particular angle and positional feedback of the shaft. TABLE I An inertial measurement unit (IMU) is also installed that ROUGHIE DESIGNCHARACTERISTICS communicates (UART) with the Arduino providing pitch angle feedback. Finally, the glider has a pressure sensor whose analog output is read by the Arduino so that the external water pressure can be monitored. The ROUGHIE final design placed the NACA 0012 wing on the tail cap; this imposed a 3-5% penalty in lift-to- drag ratio in laminar simulation but prevents premature turbulent transition on the hull. The tail cap is also a flooded compartment, which obviates the need for sealing the wing mounts. The internal components of the ROUGHIE fit into four major modular subassemblies: the pumping and ballast as- sembly, control masses (batteries), electronic components (including the power distribution system), and framework. The framework is modular and allows these subassemblies to be swapped out if researchers prefer different components. This is accomplished using a single rail that runs the length of the glider to which each self-contained subassembly mounts. ROUGHIE controls displacement by pumping water to an internal ballast tank. A TCS MG1000 micropump takes in water through the front cap into a 450mL cylinder ballast tank with piston. Position of the piston head is read with a draw-wire sensor that correlates to total displacement. A solenoid valve is in series with the pump to prevent free flow. Pitch, roll, and yaw are controlled with linear and rotary control masses. A plate constrained to linear longitudinal movement holds the batteries and rotary control mass. This Fig. 2. Draw-Wire Sensor is driven +/- 2.5 inches from center by a Dynamixel servo using a gear and rack system. For rotary control, a brass A 14.1V battery is used as the linear mass in the glider, weight cantilever hangs from another servo and can swing from which the entire electrical system derives its energy. as a pendulum to roll the glider. The rotary mass is partially Since the pump and solenoid are the only components that coupled with the linear mass since it rides along the same can use 14.1V, a DC-DC converter is used to regulate the plate as the linear control mass. voltage to 5V. This regulated voltage supplies all other on- board electronics. All voltage rails are protected with fuses B. Electrical System and distributed from a custom circuit board. This custom All electromechanical components of the glider are con- circuit board also includes the relay-driving BJTs and relays trolled by an Arduino Mega. The water pump has its own mentioned above. dedicated off-the-shelf controller that is oscillated via a relay Other electronic assemblies include an RS-485 shield that controlled by a digital pin on the Arduino. Similarly, the allows the Arduino to communicate with the servo and on solenoid is also manipulated with a relay driven by the XBee shield allowing wireless communication (above water Arduino. Note that bipolar junction transistors (BJTs) are communication only) between the glider and a base computer used to drive the relay coils, alleviating the current demand so that gliding parameters can be changed without disassem- on the Arduino digital output pins. The position of the bling the glider. When possible, electrical connections are

1132 control when the valve is open and closed. Higher efficiency solid state switching solutions will be explored in future upgrades to the glider’s circuitry.

II.ROUGHIECONTROLS A closed loop control system is designed to provide attitude and depth control, and guarantee desired gliding per- formance underwater and robust behavior in the presence of system and environmental uncertainties. The system depicted in Figure 5 receives two inputs: pump flow rate and moveable mass position, and three outputs: depth, pitch angle, and ballast weight. Specifically, the design goals were: • Control the pitch angle to maximize the forward ve- locity (gliding velocity) or the horizontal to vertical Fig. 3. Power Distribution Circuit Board velocity ratio (gliding efficiency). • Bound the saw-tooth motion into a limited depth inter- val, removing drifts on the vertical trajectory by using made using detachable connectors so that the system can the depth sensor. easily be assembled or disassembled. • Detect surface breaching to start communicating wire- A power distribution circuit board was designed for this lessly with a distant station. particular application. The assembled circuit board is shown in Figure 3. Connectors provide a means for external elec- To achieve these design goals and benefit from rapid trical connections as a convenience to assembly. A switch is control prototyping techniques, a wireless radio provides also provided so that the entire electrical system can be shut a communication link between ROUGHIE and a computer down when not in use. Also present are two fuses protecting when it reaches the surface. This wireless link is used to log the 14.1V and 5V power rails. Not visible in the image is data for further analysis and perform system identification, the array of BJTs used to drive the various relays discussed failure detection, and also to command the glider to go into in the overview. certain states. The pump itself is a three-phase brushless motor, but the We have implemented a two-level control algorithm. The off-the-shelf pump controller does not have the capability high-level is an event-driven master controller deciding on to reverse the pump direction. This created the need for the gliding cycle and providing setpoint signals for the sec- custom circuitry to swap two phases on the pump’s three ond level of control. The low-level is a PID controller for the phase supply. A simple double-pole, double-throw relay is linear mass position, corresponding to pitch, and a bang-bang used to accomplish this, as shown in Figure 4. Note that the controller for the pump flow rate, corresponding to depth relay coil is driven indirectly by the Arduino’s digital output and ballast weight. As illustrated in Figure 6, three sensors using the transistor array located on the power distribution were employed and interfaced to the Arduino board: an IMU board. A mechanical relay is used in this application since the orientation sensor, a draw-wire sensor, and a pressure sensor. pump controller’s circuitry is too sensitive to the impedance Finally, a Rapid Control Prototyping technique was used to imposed by a solid state solution. optimize the limited time in the pool tests. The final piece of custom circuitry is the solenoid valve The details of sensor integration are described below, control relay. This relay is controlled by the Arduino and where the sensors were modeled to sample at least 10 times applies power to the solenoid valve so that the Arduino can faster than the time constant of the corresponding signal: • The pressure sensor indirectly measures the depth of the glider. It interfaces with the microcontroller through the analog input and mitigates noise by averaging every 10 samples. The event-driven master controller requires this measurement to switch between its machine states. • The draw-wire sensor is connected to the movable plate on the back of the ballast tank providing ballast mass measurement. This displacement sensor is interfaced to Arduino through an analog input, providing 310 divisions of resolution and is filtered by the same 10 sample averaging filter. • An orientation sensor (UM7 AHRS) that embeds a triaxial accelerometer, magnetometer and gyroscope, is Fig. 4. Pump Direction Changing Circuitry used to output a filtered estimate of the Euler angles

1133 Fig. 5. ROUGHIE System Dynamics

Fig. 6. ROUGHIE Closed-Loop Diagram

and their rates. It communicates through a UART port level of accumulated error to overshoot the signal, so the using a data rate of 5 Hz, but bench tests prove it can integral accumulator had to be reset every time the setpoint reach data rates of up to 100 Hz if a change in control switched its level. The Kp, Kd, and Ki parameters could be design is necessary. updated wirelessly on site, so we experimented with several The orientation sensor is the only sensor directly fed into combinations to tune these values. Finally, the reference the low-level controller. Specifically, the pitch component signal for this controller is generated by the event-driven feeds into the pitch PID structure. To achieve tight time master controller illustrated in Figure 7. constraints, the timer capabilities on the AVR microcontroller The high-level controller generates the desired pitch angle, was explored. This resulted in a consistent sample time, commands the flow rate into the water tank, and trigger pre-filtered data from the orientation sensor, and no noise the asynchronous events. The goal is to have ROUGHIE amplification in the derivative stage. However, the integrator perform gliding cycles (NCYCLES in Figure 7), then surface stage suffered from a wind-up problem due to the pulsed to transmit the logged data and receive new instructions setpoint nature. The sudden change in the setpoint and the from the wirelessly connected computer. At the remote pitch angle’s inability to respond on time created a high computer, the interface with the ROUGHIE is implemented

1134 reliably use three UART ports: one for the wireless module, another for the orientation sensor, and the last for the servo command over a serial protocol. The Arduino was selected as a flexible open-source hardware for the prototyping stages. The stack of Arduino shields was compatible with both types of Arduinos. The developed codes relied on multiple events, some asynchronous and several other synchronous of different rates, which required the use of state machines and timer register readings. A regulated voltage source facilitated transferring large amounts of data, which was not possible before since it caused excessive current draw that the Arduino could not supply.

Fig. 7. Event-Driven Master Controller through a terminal-like window, basing the communication on string- encoded messages parsed into numerical data on Fig. 8. Sawtooth pattern in pool test the Arduino. This algorithm was implemented as a state machine with the following two states: the transceiver state The ROUGHIE prototype was tested in a swimming pool and the gliding downwards/upward state. at Michigan Tech. The sealing mechanism of the vehicle was In the transceiver state, the controller resets the cycle tested and verified for maximum pool depth. To validate counter and set the pump to pull water in. During execution the pitch controller efficiency, the rotary mass was fixed it continuously processes the sensor data and generates the in place at zero roll angle. A series of gliding tests was desired pitch position. At this stage the setpoint value is conducted and data for three cycles of saw tooth motion a constant value of zero degrees, but it could be a time was collected. During these experiments, the orientation dependent curve. When the draw wire sensor detects the of the glider was measured with an IMU and the depth ballast mass is filled to a certain level (LMID), where the was measured using a pressure sensor installed in the end glider is about to become negatively bouyant and leave the cap compartment. ROUGHIE was trimmed with external surface, the state stops the pump and a desired ballast mass trimming weights to a 1.96N quasi-neutrally buoyant state is achieved. After a user-specified delay of TTX seconds, using external trim weights. The buoyancy piston head was the ROUGHIE begins the next state of gliding downwards. set to the mid position. By pumping the water into the At the transceiver state, the controller can receive new buoyancy tank, the glider’s net buoyancy decreased and the instructions or a request to change navigation parameters. glider dove to the pre-set maximum depth. When the glider The gliding downwards and the gliding upwards states are reached the maximum set depth, the pitch mass was adjusted essentially the same. The downwards/upward state begins and water was pumped out of the buoyancy tank to create with setting the pump to pull/push water in/out. During this a positive buoyancy. Due to the change in buoyancy and state the pitch is -GLIPITCH/+GLIPITCH and when the center of gravity, the glider ascended towards the surface. tank reaches its maximum/minimum capacity, it shuts down. Every three complete cycles ROUGHIE was set to surface Every time ROUGHIE completes a down-up cycle, a counter to transmit the logged data to the base computer and receive is incremented at the entry of gliding upwards state. So, a new commands through a wireless transmitter connection. transition from gliding down to up occurs every time the Figure 8 demonstrates the outcome of the proposed algorithm Arduino detects the DMAX depth reference. A transition for four glide cycles. ROUGHIE dived to 12 ft (maximum from gliding up to down occurs when it detects a DMIN depth of the pool) in the first cycle, then it performed three depth reference and the gliding cycle is less than NCYCLES. cycles to 6 ft depth to verify the shallow water stable dive Otherwise, it goes back to the transceiver state. capabilities. ROUGHIE hit the pool water jet in its cycle To implement this controller on ROUGHIE, a migration which caused uneven behavior seen in the plot around 230 from Arduino Uno to Arduino Mega was necessary to s. An open water test is planned to investigate the maximum

1135 operational depth of the glider to validate the maximum [8] K. Isa and M. Arshad, “Neural network control of buoyancy-driven design depth. The ROUGHIE is expected to have 8 hours autonomous underwater glider,” in Recent Advances in Robotics and Automation, pp. 15–35, Springer, 2013. of non-stop glide cycles. [9] B. T. Hinson, M. K. Binder, and K. A. Morgansen, “Path planning to optimize observability in a planar uniform flow field,” in Proc. III.CONCLUSION/FUTURE WORK American Control Conference, 2013. [10] G. A. Hollinger, A. A. Pereira, and G. S. Sukhatme, “Learning This paper described the mechanical and electrical system uncertainty models for reliable operation of autonomous underwater vehicles,” in IEEE International Conference on Robotics and Automa- design. The ROUGHIE was designed to be low-cost and tion (ICRA 2013), 2013. accessible to various researchers while maintaining enough [11] P. Wang, P. K. Singh, and J. Yi, “Dynamic model-aided localization complexity to accomplish precisely controlled sawtooth and of underwater autonomous gliders,” in IEEE International Conference on Robotics and Automation (ICRA 2013), 2013. turning motion. Following that, the integration of sensors [12] N. Cao, K. H. Low, and J. M. Dolan, “Multi- informative path into the vehicle as well as the functionality of logging planning for active sensing of environmental phenomena: A tale of two and transferring this data when a communication link was algorithms,” in Proceedings of the 2013 international conference on Autonomous agents and multi-agent systems, pp. 7–14, International described. The main use of sensor data is to feed the Foundation for Autonomous Agents and Multiagent Systems, 2013. navigational controllers which were also developed in this [13] D. A. Paley, F. Zhang, and N. E. Leonard, “Cooperative control project. Specifically, our contribution is the development of for ocean sampling: The glider coordinated control system,” Control Systems Technology, IEEE Transactions on, vol. 16, no. 4, pp. 735– a modular, accessible, and inexpensive test platform which 744, 2008. enables researchers to advance the understanding of glider [14] E. Carlson, “Task allocation and path planning for collaborative path planning, motion control, and swarm cooperation. For autonomous underwater vehicles operating through an underwater acoustic network,” Journal of Robotics, vol. 2013, 2013. future work, we intend to use the logged data from the water [15] R. E. Davis, N. E. Leonard, and D. M. Fratantoni, “Routing strategies tests to perform a parameter estimation of unknown physical for underwater gliders,” Deep Research Part II: Topical Studies parameters, such as center of gravity, net buoyancy weight, in , vol. 56, no. 3, pp. 173–187, 2009. [16] J. Austin, “The potential for autonomous underwater gliders in large optimal angle of attack, etc. These parameters will then lake research,” Journal of Great Lakes Research, 2013. be used to complement the ROUGHIE mathematical model [17] J. S. et al., “The autonomous underwater glider ”spray”,” IEEE Journal developed in past works, and this incremented model in turn of Oceanic Engineering, vol. 26, pp. 437 –446, October 2001. [18] C. C. E. et al., “Seaglider: a long-range autonomous underwater could be used to quickly tune controller parameters using vehicle for oceanographic research,” IEEE Journal of Oceanic En- a simulation. Another interesting step is to use the sensor gineering, vol. 26, pp. 424 –436, October 2001. data to perform automatic trimming, reducing the overhead [19] D. C. Webb, P. J. Simonetti, and C. P. Jones, “Slocum: an underwater glider propelled by environmental energy,” Oceanic Engineering, IEEE time for the glider deployment. The zero input for the pitch Journal of, vol. 26, pp. 447 –452, October 2001. mass and the buoyancy weight can steer from its centers [20] J. G. Graver and N. E. Leonard, “Underwater glider dynamics and to achieve a fine trimming tuning without user intervention. control,” in 12th International Symposium on Unmanned Untethered Submersible Technology. Further studies will asses if the change in the neutral position [21] A. Wolek, J. Burns, C. Woolsey, J. Quenzer, L. Techy, and K. Mor- will degrade the performance of the controllers. Finally, a gansen, “A maneuverable, pneumatic underwater glider,” in Oceans, more robust and maneuverable prototype has been developed 2012, pp. 1–7, IEEE, 2012. [22] B. Mitchell, E. Wilkening, and N. Mahmoudian, “Low cost under- and is currently undergoing initial testing. A fleet of four of water gliders for littoral marine research,” in IEEE American Control these will be manufactured to research cooperative control Conference (ACC), 2013. strategies for underwater glider swarms. [23] A. PAO, “Successful test of new technology in anti-submarine ex- ercise,” North Atlantic Treaty Organization Allied Command Trans- formation (NATO OTAN) Multimedia, February 2011. Available at REFERENCES http://www.act.nato.int/news-stories/. [24] S. Fan and C. A. Woolsey, “Underwater vehicle control and estimation [1] N. Mahmoudian, Efficient Motion Planning and Control for Under- in nonuniform currents,” in American Control Conference (ACC), water Gliders. PhD thesis, Virginia Tech, 2009. 2013, pp. 1400–1405, IEEE, 2013. [2] N. Mahmoudian and C. A. Woolsey, “Underwater glider motion control,” in IEEE Conference on Decision and Control, (Cancun, Mexico), pp. 552 – 557, December 2008. [3] N. Mahmoudian and D. A. Paley, “Synchronization on the n-torus with noisy measurements,” in American Control Conference (ACC), 2011, pp. 4014–4019, IEEE, 2011. [4] N. Mahmoudian, J. Geisbert, and C. Woolsey, “Approximate analytical turning conditions for underwater gliders: Implications for motion control and path planning,” Oceanic Engineering, IEEE Journal of, vol. 35, no. 1, pp. 131–143, 2010. [5] D. Hernandez, R. Smith, E. Fernandez, J. Isern, J. Cabrera, A. Dominguez, and V. Prieto, “Glider path-planning for optimal sampling of mesocale eddies,” in Proceedings of the 14th International Conference on Computer Aided System Theory, 2013. [6] L. Paull, S. Saeedi, and H. Li, “Path planning for autonomous under- water vehicles,” in Marine Robot Autonomy, pp. 177–223, Springer, 2013. [7] E. Galceran and M. Carreras, “Planning coverage paths on bathymetric maps for in-detail inspection of the ocean floor,” in Proc. International Conference on Robotics and Automation, 2013.

1136