Disclosure of Invention
The invention aims to provide an intelligent obstacle avoidance method based on time nodes, which carries out risk pre-judgment according to a traveling path of a target, replans the path if the risk exists, can avoid the congestion situation of the target at the same intersection, reasonably utilizes all the available paths through macroscopic pre-judgment, improves the efficiency, and reduces the problems of waiting phenomena, paralysis caused by waiting and the like. The purpose of the invention is realized by the following technical scheme:
an intelligent obstacle avoidance method based on time nodes mainly comprises the following steps,
step one, accurate positioning: accurately positioning the real-time position of the target to obtain target coordinates (x, y, t) at the moment t;
step two, planning a path:
a) Dividing a plane into square grids, dividing coordinate points and simplifying a search area;
b) Drawing all the traversable paths from A to B for the No. 1 target from A to B, comparing and judging a fastest path, and storing the fastest path into a working library;
c) And (4) the No. 2 target enters the field, the process of selecting the path of the No. 1 target is repeated, the path is compared with the path in the working library, if a coincident point exists, the time difference is judged, and if the time difference is too small, the collision risk exists, the route is re-planned.
Further, the second step comprises the following specific steps:
1) Let it be assumed that 0 At the time, the target number 1 is from the starting point a to the end point B, and at the current time, the target number 1 will be searched as follows: starting from the point A, storing the point A as a point to be processed into an 'open list', wherein at the initial moment, only one element is in the list, but the elements are increased later to form a square list to be checked; marking the traveling direction of the current target; searching grids which can pass through the starting point in the upper, lower, left and right directions, adding an opening list, and skipping grids which cannot pass through; delete from the unlock listAdding the points A except the point A into a 'closed list', and storing all the squares which do not need to be checked again in the list; then, selecting adjacent squares in the opening list, and repeating the previous process;
2) At t 1 Time, the No. 2 target enters a near-field area, the optimal three-dimensional array of the No. 2 target is compared with data in a working library, if a near point exists, the point is marked as a No. 2 target non-feasible point, and a route is re-planned until a new path is generated;
3) And (3) repeating the processes 1) and 2) to plan the path of the target at any time.
Further, the first step specifically includes the following steps:
1) Directly processing the time from the pulse signal sent by the UWB tag to the pulse signal received by the base station by using a hybrid least square method to obtain a positioning initial value;
2) Processing the close-range points by using a Lagrange interpolation polynomial, and improving the accuracy of coordinates;
3) Removing bad data caused by interference of external factors by adopting an outlier detection algorithm;
4) And the real-time coordinates of each discrete label are obtained by using the sliding average filtering, so that the optimization effect of the positioning precision is achieved.
Further, the intelligent obstacle avoidance method further comprises the steps of path detection, receiving two-dimensional coordinates of all targets in the near-ground area at a fixed time, adding time information to the coordinates, comparing the coordinates with route data of all targets in the working library, and sending alarm information when the targets deviate from the routes.
Compared with the prior art, the invention has the beneficial effects that:
the intelligent obstacle avoidance method accurately positions the target, carries out risk pre-judgment according to the advancing path of the target, replans the path if the risk exists, can avoid the congestion situation of the target at the same intersection, reasonably utilizes all the available paths through macroscopic pre-judgment, improves the efficiency, and reduces the problems of waiting phenomenon, paralysis caused by waiting and the like.
Detailed Description
The present invention will be described in further detail with reference to specific examples, but the embodiments of the present invention are not limited thereto.
An intelligent obstacle avoidance method based on time nodes mainly comprises the following steps,
step one, accurate positioning: accurately positioning the real-time position of the target to obtain target coordinates (x, y, t) at the moment t;
step two, planning a path:
a) Dividing a plane into square grids, dividing coordinate points and simplifying a search area;
b) Drawing all the passable paths from A to B for the No. 1 target from A to B, comparing and judging a fastest path, and storing the fastest path in a working library;
c) And (4) the No. 2 target enters the field, the process of selecting the path of the No. 1 target is repeated, the path is compared with the path in the working library, if a coincident point exists, the time difference is judged, and if the time difference is too small, the collision risk exists, the route is re-planned.
The second step comprises the following specific steps:
1) Let us assume at t 0 At the time, the target number 1 is from the starting point a to the end point B, and at the current time, the target number 1 will be searched as follows: starting from point A, as a point to be processed, a "list of openings" is stored, at an initial momentOnly one element is in the table, but then the elements are increased to form a check list to be checked; marking the traveling direction of the current target; searching grids which can pass through the starting point in the upper, lower, left and right directions, adding an opening list, and skipping grids which cannot pass through; deleting the point A from the opening list, adding the point A into a 'closing list', and storing all the squares which do not need to be checked again in the list; then, selecting adjacent squares in the opening list, and repeating the previous process;
2) At t 1 Time, the No. 2 target enters a near-field area, the optimal three-dimensional array of the No. 2 target is compared with data in a working library, if a near point exists, the point is marked as a No. 2 target non-feasible point, and a route is re-planned until a new path is generated;
3) And (3) repeating the processes 1) and 2) to plan the path of the target at any time.
Further, the first step specifically includes the following steps:
1) Directly processing the time from the pulse signal sent by the UWB tag to the pulse signal received by the base station by using a hybrid least square method to obtain a positioning initial value;
2) Processing the close-range points by using a Lagrange interpolation polynomial, and improving the accuracy of coordinates;
3) An outlier detection algorithm is adopted to remove bad data caused by interference of external factors;
4) And the real-time coordinates of each discrete label are obtained by using the sliding average filtering, so that the optimization effect of the positioning precision is achieved.
The intelligent obstacle avoidance method further comprises the steps of detecting a path, receiving two-dimensional coordinates of all targets in a near-ground area at a fixed time, adding time information to the coordinates, comparing the coordinates with route data of each target in a working library, and sending alarm information when the target deviates from the route.
The present embodiment takes an unmanned aerial vehicle as an example, and further details the intelligent obstacle avoidance method.
DW counts 2-40 times in 1000 seconds, so its minimum time unit is
I.e. 16.65ps. The DW1000 captures a sending and receiving timestamp in real time, the accurate timestamp is a premise for realizing point-to-point accurate ranging between the tag and the base station, and the distance between the tag and the base station is completed by multiplying the flight time tof (Timeof flight) of a signal sent by the tag to the base station by the speed of light. Namely:
d=tof×c
due to the ultra-wideband characteristic of the ultra-wideband positioning device, the time resolution of uwb is very high, multiplied by the speed of light, the ranging accuracy can be effectively kept in a small range basically, the XYZ three-dimensional coordinates of the equipment to be positioned need to be obtained for realizing three-dimensional positioning, and the height difference of the Z axis needs to be particularly pulled apart when the base station is erected, so that the accuracy of the Z axis is ensured. Three base stations can complete three-dimensional positioning by using a TOF mode. Ground erects the mode that usable erection installation pole, for obtaining accurate three-dimensional positioning data, can use and install the mode that base station unmanned aerial vehicle hovered at the fixed point additional and carry out the measurement to the Z axle height.
The accurate time is a key factor for obtaining the target accurate coordinate, the error of the conventional DW1000 can be controlled within 30cm, and the error can be further reduced through further processing of data. In the part, firstly, a hybrid least square method is used for directly processing the time from the pulse signal sent by the UWB tag to the pulse signal received by the base station to obtain a positioning initial value; then, processing the close-range points by using a Lagrange interpolation polynomial, and improving the accuracy of the coordinates; then, an outlier detection algorithm is adopted to remove bad data caused by interference of external factors; and finally, obtaining the real-time coordinates of each discrete label by using the sliding average filtering, thereby achieving the optimization effect of the positioning precision. The positioning optimization model further improves the positioning precision, can greatly improve the anti-interference effect of the positioning system, and effectively improves the positioning efficiency. The detailed block diagram is shown in fig. 1.
The data for the four points are plotted in a line graph as shown in fig. 2. Referring to fig. 2, the mapping between the distance and the error is obtained by interpolation. 3-degree Lagrange interpolation polynomial P is obtained through the 4 nodes 3 (x) In that respect Formula for calculationIs composed of
Wherein
At a node there is
L 3 (x j )=f(x j ) (j=0,1,2,3)
And at other points, are approximations of f (x). Note the book
R 3 (x)=f(x)-L n (x)
Scale R 3 (x) The remainder of the interpolating polynomial.
The 3-degree Lagrange interpolation polynomial obtained through calculation is as follows:
y=-5.96×10 -13 ·x 3 +3.175×10 -9 ·x 3 -50824×10 -6 ·x 2 +0.004034·x+0.4263
the fitted curve is shown in fig. 3. Observing fig. 3, it can be found that the 3-degree lagrangian interpolation polynomial method can achieve a good fitting effect. Therefore, for the label point within two meters of the base station, the position coordinate with greatly improved accuracy can be obtained only by converting the received distance through the formula. These points are further processed with distant tags in the following.
DW1000 can count 40 times a second, i.e., 40 dynamic coordinates per second per tag. These coordinates all float around the exact value. According to actual observation, the difference between part of coordinates and the true value is large, analysis reasons can be known, information transmission between the label and the base station is electromagnetic waves, when strong interference exists outside (for example, when the distance is short, people move back and forth), the propagation time is influenced, and further, the measured distance generates large deviation compared with the true value. For the data with large deviation, the data needs to be eliminated, and the main idea is to delete the data far away from the average value. And setting a critical value K, and judging as an outlier and rejecting when the difference between the data and the average value exceeds the critical value K. The specific formula is as follows:
wherein r is i =1 indicates that the data is not to be discarded, r i And =0 indicates that the data is to be culled. To determine the specific value of k, the least square method is used, and the specific flow chart refers to fig. 4.
There are many available filtering algorithms, such as amplitude limiting filtering, median filtering, arithmetic mean filtering, moving mean filtering, and anti-impulse interference mean filtering. The method selects the moving average filtering, can be well suitable for the high-frequency oscillation system, has high smoothness and has good inhibition effect on periodic interference.
The specific method of the moving average filtering is to regard the continuously taken N sampling values as a queue, and the length of the queue is fixed to N. Each time a new data is sampled and put into the tail of the queue, and a data of the original queue head is thrown away, (first-in first-out principle), the arithmetic mean operation is carried out on the N data in the queue, and then a flow chart of an algorithm for obtaining a new filtering result is obtained, and the flow chart is shown in figure 5.
Unmanned aerial vehicle does not need the barrier when high altitude flight, but UWB can reach more accurate location when unmanned aerial vehicle flies under lower height. Under the premise, the flight path of the unmanned aerial vehicle is planned.
The basic idea is as follows: when a certain horizontal distance exists between the unmanned aerial vehicle and a target landing point, the unmanned aerial vehicle directly flies in a straight line at high altitude, and when the unmanned aerial vehicle enters the range of the target point, the unmanned aerial vehicle vertically descends to 8m away from the ground, then carries out intelligent barrier, finally reaches 8m above the target point (hereinafter referred to as a near-ground area), and then vertically lands. A simplified schematic is shown in fig. 6.
Looking at fig. 6, it can be seen that the three-dimensional coordinates are reduced to two-dimensional coordinates. Three-dimensional coordinates (x) using the position and time of the drone 1 ,x 2 ,x 3 ) And planning the flight path of the unmanned aerial vehicle in the low air by taking the reference of an A-star intelligent routing algorithm.
All instructions of the unmanned aerial vehicle are sent by a master control system, and the master control system is divided into two subsystems: a path finding and obstacle avoiding system and a monitoring system. The two work independently, and the system block diagram is shown in figure 7.
The time point-based path planning and obstacle avoidance method has the advantages that: and moreover, the positions of all unmanned aerial vehicles are known, so that the time of the unmanned aerial vehicle passing through a certain point can be calculated, and avoidance can be made in advance through path adjustment. Like route recommendations at high-end navigation. And congestion avoidance is avoided.
Firstly, a plane is divided into square grids, coordinate points are artificially divided, and a search area is simplified. In combination with real-time positioning, the system is simplified into a three-dimensional dynamic array A = [ a ] composed of coordinates and time 1 (x 1 ,x 2 ,x 3 ),a 2 (x 1 ,x 2 ,x 3 ),…,a m (x 1 ,x 2 ,x 3 )]Wherein m is an integer that dynamically varies with the number and route of drones; x is the number of 1 ,x 2 Position coordinates, x, representing the drone 3 Representing a time coordinate. Each element of the array is a square of the grid, which has two states: both passable and non-passable. A path is described as a collection of squares that are traversed from A to B. Once a path is found, the drone goes from the hub of the personality (we call the "node") to another until the destination is reached, a feature of this system is that the entire course of travel of the drone does not need to be halted.
Let us assume at t 0 At the moment, the unmanned plane 1 searches from the starting point a to the end point B as follows:
starting from point a and storing it as a point to be processed in an "open list". At the initial moment, there is only one element in the table, but then there are more. The final path of number 1 may or may not pass through the tiles it contains. Basically, this is a list of squares to be examined.
Marking the traveling direction of the current unmanned aerial vehicle, wherein the traveling direction is one of up, down, left and right, and the consumption of the unmanned aerial vehicle rotating by 90 degrees is C 1 The cost of 180 degrees rotation is C 2 (C 1 ,C 2 Is a fixed value, set according to actual conditions).
And searching the squares which can pass in four directions of the starting point, namely, up, down, left and right, adding the squares into the open list, and skipping the squares which cannot pass. All these boxes hold points as the parent of a for the description of the path to follow.
Point a is removed from the open list and added to a "closed list" which holds all the squares that do not need to be checked again.
Next, the adjacent box in the open list is selected and the foregoing process is substantially repeated. The selection of target tiles is a major concern. Specifying a Path score value
F=G+H+C 1 +C 2
Here, G represents the movement cost of moving from the starting point a to the designated square on the grid along the generated path, and the drone only goes one step in this process, so G =1.H represents the cost of moving from the designated square to the final target point B.
Introducing a Euclidean distance and a Manhattan distance, wherein the Euclidean distance is as follows:
the manhattan distance is:
it can be seen that H is a prejudgment process that can minimize the path consumption of the drone.
After the optimal advancing path of the No. 1 unmanned aerial vehicle is generated through the steps, a three-dimensional array is obtained, and each point comprises the position and the time when the No. 1 unmanned aerial vehicle advances to the point. All elements in the array are stored in a new array, called a "working library". The calculation formula of the time is as follows:
wherein, t 0 Representing the departure time of the drone, n 90 Representing the number of quarter turns in the path, n 180 Representing the number of 180 degree turns in the path, τ t Representing the quarter turn takes time, S representing the total path length, and V representing the average speed of the drone.
At t 1 And (3) time, the No. 2 unmanned aerial vehicle enters a near-field area, the algorithm is repeated, after the optimal three-dimensional array of the No. 2 unmanned aerial vehicle is obtained, the optimal three-dimensional array is compared with data in a working library, if a near point exists, the point is marked as a point where the No. 2 unmanned aerial vehicle cannot enter, and the route is re-planned until a new path is generated. It is specified that two points are considered to be similar points when the time difference between the two points is less than 2 seconds on the premise that the position coordinates are the same.
And repeating the process to plan the path of the unmanned aerial vehicle to be landed at any moment.
Real-time path monitoring system:
the possible unmanned aerial vehicle continuation of the journey that appears in the reality is not enough, emergency such as individual unmanned aerial vehicle connection interruption is fully considered. A monitoring system is required to be designed to measure the position of the unmanned aerial vehicle in the whole near-ground area in real time, and when the unmanned aerial vehicle with the problem is found, the monitoring system reports the position information of the target unmanned aerial vehicle so as to correct the unmanned aerial vehicle in time to ensure that the master control system can continue to operate orderly.
The method specifically comprises the following steps: and taking the time of the master control system as a reference, receiving the two-dimensional coordinates of all the unmanned aerial vehicles in the near-field area once every 5 seconds by the monitoring system, comparing the coordinates with the time information at the moment with the route data of each unmanned aerial vehicle in the working library, and sending alarm information when the target deviates from the route. The specific formula of the deviation detection algorithm is as follows:
wherein k is 1 =1,k 2 =0.2, is a proportionality coefficient. x is the number of 1 ,x 2 ,x 3 The coordinate information of a certain unmanned aerial vehicle received by the current monitoring system. n represents the number of squares that the route of this frame of unmanned aerial vehicle passes through. When warning =1, the system sounds an alarm, otherwise no alarm is issued. Through the test of actual scene, set for when unmanned aerial vehicle deviates from the route and exceeds 1 meter, or time deviation exceeds five seconds, think that unmanned aerial vehicle breaks down, can set for by oneself through the numerical value of adjustment proportionality coefficient.
And (4) displaying the result: the result of randomly planning two paths is shown in fig. 8 (2 in the figure indicates no-pass, and 0 indicates pass) by using the above algorithm. As can be seen from fig. 8, the whole system can operate orderly, the unmanned aerial vehicle route can be seen in the figure, the time information on the route can be predicted, and the unmanned aerial vehicle can find a suitable route to arrive at the landing point without pause at any time on the condition that many map obstacles exist.
The foregoing is a further detailed description of the invention in connection with specific preferred embodiments and it is not intended to limit the invention to the specific embodiments described. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.