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:
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.
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.
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?