Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings and preferred embodiments, and the objects and effects of the present invention will become more apparent, it being understood that the specific embodiments described herein are merely illustrative of the present invention and are not intended to limit the present invention.
The method and the system for the redundancy arbitration switching of the unmanned aerial vehicle and the computer equipment are suitable for various types of unmanned aerial vehicles. The method, system and apparatus of the present invention will now be described using an eight-rotor drone as an example.
As shown in fig. 1 to 3, the redundancy arbitration switching method according to the embodiment of the present invention includes:
s1: receiving sensor data corresponding to a plurality of flight control subsystems in real time;
the sensor data comprises flight pose data, flight tasks, flight state information and the like of the unmanned aerial vehicle.
For this embodiment, in the application process, data of the sensor may be divided into a sensor of a digital signal and a sensor of an analog signal, the sensor of the digital signal may directly read attitude data through a communication protocol such as IIC, and the analog signal needs to convert the sensor signal into the digital signal through an ADC, and then the data is acquired and processed.
It should be noted that, because there are noise and disturbance in the mechanical vibration and signal transmission of the eight-axis rotor unmanned aerial vehicle itself, after the flight controller receives the sensor data, it is also necessary to adopt a kalman filtering method to remove the interference noise, and then process the sensor data after the noise reduction.
S2: carrying out fault-tolerant control on the sensor data, and determining corresponding optimal flight attitude data;
for this embodiment, in a specific application scenario, a method of presetting a feasible domain can be selected for fault-tolerant control of sensor data, so as to implement fault-tolerant reconstruction of the sensor and weighted acquisition of reliability data, and further determine optimal flight attitude data. The method comprises the following steps:
s201: verifying the sensor data by utilizing a preset feasible region, and extracting first sensor data existing in the feasible region;
in a specific application scenario, if the sensor data is not in the preset feasible region, it is indicated that the sensor data cannot normally work, and therefore, in order to calculate and obtain the optimal flight attitude data, the sensor data needs to be screened, and the first sensor data existing in the preset feasible region is further extracted.
For this embodiment, in a specific application scenario, in order to extract first sensor data existing in a preset feasible region interval, step S201 of the embodiment may specifically include: creating a preset feasible region based on the flight pose of the unmanned aerial vehicle; and judging whether the sensor data are in the preset feasible region according to the preset feasible region threshold value, and determining the sensor data in the preset feasible region as first sensor data.
The first operation is to predetermine a feasible region and to determine that the parameters acquired by the aircraft exist in a bounded interval
Wherein M is a known finite positive integer, and S
jJ is 1,2, …, and M is a known bounded subspace. Determining whether the redundancy sensor data operates within the preset feasible region,
wherein
As a function of the threshold value of the flight control i,
data collected for sensor i. And then, the position information in each sensor data can be utilized to determine the first sensor data in the preset feasible region.
S202: performing weighted calculation on the first sensor data to obtain a weight value corresponding to each first sensor data;
in a specific application scene, if the sensor data exists in a preset feasible region space, the data of the sensor meets the performance index requirement of data acquisition of the unmanned aerial vehicle, so that the advantage of redundancy sensor information can be fully utilized, and the variance of the acquired data in a period of time is used as the basis for judging the reference degree of the sensor information. Through the weighting processing of the information of the redundancy sensors, the optimal data of the redundancy sensors are obtained and are used for resolving the pose of the unmanned aerial vehicle. Wherein the corresponding variance d (x) of the first sensor data is:
D(X)=E{[Xi-E(Xi)]2}
wherein, XiIndicating the state quantity of the system, E (X)i) Represents the mean value of the system state quantities.
According to the variance of each data sensor, the weight value V corresponding to each first sensor data can be calculated through the following cost functioni(X):
S203: calculating to obtain optimal flight attitude data according to the first sensor data and the corresponding weight value;
the data of each sensor of the flight control subsystem needs to be resolved, and the sensor information of the residual redundancy is adopted to acquire the attitude of the unmanned aerial vehicle. And finally, obtaining the optimal flight attitude Q of the sensor attitude:
s3: screening out an optimal control system based on the optimal flight attitude data, so as to switch the optimal control system to carry out flight control on the unmanned aerial vehicle in the current control period, and specifically comprising the following steps:
evaluating each flight control subsystem according to the unmanned aerial vehicle power model and the optimal flight attitude data based on a backstepping method to obtain input and output residual values corresponding to each flight control subsystem; and determining the flight control subsystem with the minimum residual value as the optimal control system.
In specific application, the dynamics of the unmanned aerial vehicle with multiple rotors has certain complexity, and an accurate system model is difficult to establish; on-board weight changes and external environmental changes have an uncertain effect on the system, and therefore some approximation of the model is required. In the unmanned aerial vehicle model system, the influence of air friction resistance can be ignored due to air flow interference; the center of the rotor wing and the center of mass of the machine body are considered to be on a horizontal line; and supposing that the unmanned aerial vehicle flies at low speed or in a hovering state, the flying attitude changes less, and the euler angular rate is equal to the body rotation angular rate at this moment, namely:
wherein phi and thetaAnd psi respectively represent the roll angle, the pitch angle and the yaw angle of the unmanned aerial vehicle. Omegax、ωy、ωzRepresent unmanned aerial vehicle triaxial organism angular velocity.
According to the linear motion equation and the angular motion equation, the system models of the position subsystem and the attitude subsystem after the approximate processing are respectively as follows:
wherein, [ x y z ]]TRepresenting the translational motion of the drone, m representing the mass of the drone, and g representing the acceleration of gravity. I isx,Iy,IzRespectively represent the inertia moment of the unmanned aerial vehicle along three coordinate axes. I isrIs the moment of inertia of a single rotor.
Wherein the input quantity of the above formula is:
wherein u is1Represents the total lift input of the drone; u. of2Representing the roll input; u. of3Representing a pitch input amount; u. of4Representing the yaw input. OmegaiI-1, …,8 represents the rotor speed of the drone; kFRepresents the lift coefficient of the drone; miAnd i-1, …,8 represents the torque each rotor brings to the drone.
The system state equation is established as follows, and the state variables are set as follows:
X=[x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12]T
the control input variables are:
U=[u1 u2 u3 u4]T
order:
then, according to the system model, the state equation can be established as follows, which respectively corresponds to the attitude subsystem state equation and the position subsystem state equation:
wherein each state parameter of the system is as follows:
ux=cosφsinθcosψ+sinφsinψ
uy=cosφsinθsinψ-sinφcosψ
wherein l represents the arm length of the unmanned aerial vehicle, ux,uyRepresenting the input of the drone along the x-axis and y-axis directions, respectively.
In a specific application scenario, since the eight-rotor drone is a multivariable nonlinear system, the position subsystem and the attitude subsystem have a direct coupling relationship. As can be seen from the state equations, the pose subsystem is not affected by the position subsystem, whereas the position subsystem is dependent on the pose subsystem. This shows that attitude control is the key point of unmanned aerial vehicle control, and position control can only meet corresponding control requirements on the premise that the attitude subsystem achieves good control effect. That is, the essence of the pose control is that the pose control is performed on the premise of maintaining the desired position value. Therefore, when the controller of the eight-rotor unmanned aerial vehicle is designed, an inner ring and outer ring control strategy can be adopted, wherein an inner ring attitude control loop is used for stabilizing and tracking an expected attitude angle; the outer loop position control loop performs tracking control of the desired position. In the double-loop control structure, the attitude control loop of the inner loop has a higher response speed, and the control output of the outer loop is the control preset value of the inner loop. Through the inner and outer ring cooperative control effect, various expected positions and flight attitudes of the unmanned aerial vehicle are realized.
Through the analysis to eight rotor unmanned aerial vehicle system models and equation of state, it can know that it has strict feedback form, satisfies the control requirement of backstepping method to the system. However, both the attitude system and the position system are multi-input multi-output systems, and the backstepping control method has the problem of computational expansion, because the backstepping method is to continuously differentiate the model for multiple times, and the complexity of the algorithm is increased along with the increase of orders, namely the expansion of differentiation terms. The attitude control loop and the position control loop can be divided into three second-order subsystems, namely a roll angle subsystem, a pitch angle subsystem, a yaw angle subsystem, a height position subsystem, a horizontal x position subsystem and a horizontal y position subsystem. Therefore, for each two-stage subsystem, the design of the backstepping method controller of each subsystem can be completed only by two-step iteration without carrying out multiple iterations on the model, so that the problem of calculation expansion is avoided, and the design of the controller is simplified.
Correspondingly, step S3 in this embodiment may further include: the method comprises the following steps that a given system parameter is utilized, an attitude control loop and a position control loop are divided into three second-order subsystems respectively, and the second-order subsystems comprise a roll angle subsystem, a pitch angle subsystem, a yaw angle subsystem, a height position subsystem, a horizontal x position subsystem and a horizontal y position subsystem; respectively designing the control laws of each second-order subsystem according to a backstepping method; and calculating the residual error values corresponding to input and output of each second-order subsystem based on a preset evaluation function and by using the control law of each second-order subsystem and the corresponding expected value.
For the embodiment, after the controller is designed, a plurality of model controllers can be established through different parameter settings, so that optimal control can be selected under different conditions and different situations in different states. For the quality of a controller, the closeness degree of system input and output can be compared after the controller is placed into a closed-loop system, and the closer the system output is to the input, the more effective the controller is. The evaluation function can thus be designed as follows:
wherein, J
j(t) is the residual error value of the corresponding input and output of the flight control system, X
djFor corresponding desired values, x
jFor the control law of each second-order subsystem, Δ is any decimal number greater than 0, in order to prevent the occurrence of | | x
djThe case of 0, defined here
Therefore, the value functions of the control systems are provided, and the residual values of the corresponding input and output of each second-order subsystem can be obtained by calculating the value functions of the systems.
Correspondingly, the specific implementation steps for respectively designing the control laws of each second-order subsystem according to the back stepping method can be as follows:
s301: determining expected values corresponding to the second-order subsystems, and defining tracking error variables and derivatives; and determining the control law of each second-order subsystem by utilizing a Lyapunov function.
1) A control law based on a backstepping method is designed for the unmanned aerial vehicle by taking a roll angle phi as an example:
the first step is as follows: given desired value of roll angle phid=xd1Defining the angle tracking error variables and derivatives as:
according to Lyapunov theory, it is assumed that the roll subsystem is at point z1Equilibrium is reached at 0 (i.e. phi ═ phi-d) Considering the Lyapnov tuning function as:
V(z
1) Derivative with respect to time
Comprises the following steps:
according to the theory of Lyapunov stability,
should be semi-negative, i.e.
Is expected to obtain
Now define virtual input x
2By v
φDenotes it as z
1Virtual control of the subsystems:
wherein alpha is1>0 is a constant.
The error variables are then defined:
bringing the formula to be available:
to ensure first order system stability, the coupling term z must be present1z20, i.e. the second error vector z20. However, for a first-order system, the condition is generally not met, and the Lyapunov function needs to be selected again to enable the coupling term z to be1z2=0。
Selecting an expanded Lyapunov function:
meanwhile, the formula can be obtained:
it can be further derived that:
the derivative with respect to time that can be obtained in conjunction with the formula is:
at this time, the control input u can be input by design
2To make
The control law is:
wherein alpha is2>0 is a constant.
At this time:
and the roll angle control law design is finished, and the system is kept stable according to the Lyapunov stability theorem.
2) The pitch angle theta control law obtained by adopting the same steps is as follows:
wherein:
3) the yaw angle psi control law is as follows:
wherein:
4) with reference to the design of the attitude controller, the control law for the height position z can be found to be:
wherein:
at the same time, it is known
Then cosx
1cosx
3≠0。
5) For horizontal position control, the motion along the x-axis and y-axis is controlled by u as known from the UAV system model1In practice u1Is the total thrust vector to complete the linear motion. At the same time, u can be consideredxAnd uyControl input variables for x-axis and y-axis motion, respectively. The horizontal direction control law obtained according to the design steps of the backstepping method is as follows:
wherein:
while obtaining the given roll and pitch inputs phi of the attitude control system from the horizontal position control systemdAnd thetadFrom the system state equation, we can obtain:
after the position controller and the attitude controller are designed, the control input u is obtained1、u2、u3、u4。
S302: and determining the flight control system with the minimum corresponding residual value as the optimal control system.
In a specific application scenario, since the residual value is used to represent the proximity of the input and the output of the control system, the smaller the residual value is, the smaller the control error of the control system is represented. Therefore, in the present embodiment, the flight control system with the minimum residual value can be determined as the optimal control system.
In a specific application scenario, since the calculation of the optimal flight attitude data and the screening of the optimal control system are required in each control cycle, after the optimal control system is determined, it is required to determine whether the current flight control is the screened optimal control system. When the current control system is judged to be the optimal control system, the control system does not need to be switched; otherwise, if the current control system is determined not to be the optimal control system, the redundancy switching module is required to be used for switching the control system.
By the redundancy arbitration switching method of the unmanned aerial vehicle, sensor data corresponding to a plurality of flight controls can be received in real time; fault-tolerant control is carried out on the sensor data by a method of presetting feasible domains, fault-tolerant reconstruction of the sensors and weighted collection of reliability data are realized, and then optimal flight attitude data corresponding to a plurality of sensors are determined; in addition, in order to extract the performance index of the controller from a multi-state and find out the value function of the system, a mathematical model of the unmanned aerial vehicle is established, the concept of a flight subsystem is put forward, the controller is designed by a Backstepping method, and the stability of the system is proved by a Lyapunov function. In the invention, by providing the design of the fault-tolerant method and the fault-tolerant system of the sensor of the multi-rotor unmanned aerial vehicle, the redundancy of the sensor of the unmanned aerial vehicle and the robustness of a control system of the unmanned aerial vehicle can be improved, and the multi-rotor unmanned aerial vehicle can be ensured to safely and stably execute a certain specific task.
Further, as a specific embodiment of the method shown in fig. 1 and fig. 2, an embodiment of the present invention provides a system for switching redundancy arbitration of a drone, as shown in fig. 4, the system includes:
the receiving module is used for receiving sensor data corresponding to the flight control subsystems in real time;
the determining module is used for carrying out fault-tolerant control on the sensor data and determining corresponding optimal flight attitude data;
and the switching module is used for screening out an optimal control system based on the optimal flight attitude data, judging whether the current control system is the optimal control system or not, if not, switching to the optimal control system, and performing flight control on the unmanned aerial vehicle in the current control period.
In a specific application scene, in order to determine corresponding optimal flight attitude data, the determining module is specifically configured to verify the sensor data by using a preset feasible region and extract first sensor data existing in the feasible region; performing weighted calculation on the first sensor data to obtain a weighted value corresponding to each first sensor data; and calculating to obtain optimal flight attitude data according to the first sensor data and the corresponding weight value.
Correspondingly, in order to extract the first sensor data existing in the feasible region, the determining module is specifically configured to create a preset feasible region based on a preset feasible region threshold; and judging whether the sensor data are in the preset feasible region according to the preset feasible region threshold value, and determining the sensor data in the preset virtual feasible region as first sensor data.
In a specific application scene, in order to screen out an optimal control system, a switching module can be specifically used for respectively creating an unmanned aerial vehicle power model comprising an attitude control loop and a position control loop for each flight control system; evaluating each flight control system based on a back stepping method according to the unmanned aerial vehicle power model and the optimal flight attitude data to obtain residual values corresponding to input and output of each flight control system; and determining the flight control system with the minimum corresponding residual value as the optimal control system.
Correspondingly, in order to obtain residual values corresponding to input and output of each flight control system, the switching module can be specifically used for dividing the attitude control loop and the position control loop into three second-order subsystems by using given system parameters, wherein the second-order subsystems comprise a roll angle subsystem, a pitch angle subsystem, a yaw angle subsystem, a height position subsystem, a horizontal x position subsystem and a horizontal y position subsystem; respectively designing the control laws of each second-order subsystem according to a backstepping method; and calculating the residual error values corresponding to input and output of each flight control system based on a preset evaluation function and by using the control laws of each second-order subsystem and the corresponding expected values.
In a specific application scenario, in order to design the control laws of each second-order subsystem respectively according to a backstepping method, the switching module can be specifically used for determining the expected values corresponding to each second-order subsystem and defining tracking error variables and derivatives; and determining the control law of each second-order subsystem by utilizing a Lyapunov function.
Correspondingly, in order to implement arbitration switching of the optimal control system, the switching module is further configured to determine whether the current control system is the optimal control system, and if not, switch the current control system to the optimal control system, so as to perform flight control on the unmanned aerial vehicle in the current control period by using the optimal control system.
It should be noted that, other corresponding descriptions of the functional units involved in the redundancy arbitration switching system of the unmanned aerial vehicle provided in this embodiment may refer to the corresponding descriptions in fig. 1 to 2. As an embodiment, as shown in fig. 5, the redundancy switching system includes an input module, a TX2 system decision module, a main control processing module, and an output module; the TX2 system decision module is used as a decision layer for transmitting upper layer commands and collecting sensor information and system state parameters of the flight control subsystem. The master control processing module comprises a plurality of flight control subsystems, and each subsystem is provided with a set of flight control IMU units, such as a common Pixhawk flight control autopilot. Data redundancy control can be performed. The flight control and the upper computer TX2 are connected in a serial port mode, a mavros communication mechanism is adopted as a bridge on a communication mechanism, a Pixhawk mavrink communication protocol is carried, the upper computer TX2 system decision module is used for accessing the uORB communication data in the flight control subsystem, data information is monitored, an optimal controller is selected through a redundancy switching circuit to carry out redundancy mixed control management, and finally the PWM signal of the selected optimal controller is sent to an executing mechanism such as a motor and an electric controller.
Based on the foregoing methods shown in fig. 1 and fig. 2, correspondingly, an embodiment of the present invention further provides a storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the foregoing method for switching the redundancy arbitration of the drone shown in fig. 1 and fig. 2.
Based on such understanding, the technical solution of the present invention 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 disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the method of the embodiments of the present invention.
Based on the above methods shown in fig. 1 and fig. 2 and the virtual system embodiment shown in fig. 4, to achieve the above object, an embodiment of the present invention further provides a computer device, which may specifically be a personal computer, a server, a network device, and the like, where the entity device includes a storage medium and a processor; a storage medium for storing a computer program; a processor for executing a computer program to implement the above-described method for arbitration switching of redundancy for drones as shown in fig. 1 and 2.
Optionally, the computer device may also include a user interface, a network interface, a camera, Radio Frequency (RF) circuitry, sensors, audio circuitry, a WI-FI module, and so forth. The user interface may include a Display screen (Display), an input unit such as a keypad (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface optionally may include a standard wired interface, a wireless interface (e.g., Bluetooth interface, WI-FI interface), etc
It will be understood by those skilled in the art that the computer device structure provided in the present embodiment is not limited to the physical device, and may include more or less components, or combine some components, or arrange different components.
The nonvolatile readable storage medium can also comprise an operating system and a network communication module. The operating system is a program of hardware and software resources of entity equipment for the redundancy arbitration switching of the unmanned aerial vehicle, and supports the running of an information processing program and other software and/or programs. The network communication module is used for realizing communication among components in the nonvolatile readable storage medium and communication with other hardware and software in the entity device.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present invention may be implemented by software plus a necessary general hardware platform, and also by hardware.
Those skilled in the art will appreciate that the figures are merely schematic representations of one preferred implementation scenario and that the blocks or flow diagrams in the figures are not necessarily required to practice the present invention. Those skilled in the art will appreciate that the modules in the system in the implementation scenario may be distributed in the devices in the implementation scenario according to the description of the implementation scenario, or may be located in one or more devices different from the present implementation scenario with corresponding changes. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above-mentioned invention numbers are merely for description and do not represent the merits of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of the present invention, however, the present invention is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present invention.