Chetan Sharma
/
HKCC_Controller_MBed_OS
Modifying the HKCC for no readily apparent reason
Config/current_controller_config.h@47:e1196a851f76, 2018-12-05 (annotated)
- Committer:
- benkatz
- Date:
- Wed Dec 05 04:07:46 2018 +0000
- Revision:
- 47:e1196a851f76
- Parent:
- 46:2d4b1dafcfe3
- Child:
- 48:74a40481740c
albert revision;
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/// |
benkatz | 44:8040fa2fcb0d | 5 | #define K_D .05f // Loop gain, Volts/Amp |
benkatz | 44:8040fa2fcb0d | 6 | #define K_Q .05f // Loop gain, Volts/Amp |
benkatz | 44:8040fa2fcb0d | 7 | #define K_SCALE 0.0001f // K_loop/Loop BW (Hz) 0.0042 |
benkatz | 44:8040fa2fcb0d | 8 | #define KI_D 0.0255f // PI zero, in radians per sample |
benkatz | 44:8040fa2fcb0d | 9 | #define KI_Q 0.0255f // PI zero, in radians per sample |
benkatz | 47:e1196a851f76 | 10 | #define V_BUS 35.0f // Volts |
benkatz | 47:e1196a851f76 | 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 | 26:2b865c00d7e9 | 16 | #define I_MAX 40.0f |
benkatz | 47:e1196a851f76 | 17 | #define I_MAX_FW 0.0f |
benkatz | 26:2b865c00d7e9 | 18 | |
benkatz | 37:c0f352d6e8e3 | 19 | //Observer// |
benkatz | 37:c0f352d6e8e3 | 20 | #define DT 0.000025f |
benkatz | 37:c0f352d6e8e3 | 21 | #define K_O 0.02f |
benkatz | 37:c0f352d6e8e3 | 22 | |
benkatz | 37:c0f352d6e8e3 | 23 | |
benkatz | 20:bf9ea5125d52 | 24 | |
benkatz | 20:bf9ea5125d52 | 25 | |
benkatz | 20:bf9ea5125d52 | 26 | #endif |