Servers by jDrones

Tuning the Harmonic Notch

This is a thread to discuss harmonic notch tuning in Copter 4.0 including throttle-based, ESC telemetry based and my FFT harmonic notch PR.

The current docs are here:
http://ardupilot.org/copter/docs/common-imu-notch-filtering.html

And some some good existing discussions are here:




@wicked1 @Paul_Atkin1 @bnsgeyer @anbello would it be ok to continue the discussion here so that we can collate people’s experiences?

1 Like

I just want to mention, this notch implementation is working well!
I did an autotune this afternoon, and it definitely increased my PID’s from the last time…
On my 2s, 1402 motors w/ 3" props I got .11 for P and I, and .003 for D. Previously autotune put them at about .06 P&I and .001 for D. I had control issues w/ the previous auto-tune results, and had manually tuned them up to about .09 P&I, .0015 for D. Now autotune gives me great results. (This is comparing 3.6 auto-tune to 4.0 w/ the harmonic notch… And I believe I had my D term filters at about 40 for the last tune, and now they’re at 80).
Arducopter is working great on microcopters!
I might try the notch on my big 16" prop copter next to see what it does there…

1 Like

Nice! And @Leonardthall has fixed my leans so I will post another update tomorrow.

You mean I term build up before take off.

1 Like

@anbello @wicked1 I have updated my small copter branch against 4.0rc2 and picked @Leonardthall 's fix. It also includes the ref/freq learning. I have also done a build for nano v6 in the normal place. Not flown it yet so Caveat Emptor.

1 Like

I hadn’t found time to do an autotune anyway After applying harmonic notch manual tuning get me similar values for PID with a similar copter.

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.

3 Likes

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

2 Likes

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

4 Likes
Servers by jDrones