| As a kind of aircraft with flexible take-off and landing and hover at fixed point,micro quadrotor UAV plays an increasingly important role in both military and civil fields.In the four rotor control,the attitude control is the key.Therefore,the research on the optimization of its control parameters is of great engineering significance to improve the control quality and design efficiency of the four rotor aircraft.In this paper,the PID control parameter optimization of four rotor UAV Based on identification model is studied.The mathematical model of four rotor UAV is constructed by mechanism modeling,which is a nonlinear state model including all flight states.In the flight test,the input excitation of four rotors in hover is considered,and the mechanism model is linearized by the linear method of small disturbance,which simplifies the complex solution of nonlinear system.Through the mechanism modeling of four rotors,the model order in each attitude direction is obtained,which provides model reference for the identification based on experimental data.The flight test of four rotor UAV is designed,including the selection of sampling frequency,input and output,data preprocessing and so on.The experimental data for system identification is obtained.In the process of experimental design,the input of the four rotor UAV is collected and changed to meet the requirements of known input signals,and has a variety of changes in the test.The least square method is used to carry out the system identification in this study,and the cross comparison method is used to verify the identification results and evaluate the identification model.Based on the identification model,the folpd model is used to approximate the system model,and a set of optimized PID parameters are obtained by numerical method aiming at a certain optimization index.The PID parameters satisfying the control performance requirements are obtained by combining Ziegler nihcols setting method.Combined with the advantages of MATLAB in numerical calculation and algorithm design,and the advantages of Visual C + + in user-friendly development,a software for parameter optimization of four rotor UAV controller is designed and developed by using MATLAB and Visual C + +.In the process of software design,firstly,the system requirements are analyzed,and the software is divided into different functional sub modules.Then,the user interface and software framework are designed.By continuously improving the software functions and debugging the software,the auxiliary software reads the experimental data,processes the experimental data,identifies the model,approximates the folpd and optimizes the PID parameters In this process,draw the curve,analyze the fitting deviation and other functions,and finally verify the function performance of the auxiliary software through experiments and simulation.The auxiliary design software based on hybrid programming can improve the process of PID parameter setting and the efficiency of PID parameter optimization through flight data. |