View Single Post
  Spotlight this post!  
Unread 27-12-2010, 15:49
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: paper: joystick sensitivity (gain) adjustment

Quote:
Originally Posted by Tom Line View Post
We use four linear equations (y=mx+b). First, we test our robot. So far, every robot we have built has been skid-steer. This means that there is an appreciable amount of motor force that it takes to break the robot into a skid to turn. Utilizing a control on the dashboard, we watch the values required to break it free using only one side. This is the B-intercept of our equation, so that the instant you move the joysticks out of the controller's preprogrammed deadband, you have enough power to turn the robot at the slowest possible speed.

So we use one equation from 0 to about 80% power. This portion has a gentle slope. After that, the slope goes from that point up to 1 (maximum joystick), 1 (maximum motor output). The nice part is that we only need to enter two values into our custom VI. The "B" y-intercept value that the drivetrain manages to start turning the robot at, and the intersection point of the two slopes.

For instance, if you were to graph it, the positive domain of the joystick would have these x,y points:

(X,Y)
(0,0.2)
(0.7,0.7)
(1,1)
That's a good approach too.

I took the liberty of parameterizing it, to make it tunable on-the-fly.

Here's an implementation written in Delphi:

Code:

if (x>=a) then y := c+(x-a)*((1-c)/(1-a))
else if (x>=0) then y :=b + ((c-b)/a)*x
else if (x>=-a) then y := -b + ((c-b)/a)*x
else y:= -c + (x+a)*((1-c)/(1-a));
The above connects the points (-1,-1), (-a,-c), (0,-b), (0,b), (a,c), and (1,1) with straight line segments.

The three parameters are a, b, and c:
  • "b" is the y-intercept (inverse deadband), and
  • (a,c) are the coordinates of the point at which the slope changes




Reply With Quote