Go to Post Wait, robot? We've been working on building a team. - rtfgnow [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rating: Thread Rating: 52 votes, 4.98 average. Display Modes
  #1   Spotlight this post!  
Unread 18-03-2012, 11:46
baronep's Avatar
baronep baronep is offline
Student President
FRC #2848 (Jesuit All-Sparks)
Team Role: Leadership
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Dallas TX
Posts: 167
baronep is on a distinguished road
Alternative to PID speed control

Does anyone know of any way to control shooter wheel speed other than using PID? We are currently using PID and we are getting an oscillating error of about 5%. Any ideas how to minimize this error. (we are currently only using P. And D at all starts an oscillation.)
Reply With Quote
  #2   Spotlight this post!  
Unread 18-03-2012, 11:55
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,015
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: Alternative to PID speed control

Quote:
Originally Posted by baronep View Post
Does anyone know of any way to control shooter wheel speed other than using PID?
Use a flywheel, and use Jag CAN Voltage mode or do voltage compensation in the cRIO

Quote:
We are currently using PID and we are getting an oscillating error of about 5%.
First, look at the signal you are getting from your speed sensor (open loop) to make sure you are actually getting a clean signal.

Quote:
Any ideas how to minimize this error
Read the several threads here on CD that discussed PID speed control of 2012 shooter wheels.

Quote:
we are currently only using P
You might want to re-read this thread:

http://www.chiefdelphi.com/forum/sho...21#post1114721



Last edited by Ether : 18-03-2012 at 12:03.
Reply With Quote
  #3   Spotlight this post!  
Unread 18-03-2012, 17:34
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 6,979
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: Alternative to PID speed control

An oscillation can be changed by changing your P factor. I would think that reducing the multiplier will help, but not knowing your mechanical setup this is just a guess. Experiment by cutting it in half and doubling it, that should tell you which direction to go.
__________________

I am N2IRZ - What's your callsign?
Reply With Quote
  #4   Spotlight this post!  
Unread 18-03-2012, 21:04
Jay1986's Avatar
Jay1986 Jay1986 is offline
Programmer and Driver
AKA: Jay Urban
FRC #1986 (Team Titanium)
Team Role: Alumni
 
Join Date: Mar 2011
Rookie Year: 2010
Location: Lees Summit
Posts: 67
Jay1986 is a jewel in the roughJay1986 is a jewel in the roughJay1986 is a jewel in the roughJay1986 is a jewel in the rough
Re: Alternative to PID speed control

You can write an equation that uses the same set motor speed voltage at a set distance using the same amount of voltage no matter how charged your battery is. See if this helps:
http://www.chiefdelphi.com/forums/sh...9&postcount=17
__________________

