homemade autopilot

Discussion in 'OnBoard Electronics & Controls' started by bertho, Nov 8, 2009.

  1. Tim B
    Joined: Jan 2003
    Posts: 1,438
    Likes: 59, Points: 0, Legacy Rep: 841
    Location: Southern England

    Tim B Senior Member

    YBW OpenPilot already have what looks like a sensible autopilot implementation. That's why I'm talking to them. I do not intend to develop an autopilot independently for my OpenPilot project, I have far too much to do as it is.

    Thanks for the offer, there is plenty of non-autopilot related ways to contribute to my OpenPilot project. YBWOP might be glad of the input though if you feel like joining the open-source community.

    Cheers,

    Tim B.
     
  2. catsketcher
    Joined: Mar 2006
    Posts: 1,315
    Likes: 165, Points: 63, Legacy Rep: 790
    Location: Australia

    catsketcher Senior Member

    Inertial guidance systems

    Dave

    Are you basically saying that we should copy the old 747 style of inertial guidance system? This was the hyper accurate accelerometer thingo that measured all accelerations and timed them so that you knew where you were as long as you gave an initial accurate position.

    If we take this concept further, why not use a GPS and then have accelerometers at the ends of the boat that then track how far the boat has moved from the last GPS position? You would not need quick GPS updating if the accelerometers had software that allowed them to calculate changes in course. Have the accelerometers do most of the work and refer to the GPS rather than the reverse.

    I am sure someone has thought of this for boats but how far apart would the accelerometers need to be? Is there software available now?

    cheers

    Phil
     
  3. Joakim
    Joined: Apr 2004
    Posts: 892
    Likes: 53, Points: 28, Legacy Rep: 422
    Location: Finland

    Joakim Senior Member

    It is typically not important to keep the boat very accurately "in the middle of the road". You get the cross track error from GPS and can adjust the course to in order to keep close to the "road". No need for accelerometers for this task.

    Furthermore just two would not be enough due to heel and trim. In order to track the real position with accelerometers you need 3 accelerometers and 3 rate gyros which form the basis of an INS system. But as I said, there is no need for this in a boat.

    What is not so easy and far more important is to keep the heading constant. This is necessary in order to keep the sails operating well and keeping the passengers happy. For this task the most important input is the current heading and that should be as instant as possible for boats that are not so course stable. The best source for this instant heading is visual, but that is not easy to implement into electronics. A rate gyro + some average heading device (fluxgate or GPS) does the job well enough.

    You could build your own rate gyro from two accelerometers with longituninal distance, but why would you do that when there are compact and (more) accurate rate gyros available.
     
  4. Joakim
    Joined: Apr 2004
    Posts: 892
    Likes: 53, Points: 28, Legacy Rep: 422
    Location: Finland

    Joakim Senior Member

    Yes that is true. However I don't know how strong is your arguing position about modern sailboats.

    I just talked to a friend of mine who has plenty of experience on airplanes. He said that flying straight ahead does not require much input from the pilot. My sailboat would not go straight ahead for even one second without input from a pilot in many conditions.

    I know there are military jets that are even completely unsteerable without an "autopilot", but I would assume "normal" airplanes are quite stable and do not require especially fast response from an autopilot.
     
  5. gonzo
    Joined: Aug 2002
    Posts: 16,802
    Likes: 1,721, Points: 123, Legacy Rep: 2031
    Location: Milwaukee, WI

    gonzo Senior Member

    How small are accurate accelerometers. They used to be pretty big and heavy. I assume they are based on a gyroscope.
     
  6. farjoe
    Joined: Oct 2003
    Posts: 163
    Likes: 1, Points: 18, Legacy Rep: 26
    Location: med

    farjoe Senior Member

    the smallest I know is 3mm x 3mm x 1mm and the technogoly is not based on the old style gyroscopes. the main problem using these for us amateurs is actually how to solder reliably to the pads since they are about 0.2 to 0.3 mm square. Go to www.st.com and search for accellerometers for more details. They are the current world leaders in this area.
     
  7. Submarine Tom

    Submarine Tom Previous Member

    That's correct, they are tiny. The ones I've installed (130 in total) to

    measure earthquakes, are accurate to 0.5 mili-g. It is automotive air-bag

    technology basically. They are also cheap, it's the support circuitry that's

    going to slow you down. On a production run, we made 100, 3-axis sensors

    for US$1500 each.

    _Tom
     
  8. CDK
    Joined: Aug 2007
    Posts: 3,324
    Likes: 148, Points: 63, Legacy Rep: 1819
    Location: Adriatic sea

    CDK retired engineer

    To be quite honest Joakim, I spend as little time as possible aboard sailing vessels because I hate it when the resultant of forces on my body shifts from the vertical axis. Aboard a planing craft I feel much more at home. After a regatta in the North sea that turned into a nightmare due to thunderstorms I decided to decline further invitations to board sailing boats which aren't secured with heavy chains to immobile concrete objects.
    But one also has obligations and I do have several sailing friends, so occasionally I do speak words of admiration sitting in a dangerously angled cockpit of a Bavaria, Jeannau or Marieholm, wishing it were over. Somehow these guys never invite me when the sea is calm.

    So I do have some experience with sailing boats, just as I have some experience flying planes. I never was a pilot, but a military air traffic controller. At the time it was customary to let the ATCs taste what it was like to fly in the various machines they had to guide to the glide-path. Especially simulated emergencies like SFO (simulated flame-out), hydraulic failures and "speechless" procedures were very enlightening. And they let me make several 100 hours in a link trainer because I was a mechanical engineering student and my bosses thought I might have ideas about improvements.

    Your friend is not completely wrong. Flying straight and level in a trimmed plane on a clear cold morning at 3000 ft is child's play. But cruising at 20.000 ft or above on that same day already puts you in the jet stream where 100 mph is quite usual. Your aircraft is doing 450 and even when the angle between course and wind is small the forces on the plane are considerable. The pilot has to adjust not only the course with the stick or steering column, but also use his feet to bank the plane so it doesn't slip sideways, pull or push to change the forward angle and adjust the throttle settings to maintain altitude and/or speed. The interaction between these controls is far more complicated than moving the rudder on a sailing boat.

    CAT (clear air turbulence) on a hot day has caused airliners to crash during landings because the pilot couldn't react fast enough and a wing tip briefly touched the ground although the ATC informed the pilot during his approach so he was prepared for it. A modern automated landing system integrates the autopilot with the ILS (instrument landing system) with such an accuracy that it positions the plane exactly on the touchdown point with almost zero visibility. On the glide-path it corrects for wind, air density, reduces speed, extends flaps and lowers the gears with mathematical precision without pilot intervention.

    The next time you are in an airliner and the fasten seat belts goes on early, watch the wingtips and engines swinging wildly. It gives you some idea of the forces the automated system has to cope with and the response time necessary.
     
  9. DaveJ
    Joined: Jun 2009
    Posts: 131
    Likes: 4, Points: 0, Legacy Rep: 66
    Location: Brisbane, Australia

    DaveJ Senior Member

    I'm not saying to use a complex system that is used in todays jet airliners. I don't really want to compare the systems used in planes to boats, as they will be different beats, but more the ideaology on how to achieve the end goal.

    Yes Phil, the concept of thought i'm trying to get people to understand is you use the accelorometers as a stability system and use the gps signal to look like an error that the stability systems compensates for, which ends up being course corrections that are sumed with wave/wind/current actions thus the boat will steer a straight course.

    Accelerometers are cheap and accurate, very easy to use. Go to this link to find out infomation, i love this place http://www.sparkfun.com/commerce/categories.php?c=80

    and this place also has very cheap GPS modules, http://www.sparkfun.com/commerce/categories.php?c=4

    My problem is i can't program to save my life, i've brought a book on how to programm the microchip IC's in an effort to make my own systems, for those out there that can, will be able to make a great system very cheap.
     
  10. DaveJ
    Joined: Jun 2009
    Posts: 131
    Likes: 4, Points: 0, Legacy Rep: 66
    Location: Brisbane, Australia

    DaveJ Senior Member

    On a side not to CDK's comment, the ILS are so accurate, that they had to introduce errors, the reason for this was that the planes wheels where touching down on the same spot every time and was wearing the runway outs, so they (not sure how it is done) make the planes land on different spots of runway at different intervals.
     
  11. Tim B
    Joined: Jan 2003
    Posts: 1,438
    Likes: 59, Points: 0, Legacy Rep: 841
    Location: Southern England

    Tim B Senior Member

    Dave,

    I have worked with instrumenting vessels, and post-processing the data and the first point to note is that getting motion data that is actually meaningful (think about the planes of reference and what you're actually going to be measuring) for starters is not a particularly easy job. Point 2 is that if you want to integrate the answer from the accelerometers to get position, you will need REALLY accurate measurement, this is not impossible but it will take an amount of work. If you try to do this, you'll find out very quickly why inertial navigation systems are so expensive, and why they're not fitted to yachts.

    Historically, the approach to autopilots has been to steer either a constant course, or a constant apparent wind angle, the latter being done very successfully with a rudder vane.

    I would suggest that you start with a simple heading-hold autopilot, written on "standard" PC hardware, there's a lot of code around written under Linux that will help.

    You can then look at the effect of proportional control. You can also use the GPS to evaluate the typical cross-track error. There are GPS units that will update at 5Hz, and this will be more than adequate. You should probably be looking at a minor correction for cross-track error every 30s to 1min.

    So, the inputs that I would expect you to need for a reasonably good system would be:

    GPS track
    Magnetic Heading
    and later Apparent wind angle

    The output is simply rudder angle.

    Hope this helps,

    Tim B.
     
  12. TedZ
    Joined: Jan 2009
    Posts: 23
    Likes: 1, Points: 0, Legacy Rep: 11
    Location: Glens Falls, New York

    TedZ Junior Member

    I am always impressed at how erudite the folks are on this forum.

    Someone mentioned accelerometers. While once these were expensive and easily damaged, they are neither now. It seems that all of the other factors discussed taken into account, a multi-axis accelerometer as a part of the design would give the kind of early info needed to allow the AP to "anticipate" situations such as a following sea. No question in my mind that there is a learning curve associated with this type of design but could be a big improvement.

    Ted
     
  13. Itchy&Scratchy
    Joined: Jul 2008
    Posts: 140
    Likes: 3, Points: 0, Legacy Rep: 117
    Location: Oxford & South Africa

    Itchy&Scratchy Senior Member

    Bloody hell...... I was lost at the second posting:p

    Some clever people here- thats for sure.:)

    J
     
  14. DaveJ
    Joined: Jun 2009
    Posts: 131
    Likes: 4, Points: 0, Legacy Rep: 66
    Location: Brisbane, Australia

    DaveJ Senior Member

    Ted: Agree with you, the accelerometers are alot more durable then gyro's. I guess the main reason for posting is the lack technology that has gone into boat AP's compared to other forms of travel (ie. the antilock, antiskid braking systems in cars). No one has accually ask how one would go about it, having done testing and troubleshooting on many different type of aircraft automatic flight control systems, i have an understanding how it is done in the aviation world and see some simularities that can be untilitised in the marine sector.

    I would be all to happy to help in this area.

    Dave,
     

  15. DaveJ
    Joined: Jun 2009
    Posts: 131
    Likes: 4, Points: 0, Legacy Rep: 66
    Location: Brisbane, Australia

    DaveJ Senior Member

    I agree, thats why i like reading this forum, i learn alot.
     
Loading...
Similar Threads
  1. Deering
    Replies:
    2
    Views:
    1,792
  2. Bumbleguy
    Replies:
    3
    Views:
    3,298
  3. missinginaction
    Replies:
    1
    Views:
    4,971
  4. sv alexandra
    Replies:
    2
    Views:
    3,471
  5. missinginaction
    Replies:
    1
    Views:
    1,947
  6. missinginaction
    Replies:
    2
    Views:
    2,068
  7. Jdawg
    Replies:
    9
    Views:
    2,595
  8. Tony.R
    Replies:
    0
    Views:
    2,098
  9. Steve W
    Replies:
    0
    Views:
    1,749
  10. cal_d_44
    Replies:
    0
    Views:
    2,094
Forum posts represent the experience, opinion, and view of individual users. Boat Design Net does not necessarily endorse nor share the view of each individual post.
When making potentially dangerous or financial decisions, always employ and consult appropriate professionals. Your circumstances or experience may be different.