SPRUHJ1I January 2013 – October 2021 TMS320F2802-Q1 , TMS320F28026-Q1 , TMS320F28026F , TMS320F28027-Q1 , TMS320F28027F , TMS320F28027F-Q1 , TMS320F28052-Q1 , TMS320F28052F , TMS320F28052F-Q1 , TMS320F28052M , TMS320F28052M-Q1 , TMS320F28054-Q1 , TMS320F28054F , TMS320F28054F-Q1 , TMS320F28054M , TMS320F28054M-Q1 , TMS320F2806-Q1 , TMS320F28062-Q1 , TMS320F28062F , TMS320F28062F-Q1 , TMS320F28068F , TMS320F28068M , TMS320F28069-Q1 , TMS320F28069F , TMS320F28069F-Q1 , TMS320F28069M , TMS320F28069M-Q1
Even though there are ways to calculate the flux of the machine without motor identification (see Section 7.9.1.4), this process describes a completely unknown motor. So far we have two parameters we can use, a rough estimate of inductance (Lhf) and an accurate stator resistance (Rs). We are missing one parameter from PMSM motors, the flux of the machine. For this step of the identification process, we will use the two known parameters and an arbitrary value of the flux. Keep in mind that once the motor runs in closed loop, the estimated flux will converge to the actual flux of the machine, so we only need to get the first guess close enough to make it converge to the real value.
Take a look at specific defines from user.h.
#define USER_MOTOR_NUM_POLE_PAIRS (3)
The number of poles is only important to get the correct RPM reading from the library, but all the library cares about is electrical Hz, and this is not affected by the number of pole pairs. Take your best guess on this parameter. Once the motor is running, this can be changed with the correct number of poles, by commanding a speed reference of 60 RPM, and making sure the motor rotates one revolution in one second.
#define USER_MOTOR_Rs (0.8)
This parameter should be the one obtained in step 2, from variable gRs.
#define USER_MOTOR_Ls_d (0.01)
#define USER_MOTOR_Ls_q (0.01)
For the inductance, we need to use the high frequency inductance obtained in step 2. This is a rough approximation of the inductance of the motor. Having a different inductance compared to the real one limits the performance during high dynamics. For example, if motor needs to run with torque steps, or speed steps, not having the right inductance can be an issue, but having full torque operation with slow dynamics can be done using high frequency inductance instead of the real inductance. So for this step, copy the value obtained from gLhf in both Ls_d and Ls_q.
#define USER_MOTOR_RATED_FLUX (0.5)
Flux is estimated by the libraries, so user needs a value which is close enough to the real one in order to have the real flux of the machine based on the estimator output. Using an arbitrary number can cause some saturation of the estimated flux, since this value is limited internally. This can be easily done by looking at the estimated flux using the following function:
// get the flux
gFlux_VpHz = EST_getFlux_VpHz(obj->estHandle);
If gFlux_VpHz is clamped to a lower than original value set in user.h, decrease the value in half, and if it is clamped to a higher than original value, increase it by doubling the value. Once the motor runs in closed loop with a value on the gFlux_VpHz that varies slightly, then take note of this value and put it back into the USER_MOTOR_RATED_FLUX.