Servers by jDrones

How to modify plant model?


(Auto Boat) #1

My boat steering has highly nonlinear response. It is a race boat set up to compete on an oval course. It pulls 7.5 g to 8 g to the right with little servo angle but struggles to pull 2 g to the left even with a lot of servo angle. I expect this would make it difficult to keep the control loop stable.

I imagine I need to add my own code or else make a request to include a linearizing transfer function. Could someone please point me in the right direction how to do this? Which parts of the code would I need to dive into exactly?

I have general programming experience and a basic understanding of control systems, but I’m new to Ardupilot and struggling to understand where everything is.


(David Boulanger) #2

Your prop steer is really that bad? What kind of boat is this? You could set the maximum G force turning at 2 and may be O.K.


(Auto Boat) #3

It uses a turn fin that is designed to steer right only. It’s an R/C oval racing boat. It runs on a standard 1/6 mile oval course.

The idea here is it’s a race boat. Limiting its performance is unacceptable.


(Auto Boat) #4

A picture of the boat for illustration.


(Auto Boat) #5

image


(Peter Hall) #6

very cool boat, currently there is nothing in the code to do what you want directly.

However a work around may be to set the rudder servo limit such that its allowed more left rudder than right rudder.

A requested rudder output of zero from the pids put the rudder at trim position. a output of 0.5 for example puts the rudder half way between trim and output max. -0.5 would give half way between trim and output min. So setting the left servo limit (it could be servo min or max depending on if the servo is reversed) to larger than the right servo limit will make out output none linear.

This is still not ideal, i would guess you would have to limit the right rudder more than currently, this could be a pain for slow speed maneuvering. Changing the limits will also change your tune so you will have to re-tune.

Another idea is to increase your I term and I max, this will get you up to the requested turn rate but more slowly as the integrator will have to build up.


(mroberts) #7

set your servo limits asymmetric - if “right” is 1000 and left is 2000, then set them to:

min: 1000
trim: 1500
max: 2500

It wont change how you steer to the right, but will put in effectively twice as much rudder when it tries to turn left. If you need to bump it up further, keep increasing the “max”. Test it on the bench though, to make sure the servo just holds at max anywhere above 2000.