Modified Motor Driver Firmware to include Flash + Thermal
Dependencies: FastPWM3 mbed-dev-STM-lean
Config/current_controller_config.h@78:4f481ff040ee, 21 months ago (annotated)
- Committer:
- adimmit
- Date:
- Fri Nov 11 16:58:43 2022 +0000
- Revision:
- 78:4f481ff040ee
- Parent:
- 71:b314182de37f
changes w/ filter @ high speed;
Who changed what in which revision?
User | Revision | Line number | New 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 | 37:c0f352d6e8e3 | 4 | // Current controller/// |
adimmit | 71:b314182de37f | 5 | // #define K_D 0.13319f // Loop gain, Volts/Amp |
adimmit | 71:b314182de37f | 6 | // #define K_Q 0.13319f // Loop gain, Volts/Amp |
adimmit | 71:b314182de37f | 7 | // #define K_SCALE 0.00013310f // K_loop/Loop BW (Hz) 0.0042 |
adimmit | 71:b314182de37f | 8 | // #define KI_D 0.0373f // PI zero, in radians per sample |
adimmit | 71:b314182de37f | 9 | // #define KI_Q 0.0373f // PI zero, in radians per sample |
elijahsj | 70:2ea6c555a2cb | 10 | #define V_BUS 48.0f // Volts |
elijahsj | 67:96a4052a1705 | 11 | #define OVERMODULATION 1.15f // 1.0 = no overmodulation |
benkatz | 20:bf9ea5125d52 | 12 | |
benkatz | 22:60276ba87ac6 | 13 | #define D_INT_LIM V_BUS/(K_D*KI_D) // Amps*samples |
benkatz | 22:60276ba87ac6 | 14 | #define Q_INT_LIM V_BUS/(K_Q*KI_Q) // Amps*samples |
benkatz | 20:bf9ea5125d52 | 15 | |
benkatz | 37:c0f352d6e8e3 | 16 | //Observer// |
benkatz | 37:c0f352d6e8e3 | 17 | #define DT 0.000025f |
benkatz | 37:c0f352d6e8e3 | 18 | #define K_O 0.02f |
benkatz | 37:c0f352d6e8e3 | 19 | |
benkatz | 37:c0f352d6e8e3 | 20 | |
benkatz | 20:bf9ea5125d52 | 21 | |
benkatz | 20:bf9ea5125d52 | 22 | |
benkatz | 20:bf9ea5125d52 | 23 | #endif |