Removing Integral term has unexpected effects

Description

Hello,
I've recently started using LibrePilot, and have extensive previous experience using and testing PX4, and APM, and wanted to bring up an issue I've found with the PID control in LibrePilot.

Believe that for many situations, the "I" term in PID is not necessary, but have been unable to zero it without getting undefined behavior from the multirotor. In PID theory, if I set the I-term to zero, I should have a PD loop that will always go to level position. What actually happens if I set the I term to zero, is the copter will fly level for about 15 seconds, then it will roll/pitch in a random direction, as if it lost it's level/trim, and this will persist until switched back to a flight mode with an I-term.

Also the PID in the new release feels much nicer than 15.9, if this issue is fixed, then it'll be the best of all the Open Source FC's that I've tried!

Looking forward to reading your replies.

Environment

Have tested this and gotten same results on Revo, and CC3D

Activity

Show:
Lalanne Laurent
December 21, 2016, 3:43 PM

Hi Alex,
From what PID are you talking ? Stabilization ?
While setting the I term to 0 you should expect more drift because the error is not accumulated.

g
December 21, 2016, 4:08 PM

Hey Laurent,
I'm talking about the stabilization PID here, no GPS. I completely agree that more drift would be expected. What's expected is that if wind blows, then when the wind stops, the multirotor will level out, but continue drifting since it gained some momentum.

The problem described is not drift, Without the I-term, after some time the copter does not fly level. It's as if the setpoint is changing over time to cause it to roll/pitch very sharply. In addition to that, if you hold the copter non-level with the motors running then let go of it, it will not level itself out when you let go, but instead shoot forward at the angle you were holding it.

I recommend trying these two experiments yourself, I think you will see the issue I'm describing.

Lalanne Laurent
December 21, 2016, 4:44 PM

Just did a quick test before night.
Tested zeroing the I term for Roll axis and do not bank very sharply like you say.

Other issue that can affect Attiude estimation are vibrations.

g
December 22, 2016, 10:06 PM

Try setting both Roll and Pitch values of I-term to zero. Other than that I'm using default PID's from F-450 (selected in the vehicle setup wizard) from bank 2 (bank 1 had the same results). Fly it, trying to hold it steady, for 5 minutes. For me it starts to bank after about 30 seconds. It happens faster if I give it impulses instead of holding it steady.

In terms of why the I-term is detrimental: Try attaching a stick to the copter, and holding it at an angle while it's flying (with I-term). When you let go it won't level out.

I'll make a video if you're still not able to replicate the issue, but I've had it replicated on both a regular CC3D and a Revo.

OwlPic
December 23, 2016, 3:27 AM

In the PID example from Murray's Feedback-Systems, the Integrator ("I") term's calculation is wrong.
There is no need for an integration of previous errors to effect future performance as Murray defines it and Alex is describing above.
This PID definition mistake has been around for years and just keeps being passed on. Need to remove the integrator term and replace with a proportional term.

Assignee

Unassigned

Reporter

g

Labels

Fix versions

Priority

High
Configure