DEVELOPMENT OF AUTONOMOUS UNDERWATER VEHICLE (AUV) BASED ON ROBOTIC OPERATING SYSTEM FOR FOLLOWING UNDERWATER CABLE

.


INTRODUCTION
The world has experienced a communications revolution since 1988 when the first transoceanic fiber optic cable was installed connecting the UK, the United States and France.This is the result of a tremendous technological push and market appeal.Currently, network connectivity is highly dependent on underwater fiber optic cables, which later became something very important in our lives, given our social and economic dependence on the internet.Therefore, cable damage is very important to be detected immediately.Statistics show that about 70% of the total damage to underwater fiber optic cables is the result of external aggressions which are mainly related to human activities.Damage to underwater fiber optic cables occurs in shallow water depths of less than 200 m, due to fishing activities and ship shipping.Apart from that, the damage caused by natural disasters amounted to less than 10% of all damage.The damage occurs in both deep and shallow waters [1], [2].
The potential for damage to submarine cables is even greater if they are at sea with heavy ship traffic.As many as 75% are caused by illegal ship activities, one of which is fishing and stops in the submarine cable area [3].Number of fish fishermen still use the Cantrang method to find fish.This method has the potential to damage submarine cables because the depth of the Cantrang that is spread is sometimes the depth near the underwater communication cable [4].In addition to fishing activities, theft of submarine cables is also still common and becomes an obstacle.based on Law no.36/99 concerning Telecommunications, the sanction given to the perpetrator is a criminal sanction of imprisonment for 5 years [5].In addition, the danger of laying anchors carelessly also endangers other underwater cables such as gas pipelines and electricity pipelines [6].
The existence of traditional fishing boats, which are difficult to trace when crossing the SKKL, makes it difficult to detect possible damage to their location and whereabouts.Therefore, this project was created as a tool to carry out maintenance of the Marine Cable Communication Channel (SKKL) that stretches in the Indonesian sea.This tool is in the form of an Autonomous Underwater Vehicle (AUV) which is able to track cables automatically and is able to detect damage that occurs through the camera.The AUV is equipped with a camera sensor that is able to detect underwater cables, which are then processed to be able to move the AUV motor automatically to follow the direction of the cable.And then the damage that occurs can be detected by the camera which then the data is sent directly to the maintenance ship [7], [8].
The main objective of the proposed system is developing AUV for regularly check underwater cables automatically based on visual sensor.The proposed system has advantages on the performance for following underwater cable automatically.
The following are researches that have been carried out related to the development of AUV technologies.
Simple vision tracking of pipelines for an autonomous underwater vehicle has been developed by ref [9].It used 2D vision-based pipeline tracking system for Autonomous Underwater Vehicles (AUV) using a modelbased recognition approach.By extracting a square image from a 2D camera and with the help of sonar input and a compass that is used to guide the AUV to track the pipeline.
Wire Recognition in Image Within Aerial Inspection Application has been developed by ref [10].To determine the position of the power line and estimate the orientation of the cable in the image, it used the Gaussian elliptical function.This stage is followed by canny edge detection.The simulation results show that the estimated range of allowable angular error is about ±12˚.
High speed Automatic Power Line Detection and Tracking for a UAV-Based Inspection has been developed by ref [11].The Hough transform is used to extract line segments from power lines.According to the power line characteristics of the aerial captured image, they used K-means in the Hough space to group and filter the straight lines, and then detect the power lines.Lastly, a Kalman filter is used to track power lines in the Hough space, based on the continuity of the video sequence.The experimental results show that the proposed approach is effective in detecting and automatically tracking power lines in complex environments.
Power Line Recognition and Tracking Method for UAVs Inspection has been developed by ref [12].The power line is improved by bilateral linear filtering.Then, the Hough transform is used to detect power lines.Finally, in the sequential figure, the state of the power line is estimated, and the power line is tracked with that estimate.Tracking can reduce computation time.To verify the performance of the proposed method, experiments were carried out on real image data taken from the UAV.The results show that the proposed method is computationally time efficient but has a low success rate of power line recognition.
Robust Real-Time UAV Based Power line Detection and Tracking has been developed by ref [13]. it used a new method that can effectively adjust the threshold in the detection algorithm.First, a Region of Interest (RoI) was selected for further analysis and tracking of power lines.Then the kernel improved on edge detection and hysteresis thresholding in the Canny approach.Then each point in the image is mapped to the appropriate physical space.Through this mapping, the UAV can obtain the corresponding coordinates for all patches.Next, the Hough Transform is used to filter out irrelevant linear structures.Then, a new power line model is reconstructed based on the power lines and power poles detected in all patches.Finally, move to the next frame and repeat the same process from the beginning.The results show that the method in this paper has a better performance than the manual Canny and Hough transformation, especially on complex backgrounds.
Extra Matters Recognition of Transmission System Based on Hough Transform has been developed by ref [14].The transmission line detection system in the image is based on the Hough Transform and on the detection is analyzed if there are additional problems on the line.Before the detection of the transmission line, there are several stages of image processing.First, the RGB image color is converted to gray.After that, a spatial smoothing filter is used to improve the image quality.Tests were carried out on 150 samples.And as a result, the identification error rate is less than 15%.
Power Line Detection Via Background Noise Removal has been developed by ref [15].The background noise is reduced by classifying the Convolution Neural Network (CNN) before extracting the power line.The proposed method operates in three steps: 1) extracting power line edge features from the image, 2) using CNN classifier to remove background noise, 3) using Hough-Transform (HT) to locate power lines.In this paper, the test is carried out by comparing the proposed method with 2 other methods that have been widely used, namely the Gaussian Model (GM) and Spatial Contexts (SC).The test involves 3 performance indices, namely Precision Rate (PR), Missing Rate (MR) and False Alarm Rate (FAR).As a result, the proposed method is superior to the index precision rate and false alarm rate compared to the GM and SC methods.
Automated Guided Vehicle Using Robot Operating Systems has been developed by ref [16].It used an embedded controller integrated with the Robotic GUI operating system, which can be used to carry industrial goods and materials, public services, etc. AGV (Automated Guided Vehicle) is built with the latest sensors such as Oblu which is an IMU sensor, Kinect and software for parallel localization and mapping.This robot software section is mainly implemented using Python programming language and software frameworks, such as Robot Operating System (ROS), Open-CV, Open-Ni, etc.The control system in question includes self-localization, automatic search for accurate paths, and motion control.
The difference between the research that has been done with this research is on the object to be detected.Other studies detect objects such as pipelines and powerlines.While in this study is detecting an underwater communication.In addition, the robot that used is also different, in other studies is using UAV while in this study is using AUV.These two tools are clearly very different in their use.UAV is used for purposes in the land sector while AUV is used in the underwater sector.The cable detection method that used is also different.The other studies is using canny edge detection method, Kalman filter, Hough transform and some are using the Convolution Neural Network (CNN) method.In this study, the method is used a combination of thresholding and contour detection methods.The following functional specifications of the AUV: 1.The AUV dives manually using a remote control, the AUV is controlled manually until it finds the starting point of the underwater cable tracking automatically.2. After the point is found, the Switch mode is switched to autonomous mode so that the AUV can move automatically along the underwater cable.

