Quadcopter highly unstable with ANGLE_MAX set to 8000

Hi Ardent,
Do you have a latest .bin log we can look at? I’m still curious about what’s going on and what settings you have for gyro/filters and HNOTCH

Sure. Do you want the one after the notch filter was put in and INS_GYRO_FILTER set to 46Hz?

The one with the latest/best config you have I guess

This one is my final setup with dynamic notch filter before I do the Autotune:

Password is my username.

In that log Roll axis is working well but pitch is very poor - in the videos the quad looks reasonably symmetrical - if so then you should put the same Roll PIDs into Pitch
Set these:
ATC_ANG_PIT_P 4.5
ATC_RAT_PIT_P 0.14
ATC_RAT_PIT_I 0.14
ATC_RAT_PIT_D 0.0036

I would probably set the Harmonic Notch Filter like this, since down around 43 Hz is getting towards into the control realms, and the higher 85Hz will be where your props are operating. I’ve calculated a particular reference value for you ( hntch-ref = hover_thrust x SQUAREROOT(min_freq / hover_freq) )
INS_HNTCH_REF,0.111
INS_HNTCH_FREQ,85
INS_HNTCH_BW,42
It will be interesting to compare the result to the existing 43Hz settings.
If there’s still a prominent frequency around 40+ Hz we may be able to put in a narrow static notch filter.

Do a test flight like that, if attitude control is good you should be able to do two things:

  • Increase INS_GYRO_FILTER in steps, try 30 then 40
  • Run Autotune on Pitch and Roll axis after finding the best INS_GYRO_FILTER and verifying HNOTCH settings
    Yaw is less critical and we can check it later
1 Like

Yes, now I look at Pitch and DesPitch it is not the best (though not awful).

I set the harmonic notch to 43Hz because this video said to set it to half the peak frequency (made no sense to me - surely you want it at the peak frequency but it seemed to work).

I will up the notch to 85Hz which makes much more sense. Thanks.

BTW, the log I just posted already has INS_GYRO_FILTER set to 46Hz which is the initial params wizard choice. Sorry if that wasn’t clear.

I will do a flight when the wind dies down. It is very windy in the UK right now.

The bandwidth INS_HNTCH_BW is to be set at half the peak frequency.
Not the frequency INS_HNTCH_FREQ at the half peak frequency, that would not make sense.

1 Like

:rofl:
The joys of trusting Youtube videos. Listen to this snippet and you’ll see why I put my notch at half the peak frequency:

https://youtu.be/AF6aA2z6rhw?t=1752

This is the video of the latest flight. Not a great video but anyway:

https://www.dropbox.com/s/yr3o8cnj3f46w2z/VID_20220211_134216.mkv

If you like watching videos then I have done a (likely) more reliable series: ArduCopter 7" LR Build Video 1 - Intro and Unboxing - YouTube

1 Like

I would secure that GPS cable to the mast then the base plate, leave enough flexibility where it connects to the FC so it doesnt transfer vibrations too much.

1 Like

The UK weather finally got a bit better so I have finally been able to do some flying in response to your post. I set the ATC_* values as you suggested and also set the INS_HNTCH_* values as suggested. I have 2 logs. INS_GYRO_FILTER is at 46Hz by the way.

This is the first log whose purpose was to gain hovering post-filter IMU noise info. There is still a bit of a peak at 87Hz for ACC. Graph and log below (password is my username):

https://www.dropbox.com/s/d711bhbag48r4t9/imu.zip?dl=0

This is the second log which is with ANGLE_MAX set to 8000 and the drone whizzing around all over the place. No IMU logging so it was just to check Pitch/DesPitch and Roll/DesRoll. The drone flies BRILLIANTLY!!! (At least by my eyes). No more drunken monkey behaviour and it easily reaches and recovers from the 80 degree* tilts. So much fun to fly.

https://www.dropbox.com/s/atmcm4x27bhzjgj/att.zip?dl=0

I have not done autotune yet as it is still too windy in the UK and I am waiting for wind less than 5mph. :frowning:

Thanks.

* does anyone know why the limit is 80 degrees in the Arducopter source code?

P.S. The video of the first flight after setting the 85Hz notch filter and 46Hz INS_GYRO_FILTER is here (with ANGLE_MAX as 45 degrees):

https://www.dropbox.com/s/erovr2070n2o0x1/Post-notch-filter.mkv?dl=0

Associated log in case anyone is interested is here (password is my username):

https://www.dropbox.com/s/4bhixkjgoor71ar/1st_flight.zip?dl=0
GPS cable is now secured BTW.