Disclosure of Invention
The purpose of the invention is as follows: aiming at the research background, an experimental platform capable of carrying out fault-tolerant control algorithm simulation and physical verification is designed. A simulation model is established for the system by using Simulink, model-in-loop simulation and hardware-in-loop simulation can be realized, and the difficulty in designing and verifying a fault-tolerant control algorithm is reduced to a great extent. And aiming at the problem that the fault in the system can not generate the ideal type of fault when the fault tolerance performance of the algorithm is tested, a fault injection module of the aircraft is established in Simulink, so that the fault injection of the sensor and the fault injection of the actuator can be realized. In order to enable a simulation experiment to be closer to the actual flight condition of an aircraft, a wind disturbance module is added; secondly, as the Simulink is poor in integration and cannot be actually operated on the aircraft, fault injection software of the aircraft is designed and realized, the software is integrated into a QGC ground station of the aircraft, and the performance of a fault test fault-tolerant algorithm is injected into a system through the operation of the ground station software in the flight process of the aircraft.
The technical scheme is as follows: a design aiming at a fault-tolerant control experiment platform of a multi-rotor aircraft. According to the experimental requirements, the frame types, the motor parameters, the electric regulation parameters, the wing parameters, the battery parameters and the like of the multi-rotor aircraft are determined, and the aircraft meeting the experimental requirements is designed and built. Secondly, establishing a simulation model of the multi-rotor aircraft according to an actual physical model of the aircraft, verifying and developing a simulation algorithm aiming at the simulation model, observing the output performance of the aircraft under the condition of fault injection, and adjusting related parameters; after the loop software simulation and the loop hardware simulation pass, loading the tested target algorithm to an actual multi-rotor aircraft, verifying the actual multi-rotor aircraft, and finally evaluating the performance of the algorithm.
The design of the experimental platform for fault-tolerant control of the multi-rotor aircraft comprises the following specific steps:
step 1) construction of hardware experiment platform of multi-rotor aircraft
The method comprises the steps of selecting proper multi-rotor aircraft hardware composition, selecting a Qsall-X4 type aircraft frame of Quanser company as a main hardware structure of an aircraft, selecting Pixhawk4 flight control as a controller of the aircraft, providing external position data for the aircraft by using an independent T265 binocular camera, and carrying Jetson Nano on the aircraft as an on-board computer of the aircraft.
Step 2) design of multi-rotor aircraft fault-tolerant experimental platform software
Step 2.1) simulation development of multi-rotor aircraft fault-tolerant test experimental system model
The model simulation development is designed by using Simulink, and the simulation development based on the Simulink model can greatly improve the research and development efficiency and has good compatibility with a plurality of algorithms because the simulation development has the characteristics of modularization and flexible interface.
Step 2.2) design of fault-tolerant test experimental system software of multi-rotor aircraft
The multi-rotor aircraft experimental system is designed based on ground station software QGC, an actuator fault injection module and a sensor fault injection module are added in the software, then an interface is designed in the flight control to receive fault signals, and a proper interface is designed for a fault-tolerant control algorithm.
Step 3) operation process and flight data analysis of multi-rotor aircraft fault-tolerant test experimental system
The flight log data in the fault-tolerant control experiment are led into data analysis software, so that the attitude, position, speed and other information of the multi-rotor aircraft under the action of the fault-tolerant control algorithm can be analyzed, the performance of the fault-tolerant algorithm is further evaluated, and the next step of improvement is carried out.
The method provided by the invention is used as a platform for a multi-rotor aircraft fault-tolerant control experiment, and the experimental platform is designed aiming at the fact that no experimental platform special for multi-rotor aircraft fault-tolerant control algorithm verification exists in the present practice, so that the efficiency of fault-tolerant control algorithm verification can be greatly improved, meanwhile, the performance of the fault-tolerant control algorithm can be obtained from the actual experiment, and the practicability of the fault-tolerant control algorithm is further improved.
Detailed Description
The invention is further explained below with reference to the drawings.
As shown in fig. 1, for a design process of the fault-tolerant test experimental system, firstly, a hardware platform of an aircraft is built, and secondly, a Simulink model, a disturbance model, a fault injection model and a design and verification of a fault-tolerant control algorithm of a multi-rotor aircraft are designed; design of a fault-tolerant test system of the QGC ground station and design of a PX4 firmware fault processing module.
Step 1) building hardware of a multi-rotor aircraft fault-tolerant experimental platform:
step 1.1) rack type selection:
when the fault-tolerant platform of the aircraft is designed, a Qpall-X4 type aircraft frame of Quanser company is used, and the modified fault-tolerant experimental platform of the multi-rotor aircraft is shown in FIG. 3. The machine type can be applied to indoor scenes for test flight, adopts the cage type protection frame with the carbon fiber structure, can protect main parts of an aircraft when the aircraft collides or crashes, and simultaneously avoids the problem caused by the out-of-control aircraft in outdoor scenes;
since the original Qpall-X4 aircraft adopts an OptiTrack system as indoor positioning, the method has great limitation on the experiment of multiple rotors in other scenes. Therefore, the original flight control component and the indoor positioning component are modified, so that the aircraft can be applied to more scenes, and the universality is higher;
step 1.2), flight control and main hardware component type selection:
currently, the common flight controls in the market include those of the great Xinjiang series, such as V2, A2, N3 and A3, the Pixhawk series, such as Pixhawk2 and Pixhawk4, and the APM, MWC and QQ flight controls. In order to facilitate the universal application of the researched algorithm on a multi-rotor aircraft, Pixhawk4 open source flight control is selected as a controller of the fault-tolerant platform of the aircraft;
pixhawk4 is a low-cost high-performance autopilot, and is suitable for controlling mobile robot platforms such as multi-rotor, fixed-wing, helicopter, tilt rotor, automobile and the like.
Because the original Positioning system of the Qpall-X4 aircraft is based on an OptiTrack system to realize the Positioning and tracking of the aircraft in an indoor environment, most of multi-rotor aircraft which carry out flight operation outdoors realize the Positioning and tracking of the aircraft based on a Global Positioning System (GPS), but when the signal of the Positioning system is interrupted, the further task execution or the return to the initial place of the aircraft is difficult to realize. Therefore, in order to improve the self-positioning and tracking capability of the aircraft, an intel real sense T265 tracking camera is selected as a positioning device of the aircraft of the fault-tolerant experimental platform, and as shown in fig. 5, the T265 tracking camera installed at the front part of the aircraft fuselage is shown.
Compared with the traditional multi-rotor aircraft depending on an external positioning system, the real-feeling camera simulates the eye-sensing surrounding environment of an animal by using a Visual odometer (VIO) technology, senses balance and direction through an Inertial measurement unit, and performs data fusion on acquired sensor information to acquire the position of the real-feeling camera. Taking the T265 module as an example, it integrates two sets of wide-angle 165 degree fisheye cameras (OV9282), an inertial measurement unit (BMI055), and a dedicated vision processing unit
Movidius
TM Myriad
TM2 MA215x that can send 6 degrees of freedom attitude data at a 200hz sampling rate to an on-board computer with less than 1.5W. Therefore, the characteristics of accuracy and low delay of the module are utilized, and the method has important significance for building a multi-rotor aircraft fault-tolerant experimental platform with higher universality.
According to the above selected positioning module of the aircraft, Jetson Nano generated by great intel corporation is selected as an on-board computer of the multi-rotor aircraft, as shown in fig. 6, which is a Jetson Nano module installed right below the aircraft body. Jetson Nano carries an ARM A57 CPU and a 128-core Maxwell architecture GPU. The module is connected through the USB, six-degree-of-freedom attitude data of the T265 sensor can be sent to the Pixhawk flight control module, and the aircraft can be autonomously positioned without depending on external information. Meanwhile, the GPU can be used for realizing the operation of a plurality of small-scale optimized neural network models, which has important practical significance for identifying the fault parameters or other non-linear parameters of the aircraft by using the neural network.
Step 1.3) model selection of a flight control power system:
many rotor crafts's driving system constitutes mainly including: fig. 7 shows a schematic structural diagram of a motor, an Electronic governor (ESC), a propeller, a power management module, and a battery installed in a fault-tolerant experimental platform, where the schematic structural diagram is a schematic structural diagram of the motor, the Electronic governor, and the propeller
Wherein l is the wheelbase of the aircraft, lDIs the diameter of the propeller. As shown in table 1, the frame size and propeller size parameters of a conventional quad-rotor aircraft are used. The parameters of the frame in the text are 400mm wheelbase and the propeller parameters are 10 multiplied by 4.7R. The parameter specification of the propeller is generally expressed by four digits, that is, the first two digits represent the diameter of the propeller (10 inches to 25.4cm), the last two digits represent the pitch of the propeller (4.7 inches to 11.9cm), and the pitch of the propeller generally takes a geometric pitch fixed value at 70%, and the value is derived from the distance that the propeller rotates for one circle when the blade angle section is zero.
TABLE 1 conventional collocation of quad-rotor aircraft frame and propellers
The motor with the corresponding parameters can be further selected according to the size parameters of the propeller, and as shown in fig. 7, the motor model parameter corresponding to the 1047 blade parameter is selected as Park 4002810-KV 740. Wherein, the first two digits of the parameter "2810" indicate that the diameter of the stator of the brushless dc motor is 28mm, the larger the diameter of the stator is, the larger the torque of the motor is, and the last two digits indicate that the height of the stator is 10 mm; the parameter "KV 740" indicates the motor speed per minute per 1V increase of the motor at no load, as in the present context KV740 motors reach an idle theoretical speed of 10952 revolutions per minute at 14.8V. However, when the motor model is selected, the selection and matching are generally carried out according to the efficiency table and the full-throttle temperature of the motor, and the motor model corresponding to the pulling force can be selected according to the takeoff weight of the aircraft. Generally, the smaller the KV value of the motor is, the more the turns of a motor coil are, the lower the highest output current is, the larger the torsion of the motor coil is under the same voltage is, and the larger the size of the paddle can be equipped; on the contrary, the larger the KV is, the smaller the torsion is, and the smaller the size of the blade is, if the blade with an excessively large size is equipped, the motor is overheated, magnetic saturation is generated, and the efficiency is reduced. Therefore, for a traversing machine with a smaller wheelbase, a motor with a high rotating speed can be selected to be provided with a blade with a smaller diameter, and for a plant protection machine with a wheelbase of more than one meter, a motor with a smaller KV value can be selected to drive a blade with a larger diameter, as shown in table 2, the parameters of the motor and the propeller are matched under the conventional condition.
TABLE 2 conventional collocation of four rotor craft motors and propellers
The selection of the brushless electric regulation is generally selected according to electric regulation parameters given by a motor manufacturer. The selected electric regulation model is FlyFun 30A V4, the maximum output continuous current is 30A, and the short-time current is 40A. The battery of the multi-rotor aircraft is selected in consideration of the weight of the battery, the capacity should not be too large when the battery is selected, the battery with corresponding capacity and discharge multiple can be adapted according to the requirement of the endurance time of the aircraft, the battery model selected in the specification is LiPo 4S-14.8V-25C-3300mAh, and the battery is obtained by connecting 4 lithium batteries in series, wherein the single battery is 3.7V at the lowest discharge lower limit, 4.2V at full-charge voltage, 3300mAh at capacity and 25C at discharge rate, namely the continuous discharge current is 25 multiplied by 3.3A to 82.5A, and the continuous discharge duration is 0.5 hour at 6.6A. From the above analysis, the aircraft specific parameters are shown in table 4, accordingly.
TABLE 3 Multi-rotor aircraft Performance parameters
TABLE 4 Multi-rotor aircraft parameters
Step 2) design of multi-rotor aircraft fault-tolerant experimental platform software
Step 2.1) simulation development of multi-rotor aircraft fault-tolerant test experimental system model
The purpose of developing multi-rotor aircraft model simulation herein is to facilitate design of fault-tolerant control algorithm, and to perform algorithm verification through model-in-loop simulation (MIL) and hardware-in-loop simulation (HIL), and at the same time, a designed controller module can be used to generate a corresponding controller code and transplant the controller code into Pixhawk flight control for physical verification. Fig. 8 shows a hardware-in-the-loop simulation of a four-rotor aircraft as used herein based on the Simulink model.
The overall structure developed based on the Simulink model in this document is shown in fig. 9, and mainly includes an aircraft physical modeling module, a controller module, a visualization component, a reference signal generation module, and a control signal distribution module. On the basis of predecessors, a remote controller signal generation and storage module, an actuator fault injection module, a sensor fault injection module, a gust disturbance module and the like are mainly designed. As shown in fig. 10, the aircraft reference signal generation module may read a data stream sent by a flight control through a computer serial port in a hardware-in-loop simulation process, extract and analyze a real-time control signal of a remote controller in a Mavlink data packet, and further may control an aircraft model built by Simulink, may also directly use a control signal of the remote controller in a Pixhawk flight control after analyzing log data in the Pixhawk flight control for the aircraft model, and may directly use a control signal of the remote controller in a Pixhawk flight control for the control of the aircraft model after analyzing the log data in the Pixhawk flight control, so that researchers may perform multiple simulations once experiment.
A GUI interface for fault injection data implementation herein is shown in fig. 11, where actuator fault injection is data that simulates four-way PWM signals as having an actuator gain or bias fault, and sensor fault injection is data that simulates the angular acceleration and linear acceleration signals generated in the model as corresponding fault forms. And, because the action object of the fault data is an aircraft mathematical model module, the fault data can be used as the real fault data of the aircraft. Similarly, the wind disturbance module of FIG. 12 generates wind disturbance data by introducing white noise information and superimposes the generated signal on a moment module in the mathematical model of the aircraft.
After running the designed aircraft model environment, the researcher can observe the attitude change of the aircraft in real time, so as to improve the control algorithm or adjust the parameters of the controller, as shown in fig. 13.
And finally, generating a C/C + + code by the designed controller module through Simulink, replacing an 'mc _ att _ control' module code in PX4 firmware, changing corresponding interface parameters, finishing compiling and uploading, and transplanting the self-designed controller code into the Pixhawk flight control.
Step 2.1) design of fault-tolerant test experimental system software of multi-rotor aircraft
The multi-rotor fault-tolerant flight test experimental system designed based on the QGC ground station has the main functions of realizing real-time fault injection and state monitoring of the aircraft in the flight process, and verifying the actual fault-tolerant performance of the aircraft by injecting different fault parameter values.
Figure 14 is a ground station software for a multi-rotor fault-tolerant flight testing experimental system designed herein. Fig. 15 and 16 are working interfaces for experimental system actuator fault data injection and sensor fault data injection.
The fault data receiving module designed based on the px4 firmware is mainly used for applying fault data sent by the ground station to the actuators and the sensors. The method specifically comprises a user-defined Mallink message receiving and processing module, flight control controller fault data processing and a hybrid controller. FIG. 17 shows the simplified code modules of the custom Mallink data receiving and processing module;
the customized Mavlink message only needs to add a corresponding processing function in a file of a px4 firmware code "Mavlink _ receiver. The sensor fault rate and the actuator fault rate are the final output results obtained by multiplying the fault values given by the ground station by the original values through percentage conversion, and the fault duration transmitted in the ground station is in milliseconds (ms), so that the fault duration needs to be converted into microseconds (us) for calculation in flight control. After the flight control acquires the Mallink message, the controller part can subscribe the fault information for processing. The process is as follows: the fault information of the actuator is transmitted to the coprocessor through the controller and the hybrid controller, the coprocessor sends the PWM signal to the electric regulator, the electric regulator drives the brushless motor to rotate, and finally the whole process of fault injection of the actuator to fault realization is completed. Fig. 18 shows the partial code for the motor fault implementation No. 1, which is implemented in the px4 firmware code "mc _ att _ control _ main.cpp" file. In addition, in order to prevent the aircraft from flying in a fault state due to misoperation, as shown in fig. 19, an aircraft fault injection enabling parameter is also set in a px4 firmware code mixer.
The hybrid controller script transmits a parameter ' activators ' control [4, 5, 6, 7] ' to a coprocessor parameter ' outputs [4, 5, 6, 7] ', wherein the range of the partial parameters is that the parameter ' r _ page _ servos [ ] ' is a pwm value finally output to the electric power by flight control, and the range is that. In addition, in order to improve the general performance of the multi-rotor aircraft fault-tolerant experimental platform, the frame types of the cross-shaped four-rotor aircraft and the cross-shaped six-rotor aircraft are added to the px4 firmware. As shown in fig. 20, is another type of multi-rotor aircraft compatible with the fault-tolerant experimental platform of the present disclosure.
Step 3), analyzing the operation flow and flight data of the multi-rotor aircraft fault-tolerant test experimental system:
according to the introduction of the software and hardware design of the multi-rotor aircraft, the relevant steps of the system operation flow and the extraction and analysis of the flight control state data are introduced in this section.
Firstly, the preparation of software and hardware parts needs to be completed in advance before fault injection experiments of the fault-tolerant experiment platform. The preparation part before the fault-tolerant control algorithm of the physical test comprises the following steps: the theoretical design and the proof of the algorithm, the simulation of an algorithm model and the in-loop simulation of hardware, and the transplantation, the compilation and the uploading of algorithm codes. For the hardware part of the fault-tolerant experimental platform of the multi-rotor aircraft, it is necessary to check whether the installation of the aircraft structure and its components is good. It is also necessary to check whether the communication with the QGC ground station is normal and whether the flight control sensors are working properly after the aircraft is powered on.
Secondly, parameters for realizing vision fusion positioning by setting QGC ground station parameters are set, and the aircraft can be kept in a relatively static spatial position for hovering flight after taking off by realizing indoor positioning, so that the control of researchers on the aircraft is facilitated.
Then, whether the operation of the onboard computer and the T265 module is normal is checked, the operating state of the sensor can be obtained by remotely logging in a system interface of the onboard computer through a local area network and running an vio _ fly.sh script file in the system, and a parameter interface is displayed in the T265 running process. Meanwhile, after the state of the sensor is normal, the direction of the pointer interface is updated in the ground station software of the system, which indicates that the visual fusion positioning realized based on the T265 sensor works normally. At the moment, the flight mode of the aircraft can realize indoor fixed-point flight.
Then, the experimenter can perform the fault injection and controller fault tolerance experiment through the operation flow of the fault tolerance test experiment flow chart in fig. 21.
As shown in fig. 22, in order to verify whether the fault injection function of the aircraft operates normally, the fault injection function of the fault-tolerant experimental platform of the multi-rotor aircraft is tested before the aircraft takes off, and at this time, the ground station software injects 50% of fault rate parameters intomotors 3 and 4 of the aircraft respectively. Since the motors of the multi-rotor aircraft in the present disclosure cannot drive the motors to operate when the PWM is lower than 1000, it can be seen that themotors 1 and 2 of the aircraft are working normally, and themotors 3 and 4 are stopped.
Secondly, in order to verify the effectiveness of the multi-rotor aircraft fault-tolerant experimental platform designed in this chapter in actual flight, the fault-tolerant control effect of the aircraft under different fault injection conditions is tested on the platform by adopting a fault-tolerant controller designed in the fourth chapter. As shown in fig. 23, a flight reference trajectory with an aircraft height of 0.8 m and a diameter of 1.6 m is given, and meanwhile, fault data with a fault rate of 5% is injected into the motor 1 at 14 th second after the aircraft takes off, and fault data with a fault rate of 8% is injected into themotor 2 at 18 th second, so that a fault state with a fault rate of 5% still exists in the motor 1. Looking at the flight trajectory of the aircraft in fig. 23, it can be seen that although the corresponding fault data of the aircraft are given at fault injection point 1 andfault injection point 2, the aircraft returns to the original desired tracking trajectory after a short attitude adjustment. As shown in fig. 24, by capturing the process image of the attitude change of the aircraft after fault injection, the whole change process of the aircraft implementing fault-tolerant control can be visually observed. Therefore, the result of the actual fault input experiment of the aircraft shows that the multi-rotor aircraft fault-tolerant control platform designed by the method has the practical value of researching a fault-tolerant control method, and can help researchers to test the control effect of a design algorithm of the multi-rotor aircraft fault-tolerant control platform.
However, in the experimental process, after the aircraft injects the fault data, the controller cannot compensate the fault data, so that an unstable phenomenon or an out-of-control phenomenon may occur. At the moment, the emergency closing of the aircraft actuator can be realized by switching the on-off channels of the remote controller arranged in the ground station, so that the safe operation of the aircraft is ensured. The log files of the aircraft in the Pixhawk flight control are exported, various state data of the aircraft in the fault injection experiment can be obtained, as shown in fig. 25, the log files are extracted from the aircraft ". ulg" file, wherein common state data of the aircraft are stored, for example, ". vehicle _ attribute _0. csv" file stores attitude data of the aircraft in the flying process, ". vehicle _ attribute _ setpoint _0. csv" file stores attitude data expected by the aircraft, and ". sensor _ combined _0. csv" file stores sensor data of a gyroscope, an accelerometer, and a magnetic compass. As shown in fig. 26, for the screenshots of the position data and part of the data in the attitude data of the aircraft obtained after the data in the log file is extracted, researchers can draw the extracted relevant parameter data into a schematic diagram similar to that in fig. 23, and further analyze the stability performance of the aircraft in the experiment.