Servers by jDrones

Autotuning with high vibrations led to a crash

Hey Guys,

We conducted a position-hold autotune today and it did not go well. Followed the instructions in the Wiki, but after landing and taking off again it seems like the PIDs caused a crash.

I thought I tested the autotune PIDs by switching CH8 to low and then back to high - and it felt good there so I landed to save PIDs. Then when I took off again - it oscillated on pitch and crashed. Any help would be appreciated!

https://drive.google.com/drive/folders/1VMmz7rN_T9OLSWrEtcsTyVcgyIaVdyqX?usp=sharing

Could have been vibes - as those were clipping a bit. But we thought it would be fine.

Vibration. Fix the vibration.

1 Like

Z vibrations are getting too bad and there’s definitely lots of clipping - no doubt that will be a contributor.
Definitely fix the vibrations before flying again.

Autotune came back with some really low PIDs for both RAT and ANG. that will mostly be because of the vibrations I think.
I would put back the previous values, since it worked OK.
ATC_ANG_RLL_P,4.5
ATC_ANG_PIT_P,4.5
ATC_ANG_YAW_P,4.5
ATC_RAT_RLL_P,0.13500000536441803
ATC_RAT_RLL_I,0.13500000536441803
ATC_RAT_RLL_D,0.003599999938160181
ATC_RAT_PIT_P,0.13500000536441803
ATC_RAT_PIT_I,0.13500000536441803
ATC_RAT_PIT_D,0.003599999938160181
ATC_RAT_YAW_P,0.18000000715255737
ATC_RAT_YAW_I,0.017999999225139618

Test fly with this change too:
INS_GYRO_FILTER,26
Just see if it will launch and is reasonably stable. If it’s not the same as before you can set INS_GYRO_FILTER,20 and make it 26 after the harmonic notch filter and retest.

If it’s flying OK, set up the Harmonic Notch filtering before running Autotune again. Read up on how to do that, or just do each “phase” and link to the .bin file and we’ll take a look.

HNOTCH phase 1
INS_LOG_BAT_MASK,1
INS_LOG_BAT_OPT,0

  • ALTHOLD hover test for more than 1 minute, check FFT

HNOTCH phase 2
INS_HNTCH_ENABLE,1 <- set then refresh params to see the rest
INS_HNTCH_MODE,1
INS_HNTCH_REF,{hover_thrust}
INS_HNTCH_FREQ,{peak freq from FFT}
INS_HNTCH_BW,{peak_freq / 2}
INS_HNTCH_ATT,40
INS_LOG_BAT_OPT,2

  • hover & dynamic test, check FFT results, adjust FREQ and BW if needed, retest

HNOTCH phase 3
INS_LOG_BAT_MASK,0
INS_LOG_BAT_OPT,0

  • no extra logging, assumes HNOTCH is working great

EDIT for a bit more clarity (maybe)

2 Likes

Thanks all. It seems like vibrations are the cause. Will go through and start with older rates and values.

I have done the notch setup stuff on a different aircraft before - but I’ll be sure to pose any questions here.

Now we just need to figure out where these vibrations came from. As you can see on our successful flight log, the vibrations are much lower. If we can get them back to those values - are we good to continue with tuning?

Just one more quick question! Any idea why switching ch8 to low and then back to high didn’t let me test the new PIDs. I am assuming that probably would have allowed me to save the aircraft by quickly switching to old PIDs.

Any info regarding why I wasn’t able to test new PIDs would be greatly appreciated. Want to make sure I do everything correct on this next run through. As far as I can tell - I ran everything according to the wiki.

I haven’t tried that method for years, I guess it would work if done correctly. With the anxiety of running autotune it’s much easier and way more reliable to leave it in Autotune mode, don’t touch anything, just reposition, land and disarm. Wait a few seconds.
Then arm and test.

1 Like

Hey All,

Was able to get the bird up earlier today.

Here is what I found when I ran alt hold for 1 minute:

It is an 18" propeller X8 - so I was expecting the frequency to be much lower around 100? What should I set the values to for Phase 2?

Hey All,

I went with my gut and put in the frequency as 105 and BW as 50. Here are the post-fft graphs.

I don’t know why there is something peaking at 200Hz though - still trying to figure that out. But besides that I think it looks good.

1 Like

That is probably OK. Have you got a bin log of it flying now?

Assuming you are talking about the accel results there isn’t anything you can do about it with the Notch filter anyway. Not much point in showing accel FFT actually if you are just tuning the notch filter.

Flew and autotune went ok. I verified PIDs from another similar aircraft before launching with the autotune PIDs.

Z vibes are still high - really no idea why. Got to clean up the wiring in the middle a bit. I will post log when I am back at my desk.

So I understand that - but the peak seems to be on the gyroscope graph as well.

Thought you meant post filter. Harmonic of the ~100Hz mode on Gyro.

Yeah that makes sense. I just wasn’t expecting the harmonic to have a higher amplitude than the base of 100ish Hz.

See logs from two flights here: https://drive.google.com/drive/folders/1s0eGe-YYP5ii7cBlnnwCf556lHT777_0?usp=sharing

One log shows a roll autotune at the end. These new roll PIDs were then transferred to Pitch PIDs for the second flight (second log). Aircraft feels solid now when it comes to PIDs - but as you can see Z-vibrations are TERRIBLE. Need to fix them asap. I have a couple thoughts:

  • Replace All Propellers
  • Tidy Up Internal Wiring

If the first two don’t work - I will use another plate I have cut and stack it with the bottom plate to double the thickness of the bottom CF plate. This should hopefully make it stiffer - if my airframe is causing the vibration issues. Any other thoughts?

Note: I didn’t end up setting INS_GYRO_FILTER to 26 - can do that later but am mainly focused on vibes now.

What frame is this and how/where is the FC mounted? I ask this because an X8 I was helping out with initially had the FC mounted on a sub-plate.PDB above the top plate and this just didn’t work. Removing that plate and mounting the FC directly to the top plate made all the difference.

Custom frame (but similar to another custom frame that I made last year that had low vibrations <10). I am using a Kore Carrier Board that is mounted directly to the bottom center plate (via some small standoffs).

You may be right then that higher rigidity on the bottom plate would improve things.

I have to chuckle though at the note about the core board “reduce the rat’s nest of wires”. That’s why my friend used a PDB that his CUAV Nora was mounted to. It did look clean but the “rat’s nest” proved to be more effective after getting rid of the board.

I’m in no way suggesting this is relevant for your craft just an anecdote.

Haha - yeah. I have had good luck with the Kore Board on previous aircraft. One of my 18" X8 is a pretty tighter center module build so I needed to be as compact as possible for that one. Vibes on that go no higher than 15 - so I am pretty sure it has something to do with all the ESCs surround the board (maybe moving around too much). Or we just cut out too much material on the bottom board and need to make it stiffer. Will do some testing this upcoming Tuesday and will report back.

Servers by jDrones