MAVLINKHUD

Overview

The SID parameter group configures the System Identification flight mode. This mode is used by engineers to mathematically model the vehicle's dynamics by injecting specific frequency sweeps (chirps) or step inputs into the control loops.

The data gathered during a SysID flight is used to calculate precise inertia, motor time constants, and aerodynamic coefficients, which can then be used to tune the PID controllers to a "Gold Standard" level of performance.

Key Concepts

1. Excitation Signals

  • SID_AXIS: Selects which axis to test (Roll, Pitch, Yaw, Throttle).
  • SID_MAGNITUDE: The strength of the injected signal (e.g., $deg/s$ for rate sweeps).
  • SID_F_START_HZ / STOP_HZ: The frequency range of the chirp signal.

2. Time Constants

  • SID_T_REC: Total duration of the test recording.
  • SID_T_FADE_IN / OUT: Smoothly ramps the signal to prevent sudden jerks.

Parameter Breakdown

  • SID_AXIS: Axis selector.
  • SID_MAGNITUDE: Signal amplitude.
  • SID_XY_CTRL_MUL: Safety multiplier to detune the position controller during the test.

Integration Guide

  • Preparation: System ID should only be performed after a basic manual tune is established.
  • Safety: Ensure you have plenty of altitude. The vehicle will twitch and vibrate aggressively during the sweep.
  • Analysis: Use tools like UAVVID or Matlab/Octave to process the DataFlash logs and generate a Bode plot.

Developer Notes

  • Library: libraries/AC_SystemID.
  • Mode: Triggered by switching to SYSTEM_ID (Mode 25).

SID_AXIS

Default 0
Range 0 19

SID_AXIS: System identification axis

Description

This parameter selects the specific control loop axis to be "excited" during a System Identification flight test.

Values

  • 0: None (Disabled)
  • 1: Input Roll Angle
  • 2: Input Pitch Angle
  • 3: Input Yaw Angle
  • 4: Recovery Roll Angle
  • 5: Recovery Pitch Angle
  • 6: Recovery Yaw Angle
  • 7: Rate Roll
  • 8: Rate Pitch
  • 9: Rate Yaw
  • 10: Mixer Roll
  • 11: Mixer Pitch
  • 12: Mixer Yaw
  • 13: Mixer Thrust
  • 14: Measured Lateral Position
  • 15: Measured Longitudinal Position
  • 16: Measured Lateral Velocity
  • 17: Measured Longitudinal Velocity
  • 18: Input Lateral Velocity
  • 19: Input Longitudinal Velocity

Description

System ID Mode is an advanced diagnostic tool used to measure the actual physical response of the aircraft to control inputs.

  • How it works: When you switch into System ID mode, the autopilot injects a "chirp" (a sine wave of increasing frequency) into the control loop selected by SID_AXIS.
  • Purpose: By logging the input chirp and the resulting motion, engineers can calculate the precise "Transfer Function" of the aircraft, which is used to create a perfect PID tune or a digital twin model.
  • Safety: Always start with small magnitudes (SID_MAGNITUDE) and rates (SID_AXIS = 7, 8, or 9) before trying angle or position loops.

SID_F_START_HZ

Hz
Default 0.5
Range 0.01 100

SID_F_START_HZ: System identification Start Frequency

Description

Frequency at the start of the sweep.

Values

  • Range: 0.01 to 100
  • Units: Hz
  • Default: 0.5

Description

This parameter defines the lowest frequency of the "Chirp" signal used during System ID.

  • Function: The chirp starts at this frequency and slowly increases until it hits SID_F_STOP_HZ.
  • Purpose: Low frequencies are used to identify the aircraft's rigid-body dynamics and long-term stability.
  • Tuning: 0.5 Hz is a good starting point for most vehicles. For very large, slow aircraft, you might reduce this to 0.1 Hz.

SID_F_STOP_HZ

Hz
Default 40
Range 0.01 100

SID_F_STOP_HZ: System identification Stop Frequency

Description

Frequency at the end of the sweep.

Values

  • Range: 0.01 to 100
  • Units: Hz
  • Default: 40

Description

This parameter defines the highest frequency of the "Chirp" signal used during System ID.

  • Purpose: High frequencies are used to identify the aircraft's fast dynamics, such as motor response, propeller inertia, and frame flexibility.
  • Tuning: 40 Hz (default) or 50 Hz is sufficient for most multicopters. For very large vehicles, you might stop at 20 Hz to avoid exciting structural resonances.
  • Warning: Do not set this higher than half of your SCHED_LOOP_RATE (Nyquist limit). For a 400Hz loop, stay below 100Hz.

SID_MAGNITUDE

Default 15
Range 1 50

SID_MAGNITUDE: System identification Chirp Magnitude

Description

This parameter sets the "Strength" of the excitation signal (the chirp).

Values

  • Units: Degrees (for angle/rate loops) or 0.0-1.0 (for mixer loops).
  • Default: 15

Description

SID_MAGNITUDE determines how much the drone will oscillate during the System ID test.

  • Effect: A larger magnitude provides a cleaner data signal (higher signal-to-noise ratio), which is better for analysis. However, a magnitude that is too large can cause the drone to hit its mechanical limits or become unstable.
  • Tuning Tip: Start with a low value (e.g., 5) to ensure the drone is safe, then gradually increase until the motion is clearly visible but the drone remains well within its flight envelope.

SID_T_FADE_IN

s
Default 15
Range 0 20

SID_T_FADE_IN: System identification Fade in time

Description

Time to reach maximum amplitude of sweep.

Values

  • Range: 0 to 20
  • Units: s
  • Default: 15

Description

This parameter defines the "Ramp-Up" duration at the beginning of the System ID test.

  • Function: Instead of instantly jumping to full magnitude, the autopilot slowly increases the magnitude of the chirp signal over this time period.
  • Safety: This gives the pilot time to assess whether the drone is handling the excitation correctly and to abort if the oscillations become too violent.
  • Data Quality: A longer fade-in ensures that any "startup transients" in the physics don't corrupt the analysis of the steady-state frequency response.

SID_T_FADE_OUT

s
Default 2
Range 0 5

SID_T_FADE_OUT: System identification Fade out time

Description

Time to reach zero amplitude at the end of the sweep.

Values

  • Range: 0 to 5
  • Units: s
  • Default: 2

Description

This parameter defines the "Cool-Down" duration at the end of the System ID test.

  • Function: After the chirp finishes its frequency sweep, the autopilot slowly reduces the magnitude to zero over this time period.
  • Purpose: Prevents a sudden, jerky stop of the aircraft's motion, which could destabilize it or cause stress on the frame. It ensures a smooth transition back to the pilot's manual control or the original flight mode's behavior.

SID_T_REC

s
Default 70
Range 0 255

SID_T_REC: System identification Total Sweep length

Description

Time taken to complete the sweep.

Values

  • Range: 0 to 255
  • Units: s
  • Default: 70

Description

This parameter defines the total duration of the System ID experiment (excluding fade-in and fade-out).

  • Function: A longer sweep time means the autopilot spends more time at each frequency, resulting in higher resolution and more accurate data for the System ID algorithm.
  • Requirement: You must have enough battery life and airspace to fly in one direction (or hover) for this duration while the test is running.
  • Tuning: 70 to 100 seconds is usually sufficient for a high-quality model.
  • Note: If the drone hits a fence or the pilot takes manual control, the test is aborted.

SID_XY_CTRL_MUL

Default 0.1
Range 0.05 1.0

System identification XY control multiplier (SID_XY_CTRL_MUL)

Description

This safety parameter detunes (softens) the horizontal position controller during VTOL System Identification maneuvers. When injecting chirp or step signals to model the vehicle dynamics, the position controller normally tries to fight these disturbances. Reducing its gain allows the test signal to propagate effectively while still providing enough position holding to keep the vehicle from drifting away entirely.

The Mathematics

$$ K\_{\text{effective}} = K\_{\text{standard}} \times \text{SID\_XY\_CTRL\_MUL} $$

The Engineer's View

Defined in ArduPlane/systemid.cpp.

  • Context: Only active during the SYSTEM_ID flight mode when performing axis sweeps.

Tuning & Behavior

  • Default Value: 0.1 (10% of normal gain)
  • Increase: If the vehicle drifts dangerously fast during SysID.
  • Decrease: If the SysID data is contaminated by the position controller fighting the test signal.