Repository navigation
feat(plots): gyro filter and rate controller analysis - #349
Draft
isak-aslund wants to merge 2 commits into
Draft
isak-aslund wants to merge 2 commits into
isak-aslund wants to merge 2 commits into
Conversation
Main page: the angular velocity spectrogram gets buttons for the gyro before and after filtering and draws the dynamic notch filters over time (per harmonic or per motor). New plots: gyro noise per axis before and after filtering with the notch ranges, filter magnitude and delay of the gyro and D-term paths, and gyro and accelerometer noise vs throttle. The notch positions come from gyro_filter_status, or are rebuilt from esc_status, sensor_gyro_fft and the parameters for older logs. PID analysis page: the step response is estimated from the averaged cross spectrum of setpoint and response over the whole flight, with the estimate of each window on request. Thrust moves to its own axis. Removes the PID-Analyzer module. Also fixes the raw FIFO gyro being plotted twice.
gyro_filter_status only holds the notch frequencies; the cutoffs, notch widths and static notches come from the parameters, the gyro and its sample rate from sensor_selection and vehicle_imu_status.
AlexKlimaj
approved these changes
Oct 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Flight Review doesn't show where PX4's dynamic notch filters were during a flight, the gyro before and after filtering side by side, or the filter delay, and the PID page step response often disagrees with the rate plot. This adds that, for RFC PX4/PX4-Autopilot#29065. It uses the new
gyro_filter_statustopic from PX4/PX4-Autopilot#29064; for older logs the notch positions are rebuilt fromesc_status,sensor_gyro_fftand the parameters.Existing plots keep their names and place:
Tested on PX4 SITL logs (SIH quadrotor with simulated motor vibration and per-axis excitation) and on older logs without the new topic; pylint 10/10. The step response estimate matches a simulated loop with a known response to within 0.033. This is one commit for review of the whole idea; it can be split into smaller PRs.
Created on behalf of Isak Åslund with Claude (Claude Code): plots, response estimator, SITL testing and write-up.