Modifying the HKCC for no readily apparent reason

Dependencies:   FastPWM3

Committer:
benkatz
Date:
Mon May 01 15:22:58 2017 +0000
Revision:
26:2b865c00d7e9
Parent:
25:f5741040c4bb
Child:
28:8c7e29f719c5
- Added CAN Send/Receive; - Updated to most recent MBED (Broke SPI 16-bit read/write.  Hacked to work with 2 8-bit writes now); - Removed most sine/cos calculations; - Fixed sign error in autocalibration routine

Who changed what in which revision?

UserRevisionLine numberNew contents of line
benkatz 20:bf9ea5125d52 1 #ifndef CURRENT_CONTROLLER_CONFIG_H
benkatz 20:bf9ea5125d52 2 #define CURRENT_CONTROLLER_CONFIG_H
benkatz 20:bf9ea5125d52 3
benkatz 23:2adf23ee0305 4 #define K_D .05f // Volts/Amp
benkatz 23:2adf23ee0305 5 #define K_Q .05f // Volts/Amp
benkatz 25:f5741040c4bb 6 #define K_SCALE 0.0001f // K_loop/Loop BW (Hz)
benkatz 25:f5741040c4bb 7 #define KI_D 0.06f // 1/samples
benkatz 25:f5741040c4bb 8 #define KI_Q 0.06f // 1/samples
benkatz 26:2b865c00d7e9 9 #define V_BUS 17.0f // Volts
benkatz 20:bf9ea5125d52 10
benkatz 22:60276ba87ac6 11 #define D_INT_LIM V_BUS/(K_D*KI_D) // Amps*samples
benkatz 22:60276ba87ac6 12 #define Q_INT_LIM V_BUS/(K_Q*KI_Q) // Amps*samples
benkatz 20:bf9ea5125d52 13
benkatz 26:2b865c00d7e9 14 #define I_MAX 40.0f
benkatz 26:2b865c00d7e9 15
benkatz 20:bf9ea5125d52 16
benkatz 20:bf9ea5125d52 17
benkatz 20:bf9ea5125d52 18 #endif