A simulation control method for a quad-rotor unmanned aerial vehicle

By establishing simulation models based on three-dimensional modeling software in a quadrotor UAV and applying PID algorithms, the problems of complex construction of mathematical models and changing control models are solved, and simplified development processes and efficient control are achieved.

CN115356914BActive Publication Date: 2024-12-10BEIJING MECHANICAL EQUIP INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210962793.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-11
Publication Date
2024-12-10
Estimated Expiration
2042-08-11

AI Technical Summary

Technical Problem

In the prior art, the mathematical model of a four-rotor drone is complex to build, and inaccurate assumptions can easily lead to large errors, and the control model is complex and changeable, making it difficult to control intuitively.

Method used

By establishing a three-dimensional physical model of a four-rotor drone based on three-dimensional modeling software, it is transformed into a simulation model of simulation software, defining the end position signal and joint signal of components, realizing simulation control based on PID algorithm, and simplifying the development process And save development time.

Benefits of technology

The attitude and position control of the four-rotor drone is realized, the development process is simplified, the verification efficiency of the control algorithm is improved, and the development time is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115356914B_ABST
    Figure CN115356914B_ABST
Patent Text Reader

Abstract

The present disclosure is about a simulation control method for a quad-rotor drone. The method includes: establishing a three-dimensional physical model of a quad-rotor drone based on a preset three-dimensional modeling software, and converting it into a simulation model of a preset simulation software; defining and adding the terminal posture signals and joint signals of the quad-rotor drone parts in the simulation model, and correcting the parameters of the simulation model based on the mathematical model of the quad-rotor drone; designing a cascade PID algorithm based on the preset simulation software to realize the simulation control of the quad-rotor drone in the simulation model. The present disclosure designs a cascade PID algorithm module for controlling the attitude and position of a quad-rotor drone, and uses a Simulink module to combine the algorithm with a SimMechanics simulation model to realize the motion control and simulation of a quad-rotor drone, which can simplify the development process of a quad-rotor drone, facilitate the verification of the control algorithm, and save development time.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] Quad-rotor drones have been favored by domestic and foreign scientific research institutions and have achieved fruitful results due to their small size, light weight, environmental friendliness, simple operation, and easy control. At present, quad-rotor drones have been widely used in civil, military and commercial fields, such as using drones for plant protection, aerial photography, line inspection, reconnaissance and rescue, etc.

[0003] In the prior art, most of the research on quadcopter drones is to first establish a mathematical model, then design or improve the control system, so as to achieve the modeling and simulation analysis of quadcopter drones. However, since the quadcopter drone itself is a relatively complex kinematic and dynamic system, it is very difficult to build an accurate mathematical model. Generally, some assumptions must be made about the system first. Only under the premise of the system assumptions can force analysis and model building be carried out; once the assumptions are inaccurate, large errors will be generated; and the mathematical model simulation generally has non-intuitive parameters such as moment of inertia and drag distance, which also need to be searched online or calculated according to the mathematical model established by oneself; and the control model of quadcopter drones is generally very complex and changeable. If the matlab plug-in is used, the SimMechanics simulation platform does not need to derive the mathematical model of the drone and find the main parameters; it only needs to establish a three-dimensional model and set the material properties and quality in advance; the model establishment is more in line with actual needs, iterative development is rapid, and the model is updated quickly; through seamless connection with the Simulink module, the system control is simple, intuitive and convenient, and powerful.

