Not all the vibration data is recorded but I suspect vibrations are a bit too high as IMU2 is clipping.
See if there’s anything physical you can do to improve vibrations. This is time well spent, and there aren’t parameters to “fix” vibrations.
There’s quite a bit of weight bias towards the front of the copter, see if you can balance it better.
This affects the noise and how the harmonic notch filter is set up too, since currently you’ve got noise peaks at both 50Hz and 60Hz (approximately) due to the two different motor groupings.
If the COG cant easily be fixed you will have to strive to set up DSHOT properly so we can set the notch filter for per-motor notches.
At the moment the notch filter is not even working.
How everything is now (without the physical fixes), these are the correct notch filter settings:
INS_HNTCH_MODE,1
INS_HNTCH_BW,25
INS_HNTCH_FREQ,50
INS_HNTCH_FM_RAT,0.7
INS_HNTCH_HMNCS,3
INS_HNTCH_REF,0.18
INS_LOG_BAT_OPT,4
Set better logging:
LOG_BITMASK,180222
You dont have DSHOT working, so that would be handy to get going and see if you can set up the ESC/DHSOT telemetry too.
Until then, set this:
MOT_PWM_TYPE,0
There’s two options for setting up DSHOT
- use the BDSHOT firmware and move the ESC wires to AUX outputs, you’ll have DHSOT with RPM
- set BRD_IO_DSHOT and connect the ESC telemetry wire to a serial port RX pin.
Then the harmonic notch filter can use the ESC RPM instead of throttle, plus you have extra data in logs for any diagnostics.
If you get ESC RPM data in the logs then you can set these for the harmonic notch filter:
INS_HNTCH_BW,10
INS_HNTCH_FM_RAT,1
INS_HNTCH_FREQ,40
INS_HNTCH_HMNCS,3
INS_HNTCH_MODE,3
INS_HNTCH_OPTS,2
INS_HNTCH_REF,1
Stability
It seems the motor output oscillations started in RTL and grew to continue in Loiter, as you said. The motor output oscillations only slightly affected the pitch and roll. Since RTL and Loiter are similar with regard to controlling the copter, I suspect this means the instability was not related to the flight mode but maybe the ESCs were overheating or something like that - unsure.
If they are BLHELI32 then set these in the ESCs using the BLHELI32 config app:
- Low RPM Power Protect = OFF
- Low Voltage Protection = OFF (rely on the flight controller battery settings)
- Temperature Protection = 90
- Motor Timing = Auto
If they are AM32 then there should be similar settings and a slider for the motor KV.
Since you dont have DSHOT working, you should do the ESC calibration as per the link below 9at the bottom)
Then I would go back to fairly standard/working PIDs and accels to see what the copter is like with the correct notch filter settings, and go from there - dont forget the physical fixes first!
Use AltHold and then Loiter for the test flights.
ATC_ACCEL_P_MAX,78000
ATC_ACCEL_R_MAX,78000
ATC_ACCEL_Y_MAX,22500
ATC_ANG_PIT_P,13
ATC_ANG_RLL_P,11
ATC_INPUT_TC,0.20
ATC_RAT_PIT_D,0.006
ATC_RAT_PIT_I,0.12
ATC_RAT_PIT_P,0.12
ATC_RAT_RLL_D,0.006
ATC_RAT_RLL_I,0.12
ATC_RAT_RLL_P,0.12
Keep Rate P and I values the same when doing manual tuning. Hopefully if everything gets fixed you wont need any manual tuning.
https://ardupilot.org/copter/docs/esc-calibration.html#semi-automatic-esc-by-esc-calibration