Hello,
I am having an issue getting the motor parameter measurment feature of InstaSpin-FOC to work properly with our custom hardware. We are using the TSM320F28069M to implement Field Oriented Control of a motor. I have worked through the previous labs (1b and 1c) and verified that the current and voltage feedbacks are working correctly. We have received most of the necessary motor parameters from the manufacturer but I still need USER_MOTOR_RATED_FLUX before I can attempt to implement the torque controller in lab 4.
Attempting to perform motor parameter measurement has repeatedly resulted in the controller creating an overcurrent event similar to the one shown below. The event occurs either at the very end of EST_State_RoverL or at the very beginning of EST_State_Rs. The image below shows the three low side gates at the event (yellow- phase C, blue- phase B, pink- phase A, green- bus current):
The next image shows the current feedback for each phase at the event (yellow- phase C current, blue- phase B current, pink- phase A current, green- bus current). The current feedbacks have an offset of 1.65V and are measured across low side shunt resistors:
The overcurrent threshold in our hardware is 60A but based on the settings in user_j1.h the system shouldn't exceed 15A. These are the parameters I have set in that file:
#define USER_MOTOR_TYPE MOTOR_Type_Pm // Motor_Type_Pm (All Synchronous: BLDC, PMSM, SMPM, IPM) or Motor_Type_Induction (Asynchronous ACI) #define USER_MOTOR_NUM_POLE_PAIRS (2) // PAIRS, not total poles. Used to calculate user RPM from rotor Hz only #define USER_MOTOR_Rr (NULL) // Induction motors only, else NULL #define USER_MOTOR_Rs (NULL) // Identified phase to neutral resistance in a Y equivalent circuit (Ohms, float) #define USER_MOTOR_Ls_d (NULL) // For PM, Identified average stator inductance (Henry, float) #define USER_MOTOR_Ls_q (NULL) // For PM, Identified average stator inductance (Henry, float) #define USER_MOTOR_RATED_FLUX (NULL) // Identified TOTAL flux linkage between the rotor and the stator (V/Hz) #define USER_MOTOR_MAGNETIZING_CURRENT (NULL) // Induction motors only, else NULL #define USER_MOTOR_RES_EST_CURRENT (3.0) // During Motor ID, maximum current (Amperes, float) used for Rs estimation, 10-20% rated current #define USER_MOTOR_IND_EST_CURRENT (-3.0) // During Motor ID, maximum current (negative Amperes, float) used for Ls estimation, use just enough to enable rotation #define USER_MOTOR_MAX_CURRENT (15.00) // CRITICAL: Used during ID and run-time, sets a limit on the maximum current command output of the provided Speed PI Controller to the Iq controller #define USER_MOTOR_IDENT_FREQUENCY_Hz (20.0) #define USER_MOTOR_FLUX_EST_FREQ_Hz (9.3) // During Motor ID, maximum commanded speed (Hz, float), ~10% rated
and the namplate for the motor:
Modifying the different current thresholds doesn't have any impact on the event and I've double checked that they are set correctly based on nameplate values for the motor. Since it looked like the issue was related to the R over L estimation procedure I have tried modifying the USER_R_OVER_L_EST_FREQ_Hz define to values between 100 and 300 at increments of 10 (the images above were captured when it was sent to 200). This has only had the impact of prolonging the overcurrent fault. Another thing that I've noticed is the shaft never rotates regardless of the settings I use. I've tried a second motor and achieve the same result.
Any recommendations on troubleshooting this issue further or settings that are relevant and I may have overlooked would be greatly appreciated.