View Single Post
  #23   Spotlight this post!  
Unread 03-12-2012, 21:13
Jay Meldrum's Avatar
Jay Meldrum Jay Meldrum is offline
Registered User
FRC #0067 (H.O.T.)
Team Role: Engineer
 
Join Date: Jan 2012
Rookie Year: 2003
Location: Michigan
Posts: 42
Jay Meldrum has much to be proud ofJay Meldrum has much to be proud ofJay Meldrum has much to be proud ofJay Meldrum has much to be proud ofJay Meldrum has much to be proud ofJay Meldrum has much to be proud ofJay Meldrum has much to be proud ofJay Meldrum has much to be proud ofJay Meldrum has much to be proud of
Re: Behind The Design 2012

Quote:
Originally Posted by Ether View Post
Couple of follow-up questions if I may:

1) Perhaps you've posted this somewhere already, and if so my apologies: could you share a bit more detail about your PID? e.g. did you use feedforward, or integrate the PID output, or tune I like P. How closely were you able to hold speed. stuff like that.

We integrated the PID output. Within the PID, we only used the proportional and derivative terms.

We were able to hold our speed within +/- 50 to 200 rpm; depending on the set speed. We tuned the PID to be the most steady at the bottom of the key shot.

I would say our biggest issue while tuning the PID was handling the split second/recovery when the ball entered and went through the shooter. We noticed huge shooter speed recovery variations with a few balls (We called them the "pumpkin balls" ); thus missing the shot. At one point we tried adding additional logic to "power thru" any quick decreases in shooter speed. That didn't end up working well so we just continued to tune the PID to match the majority of balls.

Here is the function that we wrote in place of the PIDWrite provided by WPIlib. Thus still allowing us to use the WPIlib PIDController.

Code:
void PIDWrite(float output) {
		//Used in place of WPIlib PIDWrite for cannon control
		//m_cannonUpToSpeed is used to allow/deny the feeder to feed balls
                if((m_cannonSetPoint - 5) <= m_CannonEncode->GetRate() && (m_cannonSetPoint + 5) >= m_CannonEncode->GetRate())
                {
                        m_cannonUpToSpeed = 1;
                }
		//500 is our "hail mary" setpoint
                else if(m_cannonSetPoint == 500)
                {
                        m_cannonUpToSpeed = 1;
                }
                else
                {
                        m_cannonUpToSpeed = 0;
                }
                
                m_CannonDemandedVoltage += output;
                if(m_CannonDemandedVoltage > 1) m_CannonDemandedVoltage = 1;
                if(m_CannonDemandedVoltage < 0) m_CannonDemandedVoltage = 0;
                m_Cannon1->Set(-m_CannonDemandedVoltage);
                m_Cannon2->Set(-m_CannonDemandedVoltage);
        }
__________________
2012-2015 - FRC 67 - Programming/Controls Lead Mentor
2003-2005 - FRC 857 - Driver

Check us out at http://www.hotteam67.org
Previous year design docs, programming tutorials, and more!

Last edited by Jay Meldrum : 03-12-2012 at 21:16.
Reply With Quote