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
pypilot stopped keeping course.
#1
This year installed Sean's latest pypilot and a new activator.
Put in over 50 hour steering mostly on gps but some on compass and wind.
Worked pretty well with a slight over steer but what is not my reason for posting.
Noticed that on gps was weaving more about +-5 degrees on flat water. It used to keep to about 1 degree. Always stayed within 20 feet. Use it to go about 4 miles down a 150'  channel and figure I was  scaring other boaters as at times headed right at them.

Though I would go out and do some tests on compass.
It was holding course  over 30 degrees off..
I tried a lot of things.
I have saved good settings and nothing worked.
I finally tried "I"  it was zero. Had to bring it up a lot and then it finally did compass course properly.
On my way in was still waving t on gps but had following seas so need to see what happens with less waves.

Any idea what could have changed to  need to add that much "I"?

John
Reply
#2
So it used to work but now the performance is worse? If it used to work before and doesn't now, that indicates either the settings changed or the sensors failed (such as the z gyro axis not working anymore or something), in either case this can be solved.

+-5 degrees is generally not that bad.. but in flat water it should be able to do better. Generally tweaking the gains could help. Such as increasing DD gain, reducing P gain etc. A full dump of parameters would help. If you can pull the pypilot.conf and post it, or at least show your gains and settings on the webapp it may provide clues.

As for being 30 degrees off.. that is bad. Did the course it displayed for compass seem at all accurate? Was it 30 degrees off it's displayed course or a different compass or gps course?

As for lots of I, how much? In waves +- 5 degrees can be acceptable.. it depends on the boat/person but a long a the sail are pulling... Anyway generally having a tighter control is better but it may also require a faster drive motor.

I also suggest keeping a close watch over the pilot in 150' channels... because there is not a lot of room for error or time to react, but I also sailed many miles in channels and managed.
Reply
#3
(2021-09-22, 05:32 AM)seandepagnier Wrote: So it used to work but now the performance is worse?    If it used to work before and doesn't now, that indicates either the settings changed or the sensors failed (such as the z gyro axis not working anymore or something), in either case this can be solved.

+-5 degrees is generally not that bad.. but in flat water it should be able to do better.    Generally tweaking the gains could help.  Such as increasing DD gain, reducing P gain etc.    A full dump of parameters would help.   If you can pull the pypilot.conf and post it, or at least show your gains and settings on the webapp it may provide clues.

As for being 30 degrees off..  that is bad.   Did the course it displayed for compass seem at all accurate?   Was it 30 degrees off it's displayed course or a different compass or gps course?

As for lots of I, how much?    In waves +- 5 degrees can be acceptable..  it depends on the boat/person but a long a the sail are pulling...    Anyway generally having a tighter control is better but it may also require a faster drive motor.

I also suggest keeping a close watch over the pilot in 150' channels...   because there is not a lot of room for error or time to react, but I also sailed many miles in channels and managed.
Yes was OK for months.
I'll get pypilot.conf  today.
Pypilot reads the same as the magnetic compass.
More properly stated it's not off by 30 degrees but  acts like 30 degrees off is as close enough.
Reply
#4
Here is my pypilot.conf


Attached Files
.gz   pypilot.conf.gz (Size: 1.11 KB / Downloads: 30)
Reply
#5
What is immediately obvious is a very low P gain of .0018. I would increase this to .0035 or .004 and see if performance improves. The default is .003.

The D gain is a bit high at .16, but if you need .16 to hold a straight course, then ok. set P to .004 or .005 even. The D and DD gains are what keep the boat going straight, and the P and I gains are what correct the course error... sort of.

Another setting to modify is servo.speed.min. It is set to 50, which will be quiet but may react slower. If you can increase this to 80 you may see improved performance.

You have also changed the servo.period to 0.22 which is normally low. It will make short corrections but overall may not be better than the default of 0.4 It really depends on the boat and you will have to experiment, but preferably change to 0.4 after you fix the gains and then change one setting at a time and compare the results.
Reply
#6
I recently pulled a default pypilot.conf from github (as in, "reverted to factory defaults") and it worked out remarkably well. I might suggest having a copy of the default values in the distribution of pypilot, so reverting to factory settings would be a bit easier for those who might not be that versant in git and linux.
Reply
#7
(2021-09-23, 08:12 AM)seandepagnier Wrote: What is immediately obvious is a very low P gain of .0018.   I would increase this to .0035 or .004 and see if performance improves.   The default is .003.    

The D gain is a bit high at .16, but if you need .16 to hold a straight course, then ok.  set P to .004 or .005 even.   The D and DD gains are what keep the boat going straight, and the P and I gains are what correct the course error...  sort of.

Another setting to modify is servo.speed.min.   It is set to 50, which will be quiet but may react slower.   If you can increase this to 80 you may see improved performance.

You have also changed the servo.period to 0.22 which is normally low.   It will make short corrections but overall may not be better than the default of 0.4    It really depends on the boat and you will have to experiment, but preferably change to 0.4 after you fix the gains and then change one setting at a time and compare the results.
Thanks Sean

I'll try your suggestions
The reason for the servo.speed.min and servo.period  is my drive is very overkill hydraulic drive and wanted to make smaller corrections in light conditions.

I did save the initial pypilot.conf and I think I'll try if it still has issues as ironman suggests.

Next issue is want to resolve asap but need to pull out boat soon and light wind days this time of year are rare.
Reply
#8
I did managed to do some tests before pulling the boat out of the water.
Sorry about the delay.

The following worked pretty well.
d=.08 dd=.129 ff= .798 i=0  p=.003 pr=.0089 r=0

A bit of over shoot on large course changes. Probably need to reduce ff.
Ran out of time.

Really not sure how It got messed up.
I clearly have not mastered the settings.
A couple weeks earlier was dealing fine with gale force gusts while at at the mast putting second reef in main.

I remember once adjusting on broad reach with moderate waves. Had it steering like a expert helmsmen held course for a long time. Then discovered if I changed course it could not deal with it any course change so had to raise P that caused it to over steer.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)