Unmanned aerial vehicle control method and device based on nonlinear model
Through the UAV control method based on the nonlinear model, the nonlinear dynamic model of the UAV system is established, and the optimal predicted attitude trajectory and thrust are calculated, which solves the problem of insufficient accuracy of traditional PID control and realizes the requirements of high-precision autonomous flight missions.
Patent Information
- Application Number
- CN202411908195.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-05-09
AI Technical Summary
The existing UAV control technology relies on traditional PID control and cannot effectively consider the physical limits of the controlled system, resulting in insufficient control accuracy and energy management, making it difficult to meet the needs of high-precision autonomous flight missions.
Using a drone control method based on a nonlinear model, by obtaining the initial flight trajectory of the drone, establishing a nonlinear dynamic model of the drone system, calculating the optimal predicted attitude trajectory and optimal thrust, and inputting it into the robot operating system for precise control.
It improves the trajectory tracking control accuracy of the drone, optimizes energy management, meets the needs of high-precision autonomous flight missions, reduces the calculation load, and improves the control speed.
Smart Images

Figure CN119960486A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of unmanned aerial vehicle control, and in particular relates to a unmanned aerial vehicle control method and device based on a nonlinear model. Background Art
[0002] At present, drones have been widely used in defense and military, express logistics, aerial remote sensing and mapping, agricultural plant protection and other industries. With the technological innovation and market dynamic evolution, the requirements for drones to perform autonomous flight missions with high precision have been further improved in recent years. Accurate trajectory tracking performance is the key for drones to perform various autonomous tasks. Therefore, the optimization and improvement of drone control accuracy is an urgent need for various industries to improve drone performance. At present, drone trajectory tracking control technology mainly relies on traditional PID control. This control technology is not based on an accurate model and does not consider the physical limits of the controlled system. Therefore, there is a lot of room for improvement in control accuracy and energy management.
[0003] Although there have been many studies on linear control algorithms for multi-rotor UAVs, most of them are based on the assumption of flight at a small angle or in a small range. The linear approximation of the model in the linear controller makes the system response slower and the control accuracy lower, and the stable control is limited to a specific area within the flight envelope. Therefore, for the rapid flight and tracking control effect of multi-rotor UAVs in a large range, it is necessary to consider the coupled dynamics of the UAV in a nonlinear state and use nonlinear algorithms for control.
[0004] The model predictive control (MPC) algorithm is an emerging optimization control algorithm that performs online optimization control in the rolling time domain, incorporates current state information, future expected values, and system constraints into the control, and seeks the optimal control input through prediction, so that it still has good robustness in the case of system nonlinearity and large interference. Since the constraints of system state and control input are taken into account, the physical limits of the motor of the controlled system are followed when optimizing the control input, which plays a role in energy conservation to a certain extent.
[0005] In recent years, the development of optimization algorithms and computer processor technology has made nonlinear model predictive control (NMPC) widely used in technologies such as unmanned vehicles or robot control, especially in the field of unmanned vehicle path planning and trajectory tracking control, but it has not been maturely applied in UAV control. The essence of MPC is to solve the optimal control problem through online control. For systems with higher control dimensions, the computational cost of NMPC increases exponentially, and it is difficult to promote it in UAV systems with high sampling frequency and limited hardware resources. Therefore, it is necessary to select control variables of appropriate dimensions to apply the NMPC control algorithm to UAV control, optimize the control rate based on the physical limits of the UAV, and improve the control accuracy based on the existing performance.
[0006] Therefore, how to provide a UAV control method and device based on a nonlinear model has become a technical problem that urgently needs to be solved in this field. Summary of the invention
[0007] The purpose of the present invention is to provide a nonlinear model-based UAV control method and device.
[0008] According to a first aspect of the present invention, a nonlinear model-based UAV control method is provided, comprising:
[0009] Get the initial flight trajectory of the drone;
[0010] Calculating an optimal predicted attitude trajectory and an optimal thrust of the UAV based on a nonlinear dynamic model of the UAV system and an initial flight trajectory of the UAV;
[0011] Inputting the optimal predicted attitude trajectory and the optimal thrust of the UAV into a robot operating system to obtain the rolling moment, pitching moment and yaw moment of the UAV flight;
[0012] The UAV is controlled according to the rolling moment, pitching moment and yaw moment of the UAV flight.
[0013] Optionally, the nonlinear dynamics model of the UAV system is obtained by:
[0014] Determine the control input and state variables of the UAV position state space model according to the three-dimensional position of the UAV, the roll angle, pitch angle, yaw angle of the UAV and the sum of the total lift generated by the propeller of the UAV;
[0015] Establishing a UAV dynamics system model based on the UAV position state space model control input and state variables;
[0016] The forward Euler method is used to discretize the UAV dynamics system model to obtain a nonlinear discretization model of the UAV;
[0017] The nonlinear discretization model of the UAV is determined as the nonlinear dynamic model of the UAV system.
[0018] Optionally, the method further comprises:
[0019] NMPC is used to optimize the nonlinear dynamic model of the UAV system.
[0020] Optionally, the forward Euler method is used to discretize the UAV dynamics system model to obtain a nonlinear discretization model of the UAV, including:
[0021] Reducing the second-order system of equations to first-order derivative equations results in a nonlinear system of equations:
[0022] Solve a system of first-order derivative equations for a nonlinear system of equations.
[0023] Optionally, the method further comprises:
[0024] In the process of obtaining the reference trajectory of the multi-rotor drone, N needs to be solved at each sampling moment. p The sub-nonlinear equations and their first-order derivative equations are used to obtain the reference trajectory values within the future prediction range.
[0025] Optionally, the method further comprises:
[0026] CasADi solver and Acado solver are used to solve the first order derivative equations of the nonlinear system of equations.
[0027] According to a second aspect of the present invention, there is provided a drone control device based on a nonlinear model, comprising:
[0028] The acquisition module is used to obtain the initial flight trajectory of the UAV;
[0029] A calculation module, used for calculating the optimal predicted attitude trajectory and optimal thrust of the UAV based on a nonlinear dynamic model of the UAV system and an initial flight trajectory of the UAV;
[0030] An optimization module, used for inputting the optimal predicted attitude trajectory and the optimal thrust of the UAV into a robot operating system to obtain the rolling moment, pitching moment and yaw moment of the UAV flight;
[0031] The control module is used to control the UAV according to the rolling moment, pitching moment and yaw moment of the UAV during flight.
[0032] Optionally, the nonlinear dynamics model of the UAV system is obtained by:
[0033] Determine the control input and state variables of the UAV position state space model according to the three-dimensional position of the UAV, the roll angle, pitch angle, yaw angle of the UAV and the sum of the total lift generated by the propeller of the UAV;
[0034] Establishing a UAV dynamics system model based on the UAV position state space model control input and state variables;
[0035] The forward Euler method is used to discretize the UAV dynamics system model to obtain a nonlinear discretization model of the UAV;
[0036] The nonlinear discretization model of the UAV is determined as the nonlinear dynamic model of the UAV system.
[0037] Optionally, the optimization module is used to:
[0038] NMPC is used to optimize the nonlinear dynamic model of the UAV system.
[0039] Optionally, the optimization module is used to:
[0040] Reducing the second-order system of equations to first-order derivative equations results in a nonlinear system of equations:
[0041] Solve a system of first-order derivative equations for a nonlinear system of equations.
[0042] Optionally, the optimization module is used to:
[0043] In the process of obtaining the reference trajectory of the multi-rotor drone, N needs to be solved at each sampling moment. p The sub-nonlinear equations and their first-order derivative equations are used to obtain the reference trajectory values within the future prediction range.
[0044] Optionally, the optimization module is used to:
[0045] CasADi solver and Acado solver are used to solve the first order derivative equations of the nonlinear system of equations.
[0046] In a third aspect, the present application shows an electronic device, which includes: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the method described in any of the above aspects.
[0047] In a fourth aspect, the present application illustrates a non-temporary computer-readable storage medium, which, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute a method as described in any of the above aspects.
[0048] In a fifth aspect, the present application illustrates a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to execute the method described in any of the above aspects.
[0049] The beneficial effects brought by the present invention are as follows:
[0050] It can be seen from the above scheme that an embodiment of the present invention provides a UAV control method and device based on a nonlinear model, which has the following beneficial effects: The embodiment of the present application provides a UAV control method and device based on a nonlinear model, including: obtaining an initial flight trajectory of the UAV; calculating the optimal predicted attitude trajectory and optimal thrust of the UAV based on a nonlinear dynamic model of the UAV system and the initial flight trajectory of the UAV; inputting the optimal predicted attitude trajectory and the optimal thrust of the UAV into a robot operating system to obtain the rolling moment, pitching moment and yaw moment of the UAV flight; controlling the UAV according to the rolling moment, pitching moment and yaw moment of the UAV flight, predicting the position trajectory of the UAV based on the nonlinear dynamic model of the UAV system, calculating the optimal predicted attitude trajectory and thrust, combining the designed trajectory tracking controller with the open source flight control firmware Pixhawk4 (PX4) based on the C++ programming language, deploying them in the Robot Operating System (ROS), and performing high-fidelity flight experiment simulation based on the Gazebo physics engine and rendering engine. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 A schematic diagram of a flow chart of a nonlinear model-based UAV control method provided according to an embodiment;
[0052] Figure 2 A schematic flow chart of another nonlinear model-based UAV control method provided according to an embodiment;
[0053] Figure 3 A schematic flow chart of another nonlinear model-based UAV control method provided according to an embodiment;
[0054] Figure 4 It is a structural block diagram of a UAV control device based on a nonlinear model of the present application;
[0055] Figure 5 is a block diagram of an electronic device of the present application;
[0056] Figure 6 It is a block diagram of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0058] Reference Figure 1 , shows a flowchart of a method for controlling a drone based on a nonlinear model of the present application, which can be applied to electronic devices, wherein the method can specifically include the following steps:
[0059] S101, obtaining the initial flight trajectory of the UAV;
[0060] The terminal device obtains the initial flight trajectory of the drone.
[0061] S102, calculating the optimal predicted attitude trajectory and optimal thrust of the UAV based on the nonlinear dynamics model of the UAV system and the initial flight trajectory of the UAV;
[0062] The NMPC control algorithm requires reference values of all state quantities and control quantities in the solution process. It can be seen from the established nonlinear state space expression of the multi-rotor drone that the model consists of three-dimensional position quantities x, y, z, linear velocity The yaw angle ψ and other seven state variables, as well as the desired tilt angle φ, pitch angle θ and lift F are composed of three control inputs. Therefore, it is necessary to obtain the desired x, y, z and ψ expected value trajectory. The trajectory of φ, θ and F. In the process of obtaining the reference trajectory of the multi-rotor drone, N needs to be solved at each sampling moment. p The sub-nonlinear equations and their first-order derivative equations are used to obtain the reference trajectory values within the future prediction range.
[0063] S103, inputting the optimal predicted attitude trajectory and optimal thrust of the UAV into the robot operating system to obtain the rolling moment, pitch moment and yaw moment of the UAV flight;
[0064] S104: Control the UAV according to the rolling moment, pitch moment and yaw moment of the UAV flight.
[0065] Specifically, this application proposes an engineering application solution for inner-loop PID attitude control and outer-loop NMPC position control of a multi-rotor UAV. The UAV position trajectory is predicted based on the nonlinear dynamic model of the UAV system, and the optimal predicted attitude trajectory and thrust are calculated. The designed trajectory tracking controller is combined with the open source flight control firmware Pixhawk4 (PX4) based on the C++ programming language, and deployed in the Robot Operating System (ROS), and high-fidelity flight experiment simulation is performed based on the Gazebo physics engine and rendering engine.
[0066] In view of the problems of low PID control accuracy and high computational load of model predictive control in traditional UAVs, the present invention designs a UAV control method of cascading NMPC position controller and PX4 underlying PID attitude controller, which can not only increase the trajectory tracking control accuracy, but also reduce the computational load of MPC controller and improve the control speed.
[0067] Another embodiment of the present application further supplements the UAV control method based on the nonlinear model provided in the above embodiment.
[0068] Optionally, the nonlinear dynamic model of the UAV system is obtained by:
[0069] Determine the control input and state variables of the UAV position state space model according to the three-dimensional position of the UAV, the roll angle, pitch angle, yaw angle of the UAV and the sum of the total lift generated by the propeller of the UAV;
[0070] According to the control input and state variables of the UAV position state space model, a UAV dynamic system model is established;
[0071] The forward Euler method is used to discretize the UAV dynamics system model and obtain the nonlinear discretization model of the UAV.
[0072] The nonlinear discretization model of the UAV is determined as the nonlinear dynamic model of the UAV system.
[0073] Specifically, a nonlinear dynamic model of the UAV is established and discretized.
[0074] The computational cost of model predictive control is relatively high, so the present invention adopts a model of 7 state quantities to design an NMPC position controller, and defines the control input and state variables of the UAV position state space model as shown below.
[0075]
[0076] Among them, x, y, z are the three-dimensional position of the drone, φ, θ, ψ are the roll angle, pitch angle, and yaw angle of the drone, and F is the sum of the total lift generated by the drone propeller. The drone dynamic system model is established as follows.
[0077]
[0078] In order to further reduce the computational cost of the MPC control algorithm, in actual engineering applications, the forward Euler method is used to discretize the nonlinear model, and the nonlinear discretization model of the UAV is obtained as follows:
[0079] x i+1 (t) = x i (t)+f(xi (t),u i (t))T s (4)
[0080] Where T s is the sampling period.
[0081] Optionally, the method further comprises:
[0082] NMPC is used to optimize the nonlinear dynamic model of the UAV system.
[0083] Design of NMPC nonlinear optimization problem
[0084] The NMPC control optimization problem of UAV trajectory tracking control is defined as:
[0085]
[0086] N p represents the prediction time domain step size, and f(·) is the nonlinear dynamic model of the UAV system. Similar to the linear optimal control LQR algorithm, the purpose of NMPC is to select u(t) to minimize the error between the actual state and the desired state. However, model predictive control is very different from the optimal control algorithm. For example, the cost function of NMPC can take different forms other than quadratic functions, and MPC control solves optimization problems within a finite step size, while LQR solves the full-cycle optimization problem at one time.
[0087] The error between the state of the UAV at time k and its current target position is defined as
[0088] e(j)=X(k)-X ref (j)(6)
[0089] Optionally, the forward Euler method is used to discretize the UAV dynamics system model to obtain a nonlinear discretization model of the UAV, including:
[0090] Reducing the second-order system of equations to first-order derivative equations results in a nonlinear system of equations:
[0091] Solve a system of first-order derivative equations for a nonlinear system of equations.
[0092] In the UAV NMPC trajectory tracking control algorithm, it is necessary to plan the expected flight trajectory of the UAV first, that is, the expected values of x, y, z and ψ, which can be set by upper-level path planning or arbitrarily. The NMPC control algorithm requires reference values of all state quantities and control quantities in the solution process. It can be seen from the nonlinear state space expression of the multi-rotor UAV established by formula (3) that the model consists of three-dimensional position quantities x, y, z, linear velocity The yaw angle ψ and other seven state variables, as well as the desired tilt angle φ, pitch angle θ and lift F are composed of three control inputs. Therefore, it is necessary to obtain the desired x, y, z and ψ expected value trajectory. The trajectory of φ, θ and F. From equation (3), we can see that we need to solve a nonlinear system of equations. Define the variable x = [φ, θ, F], and the state trajectory generates a nonlinear system of equations as shown below.
[0093]
[0094] UAV control requires a higher control frequency, so a nonlinear equation solving method with faster calculation and fewer iterations should be selected. The present invention uses the GNU Scientific Library (GSL) library in the C++ nonlinear equation solving library. GSL is a digital library for C and C++ programming languages. The library provides a wide range of mathematical routines, uses the highest quality advanced algorithms, is highly portable, and is open source.
[0095] Further processing of equation (7) reduces the second-order equations to the first-order derivative equations as shown in equation (8). Solving the first-order derivative equations of the nonlinear equations will speed up the calculation and save the calculation cost. Experiments show that the number of iterations of the same nonlinear equations is at least half of that when the first-order derivatives are not solved. In the process of obtaining the reference trajectory of the multi-rotor drone, N needs to be solved at each sampling moment. p The sub-nonlinear equations and their first-order derivative equations are used to obtain the reference trajectory values within the future prediction range.
[0096]
[0097] In the semi-physical simulation process, by solving the above nonlinear equations, the expected trajectory of each state quantity and expected input of the UAV NMPC controller can be generated in real time according to the superior path planning output or the pre-established expected trajectory.
[0098] Optionally, the method further comprises:
[0099] In the process of obtaining the reference trajectory of the multi-rotor drone, N needs to be solved at each sampling moment. p The sub-nonlinear equations and their first-order derivative equations are used to obtain the reference trajectory values within the future prediction range.
[0100] Optionally, the method further comprises:
[0101] CasADi solver and Acado solver are used to solve the first order derivative equations of the nonlinear system of equations.
[0102] Specifically, solve nonlinear optimization problems online
[0103] At present, the mainstream nonlinear optimization problem solvers are mainly CasADi and Acado. CasADi is an open source nonlinear optimization solution toolkit, and Acado uses the sequential quadratic programming SQP solver structure to realize NMPC solution. Different from the application scope of CasADi, Acado is suitable for small and medium-sized systems, while CasADi is a more general optimization framework. The interior point optimization method (IPOPT) in CasADi is faster for solving large-scale nonlinear optimization problems of continuous systems. IPOPT is an optimization solver combined with a line search filter method. Compared with Acado's SQP method, CasADi's IPOPT method has advantages in the following situations: ① When there are many state variables in the problem to be solved; ② The problem to be solved has a non-quadratic cost function; ③ There are many sparsity problems in the model equation. Obviously, the IPOPT method is more suitable for solving multi-dimensional nonlinear quadratic optimization problems such as drones. Therefore, the present invention uses the CasADi solver to solve NMPC optimization problems.
[0104] like Figure 2 As shown, the UAV NMPC trajectory tracking control method solves the constrained optimization problem at each sampling moment to obtain the optimal trajectory tracking control input of the UAV, that is, the optimal attitude angle φ, θ and the optimal thrust F, and then publishes it to the ROS environment. PX4 subscribes to the expected attitude angle value from the ROS environment, calls its own attitude controller, outputs the rolling moment M1, the pitching moment M2, and the yaw moment M3, and combines the total lift F output by the NMPC controller to achieve control of the UAV, so that the UAV tracks the expected trajectory. The UAV NMPC trajectory tracking control deployment architecture provided in the embodiment of the present application is as follows: Figure 3 As shown, the specific data transmission and information interaction relationship during the UAV semi-physical simulation process is demonstrated.
[0105] It should be noted that each implementable method in this embodiment may be implemented separately, or may be implemented in combination in any manner without conflict, and this application is not limited thereto.
[0106] Another embodiment of the present application provides a nonlinear model-based UAV control device, which is used to execute the nonlinear model-based UAV control method provided in the above embodiment.
[0107] like Figure 4 , which is a schematic diagram of the structure of a drone control device based on a nonlinear model provided in an embodiment of the present application. The drone control device based on a nonlinear model includes an acquisition module 401, a calculation module 402, an optimization module 403 and a control module 404, wherein:
[0108] The acquisition module 401 is used to acquire the initial flight trajectory of the UAV;
[0109] The calculation module 402 is used to calculate the optimal predicted attitude trajectory and optimal thrust of the UAV based on the nonlinear dynamics model of the UAV system and the initial flight trajectory of the UAV;
[0110] The optimization module 403 is used to input the optimal predicted attitude trajectory and optimal thrust of the UAV into the robot operating system to obtain the rolling moment, pitch moment and yaw moment of the UAV flight;
[0111] The control module 404 is used to control the UAV according to the rolling moment, pitching moment and yaw moment of the UAV flight.
[0112] Regarding the device in this embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0113] Another embodiment of the present application further supplements the nonlinear model-based drone control device provided in the above embodiment.
[0114] Optionally, the nonlinear dynamic model of the UAV system is obtained by:
[0115] Determine the control input and state variables of the UAV position state space model according to the three-dimensional position of the UAV, the roll angle, pitch angle, yaw angle of the UAV and the sum of the total lift generated by the propeller of the UAV;
[0116] According to the control input and state variables of the UAV position state space model, a UAV dynamic system model is established;
[0117] The forward Euler method is used to discretize the UAV dynamics system model and obtain the nonlinear discretization model of the UAV.
[0118] The nonlinear discretization model of the UAV is determined as the nonlinear dynamic model of the UAV system.
[0119] Optionally, an optimization module for:
[0120] NMPC is used to optimize the nonlinear dynamic model of the UAV system.
[0121] Optionally, an optimization module for:
[0122] Reducing the second-order system of equations to first-order derivative equations results in a nonlinear system of equations:
[0123] Solve a system of first-order derivative equations for a nonlinear system of equations.
[0124] Optionally, an optimization module for:
[0125] In the process of obtaining the reference trajectory of the multi-rotor drone, N needs to be solved at each sampling moment. p The sub-nonlinear equations and their first-order derivative equations are used to obtain the reference trajectory values within the future prediction range.
[0126] Optionally, an optimization module for:
[0127] CasADi solver and Acado solver are used to solve the first order derivative equations of the nonlinear system of equations.
[0128] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0129] The embodiment of the present application provides a UAV control method and device based on a nonlinear model, including: obtaining an initial flight trajectory of the UAV; calculating the optimal predicted attitude trajectory and optimal thrust of the UAV based on a nonlinear dynamic model of the UAV system and the initial flight trajectory of the UAV; inputting the optimal predicted attitude trajectory and optimal thrust of the UAV into a robot operating system to obtain the rolling moment, pitching moment and yaw moment of the UAV flight; controlling the UAV according to the rolling moment, pitching moment and yaw moment of the UAV flight, predicting the position trajectory of the UAV based on the nonlinear dynamic model of the UAV system, calculating the optimal predicted attitude trajectory and thrust, combining the designed trajectory tracking controller with the open source flight control firmware Pixhawk4 (PX4) based on the C++ programming language, deploying them in the Robot Operating System (ROS), and performing high-fidelity flight experiment simulation based on the Gazebo physics engine and rendering engine.
[0130] Optionally, an embodiment of the present application further provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0131] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0132] Figure 5800 is a block diagram of an electronic device 800 shown in the present application. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0133] Reference Figure 5 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0134] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0135] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, images, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0136] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.
[0137] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0138] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0139] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0140] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0141] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast operation information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0142] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0143] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of an electronic device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0144] Figure 6 19 is a block diagram of a computer-readable storage medium 1900 shown in the present application. For example, the computer-readable storage medium 1900 may be provided as a server.
[0145] Reference Figure 6 , the computer-readable storage medium 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions, such as an application, that can be executed by the processing component 1922. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.
[0146] The computer readable storage medium 1900 may also include a power supply component 1926 configured to perform power management of the computer readable storage medium 1900, a wired or wireless network interface 1950 configured to connect the computer readable storage medium 1900 to a network, and an input / output (I / O) interface 1958. The computer readable storage medium 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.
[0147] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0148] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0149] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
[0150] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the present application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0151] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0152] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0153] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0154] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0155] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.
[0156] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0157] The above are preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A UAV control method based on a nonlinear model, characterized in that: The method comprises: Get the initial flight trajectory of the drone; Calculating an optimal predicted attitude trajectory and an optimal thrust of the UAV based on a nonlinear dynamic model of the UAV system and an initial flight trajectory of the UAV; Inputting the optimal predicted attitude trajectory and the optimal thrust of the UAV into a robot operating system to obtain the rolling moment, pitching moment and yaw moment of the UAV flight; The UAV is controlled according to the rolling moment, pitching moment and yaw moment of the UAV flight.
2. The UAV control method based on nonlinear model according to claim 1, characterized in that: The nonlinear dynamics model of the UAV system is obtained as follows: Determine the control input and state variables of the UAV position state space model according to the three-dimensional position of the UAV, the roll angle, pitch angle, yaw angle of the UAV and the sum of the total lift generated by the propeller of the UAV; Establishing a UAV dynamics system model based on the UAV position state space model control input and state variables; The forward Euler method is used to discretize the UAV dynamics system model to obtain a nonlinear discretization model of the UAV; The nonlinear discretization model of the UAV is determined as the nonlinear dynamic model of the UAV system.
3. The UAV control method based on nonlinear model according to claim 2 is characterized in that: The method further comprises: NMPC is used to optimize the nonlinear dynamic model of the UAV system.
4. The UAV control method based on nonlinear model according to claim 3 is characterized in that: The forward Euler method is used to discretize the UAV dynamics system model to obtain a nonlinear discretization model of the UAV, including: The second-order system of equations is reduced to the first-order derivative equations, resulting in a nonlinear system of equations; Solve a system of first-order derivative equations for a nonlinear system of equations.
5. The UAV control method based on nonlinear model according to claim 4 is characterized in that: The method further comprises: In the process of obtaining the reference trajectory of the multi-rotor drone, N needs to be solved at each sampling moment. p The sub-nonlinear equations and their first-order derivative equations are used to obtain the reference trajectory values within the future prediction range.
6. The UAV control method based on nonlinear model according to claim 5, characterized in that: The method further comprises: CasADi solver and Acado solver are used to solve the first order derivative equations of the nonlinear system of equations.
7. A drone control device based on a nonlinear model, characterized in that: include: The acquisition module is used to obtain the initial flight trajectory of the UAV; A calculation module, used for calculating the optimal predicted attitude trajectory and optimal thrust of the UAV based on a nonlinear dynamic model of the UAV system and an initial flight trajectory of the UAV; An optimization module, used for inputting the optimal predicted attitude trajectory and the optimal thrust of the UAV into a robot operating system to obtain the rolling moment, pitching moment and yaw moment of the UAV flight; The control module is used to control the UAV according to the rolling moment, pitching moment and yaw moment of the UAV during flight.
8. The drone control device based on nonlinear model according to claim 7, characterized in that: The nonlinear dynamics model of the UAV system is obtained as follows: Determine the control input and state variables of the UAV position state space model according to the three-dimensional position of the UAV, the roll angle, pitch angle, yaw angle of the UAV and the sum of the total lift generated by the propeller of the UAV; Establishing a UAV dynamics system model based on the UAV position state space model control input and state variables; The forward Euler method is used to discretize the UAV dynamics system model to obtain a nonlinear discretization model of the UAV; The nonlinear discretization model of the UAV is determined as the nonlinear dynamic model of the UAV system.
9. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the method according to any one of claims 1 to 6 when executed by the processor.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Unmanned aerial vehicle control method and device, aircraft and computer readable storage medium
CN121143414A
Multi-unmanned aerial vehicle control method and terminal based on hybrid control strategy
CN121411491A