Repository navigation
Conversation
Sets up the first harmonic notch from the log. The tracking source is ESC telemetry if logged, then per motor throttle, then average throttle. The pre-filter spectrum of each FFT window is resampled against the tracked frequency and averaged, so noise that follows the motors forms peaks at multiples of the tracked frequency. This verifies the tracking: ESC is rejected if the largest peak is well away from a whole multiple of the motor frequency, which points to wrong motor poles. Harmonics whose peaks stand out from the local noise floor are notched, and the attenuation is set from how far the largest of them stands out. Frequency and bandwidth use rules of thumb, collected at the top of AutoFit.js.
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.
Adds an "Auto fit" button to the first notch that sets it up from the log: ESC telemetry first, then per motor throttle (then average throttle), with peak detection to verify the tracking and the noise floor setting the attenuation.
Method: the pre-filter spectrum of each FFT window in the analysis time is resampled against the tracked frequency and averaged. Noise that follows the motors adds up into peaks at multiples of the tracked frequency, and noise that doesn't is spread out.
These are all in one block at the top of
AutoFit.jsand are the main thing I'd like your view on.Tested on six batch-logged copter logs, with estimated noise above 30 Hz:
Known limitation: a fixed resonance that sits near a motor harmonic in hover can be picked up as a harmonic.