Development stages of a semi-autonomous underwater vehicle experiment platform

The design of underwater unmanned vehicles is an interdisciplinary study that includes several fields, such as computational fluid dynamics, modeling and control of systems, robotics, image processing, and electronic card design. The operational cost of such vehicles is high because it is dependent on variable fluid properties like salinity and high pressure while its’ mobility must be resistant to environmental conditions such as undersea. The study describes an operating platform, called Lucky Fin, on which the students can develop various control algorithms and can test and extract hydrodynamic parameters of the underwater vehicle. The platform consists of an underwater vehicle and two testing tanks. The control card, the user control program interface, and a manipulator’s arm are designed to be used for a series of control applications such as depth, heading, target tracking, and capturing. The results of several tests are illustrated in this article.


Introduction
Underwater vehicles (UVs) perform several tasks, such as diving to the desired depth, docking under demanding conditions, and visual inspection of specific underwater structures 1 while keeping the heading angle tangent to the desired trajectory. An experimental environment can be set up to facilitate the development of different control methods, which result in reasonable performances. For this purpose, Miorim et al. 2 have developed an educational tool for remotely operated vehicles (ROVs). They have extracted the requirements of a control center for educational purposes, which provides different high sea ROV operations. Fletcher and Harris 3 developed a virtual environment (VE) system for training the piloting skills on ROVs. The VE system contains some mission operations including maneuvering, integration of sensor data, and situational awareness. Eng et al. 4 prepared a method for online identification of autonomous underwater vehicle (AUV) dynamics in field experiments. They use the models to estimate the maneuvering radius of the AUV at altered speeds and to design an optimized gain controller.
On the other hand, Wang et al. 5 have developed an AUV platform that carries a laser line scanner to maintain an accurate and stable altitude. For doing this, the vertical thrusters are operated around the zero point, and the direction of the thrusters has been altered frequently. There are several competitions for ROVs and AUVs in which groups of students participate. These competitions encourage students to develop and share new skills in underwater technology and related applications. For this purpose, a depth control system has been developed for a microprocessorbased UV. 6 The depth information obtained by the pressure sensor is compared with the desired depth, and the error is eliminated by means of controlling vertical motors. DeBitetto 7 has used fuzzy controllers instead of traditional control methods in a similar study. The pitch angle is controlled using depth error information and its' derivative. In the mentioned study, the error and its' derivative are described by verbal variables, and each variable is separated into fuzzy membership functions (MFs).
Using the sliding mode observer and Kalman Filter, Kim and Shin 8 have determined the hydrodynamic coefficients of a vehicle with six degrees of freedom (DOF). They have extracted the block diagram model of the vehicle and have simulated its behavior of various reference depth and direction values. In these studies, various models related to the applications are used as UV models. Some of these UVs are cable-connected and ROVs, while the other groups are AUVs. The vehicles in the latter groups usually communicate with the surface system by means of acoustic modems. Both traditional 9 and novel 10,11 control techniques are applied to provide autonomous motion for UVs. Fernandes et al. 12 have managed to control a UV in four DOFs (yaw, sway, surge, and heave), and they have designed a controller to track an appropriate and smooth reference path with an unmodelled plant dynamics, the varying UV parameters, and the existence of environmental noise and disturbances. Image acquisition from UVs, acoustic transmission, and image processing are also significant subjects in this field. In a case study, images acquired from the UV are improved using Canny edge detection, Hue, Luma, and Saturation algorithms. 13 AUVs are generally equipped with at least one optical camera to acquire visual information about underwater locations. It is also essential for the estimation of AUV position based on the target of underwater objects. 14 Object tracking algorithms are used in many different areas, such as security systems, autonomous vehicles, robots, and traffic cameras. The common point is the defining and updating of the position of image frames in a video. 15 Traditional parameter estimation methods, which have been used to improve UV hydrodynamics, are towing experiments and pool tests. Building and operating towing tests for real size vehicles are quite an expensive method. 9 These experiments give very realistic results when vehicle sensors are sensitive. However, changing flow conditions in experimental studies make it difficult to get reasonable and precise results. Experimental studies on the determination of UV hydrodynamics require such a long period that lose time for research and development processes. Computational fluid dynamics (CFD) is an effective computer simulation and design method for determining hydrodynamic model parameters of UUVs. Therefore, the usage of computers and the CFD has been emphasized. The hydrodynamic behavior of a vehicle could be extracted by fluid dynamic imaging and simulations of the CFD. 16 In a case study, the mathematical model of a low-speed AUV was extracted by means of CFD analysis for two critical hydrodynamic parameters, which are added mass (M A ) and damping matrices. 17 The mechanical, electronic, and software designs of a UV test platform (TP), which has been developed by the Kocaeli University Electronics and Telecommunications Department between 2013 and 2020 and is called the Lucky Fin Project, are introduced in this study. The platform is composed of UV and lateral and vertical test tanks. Although the basic concepts are preserved, sensors, cameras, battery types, microcontrollers, and card designs have been modified in line with the development stages. Basic movements, such as diving, keeping the desired depth level or position angle, and tracking-grasping a target object, are provided by control systems. To achieve this kind of robust autonomy, the kinematic and the dynamic behaviors of the vehicle should also be determined and modeled. P (proportional), PD (proportional-derivative), PID (proportionalintegral-derivative), and ANFIS (adaptive neuro-fuzzy inference system) based controllers, which can respond to the desired commands within certain performance criteria, have been developed and tested on the platform. Some actual system parameters are identified and adjusted to improve the design. As the platform serves as a testbed for a set of experiments, the electronics and telecommunication engineering students can develop applications on a wide range of topics that they have learned during the lectures. Depth and heading control applications of the UV have been carried out and interpreted in the laboratory tests. In addition, image processing tests on target tracking and object capturing operations are also included. UV itself measures some parameters, such as orientations and corresponding velocities, referring to the body frame. These values should be converted by the kinematic model and interpreted into the Earth Fixed parameters of the shore computer. Some of the UV dynamic parameters are determined according to the simulations and experimental tests.
The study considers the benefits and contributions of designing a framework, Lucky Fin, for educational purposes UV development and testing. In doing so, it was inspired by some guiding works. Modest improvements and contributions are made to some of these studies in terms of equipment, design, and method, and the experimental setup emerged. An underwater robot experimental testbed was developed for depth control and temperature measurement. 18 A piston actuator moves up and down to adjust the sinking level of the robot in a glass rectangular aquarium tank. The piston as an actuator has a deadzone and deadband nonlinearity, which causes errors, oscillations, and instability. Accurate measurement takes 3 min, and 60 cm depth is reached by 1.55 cm deviations. The Lucky Fin Project was influenced by the principle of this work and aimed to improve it. The mechanical design of the passive diving robot, which consists of a tube and a piston, has been replaced by a UV with four DOFs, propellant motors, a camera, and sensorial equipment. Heave-surge and roll-heading movements are applied in cylinder-shaped horizontal and lateral tanks, respectively. More accurate depth control is achieved as given in the "Discussions on UV control applications" section. Various control methods have been proposed in the literature over the years. Sliding mode controllers (SMCs) are the common heading, depth, pitch, and yaw control methods applied to AUV systems. 19,20 Non-linear characteristics of thruster brushless motors with a dead zone result in heading error. When the error goes beyond a definite rate, the controller's effort to adjust it as a step disturbance and overshoots in the transient response could reach around five degrees. 21 Unmeasurable conditions, sensory noise, electromagnetic effects, and signal delays also degrade the stability and performance of the AUV heading control. 22 The high performance and high accelerations of brushless motors are of course indisputable. However, the motor driver design of Lucky Fin provided slower but precise and stable responses of DC motors within narrow angular ranges. A highly precise calibrated TCM3 electronic compass is water tightly insulated and located at the top of the vehicle. This location is outside of the electronic control hull and is away from the power layer and metal parts (Figure 9(b)). These adjustments let the vehicle less susceptible to electromagnetic disturbances and provide precise control of Euler angles. Vision-based positioning and tracking of an AUV have been used successfully in clean environments under restricted distances. 23 Specifically, AUVs equipped with robotic arm manipulators could execute high-resolution computer vision-based tasks, such as detecting and capturing objects within reachable distances of the manipulator. 24 Image processing algorithms are addressed in real-time underwater visual tracking operations. Hough algorithm proposed for localization operations increases recognition capability on pipelines. 25 Computational intelligence methods, such as artificial neural network based adaptive control systems, fuzzy cerebella model articulation controller, 11 and self-adaptive recurrent neuro-fuzzy control 10 methods, improve tracking performance and dynamic motion response of AUVs. Lucky Fin's object tracking task is accomplished with vision-based direction and surge control. While PD and ANFIS algorithms are performed for the mentioned control operations, the Hough algorithm is used for object detection. Autonomous systems consisting of a UV and a robot arm (RA) are designed to track underwater objects and detect their positions precisely. The object is detected by image processing, and the manipulator approaches the object with methods such as fuzzy control. 26 Some manipulators are controlled manually, 27 and in others, the object is captured with a fixed arm 24 or by hovering and vacuuming the object. 28 In this study, image processing and axial control algorithms are prepared on Raspberry Pi for detecting an object from the camera and capturing it with a manipulator. The mobility of the manipulator increases the DOF of Lucky Fin by two degrees and provides more flexible approach conditions to the object. The control card (CC) and software are original and open to development. CFD is a convenient method for parameter extraction of the UUV hydrodynamic model. 29 Control of movements in low speeds, such as sway, heave, surge, and heading, can be precisely modeled and simulated in terms of hydrodynamic coefficients, such as added mass (M A ), drag (C D ), lifting (C L ), and controller parameters. The combination of CFD simulation with free streaming turbulence models and experimental tests improves parameter identification. 30 However, confirmation of the hydrodynamic parameters obtained in the simulations with experimental tests is rare in the literature. Lucky Fin is a particular designed modular type of UV that has four DOF, and the relevant computeraided design (CAD) model is extracted for the first time. Cost-effective confirmatory experimental methods that are worthy of reference in testing complex-shaped modular UVs are included in the study.

