Any suggestion of improvement for PID tuning

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Any suggestion of improvement for PID tuning

Eltonwu
    Currently I try to tune the PID params of attitude more efficient.The performance of the PID is not still satisfied.If I operate the stick gently. the copter perform steady and no oscillation,but if I operate the stick roughly,such as perform a brake suddenly when the copter speed is very high speed. the copter oscillate very much about 500 ms and become steady.

   the following is the curves when flying . Can anyone give me some suggestion to improve the PID?

Thanks in advance

<define name="PHI_PGAIN"  value="135"/>
<define name="PHI_DGAIN"  value="88"/>
<define name="PHI_IGAIN"  value="80"/>
<define name="PHI_DDGAIN"   value="120"/>



<define name="PHI_PGAIN"  value="145"/>
<define name="PHI_DGAIN"  value="88"/>
<define name="PHI_IGAIN"  value="5"/>
<define name="PHI_DDGAIN"   value="120"/>


Reply | Threaded
Open this post in threaded view
|

Re: Any suggestion of improvement for PID tuning

Hwarm
Hi,
a more efficient  system is backstapping,  a model based system.
If you  want to integrate in paparazzi i can send you  a paper of it.
The basic idea is to use not a  feedback control system  for the
stabilization.
Instead the  the rate signals are  multiplied with a negative  factor
and the result is   used for the generation  of the basic signals trust,
roll pitch  and yaw.
The stick signals are direct used the additionally.
I can send you same papers of it.
I wrote togehter with pione  a paper.  I use backstepping  since six
years for my one muticopter software. It works perfect and generate less
vibrations.
I think you need less than 30 lines of code to implement it in paparazzi.
But it is difficult to find out where to change the code.
Regads

Heinrich


Eltonwu schrieb:

>    Currently I try to tune the PID params of attitude more efficient.The
>performance of the PID is not still satisfied.If I operate the stick gently.
>the copter perform steady and no oscillation,but if I operate the stick
>roughly,such as perform a brake suddenly when the copter speed is very high
>speed. the copter oscillate very much about 500 ms and become steady.
>
>   the following is the curves when flying . Can anyone give me some
>suggestion to improve the PID?
>
>Thanks in advance
>
><define name="PHI_PGAIN"  value="135"/>
><define name="PHI_DGAIN"  value="88"/>
><define name="PHI_IGAIN"  value="80"/>
><define name="PHI_DDGAIN"   value="120"/>
><http://lists.paparazziuav.org/file/n16076/1358880.png>
><http://lists.paparazziuav.org/file/n16076/ff_1358880.png>
>
><define name="PHI_PGAIN"  value="145"/>
><define name="PHI_DGAIN"  value="88"/>
><define name="PHI_IGAIN"  value="5"/>
><define name="PHI_DDGAIN"   value="120"/>
><http://lists.paparazziuav.org/file/n16076/1458805.png>
><http://lists.paparazziuav.org/file/n16076/ff1458805.png>
>
>
>
>
>--
>View this message in context: http://lists.paparazziuav.org/Any-suggestion-of-improvement-for-PID-tuning-tp16076.html
>Sent from the paparazzi-devel mailing list archive at Nabble.com.
>
>_______________________________________________
>Paparazzi-devel mailing list
>[hidden email]
>https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
>
>  
>


_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
Reply | Threaded
Open this post in threaded view
|

Re: Any suggestion of improvement for PID tuning

agressiva
Hi Heinrich, i searching for a good paper about backstapping a long time ago.
Can yoy send me this paper ?

regards.


> Date: Thu, 4 Sep 2014 08:33:55 +0200

> From: [hidden email]
> To: [hidden email]
> Subject: Re: [Paparazzi-devel] Any suggestion of improvement for PID tuning
>
> Hi,
> a more efficient system is backstapping, a model based system.
> If you want to integrate in paparazzi i can send you a paper of it.
> The basic idea is to use not a feedback control system for the
> stabilization.
> Instead the the rate signals are multiplied with a negative factor
> and the result is used for the generation of the basic signals trust,
> roll pitch and yaw.
> The stick signals are direct used the additionally.
> I can send you same papers of it.
> I wrote togehter with pione a paper. I use backstepping since six
> years for my one muticopter software. It works perfect and generate less
> vibrations.
> I think you need less than 30 lines of code to implement it in paparazzi.
> But it is difficult to find out where to change the code.
> Regads
>
> Heinrich
>
>
> Eltonwu schrieb:
>
> > Currently I try to tune the PID params of attitude more efficient.The
> >performance of the PID is not still satisfied.If I operate the stick gently.
> >the copter perform steady and no oscillation,but if I operate the stick
> >roughly,such as perform a brake suddenly when the copter speed is very high
> >speed. the copter oscillate very much about 500 ms and become steady.
> >
> > the following is the curves when flying . Can anyone give me some
> >suggestion to improve the PID?
> >
> >Thanks in advance
> >
> ><define name="PHI_PGAIN" value="135"/>
> ><define name="PHI_DGAIN" value="88"/>
> ><define name="PHI_IGAIN" value="80"/>
> ><define name="PHI_DDGAIN" value="120"/>
> ><http://lists.paparazziuav.org/file/n16076/1358880.png>
> ><http://lists.paparazziuav.org/file/n16076/ff_1358880.png>
> >
> ><define name="PHI_PGAIN" value="145"/>
> ><define name="PHI_DGAIN" value="88"/>
> ><define name="PHI_IGAIN" value="5"/>
> ><define name="PHI_DDGAIN" value="120"/>
> ><http://lists.paparazziuav.org/file/n16076/1458805.png>
> ><http://lists.paparazziuav.org/file/n16076/ff1458805.png>
> >
> >
> >
> >
> >--
> >View this message in context: http://lists.paparazziuav.org/Any-suggestion-of-improvement-for-PID-tuning-tp16076.html
> >Sent from the paparazzi-devel mailing list archive at Nabble.com.
> >
> >_______________________________________________
> >Paparazzi-devel mailing list
> >[hidden email]
> >https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
> >
> >
> >
>
>
> _______________________________________________
> Paparazzi-devel mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
Reply | Threaded
Open this post in threaded view
|

