Method and device for controlling unmanned aerial vehicleTechnical Field
The invention relates to the technical field of electronics, in particular to a method and a device for controlling an unmanned aerial vehicle.
Background
At present, unmanned aerial vehicles are widely applied to the fields of mapping, forest surveying, disaster monitoring, logistics express delivery, high-altitude shooting and the like.
The aircraft is essentially a complex nonlinear system, the traditional control method is that an aircraft mathematical model is linearized to obtain small-disturbance linearized state equations under different modes, corresponding control laws are designed and parameter-adjusted according to the different flight modes, and finally all the flight states are connected to form the control law in the whole envelope. In the traditional control method, if the attitude of the airplane is changed violently or is interfered by a large external environment, the airplane cannot be effectively controlled, and even the unmanned aerial vehicle is directly out of control, so that the stability and robustness of control are poor, and the flight quality and safety are difficult to guarantee.
Therefore, the method for controlling the unmanned aerial vehicle in the prior art has the technical problems of poor stability and robustness.
Disclosure of Invention
The embodiment of the invention provides a method and a device for controlling an unmanned aerial vehicle, which are used for solving the problems of poor stability and robustness of the method for controlling the unmanned aerial vehicle in the prior art.
In a first aspect, the present invention provides a method for controlling a drone, comprising:
acquiring a current geographic position coordinate of each unmanned aerial vehicle in a plurality of unmanned aerial vehicles;
selecting a target unmanned aerial vehicle to be controlled according to the current geographical position coordinates of each unmanned aerial vehicle;
obtaining a first control instruction, wherein the first control instruction is an original control instruction used for controlling the target unmanned aerial vehicle to fly to reach a target state;
converting the first control instruction into a second control instruction which is in dynamic accordance with the expected response according to a preset ideal model;
acquiring flight state parameters of the target unmanned aerial vehicle related to the second control instruction, and generating comprehensive feedback according to the flight state parameters;
performing error control according to the second control instruction and the comprehensive feedback to obtain a third control instruction;
and controlling the target unmanned aerial vehicle according to the third control instruction.
Optionally, a correspondence relationship between the first control command and the expected response dynamics is set in the ideal model.
Optionally, the flight state parameters of the drone related to the second control instruction include:
one or more of flight speed, dynamic pressure, overload, altitude, acceleration, attitude angle, angular rate, angular acceleration, airflow angle, motor speed, control surface deflection angle, atmospheric density and atmospheric temperature.
Optionally, the generating the synthetic feedback accordingly comprises:
and performing variable design on the value of the flight state parameter, converting the value into a command change value corresponding to the second control command, and taking the command change value as the comprehensive feedback.
Optionally, performing error control according to the second control command and the comprehensive feedback, and obtaining a third control command includes:
calculating an error according to the second control instruction and the comprehensive feedback, and obtaining a comprehensive error control instruction through control operation;
and analyzing and extracting a physical quantity directly related to control output from the comprehensive error control command to serve as a third control command.
Optionally, after performing error control on the second control command and the comprehensive feedback to obtain a third control command, the method further includes:
predicting uncertain or interference factors of the unmanned aerial vehicle flight to obtain a predicted value;
and correcting the third control instruction based on the predicted value to obtain a fourth control instruction.
Based on the same inventive concept, a second aspect of the present invention provides a control apparatus for an unmanned aerial vehicle, including:
the current geographic position coordinate acquisition module is used for acquiring the current geographic position coordinate of each unmanned aerial vehicle in the plurality of unmanned aerial vehicles;
the target unmanned aerial vehicle selection module is used for selecting a target unmanned aerial vehicle to be controlled according to the current geographic position coordinate of each unmanned aerial vehicle;
the first obtaining module is used for obtaining a first control instruction, wherein the first control instruction is an original control instruction used for controlling the unmanned aerial vehicle to fly to reach a target state by the target;
the conversion module is used for converting the first control instruction into a second control instruction which is in dynamic conformity with the expected response according to a preset ideal model;
the feedback module is used for acquiring flight state parameters of the target unmanned aerial vehicle related to the second control instruction and generating comprehensive feedback according to the flight state parameters;
the second obtaining module is used for carrying out error control according to the second control instruction and the comprehensive feedback to obtain a third control instruction;
and the control module is used for controlling the target unmanned aerial vehicle according to the third control instruction.
Optionally, a correspondence between the first control command and the expected response dynamics is set in the ideal model.
Optionally, the flight state parameters of the target drone related to the second control instruction include:
one or more of flight speed, dynamic pressure, overload, altitude, acceleration, attitude angle, angular rate, angular acceleration, airflow angle, motor speed, control surface deflection angle, atmospheric density and atmospheric temperature.
Optionally, the feedback module is further configured to:
and performing variable design on the value of the flight state parameter, converting the value into a command change value corresponding to the second control command, and taking the command change value as the comprehensive feedback.
Optionally, the second obtaining module is further configured to:
calculating an error according to the second control instruction and the comprehensive feedback, and obtaining a comprehensive error control instruction through control operation;
and analyzing and extracting a physical quantity directly related to control output from the comprehensive error control command to serve as a third control command.
Optionally, the apparatus further comprises a prediction module configured to:
predicting uncertain or interference factors of the target unmanned aerial vehicle flight to obtain a predicted value;
and correcting the third control instruction based on the predicted value to obtain a fourth control instruction.
Based on the same inventive concept, a third aspect of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
acquiring a current geographic position coordinate of each unmanned aerial vehicle in a plurality of unmanned aerial vehicles;
selecting a target unmanned aerial vehicle to be controlled according to the current geographical position coordinates of each unmanned aerial vehicle;
obtaining a first control instruction, wherein the first control instruction is an original control instruction used for controlling the target unmanned aerial vehicle to fly to reach a target state;
converting the first control instruction into a second control instruction which is in dynamic accordance with the expected response according to a preset ideal model;
acquiring flight state parameters of the unmanned aerial vehicle related to the second control instruction, and generating comprehensive feedback according to the flight state parameters;
performing error control according to the second control instruction and the comprehensive feedback to obtain a third control instruction;
and controlling the unmanned aerial vehicle according to the third control instruction.
Based on the same inventive concept, a fourth aspect of the present invention provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the program:
acquiring a current geographic position coordinate of each unmanned aerial vehicle in a plurality of unmanned aerial vehicles;
selecting a target unmanned aerial vehicle to be controlled according to the current geographical position coordinates of each unmanned aerial vehicle;
obtaining a first control instruction, wherein the first control instruction is an original control instruction used for controlling the target unmanned aerial vehicle to fly to reach a target state;
converting the first control instruction into a second control instruction which is in dynamic accordance with the expected response according to a preset ideal model;
acquiring flight state parameters of the unmanned aerial vehicle related to the second control instruction, and generating comprehensive feedback according to the flight state parameters;
performing error control according to the second control instruction and the comprehensive feedback to obtain a third control instruction;
and controlling the unmanned aerial vehicle according to the third control instruction.
One or more technical solutions in the embodiments of the present application have at least one or more of the following technical effects:
in the technical solution of the embodiment of the present invention, on one hand, the first control command may be converted into the second control command according to the preset ideal model, which is in accordance with the expected response dynamics, so as to avoid the problem of unstable control of the drone due to a large change of the first control command, on the other hand, the third control command may be obtained by generating the comprehensive feedback according to the current state parameter of the drone related to the second control command, and performing error control according to the second control command and the comprehensive feedback, so as to obtain the comprehensive feedback of the third control command, and then controlling the drone based on the third control command, since the third control command for finally controlling the drone is obtained by performing error control on the comprehensive feedback and the second control command, and the comprehensive feedback is obtained according to the current state parameter of the drone related to the second control command, that is, the third control command comprehensively considers the current motion state of the drone, therefore, the unmanned aerial vehicle can be controlled by combining the current motion state of the unmanned aerial vehicle, the stability and robustness of the control of the unmanned aerial vehicle can be improved, and the problem of poor stability of a method for controlling the unmanned aerial vehicle in the prior art is solved.
Drawings
Fig. 1 is a flow chart of a method for controlling a drone in an embodiment of the invention;
fig. 2 is a structural diagram of a controller device of an unmanned aerial vehicle according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a method and a device for controlling an unmanned aerial vehicle, which are used for solving the problems of poor stability and robustness of the method for controlling the unmanned aerial vehicle in the prior art.
In order to solve the above technical problems, a technical solution provided by an embodiment of the present invention has the following general idea:
acquiring a current geographic position coordinate of each unmanned aerial vehicle in a plurality of unmanned aerial vehicles;
selecting a target unmanned aerial vehicle to be controlled according to the current geographical position coordinates of each unmanned aerial vehicle;
obtaining a first control instruction, wherein the first control instruction is an original control instruction used for controlling the target unmanned aerial vehicle to fly to reach a target state;
converting the first control instruction into a second control instruction which is in dynamic accordance with the expected response according to a preset ideal model;
acquiring flight state parameters of the unmanned aerial vehicle related to the second control instruction, and generating comprehensive feedback according to the flight state parameters;
performing error control according to the second control instruction and the comprehensive feedback to obtain a third control instruction;
and controlling the unmanned aerial vehicle according to the third control instruction.
In the method, the first control instruction can be converted into the second control instruction which is in accordance with the expected response dynamic state according to the preset ideal model, so that the problem that the unmanned aerial vehicle is unstable in control due to large change of the first control instruction can be avoided, on the other hand, the comprehensive feedback can be generated according to the current state parameters of the unmanned aerial vehicle related to the second control instruction, error control is performed according to the second control instruction and the comprehensive feedback, the comprehensive feedback of the third control instruction is obtained, and the unmanned aerial vehicle is controlled based on the third control instruction, because the third control instruction for finally controlling the unmanned aerial vehicle is obtained by performing error control on the comprehensive feedback and the second control instruction, the comprehensive feedback is obtained according to the current state parameters of the unmanned aerial vehicle related to the second control instruction, namely the current motion state of the unmanned aerial vehicle is comprehensively considered by the third control instruction, therefore, the unmanned aerial vehicle can be controlled by combining the current motion state of the unmanned aerial vehicle, the stability and robustness of the control of the unmanned aerial vehicle can be improved, and the problem of poor stability of a method for controlling the unmanned aerial vehicle in the prior art is solved.
The technical solutions of the present invention are described in detail below with reference to the drawings and specific embodiments, and it should be understood that the specific features in the embodiments and examples of the present invention are described in detail in the technical solutions of the present application, and are not limited to the technical solutions of the present application, and the technical features in the embodiments and examples of the present application may be combined with each other without conflict.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
Example one
A first aspect of the present invention provides a method for controlling an unmanned aerial vehicle, and please refer to fig. 1, which is a flowchart of a method for controlling an unmanned aerial vehicle according to an embodiment of the present invention. The method comprises the following steps:
s110; acquiring a current geographic position coordinate of each unmanned aerial vehicle in a plurality of unmanned aerial vehicles;
specifically, the method and the device are particularly used for controlling the unmanned aerial vehicles flying in the air, and a plurality of unmanned aerial vehicles flying simultaneously in the air are provided, so that when a certain unmanned aerial vehicle needs to be controlled at this time, the current geographic position coordinates of each of the unmanned aerial vehicles can be obtained firstly, and the unmanned aerial vehicles needing to be controlled are screened according to the current geographic position coordinates of each unmanned aerial vehicle;
s120; selecting a target unmanned aerial vehicle to be controlled according to the current geographical position coordinates of each unmanned aerial vehicle;
in step 120, the following sub-steps may be further specifically included: according to the current geographic position coordinates of each unmanned aerial vehicle, performing position area classification on the current positions of the plurality of unmanned aerial vehicles, for example, 2 unmanned aerial vehicles are included in a first position area, and the first position area can be a circular position area formed by taking a first position of a first area as a center of a circle and taking a first distance as a radius; the second location area comprises 3 unmanned aerial vehicles, and the second location area can be a circular location area formed by taking a second location of the second area as a center of a circle and taking a second distance as a radius; the third position area comprises 5 unmanned aerial vehicles and the like, and can be a circular position area formed by taking the third position of the third area as the center of a circle and taking the third distance as the radius; the first area and the second area are position areas without overlapping areas; the first area, the second area, and the third area may be different urban areas of a certain city, the first location may be a certain building in the first area having a geographic location identification function, the second location may be a certain building in the second area having a geographic location identification function, and the third location may be a certain building in the third area having a geographic location identification function. Meanwhile, the first and second distances and the third distance may be 50 meters, or 100 meters, or 200 meters, etc. Then selecting a target area from the location areas, namely the target area can be an area which needs to control the unmanned aerial vehicle in the area, such as an area with extremely harsh environment and wind or rain; and then selecting a target unmanned aerial vehicle needing to be controlled from the target area.
S130: and obtaining a first control instruction, wherein the first control instruction is an original control instruction used for controlling the unmanned aerial vehicle to fly to reach a target state.
Specifically, the first control instruction is a single or comprehensive control instruction for controlling the state of the unmanned aerial vehicle, the comprehensive control instruction may be a comprehensive quantity of speed and attitude, or a comprehensive quantity of overload, angular rate, dynamic pressure, or the like, and the first control instruction may control the action of the unmanned aerial vehicle.
S140: and converting the first control command into a second control command which is in dynamic accordance with the expected response according to a preset ideal model.
In a specific implementation process, because the control command changes at any time, if the unmanned aerial vehicle is directly controlled according to the control command, the change range of the unmanned aerial vehicle is too large, and even the control command cannot be executed. For example, if the first control instruction is used for controlling the angular acceleration of the unmanned aerial vehicle, if the flight angular acceleration of the unmanned aerial vehicle is 1 degree per second and the first control instruction is 10 degrees per second, the angular acceleration of the unmanned aerial vehicle needs to be directly changed from 1 to 10, which may cause the unmanned aerial vehicle to have unstable flight, large deflection of the fuselage, and the like; the method of the embodiment of the present invention processes the first control command, for example, 10 degrees per second to 7 degrees per second.
Specifically, the ideal model is provided with a corresponding relationship between the first control command and the expected response dynamics, which may be a corresponding relationship obtained according to existing data, knowledge and experience, and more specifically, may be determined according to the response of the known closed-loop system under the input drive and the requirement of flight quality, and if the input first control command is an acceleration command, there will be an expected response dynamics corresponding to the input first control command, and similarly, if the input first control command is a speed command, there will also be a corresponding expected response dynamics. Taking the speed command as an example, when a certain control command is input, the expected response dynamics of the control command changes slowly (lower than the preset response speed) in the first 0.3s, and changes according to the preset response speed after the control command reaches the stable 1 s.
The first control command and the second control command may be in a corresponding ratio or in other relations, for example, when the first control command is 10, the second control command may be 8, and the second control command may be 7. The specific situation may be set according to actual situations, and is not specifically limited herein.
More specifically, the second control instruction obtained by processing the first control instruction is executed circularly, and after the second control instruction is obtained, the second control instruction can be processed again to obtain the next control instruction until the flight state tends to the first control instruction.
S150: collecting the flight state parameters of the unmanned aerial vehicle related to the second control instruction, and generating comprehensive feedback according to the flight state parameters;
specifically, the flight state parameters include flight speed, dynamic pressure, overload, altitude, acceleration, attitude angle, angular rate, angular acceleration, airflow angle, motor rotation speed, control surface deflection angle, air density, air temperature, and the like, wherein the above state parameters include motion parameter values that can be directly measured and motion parameter values that cannot be directly measured, such as speed, angle, and angular acceleration, which are motion parameter values that cannot be directly measured.
For example, generating the integrated feedback according to the flight state parameter can be implemented by:
acquiring a first measurable motion parameter value in flight state parameters of the unmanned aerial vehicle;
estimating an unmeasurable second motion parameter value in the flight state parameter based on a preset controlled object model;
and obtaining comprehensive feedback according to the first motion parameter value and the second motion parameter value.
In particular, for a first measurable motion parameter value, the drone may be measured by the sensor device to obtain a corresponding measurement value, which may include attitude, velocity, angular rate, control plane deflection, etc. For the unmeasurable second motion parameter value, the estimation may be performed by constructing a preset controlled object model, such as a six-degree-of-freedom model or kalman filtering, where the preset controlled object model may be a linear mathematical model or a nonlinear mathematical model. Optionally, a non-linear model is used to estimate the unmeasurable motion state of the drone, so that more flight states can be accommodated. After the first motion parameter value and the second motion parameter value are obtained respectively, comprehensive feedback can be obtained in a control variable design mode.
S160: and carrying out error control according to the second control instruction and the comprehensive feedback to obtain a third control instruction.
Specifically, the integrated feedback is an instruction containing the same information as the second control instruction, and if the second control instruction is an instruction for controlling angular acceleration, the integrated feedback is also an instruction for controlling angular acceleration, and then the second control instruction and the integrated feedback are compared to obtain a deviation therebetween. After obtaining the deviation between the second control command and the integrated feedback, a third control command may be set by a deviation controller.
S170: and controlling the unmanned aerial vehicle based on the third control instruction.
According to the method provided by the embodiment of the invention, the first control instruction can be converted into the second control instruction which is in accordance with the expected response dynamic state according to the preset ideal model, the ideal model comprises the ideal output dynamic state of the airplane under the given input, and the ideal dynamic state meets the requirements of flight quality, performance and the like, so that the control system is ensured to have enough stability margin; on the other hand, comprehensive feedback is generated according to the flight state parameters of the unmanned aerial vehicle related to the second control instruction, the comprehensive feedback is a multivariable control problem, and the comprehensive feedback can ensure that other flight parameters are also in a safe and controllable range on the premise that the aircraft meets the control instruction, so that the control robustness is improved; and in the third aspect, the second control instruction and the comprehensive feedback are subjected to error control to obtain a third control instruction, and the comprehensive feedback instruction is made to follow the second control instruction in time by selecting a proper error control algorithm, so that the closed-loop system and the ideal model have consistent quality and performance. Therefore, the technical scheme solves the problem that the method for controlling the unmanned aerial vehicle in the prior art is poor in stability and robustness.
Since the third control command is an error, by selecting an appropriate error control algorithm, the error is made to converge according to a predetermined ideal dynamic, ensuring consistent quality and performance of the closed loop system and the ideal model.
Generally, the integrated feedback may be obtained by performing variable design on the flight state parameter, converting the variable design into a command variation value corresponding to the second control command, and then using the command variation value as the integrated feedback.
Specifically, if the second control command is a pitch angle rate command of 50deg/s, and the parameters related to the second control command include pitch angle rate, attack angle, normal overload, etc., then a variable design is performed according to the above parameters, and the above parameters are converted into command change values, i.e., the parameters are converted into command change values according to the influence degree of the above parameters on the second control command, for example, the pitch rate is 40deg/s, the attack angle is 15deg, and the normal overload is 5g, and then the command change values can be converted into command change values of 60deg/s, and are used as a comprehensive feedback.
Specifically, the comprehensive feedback method in a certain pitching direction comprises
Wherein p and q are roll and pitch angular rates; u and v are body x and y axis velocities;and theta is roll and pitch angle, α is angle of attack, g is gravitational acceleration, V∞Is the airspeed; k is a scale factor and is related to dynamic pressure, flight speed, aerodynamic coefficient, reference area and the like.
In the method provided in the embodiment of the present invention, performing error control according to the second control instruction and the comprehensive feedback, and obtaining a third control instruction includes:
calculating an error according to the second control instruction and the comprehensive feedback, and obtaining a comprehensive error control instruction through control operation;
and analyzing and extracting a physical quantity directly related to control output from the comprehensive error control command to serve as a third control command.
Specifically, after the comprehensive feedback is obtained, the controller may be designed to perform error control on the second control instruction and the comprehensive feedback, the comprehensive error control instruction is obtained through control operation, the comprehensive error control instruction is analyzed, and a physical quantity directly related to the control output, for example, the comprehensive error control instruction, which may include a pitch angle rate, a normal overload, and an angle of attack, is extracted, the proportion of each part designed according to the control variable is different according to an actual situation, for example, the pitch rate is 80%, the normal overload is 10%, and the angle of attack is 10%, the comprehensive control instruction is analyzed, and a physical quantity directly related to the control output is extracted, and the control of the unmanned aerial vehicle is generally an angular acceleration.
Specifically, if the pitch direction integrated feedback is shown in equation 1, equation 1 is differentiated and approximated:
at the moment, an expression of a pitch angle acceleration instruction is written
Wherein,is a comprehensive error control instruction obtained by error control; u and v are body x and y axis velocities;is a roll angular acceleration command;is the pitch acceleration command.
In the method provided in the embodiment of the present invention, after obtaining the deviation between the second control instruction and the comprehensive feedback, the method further includes:
predicting interference factors of unmanned aerial vehicle flight to obtain a predicted value;
and correcting the deviation based on the predicted value.
Specifically, the interference factors include noise, wind power, modeling inaccuracy and other factors which may affect the flight of the unmanned aerial vehicle, the factors are estimated to obtain predicted values, and the third control instruction is corrected to obtain the fourth control instruction, so that the control instruction is adaptively corrected, and the control accuracy is improved.
Example two
Based on the same inventive concept as the method for controlling the unmanned aerial vehicle in the first aspect, a second embodiment of the present invention further provides a control apparatus for an unmanned aerial vehicle, as shown in fig. 2, including:
a current geographic position coordinate obtaining module 210, configured to obtain a current geographic position coordinate of each of the multiple unmanned aerial vehicles;
a target unmanned aerial vehicle selection module 220, configured to select a target unmanned aerial vehicle to be controlled according to the current geographic position coordinate of each unmanned aerial vehicle;
a first obtaining module 230, configured to obtain a first control instruction, where the first control instruction is an original control instruction used to control the unmanned aerial vehicle to fly to reach a target state;
a conversion module 240, configured to convert the first control instruction into a second control instruction that dynamically conforms to an expected response according to a preset ideal model;
a feedback module 250, configured to acquire a flight state parameter of the unmanned aerial vehicle related to the second control instruction, and generate a comprehensive feedback according to the flight state parameter;
a second obtaining module 260, configured to perform error control according to the second control instruction and the comprehensive feedback to obtain a third control instruction;
and a control module 270, configured to control the unmanned aerial vehicle according to the third control instruction.
In the control apparatus provided in this embodiment, the ideal model is provided with a correspondence relationship between the first control command and the expected response dynamics.
In the control device provided in this embodiment, the flight state parameters of the unmanned aerial vehicle related to the second control instruction include:
flight speed, dynamic pressure, overload, altitude, acceleration, attitude angle, angular rate, angular acceleration, airflow angle, motor rotation speed, control surface deflection angle, atmospheric density, atmospheric temperature and the like.
In the control apparatus provided in this embodiment, the feedback module is further configured to:
and performing variable design on the value of the flight state parameter, converting the value into a command change value corresponding to the second control command, and taking the command change value as the comprehensive feedback.
In the control apparatus provided in this embodiment, the second obtaining module is further configured to:
calculating an error according to the second control instruction and the comprehensive feedback, and obtaining a comprehensive error control instruction through control operation;
and analyzing and extracting a physical quantity directly related to control output from the comprehensive error control command to serve as a third control command.
The control apparatus provided in this embodiment further includes a prediction module, configured to:
predicting uncertain or interference factors of the unmanned aerial vehicle flight to obtain a predicted value;
and correcting the third control instruction based on the predicted value to obtain a fourth control instruction.
Various changes and specific examples of the method for controlling the drone in the foregoing embodiment of fig. 1 are also applicable to the control device of the drone in this embodiment, and through the foregoing detailed description of the method for controlling the drone, those skilled in the art can clearly know the implementation method of the control device of the drone in this embodiment, so for the brevity of the description, detailed description is not given here again.
EXAMPLE III
Based on the same inventive concept as the method for controlling the unmanned aerial vehicle in the first embodiment, a third embodiment of the present invention further provides a computer-readable storage medium, as shown in fig. 3, on which a computer program is stored, and when the program is executed by a processor, the computer program implements the following steps:
acquiring a current geographic position coordinate of each unmanned aerial vehicle in a plurality of unmanned aerial vehicles;
selecting a target unmanned aerial vehicle to be controlled according to the current geographical position coordinates of each unmanned aerial vehicle;
obtaining a first control instruction, wherein the first control instruction is an original control instruction used for controlling the target unmanned aerial vehicle to fly to reach a target state;
converting the first control instruction into a second control instruction which is in dynamic accordance with the expected response according to a preset ideal model;
acquiring flight state parameters of the unmanned aerial vehicle related to the second control instruction, and generating comprehensive feedback according to the flight state parameters;
performing error control according to the second control instruction and the comprehensive feedback to obtain a third control instruction;
and controlling the unmanned aerial vehicle according to the third control instruction.
Various changes and specific examples of the method for controlling the drone in the foregoing embodiment of fig. 1 are also applicable to the computer-readable storage medium of the drone in this embodiment, and through the foregoing detailed description of the method for controlling the drone, those skilled in the art can clearly know the implementation method of the computer-readable storage medium in this embodiment, so for the brevity of the description, detailed descriptions are omitted here.
Example four
Based on the same inventive concept as the method for controlling the unmanned aerial vehicle in the first embodiment, a fourth embodiment of the present invention further provides a computer device, which includes a memory 401, a processor 402, and a computer program 403 stored in the memory and running on the processor, and when the processor executes the computer program, the processor implements the following steps:
acquiring a current geographic position coordinate of each unmanned aerial vehicle in a plurality of unmanned aerial vehicles;
selecting a target unmanned aerial vehicle to be controlled according to the current geographical position coordinates of each unmanned aerial vehicle;
obtaining a first control instruction, wherein the first control instruction is an original control instruction used for controlling the target unmanned aerial vehicle to fly to reach a target state;
converting the first control instruction into a second control instruction which is in dynamic accordance with the expected response according to a preset ideal model;
acquiring flight state parameters of the unmanned aerial vehicle related to the second control instruction, and generating comprehensive feedback according to the flight state parameters;
performing error control according to the second control instruction and the comprehensive feedback to obtain a third control instruction;
and controlling the unmanned aerial vehicle according to the third control instruction. For convenience of explanation, only the parts related to the embodiments of the present invention are shown, and details of the specific techniques are not disclosed. The memory 401 may be used to store a computer program 403 including software programs, modules and data, and the processor 402 executes the computer program 403 stored in the memory 401 by executing, thereby executing various functional applications of the electronic device and data processing.
In a specific implementation, the memory 401 may be used for storing software programs and modules, and the processor 402 executes various functional applications and data processing of the electronic device by operating the software programs and modules stored in the memory 401. The memory 401 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to use of the electronic device, and the like. Further, the memory 401 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. The processor 802 is a control center of the electronic device, connects various parts of the whole electronic device by using various interfaces and lines, and performs various functions of the electronic device and processes data by operating or executing software programs and/or modules stored in the memory 401 and calling data stored in the memory 401, thereby performing overall monitoring of the electronic device. Alternatively, processor 402 may include one or more processing units; preferably, the processor 402 may integrate an application processor, wherein the application processor mainly handles operating systems, user interfaces, application programs, and the like.
Various changes and specific examples of the method for controlling the unmanned aerial vehicle in the foregoing embodiment of fig. 1 are also applicable to the computer device of the unmanned aerial vehicle in this embodiment, and through the foregoing detailed description of the method for controlling the unmanned aerial vehicle, a person skilled in the art can clearly know the implementation method of the computer device in this embodiment, so for the brevity of the description, detailed descriptions are omitted here.
One or more technical solutions in the embodiments of the present application have at least one or more of the following technical effects:
in the technical scheme of the embodiment of the invention: on one hand, the first control instruction can be converted into a second control instruction conforming to the expected response dynamic state according to a preset ideal model, the ideal model comprises the ideal output dynamic state of the airplane under the given input, and the ideal dynamic state meets the requirements of flight quality, performance and the like, so that the control system is ensured to have enough stability margin; on the other hand, comprehensive feedback is generated according to the flight state parameters of the unmanned aerial vehicle related to the second control instruction, the comprehensive feedback is a multivariable control problem, and the comprehensive feedback can ensure that other flight parameters are also in a safe and controllable range on the premise that the aircraft meets the control instruction, so that the control robustness is improved; and in the third aspect, the second control instruction and the comprehensive feedback are subjected to error control to obtain a third control instruction, and the comprehensive feedback instruction is made to follow the second control instruction in time by selecting a proper error control algorithm, so that the closed-loop system and the ideal model have consistent quality and performance. Therefore, the technical scheme solves the problem that the method for controlling the unmanned aerial vehicle in the prior art is poor in stability and robustness.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.