Overview of the UV TP
For the mentioned control purposes, a TP consisting of a UV, CC, a control program interface (CPI) software, and two simulation tanks was designed and implemented ( Figure 1). Depth is measured by a high-precision pressure sensor where heading is determined by a three-axis electronic compass. The depth and heading control applications are applied in the horizontal tank ( Figure 1(a)) and lateral tank ( Figure 1(b)), respectively.
The CC in the UV and the CPI on the computer utilize the Universal Synchronous/Asynchronous Receiver Transmitter (USART) communication protocol. A CCD camera is set on the UV for monitoring and image processing. The CC drives two vertical, and two horizontal thrusters and optionally servomotors of a three DOF manipulator. Principally, the CC is designed for both remote and autonomous control applications. Thus, the CC operates the vehicle as an open or a closed-loop control system. In open-loop mode, control commands sent by the operator via the CPI are transmitted to the vehicle's actuators, and data from the sensor are monitored on the CPI. The closed-loop processes the sensory data and produces the control signals. Features of the vehicle are given in Table 1.

Kinematic modeling of the UV
The position and orientation of vehicles on three axes are calculated according to the kinematic model of the vehicle. Orientations measured by the TCM3 electronic compass in the vehicle should be converted by the Jacobian Matrix to be interpreted by the operator located next to the shore computer. The pulse width modulation (PWM) value of each motor is determined by referring to its' target axes. These equations are utilized in both three-dimensional model simulations by means of Matlab, and the equations are embedded into the CPI software for online orientation control applications. The most used kinematic equations are Euler angles and quadrature groups in these applications. 31 Euler angles. The origin of the UV coordinate system is returned until it is matched with the earth coordinate system's origin ðx; y; zÞ ( Figure 2).
A compact representation of the Jacobian matrix for the kinematic equations is written as where c, s, and t are abbreviations of cosine, sine, and tangent, respectively. The Jacobian matrix matches the Cartesian position vector with the angular Euler vector, which is given in terms of SNAME 32 where x 1 ¼ ðx; y; zÞ T is position vector and x 2 ¼ ðØ; q; jÞ T is Euler angle vector and both will be called an inertial reference system. Fixed linear and angular velocity vectors of the vehicle are given as follows The kinematic transformation of linear and angular velocities between local and earth coordinate systems are given as These variables are determined according to the earth coordinate system. In this case, the velocities of the UV are known and represented as the forward kinematic equation.