Electronic and Mechanical System Design
The AUV is designed to be able to dive dynamically, automatically detecting and tracking underwater cables.This AUV design is included in the Observation Class AUV category which is specifically designed for light use only with a propulsion system to carry camera and sensor packages to where useful images or data can be taken [17].This drone uses a flight controller with the type MatekSys F405 -STD.Before being used, MatekSys The electronic system on this AUV is equipped with an underwater cable detection system using a Logitech c310 webcam camera.Images from the webcam are processed using the OpenCV library, an open-source library that focuses on simplifying programming related to digital images.
The visual image processing data is then published into the ROS system which will later be used to obtain output data in the form of a PPM signal issued by the Arduino to the flight controller in automatic mode.
In accordance with the type and classification, this AUV has specifications that are specifically used only for Observation.This AUV has a simple body designed specifically for light use only with a propulsion system to carry the camera and sensor packages to places where useful images or data can be captured.This AUV body only has one main component, namely an acrylic tube in which there is an electronic system package including sensors and cameras.On the right and left there are frames that function as holders for the four thrusters, the frame is also designed like a fish fin which aims to have good aerodynamics so that the AUV is able to dive and move dynamically and balanced in the water.
In the thruster section, it uses a brushless waterproof type of motor with a low KV so that the motor has a high torque, very suitable for underwater use so that it can drive a propeller that requires high torque to break up water currents to get a strong thrust.The motor is combined with the CW CCW 2 blade propeller, the two blades propeller has the characteristics of producing high speed with low torque, so it is very suitable for observation class AUVs that require agility with light weight only carrying a camera and sensor package so it does not require high torque to move.
This AUV can be operated manually using a remote controller using a PPM signal that is connected directly using a cable to the flight controller, while the automatic operation of the AUV is controlled based on the results of visual image processing obtained from camera captures in the form of Bisyal data which is then processed using the OpenCV library.then the data is processed again in the ROS system.The data is then published serially to Arduino to get output in the form of a PPM signal which is sent to the flight controller via Arduino digital pins.So that the PPM signal from the Arduino and the remote controller do not collide with each other, a switch is added which functions to regulate when the PPM output from the Arduino needs to be issued.This switch is called a mode switch.This switch is in the form of a toggle switch that is connected to the Arduino digital pin, whose data is published to the ROS system for processing so that it can be used to regulate when the PPM signal from the Arduino needs to be issued.The following is a flowchart of the work system on the AUV.

