Underwater robot control system and Heading control based on sonar image target recognition
Method
Technical field
The present invention relates to a kind of underwater robot control system, particularly relate to a kind of underwater robot control system and based on
The course heading control method of sonar image target recognition, belongs to Pattern Recognition and Intelligent System technical field.
Background technology
Along with mankind's advance to ocean development paces, underwater robot is sent out as the prospecting tools of a kind of ocean development
Bright out underwater robot is devoted under water, needs to drive into target, but owing to not receiving gps signal under water, technology becomes
Ripe GPS navigation is the most unavailable.The most artificial real-time control observes field of front vision by underwater camera, constantly adjusts water
The course of lower robot;Automatically controlling aspect, directed navigation general all the adopting during operation under water of current underwater robot
Use inertial navigation device, but in inertial guidance, gyroscope is owing to by factors such as frictional force, the accurate errors of machinery, precision is the highest, for a long time
After operation, error can become big, the interference of electromagnetic field in control cabinet simultaneously, normally works to gyroscope and brings the biggest interference, precision
It is substantially reduced.Along with computer technology and the development of Digital image technology, image guidance technology grows up, and this technology is the most all
Being to use imaging sensor to gather target image, utilize target image to guide, led thing target goal the most at last, its advantage is
Not by electromagnetic interference.But owing under water, the visual range of photographic head is relatively low, thus have impact on answering of image guidance technology
With.And the detection imaging scope of sonar is far, therefore, a kind of underwater robot course based on sonar image target recognition is studied
Control method is significant.
Summary of the invention
It is an object of the invention to provide a kind of underwater robot control system and boat based on sonar image target recognition
To control method, it is achieved underwater robot course is scopodromic to be automatically controlled, solve long-time manually regulation course work
Efficiency is low, and inertial navigation under water caused by electromagnetic interference guidance precision the highest problem, it is achieved that underwater robot course
Automatically control.
The purpose of the present invention is achieved by the following technical programs:
A kind of underwater robot control system, including water surface control system, Subsea Control Systems, described water surface control system
It is placed on the bank or on ship, Subsea Control Systems is arranged on detection under water and Work robot;Water surface control system and water
Lower control system is connected by umbilical cables 5, it is achieved electric energy, control signal, the transmission of data;Water surface control system includes single-chip microcomputer
Control panel 1, industrial computer 2, LCDs 3, power supply box 4, described Single-chip Controlling panel 1, LCDs 3 and industrial computer
2 are connected, and industrial computer 2 is connected with umbilical cables 5, and power supply box 4 is connected with umbilical cables 5;
Described submarine system includes umbilical cables 5, K60 embedded microcontroller 6, power subsystem 7, the shooting of sonar 8, under water cloud
Platform 9, electric motor units 10, mechanical hand 11, inertial navigation magnetometer 12, sensor unit 13;Described umbilical cables 5 and the embedded micro-control of K60
Device 6 processed, power subsystem 7, sonar 8, under water cloud camera-shooting table 9 are connected;Described K60 embedded microcontroller 6 is by umbilical cables 5 and water
Face control system be connected, receive water surface control system control instruction and the data gathered under water are sent to the water surface control system
System;Described K60 embedded microcontroller 6 is connected with electric motor units 10, mechanical hand 11, inertial navigation magnetometer 12, sensor unit 13;
Described power subsystem 7 is given K60 embedded microcontroller 6, sonar 8, under water cloud camera-shooting table 9, electric motor units 10, mechanical hand 11, is used to
Lead magnetometer 12, sensor unit 13 is powered;Underwater sonar data are sent to water surface control by umbilical cables 5 by described sonar 8
System;Underwater video data are sent to water surface control system by the described camera-shooting table of cloud under water 9;Described electric motor units 10 receives K60
The speed of embedded microcontroller 6 and directional information, drive propeller to rotate, and current value return to the embedded micro-control of K60
Device 6 processed;Described mechanical hand 11 receives the directional information of K60 embedded microcontroller, controls mechanical hand opening and closing;Described inertial navigation magnetic
Navigation data is passed to K60 embedded microcontroller 6 by power meter 12;Described sensor unit 13 is by depth information, information of leaking, temperature
Humidity information passes to K60 embedded microcontroller 6, is sent to water surface control system via umbilical cables 5.
The course heading control method based on sonar image target recognition of a kind of underwater robot control system, including following step
Rapid:
The first step: sonar echo data imaging, sonar capsule sends sound wave, and sonar capsule gathers echo data imaging, obtains water
Downward view front sonar original image;
Second step: sonar image processes, including image enhaucament, image segmentation, image enhaucament includes greyscale transformation and intermediate value
Filtering, image segmentation uses basic global threshold to process;
3rd step: target recognition, including extraction, the coupling of target characteristic, target's feature-extraction uses normalization centre-to-centre spacing
As target matching characteristics, coupling uses distance metric, and the not displacement feature calculating unknown pattern is special with target pattern not displacement
The Euclidean distance levied, if distance is less than certain limit, then it is assumed that belong to same target image;
4th step: target centroid coordinate calculate, use calculate image two single orders away from, and zeroth order away from, calculate image
Barycenter, i.e. the geometric center of bianry image
5th step: the calculating of target centroid deviation, calculates the difference of target centroid coordinate and image display area initial point (0,0)
Value:
6th step: deviation e is carried out PID and controls the calculating of formula
Controlled quentity controlled variable u is exported the PWM value of the Heading control motor of Subsea Control Systems, regulates course, make course towards
Target centroid direction deflects;
7th step: underwater robot regulates toward bogey heading under the promotion of Heading control motor;
8th step: certain interval of time, treats that course governing response is complete, returns to the 1st step, circulates whole flow process successively,
Form closed loop control;
9th step: the course of final underwater robot is adjusted to point to target centroid.
The purpose of the present invention can also be realized further by techniques below measure:
The course heading control method based on sonar image target recognition of aforementioned underwater robot control system, wherein second step
Described medium filtering is a kind of nonlinear signal processing technology that can effectively suppress noise theoretical based on sequencing statistical, is number
In word image or Serial No., the value of some Mesophyticum of each point value in one field of this point replaces, thus disappears and isolated making an uproar
Sound point;Implementation method is: the pixel grey scale collection setting two dimensional image is combined into { Xi,j, (i, j) ∈ Z2},Z2It is two-dimensional integer collection, it is stipulated that
Two dimension sleiding form size is A=m × n, and each pixel on image slides, and the pixel value intermediate value of window is defined
For:
Above formula represents the odd number of pixels in template window by the sequence of gray value size, generation monotone increasing or decline
2-D data sequence, takes intermediate pixel and is assigned to Yi,j, then Yi,jReplace the center pixel value in two dimension window A as output;
Described greyscale transformation uses linear gradation conversion, and (x, y) scope is [a, b], linearly becomes to make original image pixel grey scale f
Change rear image pixel gray level g (x, y) in the range of [c, d] [11], then have gray scale f (x, y) with gray scale g (x, y) between relation
Formula:
After greyscale transformation, sonar image contrast increases, and target is highlighted, and carries out successive image process;
Image segmentation uses basic global threshold to process, use iterative algorithm automatically estimate piece image threshold value,
Step is as follows:
1) it is that global threshold T selects an initial estimate;
2) in following formula:
Splitting this image with T, all pixels that two groups of pixel: G1 of generation are more than T by gray value are formed by this, and G2 is by owning
Pixel composition less than or equal to T;
3) pixel of G1 and G2 is calculated average gray value m respectively1And m2;
4) a new threshold value is calculated:
5) repeat step 2 and arrive step 4, until difference less than a predefined parameter, Δ T is between the T value in subsequent iteration
Only.
The course heading control method based on sonar image target recognition of aforementioned underwater robot control system, wherein the 3rd step
Described target's feature-extraction use normalization centre-to-centre spacing as target matching characteristics, normalization centre-to-centre spacing have translation, rotation,
Constant rate;Size be M × N digital picture f (x, two dimension (p+q) rank y) are away from being defined as:
Wherein p=0,1,2, and q=0,1,2, it is integer, corresponding (p+q) rank centre-to-centre spacing is defined as
In formula, p=0,1,2, and q=0,1,2, it is integer, wherein
By ηpqThe normalization centre-to-centre spacing represented is defined as
In formula,
Wherein p+q=2,3, use by second order away from three rank away from structure not displacement:
φ2=(η20-η02)2+4η11 2 (11)
As not displacement feature, there is the translation of image, scaling, rotational invariance;
Coupling uses distance metric, calculate unknown pattern not displacement feature and target pattern not displacement feature European away from
From, if distance is less than certain limit, then it is assumed that belong to same target image;Distance metric formula is:
D=| | φ20-φ2|| (12)
Wherein, φ2It is the not displacement feature of target pattern, φ20It is the not displacement feature of unknown pattern, uses distance d0Make
For decision boundaries, if d is < d0, then unknown pattern belongs to target pattern, if d is > d0Then unknown pattern is not belonging to target pattern.
The course heading control method based on sonar image target recognition of aforementioned underwater robot control system, wherein the 4th step
Said two single order away from:
Zeroth order away from
Center-of-mass coordinate
Compared with prior art, the invention has the beneficial effects as follows: the detection under water of the present invention controls system with Work robot
System uses modularized design, convenient installation and dismounting;Being equipped with underwater camera, sonar, mechanical hand, control system waterborne is permissible
Monitoring sub-marine situations in real time, mechanical hand can capture object under water;Present invention employs course based on sonar target identification
Control method, overcomes the conventional inertia navigation drawback by electronic compartment magnetic interference course data instability, the course of the present invention
The precision controlled is higher.
Accompanying drawing explanation
Fig. 1 is the ROV control system overall structure block diagram of the present invention;
Fig. 2 is water surface Control system architecture block diagram;
Fig. 3 is Subsea Control Systems structured flowchart;
Fig. 4 is sonar image processing procedure figure;
The PID closed loop control figure of Fig. 5 underwater robot position deviation;
Fig. 6 is course auto control process flow diagram flow chart.
Detailed description of the invention
The invention will be further described with specific embodiment below in conjunction with the accompanying drawings.
The submerged structure analyte detection of the present invention and Work robot control system, as it is shown in figure 1, system includes the water surface and water
Lower two systems, water surface system is placed on bank or lash ship, and submarine system is arranged on underwater structure measuring robots;
Water surface control system includes Single-chip Controlling panel 1, industrial computer 2, LCDs 3, power supply box 4;Subsea Control Systems includes
K60 embedded microcontroller 6, power subsystem 7, sonar 8, under water cloud camera-shooting table 9, electric motor units 10, mechanical hand 11, inertial navigation magnetic force
Meter 12, sensor unit 13.
Water surface control system as in figure 2 it is shown, include Single-chip Controlling panel 1, industrial computer 2, LCDs 3, power supply box
4;Single-chip Controlling panel 1 is connected with industrial computer 2, receives 106,2 direction controlling of 4 direction controlling rocking bars (horizontal motor)
107,2 direction controlling rocking bars (cross motor) 108 of rocking bar (motor vertical), roll knob (vertical motor) 109, motor gain
Knob 110, camera angle adjusting knob 111, searchlight angular adjustment knob 112, surely boat button 113, depthkeeping button 114,
Video image output select button (video camera, sonar) 115, keyboard 116, the operational order of handle interface 117, by operational order
Being sent to industrial computer 2, industrial computer is sent to Subsea Control Systems by umbilical cables 5.Electronic compartment overheating indicator lamp 101, electronic compartment
Leak display lamp 102, shooting cabin overheating indicator lamp 103, and shooting cabin leaks display lamp 104, and over current of motor display lamp 105 connects
Receiving the warning message from industrial computer 2, lamp is lighted explanation Subsea Control Systems and is occurred in that fault;LCDs 3, display interface
Including sonar image viewing area 301, video image viewing area 302, level indicator 303, compass 304, course attitude information 305, determine
Boat depthkeeping input setting 306.Receive the data from industrial computer 2, show underwater sonar image, show underwater video image, aobvious
Show the level of underwater robot, course attitude information, gather boat depthkeeping input setting 306 surely simultaneously, send the data to
Industrial computer 2;Industrial computer 2, including 485 turns of 3 tunnel usb communication module 201, video frequency collection card 202.3 485 turns of tunnel usb communication modules
Respectively with Single-chip Controlling panel 1, LCDs 2, umbilical cables 5 is connected, it is achieved industrial computer 2 and Single-chip Controlling panel 1, liquid
Crystal display screen 3, the communication of Subsea Control Systems;220VAC is converted into 400VDC and is sent under water by umbilical cables 5 by power supply box 4
Control system.
Subsea Control Systems is as it is shown on figure 3, include that K60 embedded microcontroller 6, power subsystem 7, sonar 8, under water cloud are taken the photograph
Entablement 9, electric motor units 10, mechanical hand 11, inertial navigation magnetometer 12, sensor unit 13;Sonar 8 and 2 data lines of umbilical cables 5
It is connected, transmits sonar data to water surface control system;Cloud camera-shooting table 9 is connected, to the water surface with 2 data lines of umbilical cables 5 under water
Control system transmits video data;It is microcontroller based on ARM Cortex-M4 kernel that K60 embedded microcontroller 6 selects,
Include intervalometer, analog-digital converter, memorizer, serial communication module, Ethernet control, general input/output port, in system
After electricity, first each functions of modules is initialized by embedded microcontroller 6, sends a self-inspection to water surface system complete after completing
The signal become, enters slave status afterwards, receives the instruction of water surface system, and makes corresponding control.
Power subsystem 7 is connected with 2 power lines of umbilical cables, and high-tension electricity source plate 701 receives the 400VDC of water surface power supply box 4
Power supply, is converted into 8 road 48V500WDC by 400VDC, and 48VDC is converted into 12VDC, is converted into by 12VDC by low tension source plate 702
5VDC, is converted into 3.3VDC by 5VDC;Give electric motor units 10, sonar 8, under water cloud camera-shooting table 9, the embedded microcontroller of K60 respectively
Device 6, mechanical hand 11, inertial navigation magnetometer 12, sensor unit 13 are powered.K60 embedded microcontroller 6 turns 485 moulds by uart
Block 601 is connected with 2 data lines of umbilical cables 5, receives the control instruction of water surface control system and sends underwater data to the water surface
Control system.5 road pwm signal 5 road direction signals 602 receive the pwm signal from K60 embedded microcontroller 6, motor drive direction
Signal, drives 1006 to No. 5 motors, controls the turning to of No. 5 motors, rotating speed, and 5 road current acquisitions 1007 gather the electricity of No. 5 motors
Flow field simulation amount, gathers 603 through 5 road AD and changes into digital quantity, to K60 embedded microcontroller 6, if electric current reaches the limit values,
Then K60 embedded microcontroller 6 sends control instruction, stops electric current excessive Na No. mono-motor, plays the work of protection motor
With, current value turns 485 modules 11 through Uart and is sent to water surface control system by umbilical cables 5 simultaneously, and water surface control system is permissible
Monitoring submersible machine current value in real time;2 road pwm signal modules 604 are connected with mechanical hand 11, control the opening of mechanical hand, close.
Uart communication 605 reception is from the navigation data of inertial navigation magnetometer 12, then turns 485 modules by Uart and be sent to through umbilical cables 5
Water surface control system, in real time monitoring underwater performance and monitoring robot course, attitude information;Sensor unit 13 includes deeply
Degree meter 1301, leak water detdction module 1302, Temperature Humidity Sensor 1303;The voltage of depth gauge 1301 sampling depth sensor conversion
Value, to AD acquisition module 606, is converted into digital quantity by voltage analog;Leak water detdction module 1302 gathers leakage sensor
Magnitude of voltage, is converted into digital quantity through AD acquisition module 606;The voltage of Temperature Humidity Sensor 1303 collecting temperature humidity sensor
Value, is converted into digital quantity through AD acquisition module 606;After K60 embedded microcontroller 6 receives sensor unit 13AD conversion
Digital quantity, turns 485 modules 601 by Uart and sensing data uploads to water surface control system;Inertial navigation magnetometer 12 gathers
The digital quantity of the depth value that the digital quantity of course value and depth gauge 1301 gather can be used to do determines boat Depth control.
The course heading control method based on sonar image target recognition of the present invention, the method uses and calculates target image barycenter
The deviation of coordinate and field of view origin regulates the course of underwater robot, whole process as shown in Figure 4, concrete steps
As follows:
The first step: sonar echo data imaging, sonar capsule sends sound wave, and sonar capsule gathers echo data imaging, obtains water
Downward view front sonar original image.
Second step: sonar image processes, including image enhaucament, image is split.Image enhaucament includes medium filtering and gray scale
Conversion, image segmentation uses basic global threshold to process.Medium filtering, medium filtering is the one theoretical based on sequencing statistical
Can effectively suppress the nonlinear signal processing technology of noise, typical medium filtering be in digital picture or Serial No. a bit
Value replace with the Mesophyticum of each point value in a field of this point, thus disappear and isolated noise spot.Implementation method: set X-Y scheme
The pixel grey scale collection of picture is combined into { Xi,j, (i, j) ∈ Z2},Z2It it is two-dimensional integer collection.Specify that the two-dimentional sleiding form of certain structure is big
Little each pixel for A=m × n (typically containing odd number of pixels) on image slides, the pixel value intermediate value quilt of window
It is defined as:
Above formula represents the odd number of pixels in template window by the sequence of gray value size, generates monotone increasing (or decline)
2-D data sequence, take intermediate pixel and be assigned to Yi,j, then Yi,jReplace the center pixel value in two dimension window A as output.
Greyscale transformation uses linear gradation conversion, and (x, y) scope is [a, b], after linear transformation to make original image pixel grey scale f
Image pixel gray level g (x, y) in the range of [c, d] [11], then have gray scale f (x, y) with gray scale g (x, y) between relational expression:
After greyscale transformation, sonar image contrast increases, and target is highlighted, and beneficially successive image processes.
Image segmentation uses basic global threshold to process, when the intensity profile of object and background pixel is fairly obvious,
Can be by single (overall) threshold value being applicable to whole image.Use iterative algorithm automatically estimate piece image threshold value, step
Rapid as follows:
1: select an initial estimate for global threshold T.
2: in formula:
In formula, split this image with T.All pixels that two groups of pixel: G1 of generation are more than T by gray value are formed by this, G2
It is made up of all pixels less than or equal to T.
3: the pixel of G1 and G2 is calculated average gray value (average) m respectively1And m2。
4: calculate a new threshold value:
5: repeat step 2 and arrive step 4, until difference less than a predefined parameter, Δ T is between the T value in subsequent iteration
Only.
3rd step: target recognition, including the extraction of target characteristic, coupling.Target's feature-extraction uses normalization centre-to-centre spacing
As target matching characteristics, normalization centre-to-centre spacing has translation, rotation, constant rate.Size is digital picture f of M × N
(x, two dimension (p+q) rank y) are away from being defined as
Wherein p=0,1,2, and q=0,1,2, be integer.(p+q) rank centre-to-centre spacing is defined as accordingly
In formula, p=0,1,2, and q=0,1,2, it is integer, wherein
By ηpqThe normalization centre-to-centre spacing represented is defined as
In formula,
Wherein p+q=2,3,.Use by second order away from three rank away from structure not displacement:
φ2=(η20-η02)2+4η11 2 (11)
As not displacement feature, there is the translation of image, scaling, rotational invariance.
Coupling uses distance metric, calculate unknown pattern not displacement feature and target pattern not displacement feature European away from
From, if distance is less than certain limit, then it is assumed that belong to same target image.Distance metric formula is:
D=| | φ20-φ2|| (12)
Wherein, φ2It is the not displacement feature of target pattern, φ20It is the not displacement feature of unknown pattern, uses distance d0Make
For decision boundaries, if d is < d0, then unknown pattern belongs to target pattern, if d is > d0Then unknown pattern is not belonging to target pattern.
4th step: target centroid coordinate calculate, use calculate image two single orders away from, and zeroth order away from, calculate image
Barycenter, i.e. the geometric center of bianry imageTwo single orders away from
Zeroth order away from
Center-of-mass coordinate
5th step: the calculating of target centroid deviation, calculates the difference of target centroid coordinate and image display area initial point (0,0)
Value:
6th step: deviation e is carried out PID and controls the calculating of formula
Controlled quentity controlled variable u is exported the PWM value of the Heading control motor of Subsea Control Systems, regulates course, make course towards
Target centroid direction deflects.
7th step: underwater robot regulates toward bogey heading under the promotion of Heading control motor.
8th step: certain interval of time, treats that course governing response is complete, returns to the 1st step, circulates whole flow process successively,
Form closed loop control.
9th step: the course of final underwater robot is adjusted to point to target centroid.
In addition to the implementation, the present invention can also have other embodiments, all employing equivalents or equivalent transformation shape
The technical scheme become, all falls within the protection domain of application claims.