Autopilot PID controls - Raymarine equivalents?

dunedin

Well-known member
Joined
3 Feb 2004
Messages
14,089
Location
Boat (over winters in) the Clyde
Visit site
There is a good article in Yachting World about how modern autopilots can be better than human helms these days - but needs good calibration, plus adjustment of three factors it’s calls PID - Proportional, Integral and Derivative feedback.
The examples are based on a modern B&G autopilot, and I don’t recognise the terms from when I last looked at the manuals for my 2012 Raymarine SPX10 autopilot. The only adjustment I tend to use regularly is called Response (and tend to calm it to 3 under motor or flat water sailing, stepping up to 5 or so as waves and wind increase) As the A/P tends to be in use 90% of time under sail, keen to make best use of the functions, but do they exist on Raymarine (possibly under different names)?
 

rogerthebodger

Well-known member
Joined
3 Nov 2001
Messages
13,729
Visit site
PID control is a basic form used in process control instrumentation.

The PI part is quite easy to set up but the derivative portion can be tricky as it tries to predict the amount of corrective action that needs to be applied based on the rate of change of the error component.

I would doubt is any autopilot would have any significant derivative component.

My simrad autopilot has a corrective component which is based on the boat speed. Fast motor boats need a faster reaction to any course error than a slow moving sailing boat.
 

prv

Well-known member
Joined
29 Nov 2009
Messages
37,361
Location
Southampton
Visit site
I think PID controllers were originally developed, as pneumatic devices, for ship autopilots in the mid 20th century. They then found use, as you say, for controlling all sorts of other systems. I wouldn’t expect a modern autopilot to be a simple PID controller, and if it were I wouldn’t expect the terms to be directly user tunable. There’s a degree of knowledge and skill needed to tune controllers; an old-school consumer autopilot would have it mostly fixed to good general values for most boats, with a limited amount of tuning exposed. Newer ones are self-tuning, with just a setting for how tight you want the course-following to be versus motor action and power use.

Pete
 

dunedin

Well-known member
Joined
3 Feb 2004
Messages
14,089
Location
Boat (over winters in) the Clyde
Visit site
I wouldn’t expect a modern autopilot to be a simple PID controller, and if it were I wouldn’t expect the terms to be directly user tunable.

Well according to the yachting World article all three factors can - and their experts advised should - be fine tuned on modern cruising yacht B&G autopilot.

Perhaps our triple hulled guru may advise :cool:
 

DJE

Well-known member
Joined
21 Jun 2004
Messages
7,666
Location
Fareham
www.casl.uk.com
They must be getting heaps of data from the 9-axis sensor gizmos. Wouldn't know where to start tuning the response to that lot.
 

rogerthebodger

Well-known member
Joined
3 Nov 2001
Messages
13,729
Visit site
I think PID controllers were originally developed, as pneumatic devices, for ship autopilots in the mid 20th century.

Pete

Not just pneumatic devices in fact pneumatic actuators are not on their own precise enough.

I worked for a company in the leaf processing industry industry in the late 1970's early 1980's and used PID controllers extensively to get the moisture content with in a very precise range.

The study of PID controller is a subject on its own in instrumentation engineering.

http://www.cds.caltech.edu/~murray/books/AM08/pdf/am06-pid_16Sep06.pdf

This is a good document on the subject and covers theory and various of setting the gain of the 3 sections.

PID control was also used in analogue op amps for feed back to control various functions.

We were in the early 1980's started to implement PID controllers in software in digital computers using PDP 11 computers.


 

prv

Well-known member
Joined
29 Nov 2009
Messages
37,361
Location
Southampton
Visit site
They must be getting heaps of data from the 9-axis sensor gizmos. Wouldn't know where to start tuning the response to that lot.

Exactly. A PID controller only takes one input, adjusting its output to try to keep the input as close as possible to a specified value. So a really basic autopilot - a simplified example for a beginner's textbook - has a heading input, a desired heading value, and a rudder-position output which it adjusts to try to hold the heading.

If B&G autopilots were really this simple, they wouldn't be winning races. They have an AHRS giving them absolute values and accelerations on all axes, and one has to assume they're making use of this data. There's probably some PID loops going on inside it, but the pilot as a whole can't just be one classical PID controller.

Pete
 

TernVI

