PID algorithm

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download

PID algorithm

Postby dramida » Mon Feb 28, 2011 1:06 pm

After many practical tests i concluded that actual PID setings works best when D=-40 = minimum influence (does anyone reach same conclusion?), so there must be something wrong with the D function code.

I encourage ALEX to redesign the Differential error function because will bring a better attitude/stability of multiwii with little effort. The D term could be also implemented in AutoLevel.

My experimental findings are sustained by OlliW (rcGroups) http://www.rcgroups.com/forums/showpost ... count=9901

Originally Posted by OlliW View Post
OK. Thanks.

Since you can note/feel the difference as compared to a simple d(n,n-1)/2, may I suggest to try also
( delta + 2*delta1 + delta2 )/4

As mentioned the moving average has some bad lowpass properties (it does not reduce the noise in this application, and has a "poor" frequency behavior). I have just double-checked the web, and it tells that these are FIR filters. In order to build a lowpass with these it is recommended to
- have the prefactors to sum to one (here 1/4 + 2/4 + 1/4 = 1)
- have the prefactors to be symmetric (here the first and last are equal)
- have an odd number of terms (here delta3 is hence not used)

The above builds a lowpass of second order, and could hence have advantages:
- avoids the "infinite response" problem of the simple D term
- being of second order it should also reduce the noise in the differences similar to a one order lowpass

However, clearly, this is just on paper, I have no practical experience with that (for multicopters). Might be interesting to see whether the aledged advantages can be noted/felt.

Olli
User avatar
dramida
 
Posts: 473
Joined: Mon Feb 28, 2011 12:58 pm
Location: Bucharest

Return to Software development

Who is online

Users browsing this forum: No registered users and 1 guest