Development of Unmanned Surface Vehicles System for Water
Quality Inspection
Wenxuan Guo
1
, Yusen Tang
2
and Jianjun Wang
1,*
1
School of Naval Architecture and Ocean Engineering, Huazhong University of Science and Technology, Wuhan, China
2
Faculty of Arts, McGill University, Montreal, Canada
Keywords: Unmanned Surface Vehicles, Water Quality Inspection, Internet of Things, Mobile Terminal, MQTT.
Abstract: In recent years, the problem of water pollution has attracted wide attention all over the world. To strengthen
water quality monitoring, a water quality inspection system for Unmanned Surface Vehicles (USV) based on
the Internet of Things (IoT) was designed. The system uses the Message Queuing Telemetry Transport
(MQTT) protocol to construct the boat-cloud-shore communication link. Design the terminal system of the
USV to realize state perception, motion control, and data sharing. The mobile client is developed based on
the Android platform, which supports real-time monitoring and remote control of the USV. Automatic control
of USV movement and real-time monitoring of water quality is realized. After the actual water surface trial,
the communication of the system is stable, with manual remote control, fixed-point inspection, independent
cruise, and other functions, which verify the feasibility of the system design.
1 INTRODUCTION
In recent years, people pay more and more attention
to the exploration, development, and protection of
water resources. The traditional water quality
inspection is to organize personnel to the scene area,
points for sampling, and then sent to the laboratory
for data analysis and water quality inspection. It is
time-consuming and laborious, easy to cause
secondary pollution, and can't guarantee the
timeliness of monitoring (Kondle R et al., 2020).
Unmanned Surface Vehicles (USV) is a multi-
purpose small surface carrying platform that can sail
by remote control or autonomous way. It has broad
prospects in the fields of marine transportation,
marine environment investigation, and marine
resources exploration. With the rapid development of
the Internet of Things (IoT), Big Data and cloud
computing, and other emerging technologies, the use
of USV for water quality inspection has become a
trend (Steimle E T and Hall M L, 2006). Therefore, it
has certain research significance and engineering
value to design and develop a set of USV water
quality inspection systems based on IoT
communication technology, which uses mobile
terminals to monitor USV to perform water quality
inspection tasks.
In actual projects, the water quality inspection
system not only needs to receive remote sensing data
in real-time, including water quality monitoring data
and sampling positioning data, etc., for data
processing and interactive display. In the USV water
quality inspection system, the data acquisition unit is
the core of the whole system. When designing the
data acquisition unit, this paper focuses on the design
of sensors for three indicators of water temperature,
carbon dioxide concentration (CO
2
), and Hydrogen
ion concentration (pH). Use sensors and Internet of
Things technology to collect and send data. At the
same time, it is necessary to be flexible and
compatible with various inspection modes, such as
random inspection, fixed-point inspection, and roving
inspection (Madeo D et al., 2020). To meet the needs
of water quality inspection operations, this paper
designed a water quality inspection system for USV
based on IoT technology. In this system, the USV
completes autonomous control, data acquisition and
analysis. And the mobile client is responsible for state
monitoring and command decision. In addition, a
remote monitoring program and mobile phone
application software was developed, and the IoT
communication technology was adopted to realize
remote information sharing and control instruction
issuance. Through the system, a user can remotely
control USV anytime and anywhere by using a
Guo, W., Tang, Y. and Wang, J.
Development of Unmanned Surface Vehicles System for Water Quality Inspection.
DOI: 10.5220/0011887000003536
In Proceedings of the 3rd International Symposium on Water, Ecology and Environment (ISWEE 2022), pages 21-28
ISBN: 978-989-758-639-2; ISSN: 2975-9439
Copyright
c
2023 by SCITEPRESS Science and Technology Publications, Lda. Under CC license (CC BY-NC-ND 4.0)
21
mobile phone, water quality data collected at the USV
terminal can be quickly obtained, and the
performance of the traditional water quality
inspection system is greatly improved.
2 DESIGN OF USV WATER
QUALITY INSPECTION
SYSTEM
As shown in Fig. 1, the overall architecture of the
system is mainly divided into three parts, which are
the USV subsystem, mobile client, and cloud server.
APP
Aliyun
MQTT
MQTT
Mobile Client
Cloud Server
Industrial
Computer
PLC GPS
Propulsion
Controller
Electric Propeller
Modbus
USV
Electrochemical
workstation
Figure 1: USV water quality inspection system structure.
The USV subsystem mainly consists of an
onboard industrial computer, programmable logic
controller (PLC), GPS receiver, propulsion
controller, electric propeller, electrochemical
workstation, and other equipment. The USV has a
certain degree of autonomy, focusing on the functions
of state perception, motion control, and data sharing,
and can realize multi-source information fusion
processing and drive control (T. H. Yang et al., 2018).
Moreover, its modular design is easy to flexibly
expand the subsequent functions.
The mobile client completes the remote
monitoring function of the system. This paper
specially designs the application software based on
the Android system, which is based on the Android
Studio program development environment and is
developed using JAVA. Based on the cellular mobile
network, users can obtain the status information of the
USV in real-time at the mobile terminal and send
various control commands.
Cloud server currently uses Alibaba Cloud server
that supports free small-scale data transmission.
Relying on the cloud platform of Aliyun Internet of
Things, using Message Queuing Telemetry Transport
(MQTT) for network communication, the USV
terminal interacts with the mobile terminal through
the cloud. To realize the remote monitoring of USV,
a boat-cloud-shore communication link is constructed
to complete the cloud flow of data in the cloud server.
According to the requirements of different
projects, we can expand the related functional
modules based on this architecture, such as video
transmission unit, pollution source detection unit (G.
Zhang and Y. Hao, 2020), etc. This paper, the design
and application of the monitoring system are mainly
focused on motion control in the water quality
inspection task of USV.
2.1 Design of IoT Communication
MQTT is a lightweight IoT transport protocol based
on message publish/subscribe mode, which has the
advantages of low bandwidth and easy
implementation. In this protocol, the publisher, server
and subscriber are involved, i.e. each part in the
corresponding boat-cloud-shore communication link.
In this system, both the USV terminal and the shore
mobile terminal serve as clients and simultaneously
serve as a publisher and a subscriber of messages. The
IoT cloud platform is used as a message cloud flow
server. It completes the authentication of client
devices by logging in and obtaining authentication
information such as server address and port number
and realizes the initialization and connection of
MQTT communication.
When using the MQTT protocol to communicate
with the cloud flow server, the transmitted message is
divided into two parts, Topic and Payload. Where, the
topic is the type of message, such as speed, mode, etc.
If one terminal publishes a message about a topic, the
other terminal will receive the content of the
corresponding message after subscribing to the topic,
that is, the payload (A. Eleyan and J. Fallon, 2020).
In this monitoring system, the payload data adopts the
ICA standard format Alink JSON data format and
transmits the specific speed value and model number,
etc. To distinguish messages under different topics,
the topic communication identifier needs to be
customized in the Internet of Things platform, and
some customized topics are shown in Table 1.
Table 1: Custom Topic (Part).
Mobile Client
Directive Title
Topic
Identifier
USV
State Title
Topic
Identifier
Mode Switch MODE Latitude Lat
Target Position TGT Longitude Lon
ISWEE 2022 - International Symposium on Water, Ecology and Environment
22
Set Speed RPM Speed Spd
Manual WSAD Heading HDG
Testing ANAL Quality WAQ
2.2 Design of USV Subsystem
2.2.1 Control Module
The control module is the core of the USV subsystem,
and it consists of an Advantech ARK-3500 embedded
industrial computer and a SIMATIC S7-1200PLC
controller. Among them, the onboard industrial
control computer is the control center of the USV
subsystem. Equip and run the terminal monitor
program, which can bidirectionally transmit real-time
parameter information and control instructions.
Responsible for the calculation of control logic and
algorithms, with information interaction and
processing functions.
S7-1200 controller has the advantages of compact
structure, many interfaces, and modularization.
Mainly through the accurate control of the thruster
controller and the electrochemical workstation, the
navigation control and water quality inspection
functions of the USV are realized. At the same time,
the internal logic program can also process double
GPS signals and water quality inspection data, and
carry out multi-source information fusion and
processing to obtain USV sensing data. And the real-
time data is packaged according to a specified
interactive format and then sent to the onboard
industrial personal computer.
2.2.2 Sensing Module
The sensing module is composed of GPS and an
electrochemical workstation, which provides
information such as the position, speed, heading, and
water quality of the USV for inspection control. The
USV is equipped with a TimeNav-H positioning and
direction-finding receiver and two GPS antennas.
Where the main antenna is located at the stern and the
slave antenna is located at the bow, the current motion
state can be calculated.
The electrochemical workstation realizes the
water quality inspection function. The pump,
solenoid valve, and analyzer work together to
complete the integrated water sampling-water quality
testing-visual analysis-water sample elimination, and
other inspection processes (L. S. Bratchenko et al.,
2022). Automatic collection, analysis, and treatment
of water samples are realized.
There are three types of sensors used in
monitoring purposes embarked on workstation.
Water temperature, carbon dioxide concentration
(CO
2
) and Hydrogen ion concentration (pH), as
follows:
a. Temperature transducer
Temperature is the basic information of water quality.
When collecting temperature information, the sensor
used by USV water quality inspection system is the
temperature and humidity sensor of OMEGA
Company. This sensor can realize the digital signal
output function, and has the advantages of
debugging-free and simple peripheral circuit. It still
has high temperature detection accuracy under harsh
water conditions.
b. Carbon dioxide concentration sensor
The concentration of carbon dioxide is the main
measure of water quality. If the concentration of
carbon dioxide is too high, the water area may be
polluted. In the USV water quality inspection system,
NDIR carbon dioxide concentration sensor is used.
This sensor has the function of automatic calibration,
and the accuracy of signal acquisition is high.
c. pH sensor
For the pH data of water area, the USV water quality
inspection system adopts a composite pH electrode,
which includes a glass electrode and a test electrode,
and converts the pH value into an electrical signal.
2.2.3 Driver Module
The propulsion module of the USV subsystem adopts
an electric propulsion mode with fast response and
wide speed regulation range. It is equipped with two
propeller propellers and two matched electric
propulsion controllers (Rybin, V. G. et al., 2020).
When the USV moves, the PLC inputs the
corresponding digital signal and analog signal to the
propulsion controller according to the received
control command to realize the positive and negative
rotation of the propeller as well as the speed
regulation function. The steering motion of the USV
can also be realized by using the rotation speed
difference between the two propeller propellers.
3 SOFTWARE DEVELOPMENT
AND REALIZATION
3.1 Mobile Client Application Software
Design
In the mainstream mobile terminal operating system,
Android is characterized by its Linux-based open-
source operating system, which is highly applicable
to portable intelligent terminal devices and has the
Development of Unmanned Surface Vehicles System for Water Quality Inspection
23
advantages of low development cost, small difficulty,
and large market share. Therefore, this paper will
design the mobile client application software based
on the Android operating system, as shown in Figure
2, which covers the functions of status display, target
positioning, mode switching, speed regulation, and
manual direction control.
User Interface
Target Location
Target Velocity
Direction Control
Mode Switch
Latitude
Heading
Speed
Longitude
Status Display
Operation
Instruction
Fixed-point Inspection
Manual Control
Autonomous Cruise
Expand Functions Live Picture
Water Quality Inspection
Selective USV
Figure 2: Mobile terminal application framework.
The key to developing mobile application
software with Android Studio is to establish a
communication connection with the IoT cloud
platform (M. K. Madisa and M. K. Joseph, 2018).
Considering the issue and subscription of topic
content based on the MQTT communication protocol,
the Handler message transfer mechanism is
introduced in the design and development, which is
used to send, receive and process messages, and
realize the update of interface state data.
Figure 3: Mobile client application software interface.
As shown in Figure 3, on the mobile terminal
interface, different control functions correspond to
different topic information, triggering click events,
and the instruction data will be uploaded to the IoT
cloud platform in JSON format and sent to the USV
terminal via the cloud server so that the remote USV
can execute the control commands under the
corresponding topic.
3.2 USV Terminal Program Design
3.2.1 Onboard Industrial Computer
Program
The remote monitoring program for the USV terminal
is designed and developed based on LabVIEW. The
program block diagram replaces the traditional code
language and adopts data flow programming. The
program is intuitive and easy to understand and
convenient to run. As shown in Figure 4, the software
design of the onboard industrial computer mainly
includes two parts: the cloud dialogue part and the
communication cycle with PLC, so the parallel cycle
design mode can be adopted.
Figure 4:
Parallel Loops.
The onboard industrial control computer can be
regarded as a hub for data exchange at the USV
terminal. Its data communication is divided into two
parts, namely, communication with the cloud server
of the IoT and communication with the underlying
PLC controller, to collect, process, and transfer
various data inputs and outputs.
In the circular structure of communication with
the onboard PLC, the Modbus library encapsulated by
LabVIEW is introduced to establish the Modbus
communication connection. By reading the data in the
PLC holding register, each state information of the
USV is obtained and then used for cloud interaction
after data processing. At the same time, various
parameters of the USV terminal in operation will also
be recorded by the monitoring program to the local
file in real time for subsequent data analysis.
Based on the communication technology of the
IoT, the USV terminal uses MQTT communication to
publish and subscribe to topics with the cloud server.
The monitoring program at the terminal of the USV
obtains the data such as water quality information and
USV posture collected and processed by PLC.
Packaging the sensing information of the USV
terminal into a plurality of topics to be released to the
ISWEE 2022 - International Symposium on Water, Ecology and Environment
24
cloud. At the same time, subscribe to the remote
instruction topic in the cloud server, and obtain the
mode number, expected speed, target latitude,
longitude, etc. according to the flag bit. In addition,
as the control module of the USV subsystem, the
terminal monitoring program, after obtaining the
remote command information, converts each
operation command into a data form through the
built-in mode algorithm and sends the data form to
the PLC controller (W. Wei et al., 2019), to finally
realize the autonomous navigation of the USV and
water quality inspection according to the command of
the mobile client. It should be noted that the control
algorithms in different modes can be independently
designed and developed in the software, which
facilitates the subsequent function expansion and
greatly improves the flexibility of the system.
3.2.2 PLC Control Program
The main function is to collect, process and transmit
GPS information and water quality information from
the sensing module. At the same time, each control
instruction transmitted by the onboard industrial
control computer is received, and corresponding
digital or analog signals are input to the propeller
controller and the electrochemical workstation after
logic processing. And finally, the navigation control
and water quality inspection functions of the USV are
completed.
In the main program of the PLC, the Modbus TCP
communication connection with the USV terminal
monitoring program is established first. Next, the
perception information is extracted and analyzed to
obtain the current longitude, latitude, speed, heading,
and water quality. The data sent and received are
formatted and stored into Data Blocks for program
calls and data transmission. Finally, based on the
received mode command, a function block for
executing navigation control or water quality analysis
is selected. In the motion control subprogram, the
incremental PID controller is designed to calculate
the rotation speed difference increment of the motor
and correspondingly input the left and right motors to
realize the navigation control of the USV.
3.3 Application of USV Water Quality
Inspection System
As a platform for users to analyze and operate, the
mobile terminal in the USV water quality inspection
system plays the role of state monitoring and
command decision-making, while the USV terminal
has a certain degree of autonomy and can realize state
perception, motion control, etc.
When the water quality inspection system works
normally, the state parameters of the USV on the
mobile user interface will be updated in real-time.
Users can view the position, posture, and speed
information of the real-time USV at the mobile client
anytime and anywhere, and click the "position" icon
to pop up the built-in Baidu map. As shown in Figure
5, calibrate the position and heading of the current
USV on the electronic map.
Figure 5: Monitoring interface and electronic map.
Figure 6: Control interface and virtual joystick.
Development of Unmanned Surface Vehicles System for Water Quality Inspection
25
As shown in Figure 6, users can select different
control modes according to the water quality
inspection requirements and issue decision
instructions at the mobile phone terminal, thus
realizing the remote control of the USV. During
manual control, the user operates the virtual rocker at
the mobile phone terminal to remotely control the
USV to advance, reverse, and right or left rudders. By
dragging the rotating speed lever, the speed of USV
can be controlled in real-time. To realize random
sampling inspection in the water area. When the user
presses the "TEST" button, the USV equipped with
the electrochemical workstation will independently
complete the integrated processes of water area
sampling, water quality inspection, visual analysis,
and water sample discharge, thereby helping the user
to quickly obtain water environment information.
When fixed-point inspection, the user selects the
navigation sampling point. The USV can get the
latitude and longitude of the target point, sail from the
current position to the target position automatically,
and finally stop there. And start the electrochemical
workstation for integrated water quality inspection
and analysis.
Using the autonomous cruise function can realize
the patrol inspection in the water area. The user needs
to import the path planning file in advance and switch
to autonomous cruise mode. The USV terminal reads
the local planning file, sequentially traverses the
longitude and latitude values of the path points, and
conducts independent patrol inspections along the
planned route.
4 COMMISSIONING AND
ANALYSIS
4.1 Native Debugging
To verify the feasibility of the water quality
inspection system proposed in this paper. Firstly, each
module of the system is configured and debugged
locally to test whether the communication,
positioning, power, software, and hardware functions
of the system are normal or not, to fully prepare for
the water surface trial. Figure 7 shows the actual
debugging situation.
Figure 7: Native debugging.
After testing, the IoT cloud platform has stable
communication with the mobile terminal and the
USV terminal and can carry out data flow in the
cloud. The mobile client can display the status of the
USV in real-time, and test the normal functions of the
system such as manual control, speed adjustment, and
mode switching by issuing instructions.
4.2 Trial Trip
Based on the motion control in the USV water quality
inspection task, the water surface navigation test was
carried out. After the trial voyage, the user can realize
the remote monitoring of the USV through the mobile
terminal, and the switching mode operation control
can meet the expected demand. The actual flight test
is shown in Figure 8.
Figure 8: Trial Trip.
Collect the navigation data of the USV under the
autonomous cruise mode (see Table 2) and analyze
the status data.
ISWEE 2022 - International Symposium on Water, Ecology and Environment
26
Table 2: Status data collected by USV (Part).
Longitude
(in deg.)
Latitude
(in deg.)
Heading
(in deg.)
Speed/
(in knot)
114.4245168 30.5225445 324.7 5.5
114.4245149 30.5225467 324.7 5.4
114.4245112 30.5225511 323.6 5.5
114.4245074 30.5225555 321.8 5.5
114.4245015 30.522562 316.7 5.4
114.4244971 30.522566 315.3 5.5
114.4244971 30.522566 313.1 5.4
114.4244902 30.5225715 314.0 5.4
114.4244807 30.5225786 314.8 5.3
114.4244807 30.5225786 315.8 5.3
First, the real-time longitude and latitude values
are extracted, and the navigation trace is drawn as
shown in Fig. 9. It can be seen that the USV can
automatically adjust its attitude to approach the path
node position after receiving the instruction, and it is
approximate to a straight line trajectory within the
allowable range of error.
Figure 9: Trajectory of USV
Extract and analyze the heading angle and speed
values of the USV during the trial voyage, and
generate the heading angle scatter diagram and speed
scatter diagram as shown in Figure 10 and Figure 11
according to the data acquisition frequency of 200ms.
It can be seen from the image that the heading angle
can be automatically adjusted during the trial voyage,
and the change of speed meets the real-time control
requirements.
Figure 10: Heading scatter plot.
Figure 11: Speed scatter plot.
Judging from the overall test results, the remote
monitoring system for USV based on the IoT
technology designed in this paper performs well in
water navigation. When the system is running, the
information such as target, pose, speed, and distance
displayed on the mobile terminal interactive interface
can be updated in real-time, the USV terminal state
information collection and storage function is normal,
and the action is flexible and smooth, and the target
instruction can be completed. From the above-
mentioned tests, it can be seen that the positioning
accuracy, communication quality, and operational
performance of the system all meet the requirements
of the water quality inspection system of the water
USV and ensures the smooth completion of the
follow-up water quality inspection, function
expansion, and other applications.
5 CONCLUSIONS
This paper designs and develops a water quality
inspection system for USV based on IoT technology,
114.4243 114.4244 114.4245 114.4246 114.4247
E/deg.
30.5219
30.522
30.5221
30.5222
30.5223
30.5224
30.5225
30.5226
30.5227
0 50 100 150 200 250 300 350 400 450
T/s
0
50
100
150
200
250
300
350
0 50 100 150 200 250 300 350 400 450
T/s
0
1
2
3
4
5
6
7
8
Development of Unmanned Surface Vehicles System for Water Quality Inspection
27
and introduces the design and application of a mobile
client and USV terminal system. From the
perspective of convenience, flexibility and
compatibility, the mobile client of the system
supports users to remotely monitor and issue tasks
anytime and anywhere, making it more convenient to
build a water quality inspection platform. The USV
subsystem has a certain degree of autonomy, and its
modular design is easy to flexibly expand the
subsequent functions. The system has been proved to
have stable remote monitoring capability for USV
through water surface trials and can realize real-time
synchronization of synchronous remote states. And
can complete various operations such as manual
control, fixed-point inspection, and autonomous
cruise. It has reliable communication and good real-
time performance. The next step will be to expand the
functions of the mobile client and USV. And continue
to improve the system on the existing hardware and
software architecture based on the actual water
quality inspection project requirements.
REFERENCES
A. Eleyan and J. Fallon, 2020. IoT-based Home
Automation Using Android Application. In
International Symposium on Networks, Computers and
Communications, pp. 1-4.
G. Zhang and Y. Hao, 2020. Design and Implementation of
a Home Intelligent Water Quality Inspection Device. In
IEEE International Conference on Information
Technology ,Big Data and Artificial Intelligence, pp.
628-631.
Kondle R, Dastagiri. S, Lakshmaiah M, 2020.
Implementation of IoT in Embedded Systems for Real
Time Water Quality Monitoring. In International
Journal of Innovative Technology and Exploring
Engineering
,
9(4S2):1-4.
L. S. Bratchenko, E. A. Rodionova, T. G. Shchetinina, G.
Y. Kolev and V. G. Rybin, 2022. Embedded Water
Analyzer for Unmanned Surface Vehicles. In
Conference of Russian Young Researchers in Electrical
and Electronic Engineering, pp. 119-122.
M. K. Madisa and M. K. Joseph, 2018. Android and Cloud
Based Traffic Control System. In International
Conference on Advances in Big Data, Computing and
Data Communication Systems, pp. 1-4.
Madeo D, Pozzebon A, Mocenni C, et al, 2020. A Low Cost
Unmanned Surface Vehicle for Pervasive Water
Quality Monitoring. In IEEE Transactions on
Instrumentation and Measurement, PP(99):1-1.
Rybin, V. G. , Kolev, G. Y. , Karimov, T. I. , Ostrovskii,
V. Y. , & Sigaeva, M. S., 2020. Estimating the
Autonomy Range of the Battery-Powered Small
Unmanned Surface Vehicle. In 2020 Ural Smart
Energy Conference.
Steimle E T , Hall M L, 2006. Unmanned Surface Vehicles
as Environmental Monitoring and Assessment Tools. In
Oceans. IEEE, 2006.
T. H. Yang et al. 2018. Development of unmanned surface
vehicle for water quality monitoring and measurement.
In 2018 IEEE International Conference on Applied
System Invention, pp. 566-569.
W. Wei, L. Shaohan and L. Kang, 2019. A Laboratory
Aquaponics System via PLC and LabVIEW. In 34rd
Youth Academic Annual Conference of Chinese
Association of Automation, pp. 547-551.
NOMENCLATURE
Create the following nomenclature for easy reading.
USV Unmanned Surface Vehicles
IoT Internet of Thin
g
s
APP Mobile Application
PLC Pro
g
rammable Lo
g
ic Controlle
r
GPS Global Positionin
g
S
y
ste
m
MQTT Message Queuing Telemetry
Transpor
t
ISWEE 2022 - International Symposium on Water, Ecology and Environment
28