Quote:
Originally Posted by Andrew Schreiber
Am I correct in assuming that Tm = Ts*(1-V/Vfree); on line 55 could also be used to figure out approximate current draw?
|
Yes. Kt, the motor torque constant, is Newton_meters per amp. So you can calculate the motor amps A=Tm/Kt*. For a CIM, Kt≈0.018 Nm/A. You could modify the C code to output amps so it could be plotted.
However, the model does not account for voltage drops due to heavy currents through the wires, the wire connection points, the battery' s internal resistance, changes in motor resistance due to temperature, etc so the accuracy of Tm (and the current) will be affected. Also, Kt is not strictly constant - it varies somewhat with motor temperature.
Quote:
Very cool. Now if only we could convince you to use variable names longer than 2 characters
|
I've been programming since 1969 and I've never liked long variable names. To me it makes the code much less readable. I like the code to look like the way I would write the equations. I know opinions differ on this matter.
* when not slipping. when slipping, you'd have to use the kinetic friction force and back-calculate the motor torque.