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.
Dependencies: mbed-dev-f303 FastPWM3
Revision 54:b8c3cfff4841, committed 2019-08-01
- Comitter:
- Rushu
- Date:
- Thu Aug 01 09:48:38 2019 +0000
- Parent:
- 53:4dd59f0cc2eb
- Child:
- 55:a6a9a8a68f2d
- Commit message:
- velocity control
Changed in this revision
| CAN/CAN_com.cpp | Show annotated file Show diff for this revision Revisions of this file |
| Config/motor_config.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/CAN/CAN_com.cpp Wed May 08 05:56:09 2019 +0000 +++ b/CAN/CAN_com.cpp Thu Aug 01 09:48:38 2019 +0000 @@ -5,8 +5,8 @@ #define P_MAX 12.5f //#define V_MIN -45.0f //#define V_MAX 45.0f - #define V_MIN -314.0f - #define V_MAX 314.0f + #define V_MIN -157.0f + #define V_MAX 157.0f #define KP_MIN 0.0f // #define KP_MAX 500.0f #define KP_MAX 0.05f
--- a/Config/motor_config.h Wed May 08 05:56:09 2019 +0000 +++ b/Config/motor_config.h Thu Aug 01 09:48:38 2019 +0000 @@ -1,13 +1,16 @@ #ifndef MOTOR_CONFIG_H #define MOTOR_CONFIG_H -#define R_PHASE 0.13f //Ohms +//#define R_PHASE 0.13f //Ohms +#define R_PHASE 0.27f //Ohms //#define R_PHASE 0.137f //Ohms #define L_D 0.00002f //Henries #define L_Q 0.00002f //Henries #define KT .08f //N-m per peak phase amp, = WB*NPP*3/2 -#define NPP 21 //Number of pole pairs -#define GR 1.0f //Gear ratio +//#define NPP 21 //Number of pole pairs +#define NPP 5 //Number of pole pairs +//#define GR 1.0f //Gear ratio +#define GR 100.0f //Gear ratio #define KT_OUT 0.45f //KT*GR #define WB 0.0025f //Flux linkage, Webers. #define R_TH 1.25f //Kelvin per watt