CN114354870A - Unmanned ship shortest path water quality monitoring system and method based on improved particle swarm optimization algorithm - Google Patents

Unmanned ship shortest path water quality monitoring system and method based on improved particle swarm optimization algorithm Download PDF

Info

Publication number
CN114354870A
CN114354870A CN202111661953.9A CN202111661953A CN114354870A CN 114354870 A CN114354870 A CN 114354870A CN 202111661953 A CN202111661953 A CN 202111661953A CN 114354870 A CN114354870 A CN 114354870A
Authority
CN
China
Prior art keywords
unmanned ship
longitude
points
water quality
latitude
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111661953.9A
Other languages
Chinese (zh)
Inventor
刘星桥
朱雨朋
刘一颍
宦娟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu University
Original Assignee
Jiangsu University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangsu University filed Critical Jiangsu University
Priority to CN202111661953.9A priority Critical patent/CN114354870A/en
Publication of CN114354870A publication Critical patent/CN114354870A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)

Abstract

The invention discloses a system and a method for monitoring the shortest path water quality of an unmanned ship based on an improved particle swarm optimization algorithm. The method comprises the steps that a Baidu map is loaded on an upper computer interface, a mouse is used for clicking a water area in the Baidu map to set a plurality of monitoring points, longitude and latitude coordinates of all the points are stored, the longitude and latitude coordinates of all the points are calculated through an improved particle swarm optimization algorithm in the upper computer, a shortest path is planned, and in an automatic navigation mode, the unmanned ship successively arrives at the designated monitoring points according to the planned path for operation. The invention has the advantages of low cost, high efficiency, high positioning precision, path optimization of multiple monitoring points, real-time measurement and display of water quality, low power consumption and the like.

Description

