-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change both MC and FW PID controllers to P+I+D+FF #3732
Comments
Would be great indeed ! |
I've been looking into BF FF implementation lately. Indeed, looks interesting and removes the need for dterm setpoint weight. Still, MC FF apparently should be setpoint derivative, not setpoint based like in FF. On the other hand, it might be intersting how setpoint FF would work on MC. |
I have been missing D on FW since it was removed. PIFF is beneficial for a more direct steering compared to PID on FW but not very effective when it comes to stabilization against external influence, like gusts. |
Awesome idea! I really could do with this feature for my FWs where I use twin motors for yaw. Also it would help getting smoother stab as missing D term does show every now and then. |
Pid bank and MSP frame will be done in #4326 |
Is there any chance for D term to be implemented for fixed wings? Stabilization would be much better with D term as it would let higher P gains. |
Let's look into this for 2.6 |
Continuing PID/PIFF discussion - what is the reason for all the P, I, FF coefficients to depend on rate for fixed wings?
The benefits are: clear understanding and simplified tuning. |
What I notice a lot, that fixed-wing pilots tend to think in percentages of stick deflection (aka RC rate). INAV does not have such a thing at all. Units used by INAV internally are PID/PIFF translates rate command into actuator commands. This is how it works on both multirotor and fixed-wing crafts. Rule of thumb for tuning airplanes:
|
This is an area that iNav can not compare to other fixed wing software. I have been able to overcome roll axis wobble in turbulent wind, with other flight software that implement the Derivative term. Its common knowledge that a well designed airplane has good inherent stability. Due to this, a flight stabilizer can operate on a P I control system. Or even the Integral component alone, when flying in moderately windy conditions. As iNav does. The real test of a flight stabilizer is seen when flying in gusty wind. This is where iNav fixed wing stabilization falls over badly. It does not require much D term to dampen oscillations in gusty conditions. In fact it would be impossible to use any more than a few points at best. Due to slow servo control reaction rate. But this small amount of Derivative does help. |
Adding a D-term to the control loop on fixed wing to get a PIDFF (PIFFD?) controller seems trivial: 424ae8e. This raises the question of why this hasn't been done before. Is it just a matter of priority? Which is totally fine btw. Or are there caveats to doing this that I'm not seeing right now? @digitalentity, @DzikuVx? Implementing this properly throughout the rest of the project will of course require more work than just the control loop: adjustments, OSD, configurator, black box log and explorer all need to be changed so that D and FF terms can be used at the same time. But these don't all have to be changed at the same time. I think it could be an interesting challenge. |
It wasn't left out. Early versions of inav used PID control for MC and FW. At some point the D-term was actually deliberately removed in FW and replaced by FF. As far as I recall, it was speculated that servos can't follow rapid changes caused by the D-term anyway and that FF would make steering of FW more direct. It was a questionable move back then IMHO and it would have been a better decision to implement FF in addition to PID on FW. Please don't remove core features so easily in the future. Let's hope for a come-back of D on FW. |
Currently MC is PID, FW is PIFF, while both MC and FW could benefit from having a full PIDFF controller.
The text was updated successfully, but these errors were encountered: