Yea, when you have the FFT graph in front of you the parameters make a lot more sense.
Dave, a dumb question, I only use this drone for autonomous mission, those configurations will only improve the auto flight right? I read about a lot of FPV players setting up this config, as my drone is a lot bigger than 5" propeller, this question came into my head.
It will potentially improve all flight. It can allow a tighter tune which is of benefit for all flight characteristics.
Hello Dave, I did what you said in your first instruction post, and there here is my log of pre-data filter:
OK, interesting data. So there are 4 peaks ~ center Freq and Bandwidth as follows:
150Hz (harmonic of 74Hz.
The 34Hz mode may be difficult to deal with as it’s approaching control frequency. I have this issue on a quad and don’t try to filter it but you could try a narrow BW static notch. The 74Hz mode and it’s harmonic can be dealt with using the dynamic notch. With current stable Copter there is only one dynamic notch so not sure what to do about the 106Hz mode. I say address the others 1st and see what the result is.
So this is what I’m thinking. Set these and make another hover flight. Andy @andyp1per may have some words of wisdom here!
Thanks Dave, I Will set your params and repost the hover log after notch.
Dave, I want to learn how did you get to this results, I know I can post here to ask someone to help, like you, but I really want to fully understand how this frenquency Works and how can I get the results as you did. Maybe I can help other people.
I didnt find the hover frequency and trust (CTUN.tho?) and most important how can I take the data from the graph like you did, the frenquency (I drink I know how) and bandwidth, and even how can I know witch frequency is harmonic of other.
This is what my Y6B looks like.
Athough the first harmonic looks innocuous it will really kill you because it is below most of the regular filter thresholds. So I think your suggestion is fine - or try and use the harmonic notch on the first and second harmonics and take out the upper one with a static notch. The Q gets scaled appropriately so if you have a BW of 17Hz @ 36Hz it will be 34Hz @ 72Hz.
Also don’t set you gyro filters too high
So Giovane, try the settings I suggested and let’s take a look at the post filter result. The Q effect on the harmonic I did not consider so that’s an interesting option. Easy enough to try both. I think your INS_GYRO_FILTER setting of 20 is good. This is what Andy was getting at.
Knowing some fundamentals about frequency domain data, shown in the FFT graphs, and filters would be a good start. I can go back to my Test Engineering days where I was doing experimental Modal analysis on structures to help me out. Some of it is quite the slog and I’m far away from my University days now.
In this marked up FFT graph I note the peaks in frequency (Hz) and the bandwidth (Hz) of one of the peaks as an example. A harmonic is a multiple of a fundamental frequency. The INS_HNTCH_REF value is taken from the MOT_THST_HOVER parameter value.
I did what Dave suggested and this is my results:
Is there any others tuning on filter or I can move to autotune?
It looks pretty good. You could go with that or make another test with Andy’s suggestion and see which one is better. I think there are 2 ways to go about it, here is one:
Dave, can you tell me the second way, becouse I have to go far from home to test, with Both suggestion in hand I can do both in a row and post Both at same time.
OK, here is another configuration with a bit different strategy.
Dave, this is my results:
Perhaps, sugg 02 is the winner.
I think so! This one is using the 1st 3 harmonics with the dynamic notch and the fixed notch for the upper peak. Did you have any sense of the feel of the craft while flying? I suppose not if it was just a hover. Before doing the Autotune fly it around to make sure you have good control.
This is what you accomplished today (quite a lot):
Dave, I only have to thank you and everyone who helped me, if I was close you, I surely buy you all a beer, thank so much.
I Will take this data and study to try understand how you guys managed to get those numbers, if you know any reading, would be very helpful. (Or any examples or instruction for you)
Lets leave this topic open, I Will show you my results after autotune.
About the feel, it is very sensitive, a small touch in pitch or roll, results in strong moviment of the drone, I feel it in altitude hold, perhaps in loiter would be smoothier, is that right?
Happy to help, this is fun stuff! I learn more from the experience.
I think it’s better that it’s sensitive than not. I was worried about the notch filter at 34Hz as I had trouble with that. But my problem was a very sluggish feel. Give Autotune a try I think!
Hello Dave, today I did autotune with autotune_aggr:0.075 and it is very smoothie, much better than before.
This is my log after autotune, check the FFT log, I sense a little raise of the frequencies.
This is looking good Giovane. The FFT looks great, don’t worry about a small change in amplitude the overall level is still very low. Tune looks good too. You have some undershoot on peak pitch/roll demand but not bad. I suppose you could try to increase the Autotune aggression slightly and try again or just fly it
Now that you done with the notch filters settings you can disable batch logging. The file sizes get large and you don’t need it for general tuning. Set INS_LOG_BAT_MASK and INS_LOG_BAT_OPT to 0
I did the autotune with 0.075 instead 0.01, becouse I want a smoothie drone, I really dont want abrupts moves, I think with this PID are good.
Now i’m going to do several tests in auto mode to check if my “yaw spinning” was corrected.