Last time, we explained low-altitude and indoor navigation using optical flow. In this article, which is FC19, we will cover the L1 Controller. We will explain the mathematics of the geometric guidance law used by ArduPilot for path following between waypoints, which is utilized by both fixed-wing aircraft and multicopters.
What is the path following problem?
The navigation layer explained in FC2 generates guidance commands from the current position to the target waypoint. Simply 'pointing toward the target point' causes problems such as significant overshoot when the aircraft deviates from the path, or gradually drifting away from the path in the presence of crosswinds.
Path following control is not just tracking a target direction, but control that converges the aircraft onto a set path (a straight line or curve between waypoints). It is necessary to realize forward movement along the path while continuously bringing the cross-track error to zero.
This problem is particularly important for fixed-wing aircraft. While multicopters can generate thrust in any direction, fixed-wing aircraft can only control their direction of movement through their heading, and they must follow paths under the constraints of crosswinds and turning radii. The L1 Controller was designed to achieve stable path following under these constraints.
Origin and intuition of the L1 Controller
The L1 Controller is a guidance law proposed by Park, Deyst, and How in 2004, originally inspired by Proportional Navigation in missile guidance.
As an intuitive explanation, the basic philosophy of the L1 Controller is to generate an acceleration command toward a reference point on the path located at an L1 distance in front of the aircraft. This reference point moves along the path as the aircraft progresses, smoothly converging the aircraft onto the path.
The name L1 is derived from the distance from the aircraft to the reference point (the magnitude of the L1 vector). The magnitude of the L1 distance is a design parameter that determines the balance between control responsiveness and stability.
Geometric configuration of the L1 Controller
We will construct the geometry of the L1 Controller in order.
Find the closest point on the path. Calculate the foot of the perpendicular (the closest point) from the aircraft's current position P to the set path (a straight line or circular arc).
Find the reference point (L1 point). The point that is an L1 distance forward along the path from the closest point is the L1 reference point. The L1 vector is the vector from the aircraft's current position to this L1 reference point.
Calculate the angle η between the L1 vector and the aircraft's velocity vector. This angle is the control input for the L1 Controller.
The lateral acceleration command is calculated from η:
a_cmd = 2 × V² × sin(η) / L1
V is the airspeed (for fixed-wing) or ground speed (for multicopters), and L1 is the L1 distance.
To realize this acceleration command, fixed-wing aircraft convert it into a roll angle (bank angle) command, while multicopters process it as a velocity vector toward the target direction.
Design of the L1 distance
The L1 distance (L1 period, set as NAVL1_PERIOD in ArduPilot) is the most important parameter that determines the responsiveness and stability of the control.
When the L1 distance is small, the aircraft reacts sensitively to the path and converges quickly, but the risk of overshoot and oscillation increases.
When the L1 distance is large, the aircraft converges to the path more gradually and smoothly, but the speed at which it corrects deviations from the path is slower.
ArduPilot's NAVL1_PERIOD parameter is specified in seconds and is internally converted to an L1 distance. The relationship between L1 distance L and period T is:
L1 = V × T / (2π) × (2π/T)... In practice, the following relational expression is used:
In ArduPilot's implementation:
L1_dist = (1/π) × damping × period × V
damping is NAVL1_DAMPING (default 0.75), and period is NAVL1_PERIOD (default 20 seconds; smaller values are common for multicopters).
The higher the velocity V, the larger the L1 distance for the same period. This reflects the physical requirement that a larger turning radius (L1 distance) is needed to perform a turn at the same angular velocity when at high speeds.
Stability Analysis of the L1 Controller
We verify the reason why the L1 Controller converges using linearization analysis.
Consider a linearized system with a small cross-track error xt and a small heading error ψ. From L1 geometry:
η ≈ (xt × cos(ψ) + L1 × sin(ψ)) / L1 ≈ xt/L1 + ψ (small-angle approximation)
The acceleration command a_cmd produces a rate of change in lateral velocity, which is converted into the aircraft's heading rate of change (via bank angle for fixed-wing aircraft):
dψ/dt = a_cmd / V
dxt/dt = V × sin(ψ) ≈ V × ψ
Combining these yields a second-order linear system for xt and ψ:
d²xt/dt² + (2V/L1) × dxt/dt + (2V²/L1²) × xt = 0
This can be compared to the standard form of a damped oscillation d²x/dt² + 2ζωₙ(dx/dt) + ωₙ²x = 0:
ωₙ = √2 × V/L1
ζ = 1/√2 ≈ 0.707
The mathematically excellent property of the L1 Controller is that the natural frequency ωₙ is proportional to V/L1, and the damping ratio ζ is automatically set to approximately 0.707 (a good damping characteristic close to critical damping). This damping ratio can be adjusted with the NAVL1_DAMPING parameter.
L1 Controller on Arc Paths
This section explains the L1 geometry when the path is an arc, such as during waypoint turns.
On arc paths, the calculation of the closest point differs from that of a straight line; it is performed by comparing the distance from the vehicle position to the arc center with the arc radius. The L1 reference point is placed forward along the arc.
The relationship between the turn radius and the L1 distance is also important. If the L1 distance is too large relative to the turn radius, the vehicle will cut inside the arc, and if it is too small, it will overshoot to the outside. ArduPilot automatically adapts the L1 geometry to the arc during waypoint turns.
NAVL1_XTRACK_I (cross-track integral gain) is used for offset correction when there is a steady crosswind. Since the basic L1 Controller formula does not have an integral term, a steady-state error remains against steady disturbances (constant crosswind). This integral term corrects that.
Positioning of the L1 Controller in Multicopters
This section summarizes the differences in L1 Controller usage between fixed-wing aircraft and multicopters.
In fixed-wing aircraft, the L1 Controller generates a roll angle (bank angle) command, which is passed to the attitude control layer (see FC2). Because fixed-wing motion is strongly constrained by forward speed and turn radius, the geometric design of L1 is directly linked to the vehicle kinematics.
Multicopters use an L1-like algorithm in AUTO mode (waypoint flight), but the implementation is in the WP Navigation library (AC_WPNav), which takes a different approach than L1. Since multicopters can generate thrust in any direction, more direct trajectory following (smooth velocity profile generation using S-curves) is used.
However, in the ArduPilot codebase, L1-like look-ahead concepts (waypoint passage radius setting via WPNAV_RADIUS) are used even in multicopter AUTO mode, showing a conceptual affinity.
Practical Tuning of NAVL1 Parameters
This section summarizes the tuning parameters and adjustment guidelines for the L1 Controller (mainly for fixed-wing aircraft).
NAVL1_PERIOD is the main parameter that determines the responsiveness of L1. The default is 20 seconds. Decreasing the value makes path following more agile but prone to oscillation. For large or slow aircraft, a larger value (20–25 seconds) is common, while for small or fast aircraft, a smaller value (15–18 seconds) is common.
NAVL1_DAMPING is the damping ratio. The default is 0.75. Increasing the value suppresses oscillation but slows down the response. In windy environments, it may be increased to 0.8–0.9 to prioritize stability.
NAVL1_XTRACK_I is the integral gain for cross-track error. The default is 0 (disabled). It is used to correct steady-state error against crosswinds and is set to about 0.02–0.05 in strong wind environments.
The tuning procedure begins by checking the cross-track error log during straight flight. The xtrack error and nav bearing are recorded in the NTUN log message. Check whether the cross-track error converges oscillationally or smoothly under conditions without crosswinds; if it is oscillatory, increase NAVL1_PERIOD or NAVL1_DAMPING.
Comparison with Other Path Following Algorithms
This section compares the L1 Controller with similar path following algorithms.
Pure Pursuit is an algorithm widely used in ground robots and has a geometric structure very similar to the L1 Controller. The basic philosophy of heading toward a look-ahead point is the same, and it can be said to be a direct relative of the L1 Controller. The Regulated Pure Pursuit Controller in the Nav2 stack is an advanced version for ground robots.
The Stanley Controller is a method used by the DARPA Grand Challenge winning vehicle, which handles cross-track error and heading error with direct feedback gains. It does not use a look-ahead reference point like L1, but performs control directly proportional to the current deviation. It is suitable for low-speed, high-precision path following (ground robots), while L1 is more suitable for high-speed flying vehicles.
MPC (Model Predictive Control) is a more advanced method that calculates optimal control inputs while predicting the aircraft's dynamic model and future trajectory. While computationally expensive, it can strictly handle complex constraints (speed limits, attitude constraints). MPC-based path following is adopted in some PX4 implementations and open-source research aircraft.
The strength of the L1 Controller lies in its low computational cost and theoretical simplicity. It is easy to implement on embedded MCUs, which is why ArduPilot has adopted it as the standard guidance law for fixed-wing aircraft for many years.
Verifying the L1 Controller in SITL
We will cover this in detail in the next FC20, but we will touch upon verifying the L1 Controller's operation in SITL (Software In The Loop).
In the SITL simulation environment, you can safely evaluate the impact of NAVL1 parameters without using an actual aircraft. By comparing cross-track error convergence characteristics in simulations with varying wind speeds and directions, you can narrow down the optimal combination of NAVL1_PERIOD and NAVL1_DAMPING in advance.
This reduces the number of tuning attempts required during actual flight, enabling safe and efficient development.
Summary
The L1 Controller is a geometric guidance law toward a reference point on the path at an L1 distance ahead, and it automatically possesses mathematically superior characteristics with a damping ratio of ζ≈0.707. NAVL1_PERIOD and NAVL1_DAMPING are the primary tuning parameters, and the design automatically adjusts the L1 distance according to speed. Compared to alternative methods such as Pure Pursuit, Stanley Controller, and MPC, its low computational cost and simplicity of tuning are the reasons for its long-term adoption in ArduPilot. In the next FC20, we will explain how to build and utilize the SITL—Software In The Loop simulation environment.
