Unable to stably hover after takeoff

After takeoff, the ascent command must be kept hovering
I checked to verify AltHold performance with data flash logs
but i don’t know where to start


During the hovering process, the motor will continue to accelerate and decelerate

Have you read this forum?
Lots of people do not follow the documentation and have the same problems you do.

And not much help can be provided w/o a .bin flight log.

I’m a student and still researching how to use
Maybe I’m using the wrong settings

https://drive.google.com/file/d/1S1Ti7wCMkzGbGIaBVhggAH-zFMt1KrlM/view?usp=sharing
flight log
Hexacopter XRotor X6
12S Lipo

So it look like you have high thrust/weight which can be a challenge initially. Your throttle out and hence the motor outputs are oscillating badly. Surprised you don’t hear it.You will have to fix this before you can proceed with tuning.

Try setting these and then just do a hover flight in AltHold or Loiter to establish a correct MOT_THST_HOVER value.

MOT_THST_HOVER .125
PSC_ACCZ_I,.25
PSC_ACCZ_P,0.125
ATC_RAT_PIT_I,0.110
ATC_RAT_PIT_P,0.110
ATC_RAT_RLL_I,0.110
ATC_RAT_RLL_P,0.110
INS_LOG_BAT_MASK,1 (this is to prepare to configure the Dynamic Notch Filter later on in the process)

Hi Dave Thank you for your assistance with my flight test
Because I don’t have enough flying experience to tell if the power is too much or too little
https://drive.google.com/file/d/1AwOrIVfAId0HDjbscZpA52H0oro8gtOr/view?usp=sharing
Current adjusted flight log
Hover state is more stable
What is the next step according to the documentation (dynamic gear setting based on throttle)?

In-Flight FFT seems to work better than Throttle-based notch Filter.
Since you have F7 fmu, you could easily spare some computation power for FFT
And change INS_LOG_BAT_MASK to 2 for loggig post-filter data

After that i would suggest a basic manual tune and then auto tune

Oscillation is mostly gone so you are at a good starting point for tuning. Not sure why you set MOT_PWM_TYPE to 8 (PWMRange). Anyway set these:
MOT_THST_HOVER, .165
PSC_ACCZ_I,.33
PSC_ACCZ_P,0.165
FFT_ENABLE,1 (then refresh parameters)
FFT_MAXHZ,225
FFT_MINHZ,60
FFT_WINDOW_SIZE,64
INS_HNTCH_ENABLE,1 (then refresh)
INS_HNTCH_ATT,40
INS_HNTCH_BW,30
INS_HNTCH_FREQ,60
INS_HNTCH_HMNCS,3
INS_HNTCH_MODE,4
INS_HNTCH_OPTS,0
INS_HNTCH_REF,1
INS_LOG_BAT_OPT,2

Make another hover flight in AltHold and let’s see how the filter is doing. If good then you would run Auto Tune.

Hi @dkemxr
Is there some limitation to how low we can set the FFT min frequency?

Docs mention that,

Set FFT_MINHZ to the lowest value that you want the harmonic notch frequency to be set to. Typically this should be above about 50Hz to stay clear of your copter’s control bandwidth.

Can we actually see the control bandwidth in the FFT and adjust INS_GYRO_FILTER to better accommodate the required bandwidth and filter out the noise?

I don’t have any background in Control Theory, so it’s really hard for me to wrap these terms around my head but I try my best

Thanks for your advice
I’m still understanding his intentions for some parameters

After updating the parameters I did a flight test
https://drive.google.com/file/d/1MZiksoA6ybO9N0oZO7_RB37RRUFDZvvh/view?usp=sharing
During the flight I tried high angle control in Attitude mode
Control response is somewhat delayed
There is a slight gust of wind

No, not that I know of. But anecdotal evidence from setting the Center Frequency too low has definitely shown me this can be a problem. I think the better option if there is a mode below 45Hz is to use a 2nd Notch Filter with a narrow BW. 4.2 allows for 2 Dynamic Notch filters unlike 4.1 where one was static. This opens up many more options.

It still needs tuning. What you have done so far is to get it basically flying so Auto Tune will run. I think you need to make a longer hover flight as FFT did not learn some of the parameters.

Testing had to be postponed due to bad weather

Two autotune tests performed today
The first three-axis adjustment failed
The second time just adjust the Roll
First https://drive.google.com/file/d/11JGPB6ENbvYDD-A2pbZuGdhkoGXGRNN1/view?usp=sharing
second https://drive.google.com/file/d/1u1FV0kTDiDXcj9B8jQV1or66GrAcdYmy/view?usp=sharing

So either run Auto Tune on Pitch or copy the Roll parameters. It looks like you only copied the Rate P,I & D.

hi Dave
Do I need to re-execute Autoturn after adding other devices?
Currently heavier and requires more power to take off
Suddenly climbed high during the test, and then fell to the target height

test log https://drive.google.com/file/d/1U1vBQfBi-qIPM2VvM4XDqDIWwXsdB5SF/view?usp=sharing

No, but you do need to follow the TOW instructions on:
https://ardupilot.org/copter/docs/input-shaping.html#input-shaping

Now the Z-vibe levels are very high with ~2000 clipping events. Those “other devices” don’t seem to be helping here.