Disclosure of Invention
In order to solve part or all of technical problems in the prior art, the invention provides an unmanned aerial vehicle cluster pilot selection method based on a distributed consensus mechanism.
The technical scheme of the invention is as follows:
the unmanned aerial vehicle cluster pilot selection method based on the distributed consensus mechanism comprises the following steps:
s1, sending heartbeat signals to followers of the unmanned aerial vehicle cluster by a pilot of the unmanned aerial vehicle cluster at preset time intervals;
s2, when the heartbeat signal of the pilot is not received after the set time is exceeded, each follower calculates the self qualification value according to the self characteristic and the current unmanned aerial vehicle cluster state, and sends a voting request comprising the self qualification value to other followers;
s3, each follower compares the self qualification value with all qualification values received in the preset receiving time, if the self qualification value is not less than other qualification values, the follower is voted, if other qualification values are more than the self qualification value, the follower with the highest qualification value is voted and voted, wherein if the follower with the highest qualification value comprises a plurality of followers, one of the followers is selected to vote according to the receiving time of the voting request;
s4, each follower counts the obtained votes in real time, if more than half of the votes of the followers are obtained, pilot confirmation state information is sent to other followers, heartbeat signals are sent to other followers at preset time intervals, if more than half of the votes of the followers are not obtained, and the pilot confirmation state information is not received within the preset voting time, the voting request resending time is calculated according to the self qualification value, and the step S5 is carried out;
s5, if each follower receives the voting request from other followers before the time of retransmitting the voting request, immediately voting the follower corresponding to the voting request, replying the voting information, and repeating step S4, if the voting request from other followers is not received, transmitting the voting request to other followers, voting the followers, and repeating step S4.
In some possible implementation manners, the follower calculates the self qualification value by using the following formula according to the self characteristics and the current unmanned aerial vehicle cluster state;
wherein Q isselfRepresenting the self-qualification value of the current follower, Exp (DEG) representing an exponential function, theta representing a characteristic weight parameter vector, thetaTAnd expressing the transpose of the characteristic weight parameter vector, wherein x expresses the numerical characteristic vector of the unmanned aerial vehicle after normalized dimensionless preprocessing, and sigma expresses the standard deviation of the distance set between the current follower and other followers.
In some possible implementations, the features of the drone itself include: at least one of an amount of energy remaining, a distance to a task target, a total number of sensed load categories, and a total number of task related load categories.
In some possible implementations, the standard deviation of the set of follower and other follower distances is calculated using the following formula;
wherein d isiIndicating the distance of the current follower from the ith of the other followers, davgRepresenting the average distance of the current follower from the other followers and n representing the total number of followers in the cluster of drones.
In some possible implementations, in step S3, when the follower with the highest qualification value includes a plurality of followers, the current follower selects a follower corresponding to the voting request received first from the plurality of followers with the highest qualification value to vote.
In some possible implementation modes, the follower calculates the resending time of the voting request by using the following formula according to the qualification value of the follower;
wherein, TselfIndicating the retransmission time of the voting request corresponding to the current follower.
In some possible implementations, if the failed pilot recovers state, the follower is rejoined.
The technical scheme of the invention has the following main advantages:
according to the unmanned aerial vehicle cluster navigator selection method based on the distributed consensus mechanism, the qualification value of each follower which can serve as a navigator is calculated according to the characteristics of the unmanned aerial vehicle and the current unmanned aerial vehicle cluster state, consensus election is completed according to numerical value comparison, meanwhile, a voting request is sent in a postponed mode according to the qualification value aiming at the possible election flat vote phenomenon and election separate vote phenomenon so as to conduct voting again, the influence of the unmanned aerial vehicle cluster state, the real objective environment and the actual execution task can be fully considered, the consensus election is completed in a short time, and the stability and the robustness of the unmanned aerial vehicle cluster are guaranteed.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the specific embodiments of the present invention and the accompanying drawings. It is to be understood that the described embodiments are merely a few embodiments of the invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
The technical scheme provided by the embodiment of the invention is described in detail below with reference to the accompanying drawings.
Referring to fig. 1, an embodiment of the present invention provides an unmanned aerial vehicle cluster pilot selection method based on a distributed consensus mechanism, including the following steps:
s1, sending heartbeat signals to followers of the unmanned aerial vehicle cluster by a pilot of the unmanned aerial vehicle cluster at preset time intervals;
s2, when the heartbeat signal of the pilot is not received after the set time is exceeded, each follower calculates the self qualification value according to the self characteristic and the current unmanned aerial vehicle cluster state, and sends a voting request comprising the self qualification value to other followers;
s3, each follower compares the self qualification value with all qualification values received in the preset receiving time, if the self qualification value is not less than other qualification values, the follower is voted, if other qualification values are more than the self qualification value, the follower with the highest qualification value is voted and voted, wherein if the follower with the highest qualification value comprises a plurality of followers, one of the followers is selected to vote according to the receiving time of the voting request;
s4, each follower counts the obtained votes in real time, if more than half of the votes of the followers are obtained, pilot confirmation state information is sent to other followers, heartbeat signals are sent to other followers at preset time intervals, if more than half of the votes of the followers are not obtained, and the pilot confirmation state information is not received within the preset voting time, the voting request resending time is calculated according to the self qualification value, and the step S5 is carried out;
s5, if each follower receives the voting request from other followers before the time of retransmitting the voting request, immediately voting the follower corresponding to the voting request, replying the voting information, and repeating step S4, if the voting request from other followers is not received, transmitting the voting request to other followers, voting the followers, and repeating step S4.
According to the unmanned aerial vehicle cluster navigator selection method based on the distributed consensus mechanism, provided by the embodiment of the invention, the qualification value of each follower which can serve as a navigator is calculated according to the self characteristics of the unmanned aerial vehicle and the current unmanned aerial vehicle cluster state, the consensus election is completed according to the numerical value comparison, meanwhile, according to the election flat vote phenomenon and the election separate vote phenomenon which possibly occur, the voting request is sent in a delayed mode according to the qualification value to conduct voting again, the influence of the unmanned aerial vehicle cluster state, the real objective environment and the actual execution task can be fully considered, the consensus election is completed in a short time, and the stability and the robustness of the unmanned aerial vehicle cluster are ensured.
The following specifically describes each step and principle of the unmanned aerial vehicle cluster navigator selection method based on the distributed consensus mechanism according to an embodiment of the present invention.
And step S1, the pilot of the unmanned aerial vehicle cluster sends heartbeat signals to the followers of the unmanned aerial vehicle cluster at preset time intervals.
One unmanned aerial vehicle in the unmanned aerial vehicle cluster which is controlled to move by the piloting following method is used as a piloter, and other unmanned aerial vehicles are used as followers. When the unmanned aerial vehicle cluster is in a stable working state, the pilot sends a control instruction to the follower, the follower receives the control instruction of the pilot and executes corresponding action, and meanwhile, the pilot exchanges heartbeat signals with the follower at preset time intervals so as to keep a normal working state.
The preset time interval can be set according to the position state and the communication state of the unmanned aerial vehicle cluster, the executed actual task and the environment where the unmanned aerial vehicle cluster is located.
And step S2, when the heartbeat signal of the pilot is not received after the set time is exceeded, each follower calculates the self qualification value according to the self characteristic and the current unmanned aerial vehicle cluster state, and sends a voting request comprising the self qualification value to other followers.
When the follower does not receive the heartbeat signal of the pilot within the set time, it indicates that the current pilot may be failed due to a fault or some irresistible factors, and the pilot needs to be reselected to ensure that the unmanned aerial vehicle cluster can stably run to execute the task.
Wherein, if the disabled pilot recovers the state, the follower is added again.
In one embodiment of the invention, after the heartbeat signal of the pilot is not received within the set time, each follower calculates the self qualification value by using the following formula according to the self characteristic and the current unmanned aerial vehicle cluster state;
wherein Q isselfRepresenting the self-qualification value of the current follower, Exp (DEG) representing an exponential function, theta representing a characteristic weight parameter vector, thetaTAnd expressing the transpose of the characteristic weight parameter vector, wherein x expresses the numerical characteristic vector of the unmanned aerial vehicle after normalized dimensionless preprocessing, and sigma expresses the standard deviation of the distance set between the current follower and other followers.
In an embodiment of the present invention, the features of the drone include: at least one of an amount of energy remaining, a distance to a task target, a total number of sensed load categories, and a total number of task related load categories.
Optionally, the features of the drone themselves include: the energy surplus, the distance to the task target, the total number of sensing load types and the total number of task-related load types. Therefore, the reliability of the pilot obtained by final election can be ensured.
In an embodiment of the present invention, the feature weight parameter vector is transposed θ
TCan be set to by heuristic method
And m is the total number of the features of the unmanned aerial vehicle.
In one embodiment of the invention, the standard deviation of the distance set between the follower and other followers can be calculated by using the following formula;
wherein d isiIndicating current follower followed by othersDistance of the ith follower among the persons, davgRepresenting the average distance of the current follower from the other followers and n representing the total number of followers in the cluster of drones.
The quality value of each follower which can serve as a pilot is calculated by the formula, the influence of all factors of the unmanned aerial vehicle cluster state, the real objective environment and the actual execution task can be fully considered, and the recombined unmanned aerial vehicle cluster can be ensured to be capable of coping with complex and changeable environments and various different tasks.
The set time can be set according to the position state and the communication state of the unmanned aerial vehicle cluster, the executed actual task and the environment.
And step S3, each follower compares the self qualification value with all the qualification values received in the preset receiving time, if the self qualification value is not less than other qualification values, the follower is voted, if other qualification values are more than the self qualification value, the follower with the highest qualification value is voted and voted for information, wherein if the follower with the highest qualification value comprises a plurality of followers, one of the followers is selected to vote according to the receiving time of the voting request in the front-back sequence.
In an embodiment of the invention, voting is performed by comparing the qualification values, and the follower with the highest qualification value is selected as the navigator, so that the cluster consensus is consistent, and the stability and robustness of the recombined unmanned aerial vehicle cluster can be improved.
Wherein, predetermine the time of receipt and can set up according to the position state and the communication state of unmanned aerial vehicle cluster.
In an embodiment of the present invention, when there are a plurality of followers with the highest qualification value, the current follower selects a follower corresponding to the voting request received first from the plurality of followers with the highest qualification value to vote, that is, selects a follower corresponding to the receiving time of the voting request before to vote.
Step S4, each follower counts the obtained votes in real time, if more than half of the followers 'votes are obtained, pilot confirmation state information is sent to other followers, heartbeat signals are sent to other followers at preset time intervals, if more than half of the followers' votes are not obtained, and pilot confirmation state information is not received within the preset voting time, the voting request resending time is calculated according to the self qualification value, and step S5 is carried out;
specifically, when a certain follower obtains more than half of the votes of the followers, the follower is elected as a pilot, and at the moment, the pilot sends pilot confirmation state information to other followers and sends heartbeat signals to other followers at preset time intervals so as to maintain the normal working state of the unmanned aerial vehicle cluster and complete the pilot selection process.
When the follower does not obtain more than half of the followers' votes and does not receive the pilot confirmation state information within the preset voting time, the voting process shows that the voting is flat or divided, and at the moment, each follower calculates the voting request resending time according to the self qualification value so as to conduct voting again.
Wherein, preset voting time can be set according to the position state and the communication state of the unmanned aerial vehicle cluster.
In one embodiment of the invention, the follower can calculate the resending time of the voting request by using the following formula according to the qualification value of the follower;
wherein, TselfIndicating the retransmission time of the voting request corresponding to the current follower.
The retransmission time of the voting request corresponding to each follower is calculated by utilizing the formula, so that the follower with the highest qualification value has the minimum retransmission time of the voting request, and the follower with the highest qualification value firstly sends out the voting request. And because the qualification value is highest, other followers receiving the voting request immediately vote after receiving the voting request, thereby avoiding the oscillation and instability of multiple rounds of elections.
In step S5, if each follower receives the voting request from another follower before the time of retransmitting the voting request, immediately voting the follower corresponding to the voting request, replying voting information, and repeating step S4, if the voting request from another follower is not received, transmitting the voting request to another follower, voting the follower, and repeating step S4.
Specifically, since the retransmission time of the voting request is calculated according to the qualification value, the higher the qualification value is, the smaller the retransmission time of the corresponding voting request is, and if the follower receives the voting requests of other followers before the retransmission time of the voting request, the qualification value contained in the received voting request is inevitably greater than the qualification value of the follower, and at this time, the follower corresponding to the voting request is immediately voted, and voting information is replied; if the follower does not receive the voting requests of other followers before the time of retransmitting the voting requests, the quality value of the follower is the highest, and the follower transmits the voting requests to other followers and votes for the follower; meanwhile, after voting is carried out by the follower, the obtained votes are counted in real time, and corresponding actions are carried out according to the counting result until the pilot is selected.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. In addition, "front", "rear", "left", "right", "upper" and "lower" in this document are referred to the placement states shown in the drawings.
Finally, it should be noted that: the above examples are only for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.