For the sake of clarity with the new data, I’m starting a new thread about this.
Doing initial tuning, I enabled RPM based Dynamic Notch Filter. With it enabled the copter had an odd “clicking” sound - as if a prop were out of balance. I presented this on a thread yesterday.
It was noted that I neglected to set the INS_HNTCH_REF parameter to “1” so it was unpredictable what the firmware was doing.
I corrected my mistake setting INS_HNTCH_REF=1 and did another test flight. The test flight produced the same “clicking” sound.
To be safe, I reset all the initial tuning parameters again:
Then I conducted another test flight - and made a video. In the video you can see that the copter is oscillating in yaw - and appears to be what’s causing the clicking sound. Here’s the video:
I then disabled the Notch Filter and flew another test. The oscillations are gone. I made a video to show this:
I don’t know if I’ve made mistakes in setting parameters - or if there’s some sort of bug.
Here’s the bin file from the flight with the notch filter enabled - and the yaw oscillations.
Here’s the bin file from the flight with the notch filter disabled - and no yaw oscillations.
In anycase, the key question here is that the notches affect the tune. The notches and tune are two sides of the same coin, they should be setup to complement one another. After all if the notches did not affect the tune we would not bother setting them up at all. Filters reduce noise but they also add phase lag, to much filtering can be just as bad as too little.
As a novice at this, I need help identifying where to set the notch parameters.
Using the BIN file from the test flight without the notch filter enabled, here’s what the Filter Review program shows: (using the linear scale for greater clarity)
I had set INS_HNTCH_FREQ to “80” because that’s where the first big peak exists. If this is wrong, what would you suggest?
Also - if it’s a matter of too much filtering, should the value of INS_HNTCH_ATT be reduced from it’s default of 40?
Is there a way I could have seen this problem of the filter not matching up with the noise using the Filter Review program after selecting RECALCULATE FILTERS?
Lastly, which options for INS_HNTCH_OPTS would you recommend? Reading the WIKI, it seems like “MULTISOURCE” would be something to select. Would you recommend any of the other options?
Y axis vibrations are very high in that log with oscillations. unsure why, usually it’s prop balance.
There wasn’t actually any yaw oscillations, but just the Y axis vibrations were giving that visual effect.
Here are the ArduPilot Methodic Configurator files for your vehicle. It includes the recommendations from @xfacta and I improved some of the other parameters.
Thank you @amilcarlucas - you’re very kind to take the time for this.
The results are certainly comprehensive. And the notch filter settings are just slightly different than the values suggested by @xfacta
Since I haven’t worked though the documentation and implementation of the Methodic Configurator, I don’t know what to do with these results.
And it appears like this utility is making assumptions on setup. For example, it looks like something is setup to calibrate the magnetometer. I make test flights and use MagFit in MavExplorer. I doubt I’ll change.
I really do appreciate the work you’ve done - and this effort you’ve made on my behalf. I promise I’ll take the time to go through the process of installing, learning and understanding the Methodic Configurator when I have time. Some documentation that helps orient someone on using the tool would go a long way - especially some video presentations.
In the mean time - I’m still waiting for @xfacta to respond to my question about why his results on the Filter Review show a wider “grey” area around the notch than mine - so I can make sure I can follow his suggested values precisely.
I have video’s uploaded on YouTube that show this - but the graph pretty much shows it. It may be an X-axis vibration - but visually it appears as a yaw oscillation.
I don’t know if this suggests other parameters need to be set due to interdependencies - or some sort of bug in the firmware.
Assuming Shawn’s suggested settings are correct, my only option at this point is to disable the harmonic notch filter.
If I’m making a mistake in setting some other parameters, I’d appreciate help in finding those errors.
If my parameters are correct, then perhaps this is something the DEV’s might want to take a look at.
You have output oscillations on the servo outputs. Your PIDs are causing them. You can reduce the PIDs or you can use a configuration tool that removes guesswork.
I’ve been following the traditional methodology of following the initial tuning guide. Once stable flight (non-oscillating) is achieved, set the notch filter, then do an auto tune.
In my case, setting the notch filter created oscillations.
So I went back to the WIKI and followed the WIKI’s instruction in initial tuning about oscillations, and reduce pitch and roll PID’s in half.
I conducted a test flight with these new PIDs, and the copter was stable. I ran the Flight Review tool on that test flight’s BIN file and obtained new settings for the notch filter.
I then enabled the notch filter and did another test flight - and the copter is still stable. The Filter Review charts now look correct.
The take away for me is that a notch filter may produce oscillations if the PID’s are too high.
For a new quad, using the Initial Tune Parameters function in Mission Planner, need for PID correction wouldn’t ordinarily be uncovered until doing an auto tune.
It might be helpful if the WIKI had some information about how to identify initial PID’s that were too high or too low other than observing copter oscillations.
The Initial Tune Parameters are pre-1st flight settings that may get it in the air long enough for some data to be collected. Of course you would do a log review right after this 1st flight and look for high levels of vibration and output oscillation. How else would you know? You can have high output oscillation and on some craft not hear or see it. This is all well before Auto Tune unless you like to see error messages that say Failure To Level, Tune Manually…
I try to follow the methodology in the WiKi. Even though I’m not new any more, I spend a lot of time trying to support others who are new.
The Tuning Guide in the wiki doesn’t say anything about checking the logs for oscillations after a successful maiden flight. It only says to reduce the PID’s if visible oscillations occur.
And there’s nothing in the WiKi that says that enabling a notch filter may cause changes in the PID settings.
Or maybe I just missed those WiKi entries - absolutely could happen.
Like so many things, it’s easy once you know how. I worry about the people who don’t know how - and find all this very difficult.
In an earlier comment from @xfacta he recommends setting INS_HNTCH_FREQ=50 and INS_HNTCH_BW=10. When I plug these values into the Filter Review tool, the estimated values for X, Y and Z axis amplitudes are all slightly higher than what my present values are from my last test flight.
The copter’s flight is stable, but a bit sluggish. I think I’m ready for Auto Tune.
Now you can start the real Tuning Process. Once you drop the Notch BW that is, 40Hz is way too high for Multisource. Use the Filter Review Tool’s Estimated Post Filter and use the minimum BW that does the job. Try 15Hz. “Slightly higher” when it’s already in the mud is of little consequence.
Where can I find information on how to set bandwidth? And why “multisource” might need a lesser value than if using other options?
Addendum:
I used the Filter Review tool to compare my post filter results using BW of 40hz with your suggestion of 15hz. Here’s what the filter tool reports for the comparison:
Yea, looking good. It’s helps to show the tracking bands. I suppose I would try these and make another flight and see how it actually works. Not much different than what you have:
Before running Auto Tune I would re-asses the PSC_ACCELZ,P/I parameters relative to your Hover thrust value (0.13) and also review this as they are at default: Setting Motor Ranges
Regarding the sluggishness you feel that will be from a combination of the ATC_ANG_P/R and the Rate PID’s you lowered being too low. No worries though as Auto Tune will fix this if the general tune is decent and it appears to be now,
The point about Phase Lag is important in general with the Notch Filter configuration. It’s why the smallest footprint that will get the job done is the what should be considered.
I’ve just done a flight test down to battery failsafe - 20% amperage remaining. I was pleased to get a little over 16 minutes on my 2800 mAh pack. I’ll change the BW to the WIKI’s suggested 10 (1/4) and do another test.
It’s a little breezy today - and the copter floats around a bit. I might bring the PIDs up a bit before attempting auto tune.
Addendum - actually - I had BW set to 15Hz on this last test flight. Here’s the log:
And I believe I had read this page before - I remember the thing about using hover rpm to set the base frequency. I just don’t remember the warning note about bandwidth.