MIT Motor FOC Control

Dependencies:   FastPWM3

Committer:
benkatz
Date:
Fri Oct 04 14:18:39 2019 +0000
Revision:
55:c4c9fec8539c
Parent:
51:6cd89bd6fcaa
new mini cheetah first revision;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
benkatz 23:2adf23ee0305 1 /// Values stored in flash, which are modifieable by user actions ///
benkatz 23:2adf23ee0305 2
benkatz 23:2adf23ee0305 3 #ifndef USER_CONFIG_H
benkatz 23:2adf23ee0305 4 #define USER_CONFIG_H
benkatz 23:2adf23ee0305 5
benkatz 23:2adf23ee0305 6
benkatz 25:f5741040c4bb 7 #define E_OFFSET __float_reg[0] // Encoder electrical offset
benkatz 25:f5741040c4bb 8 #define M_OFFSET __float_reg[1] // Encoder mechanical offset
benkatz 25:f5741040c4bb 9 #define I_BW __float_reg[2] // Current loop bandwidth
benkatz 51:6cd89bd6fcaa 10 #define I_MAX __float_reg[3] // Torque limit (current limit = torque_limit/(kt*gear ratio))
benkatz 26:2b865c00d7e9 11 #define THETA_MIN __float_reg[4] // Minimum position setpoint
benkatz 26:2b865c00d7e9 12 #define THETA_MAX __float_reg[5] // Maximum position setpoint
benkatz 51:6cd89bd6fcaa 13 #define I_FW_MAX __float_reg[6] // Maximum field weakening current
benkatz 55:c4c9fec8539c 14 #define R_NOMINAL __float_reg[7] // Nominal motor resistance, set during calibration
benkatz 55:c4c9fec8539c 15 #define TEMP_MAX __float_reg[8] // Temperature safety lmit
benkatz 55:c4c9fec8539c 16 #define I_MAX_CONT __float_reg[9] // Continuous max current
benkatz 28:8c7e29f719c5 17
benkatz 25:f5741040c4bb 18 #define PHASE_ORDER __int_reg[0] // Phase swapping during calibration
benkatz 25:f5741040c4bb 19 #define CAN_ID __int_reg[1] // CAN bus ID
benkatz 26:2b865c00d7e9 20 #define CAN_MASTER __int_reg[2] // CAN bus "master" ID
benkatz 28:8c7e29f719c5 21 #define CAN_TIMEOUT __int_reg[3] // CAN bus timeout period
benkatz 37:c0f352d6e8e3 22 #define ENCODER_LUT __int_reg[5] // Encoder offset LUT - 128 elements long
benkatz 37:c0f352d6e8e3 23
benkatz 23:2adf23ee0305 24
benkatz 28:8c7e29f719c5 25
benkatz 51:6cd89bd6fcaa 26
benkatz 23:2adf23ee0305 27 extern float __float_reg[];
benkatz 23:2adf23ee0305 28 extern int __int_reg[];
benkatz 23:2adf23ee0305 29
benkatz 23:2adf23ee0305 30 #endif