Missouri S&T UAV Team - Autopilot Tuning

On Saturday (April 5th) we flew the airplane for the first time with the autopilot since it got the new wing. But before we went out to the RC airfield we had to physically install the autopilot in the fuselage, which went well. We then performed all of the flights necessary to tune the autopilot in HIL (Hardware In the Loop) simulation mode.

3689300785?profile=original

Using HIL simulation allowed us to all to get a better of idea of what we had to do once we got out to the airfield. In the end performing the HIL simulation in the lab saved us a lot of time and allowed me to get more familiar with tuning the PID control loops for the autopilot. Previously we had not used the PID window in Virtual Cockpit, but after using it in the HIL simulation it proved to be invaluable for properly tuning the autopilot, it allows you to see the actual, desired, and effort of a certain control parameter (i.e. pitch, roll, yaw, altitude, etc.). Previously we had had issues seeing a change in the behavior from the ground after changing a certain PID gain.On the first flight soon after takeoff the aircraft became unstable and began to become uncontrollable and began oscillating wildly, fortunately our pilot Kyle was able to get it back on the ground without any damage. It turns out that our CG was too far aft, but after adjusting the CG we were able to continue with testing. Using the PID window and the having performed the same process of tuning the autopilot in HIL mode, the first few flights went quickly and we were able to quickly tune the level 1 control loops within two 15-minute flights. A graph of the autopilot’s roll performance is shown below, ideally the two lines should match, and they are in fact very close.

3689300827?profile=original

We then moved on to the level 2 control loops (i.e. pitch from airspeed, pitch from altitude, airspeed from throttle, etc.). These were slightly more difficult, and took several passes over the airfield to complete, but we were able to get them tuned to a reasonable level. The ability of the autopilot to maintain a constant altitude is shown below, there are slight oscillations in the altitude (+/- 3 meters), these are reasonable, but might be improved at a later time with more tuning.

3689300696?profile=original

Just as my laptop battery was about to give out we moved on to the final flight of the day. The purpose of the final flight was to verify that the autopilot is able to navigate accurately and safely. The first test was simply placing a loiter waypoint above the center of the RC airfield; although there were some oscillations in altitude, the overall performance was quite good (note the 4 m/s wind speed).

3689300798?profile=original

The final test was to create an oval over the airfield that the UAV would have to navigate. The first time around the circuit the UAV did not adhere to the waypoints too strictly, but after adjusting some of the navigation parameters the performance was significantly improved (see image below). After completing these flights the telemetry was reviewed and we were better able to analyze the performance of the autopilot and its navigation.

3689300844?profile=original

Overall the testing went well and we were able to tune the autopilot control loops better than we had previously been able to with the old wing, this is most likely due to our use the PID window and the HIL simulation which allowed our time at the airfield to be spent much more efficiently.For more information or past posts visit our site: www.aessuav.org
E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • This is our first look at the attitude hold effectiveness of a commercial autopilot & it looks a lot like any other PID loop. The ground station is pretty rock solid. That thing can render 3D terrain using live video from onboard cameras in addition to The Goog. Click on a feature in the video and the robot orbits it. Terrain mapping & object recognition at its best.
  • Yeah we're going to have some fun figuring out where we can put all of our gear (which wasn't in the plane for this flight) without screwing up our CG. The Virtual Cockpit software is also really nice to use, it has a lot of functionality.
  • 3D Robotics
    That CG is a killer! Glad you were able to get it down in one piece.

    The Procerus Virtual Cockpit software looks really nice. I guess that's the reason to pay $5k for an autopilot....
This reply was deleted.