Detection System Design
Image processing is done using a Logitech C310 camera.This camera has a resolution of 1.3 MP and video with a maximum resolution of 720p at 30fps.In this image processing process, the incoming image is set so that it has a resolution of 640 x 480 due to lighten the processing load carried out by the Nvidia Jetson Nano.
After changing the image resolution, the next process converts the RGB color space format captured by the camera into a gray format.This is because the RGB color space of each of its constituent components (Red, Green, and Blue) is affected by the amount of light hitting the object, making the color selection process more difficult.By using the gray image becomes a black and white bar so that the thresholding process can be carried out more easily, the color of the image becomes easier to select.To further refine the image, the blurring process is carried out to get a smooth image [18].Next, the color thresholding process is carried out on the image that has been converted into gray format to separate the desired color from the background image.The result of this process is a binary format image where pixels that have the same color as the threshold value will be worth 255 (white) while the others will be worth 0 (black) as shown in the following image [19].

Fig 6. Thresholding process results
After the threshold is obtained, the next process is to find the contour.Contour is a collection of points that represent a curve that has the same color/intensity in the image.How to represent this curve in OpenCV with a vector where each entry in the vector encodes information about the location of the points that make up the curve.Looking for a contour is like looking for a white object on a black background.So that in order to easily find a contour in an image, the image needs to be converted first into a binary image which is the result of the thresholding process [20].
After the contours data is found, the data is re-selected to get the area with the maximum contours value (the widest area) using one of the Contours features, namely cv2.contourArea.In addition to the contour area feature, the contour function has a moments feature (cv2.moments) with this feature we can find the midpoint data of the widest area obtained from the x-axis and y-axis.
In this case, the data needed is x-axis data because the robot only needs data values to the right and left of the midpoint.The data can be used for the robot navigation process.From the object detection process, 2 parameters are obtained, namely the status of the object which represents the presence or absence of the object and the position of the midpoint of the contour area on the x-axis and y-axis.

ROS Framework Design
The main framework used in this robot uses ROS (Robot Operating System) which is a software framework in which there is a collection of programs and libraries that are integrated with each other which really helps to simplify programming [21].In this AUV, the ROS is used to communicate between programs, from the detection program to the PPM output program issued by the Arduino.In this ROS framework, there are 4 nodes and 4 topics that have different functions.Here is the ROS map used in this system.

Fig 8. ROS map diagram
The first node is the /Deteksi node which contains an object detection publish program that publishes its data through the /Deteksi Result topic to the /Status node.Next is the /Status node, this node contains the publish and subscribe programs that function to read then combine and publish data to the next node.This node subscribes to data from two topics, namely /ResultDeteksi which comes from the /Deteksi node and subscribes data from the /SwitchMode topic which comes from the /Arduino node.The program algorithm on this node is if the switch reads 1 then the node will publish data in the form of an integer obtained from the /Detect node, then if the switch reads 0 then the node will publish data in the form of an integer, in this case the author programmed the node to publish the number 1000 so that later the data easy to compare and process at the next node.The following is a programming algorithm flowchart on the /Status node.The /Arduno node also contains subscribe and publish programs.The /Arduino node subscribes to the /ToArduino topic whose data is then processed and used to determine the PPMout signal output value.In addition to subscribing, Arduino also publishes data from reading switches with the topic /SwitchMode whose data is used to determine whether the robot is in manual or auto mode.The complete Arduino system will be discussed in the next sub-chapter

