Rapid prototyping and Quick System Identification (part 2)

232


The flight data was logged on the micro sd card which was plugged into the front of the Pixhawk autopilot.  The Pixhawk is capable of logging various levels of data, but because the sd card used was 4gb, the default (all data logged) was chosen.  It was also set in the logging settings to only log when the autopilot is ‘armed.’  Only logging when armed helps cut down on useless data. 

The log .bin files can be pulled wirelessly through the ground station or pulled directly off the sd card using a sd card reader.  We used an sd card reader because it is drastically faster.  These files were then converted to .mat files using APM Planner.  These .mat files were then individually loaded into matlab for data shaping and analysis.

Data Shaping:

The Data was shaped using two triggers.  The first trigger was the channel 7 servo command to release from Arcturus.  The second trigger is the spike in acceleration sensed when the aircraft impacts the ground.  

Flight Path Analysis:

The matlab script was also used to illustrate the flight path and basic attitude hold performance.  Some of these example results can be seen below: 

Rapid-prototyping-and-Quick-System-Identification-part-2 Rapid prototyping and Quick System Identification (part 2)

Rapid-prototyping-and-Quick-System-Identification-part-2 Rapid prototyping and Quick System Identification (part 2)

The above is a great illustration of the expected glide performance of this aircraft at its current wing loading.  Above you can see that the mean sink rate is 995 ft/min, which equated to a mean glide ratio of 2.37:1.

 

Attitude Hold Analysis:

The below is a segment of the roll attitude hold performance during the orbit over the airfield.  The error tracking performance could be greatly improved with more tuning flights.  A comparison to the gains achieved using the auto tuning algorithm (used on this flight) versus the predicted gains from the model derived at the end of this paper will be an interesting follow on study.

Rapid-prototyping-and-Quick-System-Identification-part-2 Rapid prototyping and Quick System Identification (part 2)

It is clear that the roll attitude hold PID loop is working, but it is evident that with large perturbations in roll attitude, that the PIDs are underperforming and has room for tuning/improvement.

Results and Conclusions

The main focus of this study was to ultimately create a flight dynamics models from recorded flight data.  The flight profile analysis above demonstrated that our autonomous flight profile would be adequate for use in estimating this flight model using system identification tools.  As this was a proof of concept and the short amount of time between our range date and deliverable due date, only the roll axis was chosen first for system identification.  A full aircraft model will be developed next quarter.

 

The roll rate response versus the roll command was analyzed using a SISO matlab method.  The determined model for roll was the following:

Rapid-prototyping-and-Quick-System-Identification-part-2 Rapid prototyping and Quick System Identification (part 2)

The roll rate of this aircraft is “extreme”!  The dual rates and exponential have to be heavily utilized to manually fly this aircraft safely.  This fast response is also manifested in the model above.

The roll command pwm recorded from the flight was put back into the above model and compared to the actual roll rate achieved by the aircraft and can be seen below:

Rapid-prototyping-and-Quick-System-Identification-part-2 Rapid prototyping and Quick System Identification (part 2)

As seen above, the model mapped to reality really well.  There is some noise due to natural unstable air disturbances, but the overall performance of this model is respectable.  More tuning of the PIDs and test flights profiles specifically written for System Identification should help present a more robust model.  We recommend that the follow on study consist of more PID tuning with a more methodical input/output study using frequency sweeps on inputs to help get a more complete model.  It should be noted that this was achieved in three months spread over 6 two-minute flights during a one-day range evolution.  Producing this low fidelity model with this limited amount of time and data was a difficult accomplishment.  But with more time/flights in the following quarter, significant strides on this project are anticipated.

 

Drop Analysis:

 The following are matlab generated Google earth profiles of the recorded telemetry.  It should be noted that the under side of the wings are blue and the top side of the wings are red in the following illustrations.

Rapid-prototyping-and-Quick-System-Identification-part-2 Rapid prototyping and Quick System Identification (part 2)

Rapid-prototyping-and-Quick-System-Identification-part-2 Rapid prototyping and Quick System Identification (part 2)

Overall this was a successful quick example of how an aircraft can be cheaply prototyped quickly and how one could do a system identification of an airframe with the data provided from log files.  This project will probably evolve into an auto-tuning solution for PIDs of sorts but we will see what the next 3 months produces.

Fly Safe, Fly Fast

-Beall

Everyone’s Blog Posts – DIY Drones : Everyone’s Blog Posts – DIY Drones



Source link