Go to Post Look for metal shavings in a pwm port; that's caused us to crash plenty of times. - Gary Dillard [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Spotlight this post!  
Unread 27-12-2012, 10:33
Cal578 Cal578 is offline
Passionate FIRST-er, CD donor
AKA: Gerry
FRC #0578 (Red Raider Robotics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2008
Location: Rochester, NY
Posts: 256
Cal578 has a brilliant futureCal578 has a brilliant futureCal578 has a brilliant futureCal578 has a brilliant futureCal578 has a brilliant futureCal578 has a brilliant futureCal578 has a brilliant futureCal578 has a brilliant futureCal578 has a brilliant futureCal578 has a brilliant futureCal578 has a brilliant future
Re: Questions about Encoders and PIDControllers

Quote:
Originally Posted by apples000 View Post
... The problem is that the pid loop won't work if you're trying to control speed. With a positional PID loop, when the setpoint is reached, the pid loop will output a zero command to the motor. ...
No, that's not how PID works. If you set the constant for I (Integral) to an appropriate value, the PID output will be a good value to maintain the setpoint. A zero output is what would happen if you used a Proportional only control.

Controlling speed and position aren't really different, once you get your units of measurement and conversion factors (converting motor input to desired output) right. Position seems different because when the system reaches the setpoint, typically the output should go to zero. If you think of controlling position on an incline, then you still need a non-zero output when the system reaches the setpoint, so it's about the same.

Here are some good threads on PID control:

Robodox Guide to velocity control using PID

2012: Tuning the Jaguar's Speed Control PID Loop

Alternative to PID speed control
__________________
Cal
R3: Red Raider Robotics (FRC Team 578)
Fairport, NY, USA
www.FairportRobotics.org
2016 Finger Lakes Regional: Semifinalist on Alliance 7 (1128, 2010, 578)
2016 NYC Regional: Finalist on Alliance 3 (3419, 578, 3017), 4th seed team, Team Spirit Award
2015 Finger Lakes Regional: 8-3-0 in qualification, 7th seed, Quarterfinalist
2014 NY Tech Valley Regional: 8-4-0 in qualification, 13th seed, Semifinalist
2013 Finger Lakes Regional: 4-5-0 in qualification, 26th seed, Alliance 6, 1-2 in tournament
2012 Buckeye Regional: Gracious Professionalism Award, 7-3-0, 14th seed
2011 Finger Lakes Regional: Engineering Inspiration Award
Reply With Quote
 


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 18:23.

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