Tuning the Harmonic Notch

Yeah, my new auto-tune results are about the same as my manual tuning… and I could definitely not take them any higher. But auto-tune in the past gave me very poor results on small copters. The PID’s were so low, I couldn’t control the copter. Now, it seems ok. But I don’t know if that’s only because of the new notch, or other changes have been made since I auto-tuned it a year ago.

My FFT looks better than when I had a static notch configured, too… I had a flat FFT on hovering w/ the static notch, but if I flew around and used the full range of throttle, there would be peaks on either side of the notch. With the dynamic/harmonic notch, it’s obviously moving the notch as it should… Using the same settings for bandwidth and attenuation, the FFT is completely flat after a flight.

to post here - so far results are quite positive, as a 4" gecko model i play with now has quite excessive vibrations, so, it was a good candidate to test this feature on. this filter feature definitely improves movement stability, very good improvement. just too bad the logging still extremely glitchy on the kakute f7 mini - i still fail to get logs reliably, but, for those flights i got them it shows an improvement compared to the flights with no filter.

Sorry for OT, I think the problems of gltichy logs is common to FC without SD that must use block based logs, I have the same problems with revo-mini

And same problem here w/ omnibus nano logs.
Hoped to get one yesterday… All it showed me was an unreadable 256 byte file. Other times it says “NaN”, other times it says I don’t have any logs, etc…
What seems to work every time is disable logging, reboot, enable logging, go to dataflash logs and clear the logs. Then have a flight… You should get a log. But maybe not for the next flight.
It doesn’t take long to fill the 16 meg flash, especially when logging for FFT’s… so I think it’s an issue w/ the flash becomming corrupted (or something) when the logs fill.

I didn’t have any time for ‘testing’ today, but did have a few minutes to spare for a flight… So rather than being cautious and focused on looking for issues, etc, I just flew for fun. And wow, it’s great! Smooth. Responsive. Completely in control. Not much prop wash on descent. I was always comparing ardu to betaflight in my “microarducopter” thread a year ago, and now there is no comparison… This is better.
I’d even say easier to set up a new copter than betaflight, if you have ESC telemetry, with this new notch filter.
Basically just install firmware. Do the initial setup of rc and failsafe, etc. Change a few filter values for small copters. Then auto-tune. Done…

If we added a “presaved” set of parameters for small copters to MP, which would automatically set the filters, and with slightly lower PID’s, it would be very easy for small copter/racing people to get started w/ arducopter.


We can do that! Let’s decide on a parameter list and I will get it added to the options on Mission Planner!!


Last OT post:
do you think it’s appropriate to open an issue for problems on flash memory (block based) logs?

You can raise it, but without a reliable repro I suspect it won’t get worked on :slight_smile:

@anbello I still think you should raise it should, we can at least collect our experiences and get some attention from @tridge

hi, is the PR from Leonard in the master now or not yet? i wanted to recompile my build it after it was added.

No not merged yet, https://github.com/ArduPilot/ardupilot/pull/12759 - I guess you can cherry pick it like I did

yes, please raise issue. What we need to do is to narrow it down to being a driver issue for the flash, versus a software issue for the flash storage layer. To do that we need to write a test suite that writes/reads blocks in a predictable fashion, reporting any errors. We can then run this test suite against the SITL flash emulation and against the real hw, comparing results

Maybe I have to add more details. Let me know.

Yes, I would suggest that anybody with these boards having these issues post the details of the boards so it can be reproducible. This is the number 1 thing that helps Tridge fix these problems. Anybody that can test to see if this is fixed is also really helpful.

(I just realised this reply is a bit late :grinning: )

My writeup is now published: http://ardupilot.org/copter/docs/common-imu-notch-filtering.html
I have updated the link on the OP


@Alberto_Ds can we continue the discuss here as it relates to notch tuning?

MOT_HOVER_LEARN = 2 and reading off the value of MOT_THST_HOVER will give you a value for INS_HNTCH_REF but it will not give you the hover frequency, you need an FFT for that (or something that can tell you the frequency directly). One option might be to record the noise of you hovering and use an iphone app to tell you the dominant frequency. This works pretty well for props if you flip them with your nail, but not sure how well it would work for a copter in the air. You could try :slight_smile:

I have put a build for the omnibus f4 pro with my changes in https://www.dropbox.com/s/jwmu0i4avflz1po/arducopter.apj?dl=0

@andyp1per I tested your last version of branch small-copter-4.0 and now it writes the right values for learned values of FFT_FREQ_HOVER and FFT_THR_REF other then makes my copter really stable :slight_smile:

Nice! Really super happy.

Holybro just sent me 2 Durandals, I’m going to start testing FFT on those :smiley:

I’m already flying a H7 - the Orange Cube. Did the notch tuning and I’m running at default loop rates. When you get the Durandals, maybe you can teach me how to best put the 400 MHz at work.

After tuning, it flies like a hot knife through butter, with a small exception: when I stop a fast descent in Stab it does what’s best described as a pair of in-place toilet bowls, but I bet that’s caused by the BlHeli_32 management of sudden acceleration from low throttle.

Yes sure! :slight_smile:

your version of arducopter fw is already on my quad, but I have to solve the problem of hovering frequency. A friend of mine could give me this, could it be a solution to have a log?

You don’t need to solve the problem of hovering frequency if you have my fw.

INS_HNTCH_REF=hover thrust (this is probably not necessary, but can't remember)

And see how it goes. The rest of the defaults are probably good enough. If its working it will learn the hover frequency and throttle reference for you and set FFT_FREQ_HOVER and FFT_THR_REF. You could then use this to configure the throttle-based notch, but why bother if the FFT is working for you.
It will also learn FFT_BW_HOVER which you could use to set INS_HNTCH_BW