inav icon indicating copy to clipboard operation
inav copied to clipboard

PID attenuation for VTOL

Open xswein opened this issue 8 years ago • 6 comments

Hi, i have partial succes with tailsitter VTOL in iNav.

My flying wing is configured like E-flite X-VERT or Eachine Mirage E500 (dual motor differential thrust flying wing). Configuration for beeing able to execute vertical take off or landing is bit weird - i have configured flight controller as level in talisitting position (in channel mapping I swapped Aileron and Rudder) so in ANGLE mode it hovers like multirotor with rc mode4, in forward flight I use RATE mode, then it behaves as normal airplane with mode2.

I have a good set of PIDs for forward flight, i have good set of PIDs for hovering function. But in vertical mode (airflow is separated from airfoil) i need P gains generally of around 80-100, for forward flight around 15-20.

From what I know, its not possible to switch PID Profiles in flight by Adjustments, and I cannot set step or end points for PID tunning by Adjustments. Is there some way around this?

I was thinking, If there was possibility to set gain step and end points for Inflight adjustment, I could set like PITCH_ROLL_P end points of 20 and 100, step 20 and put the adjustment function on the same switch as flight mode and P gain would move from 20 to 80 in 2.5 seconds after the mode was selected (which would be nearly perfect timing for transition from forward flight to loosing speed and hovering).

Do you have any idea, how to solve this? Thanks a lot, Martin

xswein avatar Apr 21 '18 14:04 xswein

CleanFlight issues seem to have some discussion about "Allow PID tuning with a TX POT" https://github.com/cleanflight/cleanflight/issues/10 Issues 10 173 more recently 1842 And there is even some kind of solution in CleanFlight https://github.com/cleanflight/cleanflight/pull/1915/commits

xswein avatar Apr 21 '18 17:04 xswein

I´ve done it with Betaflight 3.22 but I don´t know how to integrate it into iNav or Cleanflight. It bases of adding a float value that varies from 0 to 1 if an aux channel goes from 1ms to 2ms. Added scaling factors into the final pid summing terms. float auxPgain = (((float)rcData[AUX5])/2000.0f)-0.5f; float auxIgain = (0.5f+(2.0f * auxPgain))/1.5f;

So aux5 (aucPgain) directly controls P and D term 0 .... 100% and (auxIgain) iterm 33 .... 100%

opposite to X-Vert this plane is still flyable at windy days.
https://www.youtube.com/watch?v=IVbhdopDhdI

X-Vert has to be changed to an instable COG doing pitch stabilisation only by flight controller -> COG of the X-VERT has to be moved 20 ...35mm backward ...

taileron avatar Jun 14 '18 10:06 taileron

Another workaround can be done with combination of TPA and rate profiles that can be changed inflight profile 1 with tpa rate = 0 and profile 2 with tpa rate = 70% starting at 0% throttle (1000us) profile 1 can be used for hovering, profile 2 for transition and fw that works for me perfect in a Hyper Taxi (eFlight) For using angle mode the mapping has to be changed from "TAER" to "TREA" yaw is used for roll and vice versa

taileron avatar Jun 14 '18 12:06 taileron

Thanks a lot, TPA profile solution is good idea, I'll try it this weekend!

xswein avatar Jun 15 '18 10:06 xswein

This issue / pull request has been automatically marked as stale because it has not had any activity in 60 days. The resources of the INAV team are limited, and so we are asking for your help. This issue / pull request will be closed if no further activity occurs within two weeks.

stale[bot] avatar Aug 14 '18 10:08 stale[bot]

On a good side, I'm working on conditional mixer that will be required for VTOL too

DzikuVx avatar Jan 05 '19 09:01 DzikuVx