Well-known member
Joined
8 Jul 2020
Messages
5,070
Visit site
A 'rate gyro' gives you a rate of turn input. That is the derivative of 'heading' .
Compass gives you the heading.
Integrating the compass gives you average course.
Sperry worked on this before WW1.
That didn't really come to fruition until the 30s.
I think the maths goes back to steam engines etc.

I think some gyros are talking about rotational acceleration, rate of turn, course and average course, so really four terms.
You could also be measuring/calculating the same terms in your control variable, rudder acceleration, rudder speed, rudder angle and average rudder angle.

Lots of 'hard sums' but also lots of crossover from other fields to be used?
 

RupertW

Well-known member
Joined
20 Mar 2002
Messages
10,272
Location
Greenwich
Visit site
A 'rate gyro' gives you a rate of turn input. That is the derivative of 'heading' .
Compass gives you the heading.
Integrating the compass gives you average course.
Sperry worked on this before WW1.
That didn't really come to fruition until the 30s.
I think the maths goes back to steam engines etc.

I think some gyros are talking about rotational acceleration, rate of turn, course and average course, so really four terms.
You could also be measuring/calculating the same terms in your control variable, rudder acceleration, rudder speed, rudder angle and average rudder angle.

Lots of 'hard sums' but also lots of crossover from other fields to be used?
Maybe hard sums but maybe not. I’m planning to write a Pi autopilot as a Winter project using as many inputs as I can including all the ones above plus accelerations, direction, heel etc so it can know about wave height and frequency and heeling effect on weather helm etc.

But my plan is to write some basic AI to learn from the existing autopilot and hand steering and then itself steering so I never have to work out the hard sums just let it crunch through thousands of snapshot input.

Of course this may all get shelved if I need to actually fix something real on the boat.
 

mjcoon

Well-known member
Joined
18 Jun 2011
Messages
4,660
Location
Berkshire, UK
www.mjcoon.plus.com
There is a good article in Yachting World about how modern autopilots can be better than human helms these days - but needs good calibration, plus adjustment of three factors it’s calls PID - Proportional, Integral and Derivative feedback.
The examples are based on a modern B&G autopilot, and I don’t recognise the terms from when I last looked at the manuals for my 2012 Raymarine SPX10 autopilot. The only adjustment I tend to use regularly is called Response (and tend to calm it to 3 under motor or flat water sailing, stepping up to 5 or so as waves and wind increase) As the A/P tends to be in use 90% of time under sail, keen to make best use of the functions, but do they exist on Raymarine (possibly under different names)?
So I thought I'd download a B&G autopilot manual at random and search. Chose H3000. Has a section called "Response" with some basic choices...
 

AngusMcDoon

Well-known member
Joined
20 Oct 2004
Messages
8,834
Location
Up some Hebridean loch
Visit site
There's probably some PID loops going on inside it, but the pilot as a whole can't just be one classical PID controller.

There is.
It isn't.
There is a significant difference between B&G autopilots retail offerings and those developed for boats like IMOCA 60's.
Beyond that, I cannot say.
 
Last edited:

Shuggy

Well-known member
Joined
10 Mar 2006
Messages
1,155
Location
Argyll
Visit site
I’ve just installed and commissioned a new Simrad/B&G autopilot. None of the above sounds familiar!
 

andrewAB

Member
Joined
16 Jun 2013
Messages
64
Location
Cardiff / Ionian
Visit site
Maybe hard sums but maybe not. I’m planning to write a Pi autopilot as a Winter project using as many inputs as I can including all the ones above plus accelerations, direction, heel etc so it can know about wave height and frequency and heeling effect on weather helm etc.

But my plan is to write some basic AI to learn from the existing autopilot and hand steering and then itself steering...

Have a look at the Pypilot.org open source autopilot. Maybe your learning module could be added to that.

The pypilot has tunable PID parameters but it would be nice uf it could learn to stear just like me.
 

RupertW

Well-known member
Joined
20 Mar 2002
Messages
10,272
Location
Greenwich
Visit site
Have a look at the Pypilot.org open source autopilot. Maybe your learning module could be added to that.

The pypilot has tunable PID parameters but it would be nice uf it could learn to stear just like me.
I’m in two minds about Pypilot as this as a personal YAPP and I’d like to do some of the basic autopilot thinking too. But in general I agree it’s better to stand on the shoulders of others.
 
Top