[0004] SimMechanics is a new set of mechanism system modules added to MATLAB6.5. It can perform kinematic simulation on various rigid bodies connected by kinematic pairs, so as to analyze and design the mechanism system. Its built-in coordinate system, hinge constraint module, rigid body module, auxiliary tool module, etc. can easily establish the animation model of the mechanism, and realize the addition and simulation of constraints and dynamic torque. Since the SimMechanics plug-in was released by MathWorks in 2002, after years of development, it has become the norm to use the SimMechanics platform to simulate various structures and mechanical equipment. For example, "Simulation Research of Six-degree-of-freedom Robot Arm Based on SimMechanics" proposed that due to the complexity of establishing and deriving the mathematical model of the robot arm, a three-dimensional model of ER10 was established based on SimMechanics and imported into the MATLAB / SimMechanics platform to complete the construction of the simulation model; by adding the end posture signal and each joint signal to the robot arm model, a comprehensive analysis of the kinematics and dynamics of the robot arm was achieved. "Modeling and Simulation of Two-wheeled Robots Based on SimMechanics" omits the establishment and derivation process of the mathematical model of the kinematic mechanism, designs the electromechanical system of the two-wheeled robot based on SimMechanics, and conducts modeling and motion control simulation analysis, and concludes that modeling and simulation using Simulink / SimMechanics modules can avoid the derivation of complex kinematic and physical mechanics formulas, and effectively improve the efficiency of modeling the kinematic mechanism system. From these two articles, it can be seen that it is possible to use SimMechanics to simulate robotic arms and two-wheeled robots, but it does not involve systems that require the addition of complex controls. It is limited to the dynamic simulation of the mechanical structure and the addition of end-point posture signals and various joint signals in the SimMechanics model system; "Comprehensive Simulation Strategy of Bionic Footed Robots" combines SimMechanics with ADAMS to simulate the gait of footed robots. This method mainly involves putting the SimMechanics model into ADAMS for visualization, and does not involve complex control methods.

[0005] Therefore, one or more methods are needed to solve the above problems.

[0006] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0007] The purpose of the present disclosure is to provide a simulation control method, device, electronic device and computer-readable storage medium for a quad-rotor drone, thereby overcoming one or more problems caused by limitations and defects of related technologies at least to a certain extent.

[0008] According to one aspect of the present disclosure, a simulation control method for a quad-rotor drone is provided, comprising:

[0009] Establishing a three-dimensional physical model of the quad-rotor drone based on a preset three-dimensional modeling software, and converting the three-dimensional physical model of the quad-rotor drone into a simulation model of a preset simulation software based on a preset model conversion plug-in;

[0010] Defining and adding terminal pose signals and joint signals of the quadrotor drone components in the simulation model, and modifying the parameters of the simulation model based on the mathematical model of the quadrotor drone;

[0011] A cascade PID algorithm is designed based on preset simulation software, and simulation control of the four-rotor drone in the simulation model is realized based on the PID algorithm.

[0012] In an exemplary embodiment of the present disclosure, the method further includes:

[0013] A three-dimensional physical model of the quadrotor drone is established based on the preset three-dimensional modeling software Solidworks, and according to the physical characteristics of the quadrotor drone, the material properties and quality information of the quadrotor drone components are defined in the three-dimensional physical model.

[0014] In an exemplary embodiment of the present disclosure, the method further includes:

[0015] Based on the model conversion plug-in of the preset three-dimensional modeling software Solidworks and the preset simulation software MATLAB, the three-dimensional physical model of the quadrotor drone is converted into a simulation model of the SimMechanics module in the preset simulation software MATLAB through SimMechanics Link.

[0016] In an exemplary embodiment of the present disclosure, the method further includes:

[0017] The propeller motion of the quadcopter in the simulation model is defined based on the four-degree-of-freedom constraint Revolute Joint module and the MechanicsExplorer tool in the SimMechanics module.

[0018] In an exemplary embodiment of the present disclosure, the method further includes:

[0019] Based on the propeller mathematical model T of the quadrotor drone i =K T Ω i 2 , complete the lift calculation of the simulation model of the quadrotor drone, where T i is the lift force received by the UAV during flight, K T is the air resistance coefficient, Ω i is the rotation speed of the propeller, and i is the propeller number of the quadrotor drone;

[0020] According to the lift calculation of the simulation model of the quad-rotor UAV, based on the Simulink module in the preset simulation software MATLAB, a preset initial speed power is defined and added for the propeller of the quad-rotor UAV in the simulation model.

[0021] In an exemplary embodiment of the present disclosure, the method further includes:

[0022] Performing dynamic model analysis on the quad-rotor drone and selecting control variables;

[0023] According to the control variables, a cascade PID algorithm is designed based on the Simulink module in the preset simulation software MATLAB;

[0024] Generate 4-channel PWM signals for controlling the speed of the propeller motor of the simulation model of the quad-rotor drone based on the cascade PID algorithm;

[0025] The propeller control of the simulation model of the quad-rotor drone is completed based on the 4-channel PWM signals to complete the simulation control of the quad-rotor drone.

[0026] In an exemplary embodiment of the present disclosure, the method further includes:

[0027] The 4-way PWM signal is based on the formula

[0028]

[0029] Achieve attitude control of the roll angle, pitch angle and yaw angle of the simulation model of the quad-rotor drone;

