# Unstable when switch to POSCTL mode

**URL:** <https://discuss.px4.io/t/unstable-when-switch-to-posctl-mode/2849>\
**Category:** Flight Testing & Log Analysis\
**Created:** [March 23, 2017, 3:04pm UTC](https://discuss.px4.io/t/unstable-when-switch-to-posctl-mode/2849 "2017-03-23T15:04:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Boss\_Kwei](https://discuss.px4.io/letter_avatar_proxy/v4/letter/b/8c91f0/32.png) [@Boss\_Kwei](https://discuss.px4.io/u/Boss_Kwei)\
**Post date:** [March 23, 2017, 3:04pm UTC](https://discuss.px4.io/t/unstable-when-switch-to-posctl-mode/2849/1 "2017-03-23T15:04:59Z")

</div>

Hi,  
I’m having a little trouble now in PX4. Once I switch mode to POSCTL, the quadrotor begin to shake, if do not back to STABILITY mode, it will cash anyway. (btw, takeoff in POSCTL could cause rollover)  
The quadrotor is **really stable in MANUAL** mode, so I think the Gyro sensor is fine, I also have tried **change another GPS** , but it’s useless. (My friend flied a arducopter quadrotor by the side, his POSITION mode was stable, so I think maybe I configure something wrong…)  
I could not work it out, and really need some help.  
Sincerely, any advice is appreciated.

Firmware: 1.5.5 Stable  
Air Frame: Generic quadrotor X config

There are logs of my flight, immediately shake when I change mode, so I have to switch back to altctl.  
And gps\_data was logged by QGC after the two flights.

log\_1: [http://logs.uaventure.com/view/LQRD4er9jS4gpkr49tZkAb](http://logs.uaventure.com/view/LQRD4er9jS4gpkr49tZkAb)  
log\_2: [http://logs.uaventure.com/view/DEnHTgdYEckznRkehX5pAM](http://logs.uaventure.com/view/DEnHTgdYEckznRkehX5pAM)  
gps\_data: [http://paste.ubuntu.com/24235235/](http://paste.ubuntu.com/24235235/)

---

<div class="post-metadata">

**Author:** ![CarlOlsson](https://discuss.px4.io/user_avatar/discuss.px4.io/carlolsson/32/4175_2.png) [@CarlOlsson](https://discuss.px4.io/u/CarlOlsson)\
**Post date:** [March 23, 2017, 4:24pm UTC](https://discuss.px4.io/t/unstable-when-switch-to-posctl-mode/2849/2 "2017-03-23T16:24:39Z")

</div>

Hi,

Sorry to hear that you are having problems. I looked through the logs and as soon as you switch to altitude control mode your position set points go to 17\*10^5.

 ![](https://discuss.px4.io/uploads/default/original/1X/dbb0dd209e5054125d68877b7f90c971eecda95b.png)  
@LorenzMeier Have you seen this before?

---

<div class="post-metadata">

**Author:** ![Boss\_Kwei](https://discuss.px4.io/letter_avatar_proxy/v4/letter/b/8c91f0/32.png) [@Boss\_Kwei](https://discuss.px4.io/u/Boss_Kwei)\
**Post date:** [March 24, 2017, 2:23am UTC](https://discuss.px4.io/t/unstable-when-switch-to-posctl-mode/2849/3 "2017-03-24T02:23:48Z")

</div>

@CarlOlsson Thank you for your reply, if you need other logs, I could do more test.

---

<div class="post-metadata">

**Author:** ![Boss\_Kwei](https://discuss.px4.io/letter_avatar_proxy/v4/letter/b/8c91f0/32.png) [@Boss\_Kwei](https://discuss.px4.io/u/Boss_Kwei)\
**Post date:** [March 26, 2017, 3:34pm UTC](https://discuss.px4.io/t/unstable-when-switch-to-posctl-mode/2849/4 "2017-03-26T15:34:26Z")

</div>

@CarlOlsson After a complete erase and re-download, this unstable problem was solved, but the set points (Local Position X) abnormity still arise sometime.

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

Here are two flight logs (both successful flight)

[http://logs.uaventure.com/view/pwqPfcEdoRwNCzURZJN7Lk](http://logs.uaventure.com/view/pwqPfcEdoRwNCzURZJN7Lk)  
[http://logs.uaventure.com/view/5L674d2qFdXXP4ZTMDBWGN](http://logs.uaventure.com/view/5L674d2qFdXXP4ZTMDBWGN)

I hope these could help improving PX4 stack.

---

<div class="post-metadata">

**Author:** ![Mzahana](https://discuss.px4.io/user_avatar/discuss.px4.io/mzahana/32/3790_2.png) [@Mzahana](https://discuss.px4.io/u/Mzahana)\
**Post date:** [March 27, 2017, 6:19pm UTC](https://discuss.px4.io/t/unstable-when-switch-to-posctl-mode/2849/5 "2017-03-27T18:19:24Z")

</div>

I am facing similar issue. I tried 1.5.1 to 1.5.5. All produce same issue. Issue is that the copter shoots up in the sky once I switch to poctl or Altctl modes. I am using Lidar lightware . It did that using both LPE and EKF2.

---

<div class="post-metadata">

**Author:** ![Boss\_Kwei](https://discuss.px4.io/letter_avatar_proxy/v4/letter/b/8c91f0/32.png) [@Boss\_Kwei](https://discuss.px4.io/u/Boss_Kwei)\
**Post date:** [March 28, 2017, 3:01am UTC](https://discuss.px4.io/t/unstable-when-switch-to-posctl-mode/2849/6 "2017-03-28T03:01:56Z")

</div>

@Mzahana Hi, try to decrease MPC\_XY\_VEL\_P, this could reduce oscillation, but the unstable still happened sometime, and to my surprise, the oscillation only effect on **roll** , that means, when I switch to POSCTL, pitch is stable but oscillation on roll is very scary.
