File tree Expand file tree Collapse file tree 5 files changed +40
-40
lines changed
arduino_foc_minimal_encoder
arduino_foc_minimal_magnetic Expand file tree Collapse file tree 5 files changed +40
-40
lines changed Original file line number Diff line number Diff line change 4
4
#include " Arduino.h"
5
5
#include " FOCutils.h"
6
6
#include " Sensor.h"
7
-
8
- // default configuration values
9
- // power supply voltage
10
- #define DEF_POWER_SUPPLY 12.0
11
- // velocity PI controller params
12
- #define DEF_PI_VEL_P 0.5
13
- #define DEF_PI_VEL_I 10
14
- #define DEF_PI_VEL_U_RAMP 300
15
- // angle P params
16
- #define DEF_P_ANGLE_P 20
17
- // angle velocity limit default
18
- #define DEF_P_ANGLE_VEL_LIM 20
19
- // index search velocity
20
- #define DEF_INDEX_SEARCH_TARGET_VELOCITY 1
21
- // velocity PI controller params for index search
22
- #define DEF_PI_VEL_INDEX_P 1
23
- #define DEF_PI_VEL_INDEX_I 10
24
- #define DEF_PI_VEL_INDEX_U_RAMP 100
25
- // velocity filter time constant
26
- #define DEF_VEL_FILTER_Tf 0.005
7
+ #include " default.h
27
8
28
9
// controller type configuration enum
29
10
enum ControlType{
Original file line number Diff line number Diff line change
1
+ // default configuration values
2
+ // power supply voltage
3
+ #define DEF_POWER_SUPPLY 12.0
4
+ // velocity PI controller params
5
+ #define DEF_PI_VEL_P 0.5
6
+ #define DEF_PI_VEL_I 10
7
+ #define DEF_PI_VEL_U_RAMP 300
8
+ // angle P params
9
+ #define DEF_P_ANGLE_P 20
10
+ // angle velocity limit default
11
+ #define DEF_P_ANGLE_VEL_LIM 20
12
+ // index search velocity
13
+ #define DEF_INDEX_SEARCH_TARGET_VELOCITY 1
14
+ // velocity PI controller params for index search
15
+ #define DEF_PI_VEL_INDEX_P 1
16
+ #define DEF_PI_VEL_INDEX_I 10
17
+ #define DEF_PI_VEL_INDEX_U_RAMP 100
18
+ // velocity filter time constant
19
+ #define DEF_VEL_FILTER_Tf 0.005
Original file line number Diff line number Diff line change 4
4
#include " Arduino.h"
5
5
#include " FOCutils.h"
6
6
#include " Sensor.h"
7
-
8
- // default configuration values
9
- // power supply voltage
10
- #define DEF_POWER_SUPPLY 12.0
11
- // velocity PI controller params
12
- #define DEF_PI_VEL_P 0.5
13
- #define DEF_PI_VEL_I 10
14
- #define DEF_PI_VEL_U_RAMP 300
15
- // angle P params
16
- #define DEF_P_ANGLE_P 20
17
- // angle velocity limit default
18
- #define DEF_P_ANGLE_VEL_LIM 20
19
- // index search velocity
20
- #define DEF_INDEX_SEARCH_TARGET_VELOCITY 1
21
- // velocity PI controller params for index search
22
- #define DEF_PI_VEL_INDEX_P 1
23
- #define DEF_PI_VEL_INDEX_I 10
24
- #define DEF_PI_VEL_INDEX_U_RAMP 100
25
- // velocity filter time constant
26
- #define DEF_VEL_FILTER_Tf 0.005
7
+ #include " defaults.h"
27
8
28
9
// controller type configuration enum
29
10
enum ControlType{
Original file line number Diff line number Diff line change
1
+ // default configuration values
2
+ // power supply voltage
3
+ #define DEF_POWER_SUPPLY 12.0
4
+ // velocity PI controller params
5
+ #define DEF_PI_VEL_P 0.5
6
+ #define DEF_PI_VEL_I 10
7
+ #define DEF_PI_VEL_U_RAMP 300
8
+ // angle P params
9
+ #define DEF_P_ANGLE_P 20
10
+ // angle velocity limit default
11
+ #define DEF_P_ANGLE_VEL_LIM 20
12
+ // index search velocity
13
+ #define DEF_INDEX_SEARCH_TARGET_VELOCITY 1
14
+ // velocity PI controller params for index search
15
+ #define DEF_PI_VEL_INDEX_P 1
16
+ #define DEF_PI_VEL_INDEX_I 10
17
+ #define DEF_PI_VEL_INDEX_U_RAMP 100
18
+ // velocity filter time constant
19
+ #define DEF_VEL_FILTER_Tf 0.005
You can’t perform that action at this time.
0 commit comments