ArduPilot Fixed Wing Tuning: TECS, L1 Navigation, and Auto-Takeoff Optimization

ArduPilot Fixed Wing Tuning: TECS, L1 Navigation, and Auto-Takeoff Optimization

ArduPilot remains the gold standard for open-source fixed-wing autopilot software, powering everything from hobby FPV wings to commercial mapping drones. But getting a fixed-wing aircraft to fly smoothly and reliably under full autonomous control requires more than just loading default parameters. This guide walks through the three pillars of advanced ArduPilot fixed-wing tuning: TECS (Total Energy Control System), L1 navigation, and auto-takeoff configuration. By the end, you will understand how to dial in your aircraft for precise altitude and airspeed control, accurate waypoint tracking, and repeatable autonomous launches.

Understanding TECS: Total Energy Control System

TECS is ArduPilot’s altitude and airspeed controller for fixed-wing aircraft. Unlike simpler PID altitude controllers that treat throttle and pitch independently, TECS coordinates both outputs as a unified energy management problem. The aircraft’s total energy is the sum of its kinetic energy (airspeed) and potential energy (altitude). By managing the distribution between these two forms, TECS achieves smoother transitions and prevents the common problem of airspeed bleeding off during climbs or overspeeding during descents.

Key TECS Parameters

ParameterFunctionRecommended Range
TECS_CLMB_MAXMaximum climb rate (m/s)5–15 (depending on airframe)
TECS_SINK_MAXMaximum sink rate (m/s)3–8
TECS_TIME_CONSTEnergy balance time constant3–8 seconds
TECS_PTCH_DAMPPitch damping gain0.0–0.3
TECS_THR_DAMPThrottle damping gain0.5–1.0
TECS_LAND_ARSPDTarget airspeed during landing1.2–1.5 × stall speed

TECS_CLMB_MAX sets the upper bound on climb performance. For a typical 1.8m FPV wing running a 2216 motor on 4S, a value of 8–10 m/s is realistic. Setting this too high causes the controller to demand pitch angles that the airframe cannot sustain, leading to oscillations. TECS_SINK_MAX should be conservative; aggressive descent rates risk exceeding structural limits or entering unrecoverable dives.

The TECS_TIME_CONST parameter is the most important tuning knob. It defines how quickly TECS attempts to correct energy errors. Lower values (2–4 seconds) produce snappier responses suitable for agile airframes. Higher values (6–8 seconds) are better for large, heavy platforms where rapid pitch changes waste energy. Start at 5.0 and adjust based on flight log analysis.

Tuning TECS from Flight Logs

The best way to evaluate TECS performance is through ArduPilot’s log files. Use Mission Planner or PlotJuggler to graph the following during an auto mission with altitude changes:

  • CTUN.NavAlt vs CTUN.Alt — Desired altitude versus actual. The actual altitude should track NavAlt with minimal overshoot.
  • TECS.h_dem vs CTUN.Alt — The TECS altitude demand versus measured altitude. Lag here indicates TIME_CONST is too high.
  • TECS.SPdem vs ARSP.Airspeed — The TECS airspeed setpoint versus measured airspeed. Consistent error on one side suggests trim or airframe drag issues.
  • CTUN.ThrOut and CTUN.Pitch — Look for throttle and pitch fighting each other. If throttle climbs while pitch descends (or vice versa), your energy balance gains need work.

A well-tuned TECS aircraft will hold altitude within ±2 meters in calm air and maintain airspeed within ±2 m/s of target. When you see coordinated pitch and throttle movements — pitch up with added throttle for climbs, pitch down with reduced throttle for descents — TECS is working correctly.

L1 Navigation Controller: Making Your Aircraft Follow the Line

The L1 navigation controller determines how your fixed-wing aircraft tracks waypoints. Unlike multirotors that can stop and pivot at waypoints, fixed-wing aircraft fly banked turns. L1 computes a lateral acceleration demand based on a reference point ahead of the aircraft on the desired path — the “L1 distance.” This produces smooth, coordinated turns without needing complex trajectory generation.

Core L1 Parameters

  • NAVL1_PERIOD (default 25): The natural period of the L1 guidance loop in seconds. Lower values produce tighter tracking; higher values produce smoother but lazier tracking. For nimble FPV wings, try 15–18. For large survey platforms, 22–30 works well.
  • NAVL1_DAMPING (default 0.75): Damping ratio of the L1 loop. Values below 0.7 cause overshoot and oscillation around the track. Values above 0.85 make the aircraft slow to converge. Leave at default unless you observe specific issues.
  • NAVL1_XTRACK_I (default 0.025): Integral gain for cross-track error correction. Increase if your aircraft consistently flies parallel to the desired track with a persistent offset, especially in wind.
  • LIM_ROLL_CD: Maximum roll angle in centidegrees (e.g., 4500 = 45 degrees). L1 cannot command roll beyond this limit, so ensure it is set appropriately for your airframe and mission.

Cross-Track Error and Wind Compensation

Cross-track error (XTE) — the perpendicular distance from the aircraft to the desired path — is the primary metric for L1 performance. A well-tuned L1 controller keeps XTE under 5 meters in winds up to 10 m/s. To verify this, check NTUN.XT in your flight logs during straight-line waypoint segments.

For survey missions in windy conditions, pay close attention to the NAVL1_XTRACK_I parameter. Without integral action, constant crosswinds produce a steady-state cross-track error that L1 cannot eliminate. The integrator accumulates this error and applies a steady bank angle to counter the wind. Start at 0.02 and increase in 0.01 increments if you see persistent offset. Be cautious — too much integral gain causes slow oscillations across the track line.

Auto-Takeoff: From Ground to Sky Autonomously

Auto-takeoff in ArduPilot is one of the most satisfying features to configure correctly. Watching your aircraft launch, climb to altitude, and enter its mission with zero pilot input is the hallmark of a professional UAS. But it is also one of the riskiest phases of flight. A misconfigured takeoff can result in a stall immediately after rotation or a climb-out that never reaches safe altitude.

Takeoff Sequence and Parameter Walkthrough

ArduPilot’s fixed-wing takeoff sequence proceeds through four phases: (1) ground roll at full throttle, (2) rotation at TKOFF_ROTATE_SPD, (3) initial climb at TKOFF_LVL_ALT or TKOFF_LVL_PITCH, and (4) transition to normal navigation. Each phase has critical parameters.

ParameterPurposeTypical Value
TKOFF_THR_MAXThrottle percentage during takeoff100
TKOFF_THR_MINSPDMinimum groundspeed before rotation (m/s)4–6
TKOFF_ROTATE_SPDAirspeed at which aircraft rotates (m/s)1.3 × stall speed
TKOFF_TDRAG_ELEVElevator position during ground roll-10 to 10 (PWM offset)
TKOFF_TDRAG_SPD1Speed where tail-dragger elevator transitions0.5 × rotate speed
TKOFF_LVL_ALTAltitude to level off after takeoff (m)30–50
TKOFF_LVL_PITCHClimb pitch angle during takeoff (degrees)10–20

Critical: TKOFF_ROTATE_SPD must be at least 1.3 times your stall speed. The stall speed for a typical FPV wing at 1.5 kg AUW with 40 dm² wing area is approximately 10–11 m/s. Therefore, TKOFF_ROTATE_SPD should be set to 14–15 m/s at minimum. Setting this too low guarantees a stall immediately after rotation. Use an airspeed sensor rather than relying on GPS groundspeed alone.

Hand-Launch Configuration

For hand-launched aircraft, ArduPilot includes a dedicated takeoff mode triggered by setting TKOFF_TYPE=1. The autopilot detects the launch through an acceleration spike on the IMU. Key considerations:

  • TKOFF_THR_DELAY: How long after launch detection before applying throttle (in tenths of seconds). A value of 2–4 (0.2–0.4 seconds) prevents the prop from striking your hand.
  • TKOFF_THR_MINACC: The minimum acceleration (m/s²) to detect a launch. Default 15 is usually fine; reduce to 10 for very gentle launches with large, light aircraft.
  • TKOFF_FLAPS_PCNT and TKOFF_ELEV_PCNT: Set neutral positions for hand-launch if your aircraft needs compensation for launch attitude.

Testing and Refining Your Takeoff

Always test auto-takeoff with manual override capability. Fly in FBWA mode for your first launch attempt, then activate AUTO mode once safely airborne. This gives you a fallback. Review the TECS and attitude log data from the takeoff phase specifically:

  • Check that TECS demanded climb rate (TECS.h_dem derivative) does not exceed TECS_CLMB_MAX immediately after rotation.
  • Verify that roll oscillations are not present during the initial climb — this indicates NAVL1_PERIOD is too low or the aircraft is marginally stable in roll at low speeds.
  • Confirm that airspeed never drops below 1.1 × stall speed during the climb-out. If it does, increase TKOFF_LVL_PITCH to flatten the climb angle or verify that TKOFF_ROTATE_SPD is adequate.

Once your auto-takeoff is repeatable, consider adding a geofence with a minimum altitude trigger that forces RTL if the aircraft drops below a safe altitude shortly after launch. This is a valuable safety net — a stuck or reversed elevator servo during a fully autonomous takeoff leaves no room for recovery without it.

Putting It All Together: An Integrated Tuning Workflow

Tuning TECS, L1, and auto-takeoff is not a one-and-done process. These systems interact: an overly aggressive L1 controller demands roll angles that bleed energy, which TECS must then compensate for. A too-steep takeoff climb angle can saturate TECS before the aircraft even reaches cruise altitude. The recommended workflow is:

  1. Establish baseline airframe limits. Determine stall speed, maximum climb rate, and maximum roll rate through manual flight testing.
  2. Tune L1 first. Without good navigation tracking, TECS altitude and airspeed data during waypoint segments is corrupted by sloppy path following. Fly a rectangle mission and adjust NAVL1_PERIOD until cross-track error is acceptable.
  3. Tune TECS in cruise. With L1 dialed in, fly a mission with altitude changes of 50–100 meters. Adjust TECS_TIME_CONST and TECS_CLMB_MAX until altitude and airspeed tracking meet your requirements.
  4. Configure auto-takeoff. Using cruise-tuned TECS and L1 settings, set takeoff parameters conservatively. Test and iterate one parameter at a time.
  5. Flight test with full auto mission. A complete mission that includes takeoff, waypoint navigation with altitude changes, and landing will expose any remaining interactions between the subsystems.

ArduPilot’s fixed-wing autopilot stack is extraordinarily capable. When tuned properly, a foam-board FPV wing can fly survey grids with the precision of a commercial UAS costing 20 times as much. The investment in methodical tuning pays for itself every flight hour.

About the Author

This article was written by the UAV Model technical team, drawing on hundreds of hours of ArduPilot fixed-wing flight testing across airframes ranging from 600g hand-launched foam wings to 15kg internal combustion mapping platforms. For more ArduPilot tuning guides and platform reviews, visit blog.uavmodel.com.

Leave a Comment

Scroll to Top