You are here

HELP set current settings for inverter

3 posts / 0 new
Last post
ka_ru
Offline
Last seen: 1 month 3 weeks ago
Joined: 2020-10-13 11:38
Posts: 9
HELP set current settings for inverter

Hello everyone, help me define the current settings for inverter.
I have an inverter und made a "VESC" processor.
The inverter has a DRV8323, three shunt resistance 0.001R - 5W.

 

#ifndef CURRENT_AMP_GAIN
#define CURRENT_AMP_GAIN        ????
#endif

#ifndef MCCONF_L_CURRENT_MAX
#define MCCONF_L_CURRENT_MAX                ????    // Current limit in Amperes (Upper)
#endif
#ifndef MCCONF_L_CURRENT_MIN
#define MCCONF_L_CURRENT_MIN                -????   // Current limit in Amperes (Lower)
#endif
#ifndef MCCONF_L_IN_CURRENT_MAX
#define MCCONF_L_IN_CURRENT_MAX             ????    // Input current limit in Amperes (Upper)
#endif
#ifndef MCCONF_L_IN_CURRENT_MIN
#define MCCONF_L_IN_CURRENT_MIN             -????   // Input current limit in Amperes (Lower)
#endif
#ifndef MCCONF_L_MAX_ABS_CURRENT
#define MCCONF_L_MAX_ABS_CURRENT            ????   // The maximum absolute current above which a fault is generated
#endif

// Setting limits
#define HW_LIM_CURRENT          -????, ????
#define HW_LIM_CURRENT_IN       -????, ????
#define HW_LIM_CURRENT_ABS      0.0, ????

vadicus
Offline
Last seen: 18 hours 51 min ago
VESC Free
Joined: 2018-08-17 07:26
Posts: 304

Those settings would be defined by your hardware that you don't provide much details on. The only thing you mention is the shunt values, so the settings for that can be set like this:

#define CURRENT_SHUNT_RES        0.001  or (0.001 / 3.0)  if you mean three shunts in parallel on each phase (not clear from your post).

Maybe take a look at example such as the hw_60.h file to get an idea what the values should be taking your hardware specs into the account. 

ka_ru
Offline
Last seen: 1 month 3 weeks ago
Joined: 2020-10-13 11:38
Posts: 9

Of all the examples, I could not understand all the intricacies of these parameters.
what is connected with what. I found in the code. FAC_CURRENT ((V_REG / 4095.0) / (CURRENT_SHUNT_RES * CURRENT_AMP_GAIN))
I understand about the full range.
in DRV8323 the working range is 1.4V.
HW_LIM_CURRENT_ABS = 2 * (1.4 / 0.001 / GAIN) = 140A
the rest of the values I took half from HW_LIM_CURRENT_ABS.

#ifndef CURRENT_AMP_GAIN
#define CURRENT_AMP_GAIN        20
#endif

#ifndef MCCONF_L_CURRENT_MAX
#define MCCONF_L_CURRENT_MAX                70.0    // Current limit in Amperes (Upper)
#endif
#ifndef MCCONF_L_CURRENT_MIN
#define MCCONF_L_CURRENT_MIN                -70.0   // Current limit in Amperes (Lower)
#endif
#ifndef MCCONF_L_IN_CURRENT_MAX
#define MCCONF_L_IN_CURRENT_MAX             70.0    // Input current limit in Amperes (Upper)
#endif
#ifndef MCCONF_L_IN_CURRENT_MIN
#define MCCONF_L_IN_CURRENT_MIN             -70.0   // Input current limit in Amperes (Lower)
#endif
#ifndef MCCONF_L_MAX_ABS_CURRENT
#define MCCONF_L_MAX_ABS_CURRENT            140.0   // The maximum absolute current above which a fault is generated
#endif

// Setting limits
#define HW_LIM_CURRENT           -70.0, 70.0
#define HW_LIM_CURRENT_IN       -70.0, 70.0

#define HW_LIM_CURRENT_ABS      0.0, 140.0

Prsh  70*70*0.001 = 4.9W