Hi :
When I use the 13a example, I found that the anti-interference performance of the motor is not as expected.
Imitate the load pushing the motor with my hand, it is obvious that the the output force of motor have a delay and the ERR_ID of SpinTAC reported the 2002 err frequently.
My motor identification parameters as shown in the figure below.
#define USER_MOTOR_TYPE MOTOR_Type_Pm #define USER_MOTOR_NUM_POLE_PAIRS (1) #define USER_MOTOR_Rr (NULL) #define USER_MOTOR_Rs (0.501480341) #define USER_MOTOR_Ls_d (0.0000701279278) #define USER_MOTOR_Ls_q (0.0000701279278) #define USER_MOTOR_RATED_FLUX (0.0543825179) #define USER_MOTOR_MAGNETIZING_CURRENT (NULL) #define USER_MOTOR_RES_EST_CURRENT (0.5) #define USER_MOTOR_IND_EST_CURRENT (-0.5) #define USER_MOTOR_MAX_CURRENT (8) #define USER_MOTOR_FLUX_EST_FREQ_Hz (20.0) #define USER_MOTOR_ENCODER_LINES (1024.0) #define USER_MOTOR_MAX_SPEED_KRPM (12.0) #define USER_SYSTEM_INERTIA (0.004) #define USER_SYSTEM_FRICTION (0.4)
The next is a series of trying wanting to solve this problem.
1. I set USER_SYSTEM_BANDWIDTH to 40, and feeling the delay which the output force of motor is less than before, but the problem still exists. If I set the USER_SYSTEM_BANDWIDTH highly, the shake of motor will be occur.
2. According to the fault explaining, the cause of the problem is that the position error exceeds the maximum value, then I adjust the ST_MREV_ROLLOVER to 20 and the ST_MREV_ROLLOVER to 8 , but it have no effect.
3. Guessing at the cause is the frequency of position loop is lowed, then I set USER_PWM_FREQ_kHz to 15, USER_NUM_PWM_TICKS_PER_ISR_TICK、USER_NUM_ISR_TICKS_PER_CTRL_TICK、USER_NUM_CTRL_TICKS_PER_EST_TICK、USER_NUM_CTRL_TICKS_PER_CURRENT_TICK to 1 and USER_NUM_CTRL_TICKS_PER_SPEED_TICK、USER_NUM_CTRL_TICKS_PER_TRAJ_TICK to 3.
But it had no effect still.