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
This state of the identification process performs the identification of the stator resistance (Figure 7-14).
A DC current is injected into the D-axis with the amplitude defined in user.h as follows:
#define USER_MOTOR_RES_EST_CURRENT (1.0)
Note that this current is the same definition used for RoverL state, although RoverL uses half of this value, and the Rs state uses the full value in the definition. The injected current should be high enough to generate a significant measurement in the ADC converter, and at the same time low enough to avoid motor overheating. Typically, 10% to 20% of the rated current of the motor is enough to produce an accurate estimation of the stator resistance.
The time interval for this state is set by three time values in user.c, as follows:
pUserParams->RsWaitTime[EST_Rs_State_RampUp] = (uint_least32_t)(1.0*USER_EST_FREQ_Hz);
pUserParams->RsWaitTime[EST_Rs_State_Coarse] = (uint_least32_t)(2.0*USER_EST_FREQ_Hz);
pUserParams->RsWaitTime[EST_Rs_State_Fine] = (uint_least32_t)(4.0*USER_EST_FREQ_Hz);
By default, the entire process of identifying the stator resistance, Rs, takes 7 seconds. The first part of the Rs identification process is a ramp-up time of 1 second. During this time, the defined DC current is injected into the D-axis. Once the ramp-up time is expired, the Rs identification process starts with a coarse tuning of the identified Rs. The coarse process takes the time defined previously by the time stored in RsWaitTime [EST_Rs_State_Coarse]. By default this time is set to 2 seconds, and it is known to be enough time to do a coarse calibration of all the motors tested for the InstaSPIN library release. However the time setup is flexible so users can tune if required, although tuning is not foreseen to be required.
Once the coarse process has finished, the fine Rs recalibration starts. The time taken by the identification process to complete the fine Rs recalibration is set by default to 4 seconds, and again the user has flexibility to change this by modifying the value stored in RsWaitTime [EST_Rs_State_Fine].
Figure 7-15 shows the entire Rs identification process, highlighting ramp times, amplitudes and duration of the process.
The user can monitor how the resistance is being estimated using the following code example. This is useful especially when tuning the amount of time spent identifying the resistance.
// get the stator resistance
gMotorVars.Rs_Ohm = EST_getRs_Ohm(obj->estHandle);
For example, monitoring the resistance value while it is being identified gives the user feedback on the amount of time required for the identified resistance to be stable. The time for the identified resistance to be stable can be configured in file user.c so next time the motor is identified the process is faster.