Momentary loss/lack of setpoint actuation on POSCTL flight log

Hi guys,

I’m using the PX4 firmware on a hexacopter and currently, I’m doing the position controller tunning.

Last week I’ve made a flight and then I plotted the flight log and I noticed that when in POSCTL mode, sometimes the position setpoint remains horizontal and the position doesn’t follow that line, as you can see in the position plots:

http://logs.uaventure.com/view/QEss9VPPktTjZXK9EhoVxJ

Currently I’m using the firmware version 1.5.5

Did anyone experience this behavior?
Thank you.

Can you point out which parts seem wrong in the logs (times)?

Hi,

In the following image, I highlighted some of the zones where I noticed the behavior described previously

Are you sure it doesn’t correspond with your stick input? When the roll/pitch stick input is non zero the position is interpreted as a velocity command (xy). When centered it latches onto the current position.

In my opinion, if the control is good (which it seems, when the strange behaviour doesn’t happen), the two lines should be colinear. i just doesn’t understand why the setpoint line remains horizontal. This also happened in indoor altctl flight:

http://logs.uaventure.com/view/hbs3LBEb2QjS5sag66s5rW#Local_Z_PLOT

Anytime your sticks aren’t neutral it’s velocity control mode. The position setpoint is constantly reset to match the current position. When your stick is neutral it latches onto that position and then actually tries to hold it.

Take another look at your log with this in mind.

Now here’s the same plot again, but also with the X velocity and setpoint.

1 Like

Now I’m getting it!

So It seems that I still have some calibration to do in order to reduce the position error when the position setpoint is stable (when there is no actuation on the sticks), right?

Thank you for your time and help :slight_smile:

Yes that’s right. There are tuning parameters for velocity (MPC_XY_VEL_*), and position (MPC_XY_P and MPC_XY_FF). You can tweak these params in flight if you’re comfortable.

1 Like