Arduino System Design
The main component of the AUV automatic motion system is Arduino.Arduino is tasked with issuing an output in the form of a PPM signal to the flight controller.The PPM output that is issued is controlled based on the input signal originating from a node in the ROS system which has been discussed in the previous sub-chapter.In this case, Arduino acts as a subscriber that receives data and then it is processed into an output signal that is issued via Arduino digital pins.
Apart from being a subscriber, the Arduino ROS system also serves as a publisher where Arduino publishes reading data from the mode switch to be used as an indicator of whether the robot operates manually or automatically.Here is the Arduino programming algorithm as a Publisher and Subscriber.

RESULT AND DISCUSSION
In this chapter, some experiments that have been carried out and their results will be presented which aims to determine/measure the ability of the AUV made.

Object Detection Test
This test is carried out to observe the object detection process with visual image processing methods in several conditions that may occur when the AUV dives in the automatic tracking process.This aims to determine the reliability of the method in the process of detecting objects from optimal to non-optimal conditions.
Figure 12 shows the results of the object detection process properly and perfectly with thresholding and contours detection methods.The selection of the right color threshold value in the gray image and good and stable lighting causes object detection results to run optimally.The position of the object can also be known accurately.

Fig 12. Detection of objects under optimal conditions
Furthermore, the object detection process in conditions that are not optimal.This condition is caused by poor lighting conditions, so that the threshold is not able to distinguish black and white in the gray color format.

Fig 13. Detection of objects in non-optimal conditions
In this experiment, the accuracy level of the object detection system was also observed with 4 different lighting conditions, namely when there is enough light, low light, dark light and dark lighting conditions with the help of an LED highlight.The three conditions were tested at the same place at different times to obtain different light intensities from the sun.The test was carried out in an outdoor pool with an area of 2 meters x 3 meters with a depth of 1 meter.This test is carried out by running the robot automatically at a depth of approximately 50 cm.
Here is the first test, namely conditions when there is enough light.This test was carried out at 16.00 WIB, when the sun was still bright.The results of this test, object detection looks very accurate.Threshold is able to distinguish black and white colors well.Next is testing when conditions are low light.This test was carried out at 17.00 WIB where the sunlight began to dim.The results of this test object detection look less accurate, there is a lot of noise around the object, this is due to the threshold starting to have difficulty distinguishing black and white colors.The third test is a test when the light conditions are dark.This test was carried out at 18.00 WIB where the sun had dimmed.The results of this test object can no longer be detected.Threshold is no longer able to distinguish between black and white.The last test is a test when the light conditions are dark with the help of a 12 V LED lighting beam.This test is carried out at 18.00 WIB where the lighting conditions around are dim.The results of this test can detect objects again, but there is a lot of noise and parts of objects that are close to the 12 V LED cannot be detected.This is because the LED lighting is too bright, so the threshold is difficult to distinguish between black and white.However, at the border of the 12V LED range, it can be detected, this is because the object gets the right lighting, not too little and not too much.

Graph of Test Results Against
Water Turbidity Level

Fig 1 .
Fig 1.Schematic and illustration of AUV with cable tracking system

Fig 5 .
Fig 5.The results of the process of converting RGB to gray format (left) and the results of the blurring process (right)

Fig 7 .
Fig 7. The final result of the cable detection process

Fig 9 .
Fig 9. Node /status algorithmThe next node is the /Direction node.This node contains subscribe and publish programs that serve to simplify and determine the direction of the robot's motion.This node subscribes to the topic /Mode from the previous node, namely /Status.The following is the program algorithm on the /Direction node.

Fig 10 .
Fig 10.Node /direction algorithmThe /Direction node then publishes data to the /Arduino node with the /ToArduino topic.The /Arduno node also contains subscribe and publish programs.The /Arduino node subscribes to the /ToArduino topic whose data is then processed and used to determine the PPMout signal output value.In addition to subscribing, Arduino also publishes data from

Fig 14 .
Fig 14.The results of testing the detection program with sufficient lighting parameters

Fig 15 .
Fig 15.Test results of detection programs with low lighting parameters

Fig 16 .
Fig 16.Test results of detection programs with dark lighting parameters

Fig 17 .
Fig 17.The results of testing the detection program with dark lighting parameters with the help of a 12 V LED light The experiments carried out include Object Detection Test based on AUV motion speed, Object detection test based on light intensity, Object detection test based on level of water turbidity, Object detection test based on water current disturbance, etc.