Use this spreadsheet to fix up a few of your parameters, pay close attention to the FLT parameters, “Suggested” ones and battery ones (that’s all of them I guess )
Then I think you could try these for attitude control:
ATC_INPUT_TC,0.2
ATC_ANG_RLL_P,6.5
ATC_ANG_PIT_P,6.5
ATC_RAT_PIT_P,0.11
ATC_RAT_PIT_I,0.11
ATC_RAT_PIT_D,0.006
ATC_RAT_RLL_P,0.11
ATC_RAT_RLL_I,0.11
ATC_RAT_RLL_D,0.006
And these for starting the Harmonic Notch Filter process:
INS_LOG_BAT_MASK,1 IMU 1
INS_LOG_BAT_OPT,0
Then do a hover test in AltHold for about a minute or more. If it’s going OK just do a few gentle movements in pitch and roll, not radical. Post a link to that .bin log file. Make sure you are a couple of meters up away from the ground, stay out of the ground-effect.
I didn’t do both.
Even without doing two things so far, I have seen good flight performance.
However, this is the first time that the altitude changes arbitrarily, or the quad does not stay in one place and flows here and there.
It will help all flight. AltHold test is for us to gather data for the Harmonic Notch filter configuration.
Once it is set up and working properly, Autotune will produce much better results.
Could you set up my flight scenario for acquiring flight data to pass on to you?
You asked for a simple hover, a gentle flight, but how many minutes will this last?
Additionally, I have never done autotune before.
Is this affected by the number of sat, gps 3d fix, or ofs, compass calibration, flight altitude, external wind, etc.?
I see a lot of mode changes but I cant see how RCMAP would mess up. People sometimes think controls are messed up when they hit Simple mode by mistake. So sort out your radio and test it well before flying again. Use the MissionPlanner radio calibration screen to check every thing - you don’t need to run the calibrations, just watch the PWM values and green indicators.
Also Y axis vibrations are not good, yet X axis and Z axis are good. So look for a difference in the antivibration mounting, or something touching the flight controller, or wires pulled tight or vibrating against the flight controller.
Set this first:
INS_HNTCH_ENABLE,1
then refresh parameters to see the rest of the HNOTCH params, then set these:
INS_HNTCH_MODE,1
INS_HNTCH_REF,0.216
INS_HNTCH_FREQ,106
INS_HNTCH_BW,53
INS_HNTCH_ATT,40
INS_LOG_BAT_OPT,2
PSC_ACCZ_I,0.436
PSC_ACCZ_P,0.218
BATT_ARM_VOLT,22.1
BATT_CRT_VOLT,21
BATT_LOW_VOLT,21.6
BATT_FS_CRT_ACT,1
BATT_FS_LOW_ACT,2
And now do another hover test and some gentle flying around in ALTHOLD - let us see that log file.
We’ll soon get to Autotune…
Thank you.
Where did you get this much information?
In particular, I am curious about the role of this parameter of HNTCH.
INS_HNTCH_REF, 0.216
INS_HNTCH_FREQ 106
INS_HNTCH_BW 53
INS_HNTCH_ATT 40
Are there any formulas for determining these values?
It’s all in the documentation, we learn by reading it thoroughly - it’s a long road sometimes.
I’ve determined those values from your last logs.
We will know more after your next test flight.
That’s annoying and sad.
Harmonic Notch Filter, the PIDs and other settings don’t cause that. Attitude control was reasonable up until the point where it went crazy - and previously you’d even been able to start Autotune.
I agree with Daves opinion that something is going on with IMU2. It seems to be much more affected by vibrations than IMU1. When you get this ready for flying again leave it powered on for quite some time to check messages. Do some very small test flights at low level to minimize damage in case it goes crazy again. If you’re not confident that it’s fixed by sorting out the vibrations (as per below) then you’ll have to replace the FC.
Looking back through your previous logs the Y and Z vibrations weren’t as bad, so something changed.
You’ll have to find a way of reducing the Y axis and Z axis vibration. X and Y axis are forward/back left/right so look for unequal vibration damping or anything pulling or touch the flight controller.
Z axis is up and down and can be hard to fix, since prop wash over the arms cant be altered, except maybe by spacing the motors up a little higher. Or make sure props are not over-flying the base plates.
Recently Greg Wilson made a huge difference to his vibrations by dynamically balancing the motors and experimenting with the FC mounting:
The good thing is the Harmonic Notch Filter settings were working well, even if only for a short time. Before you fly next you’ll be able to set these to turn off the extra logging, but leave everything else how it is now:
INS_LOG_BAT_MASK,0
INS_LOG_BAT_OPT,0
If there is a problem with IMU2, how can I fix this problem?
The log you saw is like the data that the quad crashed while flying out of control.
There are vibrations in the other logs as well, but this is around 20.