Tuning analysis with log

I have tuned my plane now using the log as best I can but am unsure what exactly I need to refine to get it perfect. I feel like the roll tuning is great, and you can see by the graph of roll vs navroll that it is pretty accurate. (I picked a section that was a good example)

As you can see by the pitch tuning, it is not as accurate. I have the settings a little stronger than the roll but I really just want to know how to adjust my settings to make the pitch as accurate as the roll. I don’t want to increase the wrong ones. I attached the log as well.

Roll P = 0.5
Roll I = 0.05
Roll D = 0.02
Roll INT_MAX = 20.0

Pitch P = 0.9
Pitch I = 0.1
Pitch D = 0.05
Pitch INT_MAX = 20.0

Thank you for the help. I would like to add I did autotune at level 6 and increased the gains very slightly from there.

I also feel like the plane has a tendency to pitch ~5 degrees downward in fbwa mode. I don’t know if this is related to the pitch tuning. It flies straight/slightly upwards in manual mode so I know it is not a trim issue. The only thing I could think of was making sure the plane was completely level when i turned on the APM but I did that and still had the slight pitch downward issue.

Hi chas…I’m pretty new to this (been flying a few months), but I think you’re trim issue in FBWA could be solved by looking at the ArduPlane:TRIM_AUTO variable. If you enable this, then pixhawk will inherit the current control surface positions as TRIM. Otherwise, it will quickly move the surfaces to whatever values are stored in RC1_TRIM, RC2_TRIM and RC4_TRIM.

An experiment would be to fly straight-and-level and then switch to FBWB instead, since that mode will attempt to hold altitude, thus should quickly re-trim to what you had.

Please double-check anything I say here by looking it up on the Wiki cause like I said…I’m very new to this!

Tony

[quote=“TonyAda99”]Hi chas…I’m pretty new to this (been flying a few months), but I think you’re trim issue in FBWA could be solved by looking at the ArduPlane:TRIM_AUTO variable. If you enable this, then pixhawk will inherit the current control surface positions as TRIM. Otherwise, it will quickly move the surfaces to whatever values are stored in RC1_TRIM, RC2_TRIM and RC4_TRIM.

An experiment would be to fly straight-and-level and then switch to FBWB instead, since that mode will attempt to hold altitude, thus should quickly re-trim to what you had.

Please double-check anything I say here by looking it up on the Wiki cause like I said…I’m very new to this!

Tony[/quote]

Thanks Tony! I tried that and it still seems to be doing the same thing. I just noticed this tidbit in the tips section of the tuning guide: [quote]Check for any steady offset between nav_pitch-roll and pitch. If you have followed the basic method you may see an offset which can be removed by setting PTCH2SRV_I to a small value (say 0.05) which will allow the control loop to slowly trim the elevator demand to remove the steady error. The value of PTCH2SRV_I can be increased in small increments of 0.05 until you are satisfied with the speed at which the control loop ‘re-trims’. [/quote]
I hope this is what I need. I don’t have the radios to test in flight and unfortunately it is too late to try this before dark but I will test if this is the problem and report back. It does seem to describe the exact discrepancy in my pitch graph

[quote]Quote:
Check for any steady offset between nav_pitch-roll and pitch. If you have followed the basic method you may see an offset which can be removed by setting PTCH2SRV_I to a small value (say 0.05) which will allow the control loop to slowly trim the elevator demand to remove the steady error. The value of PTCH2SRV_I can be increased in small increments of 0.05 until you are satisfied with the speed at which the control loop ‘re-trims’.

I hope this is what I need. I don’t have the radios to test in flight and unfortunately it is too late to try this before dark but I will test if this is the problem and report back. It does seem to describe the exact discrepancy in my pitch graph[/quote]

I increased PTCH2SRV_I up to 0.3, the P gain is 0.7, the D is 0.05. I am still having a slight offset in the pitch graph of nav_pitch and pitch. The plane is always pitched slightly lower than nav_pitch. Increasing the I to 0.3 has seemed to help but I am wary of increasing it further. Increasing the D gain by much causes oscillations so I have kept it at the autotune level.

Should I continue increasing PTCH2SRV_I until the offset is fixed or is this indicative of another problem?

Try with more airspeed and compare then (in 10%steps)

Have done this, same result. The graph shows a constant discrepancy in pitch vs nav_pitch.

With PIT2SRV_I at 0.45 the graph has finally equalized. I still suspect this is masking a bigger problem but I don’t know what it could be?

Did you ever try FBWB instead of FBWA?

Tony