[0030] Among them, PWM1, PWM2, PWM3, and PWM4 are 4 PWM signals for controlling the speed of the propeller motor of the simulation model of the quad-rotor drone, respectively; Throttle is the input of the throttle before the drone takes off; Pid roll Output adjusted by the roll angle controller; Pid Pitch Output for pitch angle controller adjustment; Pid Yaw The output of the yaw angle controller.

[0031] In one aspect of the present disclosure, a simulation control device for a quad-rotor drone is provided, comprising:

[0032] A simulation model conversion module, used to establish a three-dimensional physical model of the quad-rotor drone based on a preset three-dimensional modeling software, and convert the three-dimensional physical model of the quad-rotor drone into a simulation model of a preset simulation software based on a preset model conversion plug-in;

[0033] A simulation model building module, used to define and add terminal posture signals and joint signals of the components of the quad-rotor drone in the simulation model, and to modify the parameters of the simulation model based on the mathematical model of the quad-rotor drone;

[0034] The simulation model control module is used to design a cascade PID algorithm based on preset simulation software, and to realize simulation control of the four-rotor drone in the simulation model based on the PID algorithm.

[0035] In one aspect of the present disclosure, there is provided an electronic device, comprising:

[0036] Processor; and

[0037] A memory having computer-readable instructions stored thereon, wherein the computer-readable instructions, when executed by the processor, implement the method according to any one of the above items.

[0038] In one aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method according to any one of the above items is implemented.

[0039] A simulation control method for a quad-rotor drone in an exemplary embodiment of the present disclosure, wherein the method includes: establishing a three-dimensional physical model of the quad-rotor drone based on preset three-dimensional modeling software, and converting it into a simulation model of preset simulation software; defining and adding the terminal posture signals and joint signals of the quad-rotor drone parts in the simulation model, and correcting the parameters of the simulation model based on the mathematical model of the quad-rotor drone; designing a cascade PID algorithm based on the preset simulation software to realize the simulation control of the quad-rotor drone in the simulation model. The present disclosure realizes the motion control and simulation of the quad-rotor drone by designing a cascade PID algorithm module for controlling the attitude and position of the quad-rotor drone, and using a Simulink module to combine the algorithm with the SimMechanics simulation model, which can simplify the development process of the quad-rotor drone, facilitate the verification of the control algorithm, and save development time.

[0040] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The above and other features and advantages of the present disclosure will become more apparent by describing in detail example embodiments thereof with reference to the attached drawings.

[0042] Figure 1 A flowchart of a simulation control method for a quad-rotor drone according to an exemplary embodiment of the present disclosure is shown;

[0043] Figure 2 A schematic diagram of a three-dimensional physical model of a quad-rotor drone is shown according to a simulation control method of a quad-rotor drone according to an exemplary embodiment of the present disclosure;

[0044] Figure 3 A schematic diagram of a simulation model of a quad-rotor drone is shown according to a simulation control method of a quad-rotor drone according to an exemplary embodiment of the present disclosure;

[0045] Figure 4 Another schematic diagram of a simulation model of a quad-rotor drone is shown according to a simulation control method of a quad-rotor drone according to an exemplary embodiment of the present disclosure;

[0046] Figure 5 A schematic diagram of a Motor model of a quad-rotor drone is shown according to a simulation control method of a quad-rotor drone according to an exemplary embodiment of the present disclosure;

[0047] Figure 6 A PI-PID algorithm control diagram of the attitude control of a quad-rotor drone according to a simulation control method of a quad-rotor drone according to an exemplary embodiment of the present disclosure is shown;

[0048] Figure 7 A schematic diagram of a PID control algorithm of a quad-rotor drone is shown according to a simulation control method of a quad-rotor drone according to an exemplary embodiment of the present disclosure;

[0049] Figure 8 A schematic block diagram of a simulation control device for a quad-rotor drone according to an exemplary embodiment of the present disclosure is shown;

[0050] Fig. 9 A block diagram schematically shows an electronic device according to an exemplary embodiment of the present disclosure; and

[0051] Fig.10 A schematic diagram of a computer-readable storage medium according to an exemplary embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0052] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many 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 comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.

[0053] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or other methods, components, materials, devices, steps, etc. may be adopted. In other cases, known structures, methods, devices, implementations, materials or operations are not shown or described in detail to avoid blurring the various aspects of the present disclosure.

[0054] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or these functional entities or parts of functional entities may be implemented in one or more software hardened modules, or these functional entities may be implemented in different networks and / or processor devices and / or microcontroller devices.

[0055] In this exemplary embodiment, a simulation control method for a quad-rotor drone is first provided; Figure 1 As shown in, the simulation control method of a quad-rotor drone may include the following steps:

[0056] Step S110, establishing a three-dimensional physical model of the quad-rotor drone based on a preset three-dimensional modeling software, and converting the three-dimensional physical model of the quad-rotor drone into a simulation model of a preset simulation software based on a preset model conversion plug-in;

[0057] Step S120, defining and adding terminal pose signals and joint signals of the quadrotor drone components in the simulation model, and modifying the parameters of the simulation model based on the mathematical model of the quadrotor drone;

[0058] Step S130, designing a cascade PID algorithm based on preset simulation software, and implementing simulation control of the quadrotor drone in the simulation model based on the PID algorithm.

[0059] A simulation control method for a quad-rotor drone in an exemplary embodiment of the present disclosure, wherein the method includes: establishing a three-dimensional physical model of the quad-rotor drone based on preset three-dimensional modeling software, and converting it into a simulation model of preset simulation software; defining and adding the terminal posture signals and joint signals of the quad-rotor drone parts in the simulation model, and correcting the parameters of the simulation model based on the mathematical model of the quad-rotor drone; designing a cascade PID algorithm based on the preset simulation software to realize the simulation control of the quad-rotor drone in the simulation model. The present disclosure realizes the motion control and simulation of the quad-rotor drone by designing a cascade PID algorithm module for controlling the attitude and position of the quad-rotor drone, and using a Simulink module to combine the algorithm with the SimMechanics simulation model, which can simplify the development process of the quad-rotor drone, facilitate the verification of the control algorithm, and save development time.

[0060] Next, a simulation control method for a quad-rotor drone in this example embodiment will be further described.

[0061] In the embodiment of this example, the present disclosure uses Solidworks 3D modeling software to establish a 3D physical model of a quadrotor drone, and sets the material properties and mass of each component in Solidworks according to the actual drone components; the established six-degree-of-freedom quadrotor drone Solidworks 3D model is converted into a SimMechanics simulation model using the Solidworks and SimMechanics plug-in, SimMechanics Link, and then the end pose signal and each joint signal of each component are added to the generated simulation model to complete the model building; a mathematical model of the drone is established, and the main parameters of the simulation model are corrected according to the mathematical model; forces and torques are added to the wings of the drone through the Simulink module to perform motion analysis; a cascade PID algorithm module for controlling the attitude and position of the drone is designed, and the algorithm is combined with the SimMechanics simulation model using the Simulink module to realize motion control and simulation, which can simplify the development process of the quadrotor drone, facilitate the verification of the control algorithm, and save development time.

[0062] In step S110, a three-dimensional physical model of the quad-rotor drone can be established based on preset three-dimensional modeling software, and the three-dimensional physical model of the quad-rotor drone can be converted into a simulation model of preset simulation software based on a preset model conversion plug-in.

[0063] In the embodiment of this example, the method further includes:

[0064] A three-dimensional physical model of the quadrotor drone is established based on the preset three-dimensional modeling software Solidworks, and according to the physical characteristics of the quadrotor drone, the material properties and quality information of the quadrotor drone components are defined in the three-dimensional physical model.

[0065] In the embodiment of this example, the method further includes:

[0066] Based on the model conversion plug-in of the preset three-dimensional modeling software Solidworks and the preset simulation software MATLAB, the three-dimensional physical model of the quadrotor drone is converted into a simulation model of the SimMechanics module in the preset simulation software MATLAB through SimMechanics Link.

[0067] In the embodiment of this example, first, the Solidworks 3D modeling software is used to establish a 3D physical model of the quadcopter UAV, and the material properties and mass of each component are set in Solidworks according to the actual UAV components; the established 6-DOF quadcopter UAV Solidworks 3D model is converted into a SimMechanics simulation model using the Solidworks and SimMechanics plug-ins, SimMechanics Link. The specific steps are: install the Simscape Multibody Link plug-in in Matlab; enable the Simscape Multibody Link plug-in in Matlab, otherwise the plug-in cannot be found in Solidworks; enter the regmatlabserver command in the Matlab command line window to make Matlab an automation server (Automation Server); open the SolidWorks software, and in the "Options - Plug-ins" menu bar, check the "Simscape Multibody Link" Link" plug-in; open the SolidWorks assembly drawing model of the quadcopter, and export the model as an XML file; open MATLAB, switch the folder to the directory where the above XML file is located, and enter smimport+file name in the command line to get the SimMechanics quadcopter simulation model.

[0068] In step S120, the end pose signals and joint signals of the components of the quadrotor drone in the simulation model may be defined and added, and the parameters of the simulation model may be modified based on the mathematical model of the quadrotor drone.

[0069] In the embodiment of this example, the method further includes:

[0070] The propeller motion of the quadcopter in the simulation model is defined based on the four-degree-of-freedom constraint Revolute Joint module and the MechanicsExplorer tool in the SimMechanics module.

[0071] In the embodiment of this example, the method further includes:

[0072] Based on the propeller mathematical model T of the quadrotor drone i =K T Ω i 2 , complete the lift calculation of the simulation model of the quadrotor drone, where T i is the lift force received by the UAV during flight, K T is the air resistance coefficient, Ω i is the rotation speed of the propeller, and i is the propeller number of the quadrotor drone;

[0073] According to the lift calculation of the simulation model of the quad-rotor UAV, based on the Simulink module in the preset simulation software MATLAB, a preset initial speed power is defined and added for the propeller of the quad-rotor UAV in the simulation model.

[0074] In this exemplary embodiment, if Figure 2 As shown in the figure, the three-dimensional physical model of the quadcopter is converted into a Simulink simulation model through SimMechanics. Figure 3 As shown. The left half of Quadrotor2_1_RIGID is the rigid body coordinate system, including the coordinate origin and coordinate axis; Quadrotor2_1_RIGID is the body module, which defines the material and mass of the body; the right half of Quadrotor2_1_RIGID is the four blades of the drone, which are used to add a control system to achieve flight actions. A visual model can be obtained when the simulation is running. However, this only converts the three-dimensional physical model into a simulation model. The system has no force and torque, and will not generate any movement. The entire system needs to be corrected with reference to the mathematical model and carried out according to the modeling and simulation steps.

[0075] In this example implementation, constraints are used to connect physical components: During the import process, the physical properties of the rotor have been defined. The next step is to define the movement of the drone, which can be divided into two steps:

[0076] Defines how the propeller moves.

[0077] The motion of the propeller is defined using the four-degree-of-freedom constraint (Revolute Joint) module of SimMechanics, and then the Mechanics Explorer tool in MATLAB will make the propeller motion occur on the desired axis. Since the thrust is not defined, you can see that although the drone rotor is rotating, it falls due to the influence of gravity.

[0078] In the embodiment of this example, the amount of thrust required for the propeller to produce motion is defined.

[0079] The thrust generated by the propeller is a function. Therefore, referring to the mathematical model, the lift force on the drone during flight is:

[0080] Among them, T i Represents the lift received by the UAV during flight; K T Indicates the air resistance coefficient; Ω i Indicates the propeller speed.

[0081] In the embodiment of this example, the ground in the real world is simulated.

[0082] In order to make the simulated world closer to the real world, a ground module is added to the model to ensure that the drone will not fall infinitely and to ensure that the drone can take off and land on this hard ground. Figure 4 The three modules shown, Transform1, Transform3 and Ground_1_RiGID1, are composed together.

[0083] In the embodiment of this example, the motion of the propeller is added to the Motor module, such as Figure 5 First, use Simulink to simulate the signal to set the motor speed, and then use the analog signal to physical signal module S _ PS is converted into a physical signal of motor speed, which is input into the t port of the Revolute4 module, and then the propeller speed comes out from the w port, which is then converted into the Simulink speed through the physical signal to analog signal module PS_S, and input into the Thrust module. The Thrust module of Fcn is used to calculate the thrust of the drone with reference to the mathematical model, and finally input into the propeller to realize the propeller movement and thrust application. At this time, the simulation is still open-loop. By continuously adjusting the value of the thrust calculation formula, after reaching a certain size, the rotor will generate enough thrust to overcome gravity and take off. By running the model in this way, you can clearly see the four propellers of the drone rotating stably and then flying in the SimMechanics visualization window.