Dynamic modeling of the UV
Dynamic modeling deals with the relationship between the robot's resulting motion and the forces applied to the robot. 33 UUV dynamics are derived from the Newton-Euler equation of a rigid body in a liquid where t is the force-torque vector of the thruster motors. M is the sum of the rigid mass, and M A is the matrix of the vehicle. CðvÞ, DðvÞ, and gðhÞ are the total Coriolis, Drag, and gravity-buoyancy matrixes, respectively. The study is limited to the determination of mass matrix for the UV: The M consists of rigid body mass, M RB , and added mass, M A , matrixes M RB is defined as 32 Àmy G mx G 0 ÀI zy ÀI zy I zz r c is the distance vector between the center of the body coordinate frame and the center of UV's gravity I B is the tensor vector of the vehicle body, 34 which is composed of I xx , I yy, and I zz inertial tensors occurring around x-, y-, and z-axes, respectively (Eq. (10)). UUVs are generally symmetrical in the x-z plane. Hydrodynamic friction must be reduced so that vehicles can move faster in the x-direction. For this reason, the front and rear of the vehicles are generally designed to be balanced and very close to symmetry in the y-z plane with respect to the center. In addition, it is taken symmetrically in modeling to facilitate operations. Although UUVs are not symmetrical in the x-y plane, they can be considered symmetrical because most vehicles operate at low speeds. 35 When UUV is symmetrical in all planes and the origin of the body reference frame is located at the center of gravity, in other words, r c ¼ ½ 0 0 0 T . (8) M A is given as follows When we apply forces on the x-, y-, and z-axes and moments around these axes to a vehicle, the water masses that need to be pushed resist the vehicle in these directions. Each element of the M A matrix represents the added mass of water to be pushed in the related direction. Each added mass is calculated by Newton's Second Law of Motion; for example, X _ u mass is a rate of change in UV acceleration according to the change of thruster force in the x-direction 32 Terms of M A depends on the UUVs shape. If a UUV is symmetrical in all planes and the body reference frame is the vehicle's center of gravity, the hydrodynamic M A can only be written in diagonal terms. Thus, except for the main directions or orientations stated on the prime diagonal, the M A terms could be accepted as negligible 36 Control methods PD and on-off methods. These methods are used for individual depth, roll, yaw, and heading control applications. The control output, ðtÞ, of a PD controller is given as where K p and K d are proportional and derivative coefficients of the error, respectively. 37 The PD control routine includes numerical representations of the error, integral, and derivation where eðtÞÀeðtÀ1Þ Dt is the numerical backward differentiation approximation of the derivation and Dt is the sampling period of the CC.
On the other hand, on-off control is a basic feedback system that switches the actuator from fully closed to fully open according to the setpoint of the variable being controlled. In such controllers, a dead band between the lower border (lb) and upper border (ub) can be placed to prevent chattering around a set-point ANFIS method. ANFIS is a structure that is a combination of a Sugeno-type fuzzy system with neural learning capability ( Figure 3). Such an approach makes fuzzy logic more systematic and less dependent on experience. ANFIS calculates inputs in a forward direction by means of fuzzification, production, normalization, and defuzzification layers and propagates back the resultant error to the MF parameters. 38 Backpropagation method is utilized for adapting the MF parameters, which provide the ANFIS model to learn the input-output characteristics of a system. 39

