Go to Post I guess that we will just have to live with it, EH!!! :D - Steve W [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
  #16   Spotlight this post!  
Unread 06-01-2013, 18:06
dheerm's Avatar
dheerm dheerm is offline
Drive Team and Head Programmer
AKA: Dheer Mirchandani
FRC #0224 (The Tribe)
Team Role: Programmer
 
Join Date: Oct 2012
Rookie Year: 2010
Location: Piscataway
Posts: 37
dheerm will become famous soon enough
Re: Questions about Encoders and PIDControllers

Quote:
Originally Posted by Ether View Post
Much better :-)



It's not similar for the other terms. The I term can be non-zero at the setpoint. In fact, that's one of the purposes for the I term, to provide a non-zero output at the setpoint (if required).



Yes, feedforward is one way to address that issue.

Another is to use the I term, when controlling speed, like you would use the P term when controlling position.

Yet another is to integrate the output of the PID.


What do you mean by integrate the output? I take calculus and know the concepts behind PID but this wording is confusing me a bit. Could you please provide an example?
__________________
"All you need is duct tape and a dream"

Team 224:
District Champions @TCNJ w/ Team 56 and Team 293

8th alliance captain at MAR championships w/ (take a guess) , Team 56 and Team 293.

www.team224.com
Reply With Quote
  #17   Spotlight this post!  
Unread 06-01-2013, 18:14
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 592
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Questions about Encoders and PIDControllers

The WPILibJ source code is in the sunspotfrcsdk/lib directory in two zip files. One has the full project and the other has the source directory only.

Brad
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote
  #18   Spotlight this post!  
Unread 06-01-2013, 18:16
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,102
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: Questions about Encoders and PIDControllers

Quote:
Originally Posted by dheerm View Post
What do you mean by integrate the output? I take calculus and know the concepts behind PID but this wording is confusing me a bit. Could you please provide an example?
Normally the output from the PID is the command that gets sent to the motor every control iteration.

Instead of doing that, keep an accumulator which gets incremented each control iteration by the PID output times some gain.

e.g.

accumulator += gain * PID_output

Use the value in the accumulator as the command to the motor.

(you'll also want to clamp the value in the accumulator)



Last edited by Ether : 06-01-2013 at 18:18.
Reply With Quote
  #19   Spotlight this post!  
Unread 06-01-2013, 18:21
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,102
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: Questions about Encoders and PIDControllers

Quote:
I couldn't find a link to download the 2013 Java WPILib source
Quote:
Originally Posted by BradAMiller View Post
The WPILibJ source code is in the sunspotfrcsdk/lib directory
That assumes I already have Java installed here. I don't. Is there a link somewhere to download just the 2013 Java WPILib source, for folks (like me) who just want the source for reference, not for Java development?



Last edited by Ether : 06-01-2013 at 18:25.
Reply With Quote
  #20   Spotlight this post!  
Unread 06-01-2013, 20:27
rbmj rbmj is offline
Registered User
FRC #0612 (Chantilly Robotics)
Team Role: Alumni
 
Join Date: Apr 2011
Rookie Year: 2011
Location: DC Area/Fairfax County
Posts: 192
rbmj is a jewel in the roughrbmj is a jewel in the roughrbmj is a jewel in the rough
Re: Questions about Encoders and PIDControllers

Quote:
Originally Posted by Ether View Post
That assumes I already have Java installed here. I don't. Is there a link somewhere to download just the 2013 Java WPILib source, for folks (like me) who just want the source for reference, not for Java development?


For one thing I never understood why they don't just offer anonymous svn access to the repos WPILib on FirstForge. In addition to seeming a little against the ethos of FIRST, is the repo metadata *that* dangerous? Seriously?

It seems like WPILib development should be a little more open to the community... I understand if they want to keep a few files secret (e.g. kinect last year), but I see *no* reason that the incremental changes that they published this year needed to be secret until kickoff. If there had been something really new, then they could just develop that separately and have a script commit it at kickoff. This might be better suited to a DVCS like git where you could have a local branch so you don't loose commit history, but I digress.
Reply With Quote
  #21   Spotlight this post!  
Unread 08-01-2013, 01:13
bob.wolff68's Avatar
bob.wolff68 bob.wolff68 is offline
Da' Mentor Man
FRC #1967
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2007
Location: United States
Posts: 158
bob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nice
Re: Questions about Encoders and PIDControllers

On the topic of open source - I gotta say I agree whole heartedly. We are encouraged to be open in our developments and I'd really appreciate seeing WPILib become more open and transparent. It would also promote diff-patch fixes and/or pull requests from experienced teams who find issues and solve them which would reduce the overall burden on the WPI team.

Anyone want to address why this would be problematic? Or make it happen?

bob
__________________
~~~~~~~~~~~~~~~~~~~
Bob Wolff - Software from the old-school
Mentor / C / C++ guy
Team 1967 - The Janksters - San Jose, CA
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 13:38.

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