Go to Post You know, one year we need to stake out the AndyMark building for several weeks before Kickoff so we can see what the game pieces will be. Hidden webcam? :rolleyes: - DonRotolo [more]
Home
Go Back   Chief Delphi > Technical > Programming
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 08-02-2014, 13:13
dellagd's Avatar
dellagd dellagd is offline
Look for me on the field!
AKA: Griffin D
FRC #2590 (Nemesis) #2607 (The Fighting Robovikings)
Team Role: Mentor
 
Join Date: Sep 2011
Rookie Year: 2011
Location: PA
Posts: 890
dellagd has a reputation beyond reputedellagd has a reputation beyond reputedellagd has a reputation beyond reputedellagd has a reputation beyond reputedellagd has a reputation beyond reputedellagd has a reputation beyond reputedellagd has a reputation beyond reputedellagd has a reputation beyond reputedellagd has a reputation beyond reputedellagd has a reputation beyond reputedellagd has a reputation beyond repute
Jag PID control for 2 linked motors

We really like the Jaguar's built-in PID control. However, we have two motors going into the same gearbox that need to operate together on the same control loop (essentially). Has anyone ever tried to use the Jag PID control loop with the required two separate jaguars for two CIMs?

Is there some more elegant way to link them that doesn't involve many CAN transactions on the Crio? So far all we will be doing is just polling what voltage one Jag is set to and setting that voltage to the other Jag.
__________________
Check out some cool personal projects in computers, electronics, and RC vehicles on my blog!

2016 MAR DCMP Engineering Excellence Award
2016 MAR Westtown Innovation in Control Award
2016 MAR Hatboro-Horsham Industrial Design Award
2015 Upper Darby District Winners - Thanks 225 and 4460!
2015 Upper Darby District Industrial Design Award
2015 Hatboro-Horsham District Winners - Thanks 2590 and 5407!
2014 Virginia Regional Winners - Thanks so much 384 and 1610, I will never forget that experience!
2014 Virginia Quality Award
2014 MAR Bridgewater-Raritan Innovation in Control Award
2014 MAR Hatboro-Horsham Gracious Professionalism Award
2013 MAR Bridgewater-Raritan Innovation in Control Award
2012 MAR Lenape Quality Award
  #2   Spotlight this post!  
Unread 08-02-2014, 13:52
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
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: Jag PID control for 2 linked motors

Quote:
Originally Posted by dellagd View Post
So far all we will be doing is just polling what voltage one Jag is set to and setting that voltage to the other Jag.
What's the total time delay for these steps:

1) cRIO sends request for output voltage value to Jag1

2) Jag1 receives request

3) Jag1 sends requested voltage value back to cRIO

4) cRIO receives requested voltage value

5) cRIO sends new voltage command to Jag2

6) Jag2 receives new voltage command



Last edited by Ether : 08-02-2014 at 13:57.
  #3   Spotlight this post!  
Unread 08-02-2014, 16:07
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: Jag PID control for 2 linked motors

You could run the control loops on the cRio side.

Then just copy the values to both motors.
__________________
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
  #4   Spotlight this post!  
Unread 08-02-2014, 16:10
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
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: Jag PID control for 2 linked motors

Quote:
Originally Posted by apalrd View Post
You could run the control loops on the cRio side.

Then just copy the values to both motors.
I think his question is can it be done using the Jag's PID.

cross-reference to similar thread


  #5   Spotlight this post!  
Unread 08-02-2014, 16:13
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
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: Jag PID control for 2 linked motors

Quote:
Originally Posted by apalrd View Post
You could run the control loops on the cRio side.

Then just copy the values to both motors.
Since the motors are mechanically coupled, if you were going to do it that way would it not be better to use one encoder and one control loop and send the one computed command to both motors with a Y cable?


  #6   Spotlight this post!  
Unread 08-02-2014, 17:22
Mr. Lim Mr. Lim is offline
Registered User
AKA: Mr. Lim
no team
Team Role: Leadership
 
Join Date: Jan 2004
Rookie Year: 1998
Location: Toronto, Ontario
Posts: 1,125
Mr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond repute
The short answer is unfortunately no. We tried all manner of permutations to try and do this in 2012, and ultimately we built a shooter that used only one motor.

The best we got d to read the voltage of the Jag doing the PID, and send that village to the other Jag operating in VBus mode.

It works, but not well. Good enough in some not so precise applications, like some drivetrain movements, but if you need a very tight PID there's no way that arrangement will cut it.

In 2013 we moved to software PID on the cRIO and sent the motor values to two Jag running in VBus mode, as previously suggested.

Sorry to be the bearer of bad news, but we never did find a good solution.
__________________
In life, what you give, you keep. What you fail to give, you lose forever...
  #7   Spotlight this post!  
Unread 08-02-2014, 21:42
Jeffrafa's Avatar
Jeffrafa Jeffrafa is offline
Robotics Addict
AKA: Jeff Lewis
FRC #1425 (Error Code)
Team Role: Mentor
 
Join Date: Dec 2003
Rookie Year: 2004
Location: Wilsonville, OR
Posts: 165
Jeffrafa has a brilliant futureJeffrafa has a brilliant futureJeffrafa has a brilliant futureJeffrafa has a brilliant futureJeffrafa has a brilliant futureJeffrafa has a brilliant futureJeffrafa has a brilliant futureJeffrafa has a brilliant futureJeffrafa has a brilliant futureJeffrafa has a brilliant futureJeffrafa has a brilliant future
Re: Jag PID control for 2 linked motors

For our shooter wheel last year we had 2 motors on the same gearbox with PID on the Jaguars. We had a hall-effect sensor with a magnet on the wheel for RPM feedback, then just fed that signal into both jaguar's encoder input running the same PID routine. The same could be done with a normal encoder feedback.

You do have to be careful about how you wire the sensor to 2 Jags, as I recall the electrical team created an optocoupler splitter for the sensor, as there is a problem with directly connecting the encoder inputs between multiple Jags.

Initially we had just one motor on the shooter wheel, but upgraded to 2 for faster recovery while full-court shooting. It took re-tuning PID parameters for the new setup, but was otherwise the simplest solution for us. I think our tolerance band for shooting was ~80 RPM or less, and we could shoot again in less than a second with 2 motors, so this setup worked well with reasonably tight requirements.
__________________
Team 1425 Alumnus and Mentor

I am KF7JDK - What's your callsign?
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 02:44.

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