Made new motor work
-Calibrate resistance, inductance, and Kv (also, we never committed the
Python calibrations for the old motor).
-Fix feedback term--we were comparing a current to the commanded current
corresponding to the cycle after it, which could've been an issue.
-Add some more debugging code that is useful when calibrating the motor.
-Increase baud rate of ITM to 128k
-Increase motor braking current to 100A from 80A
-Use measured current instead of goal current on fuse monitoring--should
cause it to perform better in situations where we track poorly (e.g.,
near full speed).
Change-Id: I1b5ff71b42323cb96f229c70821e9e0860ac4e4c
diff --git a/motors/python/big_phase_current.py b/motors/python/big_phase_current.py
index 718d4d9..5ddca2a 100755
--- a/motors/python/big_phase_current.py
+++ b/motors/python/big_phase_current.py
@@ -16,14 +16,15 @@
K2 /= K1
K1 = 1
-vcc = 30.0 # volts
-R_motor = 0.0055 # ohms for the motor
-R = 0.008 # ohms for system
+vcc = 31.5 # volts
+R = 0.01008 # ohms for system
-L = 10.0 * 1e-6 # Henries
-M = L / 10.0
+L = 3.0 * 1e-6 # Henries
+M = 0.0
-Kv = 22000.0 * 2.0 * numpy.pi / 60.0 / vcc * 2.0
+Kv_vcc = 30.0
+Kv = 22000.0 * 2.0 * numpy.pi / 60.0 / Kv_vcc * 2.0
+Kv = 1.0 / 0.00315
J = 0.0000007
R_shunt = 0.0003