Four DOF Lucky Fin UV model
The Earth (E) fixed frame and the local axes that the vehicle can move are shown in Figure 4. If the horizontal thrusters run at identical velocities, the UV will move in the x-direction. When the same thrusters operated at different velocities, they will rotate around the z-axis with an angular velocity (r) and an angular displacement ( ). When the vertical thrusters of the vehicle run at identical velocities, it dives in the z-direction. When it operates at different velocities or in opposite directions, it rotates around the x-axis with its angular velocity (p) and an angular displacement ('). The highest velocities obtained by the Lucky Fin vehicle during the experimental studies are given in Table 2.

Image processing and target tracking methods for robot vision systems
After starting image processing applications, the analog camera used in the early days of UV design was replaced by the digital Raspberry Pi Camera. OpenCV is a computer vision open-source library of Intel, which provides a high level of algorithms and functions for robot vision problems. 40 red, blue, and green (RGB) and hue saturation value (HSV) models that are suitable for the OpenCV format could be used. The minimum and maximum values of the color can be obtained during the conversion process from RGB space to HSV space. Hough circle transform is a method widely used in image processing to detect circular shapes where many applications, such as eye recognition, license plate detection, the ball finding on the football field, can be done. 41 With this method, shapes are determined as follows: edges of the image are detected, and the image is converted into binary. Edge pixels are voted on the accumulator. According to the result of the accumulator, the shapes with the highest votes are more likely to be found in the image. The detected geometric shapes can be displayed as an output of the image. As an example, a green circle is drawn when a red object is detected ( Figure 5).
Since circular shapes are expected to form in the image, the accumulator array consists of the center points (a, b) of the circle and the radius value (r). Equation (17) illustrates the central circle formula. Positions x and y are given in (18) and (19), respectively.
Once the angle is valued between 0 and 2p, it can be determined whether a point is on the circle or not. The circle with the highest number of voted values in the accumulator is drawn. Following the image has been processed, the thruster velocities should be adjusted proportionally according to the position of the object. If we consider the vehicle camera window where the image is shown as the xy coordinate plane: The velocities of the thrusters should vary continuously referring to the y-axis of the window. If the target object is on the right or on the left of the y-axis, left or right thrusters should run faster, respectively ( Figure 6).
In order to change the speed of the motors, the PWM signals generated on the controller card should be sent to the motors. 42

UV and manipulator systems for object capturing operations
The integration of the UV and the RA(UV þ RA) has facilitated operations, such as repairing oil platforms, detecting and welding leaks of pipelines, collecting underwater objects, and investigating deeply submerged wrecks. 32 Images of underwater objects can be sent to the operator on land. The operator's arm movement could be  detected by image processing methods, matched with the angle movements in the manipulator's joints, and consequently, the object is grasped. 43 Seashells could be detected at a depth of 100 m using image processing methods and be collected by the vacuum system of a fixed arm mounted on the vehicle. 28 One of the educational experiment designs in this study is deal with RA applications. 44 Detecting an object from the camera on UV þ RA and capturing the process of the target object are carried out by means of image processing and axial control algorithms. The UV þ RA was also used in an ROV competition. The manipulator ideally provides two more DOF to the UV, and consequently, conditions for approaching the object would be more flexible (Figure 7).

Controller card (CC) design
The developed UV CC includes two microcontrollers (mC), which are ARM Cortex M4 based STM32F407VGT6 (STM32) mC and a BeagleBone Black development card. The BeagleBone hosts an Arm Cortex-A8-based mC. According to the applications, these two microprocessors share the tasks (Figure 8). In the later studies, BeagleBone Black is replaced with Raspberry Pi minicomputer. 45 The CC is designed to be powered by a 12 Volt battery pack. The supply voltage is reduced by the switched-mode converters till the required levels of the microcontrollers and the sensors. A 12 V SEPIC battery charging unit is added to the card. The STM32 mC undertakes the tasks such as the PD control process by means of the sensors and thrusters and commands of on-off switches of the lightning and the camera. TCM3 electronic compass, GY-80 inertial movement unit (IMU), and WIKA S10 pressure sensor are used to acquire direction, velocity, and depth data, respectively. The pressure sensor and electronic compass are set under and upper parts of the UV, respectively ( Figure 9).
For instance, the calculation of the depth data by the CC is given as follows cm (20) where ADC is analog to digital conversion data of the measured pressure. In the later stages, the analog WIKA S10 sensor is replaced with a digital BAR 30 depth sensor. The mC uses the data from compass and IMU sensors as feedback while it sends the processed data to either the BeagleBone Black card or the control interface directly. The CC is designed to control up to 8 DC and 8 servo motors for thrusters and manipulators. Servo motors can directly be driven by PWM outputs of the mC. The reserved outputs to servo motors are used for electronic speed controllers of the applications, such as brushless DC motors, which require high power. H-Bridge drivers are designed to control the speed and direction of the DC motors. The USART, I 2 C, and 1-Wire communication protocols are implemented for communication among the microcontrollers, sensors, and the interface. The USART protocol   allows long-distance communications at low speeds, whereas the I 2 C protocol allows fast data transmissions ( Figure 10). The CC contains four USART lines, and one of them is between TCM3 and STM32. The others are the CPI-STM32, BeagleBone (BB)-STM32, and BB-CPI.

The CPI
The CPI, which is written in C # programming language, is a computer user interface that interacts with the vehicle's hardware and allows for monitoring and controlling of the UV both in manual and automatic modes. In the manual mode, the orientation of the vehicle is manipulated either  by graphical CPI buttons or by a keyboard. The CPI can capture images and video, acquire data, and plot the status graphics of the UV (Figure 11).
CPI supports USB cameras. However, as the cable distance between the computer and the UV is not close enough, the image is transferred analog through the coaxial line of a non-buoyant cable. The received analog video image is converted to digital by means of a USB image capturing device. Since the CPI initializes communication with the vehicle, it starts to record the vehicle data into a database file labeled with the date and time information. The CPI includes the option to monitor, graph and report recorded data, such as pitch, yaw, depth, heading, supply voltage, motor currents, and controller output.   and heading control applications are prepared and uploaded to the STM32 mC.

Depth control tests
The depth control application is completed by means of the PD method, whose parameters are defined by trial and fault. The step response of the UV to a 40 cm set value as the required depth is given in Figure 12.
While the thruster's current load influences the supply voltage (12 V) of the analog pressure sensor, ripples are observed in the depth graphic. Their supplies are separated in the latter CC versions. The UV dived from 10 cm (around the surface) to 40 cm depth in 6.7s. Percent maximum overshoot (%MO) is %17. Settling time (t s ) is around 12.3s. A considerable steady-state error (e ss ) has not been observed (Table 3).

Heading control tests
The lateral pool is engaged to the TP for heading (yaw) control application. Digital electronic compass (TCM3) and horizontal thrusters are used for the feedback and actuation, respectively. Within the heading control experiment, the UV is subjected to on-off and PD control tests ( Figure 13).
In the initial phase of the test, the UV was positioned þ50 clockwise from the north. It is subjected to a shifting effect to the left or right side around 10 and is expected to return to the set value. In the on-off control test, the UV had oscillations (overshoots and undershoots) around and has not settled to the reference value. For this reason, measuring of t s and e ss could not be available (NA). Response of the UV improved by fine-tuning the K p and K d Figure 11. The CPI of the UV. CPI: control program interface; UV: underwater vehicle.

Figure 12.
Step response of the UV depth control system. 46 UV: underwater vehicle. parameters. The procedure is applied likewise to the UV for PD heading control. Following three large ripples, the UV settled to the reference value of 52.5s ( Figure 13). Performance comparison of the two methods is given in Table 4. Consequently, the PD controller performed better than the on-off controller.

Image processing for object tracking system
Analog camera and BeagleBone Black minicomputer are replaced with Rasberry Pi camera and Raspberry minicomputer, respectively. UV control applications are carried out by the appropriate image processing methods: Imutils, PIRGBarray, Deque, Argparse, RPI.GPIO, time, CV2, and NumPy Libraries are utilized in a series of tasks, such as camera interface, masking, object tracking, production of PWM data, image processing, various kind of functions, and storing huge sizes of position data and RGB data in arrays. Within the scope of this application, the position changes in circular objects are determined by using the "Hough transformation" method and the tracking process implemented according to this position. 41 The largest contour is determined after masking and enclosing the object center. A line is drawn between the origin of the UV camera and the central coordinates of the object. Then, the radius of the target is calculated by finding the inner side of the circle. If the diameter of this circle we have found falls down a certain value, horizontal thruster motors run proportionally. The control signal is a function of E both in P and ANFIS methods Proportional (P) control method. The control signal (U) proportional (Kp) to the error 37 is carried out for adjusting both surge velocity and heading angle refers to the deviation (E) in pixel coordinates U ¼ KpÃE A further object moves from the origin, and more errors occur. According to this error, if the object is on the right side, the speed of the left horizontal thruster proportionally increases, and the speed of the right horizontal thruster decreases. Contrariwise, the opposite situation is true for the left side. E is determined to refer to the difference between the central position coordinates of the object and the origin of the vehicle camera ( Figure 14).
ANFIS control method. ANFIS has one input (E) and one output (U) with three rules, where E is the deviation from the origin of the Lucky Fin Camera in the x-axis E ¼ Origin of UV camerað455pixelsÞ À the origin of the object (23)   While Table 5 is designed to demonstrate heading control, the basic rules for surge control are similar.
The model is trained and tested referring to 37 training data and 20 testing data, respectively. The data indicate a linear relationship between heading deviation [À275, 0, þ275] and motor drive PWM ratios [À100, 0, þ100]. However, a camera lens is monitoring the deviation larger at the center and smaller than it should be at the corners. In addition, the left motor stops under 20% PWM, and the torque of the right motor is slightly strong (around 2%) for identical PWM values around zero grade. For this reason, the data set is improved by several tries and faults ( Figure 15).
Negative outputs proportionally activate the left motor in the forward direction and the right motor in the reverse direction. In a contrariwise situation, the opposite operation is true. Trained MFs of E are given in Figure 16. Singleton MFs TL, S, and R are located on À275,0. and þ275 of output variable U.
Related input is fuzzified using Gauss MFs according to trained parameters m A e ðxÞ ¼ e À ðxÀcÞ 2 2s 2 (24) Here, c and s are the parameters that determine the center and width of the Gaussian Curve, respectively. 48 Fuzzy inference system is executed to refer to fuzzification, production, normalization, and defuzzification processes ( Figure 3). ANFIS functions, which are operated in each layer, can be extracted by programming codes step by   step. 38 Execution of fuzzy rules for an example input, E ¼ À146 pixels, are illustrated in Figure A1.
According to E, the motor direction and the PWM ratio applied to the motors are adjusted. Out-of-water tests validate the vehicle's response to the object with the appropriate PWM values. The values captured by the camera are transferred to the computer via Wi-Fi ( Figure A2), and the underwater tests of the UV were successfully accomplished. The vehicle is computer-controlled and able to move autonomously by the CC. As a result of these operations, the image of the object in the camera is shown in Figure 17. The location information output by writing the line of code is as follows $ python3 object_tracker.py This output means that the radius of the target is reported as 44 pixels to the frame interface and the center coordinates of the target are N (x, y) ¼ (455, 478) ( Figure 17). The related control algorithm is given in Figure A3. The object tracking program controls two parameters: Heading control refers to deflection E from the target, and surge control refers to distance E from the target. PWM rates of motors reacting to the E signals are the same for both control procedures. The direction of rotation is identical for surge control but reverse for heading control. Experimental results of the heading control tests for PID and ANFIS methods are given in Figure 18. 49 Feedback control by the image process, in general, reduces E, and reasonable results have been achieved for object tracking operations. The controller settles the UV to the direction of a target under 3.5s for both methods ( Table 6).
The maximum overshoot in the ANFIS control is lower than in the PID control. In addition, the settling is achieved earlier in the ANFIS control than in the PID control.

Image processing tests for the UV þ manipulator object capturing system
OpenCV and real-time image processing libraries are installed on Raspberry Pi. The application is started with the detection of coordinate points of the object and end effector in the image and the calculation of the distance between them. The distance is calculated on a pixel basis on the two-dimensional image space and is converted to cm. The image captured by the camera is in RGB space and is transformed into HSV space. The object and the end effector of the manipulator RA are labeled in blue and red colors, respectively. Threshold values of red and blue colors in HSV color space have been already determined in the image. Original and thresholded images are shown in Figure 19.
The coordinates of the end effector and the target object are determined and used to drive the motors. Pixel distance between two points, jABj, is accepted as an error that should be reduced by proportional control Considering the x-axis, the coordinate of the end effector marked in red is x 1 and the coordinate of the target marked in blue is x 2 , where y 1 and y 2 are the coordinates of the end effector and target along the y-axis, respectively. The camera feedbacks the jABj to the servomotors by (22), where Kp is selected as 0.7. In this application, the UV was not moved except for the manipulator part. Details of the vision-based manipulator control on the UV are illustrated in Figure A

Tests for estimation of some dynamic parameters
Hydrodynamic effects resulting from the movement of the Lucky Fin UV and M matrix parameters of the UV dynamic mathematical model are examined both in simulation and experimental tests. The results are insufficient; however, they will lead to constructing proper test setups for the future determination of full dynamic parameters of the Lucky Fin. In this application, CFD analysis is addressed to determine M RB parameters of the Lucky Fin, whereas experimental tests are applied to determine M A parameters. Solidworks CAD model of Lucky Fin is defined in finite small elements, and k-e turbulence model is extracted, 50 which is used in the CFD analysis. The vehicle is analyzed for M RB and hydrodynamic inertial moments in three axes by means of flow simulation and ANSYS fluent CFD software ( Figure 21). Refer to the simulation results, M RB is as follows 34 Some tests of Lucky Fin were conducted by the TPs in the Electronics and Telecommunication Engineering Department of Kocaeli University. Two different forces (9 N and 4 N, respectively) are applied to the UV in the first half and second half of the surging movement. Corresponding accelerations are measured as 0:2 À 0:022 m/s 2 , respectively ( Figure 22). Observed velocities of the vehicle were 0.12 m/s and 0.06 m/s. X _ u mass is a change in UV acceleration that refers to a change of thruster force in the x-direction, and it is determined as 0.281 kg (Eq. (12)). Similarly, test results are observed in the heave direction ( Figure 23). The same forces are applied by the vertical motors, and accelerations are observed as 0.002-0.08 m/s 2 . Velocities are 0.11 m/s and 0.24 m/s. Z _ w mass is the change in UV acceleration refers to the change of thruster force in the z-direction (12) and is calculated as À0.833 kg.

Conclusion and future works
A UV platform is designed to utilize for research and development purposes in Kocaeli University Engineering Faculty. Students have implemented their projects and combined their theories with applications of the concepts, which are taught in the Department of Electronics and Telecommunication Engineering. The modeling and design phases of the UV platform are given, followed by some experimental developments that illustrate the transition efforts to autonomy.
However, the primary purpose of the experiments did not focus on optimization. Students can develop novel methods on the platform. For instance, a student group from Kocaeli University has developed a two-axis arm manipulator, which has been attached to the UV. The UV with manipulator system is joined to the MATE-ROV 2016 International Competition. A student group developed image processing applications on which the UV tracked an object, where ANFIS and PID heading control methods are used. In these studies, the performance of the ANFIS control method was higher than the PID control method.
UV is planned to be put into practice in several half autonomy applications, such as line tracking, path planning and tracking, diving buddy (diving assistance), teleoperations, and inspection of environmental pollution in receiving water bodies in future works. By means of the TP, a series of force-moment tests could be applied to the UV. This will result in finding the hydrodynamic parameters of a vehicle. These parameters would allow simulations of CFD Programs. 16 Dynamic model of a low-speed UV could be obtained by means of CFD analysis. 17 UV measures some parameters, such as orientations and corresponding velocities referring to the body frame. These values should be converted by the kinematic model and interpreted into the Earth Fixed parameters of the shore computer. Some of the UV dynamic parameters are determined according to simulations and experimental tests.
Onboard CC design, algorithms developed for depth, heading, target tracking, grasping control and image  processing, kinematic and dynamic modeling for future simulation, and controller optimization studies bring about partial autonomy to conventional ROVs.

Acknowledgment
The author would like to thank Ayako Tajima for her contribution.

Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.

Funding
The author(s) received no financial support for the research, authorship, and/or publication of this article.

Supplemental material
Supplemental material for this article is available online.