You do know about the "hunting problem" that exists with small boats equipped
with autopilots, right?
Right?
--
Harry Krause
------------
Adult book store: the pubic library
>
>You do know about the "hunting problem" that exists with small boats
equipped
>with autopilots, right?
>
Not to worry, he intends to go fishing, not hunting.
Russ
Touche...
--
Harry Krause
------------
Do you prefer Gin and Platonic, or Scotch and Sofa?
> You do know about the "hunting problem" that exists with small boats equipped
> with autopilots, right?
When I used a King mount-on-steering-column autopilot, this was mostly a
problem when using the fluxgate compass to hold a heading. Holding a CDI
output from my LORAN tracked very well.
--
Welcome President Bush, Mrs. Bush, and my fellow astronauts.
-- Dan Quayle
> Dan <d...@angband.org> wrote:
> * In rec.boats Igor20447 <ignoram...@nospam.20447.invalid> wrote:
> *
> * > What I am thinking of doing is making my own boat autopilot. I
> already * > have a GPS. My thinking is, to make it, I would need to buy
> a laptop * > computer, and then write a program that would control the
> servos with * > feedback from GPS and maybe some course indicator
> connected to a synchro. *
> * Seems like overkill... Why not use a BASIC Stamp
> (www.parallaxinc.com) to * parse the NMEA output? If it helps, there is
> already a guy who * manufactures converters from NMEA data to the +/-
> 150mv that aviation * autopilots use. http://www.porcine.com/
>
> Wow, this is cool indeed.
>
> So, I use this BASIC stamp to parse the NMEA output. That's fine. And I
> know basic, even though I would prefer perl. But then, I need to
> convert the stamp's output to the servo motor's input, which I am not
> sure how to do.
>
> Now, based on what you say and their website, I would connect the
> porcine.com device directly to my GPS and it would give out +-150 mv.
>
> I suspect strongly that my servos have different control voltages than
> +/- 150 mv. That probably means that I need an amplifier. Is that
> close?
Go look at the battlebots web site and follow the links to the various
pages that have stuff on robot building. That will hook you up to a great
source of info on how to drive big DC motors as servo systems... The stamp
will work fine, then you usually convert the DC error signal to a PWM
(pulse width modulated) drive for the motor (or have the Stamp generate it
directly if there are enough MIPs... KIPs? available). There are folks
that have posted plans (free), and folks that will sell you any or all of
this stuff (V-to-PWM converters, H-bridge drives for the motors, etc)...
Like Harry said, hunting will be a problem (even if the fishing is great :-
), you will have to be really careful in setting up the time constants and
system loop gain such that you end up with a critically (or slightly more)
damped system with time constants way longer than the natural (mechanical)
times of the system...
This sounds like a fun project...
Steve
(as a reference remember that a commercial autopilot for a typical small
boat goes for < $1000, you will easily put in more that that in time, but
if you have the time, it'd be a hoot)
Roger
http://www.accessky.net/derbyrm
der...@accessky.net
"Igor20447" <ignoram...@NOSPAM.20447.invalid> wrote in message
news:slrn9mgf36.s9n...@nospam.invalid...
> derbyrm <der...@accessky.net> wrote:
> * You ask if "programming these things is difficult." Are you comfortable
> * with servo system theory in general and concerned solely with
programming
> * the PC or do you refer to the whole problem of getting a stable closed
loop
> * system with adequate response?
>
> To the whole problem.
>
> Well, I have been doing computer programming for a long time and am
> fairly comfortable with math. So while I am not familiar with the servo
> theory, I am sure that I can figure it out.
>
> My feel here is that for a boat application, the accuracy of the feedback
> system does not need to be very high. That's my feeling based on common
> sense.
>
> * Is your boat sail or power?
>
> power, with an I/O engine.
>
> * If you have a sail boat, there is a fine little book by John S. Letcher,
Jr.
> * called "Self-Steering for Sailing Craft" which addresses ways to
determine
> * the inherent stability of the boat and then discusses methods for
holding a
> * course. Several techniques for doing it with rubber bands and lines
from
> * the sheets to the tiller are described. Most of these were developed by
> * single-handers who got tired of holding the helm.
>
> Right. Fortunately (I think) i have a power boat, which solves two
> problems: 1) access to power 2) simpler equations for course change
> and such.
>
> * I spent quite a few years working on auto-pilots for aircraft. It ain't
> * simple, particularly if you want reliability.
>
> I'd be curious to know why. Anyway, the consumer marine
> autopilots (Autohelm etc) are not known for reliability
> either.
>
> * Do you have a source of 400 Hz power? (Most military surplus uses that
> * rather than 60 Hz because it needs less iron.) You can use the gear on
60
> * Hz, but you have to derate it considerably because of the heat.
>
> My servos use DC power actually.
>
> * I guess you are aware that electronics and water is a bad combination.
>
> Well, it's not salt water and my boat sits in driveway most of the
> time. It's no big deal, I have a stereo in the boat and it works just
fine.
>
> Plus, the motors that I have have double shielded bearings and generally
> seem rather well insulated.
>
> igor
>
> * "Igor20447" <ignoram...@NOSPAM.20447.invalid> wrote in message
> * news:slrn9mg9g1.qci...@nospam.invalid...
> * >
> * > I got a bunch of military surplus things, such as very high spec DC
servo
> * > motors (rated 1/3 hp and 1/2 HP). I have a couple of these motors for
> * > sale BTW but I would like to actually accomplish something with the
rest.
> * >
> * > I will also be soon getting synchros, a resolver and a servo
amplifier,
> * > also milsurp in supposedly great condition.
> * >
> * > What I am thinking of doing is making my own boat autopilot. I already
> * > have a GPS. My thinking is, to make it, I would need to buy a laptop
> * > computer, and then write a program that would control the servos with
> * > feedback from GPS and maybe some course indicator connected to a
synchro.
> * >
> * > I would connect the servo with the steering wheel via a belt. One of
my
> * > servos comes with a special pulley with teeth.
> * >
> * > Any thoughts? Is programming these things difficult?
> * >
> * > igor.
> *
> *
>
>
> --
> --------------------------------------------------------------------------
--
>
char*p="char*p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
> i c h u d o v A T a l g e b r a D O T c o m
> What I do not quite understand is why there would be need for integration.
If you use only P (proportional) and D (difference) terms in your control
loop, your error term will eventually be too small to make your actuator
move. This will produce a constant error in your heading.
To reduce this error, you need to add the integration term. This will sum
the small error, cause the controller output to increase over time, and
eventually, increase the output of the controller enough so that the
actuator will move and correct the error.
Mitch Berkson
Lloyd Sumpter
"Far Cove" Catalina 36
>>
> I suspect C/C++ is what you want. And as I said, the "connection"
between the
>GPS reading and the servo is a PID algorithm - If you don't know what PID
stands
>for, I'd suggest you abandon the project.
>
Perpetually Inoperative Dumpsterboat?
RG
This is what I mean - you need to understand control theory before launching
into this.
In a nutshell:
P (proportional) is the "workhorse" - some systems just use P. It means take
the diff. beween the setpoint and the actual, multiply by a (negative) constant,
and send that back to the process. But this results in "droop" - as the error
reaches zero, so does your control output, so there must always be an error to
give you any output. So...
I (integral) is to integrate the error, so small errors over time become big
enough to move the control. This is similar in principle to cross-track error.
D (differential) is used to anticipate: when the rate of change of error is
large, you send a large correction quickly, before waiting for the error to
become large.
In a boat's autopilot, there's an extra twist because the rudder controls
rate of change of direction rather than direction (which is your setpoint).
Then there's deadbanding, anti-reset-windup, adaptive control, and pole-zero
plots to tell you if all this is gonna be stable or not...
Better get a book or two!
Lloyd Sumpter
LSumpter Consulting
> * I suspect C/C++ is what you want. And as I said, the "connection" between the
> * GPS reading and the servo is a PID algorithm - If you don't know what PID stands
> * for, I'd suggest you abandon the project.
> C++ is my second favorite language...
> I suspect that you overestimae the complexity of this "PID" thing...
Don't you wish. :) People write PhD's about control theory. However, for
the scope of this project, close enough is good enough
Dan
--
I am not part of the problem. I am a Republican.
-- Dan Quayle
It is actually more complex than that. there are several cascaded contol
loops: An angular velocity loop, then a position error loop for the motor
position. This set is cascaded to the PID loop to actually steer the boat.
At low speed, loop closure intervals of 50mS or so will be sufficient. The
math will get somewhat complex to do it right, but there is a lot of
reference material available. As inferred in previous messages, an
autopilot will never be as adaptable as a human pilot, because it can only
react to errors imposed on the system. It cannot anticipate them.
Good luck if you continue this. Make sure you can do an IMMEDIATE
disconnect if necessary to take over manually.
Terry Stefanski
Holodeck I
You might start with Floyd Gardner's "Phaselock Techniques". It's
short but concise.
-rick-
If any one is serious about trying it I have the code to get you started on
decoding a GPS message in C on 68HC11. There isn't any control code but the
price is right. It's free to folks tinkering and reasonable if you doing it
commercially. The code ports to about anything running C. I also have the
code to decode a GPS message in Visual Basic.
If you are thinking about NMEA 2000 a 68HC12 would be a better choice with a
CAN port on it that way you could make it do either NMEA standard. A NMEA
2000 autopilot will be a big undertaking.
You could run it on a lap top running MSDOS and Turbo C. Windows would
probably cause too many timing problems.
A basic stamp or PIC would be a tight fit for the code to do the job unless
you use assembly. That is not an easy way to write control code.
--
Gordon
Gordon Couger
Stillwater, OK
www.couger.com/gcouger
Here is what you can get from most GPS receivers when they are set to go to
a way point.
RMB - Recommended minimum navigation information (sent by nav.
receiver when a destination waypoint is active)
RMB,A,0.66,L,003,004,4917.24,N,12309.57,W,001.3,052.5,000.5,V*0B
A Data status A = OK, V = warning
0.66,L Cross-track error (nautical miles, 9.9 max.),
steer Left to correct (or R = right)
003 Origin waypoint ID
004 Destination waypoint ID
4917.24,N Destination waypoint latitude 49 deg. 17.24 min. N
12309.57,W Destination waypoint longitude 123 deg. 09.57 min. W
001.3 Range to destination, nautical miles
052.5 True bearing to destination
000.5 Velocity towards destination, knots
V Arrival alarm A = arrived, V = not arrived
*0B mandatory checksum
It gives you every thing you need and they automaticly switch to the next
waypoint when they arrive at the current way point.
Gordon
Gordon
What do you mean? The GPS is the command to the control loop from which the
error signal is derived. I don't understand to what you are referring when
you say "this" in your comment.
Mitch Berkson
Not exactly, the amplifier takes a signal from a converter that converts
the PWN stream to pos and neg pulse signals, the converter may be built
into the amp.
>
> * directly if there are enough MIPs... KIPs? available). There are
> folks * that have posted plans (free), and folks that will sell you any
> or all of * this stuff (V-to-PWM converters, H-bridge drives for the
> motors, etc)...
>
> Okay... Not that I quite understand what you are saying, but I
> understand the direction.
Right, read the websites and it'll become a lot clearer.
>
> * Like Harry said, hunting will be a problem (even if the fishing is
> great :- * ), you will have to be really careful in setting up the time
> constants and * system loop gain such that you end up with a critically
> (or slightly more) * damped system with time constants way longer than
> the natural (mechanical) * times of the system...
>
> Sure. This is the same way you drive a boat, by the way, you try to
> underreact.
Bingo.
>
> I had to steer a big sailboat under diesel recently, and I reminisce of
> that experience.
:-)
Steve
In yr PID module, u need to make use of the speed info coming from the GPS,
speed over water wud be better. This wud form the sensitivity element of yr
rudder charateristics to give it a large deflection at low speeds and small
at high speed to give the same control effect. There is a constant factor
in the equation (K) that is dependent on the size, weight and handling
characteristics.
Heading change rate by differentiating that from the gps to give u the D
part of the module. This prevents overshoot when correcting for drifts.
Using only the heading signal can result in parallel path travel. Use this
in conjunction with the cross-track error to bring yourself back on track.
Don't forget that u can travel on the track but point away from the path of
travel (current). Get the compensating signal to the heading error effect
by integrating the error signal and use it to cancel the heading error value
to prevent the controller deflecting the rudder. The integration subroutine
shud take place only when the cross-track error is zero, ie, travelling on
track.
There must be a error signal selector to select the error signal to steer
the boat. Use cross track error if the vessel is far from the desired track
and as it gets close use heading error. The switch over point is a function
of speed and characteristics of the boat. If u don't have this, imagine
travelling on a parallel path, the cross-tarck error turns you into the
desired track, this produces a heading error which will turn u away. Switch
too late, u make sharp turns to get onto the track, switch too early u make
a wide loop to get on track.
With everything in place (if I remember everything) your vessel will
theoretically turn toward the desired track and as it approaches it, turn to
flare into the desired track, if all the constants (boat characteristics) in
your equation are correct. If not it will overshoot, turn back in,
overshoot and if the constants are ok , finally settle. If not u get sick
as the overshoots get worse. U shud have a routine to self calibrate and
change the constants
Get a book and good luck
Tan PS
"Igor20447" <ignoram...@NOSPAM.20447.invalid> wrote in message
news:slrn9mgrj2.1gp...@nospam.invalid...
> Makes sense. The idea is, as far as I understand,
>
> 1) keep sample intervals bigger than the error of measurement (ie, do not
> differentiate your positions over distance less than X times the
measurement
> error, X > 1)
>
> 2) keep the rate of correction less than Y times the error measurement
> divided by the sample interval time.
>
> 3) Do not correct deviations that are well within your range of precision.
>
> X and Y are constants that need to be determined. Values on the order
> of 10 or so are reasonable for a boat.
>
> Example: suppose that the error in your position is 1 foot. As you go
> about 20 feet, if you calculate the vector of your speed, you will get
> about 0.05 radian error. So if your course deviates by more than 0.05
> radian, you correct. The correction is the rate of turning (position of
> the rudder) such that you turn no more than 0.01 radian over the next
> 20 feet.
>
> That's just my intuition. Am I making sense?
>
> igor
>
> derbyrm <der...@accessky.net> wrote:
> * "Steve Weingart" <s...@gulf-XYXstream.net> wrote in message
> * news:Xns90F0A196DB31C...@205.158.27.245...
> * > ignoram...@NOSPAM.20447.invalid (Igor20447) wrote in
> * > news:slrn9mgf4a.s9n...@nospam.invalid:
> * >
> * > > Lloyd Sumpter <lsum...@home.com> wrote:
> * > > * Igor20447 wrote:
> * > > * > Any thoughts? Is programming these things difficult?
> *
> * > > * Not that hard, if you know about PID algorithms.
> * > > And how hard s it to learn about pid algorithms?
> *
> * > Not at all really if you have the math (which I assume
> * > you would :-)... integrate acceleration and get speed
> * > (plus constant), integrate speed and get position (plus
> * > constant). Differentiate position get speed, differentiate
> * > speed get acceleration (or I seem to remember from when I did
> * > this 20 years ago when I designed chart recorders :-)
> * >
> * > ... add up terms and wallah, a closed loop system, terms too
> * > small, system is sloppy, terms to big, system oscillates.
> * >
> * > You can't appreciate oscillation until it happens to a 2000 lb
> * > granite weighted slider on a 4'X 8' XY machine table driven
> * > by 1 HP DC motors and 1 KW amps. Made a paint shaker
> * > seem like a kiddie toy :-)
> *
> * Divergent oscillations can be upsetting in several senses of the word.
An
> * autopilot you have to check on every few seconds is almost worse than
none
> * at all.
> *
> * I learned the hard way (in 1961) that when a digital system performs a
> * "differentiation" it introduces noise as a function of the sampling
rate.
> * Later someone introduced the "Z plane" transformations to formalize what
we
> * did by trial and error. I guess you could set the sampling/iteration
rate
> * very high so that a simple analog filter would get rid of the high
frequency
> * poles, but if you don't, you may get heating you don't want. Even then,
you
> * may get overflow in your intermediate calculations which leaves you with
> * "residue" arithmatic.
> *
> * Before I studied things like Nyquist and Laplace, I built myself a
regulated
> * high voltage supply. Lots of smoke!
> *
> * If the iteration rate is low compared to the frequencies of interest,
make
> * sure your data stays in phase. Combining a value from the previous
> * iteration with input from the current one will give interesting results.
> * (Can you say "really non-minimum phase?")
> *
> * Roger
> * http://www.accessky.net/derbyrm
> * der...@accessky.net
> *
>> Better get a book or two!
> You might start with Floyd Gardner's "Phaselock Techniques". It's
> short but concise.
Also try Katsuhiko Ogata's "Modern Control Engineering"
Dan
--
All the bits that are fit to spit!
Uhhh...Zen and the Art of Orange Crate Scooter Repair might be more
appropriate.
--
Harry Krause
------------
A path without obstacles probably leads nowhere
Given all that, in reality it's *not* that complex... Remember the first
wind driven autopilots for sailboats were just counterbalances that used
the tension on the sheets.
I was able to set a course and maintain it for (sometimes) hours by hooking
the jib sheet to the tiller and counterbalancing it with a bungee cord, if
the boat turned downwind, the increased pressure on the sheet turned the
boat back upwind, if the boat turned too far upwind the bungee pul the
tiller and turned the boat back downwind..
Yes, the speed of the wind had to be fairly constant to maintain a good
compass course, but not as constant as you might think. Averaging, and
steering becuase of the hull shape, as the heel angle changed balanced a
lot of the small differences.
Before you tell me to take my toys and go home, there have been several
books written on autopilots like this and there have been many folks who
have crossed oceans using these methods...before PID loops and servo
electronics (and yes even before GPS :-)
>
> Good luck if you continue this. Make sure you can do an IMMEDIATE
> disconnect if necessary to take over manually.
But this I defeinitely agree with! :-)
In any case Igor has all the tools available to build a perfectly useful
autopilot, he has the GPS, the postition sensors for steering, a computer,
and the DC drive motors... The rest is just a small matter of programming
:-)
Cheers,
Steve
There are a variety of devices for sensing angular rates besides gyroscopes.
One of the neatest for the home builder is the air jet model. A thin jet of
air is centered between thermistors. It leaves the nozzle with a certain
velocity in inertial space. If the thermistors, which are attached to the
boat/plane are moving, one will be cooled more than the other. By making
them part of a bridge circuit, an error voltage is generated which is
related to angular rate. A neat variation is to generate the air jet by a
small speaker driven with a square wave. You get puffs of air rather than a
steady stream, but the effect is the same and you've eliminated the blower
motor.
Another device for sensing angular rate is the vibrating reed, aka the house
fly approach. Flies have such vibrating "rods" in their armpits. When the
rod is at mid-travel, any rotation of the fly is resisted by the rod and
sensed as a torque at the base. Some working devices have been built using
Hall Effect devices, but I'm not familiar with the exact implementations.
A friend used the air jet approach to good effect on his Bushby Mustang
home-built aircraft.
Roger
http://www.accessky.net/derbyrm
der...@accessky.net
"Steve Weingart" <s...@gulf-XYXstream.net> wrote in message
news:Xns90F17151B8838...@205.158.27.245...
Garry
Remove the nospam to talk to me
They can be derived from the data the GPS gives compared to previous
readings. A flux gate compass and sensor for the out drive will probably be
needed to keep things from getting out of hand but I am pretty sure that a
GPS and those sensors will give all you need. A boat is not going 180 mph.
Gordon.
> They can be derived from the data the GPS gives compared to previous
> readings. A flux gate compass and sensor for the out drive will probably
be
> needed to keep things from getting out of hand but I am pretty sure that a
> GPS and those sensors will give all you need. A boat is not going 180 mph.
>
> Gordon.
With respect, I don't believe either heading or yaw rate can be derived from
a series of position inputs.
My Cessna is also not going 180 mph. In fact we've had ground speed
readouts of zero (while heckling the approach controllers).
Roger
Not from position inputs but the NMEA message for an auto pilot that I
posted gives you all you need to calculate yaw. But I don't think you need
yaw with what the auto pilot message gives you. I think all you need is some
damping, positions sensing to keep it from hunting and the code to control
the servos. I reposted the RMB sentence a the end of this post. This would
be the data you would use to drive a auto pilot.
The compete NMEA messages and what each GPS put out can be found at
http://vancouver-webpages.com/peter/
The yaw rate with a granularity of one second and a resolution of 0.1 degree
can be obtained from a moving GPS. If you need a more frequent sampling that
that you need a fluxgate compass. You end up with a dead band and a jump but
not a big one. The FAA wouldn't buy it but I think that would be acceptable
for a boat.
Gordon
>The yaw rate with a granularity of one second and a resolution of 0.1 degree
>can be obtained from a moving GPS. If you need a more frequent sampling that
>that you need a fluxgate compass.
That accuracy sounds a bit optimistic to me, but most GPS performance figures
have a tendency that way.
You certainly don't want to use difference of position outputs to get heading;
that would be hopeless. Get a receiver which gives velocity outputs - these
will come out of the receiver's internal Kalman filter, and may incorporate
information from carrier Doppler shifts, or carrier phase counts.
You can also get receivers which will give updates at 10 or perhaps more
per second. For example, the Canadian Marconi "Allstar".
Note that the GPS solution will give you a heading vector, and a fluxgate
compass will give you the orientation of the boat - which need not be
the same direction. Note also that you will need to know the roll and
pitch angles of the boat to understand the output of a fluxgate compass
(or to assume they are zero).
Tony.
--
>> I suspect that you overestimae the complexity of this "PID" thing...
> Don't you wish. :) People write PhD's about control theory. However, for
> the scope of this project, close enough is good enough
Thankfully for those endevouring to build an autopilot, PID (Proportional
- Integral - Differential control) is probably overkill here... a much
simpler PD scheme would probably work ok, and would be easy enough to
impliment, just be sure you can tune your gains as needed in your
prototype.
Also, as I recall, one of the basic stamp series, if not all of them, have
a PWM command that's relatively easy to use... I wouldn't be at all
surprised if a clever person could put together a functional autopilot
using such a microcontroller.
Craig K.
With respect, none of these tell you what direction the boat is pointing,
only what direction the boat is travelling. Kind of an important
distinction.
Like most machines, it's easy to build something that will work okay in
80% of the circumstances, if this is one of the times when that is
acceptable, great, but It's not something to put ones faith in, in the
other 20%. I think the idea will work fine if the expectations are kept
reasonable, and the control loop understands how a boat works. It would
be a bad idea to attempt to thread a series of waypoints exactly, much
more helpful would be code that tells the ap to steer toward the next
waypoint +/- a bit. I mean, how many people expect to sail +/- 1 deg all
the time? A fun project, within it's limits.
Wouldn't it also increase the possibility of the system hunting... Why not
just calibrate the system reasonably well and live with the additional
small source of error (there will be plenty other error sources of similar
magnituade anyhow)...
Craig K.
Note that the term "velocity towards destination" might properly be termed
the "closure rate." Closure rate can read zero if you are traveling a
circle around the destination at 20 kts.
It also occurs to me that the rudder angle limits should be a function of
yaw rate, velocity thru the water, and whether you're on-plane. None of
these come from your GPS.
The "steer left/right" command doesn't provide for an intercept angle less
than 90 degrees. (It does make a nice arrow on the display.)
On the F-111 we adjusted the closed loop gain as a function of the damping
ratio for transients. The system was biased to raise the gain if no
overshoots were noted. When flying in smooth air, the gain would go off
scale and the first bit of turbulance resulted in an upset. A "thumper" was
added to make the ride rough enough for the autopilot to sense the damping.
Current styling is to avoid "self-adaptive" control systems and adjust gain
as a function of vehicle configuration.
I don't know where it ended up, but we did do a proposal for pitch control
for a hydrofoil ferry for the Seattle area. We proposed ultrasonic sensing
for "altitude."
The idea of a flux rate compass for heading/yaw is interesting. Are there
commercial models with outputs available? My project to build one went on
the shelf after my coil form proved inadequate and dumped lots of wire on
the floor.
Roger
http://www.accessky.net/derbyrm
der...@accessky.net
"Jim Richardson" <war...@eskimo.com> wrote in message
news:20010803.115054...@eskimo.com...
> In article <Hypa7.130$c07....@newsfeed.slurp.net>, "Gordon Couger"
> <gco...@nospamprovalue.net> wrote:
>
> > RMB - Recommended minimum navigation information
> > (sent by nav. receiver when a destination waypoint is active)
> > RMB,A,0.66,L,003,004,4917.24,N,12309.57,W,001.3,052.5,000.5,V*0B
> > A Data status A = OK, V = warning
> > 0.66 Cross-track error (nautical miles, 9.9 max.),
> > L steer Left to correct (or R = right)
> > 003 Origin waypoint ID
> > 004 Dest. waypoint ID
> > 4917.24,N Dest. wypnt lat. 49 deg. 17.24 min. North
> > 12309.57,W Dest. wypnt long. 123 deg. 09.57 min. West
Depends on what you want your autopilot to do. I suspect what we REALLY want
them to do is maintain a course (ie "what direction the boat is travelling")
rather than maintaining what direction the boat is pointing. So a GPS is A Good
Thing.
Funny the directions this thread is taking. Some are talking about yaw and
taking boat speed into account (ie adaptive control/dynamic modelling), while
others are saying "you don't really need PID..."
But it's true: if you try to make your autopilot good to the nearest 1/2-deg,
you'll wear out your rudder (and probably have an unstable system). Be like a
good "wet" pilot and let the boat wander a few degrees...it's called "deadband"
- and what Integral and Differential are good for. If the boat wanders a few
degrees momentarily, leave it and let it wander back. But if it's off for a
while, integral will slowly bring it back on course. Also, if it's wandering
slowly, don't worry about it, but if it's going off quickly, you need to correct
quickly (diff - but watch your stability!).
It's interesting how often the field guys turn off the SuperFancy Adaptive
Algorithms and go with simple PID...
Lloyd Sumpter
LSumpter Consulting
I agree that you need a fluxgate compass and a sensor for the lower unit or
you are likely to end up doing some very strange things at low speed.
I have an electronic controlled trolling motor I have been thinking about
running off a 68HC11. I have given it a lot of thought and I have done a lot
of control work using condolers that are used for this level project. I
think that the information that the GPS puts out and the heading of the boat
and the position of the drive are enough to hold to a course. What I find as
a challenge is can I hold a station of 30 to 50 foot for fishing points?
A really clever person can make a good auto pilot with a flux gate compass,
a resistive tiller sensor and all analog parts. I am not that clever.
Igor
Can you use the stuff you've bought to build a BattleBot.
That might be fun.
Heck who knows we might get to see you on TV.
> I fully approve of other people doing it, but not me personally.
> I would rather write computer viruses.
Let's see if we can get you back on the autopilot project. We've got enough
viruses.
I have a natural tendency to look for the one bad rivet in a bridge rather
than admire the thousands of good ones. Fine for QC, bad for brainstorming.
In general, these systems are broken down into several sub-loops: one to run
the rudder/outdrive, so you can give it a linear command for displacement
and not worry about controlling the "effector", another which generates that
command to achieve the desired yaw rate as a function of speed, etc. For
heading-hold mode, its goal would be zero yaw rate. For tracking mode you
actually have two sub-modes, capture and track. These are external
functions to the sub-loops and are much less critical. It is a fun problem.
If all you do is point your bow at the destination, you travel a "pursuit
course" which is a spiral in the presence of wind or current (or a moving
target).
The first thing I would do is to build a test bed that will run on my desk
so I could tinker with it for hours on end. Probably a wind vane and an
oscillating fan would be a good way to develop the code for the damping and
holding a heading. I would use a shaft encoder to keep track of the heading
and you keep track of the rudder position by knowing where you put it. I
would probably use a stepper motor because I have the code to drive on handy
but RC servo would be a better bet to do from scratch.
That would let you develop the code for damping and holding a course. You
can cause all kinds of problems by sticking you hand in the air flow and
change the angle of the air flow.
This would give you an auto pilot that used only a compass and rudder
sensor.
Once I could get it to hold a heading then all I have to do is figure out
how to use the GPS data to determine if I am on course and if I am not what
direction and what magnitude correction should I make to fix it or should I
wait a while to fix it.
It is not a particularly difficult problem. It is a fairly complex one. It
will yield to study and work. How much of both depends on where you are on
the learning scale. Depending on what line of work you are in you may learn
some valuable skills in the exercise. Well you will learn one very valuable
skill, problem solving.
Gordon
I agree that it is an ambitious project but not one that is beyond anyone
with decent problem solving skills and plenty of time.
Gordon