SERVO_AUTO_TRIM probably not update trims

Hi.
My plane have SERVO_AUTO_TRIM=1 always enabled.
after first flights i have this trims.
The elevons with these trims in the manual are raised equally upward by 2-3 mm
SERVO2_TRIM,1580
SERVO3_TRIM,1435
I change length of servo rod to make it symmetrical. After some flying try go to manual and found that plane roll left immediately when i switch to manual mode.
After flights i check parameters and found that servo_trims not changed


here logs with manual mode.
https://1drv.ms/u/s!AuFPVI_eDaZbhMcZ5_ePPpgAVt860A?e=ZpGh7u
2020-06-03 20-29-39.bin

and one more observation

at start PIDR.I about zero but after launch all time about -5. If plane trimmed i think it must be about zero? Isn’t it?
why?
also i cant clearly understand conditions when auto_trim working.
From documentation:

After a minute or so of flight, the trims will be adjusted such that minor trim errors will be canceled out when switching back to MANUAL and ACRO modes.

  1. Does this mean that I have to fly in a straight line MORE than a minute?

Also, it will not be updated unless there is no pilot input, the plane is being controlled by the autopilot to be in generally level flight, and the plane is flying above 8m/s ground speed.

  1. What mean “here is no pilot input”? Control via GCS without RC receiver? Or i MUST give some deflection of sticks?
  2. “and the plane is flying above 8m/s ground speed.” Plane always fly above 8m/s isn’t it? For example my plane have stall speed about 9-10m/s. Or i not correct understand this sentence? Or this mistake and should be “lower” not “above”?
  3. How can i see in logs how SERVO_AUTO_TRIM works?
    Thanks!

using SERVO_AUTO_TRIM trims are saved every 10 secs in steps scaled by the integrator value if your airframe

  1. is flying
  2. at more than 8 m/s
  3. within ± 7° pitch / roll around neutral trim
  4. in a throttle controlled mode or fbwa

you’ll see trims being set away from previously set values then. as trim steps are scaled and take place every 10 seconds, it might take a couple of steps to achieve the desired value if a larger amount of trim is required, hence the statement “a minute or so”.

1 Like

so after “perfect” SERVO_AUTO_TRIM PIDR.I must be around zero?

you can well test and visualize this on SITL, it’s an awesome tool. start with a neutrally trimmed airframe, then set roll servo trim off by large amount, then set autotrim active and watch your roll controller’s I-term:

1 Like

thank you for visualizing, so i see I-term must be close to zero after succesfully trim. But my plane immediately roll right when i go into manual. FBWA ok, cruise ok, servo trims 1580 and 1460. I term about -3…-5 in straight flight. hmm i will check RC channels one more time

looking at your logs you’ll see your servo auto trim is working, but imho there’s hardly any time for things to settle. you’ll likely get a better result by letting the plane fly longer straight legs in CRUISE only. using autotune flights with a lot of stick input and curving might not be ideal to estimate autotrim results.

1 Like