# Momentary loss/lack of setpoint actuation on POSCTL flight log

**URL:** <https://discuss.px4.io/t/momentary-loss-lack-of-setpoint-actuation-on-posctl-flight-log/2954>\
**Category:** Flight Testing & Log Analysis\
**Created:** [April 6, 2017, 7:54pm UTC](https://discuss.px4.io/t/momentary-loss-lack-of-setpoint-actuation-on-posctl-flight-log/2954 "2017-04-06T19:54:43Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![m.91.moreira](https://discuss.px4.io/user_avatar/discuss.px4.io/m.91.moreira/32/7622_2.png) [@m.91.moreira](https://discuss.px4.io/u/m.91.moreira)\
**Post date:** [April 6, 2017, 7:54pm UTC](https://discuss.px4.io/t/momentary-loss-lack-of-setpoint-actuation-on-posctl-flight-log/2954/1 "2017-04-06T19:54:43Z")

</div>

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](http://logs.uaventure.com/view/QEss9VPPktTjZXK9EhoVxJ)

Currently I’m using the firmware version 1.5.5

Did anyone experience this behavior?  
Thank you.

---

<div class="post-metadata">

**Author:** ![dagar](https://discuss.px4.io/user_avatar/discuss.px4.io/dagar/32/22_2.png) [@dagar](https://discuss.px4.io/u/dagar)\
**Post date:** [April 9, 2017, 7:03pm UTC](https://discuss.px4.io/t/momentary-loss-lack-of-setpoint-actuation-on-posctl-flight-log/2954/2 "2017-04-09T19:03:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![m.91.moreira](https://discuss.px4.io/user_avatar/discuss.px4.io/m.91.moreira/32/7622_2.png) [@m.91.moreira](https://discuss.px4.io/u/m.91.moreira)\
**Post date:** [April 9, 2017, 9:27pm UTC](https://discuss.px4.io/t/momentary-loss-lack-of-setpoint-actuation-on-posctl-flight-log/2954/3 "2017-04-09T21:27:55Z")

</div>

Hi,

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

 ![](https://discuss.px4.io/uploads/default/original/1X/44211eab37d1471aaa1fa4df9782e06925d53a8f.png)

---

<div class="post-metadata">

**Author:** ![dagar](https://discuss.px4.io/user_avatar/discuss.px4.io/dagar/32/22_2.png) [@dagar](https://discuss.px4.io/u/dagar)\
**Post date:** [April 9, 2017, 9:51pm UTC](https://discuss.px4.io/t/momentary-loss-lack-of-setpoint-actuation-on-posctl-flight-log/2954/4 "2017-04-09T21:51:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![m.91.moreira](https://discuss.px4.io/user_avatar/discuss.px4.io/m.91.moreira/32/7622_2.png) [@m.91.moreira](https://discuss.px4.io/u/m.91.moreira)\
**Post date:** [April 9, 2017, 10:09pm UTC](https://discuss.px4.io/t/momentary-loss-lack-of-setpoint-actuation-on-posctl-flight-log/2954/5 "2017-04-09T22:09:45Z")

</div>

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](http://logs.uaventure.com/view/hbs3LBEb2QjS5sag66s5rW#Local_Z_PLOT)

---

<div class="post-metadata">

**Author:** ![dagar](https://discuss.px4.io/user_avatar/discuss.px4.io/dagar/32/22_2.png) [@dagar](https://discuss.px4.io/u/dagar)\
**Post date:** [April 9, 2017, 10:20pm UTC](https://discuss.px4.io/t/momentary-loss-lack-of-setpoint-actuation-on-posctl-flight-log/2954/6 "2017-04-09T22:20:31Z")

</div>

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.

 ![](https://discuss.px4.io/uploads/default/original/1X/c6183f14031658d2f63df18c60c4625335c37568.png)

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

 ![](https://discuss.px4.io/uploads/default/original/1X/5e7ad32228245ecd92ff6373e2244cdc3ff35bbe.png)

---

<div class="post-metadata">

**Author:** ![m.91.moreira](https://discuss.px4.io/user_avatar/discuss.px4.io/m.91.moreira/32/7622_2.png) [@m.91.moreira](https://discuss.px4.io/u/m.91.moreira)\
**Post date:** [April 9, 2017, 10:29pm UTC](https://discuss.px4.io/t/momentary-loss-lack-of-setpoint-actuation-on-posctl-flight-log/2954/7 "2017-04-09T22:29:43Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![dagar](https://discuss.px4.io/user_avatar/discuss.px4.io/dagar/32/22_2.png) [@dagar](https://discuss.px4.io/u/dagar)\
**Post date:** [April 9, 2017, 10:36pm UTC](https://discuss.px4.io/t/momentary-loss-lack-of-setpoint-actuation-on-posctl-flight-log/2954/8 "2017-04-09T22:36:23Z")

</div>

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.
