I’m currently trying to model our dual 775pro 3:1 reduction flywheel shooter in matlab/simulink. I was able to make a simulation for the system using a single motor but I’m having difficulties with the dual motor system.
I’m currently using the transfer function W(s)/V(s)=(k_t)/(R(Js+b)+k_b*k_t), with the assumption that motor inductance, L, is negligible.
k_t=motor torque constant
k_b=back EMF
b=friction damping
R=circuit resistance
J=Moment of inertia
Since the two motors produce roughly double the torque of a single motor, would doubling the torque constant, k_t, be an appropriate assumption, or are additional changes to the TF necessary. Additionally, I’m currently assuming the frictional damping, b, to be 0 as I can’t find any value online and I can’t derive it experimentally currently. Does anyone have an appropriate value for this system? Finally, for the gear ratio, I was multiplying the moment of inertia, J, by 3 and dividing the output rpm by 3. Is this also an appropriate model for the system?
Any help modeling this system would be greatly appreciated!
Additionally, I’m currently assuming the frictional damping, b, to be 0 as I can’t find any value online
Friction damping is probably going to be negligible.
I end up with (KtG)/(sJR + G^2KtKb) where G is the gear ratio in terms of a reduction, i.e it’ll be 1/300 if the flywheel rotates once for every 300 rotations of the motor. For the two motors, I usually just multiply it into my calculations of motor constants, so multiply stall torque by two, stall current by two, and free current by two. Then, when you calculate Kb and Kt it all backs out properly. In this case, Kb = (12.0 - resistance * free current) / free speed (rads) and Kt = stall torque / stall current. That way also you can build gearbox inefficiency into the stall torque.
If the stall torque, current, and free current are doubled and Kt=stall torque/stall current, Kt will be unchanged by the doubling. If Kb=(12-R*free current)/(free speed), Kb will be changed by the doubling. However, I calculated Kb and I got a result about 10^-1 that of Kt. I thought they are supposed to be roughly equivalent.
I should mention that the resistance will halve because R = 12 / stall current.
*edit: The only thing that should change is the resistance, if you have two motors with the same Kt and Kb. If you don’t, you’d need to sum the torques during the derivation, probably.
I see my error now; I had my units in my convangvel function backwards to convert the free speed from rpm to rad/s. My Kt is now .0053 and Kb is .0061.
My concern right now would be my time constant, which is about 8 seconds. This feels a lot higher than it should be. For now I’m ignoring the moment contributed by the shaft, gears, and motor and just focusing on our 4" Fairlane flywheel. Assuming the CAD data is accurate, J=.000555 N*m^2.
Edit: My bad, I had my gear ratio inverted. I’m now getting a time constant closer to 0.075 seconds and a max rpm of about 6200, which is what it should be. The time constant seems low, but I’ll look in to adding the moments of the other components and see how that affects my simulation.
Edit 2: Now looking at it again, I’m not sure inverting the gear ratio was correct. I think I’ll sleep on it and take another look in the morning. Thanks for all the help guys!
I recommend using Matlab System Identification Toolbox… Here is a series of videos explaining how to obtain experimentally the transfer function of a motor.
I have used this method, tweaked a little bit for it to run in microcontrollers that are not arduino (if you like I can elaborate more on this), and have succesfully obtained transfer functions for systems and motors…
This comes handy because it takes in consideration the REAL system, as data is obtained experimentally, and arrives to a transfer function very close to the real thing.
Finally, this can be used to simulate control, and I’ve achieved very good results.
I pulled it directly from the CAD model. I highlighted it in the second picture in the imgur album in one of my earlier posts. I don’t have access to the physical part so I can’t weigh it and I can’t find the weight or material density to derive it myself. I’m thinking this number is the problem with my simulation currently. I’ll keep trying to find better info.
While I’m waiting to validate the first part of my model, I’d like to consider the second part: modeling the balls entering the flywheel and being shot.
My initial thought is the balls should remove a specified amount of velocity from the flywheel, as the balls would remove momentum from the system and angular momentum scales linearly with angular velocity. Additionally, the momentum of the ball can be represented as the linear and angular momentum of the balls exiting as linear function of the velocity of the flywheel, since the final velocity of the flywheel affects the final velocity of the ball.
Given this, I thought it could be represented with a unit step, where the total area under the step represents the velocity lost by the flywheel as a linear function of the velocity of the flywheel. For example, it would lose .02*W over .2 sec every time a ball enters the system. This feels incorrect, however, as it doesn’t take in to account how the velocity of the flywheel changes over the time the ball is in the system.
Can someone point me in the right direction for how to model the velocity lost by the flywheel as it shoots balls?
Edit: I’ve gone down a few different trains of thought for this. Maybe it could be modeled as a unit impulse? Maybe a transfer function for the speed of the ball with an input of flywheel velocity and an output of ball momentum, and then find the associated function for flywheel velocity loss? That doesn’t seem right, though because your input and output are more or less the same, just delayed. Maybe model the ball as an applied force, which causes an applied torque on the motor leading to a current spike which affects the input voltage by ohm’s law? That would make more sense with the transfer function I currently have, but I don’t think it’s correct.