Go to Post po-nos, cancans, and totes ma goats - dubiousSwain [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 11-01-2012, 17:42
warfaj's Avatar
warfaj warfaj is offline
Registered User
FRC #0610
 
Join Date: Dec 2010
Location: Toronto Ontario
Posts: 3
warfaj has a spectacular aura aboutwarfaj has a spectacular aura about
PID Subsystems Question

Is there any way of running multiple PID instances simultaneously from the same PID subsystem?
Let me clarify:
I want to run my drive train with a PID Subsystem but I need to set different set points for each side of the drive train. I also need to set different PID inputs. Is there any way for me to do this in one PID Subsystem? The PID constants are the same for both sides of the drive train.

PS. I know I can do this with two PID Subsystems but I think it would be better to have a single DriveTrain subsystem.

Thanks in advance.
Reply With Quote
  #2   Spotlight this post!  
Unread 11-01-2012, 17:48
Jared Russell's Avatar
Jared Russell Jared Russell is online now
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,078
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: PID Subsystems Question

I would simply make a new subclass of Subsystem that includes the desired functionality. You can copy as much or as little of the PIDSubsystem code as you would like.
Reply With Quote
  #3   Spotlight this post!  
Unread 13-01-2012, 16:23
BradAMiller BradAMiller is online now
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 590
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
The PIDSubsystem is just an encapsulation of a regular subsystem and a PIDController object. You can make your own Subsystem as was suggested that just has two PIDController objects in it. For common cases the PIDSubsystem works pretty well, but not always.

Brad
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote
  #4   Spotlight this post!  
Unread 15-01-2012, 23:40
youxinche95 youxinche95 is offline
Registered User
AKA: Eugene Che
FRC #0649 (MSET)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Saratoga, CA
Posts: 18
youxinche95 is an unknown quantity at this point
Re: PID Subsystems Question

I actually created a pid class with that passes the kP, kI, kD in the constructor and updates the target and current.

It works pretty well, and saves me lots of writing, because programmers are lazy

good luck!
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 22:20.

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