Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AP_InertialSensor: fixed Q calculation for notch filters #28765

Open
wants to merge 2 commits into
base: Plane-4.5
Choose a base branch
from

Commits on Nov 28, 2024

  1. AP_InertialSensor: fixed Q calculation for notch filters

    when doing the init() we must use the reference frequency, not the
    current frequency. Using the current frequency leaves us with an
    incorrect value for Q. If the current frequency is below the reference
    frequency (which shouldn't happen in 4.5, but has been seen in 4.3)
    then the Q can be much too low and massive phase lag can happen.
    
    The vulnerability in 4.5.x is that the current frequency could be well
    above the reference frequency. For example, the user may be doing a
    motor test at 30s after boot, which is when we stop the
    sensors_converging() test, and thus is the last time we call
    init(). In that case we can end up with a Q which is much larger than
    the one that should come from INS_HNTCH_FREQ and INS_HNTCH_BW, and
    thus end up with a filter that produces a lot less attenuation than is
    desired, potentially leading to instability due to high noise.
    
    There are other scenarios that can cause this - for example a motor
    test of a fwd motor at 30s after boot, or a spurious FFT peak due to
    someone knocking the aircraft, or the vibration of a IC engine.
    tridge committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    fa828a7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0984dce View commit details
    Browse the repository at this point in the history