Go to Post it's much easier to build safety in to a system than to add it on a Thursday at a regional. - dtengineering [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 27-01-2008, 13:13
interfect interfect is offline
Registered User
FRC #2022
 
Join Date: Jan 2007
Location: Illinois
Posts: 18
interfect will become famous soon enough
Help with Steering?

Hello,
We have our robot set up with two independent steering wheels, tracked with encoders and run by globe motors geared down at about a 3:1 ratio. It has fallen to me to program this rig, and convince it to do something useful. I am trying to get the wheels to point in a certain direction, but I am having trouble with the position seeking algorithm.
Running the wheels right when they're turned too far left, and left when they are too far right, just makes them oscillate about the target (I didn't add a dead zone. I could try that, but I want them to seek exactly.)
I tried implementing full PID control, but tuning it has already consumed more time than it's really worth, and no matter what I do it either oscillates or doesn't get to the target, or sometimes both.
I think the underlying problem may be that, because of the motors and the gearing, the wheels don't perceptibly move unless the motor is set to more than about 20 units off of idle (127). Once the motor revs up, it's hard to stop on target. PID ought to be able to deal with this, but it isn't.
What sort of control schemes have other people used for this sort of problem? How do you tune your PID loops (if you use them)?

What's the simple & effective solution that I am ignoring?
  #2   Spotlight this post!  
Unread 27-01-2008, 14:30
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Help with Steering?

I think PID is exactly the solution for your situation. You'll probably want to make the P constant as small as possible while still getting the motor to start moving reliably; that will help prevent oscillation. The D constant will keep the overshoot down, perhaps to the point that it won't reach the target. The I constant will account for that, and will likely be the most important to get right.
  #3   Spotlight this post!  
Unread 27-01-2008, 14:39
MrForbes's Avatar
MrForbes MrForbes is offline
Registered User
AKA: Jim
FRC #1726 (N.E.R.D.S.)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Sierra Vista AZ
Posts: 6,023
MrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond repute
Re: Help with Steering?

We set up a test Ackermann steering robot, and used a pot on one spindle, and a tie rod connecting both sides together. It uses a window motor and simple linkage to turn the wheels. It was connected to a vex controller, and programming it to run with a joystick for steering seemed to go pretty quickly (CD user TheOtherGuy did the programming), using a PID loop.



I dont know how the mechanical speed of this one compares to your setup....maybe that makes a difference in how sensitive the loop needs to be?
  #4   Spotlight this post!  
Unread 27-01-2008, 18:43
Daniel_LaFleur's Avatar
Daniel_LaFleur Daniel_LaFleur is offline
Mad Scientist
AKA: Me
FRC #2040 (DERT)
Team Role: Engineer
 
Join Date: Apr 2005
Rookie Year: 2003
Location: Peoria, IL
Posts: 1,972
Daniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond repute
Send a message via MSN to Daniel_LaFleur
Re: Help with Steering?

Quote:
Originally Posted by interfect View Post
Hello,
We have our robot set up with two independent steering wheels, tracked with encoders and run by globe motors geared down at about a 3:1 ratio. It has fallen to me to program this rig, and convince it to do something useful. I am trying to get the wheels to point in a certain direction, but I am having trouble with the position seeking algorithm.
Running the wheels right when they're turned too far left, and left when they are too far right, just makes them oscillate about the target (I didn't add a dead zone. I could try that, but I want them to seek exactly.)
I tried implementing full PID control, but tuning it has already consumed more time than it's really worth, and no matter what I do it either oscillates or doesn't get to the target, or sometimes both.
I think the underlying problem may be that, because of the motors and the gearing, the wheels don't perceptibly move unless the motor is set to more than about 20 units off of idle (127). Once the motor revs up, it's hard to stop on target. PID ought to be able to deal with this, but it isn't.
What sort of control schemes have other people used for this sort of problem? How do you tune your PID loops (if you use them)?

What's the simple & effective solution that I am ignoring?
PID is really the way to go.

One of the things you'll need to do is slow down the turning motor as it gets closer to the target direction. If you dont do this you will end up hunting around your target (also caled classic occillation).

Also, if your wheels start to turn right when you are turning left then you are probably manipulating the input number such that it goes over 255 or below 0 and thus "wraps around". You need to check (Printf) what your numbers are when you are sending them, as a PWM, to the motor.

I would also suggest using a pot, rather than an encoder, to give you positional feedback. That should avoid 'wrapping around' with your PWM numbers.
__________________
___________________
"We are not now that strength which in old days moved earth and heaven; that which we are, we are;
One equal temper of heroic hearts, Made weak by time and fate, but strong in will
To strive, to seek, to find, and not to yield. "
- Tennyson, Ulysses
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
steering wheel help FIRST Team 2044 bsbllpss Programming 3 23-01-2008 16:13
Using the USB Chicklet with a steering wheel PhilBot Control System 16 13-01-2008 11:43
Comments on the Logitech steering wheel with pedals waialua359 Control System 7 14-12-2007 16:08
need glp programing steering with a steering wheel Matchew Programming 2 10-02-2003 14:20
Robot steering help needed! BrendaB Programming 5 02-01-2003 00:43


All times are GMT -5. The time now is 19:12.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi