Hi!
I have a jet pump propelled boat that I’m trying to tune and I’m currently stuck on the Speed and Throttle tuning step. The motor does not have a reverse mode.
I have done the Cruise Speed and Throttle auto learn step but what I found was two issues.
From a dead stop stop, pushing the throttle immediately to full, the boat takes a while to ramp up it’s speed. Looking at the PIDAchieved and PIDDesired plots, I can see that they follow pretty closely. Perhaps this has something to do with the MOT_Slewrate setting?
Even more disconcerting is that when I drop the throttle immediately to zero, the esc does not immediately cut off but rather gradually slow down, sometimes taking up to 5s before the boat comes to a halt. I can see the jet pump still active some time after I cut throttle. In one instance, it didn’t even slow down but kept going, had to disarm to stop it. In the tuning graph, I can see that there is a rather large deviation between the Achieved and Desired PIDs at this point.
The deviation during the slowing down step is what’s throwing me off. The tune seems fine when speeding up but goes to pieces when attempting to slow down.
The boat performs perfectly fine in manual mode. No issues speeding up or slowing down.
Appreciate any input!
Log file can be found here. Please ignore the plotted waypoints, early function tests.
The acceleration of the vehicle can be set using the ATC_ACCEL_MAX parameter. It’s set to only 1m/s/s so indeed it will take a while to speed up or slow down.
From looking at the speed controller in the log, it looks like the CRUISE_SPEED and CRUISE_THROTTLE were adjusted through the log (which is fine of course). I think in general the tuning is better at the beginning of the log rather than the end. Here’s a part around like 505000 which looks OK. The red triangular part is the feedforward which is just basically outputting the desired speed. and then we see the P and I all relatively low until things get rough as the vehicle gets up to top speed and presumably it’s getting knocked around a lot by waves. It’s possible that the ATC_SPEED_FLTE should be reduced to 5 (or even lower) to remove some of this noise.
… but at the end of the log around 145000 we see this which is not so good because we see the feedforward (which comes from cruise-speed and cruise-throttle) and P/I working in opposite directions. This means the feed-forward value is too high and is leading to overshoot with the P and I then fight against. It would be better to reduce the cruise-throttle value (or increase cruise-speed)
Thanks for the help!
Yes, I got desperate with the PID tuning and decided to start playing around with the Acceleration values. Finally got it to work properly. I had to increase it to 7.5 before I got satisfactory deceleration. Only thing is that because this boat uses a jet pump, it shouldn’t spin up the pump too quickly or it starts to aeration. So I couldn’t set the acceleration value too high. Would it be worth at some point to have separate values for acceleration and deceleration?
With regards to the Feed Forward, I turned if on to see if it affected the deceleration. Didn’t work. So I have since turned it off.
Will adjust the ATC_SPEED_FLTE and redo the cruise speed learning at the start. Will repost the logs again.
Just did a new round of testing. I redid the Cruise Speed and Throttle at a lower value and also decreased ATC_SPEED_FLTE to 5. It seems like P and I are no longer fighting FF?