2013 Oklahoma Regional (Regional Winner, Gracious Professionalism, [and judges voted me star of the day])
2013 KC Regional (Regional Winner, Woodie Flowers, Industrial Design)
2013 Hub City Regional (Regional Winner, Entrepreneurship, Quality, Dean's List)
Reply With Quote
  #5   Spotlight this post!  
Unread 19-03-2012, 11:00
mommazzboy mommazzboy is offline
Registered User
FRC #2468 (Team Appreciate)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2009
Location: Austin, TX
Posts: 4
mommazzboy is an unknown quantity at this point
Re: Alternative to PID speed control

This is untested, but we decided to use the PID VI coupled with a feed forward term to control output velocity.
Reply With Quote
  #6   Spotlight this post!  
Unread 19-03-2012, 12:03
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,015
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: Alternative to PID speed control

Quote:
Originally Posted by mommazzboy View Post
This is untested, but we decided to use the PID VI coupled with a feed forward term to control output velocity.
Make sure you scale the feedforward appropriately and then clamp the result after you add it to the PID output.


Reply With Quote
  #7   Spotlight this post!  
Unread 19-03-2012, 18:38
baronep's Avatar
baronep baronep is offline
Student President
FRC #2848 (Jesuit All-Sparks)
Team Role: Leadership
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Dallas TX
Posts: 167
baronep is on a distinguished road
Re: Alternative to PID speed control

1. I have heard a lot about a "feedforward loop". Is that just an accumulator? A feedback loop? A picture is worth a thousand words

2. How does the sampling rate affect this. I am currently running the loop at 50ms using a Timed Loop. Does anyone know if adjusting this up or down would help at all?

3. Is a 5% error significant or is the inconsistency more likely rooted in a mechanical problem?
Reply With Quote
  #8   Spotlight this post!  
Unread 19-03-2012, 18:53
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,015
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: Alternative to PID speed control

Quote:
Originally Posted by baronep View Post
1. I have heard a lot about a "feedforward loop". Is that just an accumulator?
No.

Quote:
A feedback loop?
No.

Quote:
A picture is worth a thousand words
http://ether.comeze.com/FRC/11822/Speed_PID_dia.pdf


Reply With Quote
  #9   Spotlight this post!  
Unread 19-03-2012, 19:04
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,587
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: Alternative to PID speed control

A feedforward term in a control loop is a term that adds to the control output based directly off of the command input or some feature thereof. It doesn't depend on any feedback, it purely feeds the command signal forward through the control loop.

For instance, in the case of controlling a shooter wheel, there's a theoretical minimum voltage necessary to run the wheel at the correct speed. Based off this, you could create a feedforward term in your control loop. Take a CIM with no reduction. 12V free speed is 5400RPM. So, if you want to run it at 2700RPM, you know you need atleast 6V output. You create a feed forward term with a gain of (12V/5400RPM). Then, your output is PID output + RPMs * (12V/5400RPM). That way, when you command 2700 RPM, you're already outputting the necessary 6V to run at that speed. Your PID loop now only has to compensate for the difference between free speed and your loaded speed. Plus, you're instantly outputting 6V without waiting for an I term to build up enough error to put out 6V for you. Basically, feedforward terms improve the response of your control loop based off features you already know about your system.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
Reply With Quote
  #10   Spotlight this post!  
Unread 19-03-2012, 19:24
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,015
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: Alternative to PID speed control

Quote:
Originally Posted by Kevin Sevcik View Post
Then, your output is PID output + RPMs * (12V/5400RPM).
warning: If PID output is +/-1 this may not work as expected.


Reply With Quote
  #11   Spotlight this post!  
Unread 19-03-2012, 19:51
martin417's Avatar
martin417 martin417 is online now
Opinionated old goat
AKA: Martin Wilson
no team
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2008
Location: Buford, GA
Posts: 719
martin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond repute
Re: Alternative to PID speed control

We used a very simple closed loop control that worked flawlessly. We had a jag on CAN bus with an encoder attached to the jag. We used voltage control with a voltage ramp of ~115 V/S. We queried the jag for speed, and if the speed was less than the set speed, we set max voltage. If the speed was greater than or equal to set speed, we set zero voltage. The inertia of the system kept the shooter speed within ~15 RPM of set speed at all times, and when we shot, the voltage immediately went to full for rapid spin-up.

the simplest solution that works is usually best.
__________________
Former Mentor Team 1771
Former mentor Team 4509
Reply With Quote
  #12   Spotlight this post!  
Unread 19-03-2012, 19:58
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,015
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: Alternative to PID speed control

Quote:
Originally Posted by martin417 View Post
We used a very simple closed loop control that worked flawlessly. We had a jag on CAN bus with an encoder attached to the jag. We used voltage control with a voltage ramp of ~115 V/S. We queried the jag for speed, and if the speed was less than the set speed, we set max voltage. If the speed was greater than or equal to set speed, we set zero voltage. The inertia of the system kept the shooter speed within ~15 RPM of set speed at all times, and when we shot, the voltage immediately went to full for rapid spin-up.

the simplest solution that works is usually best.
I've been wondering if that would work for this application. I did something very similar for an automotive actuator I worked on several years ago.

Thanks for posting that.

PS - I assume you had the Jag jumper set for coast?



Last edited by Ether : 19-03-2012 at 20:00.
Reply With Quote
  #13   Spotlight this post!  
Unread 19-03-2012, 21:17
martin417's Avatar
martin417 martin417 is online now
Opinionated old goat
AKA: Martin Wilson
no team
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2008
Location: Buford, GA
Posts: 719
martin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond repute
Re: Alternative to PID speed control

Quote:
Originally Posted by Ether View Post
...PS - I assume you had the Jag jumper set for coast?


Yes, coast.
__________________
Former Mentor Team 1771
Former mentor Team 4509
Reply With Quote
  #14   Spotlight this post!  
Unread 20-03-2012, 09:11
Cal578 Cal578 is offline
Passionate FIRST-er, CD donor
AKA: Gerry
FRC #0578 (Red Raider Robotics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2008
Location: Rochester, NY
Posts: 255
Cal578 has a brilliant futureCal578 has a brilliant futureCal578 has a brilliant futureCal578 has a brilliant futureCal578 has a brilliant futureCal578 has a brilliant futureCal578 has a brilliant futureCal578 has a brilliant futureCal578 has a brilliant futureCal578 has a brilliant futureCal578 has a brilliant future
Re: Alternative to PID speed control

This feed-forward idea sounds helpful. If I understand correctly, PID alone can be done in the Jaguar via CAN, but PID with feed-forward would need to be implemented entirely in the cRIO. The Jag PID doesn't have any way to add a feed-forward value. Did I get this right?
__________________
Cal
R3: Red Raider Robotics (FRC Team 578)
Fairport, NY, USA
www.FairportRobotics.org
2016 Finger Lakes Regional: Semifinalist on Alliance 7 (1128, 2010, 578)
2016 NYC Regional: Finalist on Alliance 3 (3419, 578, 3017), 4th seed team, Team Spirit Award
2015 Finger Lakes Regional: 8-3-0 in qualification, 7th seed, Quarterfinalist
2014 NY Tech Valley Regional: 8-4-0 in qualification, 13th seed, Semifinalist
2013 Finger Lakes Regional: 4-5-0 in qualification, 26th seed, Alliance 6, 1-2 in tournament
2012 Buckeye Regional: Gracious Professionalism Award, 7-3-0, 14th seed
2011 Finger Lakes Regional: Engineering Inspiration Award
Reply With Quote
  #15   Spotlight this post!  
Unread 20-03-2012, 09:19
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,015
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: Alternative to PID speed control

Quote:
Originally Posted by Cal578 View Post
The Jag PID doesn't have any way to add a feed-forward value. Did I get this right?
Yes. See this post:

http://www.chiefdelphi.com/forums/sh....php?p=1108556


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 08:42.

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