OpenMarine

Full Version: Tacking function behaves strange
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Problem

Before tacking Autopilot works well on beating course about 42 degrees to apparent wind.

I try to tack, and starboard side and it look worked well, but little slow (no worry about this).
Boat turned to Starboard tack well.

On port tack it I had an issue,
During port tack boat did turn more than 180 degrees  and try to continue, but I switched autopilot off and interrupt test.

Observations:
drive run to end of range and continue push drive to move rudder to port, however rudder sensor already showed full range value. 
( I intentionally did not tight hard rudder drive arm to shaft to eliminate mechanical breakage during the tests, so over current protection did not trip)

What are options to debug situation? what I did wrong?

BACKGROUND:
Did first sea trail with autopilot,  new built system in new to me boat.
On previous boat I never used TACK function, it was 18 feet boat with tiller, and it was sample to do w/o automation.

Now boat is bigger and cockpit layout is not good for singlehanded operation, so want to use tack function to be self-sufficient.

Several notes about system:
Main board is Rpi4 with OP3 installed, and pypilot installed using OP installer.
My autopilot drive is Autohelm 2000 linear drive with Mid size motor controller.
 - when i installed drive, i figured out it works in opposite direction, so I put "Servo.Gain" setting  as -1.
I have rudder angle sensor, but no end switches yet. I expected motor controller or autopilot is smart enough to do not move over max values.
I have wind instrument and it works well.

General sea test results:
I did not touch PID values yet, but Autopilot keeps direction pretty well with default values.
I tried just keep course and change course using (+10/-10) buttons, all works well. 
No overshoot, and pretty fast reaction in control on all courses against wind.
Which version of pypilot? Is it latest master branch?

I have used the tacking function quite a bit recently and it worked. Were you steering to wind or compass or?

I doubt it is a problem but you could make servo.gain 1, and switch the motor wires?
(2024-06-26, 09:53 PM)seandepagnier Wrote: [ -> ]Which version of pypilot?  Is it latest master branch?

I have used the tacking function quite a bit recently and it worked.  Were you steering to wind or compass or?

I doubt it is a problem but you could make servo.gain 1, and switch the motor wires?

I need to check, it was installed by OP3 installer. Will check on weekend

I steered on wind, I suppose it is more logical to use tack on wind ;-)

I doubt too, and it is not easy to redo it. I installed board inside drive case, so to change motor polarity i need to take drive out :-(. from the beginning it look as good idea to make "smart drive").
Please try tacking in different modes and compare when you get the chance. I could really use feedback as there is not a lot for tacking to wind. What kind of wind sensor? Is it aligned correctly?
I see the same issue with the most recent PCNautic release. In another thread we already established that there is a divergence between your current source tree and theirs.

Nevertheless this occurs when the rudder position detection is used the determine maximum to port and starboard position. When tack to port the max_rudder_fault occurs (as would happen when tacking to starboard), but in this case the systems stays in this fault state and keeps steering to port indefinitely if you do not intervene.

This is not in compass or GPS mode, only with apparent wind and possibly also true wind mode.

This has also been reported to pcnautic. In my short experience with this system this happens in their latest release and not before.
Correct to starboard is the min rudder fault iirc.
I'm using the B&G WS310 wind sensor on my boat. I aslo had several issues, similar to the OP description, and found an issue in the code last year. After updating the code, the tackong finction now works flawlessly in all modes (wind, true wind, compass). One small detail that could be improved is the (lack of) intuitive change of the heading direction relative to the wind. Currently, I  nearly always miss the direction when i try to change my heading the intended direction (heading setpoint changes in the opposite direction og the intended...). Could be only me...
Can you elaborate on what is not intuitive? It could be the particular control interface? It is because normally increasing the target heading causes a turn to starboard, but the opposite is true in wind mode (because positive wind angles are wind to starboard as well)
I have since fixed each interface but if you could specify exactly where it could help.
(2024-07-19, 02:21 PM)seandepagnier Wrote: [ -> ]Can you elaborate on what is not intuitive?  It could be the particular control interface?    It is because normally increasing the target heading causes a turn to starboard, but the opposite is true in wind mode (because positive wind angles are wind to starboard as well)
  I have since fixed each interface but if you could specify exactly where it could help.

I'm not at my boat currently, bit i think i remember that the issue was like this. When beating in wind mode, the wind angle (AWA) is typically 35-40 degrees. I also think (but not sure) that this (AWA) angle has a negative sign when on port tack.
Anyway. In wind mode, the sign of the target heading should not matter, since we are assuming (in most cases) a "symmetry situation" where the boat (typically) is beating into the wind. And the same goes for a reach as well. Increasing the angle should breing the AWA further towards the stern of the boat. 
I believe that the issue that I'm experiencing is that the setpoint (target AWA) DECREASES when pushing the +10. At least on one of the two tacks. 
But again, I'm not anywhere near my boat now. Unable to verify. In addittion, my Tinypilot is currently a mix of new and older code, so there may have been changes that I have not updated.

Anyway, the pypilot works great. I did several single-handed ocean crossings (Norway-Denmark-Scotland-Shetland) with it. And no real issues so far. Great stuff!
Hi great to hear.

It is true that port tack uses negative wind angles, at least internally. Because the wind angle is represented this way (starboard tack having positive wind angle) the +10 (or +1) would actually decrease the wind angle on starboard tack (to make the boat turn to starboard) and match the behavior of other modes like gps or compass. On port tack, a +10 would also similarly decrease the wind angle, but in this case increase a negative angle, so if the AWA were -45, a +10 would make it -55 causing the boat to turn to starboard. It is a little confusing, because wind modes actually negate the + and - commands to ensure that the boat is turning in the same direction as the compass mode for the same button.

If it does not do this, in a specific mode, try updating to the latest image:
pypilot.org/images
and please report if there are any issues or something can be improved.
Pages: 1 2