Go to Post Michigan is all about tough love. If you can make it there you can make it anywhere. - Koko Ed [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
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
  #31   Spotlight this post!  
Unread 19-03-2012, 23:18
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: 262
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: Flywheels and Shooter Wheels

Thanks for posting code, Baronep. How did you determine the constants for your PID?
__________________
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
  #32   Spotlight this post!  
Unread 20-03-2012, 00: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: Flywheels and Shooter Wheels

Quote:
Originally Posted by Cal578 View Post
I understand the basic theory of PID control (I'm no expert, but I have a good idea of the general process). I'm looking for advice on how to obtain the constants for the controller. I figured that might be different for Jag-based PID v. cRIO.
Try this instead:

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


  #33   Spotlight this post!  
Unread 20-03-2012, 08:36
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: 262
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: Flywheels and Shooter Wheels

Thanks for the link to that thread, Ether. I especially liked the clear description of feed-forward, including your diagram.

We're heading to our second regional (Buckeye) tomorrow, and will implement some (wish we could do all) of the ideas in this thread. I'll let everyone know how it turns out.

Even if we don't have time to implement most of these improvements during competition, I now have more ideas for off-season projects for the team.
__________________
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
  #34   Spotlight this post!  
Unread 20-03-2012, 13:53
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: Flywheels and Shooter Wheels

Quote:
Originally Posted by Ether View Post
This could very well be the ideal way to control a shooter wheel's speed.
  • Fastest possible spin-up and recovery time
  • No tuning necessary
  • Stable over a wide range of loads
  • Extremely simple to code in any language
Think about how this works. Whenever the measured speed is below the setpoint, full voltage is applied to the motor, providing the fastest possible spin-up and recovery. When the motor reaches the desired speed, the power is removed (voltage set to zero). Since we are controlling speed (not position), there is no overshoot due to "momentum". There is no "momentum" to carry it past the setpoint, since the setpoint is speed, not position. Once the power is removed from the motor, the acceleration goes to to zero immediately*, so there is no further increase in speed.

The only overshoot is caused by the sample time: since this is not a continuous (analog) but rather a discrete (digital) controller, the power to the motor is updated only once each execution cycle. But if the execution cycle time is 20ms (e.g. TeleOp), then the maximum overshoot in rpm would be 0.020*wheel_acceleration_in_rpm_per_second. At motor speeds typical for a shooter and with sufficient moment of inertia in the wheel, the wheel acceleration is low enough that when multiplied by 0.02 creates a very small maximum overshoot.

Once the wheel is at the setpoint speed and the power has been removed, the wheel will of course begin to decelerate (due to friction, windage, etc). But the moment it goes below the setpoint, maximum voltage is again applied* and the cycle repeats.


*subject to any voltage ramping that may be in use

Last edited by Ether : 20-03-2012 at 13:59.
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 10:54.

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