-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
fw_att_ctrl: integrator output is not scaled with IAS^2 and FF not with TAS #15041
Comments
@bresch Can you comment on this - ie do we need to amend the docs? |
@hamishwillee It's only wrong in the code, we verified the equations in the docs recently, so we don't need to change anything in the docs. |
I have been thinking about this a bit more and now I believe that the code might be correct but the dev guide wrong regarding the integrator part. The integrator part is mainly there to compensate for Cm0, going through the math gives the value as delta_e = -Cm0/Cm_delta_e, for Cm_alpha=0, q=0 and M=0, which is independent of airspeed. |
@CarlOlsson Yes, that makes sense if the purpose of the integrator is to compensate for Cm0 only. In my derivation I assumed that P and I were used to produce a constant torque, regardless of the airspeed; this is why the integrator is scaled like the proportional term, with IAS^2. |
Okey thanks for the clarification. Maybe having both could actually make sense. We only have a slow integrator, not scaled with airspeed and initialized to the mean value from the last flight. This makes it possible to learn aircraft differences both directly from production and over time. |
To be clear, the roll and pitch integrators do currently include the scale when accumulating (although the scale was IAS instead of IAS^2, which I fixed in #15256). They just don't apply the airspeed scaling to the final integrated output. I would argue strongly that the current behavior is best. When using relatively high FW_YR_IMAX (allowing the integrated term to grow large):
|
I suggest closing this.
|
Describe the bug
The devguide has excellent documentation of the required airspeed scaling for fixed wings
https://dev.px4.io/master/en/flight_stack/controller_diagrams.html#airspeed-scaling
However, the implementation does not follow this
The text was updated successfully, but these errors were encountered: