Average the PID Result

Hi Everybody,

In my quad do it from myself with pic32mx architechture write in MikroC, my frequency loop of read from sensor and pid calculated is 200hz.

I do a mobile average(array of 5) of pid  result for have a smooth output power. 

Do you think is a good idea or there is something wrong in my pid alghoritm??

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • I dont think averaging pid output is a great idea.... it will really affect response times negatively, unless you average over a very short duration...

    Your response will be dampend directly by your data collection time.

    Also, manipulating values out of a controller is a bad idea in principal, and may have unpredictable consequences with thr controller algorythm itself, which imcludes a likely unprdictable scaling on your p term.
This reply was deleted.