This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adjusting Gains 101
#1
Perhaps the biggest documentation need for Pypilot will be a description of the various Gain settings, and a description of how to go about dialing in Pypilot in a new installation. 

Sean explained these in another thread:


Quote:D2 -- experimental is the D gain squared. Will make adjustments with very fast boat movement but not much if the boat is turning slower. Is non-linear
FF -- feed forward This gain applies rudder movement with changing heading command. When holding a heading it does nothing, but takes effect following routes, or when you adjust the heading
DD -- rate of rate of change. basically the derivative of the D gain, very useful to reduce overshoot and lag
PR -- experimental Square root of position gain. This makes less movements when the heading is very wrong to avoid overshoot.


What gains should be adjusted and when? How might the on-screen display of the various Gains firing help in finding the right settings? 

A video on this topic might also be helpful. 

Preferably avoiding complex mathematical concepts. Smile
Reply
#2
Simple explanation (for now)

Starting out, you mostly need just D gain, and a bit of P to avoid drifting off course. It's possible to hold a course using just these two gains setting all the rest to zero. From there, try adding other gains to see the difference.

Notes:
1) Using a high value for PR, and cutting the P gain way back can reduce overshoot and oscillation, but some P is usually needed.

2) The I gains is useful if the course held has an offset from the course desired, or following routes is along a parallel line rather than the actual route.

3) The FF gain helps in maneuvering, tacking, and following routes.

4) The DD gain can be useful to reduce oscillation, try slowly increasing it, but not to a value higher than 1.5x of the D gain

5) Lower gains typically mean lower power consumption, but not always. If the gains are too high, the autopilot will track all over.

6) A fairly wide range of P and D gains can yield similar performance, especially in light conditions


In the future I am looking forward to auto-tuning, as well as different options for non-PID control such as neural networks, which can learn and utilize more sensor inputs, but I am not there yet.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)