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 29:0dbc822dd29a, committed 2017-06-12
- Comitter:
- benkatz
- Date:
- Mon Jun 12 17:41:00 2017 +0000
- Parent:
- 28:8c7e29f719c5
- Child:
- 30:db9081ac5658
- Child:
- 31:61eb6ae28215
- Commit message:
- version on Joao's motors
Changed in this revision
| Config/current_controller_config.h | Show annotated file Show diff for this revision Revisions of this file |
| FOC/foc.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Config/current_controller_config.h Sun Jun 04 19:00:22 2017 +0000 +++ b/Config/current_controller_config.h Mon Jun 12 17:41:00 2017 +0000 @@ -6,7 +6,7 @@ #define K_SCALE 0.0001f // K_loop/Loop BW (Hz) #define KI_D 0.06f // 1/samples #define KI_Q 0.06f // 1/samples -#define V_BUS 22.0f // Volts +#define V_BUS 24.0f // Volts #define D_INT_LIM V_BUS/(K_D*KI_D) // Amps*samples #define Q_INT_LIM V_BUS/(K_Q*KI_Q) // Amps*samples
--- a/FOC/foc.cpp Sun Jun 04 19:00:22 2017 +0000
+++ b/FOC/foc.cpp Mon Jun 12 17:41:00 2017 +0000
@@ -115,7 +115,7 @@
//controller->v_d = v_d_ff;
//controller->v_q = v_q_ff;
- limit_norm(&controller->v_d, &controller->v_q, controller->v_bus); // Normalize voltage vector to lie within curcle of radius v_bus
+ limit_norm(&controller->v_d, &controller->v_q, 1.2f*controller->v_bus); // Normalize voltage vector to lie within curcle of radius v_bus
//abc(controller->theta_elec, controller->v_d, controller->v_q, &controller->v_u, &controller->v_v, &controller->v_w); //inverse dq0 transform on voltages
controller->v_u = c*controller->v_d - s*controller->v_q; // Faster Inverse DQ0 transform