View Single Post
  #37   Spotlight this post!  
Unread 30-12-2014, 18:57
James Kuszmaul James Kuszmaul is offline
NEFIRST CSA
FRC #0971 (Spartan Robotics)
 
Join Date: Jan 2012
Rookie Year: 2011
Location: Worcester, MA
Posts: 61
James Kuszmaul has much to be proud ofJames Kuszmaul has much to be proud ofJames Kuszmaul has much to be proud ofJames Kuszmaul has much to be proud ofJames Kuszmaul has much to be proud ofJames Kuszmaul has much to be proud ofJames Kuszmaul has much to be proud ofJames Kuszmaul has much to be proud ofJames Kuszmaul has much to be proud ofJames Kuszmaul has much to be proud of
Re: 971's Control System

Quote:
Originally Posted by Bryce Paputa View Post
Sorry to necro this thread, but I haven't had time to look into this stuff in detail until now and I have a few questions. Looking at the 2013 flywheel controller, the state matrix for the model looks like:

Code:
Xdot = [ speeddot ] = [ 0     1          ][ speed ] + [ 0      ] U
       [ inputdot ]   [ 0 -kt/kv/(JG^2R) ][ input ]   [ kt/JGR ]

y = [ 1 0 ][ speed ] = speed
           [ input ]

(that's correct, right?)


The part I don't understand is the -kt/kv/(JG^2R) term. That represents how the wheel slows down over time, right? How is/was it derived?
You are correct; that term does describe how the wheel slows down over time. This comes from the equations that are use to describe an ideal motor. I have attached a pdf with the derivation of the A and B matrices.
Edit: I didn't look carefully enough at your matrices; what I said is correct, but the state matrix (X) is of the form:
[[position]
[velocity]]
for the 2013 shooter and Y would just be the position.

Quote:
Originally Posted by Bryce Paputa View Post
Another question I have is about arms and gravity, when you're modeling an arm like your claws last year do you just ignore gravity in the model and treat it as a disturbance? It doesn't seem like a linear force to me with how it changes with respect to the arm angle and I can't figure out how to get it into a linear state matrix model.
We did ignore gravity in our final model (we ran some simulations with gravity included and the differences were relatively minor; unfortunately, I don't have any of the graphs on hand). This is also complicated by the fact that gravity's influence on our arm would be non-linear (as you mention) and due to the wide range of motion of the arm, the small angle approximation can not be used.
The way that we handled the constant force was through the use of the delta-u controller (previous posts in this thread should have some information on this), similar to how the I term of a PID controller would handle it.

If you have any more questions, any of us would be happy to answer.

Another Edit:
I realized that no one mentioned this explicitly since the last post, but you can find some more controls documentation and our 2014 source code here.
Attached Files
File Type: pdf FRC971 State Space Constants Derivation.pdf (24.3 KB, 184 views)
__________________
FRC971 (Student) 2011-2014
FRC190 (College Mentor-ish) 2014
WPILib Development 2014-present

Last edited by James Kuszmaul : 30-12-2014 at 19:26.
Reply With Quote