Unmanned aerial vehicle return control method and device, storage medium and electronic equipment
Technical Field
The invention relates to an unmanned aerial vehicle technology, in particular to a return control method and device of an unmanned aerial vehicle, a storage medium and electronic equipment.
Background
Along with the development of unmanned aerial vehicle technique and the gradual maturity of control system, more and more rotor formula unmanned aerial vehicle is used for fields such as commodity circulation, security protection, plant protection, patrolling and examining. Using commodity circulation unmanned aerial vehicle as an example, unmanned aerial vehicle is in carrying out autonomic task in-process, when meetting special circumstances such as bad weather, need return a journey, guarantees that unmanned aerial vehicle returns ground safely.
At present, a flyer (unmanned aerial vehicle control personnel) is generally adopted to take over the unmanned aerial vehicle and control the unmanned aerial vehicle to land to a specified position. The flying instability caused by sudden speed change easily occurs at the moment when the flying hand takes over the unmanned aerial vehicle; in addition, the effective control distance of manual return is limited by the communication distance of the ground remote controller, so that switching at any time when the return is needed is difficult to realize, and a large amount of manpower and material resources are wasted.
The above information disclosed in this background section is only for enhancement of understanding of the background of the invention and therefore it may contain information that does not constitute prior art that is already known to a person of ordinary skill in the art.
Disclosure of Invention
In this summary, concepts in a simplified form are introduced that are further described in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter.
The invention aims to solve the technical problem that the flying of the unmanned aerial vehicle is unstable due to sudden speed change after the return flight mode is switched.
In order to solve the technical problem, the invention provides a return control method of an unmanned aerial vehicle, which comprises the following steps:
responding to a return flight instruction, and reducing the flying speed of the unmanned aerial vehicle to be below a preset threshold value at a preset acceleration;
and controlling the unmanned aerial vehicle to fly to the designated position, and vertically landing from the designated position.
In one embodiment of the invention, the deceleration control of the drone comprises:
acquiring the current flying speed of the unmanned aerial vehicle, and setting the expected speed as the current flying speed;
uniformly reducing the desired speed of the drone until the value of the actual flying speed of the drone falls below a preset threshold.
In one embodiment of the invention, uniformly reducing the desired speed of the drone until the value of the actual speed of the drone decreases below a preset threshold comprises the steps of:
step S121: v is calculated by the following equation1Then proceeds to step S122,
v1=v0+a·Δt
wherein,
v0a desired speed;
a is the preset acceleration;
Δ t is the duration of a desired speed adjustment period;
step S122: judgment of v1If the value is less than zero, the step S124 is executed, otherwise, the step S123 is executed;
step S123: setting the value of the desired velocity as v1Setting the direction of the desired speed to be the same as the direction of the current flying speed, and proceeding to step S125;
step S124: setting the desired speed to zero, proceeding to step S125;
step S125: and acquiring the actual flying speed of the unmanned aerial vehicle, judging whether the actual flying speed is below the preset threshold value, if so, stopping deceleration control, and otherwise, entering the step S121.
In one embodiment of the present invention, Δ t is in a range of 0.0005 to 0.01 s.
In an embodiment of the present invention, the preset acceleration has a value range of greater than or equal to-1.0 m/s2And is less than or equal to-5.0 m/s2And the value range of the preset threshold is more than or equal to 0.1m/s and less than or equal to 0.5 m/s.
In one embodiment of the invention, controlling the unmanned aerial vehicle to fly to the specified position comprises the following steps:
controlling the unmanned aerial vehicle to return to the initial waypoint of the original flight line according to the original route;
and controlling the unmanned aerial vehicle to fly to the designated position along a straight line from the starting waypoint, wherein the longitude of the designated position is equal to that of the takeoff position of the unmanned aerial vehicle, the latitude of the designated position is equal to that of the takeoff position of the unmanned aerial vehicle, and the altitude of the designated position is equal to that of the starting waypoint.
In one embodiment of the present invention, the step of controlling the unmanned aerial vehicle to return to the starting waypoint of the original flight line according to the original route comprises:
and acquiring the waypoints passed by the unmanned aerial vehicle in the original flight line, and controlling the unmanned aerial vehicle to fly to the initial waypoint from the last waypoint passed by in sequence.
In one embodiment of the invention, when the communication loss time between the unmanned aerial vehicle and the ground control center is greater than a preset value, the unmanned aerial vehicle generates the return flight instruction; or
And the return flight instruction is issued by a ground control center.
An embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, wherein the computer program, when executed by a processor, implements the return control method described above.
An embodiment of the present invention also provides an electronic device, including:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the return leg control method of claim via execution of the executable instructions.
The invention also provides a return control device of the unmanned aerial vehicle, which comprises the following components:
the deceleration control module is used for reducing the flying speed of the unmanned aerial vehicle to be below a preset threshold value at a preset acceleration after receiving the return flight instruction;
and the return flight module is used for controlling the unmanned aerial vehicle to fly to a specified position for vertical landing.
According to the technical scheme, the return control method has the advantages and positive effects that:
after switching into the mode of returning a voyage earlier with predetermine the acceleration and evenly give unmanned aerial vehicle deceleration, return again after carrying out the deceleration to unmanned aerial vehicle and make unmanned aerial vehicle can accomplish the mode switching steadily, this has just avoided appearing the too big problem of unmanned aerial vehicle gesture change range that the speed sudden change leads to after switching the mode of returning a voyage.
Drawings
Various objects, features and advantages of the present invention will become more apparent from the following detailed description of preferred embodiments of the invention, when considered in conjunction with the accompanying drawings. The drawings are merely exemplary of the invention and are not necessarily drawn to scale. In the drawings, like reference characters designate the same or similar parts throughout the different views. Wherein:
FIG. 1 is a flow chart illustrating a method of return leg control according to an exemplary embodiment;
FIG. 2 is a flow chart illustrating a method of return leg control according to an exemplary embodiment;
FIG. 3 is a schematic diagram illustrating the construction of a return control apparatus according to an exemplary embodiment;
FIG. 4 is a schematic diagram of an electronic device shown in accordance with an exemplary embodiment;
FIG. 5 is a block diagram illustrating a program product according to one exemplary embodiment.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar structures, and thus their detailed description will be omitted.
Referring to fig. 1, fig. 1 is a flowchart of a return control method of an unmanned aerial vehicle. The return control method comprises the following steps:
step S10: and responding to the return flight instruction, and reducing the flying speed of the unmanned aerial vehicle to be below a preset threshold value at a preset acceleration.
The drone may be a multi-rotor drone. The unmanned aerial vehicle can fly along a preset flight line, and the ground control center can send a return flight instruction to the unmanned aerial vehicle by adopting wireless communication when severe weather, incorrect air route planning, unmanned aerial vehicle faults and the like occur. The return command can also be automatically generated by the unmanned aerial vehicle, for example, when the time of communication loss of connection between the unmanned aerial vehicle and the ground control center is greater than a preset value, the unmanned aerial vehicle automatically generates the return command.
When the unmanned aerial vehicle receives the return flight instruction or generates the return flight instruction, the unmanned aerial vehicle in flight is decelerated. The deceleration of the unmanned aerial vehicle is realized by using the preset acceleration, and the deceleration process is stable. When the flying speed of the unmanned aerial vehicle is reduced below a preset threshold value, deceleration is finished. The value range of the preset acceleration is preferably more than or equal to-1.0 m/s2And is less than or equal to-5.0 m/s2The value range of the preset threshold is preferably greater than or equal to 0.1m/s and less than or equal to 0.5 m/s.
Step S20: and controlling the unmanned aerial vehicle to fly to the designated position for vertical landing.
The designated position may be a position pre-stored in the drone, or a position designated in a return flight command sent by the ground control center. The unmanned aerial vehicle can fly from the current position to the designated position along the return route. The return route can be a straight line or a route planned by a ground control center or an unmanned aerial vehicle according to the current position and the designated position of the unmanned aerial vehicle and a map between the current position and the designated position. When the designated position is above the place where the unmanned aerial vehicle takes off, the unmanned aerial vehicle can return according to the original path.
Like this, unmanned aerial vehicle is when flying along predetermined flight path, switches into the mode of returning a voyage after receiving the instruction of returning a voyage, gives unmanned aerial vehicle deceleration with predetermineeing the acceleration uniformly earlier after switching into the mode of returning a voyage, again returns a voyage after carrying out the deceleration to unmanned aerial vehicle and makes unmanned aerial vehicle can accomplish the mode switch smoothly, and this has just avoided appearing the too big problem of unmanned aerial vehicle gesture change range that the speed mutation leads to after switching the mode of returning a voyage.
Further, in step S10, the deceleration control of the unmanned aerial vehicle includes step S110 and step S120.
Step S110: and acquiring the current flying speed of the unmanned aerial vehicle, and setting the expected speed as the current flying speed.
In the unmanned aerial vehicle, the flight speed of the unmanned aerial vehicle is usually adjusted through a PID algorithm so that the flight speed of the unmanned aerial vehicle can reach an expected speed, the expected speed is set for the unmanned aerial vehicle, and the unmanned aerial vehicle can fly according to the expected speed.
Before unmanned aerial vehicle slows down, acquire the current airspeed that unmanned aerial vehicle flies along former flight line earlier, this current airspeed can be measured unmanned aerial vehicle's airspeed in real time through the sensor on the unmanned aerial vehicle and obtain, then set up the expectation speed equal with this current airspeed. Like this, in the twinkling of an eye that switches into the mode of returning voyage, can maintain unmanned aerial vehicle's speed unchangeable for unmanned aerial vehicle can the steady flight when switching the mode.
Step S120: uniformly reducing the desired speed of the drone until the value of the actual flying speed of the drone falls below a preset threshold.
The flying speed of the unmanned aerial vehicle is adjusted by changing the expected speed, so that the unmanned aerial vehicle is simpler and more convenient, and the expected speed of the unmanned aerial vehicle is uniformly reduced, so that the unmanned aerial vehicle is more stable in speed reduction. The actual flying speed of the unmanned aerial vehicle is obtained in real time, and the speed reduction is stopped when the actual flying speed of the unmanned aerial vehicle is reduced to be below a preset threshold value.
Further, referring to fig. 2, the desired speed is lowered periodically, Δ t being one adjustment period. Step S120 includes steps S121 to S125.
Step S121: v is calculated by the following equation1Then proceeds to step S122,
v1=v0+a·Δt
wherein v is1The unit of (a) is m/s;
v0desired speed, in m/s;
a is the preset acceleration in m/s2;
Δ t is the duration of a desired speed adjustment period, in units of s;
the first time step S121 is entered, the desired speed v0Is equal to the value of the current flying speed obtained in step S110. Δ t is a preset value and can be set as small as possible.
Step S122: judgment of v1If the value is less than zero, the step S124 is executed, otherwise, the step S123 is executed;
step S123: setting the value of the desired velocity as v1Setting the direction of the desired speed to be the same direction as the current flying speed measured in step S110, proceeding to step S125;
step S124: setting the desired speed to zero, proceeding to step S125;
step S125: and acquiring the actual flying speed of the unmanned aerial vehicle, judging whether the actual flying speed is below a preset threshold value, if so, stopping deceleration control, and otherwise, entering the step S121.
The desired speed is decelerated once while steps S121, S122, and S123 are sequentially performed, the time interval of the deceleration is Δ t, and the magnitude of the deceleration is a · Δ t, so that the desired speed is uniformly reduced. Meanwhile, the time interval delta t of deceleration is set to be as small as possible, and the flying speed of the unmanned aerial vehicle can approach to deceleration with the preset acceleration. The value range of delta t is preferably 0.0005-0.01 s, and the unmanned aerial vehicle can be stably decelerated within the range, and the calculation burden of the unmanned aerial vehicle is not too large.
Execution of step S124 then represents that the desired speed of the previous adjustment has been less than a · Δ t, this adjustment directly setting the desired speed to zero.
When step S125 is executed, it indicates that the actual flying speed of the drone is already smaller than the preset threshold, the deceleration control of the drone is directly ended, and then the process proceeds to step S20. The actual airspeed of the drone may be obtained by real-time measurement of the airspeed of the drone by sensors on the drone.
Further, the step S20 includes steps S210-230.
Step S210: and controlling the unmanned aerial vehicle to return to the initial waypoint of the original flight line according to the original route.
The original flight line is composed of a plurality of navigation points which are continuously arranged, and the unmanned aerial vehicle finishes the flight sequentially through the navigation points. The starting waypoint is at the beginning of the original flight line, and a waypoint is represented by three quantities, longitude, latitude and altitude. When flying according to the original flight path, starting from the starting waypoint, the unmanned aerial vehicle marks the waypoint and records the waypoint in the waypoint file every time the unmanned aerial vehicle passes through one waypoint.
And when the unmanned aerial vehicle returns, the waypoints which the unmanned aerial vehicle has passed through in the original flight line are obtained first, and the unmanned aerial vehicle is controlled to fly to the initial waypoint from the waypoint which has passed through last in sequence. Specifically, the drone reads the marked-through waypoints in the waypoint file stored therein, and the reading sequence is reverse reading, that is, reading from the last waypoint that has been passed to the starting waypoint. And when one passing waypoint is read, the unmanned aerial vehicle flies to the waypoint, and when the unmanned aerial vehicle reaches the waypoint, the next passing waypoint is read until the unmanned aerial vehicle reaches the initial waypoint. The unmanned aerial vehicle can return to the initial waypoint according to the original route.
The original flight route is a better route, and the possibility of collision in return flight is low. Especially, because this unmanned aerial vehicle also need not earlier the specific height that climbs perpendicularly when returning a voyage, unmanned aerial vehicle returns a voyage power consumption little, and the risk that unmanned aerial vehicle runs up the crash of electric quantity in returning a voyage picture is little.
Step S220: and controlling the unmanned aerial vehicle to fly to a specified position from the starting waypoint, wherein the longitude of the specified position is equal to that of the takeoff position of the unmanned aerial vehicle, the latitude of the specified position is equal to that of the takeoff position of the unmanned aerial vehicle, and the altitude of the specified position is equal to that of the starting waypoint.
And recording the longitude and the latitude of the lower takeoff position when the unmanned aerial vehicle unlocks the takeoff. The longitude of the designated location is equal to the longitude of the takeoff location of the drone, the latitude of the designated location is equal to the latitude of the takeoff location of the drone, and the altitude of the designated location is equal to the location of the altitude of the starting waypoint, such that the designated location is effectively one point at which the altitude above the takeoff location of the drone is the same as the altitude of the starting waypoint. Because the height above sea level of assigned position is the same with the height above sea level of initial waypoint, only need follow horizontal straight line flight when flying to the assigned position from initial waypoint can, treat that unmanned aerial vehicle flies to the assigned position and can carry out the vertical landing.
Step S230: the unmanned aerial vehicle flies to a designated position and then vertically lands.
The unmanned aerial vehicle lands to the position of taking off promptly after falling perpendicularly, only need to take off the position to retrieve unmanned aerial vehicle can.
In an embodiment of the invention, a return control device 1 of the unmanned aerial vehicle is also provided.
Referring to fig. 3, the return flight control device 1 includes a deceleration control module 11 and a return flight module 12.
The deceleration control module 11 is used for reducing the flying speed of the unmanned aerial vehicle to be below a preset threshold value at a preset acceleration after receiving the return flight instruction. The fly-back module 12 is used for controlling the unmanned aerial vehicle to fly to a specified position for vertical landing after the flying speed of the unmanned aerial vehicle is reduced to be below a preset threshold value.
Further, the deceleration control module 11 includes a transition module 111 and a deceleration module 112.
The transition module 111 is configured to obtain a current flying speed of the unmanned aerial vehicle, and set an expected speed to the current flying speed;
the deceleration module 112 is configured to uniformly reduce the desired speed of the drone until the value of the actual airspeed of the drone falls below a preset threshold.
Further, the fly-back module 12 further includes a return-to-home module 121, a horizontal flight module 122, and a vertical landing module 123.
The original route return module 121 is used for controlling the unmanned aerial vehicle to return to the initial waypoint of the original flight route according to the original route.
The horizontal flight module 122 is configured to control the drone to fly from the starting waypoint to the designated location along a straight line, where the longitude of the designated location is equal to the longitude of the takeoff location of the drone, the latitude of the designated location is equal to the latitude of the takeoff location of the drone, and the altitude of the designated location is equal to the altitude of the starting waypoint.
The vertical landing module 123 is used for controlling the unmanned aerial vehicle to vertically land from a designated position.
In an exemplary embodiment of the invention, an electronic device capable of implementing the return control method of the unmanned aerial vehicle is also provided.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 800 according to this embodiment of the invention is described below with reference to fig. 4. The electronic device 800 shown in fig. 4 is only an example and should not bring any limitations to the function and scope of use of the embodiments of the present invention.
As shown in fig. 4, the electronic device 800 is in the form of a general purpose computing device. The components of the electronic device 800 may include, but are not limited to: the at least one processing unit 810, the at least one memory unit 820, and a bus 830 that couples the various system components including the memory unit 820 and the processing unit 810.
Wherein the storage unit stores program code that is executable by the processing unit 810 to cause the processing unit 810 to perform steps according to various exemplary embodiments of the present invention as described in the above section "exemplary methods" of the present specification.
The storage unit 820 may include readable media in the form of volatile memory units such as a random access memory unit (RAM)8201 and/or a cache memory unit 8202, and may further include a read only memory unit (ROM) 8203.
The storage unit 820 may also include a program/utility 8204 having a set (at least one) of program modules 8205, such program modules 8205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 830 may be any of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 800 may also communicate with one or more external devices 700 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 600, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 800 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 650. Also, the electronic device 800 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 860. As shown, the network adapter 860 communicates with the other modules of the electronic device 800 via the bus 830. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above section "exemplary methods" of the present description, when said program product is run on the terminal device.
Referring to fig. 5, a program product 900 for implementing the return control method of the drone is described, which may employ a portable compact disc read only memory (CD-ROM) and include program codes, and may be run on a terminal device, such as a personal computer, according to an embodiment of the present invention. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Moreover, although the steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that the steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.