Go to Post and Bob's your uncle. - Joe Johnson [more]
Home
Go Back   Chief Delphi > Technical > Motors
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 24-10-2012, 11:45
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Bench top setup for demonstrating PID

A 'pure' PID controller can act as a velocity controller if both of the inputs (setpoint and process variable) are velocity. In this case, D will be unused, I will act as P, and P will act as D. The issues come when the PID class has additional logic to handle the I term, such as resetting the integral when the error zero-crosses, capping the integral, etc. - I've heard the Jaguars reset I under some conditions, although I've never verified this.

Every time I have worked with a speed controller, attempting to adapt a position controller has always failed to meet the design requirements, and I design a better controller to handle it (usually incorporating some application-specific limiting of the integral term). Adding a Feed Forward term also helped with response time and oscillation.

Basically, what I'm saying is, don't be afraid to write your own PID math and not use the per-existing class.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
  #2   Spotlight this post!  
Unread 24-10-2012, 12:09
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,044
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: Bench top setup for demonstrating PID

Quote:
Originally Posted by apalrd View Post
A 'pure' PID controller can act as a velocity controller if both of the inputs (setpoint and process variable) are velocity. In this case, D will be unused, I will act as P, and P will act as D. The issues come when the PID class has additional logic to handle the I term, such as resetting the integral when the error zero-crosses, capping the integral, etc. - I've heard the Jaguars reset I under some conditions, although I've never verified this.

Every time I have worked with a speed controller, attempting to adapt a position controller has always failed to meet the design requirements, and I design a better controller to handle it (usually incorporating some application-specific limiting of the integral term). Adding a Feed Forward term also helped with response time and oscillation.

Basically, what I'm saying is, don't be afraid to write your own PID math and not use the per-existing class.
Here are some other options:

http://www.chiefdelphi.com/forums/sh...90&postcount=5


  #3   Spotlight this post!  
Unread 24-10-2012, 12:12
MrRoboSteve MrRoboSteve is offline
Mentor
AKA: Steve Peterson
FRC #3081 (Kennedy RoboEagles)
Team Role: Mentor
 
Join Date: Mar 2012
Rookie Year: 2011
Location: Bloomington, MN
Posts: 575
MrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond repute
Re: Bench top setup for demonstrating PID

The Robodox paper proposes implementing a PIDSource subclass (RPMSource) that wraps an RPM value, which is the wired to the WPILib PIDController. On each turn of the Execute() crank in our command, we take the elapsed time and change in encoder count to calculate an RPM value, which is fed into the RPMSource instance.

apalard -- it does look like we're not too far from doing all of the calculations ourselves, so we will probably give that a try if the build-in controller fails us. One item that hasn't been obvious is how far back in time to accumulate errors.
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


All times are GMT -5. The time now is 04: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