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.
) Порядковый спектр относительно частоты ESC или газа, проверка кратности пиков, выбор гармоник и ослабления по превышению над шумом, правила PR без изменений; без DOM: результат и ошибки возвращаются, значения INS_HNTCH_* собирает auto_fit_values. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…очнение моторной частоты find_axis_peaks: пики ищутся на X/Y/Z отдельно и сливаются ближе max(2 Гц, 2 бина), у пика — список осей; окрестность пика без шума — не уже главного лепестка окна Ханна (2 бина); окно шума ±50 Гц (шире горбов гармоник, [наше]). Атрибуция: |freq/f − N| ≤ 0.1 порядка, N ≤ 8; refine_fundamental уточняет медиану ESC/газа по пику первой гармоники. Атрибуция по медиане — запасной способ до порядкового спектра PR ArduPilot#363 (задача 7). Тесты: слияние осей, два близких пика, −Infinity, ESC с нулевыми оборотами, FREQ = 0, уточнение основной (12 в tunewizard-steps.test.cjs). Дизайн, раздел 5 — новое правило атрибуции. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Автоподбор PR ArduPilot#363 на логе пользователя хуже текущих настроек (убирает третью гармонику: +14/+21 дБ на 153/235 Гц, +5 дБ по полосе 20–400 Гц). Шаг 2 оценивает несколько вариантов и рекомендует лучший, не хуже летавшего; атрибуция пиков — по порядковому спектру. Задача 7 разбита на 7a (ядро) и 7b (интерфейс); дефект 8 (NaN в линиях notch) — в 7a. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…у спектру core/candidates.js: варианты (лог, автоподбор, их сочетания, второй notch), оценка шума после фильтров на главных пиках и в полосе 20–400 Гц, задержка на 10/30 Гц, выбор лучшего не хуже лога. Атрибуция пиков по порядковому спектру PR ArduPilot#363 с медианой как запасным методом. Исправлен дефект upstream 8: NaN в трекинге убирал среднюю линию notch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ики, .param steps/step2.js: при первом показе — автоподбор PR ArduPilot#363, варианты notch_candidates (+ второй notch), оценка evaluate_candidate и выбор rank_candidates; таблица вариантов с уровнями на пиках шага 1 и пиках «после», полосами 20–400 Гц (и с весом f²) и задержкой 10/30 Гц с разницей к логу, пометкой «рекомендуется» и причинами отказа; вердикт «менять не нужно» / рекомендация / неполная оценка; таблица гармоник порядкового спектра ESC. Форма INS_GYRO_FILTER, SCHED_LOOP_RATE, INS_HNTCH_*, INS_HNTC2_* по метаданным FilterReview (load_param_inputs): «в логе: …», .changed, выключение полей по ENABLE, ESCMSK с версии фильтра 4, маска HMNCS 8/32 бит. «Применить вариант», «Подобрать заново» (варианты помечаются устаревшими при смене интервала), «Пересчитать фильтры» (строка «Текущий»), «Сохранить/Загрузить .param», «Принять» → state.steps[2] и шаг 3. Графики через реестр: спектр с линиями notch (shapes из notch_line_stats), бодэ амплитуда/фаза со свёрткой, спектрограмма с линиями notch формы. Передаточная функция значений формы считается отдельно (filter_transfer), FFT.H шага 1 не меняется. Тесты: браузерный прогон шага 2; сверка с FilterReview — бодэ (обе шкалы фазы) и оценка «после» с параметрами лога. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Previous review (2026-11-09)Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting. Reviewed at head The auto-fit works on synthetic spectra and lints cleanly; there are no blockers, but a few things should be fixed before it leaves draft. Should fix
Lower priority
Minor (2)
|
Throttle fits now set a single average throttle notch, matching how the frequency is fitted, rather than a per motor notch fitted to the mean throttle. Warn if the notch needs more filters than F4 boards allow, reject a mean throttle that rounds REF to zero, run in the loading overlay and clear the result text on reset or a failed fit.
|
Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting. Reviewed at head Most of the previous round is fixed at 110f578, but one new should-fix problem was found in the throttle fit, along with a couple of smaller ones. Since c46ecf4, the per-motor throttle bias, the missing loading overlay, the stale status label and REF rounding to zero are all fixed, and the notch-count warning now catches the octa case. Should fix
Lower priority
Minor (2)
|
Only take a peak that is the maximum of the window its height is measured over, so a nearby noise maximum cannot borrow the real peak's height. Scale FREQ to the rounded REF. Count notch filters over the IMUs in use and include the second notch. Only enable Auto fit after a log loads.
Adds an "Auto fit" button to the first notch that sets it up from the log: ESC telemetry first, then 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:
If the notch needs more filters than F4 boards allow (24), the result says so.
Known limitation: a fixed resonance that sits near a motor harmonic in hover can be picked up as a harmonic.