# Problem about PID

**URL:** <https://discuss.px4.io/t/problem-about-pid/7653>\
**Category:** PX4 Autopilot\
**Created:** [August 29, 2018, 11:43am UTC](https://discuss.px4.io/t/problem-about-pid/7653 "2018-08-29T11:43:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![1163666780](https://discuss.px4.io/user_avatar/discuss.px4.io/1163666780/32/2377_2.png) [@1163666780](https://discuss.px4.io/u/1163666780)\
**Post date:** [August 29, 2018, 11:43am UTC](https://discuss.px4.io/t/problem-about-pid/7653/1 "2018-08-29T11:43:21Z")

</div>

Hello ,i met a problem about the PID tuning.The action i do like this: first put the pitch jostick full forward a little time,the plane go head ,then i put the pitch joystick full back,and go center when the plane stop. But i found the plane Brake angle bigger than 20 deg(i set the max angle in air to 20).

 ![](https://discuss.px4.io/uploads/default/original/2X/7/72afc2de345c03180190405de11a789c6ecf0605.png)  
 ![](https://discuss.px4.io/uploads/default/original/2X/4/49a54c8ab80bb469f18f57d56557b08d6c0ad222.png)

 ![](https://discuss.px4.io/uploads/default/original/2X/9/977918cdee5b5dc284d7949566e73f0498e23bc1.png)

---

<div class="post-metadata">

**Author:** ![bresch](https://discuss.px4.io/user_avatar/discuss.px4.io/bresch/32/2343_2.png) [@bresch](https://discuss.px4.io/u/bresch)\
**Post date:** [August 30, 2018, 7:04am UTC](https://discuss.px4.io/t/problem-about-pid/7653/2 "2018-08-30T07:04:49Z")

</div>

Hi @1163666780 ,

There is definitely a tuning problem (possibly in the rate controller, but I would need to zoom a bit in the graphs). Could you share the URL link of the log please?

---

<div class="post-metadata">

**Author:** ![1163666780](https://discuss.px4.io/user_avatar/discuss.px4.io/1163666780/32/2377_2.png) [@1163666780](https://discuss.px4.io/u/1163666780)\
**Post date:** [August 31, 2018, 12:26am UTC](https://discuss.px4.io/t/problem-about-pid/7653/4 "2018-08-31T00:26:29Z")

</div>

Full brake make the plane Concussion and the angle be bigger than I limit. I had try to change the value THD\_MDL\_AFC from 0 to 0.3,0.4 and 0.5,it make the joystick be slow around the center,so i make it back to zero.

---

<div class="post-metadata">

**Author:** ![1163666780](https://discuss.px4.io/user_avatar/discuss.px4.io/1163666780/32/2377_2.png) [@1163666780](https://discuss.px4.io/u/1163666780)\
**Post date:** [August 31, 2018, 12:26am UTC](https://discuss.px4.io/t/problem-about-pid/7653/5 "2018-08-31T00:26:42Z")

</div>

sure,sorry i forgot that.  
this is the url:  
[https://logs.px4.io/plot\_app?log=f919e400-6b0d-49f0-a708-fdbe882ab03f1](https://logs.px4.io/plot_app?log=f919e400-6b0d-49f0-a708-fdbe882ab03f1)

Thanks and best wishes

---

<div class="post-metadata">

**Author:** ![1163666780](https://discuss.px4.io/user_avatar/discuss.px4.io/1163666780/32/2377_2.png) [@1163666780](https://discuss.px4.io/u/1163666780)\
**Post date:** [September 3, 2018, 3:46am UTC](https://discuss.px4.io/t/problem-about-pid/7653/6 "2018-09-03T03:46:40Z")

</div>

new log : [https://logs.px4.io/plot\_app?log=08e2749e-39f2-4bcf-b72e-bf8b9e5a8169](https://logs.px4.io/plot_app?log=08e2749e-39f2-4bcf-b72e-bf8b9e5a8169)

---

<div class="post-metadata">

**Author:** ![bresch](https://discuss.px4.io/user_avatar/discuss.px4.io/bresch/32/2343_2.png) [@bresch](https://discuss.px4.io/u/bresch)\
**Post date:** [September 7, 2018, 8:12am UTC](https://discuss.px4.io/t/problem-about-pid/7653/7 "2018-09-07T08:12:20Z")

</div>

Hi, your overshoot in attitude is due to improper tuning of the rate loops. You need to change the PID rate gains and you also might need to lower the gyro cutoff frequency `IMU\_GYRO\_CUTOFF’ (in Hz).

---

<div class="post-metadata">

**Author:** ![1163666780](https://discuss.px4.io/user_avatar/discuss.px4.io/1163666780/32/2377_2.png) [@1163666780](https://discuss.px4.io/u/1163666780)\
**Post date:** [September 10, 2018, 4:10am UTC](https://discuss.px4.io/t/problem-about-pid/7653/8 "2018-09-10T04:10:57Z")

</div>

Thanks for your reply.  
I will try to change the parameters.  
And why should i change the value IMU\_GYRO\_CUTOFF?
