Waypoint Tracking Control for Autonomous Mobile Sampling and Dissolved Oxygen Enrichment of Unmanned Surface Vehicle

An autonomous monitoring and control system of unmanned surface vehicle (USV) with mobile water quality monitoring, sampling, and oxygenation functions is constructed. The control hardware and monitoring conﬁguration software of the system is designed, respectively, which can be installed on USV and its remote control and monitoring terminal. The kinematic modeling of USV, waypoint trajectory-tracking control, distributed controller, simulation of tracking control, and veriﬁcation of software and hardware design are carried out. In order to reject the system noise and external noise, a states estimation method with fully observable states is considered in the control law design. The software and hardware are also implemented to verify the ef-fectiveness of the monitoring platform. Through setting a series of monitoring target points and monitoring parameters in the conﬁguration software of the remote user terminal or in the APP of the mobile user terminal, the USV can realize the automatic cruise monitoring using an autonomous navigation and tracking control algorithm, and quantitative water sampling collection. The reliability of the system is veriﬁed by the experiment of the shore test station, and the waypoint trajectory tracking and sensors data are replaying in a logview GUI of MOOS-Ivp and APP.


Introduction
e online monitoring system of water quality can monitor the water quality all day. e data from the water quality monitoring system can reflect the water quality or water pollution, and the system can provide reliable data for water environmental management [1]. At present, the monitoring equipment of water quality on the market mostly are usually in a shore monitoring station for a fixed-point monitoring in the water, which has not the mobile monitoring capability for a large area of water surface. Currently, the water quality monitoring technology can be carried out manually, but it lacks autonomous, frequent, and efficient monitoring schemes [2,3] and various USV platforms [4]. Recently, the remote-control unmanned boat with sensor monitoring is designed to realize the water surface monitoring, but the unmanned boat does not have the automatic oxygen enrichment and fixed depth water sampling function, which does not have the autonomous navigation and control ability. e fixed-point jetting mode is often used in the water body aerator, which has great disturbance to the water body. e single monitoring, sampling, and aeration equipment cannot complete a large range of monitoring and water sample collection of water area in a short time, so a networked monitoring mobile platform containing many USVs can be used for urgent monitoring. e researchers from the University of California, Berkeley, has developed a floating cylindrical device to monitor the water quality [5]; It has sensors installed at the device bottom and sends sensors information wirelessly. It has the ability of positioning itself with GPS device and moving around with small propellers powered by lithium-ion batteries. Kaizu et al. has developed an unmanned hovercraft for water quality mapping, which can collect temperature, dissolved oxygen, turbidity, conductivity, pH, and chlorophyll data [6]. For water real-time monitoring and control, the integration of microfluidic chip and micro-optical system suggests possibilities. In [7], for the spatially distributed characterization of microfluidic two-phase phenomena, the authors present a polymeric micro-optical system that consists of two coupled miniaturized devices. In [8], the authors proposed a low-cost, completely open source, USV for real-time measurement and detection for the surface water quality in complex environments. e platform is equipped with various water sensors to collect pH, turbidity, and temperature data for actual water quality investigation. Trajectory-tracking control of USV waypoint has important theoretical and engineering significance for the water quality monitoring of USV [9]. However, because of nonholonomic constraints, the USV control system does not satisfy the Brockett necessary condition for stable control [10]. erefore, Kanayama et al. adopts Taylor linearization and dynamic feedback linearization methods to design a stable tracking controller based on tracking error model [11]. Jiang and Nijmeujer designed a trajectory-tracking control law using the backstepping methodwhich solved both the local and global tracking control problems [12]. In [13], the kinematic and dynamic models are first transformed into a unified standard form, and then, a new dynamic tracking controller is proposed to solve the global tracking problem of the nonholonomic USV. In [14], a global tracking control law is constructed by using Lyapunov direct method, and the nonholonomic constraint control is solved. In [15,16], the authors proposed the adaptive neural network control method to design the tracking control law. In [17], the authors presented a derivation of autonomous control algorithm, which can regulate the vehicle speed to a time-varying reference speed to improve the forward speed control. For open-loop operation mode of outdoor diving with wind speed limit, Roberts Luke et al. [18] used a low-power on-board processor and proposed a calculation model with an accuracy of 5 m.
To realize a large of water monitoring in a short time, we design a self-powered oxygen enrichment control system that can be installed in USV cabin, and the USV can cruise independently according to the monitoring points of users, also can realize the real-time monitoring of water temperature, pH, turbidity, oxygen, and conductivity of the monitoring points. Meanwhile, the monitoring and control system can collect water sampling. e control system includes a photovoltaic module, a remote communication and monitoring module, a sensor module, an aeration module, and a water sample collection module. e system can run autonomously according to the dissolved oxygen value. e reliability of the system is verified by the experiment of the shore test station. It can be applied to the water quality monitoring of a large range of shore surface aquaculture. It can be applied to the water quality monitoring of a large range of shore surface aquaculture. Furthermore, we develop a double-pushing USV with electric propulsions for monitoring. Its thrusters consist of two culvert thrusters symmetrically arranged at the bottom of the USV, which can be reversed and forward. e USV body changes the course of rotation moment caused by the different thrust generated by two culvert thrusters, which has good maneuverability and maneuverability.
e USV has functions of PWM motor speed control, automatic heading keeping, waypoint tracking, motion attitude monitoring, remote data communication, water quality sensing, and sampling. e USV has the characteristics of stable hull structure, lightweight, flexible control, and long endurance. At the same time, it can realize the expandable design of measurement module to meet the requirements of multilevel, diversified, and various advanced control algorithm verification experiments and teaching.

Design of Control and Monitoring System
e self-powered, oxygen enrichment control system for water surface movement monitoring contains two subsystems, that is, the power supply electronic subsystem and the data communication and monitoring control subsystem.
e control system consists of the control and navigation system for motion control and the data communication and monitoring control system for water sampling. e former is working for trajectory-tracking and motion control, and the latter is designed for water sampling and monitoring. e structure of the monitoring system is shown in Figure 1. e monitoring system is divided into control terminal on working ship and the USV control terminal. e USV terminal consists of main controller, motion controller, driver module, thrust, navigation sensors, and other controller terminals. e data communication and monitoring system for water sampling consists of a remote upper computer or mobile phone and a lower computer installed in the USV, as shown in Figure 2. e lower computer is composed of Delta PLC and analog quantity expansion module, intermediate relay, aeration device, water quality sampling equipment, and mps-400 water quality sensor unit, which completes the real-time data collection of dissolved oxygen, turbidity, temperature, pH, and conductivity water quality sensors. Both a computer and a mobile phone can be used as the upper control equipment. e software installed on the computer is mainly composed of the configuration software of Delta, SQLServer2005, and OPC server provided by the GiantControl Co. Ltd. rough the real-time configuration, the user can master whether the operation status of the aeration pump, push rod, and sensor is normal. e alarming threshold and aeration time of dissolved oxygen can be set in the upper computer. e communication between the upper and lower computers is carried out through the data transmission module GRM DTU203G. e remote monitoring and control can also be carried out by a mobile APP accessing the cloud server. e data collected by the system can be stored in the database of the upper computer and the cloud server at the same time, and the synchronization control and display can be realized. Because of the 4G Internet of ings mode, the system can realize the networked monitoring of multiple terminals and realize the integrated monitoring and task scheduling for multiple mobile monitoring platforms only on one upper computer. In this way, multiple mobile monitoring platforms work in parallel and can realize the monitoring, sampling, and aeration of large-scale water.

Waypoint Trajectory-Tracking
Control Algorithm e marine environment is extremely complex, and the external factors such as wind, waves, and current bring challenges to the intelligent design level of the control system of USV [19,20]. Also, the performance of a USV is influenced by the surface currents, risk of collision with the civilian traffic, and varying depths due to tides and weather [21]. In [22], the performance of a novel control strategy for imperfect systems associated with physical realizations is investigated, which takes advantage of the unavoidable imperfections. In [23], we have investigated the waypoints trajectory-tracking problem for unmanned surface vehicle with environment disturbance. An upper-triangle and diagonal matrix decomposition method of Unscented Kalman Filter for the environment noise is proposed. e estimated states are adopted to design state feedback control laws to achieve the finite-time stabilization. In this paper, in order to improve the adaptability of the USV to complex ocean conditions, a distributed intelligent control system is designed to improve the robustness of the control system to external disturbances. By designing the closed-loop feedback system composed of a shore station control terminal, on-board controller, navigation and positioning sensor, and driving motor, the closed-loop feedback servo controller of the control system of USV is realized. e specific process is kinematic modeling of USV, waypoint trajectory-tracking control, distributed controller, simulation of tracking control method, and verification of software and hardware design. According to the principle of functional modular design and conducive to all kinds of sensors for data measurement and communication, each functional module is designed. e designing of the monitoring and control system can be divided into two parts: the control hardware designing and the control software designing. Considering the mechanical structure of USV, the hardware equipment layout is carried out to meet the requirements of installation space and internal structure layout of the USV.
Firstly, two coordinate frames are adopted in this paper, which are inertial reference frame and body reference frame of the USV, respectively. e origin of the inertial reference frame is the coordinates of the starting point of the USV. e state vectors in the inertial frame are positions and steering angle of the USV, which are shown in Figure 3.

Journal of Robotics 3
After modeling the control system for trajectorytracking control, the kinematics equation of the USV is further described as follows [12]: where p � [x, y, θ] T denotes the states vector of the USV, (x, y) denotes the position coordinates in inertial frame, q � [], ω] T denotes the control input, θ � arctan(( _ y(t))/( _ x(t))) denotes the heading angle, and ] and ω denote the linear velocity and angular velocity, respectively. y c denotes the output of the control system. e trajectory-tracking problem of USV is described as the one how to design a control law about ] and ω to make the control system of the USV to track the reference trajectories [x d , y d , θ d ] T and the reference velocities ] d and ω d .
So, in the body-fixed reference frame, the error-based control system model shown in Figure 3 is given.   where T e is the transformation matrix in the inertial reference frame with respect to the body-fixed frame. Furthermore, we take the time-derivative along the solution of the system (2), so the kinematics equation of error-based model is rewritten as Actually, because of the external sensors noise and internal system noise, the control system is easily influenced by them. In order to reject the noise influence on the trajectorytracking system, a fully observable states based filtering estimation are considered in this paper. e output of the error system is y e � p e , so the error system equations with external and internal noise is written as where W and V are the system noise and measurement noise, respectively, which are both Gaussian white noises. e covariance matrix of W and V are Q and R, respectively. e vector p denotes the estimated value of vector p, vector p e denotes the estimated value of p e , and y e denotes the estimated value of y e . erefore, the stable error system equation with estimations is written as To carry out the rapid reach the predefined trajectory of the USV, we study the finite-time tracking control law. Also, the finite-time trajectory-tracking problem is how to find an appropriate velocity control laws about ] and ω of the following form.
e designed block structure of the controlled error system is illustrated in Figure 4. e reference trajectory vector p d is the output of the reference system which is controlled by the control input q d . So, the system block structure of Figure 4 is further transformed into the one shown in Figure 5.
In the Figures 4 and 5, NC denotes the nonlinear controller, Σ 1 is the controlled system (2), Σ e is the controlled error system, and Σ d denotes the following reference kinematics system of the USV.
For the control system with system noise and sensors noise, we can design the following control laws about ] in equation (7) and ω in equation (8). e control law of ] is designed as ] � ] d cos θ e + ω d y e − k 1 sgn y e y e β 1 − k 2 sgn x e x e β 2 , when θ e sgn θ e > k 4 k 3 , when θ e sgn θ e ≤ k 4 k 3 .
en, the filtering algorithm can be used to filter the system noise and sensors noise. en, we can obtain the estimated values of the error system states. With the estimation of error system states, we can further obtain the feedback control laws of the error system based on the estimated states.

