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
Workings of an Autopilot
#1
Wink 
First time post - I've never had or been on a boat with an autopilot, so please bare with me.  I've been searching the Internet, but I'm not using the right key words so far.  If you have a reference link or could suggest a set of key words or if you might take a stab at explaining... I'd really appreciate it.

I've seen pictures of tiller pilots, wheel pilots and on larger boats where it's built-in under the deck.  I can fathom how they work in the very simple case of smooth water and a constant boat speed.  I assume they simply follow a course and if the boat veers off the course the pilot simple moves the rudder to compensate.  I can also see a little more advanced version would know its GPS coordinates and determine the path to a GPS waypoint and steer that course.  

I've recently discovered OpenCPN, downloaded and ran some charts for my area on a laptop and then on a RaspPi 4.  Then I discovered OpenPlotter and have been reading about OpenPlotter, PyPilot and the required hardware.  I thought I had a pretty good handle on the workings until I saw that the MacArthur HAT indicated it had accelerometers and would feed heel and trim to the calculations for the auto pilot.  Therefore in the more complicated situations where there are waves coming in from multiple directions and different periods, and further on a sailboat with heel and variable heel with gusts, that the accelerometers would be funneling tons of data to the computer. 

In my simplistic mind, I would have thought that the autopilot would simply fix the rudder and as the boat veers going up a wave and then veers in the opposite direction going down the wave, that the average would still basically be on the same direction.  That the autopilot would only adjust for trends too far off the desired direction.  That it would seem (especially on a sailboat with limited power storage) it would be best to not be constantly driving the piston back and forth for every wave.  But... now, I'm guessing, it is desirable (for some reason???) to move the rudder dynamically with every wave.

 What I'd like to learn about:

  1. What is the desirable response of the rudder to this accelerometer data and why?
  2. What piece of software is using the accelerometer and determining the rudder angle (OpenCPN, PyPilot, code in MaArthur HAT, code in the tiller pilot)?
  3. Is it simply using some kind of PID (Proportional–integral–derivative) algorithm or is it using something more AI (Artificial Intelligence) like to predict the sea state and what to do with the rudder?
  4. In simple AutoPilots like Raymarine St2000 Tiller Pilot, do they do all these calculations internally or do they do some simplistic subset?
  5. Does PyPilot send NMEA messages to a Tiller Pilot or does it control the motor driver directly?

Thank you for any suggestions of where to find my answers or explaining if you are willing to help reduce my ignorance.  Confused Huh
Reply
#2

  1. It depends.   Moving the rudder for every wave depends on the boat, the wave size, and the desired results.
  2. pypilot is using the data, but the gyros are essential.   The accelerometers are combined with the gyros and compass sensors in a kalman filter.
  3. The basic pilot is using an extended PID filter, but I am working on artificial intelligence.   It probably has less benefits than you might expect though at least for most users.
  4. The older tiller pilots often used mechanically gimbaled fluxgate compass which is by now about 30 years old and very susceptible to resonance.   Imagine hanging the sensors to tilt compensate them and how they can swing around and make the boat steer in S which further causes them to swing around. Mechanical wind vanes have this same issue. Those tiller pilots do not have accelerometers and the rate of change is determined from compass alone which gives poor course holding.
  5. pypilot sends and receives both signalk, and nmea0183, but it directly commands a motor controller which moves the rudder.   To use older tiller pilots you would remove all of the electronics and directly wire the motor to a pypilot motor controller. 
Reply
#3
Thank you for taking the time to answer my questions.  After my post, I found your videos and have watched all of them.  Outstanding DIY work!  I really enjoyed the wiper motor driving a tiller Exclamation" pid="28507" dateline="1706835597"]

Are you doing something explicit to account for digital gyro's drift or does the Kalman filter implicitly take care of that?  I'm guessing your time frame deltas don't really need to know the original zero point.

I explored the possibility of checking out your code.  In one of your videos you mentioned trying out AI (machine learning) and I wanted to see if you had made progress down that path.  I discovered the Py.... is for Python and I don't read Python well enough to go digging.  Big Grin  

But I completely agree that AI wouldn't help most people.  I got interested reading a racing sailor's trying to describe what he does in a race.  He was only able to describe the broad brush strokes and I got the impression, much of it was so instinctual for him that he wasn't even aware of much of what he does.  He mentioned being off shift, down below and "feeling" the conditions and cringing that the current team member didn't respond correctly in a timely manner.

I've been doing some Machine Learning (Genetic Algorithms) on a totally non-related project and thought it would be a fantastic addition to an Auto Pilot.  It would have to learn from an experienced sailor (like the racer) and would only be valid for that boat.  The average Joe (like me) would just be teaching it bad habits.   Tongue 

[quote pid="28507" dateline="1706835597"]
Thank you for taking the time to answer my questions.  After my post, I found your videos and have watched all of them.  Outstanding DIY work!  I really enjoyed the wiper motor driving a tiller Exclamation

Are you doing something explicit to account for digital gyro's drift or does the Kalman filter implicitly take care of that?  I'm guessing your time frame deltas don't really need to know the original zero point.

I explored the possibility of checking out your code.  In one of your videos you mentioned trying out AI (machine learning) and I wanted to see if you had made progress down that path.  I discovered the Py.... is for Python and I don't read Python well enough to go digging.  Big Grin  

But I completely agree that AI wouldn't help most people.  I got interested reading a racing sailor's trying to describe what he does in a race.  He was only able to describe the broad brush strokes and I got the impression, much of it was so instinctual for him that he wasn't even aware of much of what he does.  He mentioned being off shift, down below and "feeling" the conditions and cringing that the current team member didn't respond correctly in a timely manner.

I've been doing some Machine Learning (Genetic Algorithms) on a totally non-related project and thought it would be a fantastic addition to an Auto Pilot.  It would have to learn from an experienced sailor (like the racer) and would only be valid for that boat.  The average Joe (like me) would just be teaching it bad habits.   Tongue
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)