Okay, it’s not fully finalized yet. I’ll sort it out and upload it later. Thank you all so much for your help. After applying the ESC RPM script, the motor RPM is now back to normal. We can now really focus on how to filter out the waveform peaks more cleanly without introducing excessive latency.
I did a hover test and checked the spectrum in the Filter Review Tool (as shown in the figure). There are four prominent peaks at 37 Hz, 43.53 Hz, 75 Hz, and 95 Hz. A clear pattern can be seen:
75 Hz ≈ 2 × 37 Hz, and 95 Hz ≈ 2 × 43.53 Hz.
Evidently, 75 Hz is the second harmonic of the 37 Hz peak, and 95 Hz is the harmonic of the 43.53 Hz peak.
For a 2-blade propeller:
These two rotational speeds correspond exactly to the speeds of the two sets of diagonal motors. In other words, these two fundamental frequency peaks are precisely caused by the rotation of the two pairs of diagonal motors.
From the spectrum plot, this airframe is very well-built; almost no fuselage resonance is visible.
I set the notch filter center frequency to 37 Hz with a bandwidth of 1/4(9.25HZ), and the filtering performance turned out excellent. I even raised the low-pass filter cutoff from the recommended 22 Hz all the way to 45 Hz, while still maintaining great filtering results.
I also enabled Multi-Source, which essentially deploys an independent filter for each motor. When I set the notch filter center frequency to 37 Hz, I could clearly see the dynamic notch filter not only tracking 37 Hz, but also automatically locking onto and filtering the 43 Hz peak.
However, I’ve run into a question now — I think I may not fully understand the parameter INS_HNTCH_HMNCS.
My previous understanding was that this parameter controls how many harmonic orders the notch filter tracks and suppresses. For example, if I set INS_HNTCH_HMNCS = 7 (meaning track the first 3 harmonics), with a fundamental center frequency of 37 Hz, the filter should attenuate peaks at 37 Hz, 74 Hz, and 111 Hz.
Meanwhile, with Multi-Source enabled, the other set of diagonal motors runs around 1300 RPM, so a second set of filters should automatically detect the 43 Hz peak and also track its three harmonics: 43 Hz, 86 Hz, 129 Hz. (Note: 43 Hz cannot be configured independently in Notch 1 unless we enable a separate Notch 2.)
To save bandwidth and minimize latency, I chose to only use Notch 1. That was my understanding of INS_HNTCH_HMNCS, but it may be incorrect. Theoretically, it should accurately filter all four peaks: 37 Hz, 43 Hz, 73 Hz, 95 Hz,111HZ,129HZ.
But the actual spectrum does not behave this way. In the Show Notch view:
the solid black lines are, as I understand it, the filter center frequencies, and the shaded areas are the effective filter bandwidth ranges.
With my current settings and Multi-Source enable, there should theoretically be 4 motors × 3 harmonic orders = 12 active filter notches. However, the plot only shows three solid lines, with center frequencies at 37.63 Hz (matches my setting), 41.59 Hz (not as expected), and 63.37 Hz (also not as expected).These frequencies show no obvious pattern at all.Meanwhile, I can only see eight filters taking effect in the time domain.As shown in the figure
This discrepancy between theory and real-world performance has puzzled me for a long time. I hope with everyone’s help this time, I can fully understand the entire filter principle thoroughly, so I can apply it properly next time.