Re: Any suggestion of improvement for PID tuning

agressiva
In reply to this post by Eltonwu
Well, i dont know anything about your frame but i think you are using values too low.

For example, here are the setting i use for my 450class quadcopter

    <define name="PHI_PGAIN"  value="1500"/>
    <define name="PHI_DGAIN"  value="600"/>
    <define name="PHI_IGAIN"  value="550"/>

It fly super stable and have fast response to stick command with original reference values.
BTW, i set the some reference parameter to make the response a bit slow (more smooth fly)




> Date: Wed, 3 Sep 2014 19:57:21 -0700

> From: [hidden email]
> To: [hidden email]
> Subject: [Paparazzi-devel] Any suggestion of improvement for PID tuning
>
> Currently I try to tune the PID params of attitude more efficient.The
> performance of the PID is not still satisfied.If I operate the stick gently.
> the copter perform steady and no oscillation,but if I operate the stick
> roughly,such as perform a brake suddenly when the copter speed is very high
> speed. the copter oscillate very much about 500 ms and become steady.
>
> the following is the curves when flying . Can anyone give me some
> suggestion to improve the PID?
>
> Thanks in advance
>
> <define name="PHI_PGAIN" value="135"/>
> <define name="PHI_DGAIN" value="88"/>
> <define name="PHI_IGAIN" value="80"/>
> <define name="PHI_DDGAIN" value="120"/>
> <http://lists.paparazziuav.org/file/n16076/1358880.png>
> <http://lists.paparazziuav.org/file/n16076/ff_1358880.png>
>
> <define name="PHI_PGAIN" value="145"/>
> <define name="PHI_DGAIN" value="88"/>
> <define name="PHI_IGAIN" value="5"/>
> <define name="PHI_DDGAIN" value="120"/>
> <http://lists.paparazziuav.org/file/n16076/1458805.png>
> <http://lists.paparazziuav.org/file/n16076/ff1458805.png>
>
>
>
>
> --
> View this message in context: http://lists.paparazziuav.org/Any-suggestion-of-improvement-for-PID-tuning-tp16076.html
> Sent from the paparazzi-devel mailing list archive at Nabble.com.
>
> _______________________________________________
> Paparazzi-devel mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
Reply | Threaded
Open this post in threaded view
|

Re: Any suggestion of improvement for PID tuning

Hawk Wang
In reply to this post by agressiva

hi Heinrich,

I am also looking for good papers on this problem. Would you please share them with me too?

Thanks!

2014-9-4 下午11:10于 "Eduardo lavratti" <[hidden email]>写道:
Hi Heinrich, i searching for a good paper about backstapping a long time ago.
Can yoy send me this paper ?

regards.


> Date: Thu, 4 Sep 2014 08:33:55 +0200
> From: [hidden email]
> To: [hidden email]
> Subject: Re: [Paparazzi-devel] Any suggestion of improvement for PID tuning
>
> Hi,
> a more efficient system is backstapping, a model based system.
> If you want to integrate in paparazzi i can send you a paper of it.
> The basic idea is to use not a feedback control system for the
> stabilization.
> Instead the the rate signals are multiplied with a negative factor
> and the result is used for the generation of the basic signals trust,
> roll pitch and yaw.
> The stick signals are direct used the additionally.
> I can send you same papers of it.
> I wrote togehter with pione a paper. I use backstepping since six
> years for my one muticopter software. It works perfect and generate less
> vibrations.
> I think you need less than 30 lines of code to implement it in paparazzi.
> But it is difficult to find out where to change the code.
> Regads
>
> Heinrich
>
>
> Eltonwu schrieb:
>
> > Currently I try to tune the PID params of attitude more efficient.The
> >performance of the PID is not still satisfied.If I operate the stick gently.
> >the copter perform steady and no oscillation,but if I operate the stick
> >roughly,such as perform a brake suddenly when the copter speed is very high
> >speed. the copter oscillate very much about 500 ms and become steady.
> >
> > the following is the curves when flying . Can anyone give me some
> >suggestion to improve the PID?
> >
> >Thanks in advance
> >
> ><define name="PHI_PGAIN" value="135"/>
> ><define name="PHI_DGAIN" value="88"/>
> ><define name="PHI_IGAIN" value="80"/>
> ><define name="PHI_DDGAIN" value="120"/>
> ><http://lists.paparazziuav.org/file/n16076/1358880.png>
> ><http://lists.paparazziuav.org/file/n16076/ff_1358880.png>
> >
> ><define name="PHI_PGAIN" value="145"/>
> ><define name="PHI_DGAIN" value="88"/>
> ><define name="PHI_IGAIN" value="5"/>
> ><define name="PHI_DDGAIN" value="120"/>
> ><http://lists.paparazziuav.org/file/n16076/1458805.png>
> ><http://lists.paparazziuav.org/file/n16076/ff1458805.png>
> >
> >
> >
> >
> >--
> >View this message in context: http://lists.paparazziuav.org/Any-suggestion-of-improvement-for-PID-tuning-tp16076.html
> >Sent from the paparazzi-devel mailing list archive at Nabble.com.
> >
> >_______________________________________________
> >Paparazzi-devel mailing list
> >[hidden email]
> >https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
> >
> >
> >
>
>
> _______________________________________________
> Paparazzi-devel mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel


_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
Reply | Threaded
Open this post in threaded view
|

Re: Any suggestion of improvement for PID tuning

Eltonwu
In reply to this post by agressiva
Thank you

Do you know the effect of DDGAIN, the feedforward?
Reply | Threaded
Open this post in threaded view
|

Re: Any suggestion of improvement for PID tuning

Eltonwu
In reply to this post by Hawk Wang
I try to use a higher value, but when I use a higher value, the airframe vibrate violently,then I try to decrease the value,start from 1500 then 1200, 800, finally I found 500 (pgain)vibrate acceptable.but I found the curve something strange,The vibration is not around the sp_value,but above the sp_value.When I increase the igain. The curves have no any changes.

Any idea? Thank you
 
Reply | Threaded
Open this post in threaded view
|

Re: Any suggestion of improvement for PID tuning

flixr
Administrator
Sounds like you run into the limits set by the reference model (MAX_[PQR] and MAX_[PQR]_DOT).
Increase the limits if you want to allow a faster angular rate and angular acceleration.

On Wed, Sep 10, 2014 at 7:15 AM, Eltonwu <[hidden email]> wrote:
I try to use a higher value, but when I use a higher value, the airframe
vibrate violently,then I try to decrease the value,start from 1500 then
1200, 800, finally I found 500 (pgain)vibrate acceptable.but I found the
curve something strange,The vibration is not around the sp_value,but above
the sp_value.When I increase the igain. The curves have no any changes.

Any idea? Thank you




--
View this message in context: http://lists.paparazziuav.org/Any-suggestion-of-improvement-for-PID-tuning-tp16076p16098.html
Sent from the paparazzi-devel mailing list archive at Nabble.com.

_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel


_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
Reply | Threaded
Open this post in threaded view
|

Re: Any suggestion of improvement for PID tuning

Eltonwu
if I understand correctly, what you meaning is the reason of increasing Dgain can't prevent the airframe from vibration violently is the problem of limitation of MAX_[PQR] and MAX_[PQR]_DOT ? Am I correct ?Thank you
Reply | Threaded
Open this post in threaded view
|

Re: Any suggestion of improvement for PID tuning

flixr
Administrator
Sorry, I misunderstood you before.
Vibration on the airframe can have lots of different sources...
To check the control part, plot the reference angles and rates from the STAB_ATTITUDE_REF_INT message.
The ref_phi|theta|psi angles are computed by the reference model from the setpoint (which can have steps), so basically the "filtered" angle setpoints that are then compared to the current attitude angles and the error used in the proportional part of the PID controller. Respectively ref_p|q|r is used in for the dgain and ref_pd|qd|rd for the feedforward dd-gain.

On Thu, Sep 11, 2014 at 2:56 AM, Eltonwu <[hidden email]> wrote:
if I understand correctly, what you meaning is the reason of increasing Dgain
can't prevent the airframe from vibration violently is the problem of
limitation of MAX_[PQR] and MAX_[PQR]_DOT ? Am I correct ?Thank you



--
View this message in context: http://lists.paparazziuav.org/Any-suggestion-of-improvement-for-PID-tuning-tp16076p16103.html
Sent from the paparazzi-devel mailing list archive at Nabble.com.

_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel


_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel