iNavFlight / inav

INAV: Navigation-enabled flight control software
https://inavflight.github.io
GNU General Public License v3.0
3.2k stars 1.49k forks source link

AutoTune seems only working on pitch but not roll #9727

Closed majianjia closed 8 months ago

majianjia commented 9 months ago

Hi,

I am designing/building a 3D print sub250 flying wing.

Note: this wing has a significant larger control surface than a mini talon or dart250. I was hoping inav can handle that at high speed so they are still effective at low speed.

I tried to find the correct PIDFF and rate setting today, after crashing 3 planes previously. I finally manage to install a blackbox on today's flight, so I can see there are many problems. Breeze wings, little guests.

I can fly it on manual mode without issue. With Acro mode, roll axis got oscillating. Pitch is fine after autotuning. Roll keep oscillating, it is worse in angle mode.

From the log, I can see there are quite a lot of pitch FF updates but no roll update. Is it because the maximum roll rate is off too much?

Pitch rate was set to 360 deg/s which is similar to the autotune result, 300deg/sec (the actual rate is still higher, since the rate was not measured at full throttle) Roll rate was set to 360 deg/s, too, however, the peak roll rate was measured at 670 deg/sec. All most doubled.

I initially thought the roll oscillating was caused by PI overshooting, so I reduced them and increased D.

BTW, this plane crashed, after the log end.

1708169408687

For the roll oscillating issue. There was a phase delay between set roll and roll measurement img

https://github.com/iNavFlight/inav/assets/3821068/516afe5b-458d-4653-a588-2fe81d6ec8d2

LOG00004.zip

LOG00005.TXT

Additional context

https://pastebin.com/s9Ws2451

version INAV/MATEKF405TE_SD 7.0.0 Dec 5 2023 / 10:31:33 (895a4f31) GCC-10.3.1 20210824 (release)

b14ckyy commented 8 months ago

I checked your logs and the problem is your autotune execution. In each log I just see one short full roll input. that's not enough to tune roll. Before you understand how rates and FF work together its not recommended to play manually with the rates at all. Also if the plane is too aggressive with too high rates, reduce the servo throws and start over.

follow my tuning guide here after you reduced the control surface movement mechanically https://youtu.be/VhIZ1F1UCEU