Servers by jDrones

Working without speed or throttle control

(Auto Boat) #1

In my application I want the speed to be as fast as possible at all times, right at the limit of the vehicle capability. If I set a cruise speed below the top speed of the boat and give the flight controller authority over the throttle, it will throttle the engine to slow the vehicle at times. This is unacceptable. Experience shows that the fastest lap times are achieved with the throttle wide open at all positions on the course.

If instead I command a cruise speed higher than the vehicle capability, it would continually impose proportional and integral gain error of varying magnitudes. I think this would compromise stability and the ability to stay on path.

Am I correct in my analysis? If so, what way can I set up the flight controller to react to whatever speed the boat happens to achieve at any point in time and still maintain tight control to smoothly hold it on path between waypoints?

(Kenny Trussell) #2

Are you saying you that on the course you are running, you can navigate even the turns with the full throttle at all times or does your boat need to slow down at turns?

Also, do you have steering with a rudder or something independent of the throttles or is your steering accomplished by differential throttling of left and right thrusters?

If you can run at full throttle all the time and if steering is independent of the throttles, I think giving a cruise speed in excess of boat capability is fine. The PID will have high error terms but that shouldn’t matter.

If your steering and speed are tied together as in skid-steer steering, then I think you probably need to be slower than full throttle at turns to give the steering controller some throttle to work with above and below the travel speed. You may be able to accomplish this with the WP_SPEED parameter.

Just my 2 cents that may be worth less than 2 cents! :slight_smile:

(Kenny Trussell) #3

There is a concept called “Integral Windup” that used to plague some PID controllers (mostly old analog ones) in industrial applications. If the Ardupilot PID suffers from that, then having the speed setpoint above the capability of the engines may not work. If integral error term keeps climbing as you have the speed setpoint out of range of what the throttle can achieve, then when you lower the setpoint, the controller may have to unwind that error term over time, so your boat would not slow down quickly. However, I bet the ArduPilot developers have that problem solved!

(Auto Boat) #4

Yes, it can go through the turns without reducing power and does not need to slow down. Drag increases when turning and the boat does slow down, but engine power remains maxed out at all times.

It uses a rudder to control yaw angle and there is only one prop. Except for some minor propwalk, steering is entirely decoupled from throttle.

What about the path following strategy? What happens to it when the desired speed and the actual speed don’t match?

(Kenny Trussell) #5

Unless you are doing something advanced that I don’t know about (or I don’t understand the question), there is no timing related to path following, so ArduPilot does not expect the vehicle to be at any given point at any given time. It will just work its way along the path at whatever speed it is moving.

(rmackay9) #6

One thing I’d like to add is that it is better to use the WP_SPEED to set the default speed for the mission rather than modifying the CRUISE_SPEED. The reason is that the CRUISE_SPEED (along with CRUISE_THROTTLE) is the basis of the throttle control… so changing them affects the speed controller. WP_SPEED simply sets the target speed and does not affect the controller.

If the WP_SPEED is set higher than the vehicle can physically manage, it will just drive at it’s top speed. Setting the CRUISE_SPEED above the vehicle’s actual physical abilities will cause some troubles especially in more manual modes like Acro.

(Kenny Trussell) #7

Randy, so WP_SPEED controls the speed during the entire mission? I was under the impression that CRUISE_SPEED controlled speed between waypoints and WP_SPEED took effect at some radius around waypoints.

(rmackay9) #8


That’s right, WP_SPEED is the target maximum speed for the entire mission. The “lane based speed control” feature will slow the vehicle if it thinks it needs to to keep within WP_OVERSHOOT of the line between waypoints.

(Kenny Trussell) #9

The next time I run my mower, i will have to check settings. I have changed CRUISE_SPEED to change my mission speed. I’m not sure what WP_SPEED is set at. Thanks.

(Auto Boat) #10


Nevermind, I found it:

(Auto Boat) #11

OK, just to be sure: The L1 navigation algorithm uses vehicle speed to calculate angle Nu2 and distance L1. These in turn affect the lateral acceleration demand. This is the measured speed from Kalman filter, not one of the commanded speeds (waypoint or cruise), right?

(rmackay9) #12


Yes, the L1 uses the estimated speed from the EKF. It doesn’t use the target speed. I think it should actually be changed so that it uses the target speed though.