Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Config/current_controller_config.h
- Revision:
- 0:5216ca879852
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Config/current_controller_config.h Fri Oct 22 07:43:47 2021 +0000 @@ -0,0 +1,28 @@ +#ifndef CURRENT_CONTROLLER_CONFIG_H +#define CURRENT_CONTROLLER_CONFIG_H + +// Current controller/// +#define K_D .05f // Loop gain, Volts/Amp +#define K_Q .05f // Loop gain, Volts/Amp +//#define K_SCALE 0.0001f // K_loop/Loop BW (Hz) 0.0042 +#define K_SCALE 0.00165f +// #define K_SCALE 0.0008 +//#define K_SCALE 0.0004 +#define KI_D 0.0255f // PI zero, in radians per sample +#define KI_Q 0.0255f // PI zero, in radians per sample +#define V_BUS 24.0f // Volts +#define OVERMODULATION 1.2f // 1.0 = no overmodulation + +#define D_INT_LIM V_BUS/(K_D*KI_D) // Amps*samples +#define Q_INT_LIM V_BUS/(K_Q*KI_Q) // Amps*samples + +#define I_MAX 40.0f + +//Observer// +#define DT 0.000025f +#define K_O 0.02f + + + + +#endif