Motion Controller.
e core processor is STM32 processor, the power supply voltage is 5VDC, with multi PWM interface and two serial ports, and the on-board temperature sensor. e RS232 serial port is used to communicate the main controller of the lower computer with the STM32 processor which receives the control command from the main controller of the lower computer. en, it unpacks the information according to the predefined protocol format, extracts the propeller speed command of the corresponding control field, and generates two PWM control signals according to the propeller speed command, which are sent to the electronic governors of the two channel underwater propellers through the PWM port, and then controls the propulsion. e motor rotates according to the given speed. At the same time, the collected lithium battery voltage and   the output current signal of electric regulation are packaged according to the predefined communication protocol format and sent to the main controller of the lower computer through the serial port. Two 1500 W ducted thrusters are used in the propulsion device which can be used for forward and reverse propulsion, and differential speed regulation is carried out by using the forward and reverse rotation of the thrusters. ere are three control signals, two of which are 5 V·DC power supply and the other is PWM control signal. e driving module adopts the 120 A bidirectional electric regulation module, and the power supply voltage is 24 V-50 VDC, with three-phase output. It receives the PWM signal from the lower motion controller. After receiving the control command from the main controller of the lower computer, the corresponding control information of the protocol is extracted. If the control information is "A," it is the autonomous control mode. If the control information is "M," it is the manual remote-control mode. e duration of PWM signal high level is 1000 us-2000 us, 1500 us denotes stopping, less than 1500 us means the thruster is reversed, and more than 1500 us indicates the propeller is positive turn. e multistage forward and reverse control of the propeller is realized by dividing 1000-2000 into several segments. e monitoring software of the upper computer is installed on the ARK2250 control board of the onboard controller. e 5.8 G wireless bridge terminal can receive measurement and control data within 6 km of the water surface. e motion control software of the upper computer is written in C++ language in MOOS-Ivp [24] and Ubuntu system. e waypoints tracking control result and heading and yaw control using MOOS-IvP pMarineViewer, pHelmivp, and pCompass, et al. modules. e tracking control experiment was carried out at the shore experimental station of SDIOI. e experiment of the  tracking control algorithm carried out inpAct module of MOOS is shown in Figure 6. e tracking effect of the proposed control laws is shown in Figure 7. e monitoring parameters such as temperature, humidity, and voltage with variables SENSOR_tem, SENSOR_hum, and SENSOR_vol in MOOS-IvP alogview are shown in Figures 8 and 9.

Dissolved Oxygen Control.
e minimum value of dissolved oxygen can be set according to the actual situation of the water body. In the software and APP, the default value of minimum dissolved oxygen is defined as 5 mg/L. e start and stop of the oxygen enrichment equipment is based on the average value of dissolved oxygen detected by the sensor within 5 minutes. When the average value of dissolved oxygen is lower than 5 mg/L, the oxygen enrichment equipment will start and run automatically. When the average value of dissolved oxygen in this period is higher than 5.5 mg/L, it will stop. When the dissolved oxygen is lower than 5 mg/L again, it will start again until the accumulated time is 30 minutes. erefore, the dissolved oxygen in the water is not less than 5 mg/L, and the self-purification  capacity of the water is forced to be improved. e minimum value of dissolved oxygen and automatic aeration time can be set on the remote terminal. e minimum value of dissolved oxygen can be set to 4 mg/L, and the maximum value can be set to 6 mg/L. Moreover, the dissolved oxygen value when the aeration pump is shut down is 0.5 mg/L higher than the minimum value, which can prevent frequent start-up and stop of the aeration device. e maximum aeration time is 30 min, and the minimum aeration time is 30 min. rough the 4G Internet of ings technology, the remote interconnection and monitoring of multiple monitoring USV platforms are realized.
rough the software configuration, the functions of remote start and stop, and automatic water sampling system fault alarming are realized, which can provide users with accurate data on site and improve the work efficiency.

Conclusion
Autonomous control system for mobile water quality monitoring, sampling, and oxygenation is designed. e proposed trajectory-tracking algorithm is carried for the heading control of USV. e tracking error is acceptable with proposed control law. e experiment shows that the USV can stop in the target location although the error is larger during its deploying. e control and monitoring system can transmit the collecting water quality data to the cloud server and PC with OPC server and share the water quality information with the public through the application program. It shows the start-stop exchange for dissolved oxygen enrichment is frequent in the domain of predefined value, and we should improve its control procedure to low the exchanging number using the proposed control algorithms. In addition, the cheap USV platform allows the fabrication of multiple USV units for simultaneous monitoring of water quality at multiple locations. Moreover, some consideration about the possibilities of using lab-on-chip innovative devices and equipment based on microfluidics should be made. In addition, the proposed USV platform can become an effective and interesting teaching tool for students in the field of marine robot's motion control and autonomous navigation.

Data Availability
e data used to support the findings of this study are available on request.

Conflicts of Interest
e authors declare that they have no conflicts of interest.

Authors' Contributions
Jian Yuan proposed the control scheme and constructed the control algorithms, hardware, and software. Hailin Liu performed the algorithm examination of PWM control.
Wenxia Zhang analyzed and interpreted the obtained data regarding the navigation and control experiment.