Unmanned ship shortest path water quality monitoring system and method based on improved particle swarm optimization algorithm
Technical Field
The invention relates to the field of multipoint path planning optimization and real-time water quality monitoring by using an unmanned ship on water surface, in particular to a system and a method for monitoring the shortest path water quality of the unmanned ship based on an improved particle swarm optimization algorithm.
Background
China is a large water resource utilization country, the past social and economic development brings great pollution to water resources in China, and the demand of people on water quality safety is increasingly increased along with the improvement of the living quality of people. The water quality monitoring is not only about daily drinking water safety, but also is an important part of aquaculture and lake water quality management, parameters such as temperature, air pressure, dissolved oxygen value and the like in water are common water quality evaluation indexes, and the parameters are very important to be monitored quickly, accurately, safely and intelligently.
The traditional water quality monitoring methods mainly comprise two methods. One is that the technician carries the relevant instruments and equipment to sample, detect and record on site, and this method has the disadvantages of high labor cost, time consumption, labor waste, low efficiency, etc. Another kind of water quality monitoring mode adopts the fixed point to build and floats formula monitoring instrument and carry out real-time supervision, with the data of monitoring upload to the server with wireless data transmission's mode, this kind of mode when the scope of needs monitoring is very big, need build a plurality of floating formula monitoring stations, exist with high costs, inflexible, expansibility poor, difficult not enough such as maintain.
In recent years, with the development of science and technology, the use of unmanned ships in the field of water quality monitoring has become one of the research trends of unmanned ships. The unmanned ship for water quality detection has the advantages of flexibility in arrangement, good real-time performance, low cost, high intelligent degree, good expandability and the like, and can automatically measure in water areas with rare or difficult-to-reach traces and the like. However, most of the existing unmanned water quality detection ships adopt a manual control navigation and detection mode, need to manually observe a real-time dynamic environment, or can only automatically navigate according to a set fixed route under the tasks of a plurality of monitoring points, and consume more electric quantity. The invention adds a hundred-degree map in the server, can see the profile of the tested lake and the surrounding environment information in the map, and can display the position and track tracking of the unmanned ship in real time, and simultaneously, under the automatic mode, a plurality of monitoring points can be randomly arranged in the water area to be tested on the map, a shortest path is planned, and a monitoring task is executed according to the shortest path.
Therefore, the invention provides a system and a method for monitoring the shortest path water quality of an unmanned ship based on an improved particle swarm optimization algorithm aiming at the conditions of unmanned ship path planning and water quality on-line monitoring.
Disclosure of Invention
The invention provides a system and a method for monitoring the shortest path water quality of an unmanned ship based on an improved particle swarm optimization algorithm, aiming at solving the problem of path planning and the problem of intelligent water quality monitoring of the current unmanned ship under the task of multiple monitoring points. By the path planning method and the water quality monitoring system, the unmanned ship can manually set a plurality of monitoring points in a map of the server and quickly plan a shortest path, control the unmanned ship to sequentially reach the specified points according to the planned path to measure the water quality parameters, and upload the measured water quality parameters to the server for real-time display and storage.
The invention is realized by the following technical scheme:
a unmanned ship shortest path water quality monitoring system based on an improved particle swarm optimization algorithm comprises: sensing layer, transmission layer and application layer;
the sensing layer comprises a main control chip, a measuring device, a power system and a power module.
The main control chip adopts an STM32 singlechip based on a Cortex-M4 kernel;
the measuring device comprises a GPS/BD positioning module, an electronic compass module and a water quality parameter detection module;
the GPS/BD positioning module is used for measuring real-time longitude and latitude data of the unmanned ship;
the electronic compass module is used for measuring real-time course angle data of the unmanned ship;
the quality of water parameter detection module is four unification sensors, includes: the system comprises a dissolved oxygen sensor, a temperature sensor, an air pressure sensor and a saturation sensor, wherein the dissolved oxygen sensor is used for measuring dissolved oxygen concentration, water temperature, air pressure value and saturation data;
the power system comprises underwater direct current motors and brushless electric regulators at two sides of the ship body;
the underwater direct current motor drives the propeller to be used for the straight movement and the steering of the unmanned ship;
the brushless electric motor adjusts the speed of the motor through PWM waves.
The power module is a rechargeable lithium battery and supplies power for other modules.
And in the second part, the wireless data transmission module adopts a GPRS-DTU module and a LORA module and is used for communicating with a server background program.
And the third part is that the application layer adopts a C/S structure to establish the connection between the application layer and the wireless data transmission module.
The server background program uses C + + language to develop a visual upper computer interface based on a Qt5.9 platform, receives and resolves data sent by the measuring device through a serial port or a TCP/IP protocol, and displays each resolved data in a corresponding LineEdit in real time; embedding a Baidu map HTML file developed by HTML, CSS and JavaScript in a background program of a server, compiling an improved particle swarm optimization algorithm, setting a plurality of monitoring task points in a map, calling longitude and latitude coordinate values of all the points through the improved particle swarm optimization algorithm to calculate a shortest path, and controlling the unmanned ship to execute a monitoring task according to the planned shortest path.
Based on the system, the invention provides a water quality monitoring method for the shortest path of an unmanned ship based on an improved particle swarm optimization algorithm, which comprises the following steps:
step 1: the unmanned ship is in communication connection with an upper computer, the electronic compass obtains real-time course angle data of the unmanned ship, and the GPS/BD module obtains real-time longitude and latitude data of the unmanned ship and uploads the data to the upper computer. And the upper computer analyzes the received longitude and latitude data, converts the longitude and latitude data into a hundred-degree map format and unifies longitude and latitude coordinates.
Step 2: manually setting target points of each water quality monitoring in a Baidu map of an upper computer interface, storing longitude and latitude coordinate values of the target points, setting the unmanned ship as an automatic navigation mode, taking the current position of the unmanned ship as a starting point, clicking a path planning button to call the starting point and the longitude and latitude coordinate values of the target points through an improved particle swarm optimization algorithm to calculate, storing the sequence of each point of the shortest path, and clicking an automatic navigation button to start automatic navigation.
And step 3: and the upper computer takes out the longitude and latitude value of the current position and the longitude and latitude value of the next target point, and calculates the distance and the azimuth angle between the two points.
And 4, step 4: and (3) comparing the azimuth angle with the course angle received by the upper computer in the step (1) to obtain the steering angle of the unmanned ship, and sending a corresponding instruction to the single chip microcomputer to control the steering of the unmanned ship after logical judgment. And along with the movement of the unmanned ship, displaying the track of the unmanned ship on a Baidu map in real time through the virtual broken line.
And 5: and (3) judging whether the unmanned ship reaches a target point, if not, repeatedly executing the step (3), and if so, sending a corresponding control instruction to the single chip microcomputer by the upper computer to detect the water quality of the target point, sending the detected data to the upper computer to be displayed and storing the data in a database.
And 6, judging whether the unmanned ship traverses all target points or not, if traversing is completed, finishing the task, and if not traversing all the target points, repeatedly executing the steps 3 to 5 until the traversing monitoring task is completed.
Further, the step 2 specifically executes the following steps:
step 2.1: setting N target points in a Baidu map of an upper computer, recording longitude and latitude values and serial numbers of all the target points, clicking a path planning button in an automatic navigation mode, calling an improved particle swarm optimization algorithm, initializing a swarm scale N of a particle swarm and an initial position x of each particleiAnd an initial velocity vi
Step 2.2: each particle independently traverses all the points in n set target points, and the sequence of the traversed points is recorded as the historical optimal position P of the particlebest(i) And recording the corresponding fitness value Fit [ P ]best(i)]。
Step 2.3, comparing the fitness value of each particle, finding out the global optimal particle, and recording the position as a global optimal position GbestRecord its fitness value as Fit [ G ]best];
Step 2.4: updating the velocity v of each particleiAnd position xi
Velocity viThe update formula of (2) is:
Figure BDA0003447621020000031
position xiThe update formula of (2) is:
xi=xi+vi (2)
in equations (1) and (2), i is 1,2,., N is the population size, w is an inertia factor whose value is non-negative, α, β are accelerations whose values are random numbers between (0,1), and x is a random number between (0,1)iIs the current position of the particle.
The operation symbol is defined in the formula:
-: when both sides of the "-" number are positions, the result is a swap sequence, indicating speed.
Figure BDA0003447621020000041
Assuming that the length of the velocity v is k and the length of the acceleration is l, the operation is: starting from the kth x ω (rounding) position, replacing the permutated sequence of the velocity v with the first α x l (rounding) permutated sequence of the acceleration;
x: for the real number c e (0,1), assuming that the velocity v is k permutation sequences in length, the multiplication operation is to truncate the velocity list so that the new velocity is equal to c × k (rounded);
+: when the two sides of the plus sign are respectively the position and the speed, the original position acts on a certain position of the particle in sequence through the exchange sequence of the speed, and a new position is obtained as a result;
α×(Pbest(i)-xi) Indicates the basic exchange sequence (P)best(i)-xi) All commutators in (1) are retained with a probability of α, β × (G)best-xi) Indicates the basic exchange order (G)best-xi) All commutators in (1) are retained with probability beta.
Step 2.5: calculating the fitness value of the updated particle, comparing the fitness value with the historical optimal position of the current particle, and recording the historical optimal P of the particle by the updated position if the fitness is improvedbest(i) And the fitness value is recorded as Fit [ P ]best(i)]。
Step 2.6: the fitness value of each particle in the step 2.5 and the global optimal fitness value Fit Gbest]Comparing, if the fitness is improved, updating the global optimal position G of the populationbestAnd its corresponding globally optimal Fit Gbest]。
Step 2.7: judging whether an end condition (maximum iteration number) is met, if the end condition is met, finishing the improved particle swarm optimization algorithm, and outputting a global optimal position GbestAnd its corresponding optimal distance Fit Gbest]Call global optimum position GbestThe sequence of each point is stored in a data structure for the server interface to call. If the end condition is not met, repeating steps 2.4 to 2.6.
The invention has the beneficial effects that:
(1) the defects of high cost, low efficiency, limited measuring range, inflexibility and poor expandability of the traditional water quality monitoring mode are overcome, and the water quality conditions of a plurality of points in a water area can be movably measured.
(2) The method overcomes the defect that when the unmanned ship has a plurality of monitoring point tasks, the monitoring tasks are executed in a time-consuming and power-consuming sequence, an improved particle swarm algorithm is adopted to quickly plan a shortest path and operate according to the path, and under an automatic navigation mode, the unmanned ship reaches the designated monitoring point operation according to the planned path. The invention has the advantages of low cost, high efficiency, high positioning precision, path optimization of multiple monitoring points, real-time measurement and display of water quality, low power consumption and the like, and can effectively improve the working efficiency of the water quality monitoring unmanned ship and save the power consumption of the unmanned ship.
(3) The unmanned ship can set monitoring points randomly in a map of a server interface and can view the real-time position of the unmanned ship.
(4) The unmanned ship adopts a mode of comprehensive positioning of GPS and Beidou, so that the positioning precision is higher and the response speed is higher.
(5) The position information of the monitoring points is supplemented, and the monitoring and analysis of the water quality change at different positions in the area are facilitated.
(6) The collected data can be viewed in the server in real time and stored in the database.
(7) The background program of the server receives data by adopting a multithreading technology, and each thread is responsible for resolving each kind of data and orderly displayed on a computer-side interface without errors.
Drawings
FIG. 1 is a block diagram of the system of the present invention;
FIG. 2 is a schematic view of the unmanned ship measuring device of the present invention;
FIG. 3 is a flow chart of an improved particle swarm optimization algorithm;
FIG. 4 is a schematic diagram of a shortest path generated by an improved particle swarm optimization algorithm;
FIG. 5 is a flowchart of the inventive procedure;
FIG. 6 is a diagram of a server daemon host interface of the present invention;
FIG. 7 is a diagram of a water quality parameter monitoring database according to the present invention;
Detailed Description
The invention will be further explained with reference to the drawings.
As shown in fig. 1, a water quality monitoring system based on the shortest path of an unmanned ship based on an improved particle swarm optimization algorithm mainly comprises a sensing layer, a transmission layer and an application layer;
the first part is that the sensing layer is composed of a main control chip, a measuring device, a power system and a power module, so that the unmanned ship can cruise on a multipoint shortest path planned by the application layer according to the sequence of each point of a route and monitor the water quality parameters of each point, and the measured water quality parameters are stored in a database.
As shown in fig. 2, the unmanned ship comprises a main control chip, a measuring device, a power system and a power module;
the main control chip adopts an STM32 singlechip based on a Cortex-M4 kernel;
the measuring device comprises a GPS/BD positioning module, an electronic compass module and a water quality parameter detection module;
the GPS/BD positioning module is used for measuring real-time longitude and latitude data of the unmanned ship;
the electronic compass module is used for measuring real-time course angle data of the unmanned ship;
the quality of water parameter detection module is four unification sensors, includes: the system comprises a dissolved oxygen sensor, a temperature sensor, an air pressure sensor and a saturation sensor, wherein the dissolved oxygen sensor is used for measuring dissolved oxygen concentration, water temperature, air pressure value and saturation data;
the power system comprises underwater direct current motors and brushless electric regulators at two sides of the ship body;
the underwater direct current motor drives the propeller to be used for the straight movement and the steering of the unmanned ship;
the brushless electric motor adjusts the speed of the motor through PWM waves.
The power module is a rechargeable lithium battery and supplies power for other modules.
And in the second part, the wireless data transmission module adopts a GPRS-DTU module and a LORA module and is used for communicating with a server background program.
And the third part is that the application layer adopts a C/S structure to establish the connection between the application layer and the wireless data transmission module.
The server background program uses C + + language to develop a visual upper computer interface based on a Qt5.9 platform, receives data measured by a measuring device through a serial port or a TCP/IP protocol, the upper computer segments the data by extracting keywords of received data segments and displays the data in real time in a LineEdit corresponding to the data, such as real-time longitude and latitude data, real-time course angle data, dissolved oxygen concentration, water temperature and other data of an unmanned ship, meanwhile, all the data are stored in a database of the upper computer, and a user can check all historical data in the database. Embedding a Baidu map HTML file developed by HTML, CSS and JavaScript in a background program of a server, loading the Baidu map in a visual interface when an upper computer interface runs, converting an analyzed real-time longitude and latitude data format of the unmanned ship into a data format of the map to realize real-time display of the track of the unmanned ship in the map, setting a plurality of task points in the map by a user through a mouse, storing the coordinates of the points, calling longitude and latitude coordinate values of the points through a compiled improved particle swarm optimization algorithm to calculate to obtain a shortest path, storing the sequence of the points, and sending an instruction to a lower computer to control the unmanned ship to execute a monitoring task according to the planned shortest path by the unmanned ship according to the sequence points of the shortest path.
As shown in fig. 3, a flow chart of an improved particle swarm optimization algorithm is as follows:
step 1: initializing a population size N of a population of particles and an initial position x of each particleiAnd an initial velocity vi. The initialization meaning of the step is that each particle randomly traverses n target points to generate a path sequence and an exchange sequence, wherein the path sequence is an initial position, and the exchange sequence is an initial speed.
Step 2: each particle independently traverses all the points in n set target points, and the sequence of the traversed points is recorded as the historical optimal position P of the particlebest(i) And recording the corresponding fitness value Fit [ P ]best(i)]。
Step 3, comparing the fitness value of each particle, finding out the global optimal particle, and recording the position as the global optimal position GbestRecord its fitness value as Fit [ G ]best];
And 4, step 4: updating the velocity v of each particleiAnd position xi
Velocity viThe update formula of (2) is:
Figure BDA0003447621020000071
position xiThe update formula of (2) is:
xi=xi+vi (2)
in equations (1) and (2), i is 1,2,., N is the population size, w is an inertia factor whose value is non-negative, α, β are accelerations whose values are random numbers between (0,1), and x is a random number between (0,1)iIs the current position of the particle.
The operation symbol is defined in the formula:
-: when both sides of the "-" number are positions, the result is a swap sequence, indicating speed.
Figure BDA0003447621020000072
Assuming that the length of the velocity v is k and the length of the acceleration is l, the operation is: starting from the kth x ω (rounding) position, replacing the permutated sequence of the velocity v with the first α x l (rounding) permutated sequence of the acceleration;
x: for the real number c e (0,1), assuming that the velocity v is k permutation sequences in length, the multiplication operation is to truncate the velocity list so that the new velocity is equal to c × k (rounded);
+: when the two sides of the plus sign are respectively the position and the speed, the original position acts on a certain position of the particle in sequence through the exchange sequence of the speed, and a new position is obtained as a result;
α×(Pbest(i)-xi) Indicates the basic exchange sequence (P)best(i)-xi) All commutators in (1) are retained with a probability of α, β × (G)best-xi) Indicates the basic exchange order (G)best-xi) All commutators in (1) are retained with probability beta.
And 5: calculating the fitness value of the updated particle, comparing the fitness value with the historical optimal position of the current particle, and recording the historical optimal P of the particle by the updated position if the fitness is improvedbest(i) And the fitness value is recorded as Fit [ P ]best(i)]。
Step 6: the fitness value of each particle in the step 5 and the global optimal fitness value Fit Gbest]Comparing, if the fitness is improved, updating the global optimal position G of the populationbestAnd its corresponding globally optimal Fit Gbest]。
And 7: judging whether an end condition (maximum iteration number) is met, if the end condition is met, finishing the improved particle swarm optimization algorithm, and outputting a global optimal position GbestAnd its corresponding optimal distance Fit Gbest]Invoking Global optimalPosition GbestThe sequence of each point is stored in a data structure for the server interface to call. If the end condition is not satisfied, repeating steps 4 to 6.
As shown in fig. 4, a schematic diagram of a shortest path planned by calling an improved particle swarm optimization algorithm for an unmanned ship when the unmanned ship has a plurality of monitoring point tasks.
As shown in fig. 5, a program flow chart of the unmanned ship multipoint shortest path water quality monitoring system based on the improved particle swarm optimization algorithm is as follows:
step 1: the unmanned ship is in communication connection with an upper computer, the electronic compass obtains real-time course angle data of the unmanned ship, and the GPS/BD module obtains real-time longitude and latitude data of the unmanned ship and uploads the data to the upper computer.
Step 2: and the upper computer analyzes the received longitude and latitude data, converts the longitude and latitude data into a hundred-degree map format and unifies longitude and latitude coordinates.
And step 3: and manually setting target points of each water quality monitoring in a Baidu map of an upper computer interface, storing longitude and latitude coordinate values of the target points, and taking the current position of the unmanned ship as a starting point.
And 4, step 4: setting the unmanned ship as an automatic navigation mode, calling longitude and latitude coordinate values of a starting point and each target point by an improved particle swarm optimization algorithm in the upper computer for calculation to obtain a shortest path, and storing the sequence of each point of the shortest path.
And 5: and the upper computer takes out the longitude and latitude values of the current position of the unmanned ship and the longitude and latitude values of the next target point, and calculates the distance and the azimuth angle between the two points.
The distance between two points is calculated by the formula:
Figure BDA0003447621020000081
where D is the distance between two points on the earth in m, R is 6378137m is the radius of the earth, a is the difference in latitude between the current point and the target point, b is the difference in longitude between the current point and the target point, lat1 is the latitude of the current point, and lat2 is the latitude of the target point.
The calculation formula of the azimuth angle between two points is as follows:
Figure BDA0003447621020000082
where α is the azimuth angle between two points, and the positive direction is the clockwise rotation direction of the geographic north pole, where X, Y is the projection of the two-point straight distance on the latitude line and the longitude line, respectively, and the formula is formula (3).
Figure BDA0003447621020000083
Step 6: and comparing the azimuth angle with the real-time course angle of the unmanned ship to obtain the steering angle of the unmanned ship.
The calculation formula of the steering angle is as follows:
γ=|α-(heading+d)|
in the formula, gamma is a steering angle of the unmanned ship, heading is a course angle received by an upper computer, the positive direction of the course angle is the clockwise rotation direction of magnetic north pole, and d is a magnetic declination angle which is an included angle between the magnetic north pole and the geographic north pole.
And 7: and if the steering is needed, the upper computer sends a corresponding instruction to the single chip microcomputer through the wireless data transmission module so as to control the motor to steer. If no steering is needed, the straight line is continued.
And 8: and along with the movement of the unmanned ship, marking the track of the unmanned ship on a Baidu map of the upper computer in real time through the virtual broken line.
And step 9: and (5) judging whether the unmanned ship reaches a target point or not, and if not, executing the step 5.
Step 10: and if the target point is reached, the upper computer sends a corresponding control instruction to the single chip microcomputer to detect the water quality of the target point, and sends the detected data to the upper computer to be displayed and stored in the database.
And 11, repeatedly executing the steps 5 to 10, and sequentially traversing and measuring the residual target points.
As shown in fig. 6, the upper computer visualization interface of the server background program of the present invention is divided into a data display area, a map display area, a mode switching area, a manual control area, and a database window area.
And the data display area displays data measured by the measuring device, such as longitude and latitude, a course angle, water quality parameters and longitude and latitude coordinates of a set target point.
The map display area can load a Baidu map, a track is formed by displaying received longitude and latitude data of the unmanned ship on the map in real time through virtual broken lines, target points can be arranged on the map through a mouse, and the longitude and latitude data of the target points are recorded.
The mode switching area comprises two parts, wherein one part is used for switching the wireless data transmission mode to GPRS-DTU communication or LORA communication, the other part is used for setting the unmanned ship to a manual control mode and an automatic navigation mode, a button in the manual control area is clicked through a mouse to control the movement of the unmanned ship in the manual control mode, the automatic navigation mode is clicked after a target point is set in the map display area, and the upper computer plans out a shortest path through an embedded improved particle swarm optimization algorithm and sequentially cruises.
The manual control area can click corresponding control buttons through a mouse to realize forward, backward, left-turn and right-turn of the unmanned ship.
And the database window area is a secondary sub-window for displaying, and the window records and displays the longitude and latitude data of the target point and the water quality parameter information.
As shown in fig. 7, is a secondary sub-window of a database window area under which historical data may be viewed. And recording the measuring date, the longitude and latitude position data of the target point and the water quality parameter data in the table.
The above-listed series of detailed descriptions are merely specific illustrations of possible embodiments of the present invention, and they are not intended to limit the scope of the present invention, and all equivalent means or modifications that do not depart from the technical spirit of the present invention are intended to be included within the scope of the present invention.

