Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Questions about Encoders and PIDControllers (http://www.chiefdelphi.com/forums/showthread.php?t=110220)

dheerm 06-01-2013 18:06

Re: Questions about Encoders and PIDControllers
 
Quote:

Originally Posted by Ether (Post 1209060)
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?

BradAMiller 06-01-2013 18:14

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

Ether 06-01-2013 18:16

Re: Questions about Encoders and PIDControllers
 
Quote:

Originally Posted by dheerm (Post 1209206)
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)



Ether 06-01-2013 18:21

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 (Post 1209214)
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?



rbmj 06-01-2013 20:27

Re: Questions about Encoders and PIDControllers
 
Quote:

Originally Posted by Ether (Post 1209220)
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.

bob.wolff68 08-01-2013 01:13

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


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

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