Thesis Introduction
Today I got the news that my self-proposed undergraduate thesis project was approved by the school. This means that I’ll spend the next semester working nearly full-time on the optimal control of fixed-wing aircraft, using an approach pioneered in the last two years for drone racing control. If successful, this project will have major implications for autonomous navigation and control in disaster recovery, fire fighting, and package delivery with fixed-wing aircraft.
Since one requirement for the thesis is to document your intermediate progress, I’ll be posting regular updates on this blog with setbacks, learnings, conclusions, and perhaps the occasional quip about optimal control.
Motivation
I came up with this project in relation to the IMechE UAS challenge, an engineering challenge where participating teams design and build an aircraft to deliver humanitarian payloads across long distances. To simulate realistic flight demands, teams are given a series of waypoints (GPS coordinates); the plane must fly around the waypoints in a specified order, passing by the waypoint either on the right or on the left. As the Simulations-focused co-lead for endeavour Rankine, I had to figure out how to control the plane around these waypoints.
By far the biggest pre-existing solution in this case is Ardupilot, which provides firmware and software for flight computers. Ardupilot works with layers and layers of cascaded PID controllers; you would set a trajectory by manually inputting a series of points through which the airplane must fly. The plane navigates to each waypoint in succession by setting a series of targets. This approach has broad appeal because it works and it’s simple – but it’s also extremely manual, operator intensive, and nearly guaranteed to lead to a suboptimal result. In a time-restricted challenge where flying faster and more efficiently gathers more points, you want to avoid suboptimal flight trajectories as much as possible. It would be much nicer if you could just give the contest waypoints as constraints, and let software decide how the plane will fly around them.
Unfortunately, the constraint that the flight path must go around a series of waypoints makes the problem quite difficult to optimize. To constrain an optimal path, you would in general either need to specify the time that the craft arrives at a waypoint, or specify the exact position of the plane as it goes around the waypoint. Clearly, neither of these options will lead you to a globally optimal trajectory around the waypoints, without extremely serendipitous choices of time or position constraint.
This problem is particularly salient in drone racing, where drones need to fly through small gates (rectangular holes). One of the first papers to get true time-optimal drone control used a Complementary Position Constraint (CPC) method, adding a vector of optimization variables equal in length to the number of waypoints.1 These variables were used to keep track whether the drone had successfully flown through a waypoint, and whether it was flying in the right order. Surprisingly enough, this approach worked… but it took over an hour to calculate the solution for a few laps of the course. Considering that the course itself takes about seven seconds to complete, real-time optimization with CPC would seem to require about three orders of magnitude more computational power.
A much better approach lies in a simple change of coordinates. Rather than taking an arbitrary path in space and constraining it to fall within the waypoints, you can start with an arbitrary reference path and write your dynamics in path-relative coordinates. This is known as “contouring control”. From this perspective, waypoint constraints are much easier to implement, either in the cost function or as a convex allowable tunnel around the reference path2:
With a reference path creating a safe tunnel for the drone to follow, it’s possible to control the drone optimally by optimizing only for a finite horizon of the course, allowing for time-optimal control in real-time.
The Project
My goal is to implement Contouring Control for fixed-wing flight around waypoints, generating more optimal trajectories for our delivery run than the other teams will be able to achieve by hand. I’ll investigate other methods which have been applied in the past for fixed-wing control, particularly methods which use optimal control over Lie groups to generate motion primitives3, to see if they can be woven into a unified tool for top-to-bottom flight optimization. I’ll implement these controls in X-Plane and on physical flight hardware. Along the way, I’ll document my progress in blog form.
Excitement awaits!
-
Philipp Foehn, Angel Romero, and Davide Scaramuzza, “Time-Optimal Planning for Quadrotor Waypoint Flight,” Science Robotics 6, no. 56 (July 21, 2021): eabh1221, https://doi.org/10.1126/scirobotics.abh1221. ↩︎
-
Jon Arrizabalaga and Markus Ryll, “Towards Time-Optimal Tunnel-Following for Quadrotors,” in 2022 International Conference on Robotics and Automation (ICRA), 2022, 4044–50, https://doi.org/10.1109/ICRA46639.2022.9811764. ↩︎
-
G.C. Walsh, R. Montgomery, and S.S. Sastry, “Optimal Path Planning on Matrix Lie Groups,” in Proceedings of 1994 33rd IEEE Conference on Decision and Control, vol. 2 (1994 33rd IEEE Conference on Decision and Control, Lake Buena Vista, FL, USA: IEEE, 1994), 1258–63, https://doi.org/10.1109/CDC.1994.411151. ↩︎