Claims (10)

1. The utility model provides an unmanned ship shortest path water quality monitoring system based on improve particle swarm optimization algorithm which characterized in that includes: a sensing layer, a transmission layer and an application layer;
the sensing layer comprises a main control chip, a measuring device, a power system and a power module;
the transmission layer adopts a wireless data transmission module, comprises a GPRS-DTU module and an LORA module and is used for realizing the communication between the sensing layer and the application layer;
the application layer adopts a C/S structure, connection between the application layer and the wireless data transmission module is established, and the application layer partially integrates an improved particle swarm optimization algorithm and is used for remotely controlling shortest path navigation of the unmanned ship.
2. The unmanned ship shortest path water quality monitoring system based on the improved particle swarm optimization algorithm as claimed in claim 1, wherein the main control chip adopts an STM32 single chip microcomputer based on a Cortex-M4 kernel.
3. The unmanned ship shortest path water quality monitoring system based on the improved particle swarm optimization algorithm is characterized in that the measuring device comprises a GPS/BD positioning module, an electronic compass module and a water quality parameter detection module;
the GPS/BD positioning module is used for measuring real-time longitude and latitude data of the unmanned ship;
the electronic compass module is used for measuring real-time course angle data of the unmanned ship;
the quality of water parameter detection module is four unification sensors, includes: the device comprises a dissolved oxygen sensor, a temperature sensor, an air pressure sensor and a saturation sensor, and is used for measuring dissolved oxygen concentration, water temperature, air pressure value and saturation data.
4. The unmanned ship shortest path water quality monitoring system based on the improved particle swarm optimization algorithm is characterized in that the power system comprises an underwater direct current motor and a brushless electric regulator which are arranged on two sides of a ship body;
the underwater direct current motor drives the propeller to be used for the straight movement and the steering of the unmanned ship;
the brushless electric motor adjusts the speed of the motor through PWM waves.
5. The unmanned ship shortest path water quality monitoring system based on the improved particle swarm optimization algorithm as claimed in claim 1, wherein the power module is a rechargeable lithium battery to supply power to the system.
6. The unmanned ship shortest path water quality monitoring system based on the improved particle swarm optimization algorithm according to claim 1, wherein a background program of the application layer develops a visual upper computer interface based on a Qt5.9 platform by using a C + + language, receives and resolves data sent by a measuring device through a serial port or a TCP/IP protocol, and displays each resolved data in a corresponding LineEdit in real time; embedding a Baidu map HTML file developed by HTML, CSS and JavaScript in a background program of a server, embedding an improved particle swarm optimization algorithm, setting a plurality of monitoring task points in a map, calling longitude and latitude coordinate values of all the points through the improved particle swarm optimization algorithm to calculate to obtain a shortest path, and controlling the unmanned ship to execute a monitoring task according to the planned shortest path;
the upper computer visual interface comprises a data display area, a map display area, a mode switching area, a manual control area and a database window area;
the data display area displays the data measured by the measuring device and the result of path planning, such as longitude and latitude, course angle, water quality parameters and the navigation sequence of each point of the planned shortest path;
the map display area can load a Baidu map, a track is formed by displaying received longitude and latitude data of the unmanned ship on the map in real time through virtual broken lines, target points can be arranged on the map through a mouse, and the longitude and latitude data of the target points are recorded;
the mode switching area comprises two parts, wherein one part is used for switching the wireless data transmission mode into GPRS-DTU communication or LORA communication, the other part is used for setting the unmanned ship into a manual control mode and an automatic navigation mode, a button in the manual control area is clicked through a mouse to control the movement of the unmanned ship in the manual control mode, in the automatic navigation mode, when an upper computer plans a shortest path through an embedded improved particle swarm optimization algorithm, an automatic navigation button is clicked, and the unmanned ship sequentially cruises according to the planned route;
the manual control area can realize the forward, backward, left turn and right turn of the unmanned ship by clicking corresponding control buttons through a mouse;
and the database window area is a secondary sub-window for displaying, and the window records and displays the longitude and latitude data of the target point and the water quality parameter information.
7. A water quality monitoring method based on the shortest path of an unmanned ship and based on an improved particle swarm optimization algorithm is characterized by comprising the following steps:
step 1: the unmanned ship is in communication connection with an upper computer, the electronic compass obtains real-time course angle data of the unmanned ship, and the GPS/BD module obtains real-time longitude and latitude data of the unmanned ship and uploads the data to the upper computer; the upper computer analyzes the received longitude and latitude data, converts the longitude and latitude data into a hundred-degree map format and unifies longitude and latitude coordinates;
step 2: manually setting target points of each water quality monitoring in a Baidu map of an upper computer interface, storing longitude and latitude coordinate values of the target points, setting the unmanned ship as an automatic navigation mode, taking the current position of the unmanned ship as a starting point, clicking a path planning button to call the starting point and the longitude and latitude coordinate values of the target points through an improved particle swarm optimization algorithm to calculate, planning to obtain a shortest path, storing the sequence of each point of the shortest path, and clicking an automatic navigation button to start automatic navigation;
and step 3: the upper computer takes out the longitude and latitude value of the current position and the longitude and latitude value of the next target point, and calculates the distance and the azimuth angle between the two points;
and 4, step 4: comparing the azimuth angle with the course angle received by the upper computer in the step 1 to obtain a steering angle of the unmanned ship, sending a corresponding instruction to a single chip microcomputer of a perception layer after logical judgment to control the steering of the unmanned ship, and marking the track of the unmanned ship on a Baidu map in real time through a virtual broken line along with the movement of the unmanned ship;
and 5: judging whether the unmanned ship reaches a target point, if not, repeatedly executing the step 3, if so, sending a corresponding control instruction to the single chip microcomputer by the upper computer to detect the water quality of the target point, sending the detected data to the upper computer to be displayed and storing the data in a database;
and 6, judging whether the unmanned ship traverses all target points or not, if traversing is completed, finishing the task, and if not traversing all the target points, repeatedly executing the steps 3 to 5 until the traversing monitoring task is completed.
8. The unmanned ship shortest path water quality monitoring method based on the improved particle swarm optimization algorithm according to claim 7, wherein the step 2 specifically executes the following steps:
step 2.1: setting N target points in a Baidu map of an upper computer, recording longitude and latitude values and serial numbers of all the target points, clicking a path planning button in an automatic navigation mode, calling an improved particle swarm optimization algorithm, initializing a swarm scale N of a particle swarm and an initial position x of each particleiAnd an initial velocity vi
Step 2.2: each particle independently traverses all the points in n set target points, and the sequence of the traversed points is recorded as the historical optimal position P of the particlebest(i) And recording the corresponding fitness value Fit [ P ]best(i)];
Step 2.3, comparing the fitness value of each particle, finding out the global optimal particle, and recording the position as a global optimal position GbestRecord its fitness value as Fit [ G ]best];
Step 2.4: updating the velocity v of each particleiAnd position xi
Velocity viThe update formula of (2) is:
Figure FDA0003447621010000031
position xiThe update formula of (2) is:
xi=xi+vi (2)
in the equations (1) and (2), i is 1, 2., N is the population size, ω is an inertia factor whose value is non-negative, α, β is an acceleration whose value is a random number between (0,1), and x is a random number between (0,1)iIs the current position of the particle;
step 2.5: calculating the fitness value of the updated particle, comparing the fitness value with the historical optimal position of the current particle, and recording the historical optimal P of the particle by the updated position if the fitness is improvedbest(i) And the fitness value is recorded as Fit [ P ]best(i)];
Step 2.6: the fitness value of each particle in the step 2.5 and the global optimal fitness value Fit Gbest]Comparing, if the fitness is improved, updating the global optimal position G of the populationbestAnd its corresponding globally optimal Fit Gbest];
Step 2.7: judging whether an end condition (maximum iteration number) is met, if the end condition is met, finishing the improved particle swarm optimization algorithm, and outputting a global optimal position GbestAnd its corresponding optimal distance Fit Gbest]Call global optimum position GbestThe sequence of each point is stored in a data structure for the server interface to call. If the end condition is not met, repeating steps 2.4 to 2.6.
9. The method as claimed in claim 8, wherein the position of the particle in the improved PSO algorithm is an n-dimensional solution sequence generated by the path sequence number of the particle traversing n target points, and S (i) is defined as the position of the particle in the improved PSO algorithm1,i2) For commutators, the ith of solution sequence is shown1And i2The sequence exchange of points generates a new solution sequence, the speed of the particles is the exchange sequence composed of n-dimensional commutators, the fitness value Fit [ pbest (i) in step 2.2]To traverse the total distance of all points, equations (1) and (2.4) aboveThe operator is defined in equation (2):
-: when both sides of the "-" number are positions, the result is an exchange sequence, which indicates the speed;
≧ l: assuming that the length of the velocity v is k and the length of the acceleration is l, the operation is: starting from the kth x ω (rounding) position, replacing the permutated sequence of the velocity v with the first α x l (rounding) permutated sequence of the acceleration;
x: for the real number c e (0,1), assuming that the velocity v is k permutation sequences in length, the multiplication operation is to truncate the velocity list so that the new velocity is equal to c × k (rounded);
+: when the two sides of the "+" sign are position and velocity, respectively, the original position acts on a certain position of the particle in turn through the exchange sequence of velocity, resulting in a new position.
10. The method for monitoring the water quality of the shortest path of the unmanned ship based on the improved particle swarm optimization algorithm according to claim 8, wherein in the step 3, a calculation formula of the distance between two points is as follows:
Figure FDA0003447621010000041
wherein D is the distance between two points on the earth, and the unit is m, R is 6378137m is the radius of the earth, a is the latitude difference between the current point and the target point, b is the longitude difference between the current point and the target point, lat1 is the latitude of the current point, and lat2 is the latitude of the target point;
the calculation formula of the azimuth angle between two points is as follows:
Figure FDA0003447621010000042
where α is the azimuth angle between two points, and the positive direction is the clockwise rotation direction of the geographic north pole, where X, Y is the projection of the two-point straight distance on the latitude line and the longitude line, respectively, and the formula is formula (3):
Figure FDA0003447621010000051
the steering angle calculation formula of the step 4 is as follows:
γ=|α-(heading+d)|
in the formula, gamma is a steering angle of the unmanned ship, heading is a course angle received by an upper computer, the positive direction of the course angle is the clockwise rotation direction of magnetic north pole, and d is a magnetic declination angle which is an included angle between the magnetic north pole and the geographic north pole.
CN202111661953.9A 2021-12-30 2021-12-30 Unmanned ship shortest path water quality monitoring system and method based on improved particle swarm optimization algorithm Pending CN114354870A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111661953.9A CN114354870A (en) 2021-12-30 2021-12-30 Unmanned ship shortest path water quality monitoring system and method based on improved particle swarm optimization algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111661953.9A CN114354870A (en) 2021-12-30 2021-12-30 Unmanned ship shortest path water quality monitoring system and method based on improved particle swarm optimization algorithm