[0084] In this example, since the material and mass of each part have been set in the 3D modeling software (as shown in Table 1), there is no need to find and input the parameters required for simulation as in the mathematical model. The next step is to design a control module so that the drone can run the simulation according to the predetermined route.

[0085] Table 1 Quality of each component

[0086]

[0087] In step S130, a cascade PID algorithm may be designed based on preset simulation software, and simulation control of the quadrotor drone in the simulation model may be implemented based on the PID algorithm.

[0088] In the embodiment of this example, the method further includes:

[0089] Performing dynamic model analysis on the quad-rotor drone and selecting control variables;

[0090] According to the control variables, a cascade PID algorithm is designed based on the Simulink module in the preset simulation software MATLAB;

[0091] Generate 4-channel PWM signals for controlling the speed of the propeller motor of the simulation model of the quad-rotor drone based on the cascade PID algorithm;

[0092] The propeller control of the simulation model of the quad-rotor drone is completed based on the 4-channel PWM signals to complete the simulation control of the quad-rotor drone.

[0093] In the embodiment of this example, the design of the quad-rotor drone control system requires a high degree of accuracy, and the traditional PID has been difficult to meet its performance requirements, so the cascade PID is selected to control and simulate the quad-rotor drone. The cascade PID control system is a system in which two regulators are connected in series to form two closed-loop PIDs, and the output of the outer loop regulator is used as the given value of the inner loop regulator.

[0094] When a quad-rotor drone is flying, its attitude at each moment can be decomposed into roll angle, pitch angle and yaw angle; its position can be decomposed into height, X direction and Y direction. The flight control of the entire quad-rotor drone is completed by using a cascade PID controller for each attitude or position. The following takes attitude control as an example to explain in detail how to design a cascade PID controller. The design of other controllers is roughly the same as attitude control.

[0095] The attitude control uses a double closed-loop cascade controller composed of PI-PID to control the angle information, such as Figure 6 As shown, the cascade PID calculation formula is as follows:

[0096]

[0097] In the embodiment of this example, according to the analysis of the dynamic model of the quad-rotor UAV, angular velocity is the most important factor that causes the instability of the quad-rotor UAV. Therefore, the PID controller of the angular velocity is used as the inner loop, the PI controller of the angle is used as the outer loop, and the output of the outer angle loop is used as the input of the inner loop of the angular velocity. Specifically, the three PI controllers of ROLL, PITCH, and YAW axis self-stabilization input the desired attitude and the current attitude, and output the desired angular velocity control quantity after solution; the three PID controllers of ROLL, PITCH, and YAW axis rates input the desired angular velocity control quantity and the current angular velocity, and output the control quantity acting on the motor electronic regulator after solution. The control frequency of the inner loop is 500Hz, and the control frequency of the outer loop is 200Hz. Designed ROLL axis cascade PID Simulink control model Figure 7 shown.

[0098] In the embodiment of this example, the PWM input (refer to the mathematical model U) of each motor speed is controlled. i Corrected) to:

[0099]

[0100] Among them, PWM1, PWM2, PWM3, and PWM4 represent the PWM duty cycle input of the upper left corner, upper right corner, lower left corner, and lower right corner motors of the drone respectively; Throttle represents the throttle input before the drone takes off; Pid roll Represents the output of the roll angle controller adjustment; Pid Pitch Represents the output of the pitch angle controller adjustment; Pid Yaw Represents the output of the yaw angle controller adjustment;

[0101] During actual operation, path planning is first performed to determine the reference position value, the desired angle value is calculated through the position control PID loop, and then the attitude control PID loop is used to enable the entire drone system to fly at the desired angle, and finally path following is achieved.

[0102] In the embodiment of this example, the present invention discloses a new comprehensive control and simulation method for a quadcopter UAV. A physical model of the quadcopter UAV is established based on SimMechanics, the physical model is corrected with reference to the mathematical model, and the UAV is controlled by a cascade PID algorithm. The established model is then simulated and experimentally verified to test the reliability and effectiveness of the method used. Therefore, this can avoid the establishment of complex mathematical models, provide a powerful tool for the design of electromechanical control systems, and provide a new idea for the research and development of UAVs.

[0103] It should be noted that, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0104] In addition, in this exemplary embodiment, a simulation control device for a quad-rotor drone is also provided. Figure 8 As shown, the simulation control device 400 of the quad-rotor drone may include: a simulation model conversion module 410, a simulation model establishment module 420 and a simulation model control module 430. Among them:

[0105] The simulation model conversion module 410 is used to establish a three-dimensional physical model of the quad-rotor drone based on a preset three-dimensional modeling software, and convert the three-dimensional physical model of the quad-rotor drone into a simulation model of the preset simulation software based on a preset model conversion plug-in;

[0106] A simulation model building module 420 is used to define and add terminal posture signals and joint signals of the components of the quadrotor drone in the simulation model, and to modify the parameters of the simulation model based on the mathematical model of the quadrotor drone;

[0107] The simulation model control module 430 is used to design a cascade PID algorithm based on preset simulation software, and to implement simulation control of the quadrotor drone in the simulation model based on the PID algorithm.

[0108] The specific details of the simulation control device module of each of the above-mentioned quad-rotor drones have been described in detail in the corresponding simulation control method of a quad-rotor drone, so they will not be repeated here.

[0109] It should be noted that although several modules or units of a simulation control device 400 for a quad-rotor drone are mentioned in the above detailed description, this division is not mandatory. In fact, according to an embodiment of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0110] In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.

[0111] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as systems, methods or program products. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: complete hardware embodiments, complete software embodiments (including firmware, microcode, etc.), or embodiments combining hardware and software aspects, which may be collectively referred to herein as "circuits", "modules" or "systems".

[0112] Refer to the following Fig. 9 An electronic device 500 according to such an embodiment of the present invention is described. Fig. 9 The electronic device 500 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0113] like Fig. 9 As shown, the electronic device 500 is in the form of a general computing device. The components of the electronic device 500 may include but are not limited to: at least one processing unit 510, at least one storage unit 520, a bus 530 connecting different system components (including the storage unit 520 and the processing unit 510), and a display unit 540.

[0114] The storage unit stores program codes, which can be executed by the processing unit 510, so that the processing unit 510 performs the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification. For example, the processing unit 510 can perform the following steps: Figure 1 Steps S110 to S130 shown in FIG.

[0115] The storage unit 520 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 5201 and / or a cache storage unit 5202 , and may further include a read-only storage unit (ROM) 5203 .

[0116] The storage unit 520 may also include a program / utility 5204 having a set (at least one) of program modules 5203, such program modules 5205 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 may include the implementation of a network environment.

[0117] Bus 550 may represent one or more 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.

[0118] The electronic device 500 may also communicate with one or more external devices 570 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 500, and / or communicate with any device that enables the electronic device 500 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 550. Furthermore, the electronic device 500 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 560. As shown, the network adapter 560 communicates with other modules of the electronic device 500 via a bus 550. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0119] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.

[0120] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible embodiments, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to perform the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.

[0121] refer to Fig.10 As shown, a program product 600 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0122] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0123] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0124] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0125] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type 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).

[0126] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0127] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

[0128] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A simulation control method for a quad-rotor drone, characterized in that: The method comprises: Establishing a three-dimensional physical model of the quad-rotor drone based on a preset three-dimensional modeling software, and converting the three-dimensional physical model of the quad-rotor drone into a simulation model of a preset simulation software based on a preset model conversion plug-in; A three-dimensional physical model of the quad-rotor drone is established based on the preset three-dimensional modeling software Solidworks, and material properties and quality information of the parts of the quad-rotor drone are defined in the three-dimensional physical model according to the physical characteristics of the quad-rotor drone; Based on the model conversion plug-in of the preset three-dimensional modeling software Solidworks and the preset simulation software MATLAB SimMechanics module, the three-dimensional physical model of the quad-rotor drone is converted into a simulation model of the SimMechanics module in the preset simulation software MATLAB through SimMechanics Link; Defining and adding terminal pose signals and joint signals of the components of the quadrotor drone in the simulation model, and modifying the parameters of the simulation model based on the mathematical model of the quadrotor drone; Based on the four-degree-of-freedom constraint Revolute Joint module and MechanicsExplorer tool in the SimMechanics module, the propeller motion of the quadrotor drone in the simulation model is defined; Based on the propeller mathematical model T of the quadrotor drone i =K T Ω i 2 , complete the lift calculation of the simulation model of the quadrotor drone, where T i is the lift force received by the UAV during flight, K T is the air resistance coefficient, Ω i is the rotation speed of the propeller, and i is the propeller number of the quadrotor drone; According to the lift calculation of the simulation model of the quad-rotor drone, a preset initial speed power is defined and added for the propeller of the quad-rotor drone in the simulation model based on the Simulink module in the preset simulation software MATLAB; Designing a cascade PID algorithm based on preset simulation software, and realizing simulation control of the quadrotor drone in the simulation model based on the PID algorithm; Performing dynamic model analysis on the quad-rotor drone and selecting control variables; According to the control variables, a cascade PID algorithm is designed based on the Simulink module in the preset simulation software MATLAB; Generate 4-channel PWM signals for controlling the speed of the propeller motor of the simulation model of the quad-rotor drone based on the cascade PID algorithm; The propellers of the simulation model of the quad-rotor drone are controlled based on the four-channel PWM signals to complete the simulation control of the quad-rotor drone; The 4-way PWM signal is based on the formula Achieve attitude control of the roll angle, pitch angle and yaw angle of the simulation model of the quad-rotor drone; Among them, PWM1, PWM2, PWM3, and PWM4 are 4 PWM signals for controlling the speed of the propeller motor of the simulation model of the quad-rotor drone, respectively; Throttle is the input of the throttle before the drone takes off; Pid roll Output adjusted by the roll angle controller; Pid Pitch Output for pitch angle controller adjustment; Pid Yaw The output of the yaw angle controller.

