II. EL FLUJO DEL REVERSO: LORENZO GARCÍA VEGA Y EL OFICIO DE
II.11 El estilo y el estilo tardío
Flight controllers, also commonly referred to as autopilots or flight management units (FMU), are complex avionics systems which automate the control of UAS. For autonomous UAS, flight controllers form the crucial link between software and hardware by interpreting and executing agent actions. Flight controllers also estimate the aircraft state, which consists of position, attitude, linear velocity, and angular velocity, using accelerometer, gyroscopes, GPS, barometric, vision, and other sensor data [38]. This section briefly describes the dynamics and control of multirotor UAS and introduces two popular, open-source flight controller projects which constitute the state-of-the-art in this area.
2.2.1 Multirotor Dynamics.
Figure 5 displays the standard reference frames used to define the state of a multirotor aircraft.. Zb Yb Xb
n
e
d
4 1 2 3r
Xb n Xb iv1 Yb jv2Figure 5. The standard reference frames and axis for multirotor UAS dynamics. The body frame (right) is a transformation r from the inertial NED frame (left). Positive rotations are shown for pitch (θ), roll (φ), and yaw (ψ) [2, 3].
The flight controller calculates control inputs to achieve a desired vehicle state also known as a setpoint. In multirotor UAS, control is achieved through the differential thrust of each rotor. Designing robust control laws is difficult because multirotors are under-actuated systems, meaning there are fewer control inputs than outputs. Additionally sensor data is noisy, and the aerodynamic models for multirotor vehicles are only approximate [38, 2]. The most common solution to this problem is to employ a nested loop structure like the one depicted in Figure 6.
Position
Control
Attitude
Control
Motor
Control
Multirotor
Position Estimation Attitude Estimation h d d d v iaccelerometer, gyroscope, and magnetometer
accelerometer, gyroscope, VICON
Figure 6. Typical control loop structure for a multirotor UAS flight controller [2, 3].
subdividing the problem into a series of smaller control problems, usually consisting of position control, attitude control, and finally motor control [38]. The position controller sets the desired angular positions: θd desired pitch angle, φ desired roll angle, and ψ desired yaw angle. The position controller also sets ∆ωh, the desired rotation speed for all motors, which roughly corresponds to the desired net thrust. The attitude controller sets the desired angular rates based on the angular position setpoints mentioned above. These setpoints are ∆θ, ∆φ, and ∆ψ, which are angular pitch rate, angular roll rate, and angular yaw rate respectively. The motor control loop receives the desired angular rates and gross motor speed and calculates the appropriate voltage for each motor to achieve the desired individual motor speeds. The motor control loop receives feedback in the form of ωi which is the individual motor speeds as reported by the electronic speed controllers attached to each motor. Designers are able to decompose the multirotor control problem in this way by applying successive loop closure. Successive loop closure allows designers to approxi- mate the inner loops of Figure 6 as unity gain. This is based on the assumption that inner loops operate at a much higher frequency than outer loops, approximately 5 to 10 times higher, so that the transfer function of the inner loop, as seen by the outer loop is essentially flat [3]. The complex feedback structure collapses leaving only an
open loop transfer function consisting of a cascade of the transfer functions of the three individual controllers.
Using this simplification, designers are able to construct three separate controllers that are decoupled from one another. According to [3], the resulting plant models are well controlled by simple proportional-integral-derivative (PID) controllers since they only exhibit first or second-order behavior. Additionally, the overall transfer function of these systems is adequately modeled by second order dynamics since inner loops appear as unity gain to the outer loops. Therefore elementary Linear Time Invariant (LTI) system analysis for second order systems is a useful approach for characterizing flight controllers. For this research, the second order dynamics of interest are:
• Rise time - Time for the output to rise from 10% to 90% of the final output value.
• Latency - time from the start of the input to 10% of the final output.
• Frequency Cutoff - the frequency where output magnitude is 3 dB below the passband.
These measures were chosen because they capture the responsiveness of the con- troller. Other second order dynamics, such as settling time, overshoot, and oscillatory behavior were disregarded since they are largely determined by tuning of the flight controller itself which was not the subject of this research.
2.2.2 PX4 and Ardupilot Firmware.
There are several capable flight controller firmwares which use some variation or combination of PID controllers arranged in a nested loop structure. A comprehensive survey of open-source flight controller projects is presented in [29]. PX4 and Ardupi- lot are the only projects which are still being actively developed from this survey.
Interestingly, the two projects were jointly developed in a collaborative project until breaking changes were made due to political reasons in 2016 [39]. It is difficult to select one flight controller over the other on the basis of performance since they were co-developed. Many of the underlying algorithms are very similar and no performance comparison exists in the literature. In terms of behavioral-flexibility, PX4 benefits from a highly modular code base facilitated by node modules communicating over the µOrb publish and subscribe middleware. This is in contrast to Ardupilot firmware which is hindered by a monolithic control loop structure[20, 19, 40]. For this reason, PX4 was selected as the flight controller firmware of interest for this project and likely constitutes the state-of-the-art for open-source flight controllers.