Steering tuning 1 Ton trimaran boat

Good day,

I am trying to control a 1 Ton boat using ardupilot but there is a lot of woobling. Base parameters are ACRO_TURN_RATE13
ATC_STR_ACC_MAX 2
ATC_TURN_MAX_G 0.1
TURN_RADIUS 5.5

CRUISE_SPEED 2
ATC_ACCEL_MAX 0.25


This image was taken before starting the steering tuning suggested in ardupilot website, NAVL1_PERIOD was set to 30, STR_FF 0.2, STR_P 0.2


Then we started configuring the NAVL1_PERIOD to 150, STR_FF to 1.7 and STR_P to 0.35 and it seems to reduce the oscilation.

What will be the consequence of using such a large value of NAVL1_PERIOD

1 Like

Could anyone help me to understand if a problem with L1 controller was fixed?

I found in the description of the implementation that the L1 controller seemed to produce an offset derived from a round up error (Plane: L1 Control for Straight and Curved Path Following by brnjones · Pull Request #101 · ArduPilot/ardupilot · GitHub).

What I did not understood is if the solution is implemented in version 4.1.4. Because at the end of the thread (xtrack error does not always converge to zero · Issue #2650 · ArduPilot/ardupilot · GitHub) @peterbaker wrote:

"There almost certainly won’t be a another 4.0.x release, and I doubt we’d pull the cross-track fix back if we did. Should’ve a long time ago, probably, but…

I’m closing this as “fixed” - even 'though people will need to run the beta to get the fix"

When we used the NAVL1_PERIOD with a value of 150 it showed a behavior as the one described with the offset, we were heading toward the waypoint but with a significant offset and in the screen the icon of the platform seemed to be sailing 90° turned to starboard perhaps the real bow was heading in the desired direction to reach the waypoint with an estimated 20 m offset. I thought our magnetometer had a problem but probably was this offset issue.

Hi @Alberto_Espinoza,

I’m going to post some of my replies that were previously in a PM.

So the wobbles are caused not by any bug in the software (at least not as far as I can see) but instead by bad tuning of the steering rate controller (tuning guide is here).

Looking at the actual turn rate (in green) vs the desired turn rate (in red) we can see that the actual is far larger than the desired. This means the gains are too high. Some random guesses of improved gains are:

  • ATC_STR_RAT_FF to 0.2 (currently 0.87)
  • ATC_STR_RAT_P and I to 0.1 (currently 0.125 and 0.5 respectively)

The best thing to do though is to follow the steering rate tuning guide including setting up real-time monitoring by setting GCS_PID_MASK = 1.

Hope that helps.

Thank you for your help.

We tried the reduced values but the oscilation increased it’s amplitude and period.

We did the square trajectory recommended for the navigation tuning and the only way in which we observed a reduction in the amplitude of the oscillation was when we increased str_I to 1.0.

The main problem was that our log files of this test were lost. I believe we are having problems with the micro SD, and the logs from several of our trials were not saved on the menory.

Hope to repeat the test on Monday to share the log and results.

@Alberto_Espinoza,

OK, thanks for the feedback and looking forward to the logs.

What we often see with users new to tuning is they begin by tuning the wrong level of the controllers. So in particular I think you’ve adjusted the navigation controller tune before getting the lower level turn rate (and speed) controllers tuned properly.

By tuning the higher level controller first you may have inadvertantly covered up the problems of the lower level controller. The only solution though is to go back to scratch, tune the lower level controllers and then tune the higher level navigation controllers.

In the beginning you should be tuning in Acro mode, not Auto.

Good day @rmackay9,

We change our micro SD and were able to recover the log from our today tuning trials.

We lost the logs from a navigation tuning practiced on 18/08/22 and the throttle tuning practiced 22/08/22.

Before starting the steering tuning we tested the throttle and speed tuning (Tuning Speed and Throttle — Rover documentation) we did the day before.

We practiced the steering tuning today, starting from scratch as you suggested. This was executed in the acro mode according with Tuning Turn Rate — Rover documentation.

  1. At first we observed that in the acro mode our PID desired was going in the opposite direction from the PID achieved. We inverted joystick ground steering and it went in the correct direction. We did all the steering tuning with that configuration until we achieved a steering response very close to what we supposed was a good achievment, although for reaching a desired and achieved PID close to each other we had to configure the values almost to its limits and sometimes out of them. FF = 3.0 P=2.0 I=2.0 and D=0.1.

  2. We tried to do a first line in the auto mode but the outputs were inverted again, any idea about what caused that behaviour?.

  3. We reversed the output again and the vehicle tried to reach the waypoints oscillating along the desired path.

  4. We increased the NAVL1_PERIOD to 75 and the oscillation reduced but the desired and achieved PID was misconfigured again.

  5. We tried to repeat a previous trajectory increasing our NAVL1_PERIOD to 120 again but the conditions were not good enough to continue, so we had to return and recover our ship.