Go to Post I know I will never be part of an alliance this incredible, ever again (my apologies to all future partners, but you've got BIG shoes to fill.) - JVN [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 25-02-2013, 15:51
Pulverator's Avatar
Pulverator Pulverator is offline
Registered User
FRC #1551 (The Grapes of Wrath)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Naples
Posts: 8
Pulverator is an unknown quantity at this point
PID problems

We are using PID to control the speed on our shooter wheels. We need to set the back wheel to 1900 RPM, and the front wheel to 2700 RPM. On Monday night, we got it to speed up to the correct speed in under 1 second, and stay there with almost no error. Later that night, with the same code, it refused to work correctly. Both of the motors would speed up to around 200 RPM higher than their target, and stay there. The Victor lights showed that the only speeds being sent were full forward and full reverse. We swapped the victors and the motors, and the problem persisted. I have also re-imaged the cRIO, and used different laptops. The setpoint, output range, and PID values are all exactly the same as when it was working, and no changes have been made to the code. I have no idea what is going on.
Reply With Quote
  #2   Spotlight this post!  
Unread 25-02-2013, 16:16
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,685
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: PID problems

Are you sure the motors aren't just topping out at full speed? That can happen if you do something screwy and your command value doesn't create a change in feed back in the same direction. For instance, a 0.5 command to a speed controller should give you a positive speed feedback. If a 0.5 speed command gives you a negative feedback, the the motor is going to quickly end up going full speed the wrong way.

So, if the motors are actually just running full speed in a direction, then something's backwards with your speed feedback or motor polarity from the speed controller.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
Reply With Quote
  #3   Spotlight this post!  
Unread 25-02-2013, 23:15
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: PID problems

It doesn't sound like this is your problem, but a PID-controlled system can change its behavior drastically depending on the battery voltage. Just to make sure, are you seeing the "incorrect" results when using a freshly charged battery? Or was the system perhaps tuned with a weak battery installed?
Reply With Quote
Reply


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


All times are GMT -5. The time now is 14:35.

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