2. A simulation control device for a quad-rotor drone, characterized in that: The device comprises: A simulation model conversion module is used to establish a three-dimensional physical model of a quad-rotor drone based on a preset three-dimensional modeling software, and convert the three-dimensional physical model of the quad-rotor drone into a simulation model of a preset simulation software based on a preset model conversion plug-in; establish a three-dimensional physical model of a quad-rotor drone based on the preset three-dimensional modeling software Solidworks, and define material properties and quality information of the parts of the quad-rotor drone in the three-dimensional physical model according to the physical characteristics of the quad-rotor drone; based on the preset three-dimensional modeling software Solidworks and the model conversion plug-in of the SimMechanics module in the preset simulation software MATLAB, convert the three-dimensional physical model of the quad-rotor drone into a simulation model of the SimMechanics module in the preset simulation software MATLAB through SimMechanics Link; The simulation model establishment module is used to define and add the terminal posture signals and joint signals of the parts of the quad-rotor drone in the simulation model, and modify the parameters of the simulation model based on the mathematical model of the quad-rotor drone; define the propeller motion of the quad-rotor drone in the simulation model based on the four-degree-of-freedom constraint Revolute Joint module and Mechanics Explorer tool in the SimMechanics module; and define the propeller motion of the quad-rotor drone based on the mathematical model of the propeller of the quad-rotor drone. Complete the lift calculation of the simulation model of the quadrotor drone, where T i is the lift force received by the UAV during flight, K T is the air resistance coefficient, Ω i is the rotation speed of the propeller, i is the propeller number of the quad-rotor drone; according to the lift calculation of the simulation model of the quad-rotor drone, based on the Simulink module in the preset simulation software MATLAB, the propeller of the quad-rotor drone in the simulation model is defined and a preset initial rotation speed power is added; The simulation model control module is used to design a cascade PID algorithm based on preset simulation software, and realize simulation control of the quad-rotor UAV in the simulation model based on the PID algorithm; perform dynamic model analysis on the quad-rotor UAV and select control variables; According to the control variables, a cascade PID algorithm is designed based on the Simulink module in the preset simulation software MATLAB; Generate 4-channel PWM signals for controlling the speed of the propeller motor of the simulation model of the quad-rotor drone based on the cascade PID algorithm; The propellers of the simulation model of the quad-rotor drone are controlled based on the four-channel PWM signals to complete the simulation control of the quad-rotor drone; The 4-way PWM signal is based on the formula Achieve attitude control of the roll angle, pitch angle and yaw angle of the simulation model of the quad-rotor drone; Among them, PWM1, PWM2, PWM3, and PWM4 are 4 PWM signals for controlling the speed of the propeller motor of the simulation model of the quad-rotor drone, respectively; Throttle is the input of the throttle before the drone takes off; Pid roll Output adjusted by the roll angle controller; Pid Pitch Output for pitch angle controller adjustment; Pid Yaw The output of the yaw angle controller.

3. An electronic device, characterized in that: include Processor; and A memory having computer-readable instructions stored thereon, wherein the computer-readable instructions implement the method according to claim 1 when executed by the processor.

4. A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method according to claim 1 when executed by a processor.