AHR2 and ATT pitch/roll relationship

Greetings everyone!

I’m new to Ardupilot and have encountered a problem that when flying my 7 inch copter.
It is quite common for the AHRS to lean in roll and pitch, at times up to 10-15 degrees, especially during sharp turns when the copter is actually leans to the other side. It also occurs when copter only holds altitude and simply starts leaning.

After checking the flight log, I found that the AHR2 is very often out of sync with the ATT. After reading a bit of documentation and similar queries on the forum, I tried applying different values for parameters such as EK3_ACC_P_NSE or EK3_ABIAS_P_NSE. I also did IMU Temperature Calibration, AutoTrim, SaveTrim and did gyro filtering at different frequencies. Also after reading a detailed article from Andyp1per (ArduCopter 7" Long-Range Standard Build) on 7 inch quadcopter setup, I tested in flight on my copter the ready-made config from the article, though with a little modified PIDs for my copter. Alas, it did not affect the AHRS horizon leaning either.

As a result, several questions have accumulated:

  1. How exactly does AHR2 estimation work, especially in conjunction with ATT?
    According to my observations, the AHR2 on the graph is always at least a little bit behind the ATT values, and sometimes has a completely different amplitude.

What should I pay attention to and what should I do to minimize the difference between AHR2 and ATT values?
2. Why on the VIBE charts does the vibration increase during normal forward flight with pitch attitude?

When hovering in place and gently pitching in different directions, the vibrations on the VIBE graph are within acceptable limits, but during active flight, the vibrations start to increase dramatically. A similar story happens with the above-mentioned AHR2 and ATT, when in active flight the difference between them can be very large, and often abnormal.

  1. Does filtering (INS_GYRO_FILTER, INS_ACCEL_FILTER or INS_HNTCH_…) or PID settings affect this behavior of the quadcopter?

Replacing the FC (MateksysH743 SLIM V3) did not affect the behavior either, does it mean that the problem is a misconfiguration?
The frame and other components (except FC) of my quadcopter have already been used when flying on Betaflight, where this behavior was not observed during active flights.

Any advice would be appreciated.

Thanks in advance.


Logs & Parameters:
https://drive.google.com/drive/folders/1p64NTZxH9xwpyFEwdqRH0RAnS7D00xSE?usp=sharing

1 Like

Your copter is certainly learning quite large accel biases during flight which will cause it to lean:

The noise on your rate output looks quite low, so its not obvious that vibrations or temperature are the cause - ah but these are too high:

Your harmonic notch isn’t doing anything - the base frequency is too high:

So keep the ratio of F/BW the same but reduce both by a factor of 4 say. That should make quite a big difference

As you suggested,

INS_HNTCH_FREQ was 185, i have set 46 (divided by 4)
INS_HNTCH_BW was 46, i have set 12

The problem unfortunetly is still here, here is log from flight (log_19_08)
https://drive.google.com/drive/folders/1p64NTZxH9xwpyFEwdqRH0RAnS7D00xSE?usp=sharing

Also, i have tried AHRS_EKF_TYPE = DISABLE like was suggested in this topic:

But it didnt do much.

Do you have any ideas what is the cause of this problem?

The learned bias is much better on that flight.

Should i try tuning this params:
EK3_GYRO_P_NSE
EK3_ACC_P_NSE
EK3_GBIAS_P_NSE
EK3_ABIAS_P_NSE

or the cause of the problem is not here

Could you please tell me what should i try to solve the problem? Any ideas would be appreciated

You still have very high vibes on the Y-Axis - I think you should first off look for a mechanical problem in that axis

Here are my Vibes from my 7" in acro:

Hello!
If vibration is only on a specific Axis, does it tell the source of vibration? For example, if it is on Y-Axis, what does it mean?

It means that the IMU is moving side to side.

After reviewing the latest logs, I noticed a strange feature that the VIBE(1) graphs of the second IMU, show significantly less vibration(below 30m/s/s) than the VIBE(0) from the first IMU. My FC has two identical ICM42688P IMUs. After equipping the FC with additional rubber pads and making a couple of new flights, I did not see any improvement in VIBE(0) relative to VIBE(1). So for the EKF calculations for AHRS, I chose only the second IMU by specifying it in EK3_IMU_MASK = 2 and EK3_PRIMARY = 1.

After that I noticed some improvements in AHRS behaviour (it seems to me that AHRS practically stopped leaning in roll or pitch after sharp turns and vibration jumps, and in general started behaving more predictably), but unfortunately the degree value on the AHR2.Pitch graph is still very much out of sync with the ATT.Pitch value. For example, if the pitch angle is 30 deg, the AHR2.Pitch value may well be 15 deg. And this difference between the two tends to increase as the pitch angle increases.

Am I correct in understanding that the angle of tilt relative to the ground that I see during flight does not match the actual tilt of the copter by exactly the same degree as the AHR2 relative to the ATT?

I’ve tried experimenting with EK3_ABIAS_P_NSE, EK3_ACC_P_NSE, as well as AHRS_RP_P and AHRS_YAW_P, but so far I haven’t seen any change in the AHR2.Pitch and AHR2.Roll graphs.

Do these parameters have any influence on this behaviour? Is there any sense in experimenting with them further or is there a clue in other parameters?

P.S. Also when flying at quite high speeds and tight turns the copter has small oscillations, do I understand correctly that it is rather caused by not quite successful aerodynamics? Or is it a problem with the filters?


New logs where EK3_IMU_MASK = 2 was used are located on the disk in the 8.23_new_logs folder.

Thank you