Publications (1)

Publication Number Publication Date
CN114354870A true CN114354870A (en) 2022-04-15

Family

ID=81105993

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111661953.9A Pending CN114354870A (en) 2021-12-30 2021-12-30 Unmanned ship shortest path water quality monitoring system and method based on improved particle swarm optimization algorithm

Country Status (1)

Country Link
CN (1) CN114354870A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111174794A (en) * 2020-03-12 2020-05-19 青岛蓝海未来海洋科技有限责任公司 Unmanned ship path planning method and system based on improved particle swarm algorithm
CN112000115A (en) * 2020-09-15 2020-11-27 湖南文理学院 Path planning method of autonomous underwater robot and related equipment
CN112631293A (en) * 2020-12-16 2021-04-09 江苏大学 Unmanned ship anti-collision Internet of things control system and method based on artificial potential field method
CN113112065A (en) * 2021-04-09 2021-07-13 山东交通学院 Route planning method for multiple unmanned ships for ocean pollution inspection and sampling
CN113110439A (en) * 2021-04-08 2021-07-13 江苏大学 Real-time anti-storm unmanned ship air route control method and water quality monitoring system thereof
CN113721620A (en) * 2021-08-30 2021-11-30 山东交通学院 Particle swarm-genetic hybrid algorithm-based vehicle transverse PID control method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111174794A (en) * 2020-03-12 2020-05-19 青岛蓝海未来海洋科技有限责任公司 Unmanned ship path planning method and system based on improved particle swarm algorithm
CN112000115A (en) * 2020-09-15 2020-11-27 湖南文理学院 Path planning method of autonomous underwater robot and related equipment
CN112631293A (en) * 2020-12-16 2021-04-09 江苏大学 Unmanned ship anti-collision Internet of things control system and method based on artificial potential field method
CN113110439A (en) * 2021-04-08 2021-07-13 江苏大学 Real-time anti-storm unmanned ship air route control method and water quality monitoring system thereof
CN113112065A (en) * 2021-04-09 2021-07-13 山东交通学院 Route planning method for multiple unmanned ships for ocean pollution inspection and sampling
CN113721620A (en) * 2021-08-30 2021-11-30 山东交通学院 Particle swarm-genetic hybrid algorithm-based vehicle transverse PID control method

Similar Documents

Publication Publication Date Title
CN110134143A (en) A kind of electric inspection process method, system and electronic equipment and storage medium
US20080294308A1 (en) Method and apparatus for real-time polars
CN105371896A (en) Cruising water quality multi-parameter remote monitoring system and method capable of self-learning locus navigation
CN110597937B (en) Unmanned intelligent inspection method, device, equipment and storage medium
CN113311821B (en) Drawing and positioning system and method for multi-pendulous pipeline flaw detection mobile robot
CN110375720A (en) Drifting buoy monitoring method and its system
CN117053793A (en) Water quality monitoring and inspection method, device and equipment based on sea-air cross-domain cooperation
CN111220999A (en) Restricted space detection system and method based on instant positioning and mapping technology
CN113110439B (en) Real-time anti-storm unmanned ship air route control method and water quality monitoring system thereof
CN205317239U (en) Self -learning orbit navigation formula quality of water multi -parameter remote monitering system that cruises
CN205139126U (en) BeiDou navigation satellite system intelligence water quality monitoring twinhull vessel
CN112215395B (en) Underwater equipment adaptability information guarantee system based on ocean big data
Mendoza-Chok et al. Hybrid control architecture of an unmanned surface vehicle used for water quality monitoring
CN114354870A (en) Unmanned ship shortest path water quality monitoring system and method based on improved particle swarm optimization algorithm
CN111413886A (en) Real ship maneuverability index identification method and device based on system identification
CN116912672A (en) Unmanned survey vessel-based biological integrity evaluation method for large benthonic invertebrates
CN115523963B (en) Intelligent analysis device and method for ship data
Wiora et al. Towards automation of measurement processes of surface water parameters by a remote-controlled catamaran
CN113671508B (en) Underwater sludge measurement method, device and system
Yang et al. Energy-optimal path planning with active flow perception for autonomous underwater vehicles
US20180031376A1 (en) Systems and methods for computing and displaying navigation indicators based on historic and real-time vessel data
CN115435845A (en) Intelligent wide-area water quality monitoring and analyzing system and method based on unmanned ship and integrated learning and water quality analyzing method
CN113686338A (en) Route optimization method based on inertial navigation equipment
CN206569229U (en) A kind of exploration vessel based on GPS navigation
Branch et al. Demonstration of autonomous nested search for local maxima using an unmanned underwater vehicle

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination