Vibrations - Hardware? or PID Tune?

My hexacopter has some pretty intense, high frequency vibrations after auto tune and I am having a hard time determining the root cause. Interestingly enough, the copter actually flies great and holds position really well. Its just vibrating like the energizer bunny and I want to clear it up.

As you can see - my vibes are borderline. I also notice that the actual pitch and roll tend to oscillate around the desired pitch and roll with some decent frequency - which look to me to be a tuning issue. Maybe too much D? This particular tune is straight from the auto tune. I dont recall it having the same vibration prior to auto tune - I had originally just dropped in some internet engineer’s PID values who had the same frame (s550), motors, and 4s that I am running and it flew OK.

I have re-balanced all of my props and confirmed no loose motors, props, etc.

Should I reduce my D term by 10%? 20%? Am I even correct to assume its a tuning issue let alone which parameter? Or should I be looking at my propulsion system?

Log file here cause its an absolute unit

Thanks in advance

EDIT: All of the above was done on a Cube that has since been returned and replaced. similar results have occurred with the replacement Cube as well. Posts with new Cube start here:

The pitch/roll vs desired looks pretty bad… I’d assume it’s a tuning issue.

Try lowering the auto tune aggr and do another auto tune. Or just jump in and start manual tuning… It’s not difficult if it’s flying. I start with large jumps, then fine tune from there. So if D is .004, go to .002 and see how it does. If it’s better, see if you can go to .003, etc.
I always have trouble telling if I should go higher or lower… Both cause similar results… Too low a D will let the P term oscillate, so too high or too low, you get similar oscillations when tuning D.
How did auto tune change it compared to the tune you were originally using?

My understanding was that excessive P would cause larger, slower, almost drift-like oscillations and excessive D would cause higher frequency, lower amplitude and more intense oscillations. I was interpreting both the feel of the copter in flight and the log as high speed oscillations.

Pre-Autotune:

Post-Autotune:

Autotune definitely pushed all values higher

Anyone else with more tuning experience care to weigh in here? I’m hoping to confirm my suspicion that D term is a bit too high (or not for that matter)

Finally got a replacement Cube flying. Auto tune yesterday resulted in the same results: flies smooth but a bit sluggish pre-autotune, then tight, responsive post-tune but vibrates like the feedback on a PS4 or X360 controller 100% of the time.
I can see this in the Des_Pitch vs Pitch and likewise for _Roll:

I did an FFT with batch logging today:

Significant spike at 100Hz - I assume a harmonic at 200Hz? Something in the autotune resulted in PIDs that are causing a 100Hz vibration.

Batch Logging, Post-Autotune flight

Autotune flight

That looks like motor noise. The question is whether it is hardware or software. Try putting a notch at 100Hz and see if that improves things, but also check motors and props for balance/alignment/bell movement.

I’m doing my homework on notch filters already. I’ve been trying to follow along your notch filter thread.

Can you help me understand motor noise a little more? How does this occur? feedback from the motor? Can I assume this is something that occurs with a particular mix of components/setup?

Im using Sunnysky motors which I have used with success in the past and I think are high quality. Admittedly, I am using generic run of the mill cheap ESCs.

Im pretty sure my props are balanced - I checked them when first setting up, but I will check again. How do you check balance of the motor itself anyways?

The frequency - 100Hz - is probably the motor RPM, so either the noise is from some mechanical problem related to the motor turning or it’s D-term feedback from the overall motor noise.

What filter settings do you have (INS_GYRO/INS_ACCEL/ATC_*_FILT)?

I was trying to fly around varying speed, throttle, banked turns, etc. Would the RPM really show up that cleanly at 100Hz? just seems odd that the hover RPM comes out to such a clean number.

I havent done any work with those yet - So I assume theyre still default.

image

image

here is my param file:hexhawk_070419_1.param (14.6 KB)

I did put Roll_kD on a knob on my transmitter to see if decreasing kD would help, but maybe I didnt give it enough range. I setup the knob for ±15% of the autotune value - didnt change much at the min.

I also tried the same with kI thinking maybe the controller was trying to straddle the target value too hard. kI does result in the equivalent value to kP in both Roll and pitch…

What motors (kv) do you have? The defaults are generally for a 3DR X4-type thing I think.

SunnySky X2212-13; 980kV

So I think it would be reasonable to raise the filter settings to about 50Hz for gyro, pitch and roll. That may make things worse by letting more noise through, but also may give the controller more headroom. So worthwhile as an experiment, but be careful!

So in your opinion, this doesnt look like a tuning issue?

Ill give 50Hz a try this weekend.

Autotune works pretty well for the the things it tunes. So either there is something needing tuning that it doesn’t touch (e.g. filter settings) or it’s hardware.

What happens if you graph the motor outputs? That might tell you where it’s coming from.

The FFT certainly seems like motor noise, but the pitch/des pitch really looks like oscillations to me… It’s almost a perfect sine wave on top of the desired pitch.

If the filters don’t fix it, maybe decrease D as another experiment and see what the graph looks like. I’ll admit, this is just a random guess. But I’d try it.

Showing all of them at once doesnt show well. here is one (RCOU.C11), but they all look about the same:

Seems a bit aggressive in the range, but idk if that is just the FC making adjustments. It does seem like any random motor adjustment is counter-acted with a sharp reversal of PWM; like overshoot. However, I dont know what to think of the range of 1500 to 1652 over this window. Is 150 a significant motor signal adjustment? How smooth (or not) should the motor output be?

I think I am going to give tuning the PIDs a shot before filtering and take larger steps. Maybe I just wasnt making a large enough change.

I tried without success to get rid of these vibrations today.

Here is what I tried:

  1. swept Roll_kP over the range 0.100 to 0.200 (Autotune value was 0.149). I was able to experience the change in parameter, but it had little to no effect on the vibrations. ATT_Roll look bad as ever.
  2. swept Roll_kD over the range 0.004 to 0.012 (Autotune value was 0.008). Again, I was able to experience the effect of kD. Again, this had little effect on the vibrations.
  3. tried increasing ATC_RAT_RLL_FILT and ATC_RAT_PIT_FILT to 50Hz. little to no effect in either the feel nor the log trace.

Is it possible that Dshot1200 is causing problems?

These vibes are pretty bad. My GPS swings around on some constructive vibration interference ~2"!

Here is a log file from today:

I didnt realize log while disarmed was turned on, so its all in one log file. Here is what I attempted at each takeoff:

EDIT: I just tried a little flight with Dshot300 instead of Dshot1200 - little to no difference.

  1. try once to fly in stabilize mode and see whether vibrations get better. You avoid therefor the impact of the altitude control.

  2. you can try to reduce the following values:
    ATC_ACCEL_R_MAX and ATC_ACCEL_P_MAX To 60.000 - 65.000 to reduce overshooting

  3. Most important, try once to improve the damping of the fc. VibeZ of 25 for hovering is not good in my opinion. I have max. 5-7 on several copters with hovering and max. 20 with full throttle/speed
    What frame do you have, please picture.

I was out flying/tuning/logging this afternoon, too. I just compared my logs from what I perceive as a good tune, with yours… My copter has no noticeable vibrations in the video… That’s about all I can go by.

Our logs look very similar. Yours might be slightly more jagged, but at the same zoom level, they look about the same. Your oscillations around desired roll look to be a higher frequency, but about the same amplitude as mine, and it’s not something I can perceive in flight. I’m not sure what this is worth, as we have very different copters… Mine is a little 120mm frame w/ 1402 motors, 2s battery.
In my previous replies to you, I didn’t notice the zoom level…

So, maybe tuning isn’t the issue… Sorry, i know I’m just confusing the matter at this point, so I’ll stop replying unless I get a more solid answer for you… But maybe your tuning isn’t that bad, after all.
It might help if anyone else can look at their ATT logs and maybe post a pic, so we know what’s normal…

Thanks Harald, I usually try both Stabilize and AltHold because I havent noticed a difference from the beginning. Ill look into the ACCEL parameters, thanks for the tip.

Im using a Cube, which ProfiCNC claims should be hard mounted due to its internal damping for the IMU. Frankly, I think its too heavy to mount the whole thing on vibration isolation. Based on the wiggle that my GPS generates while flying, I think additional vibration isolation for the FC would actually make matter worse.

I wish my vibes were lower, too, but I think theyre acceptable. X and Y average 5-7. Z is significantly higher and is likely exactly what we are trying to resolve here. I would prefer to eliminate the vibration rather than add vibration isolation.

Here is my copter: