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
In this example the application must allow an initial alignment time before running in closed loop. That alignment time is configured in user.c as the Rs recalibration time, loaded in the following two array members:
pUserParams->RsWaitTime[EST_Rs_State_RampUp] = (uint_least32_t)(1.0*USER_EST_FREQ_Hz);
pUserParams->RsWaitTime[EST_Rs_State_Fine] = (uint_least32_t)(5.0*USER_EST_FREQ_Hz);
In this example, a total of 6 seconds will be used to align the motor. Alignment in this example should be done with enough time and enough current to allow a visual motor reposition and alignment before running in closed loop. In future revisions of InstaSPIN, initial position detection (IPD) will be added to avoid motor alignment altogether. Keep in mind that the internal resistance Rs is only updated during the EST_Rs_State_Fine state. Figure 15-56 shows one of the current waveforms when this is run in. It can be seen how clean the current accelerates in a step from a DC value of -1 A to 0 A (which is the removal of the current used for the motor alignment) and then from 0 A to 4 A sinusoidal (8 A peak to peak). This is because the motor was initially aligned, and no reverse operation was caused by any misalignment. Again, the alignment should be verified visually by the user.
If we zoom-in the first portion of the current (Figure 15-57), we can see how the -1 A of current is removed instantaneously with a step, due to our very high current slope configuration, and then it is followed by the speed response. At this point, the speed controller can be tuned as aggressive as desired to achieve the desired acceleration response.
We can see how the flux instead of a transient like it had before, now it only stabilizes to a constant value when it's running in closed loop (Figure 15-58).
The angle waveform goes from zero to a high frequency (Figure 15-59), suggesting that the forced angle was not even active during ramp up due to the initial alignment.
Zooming in to the angle (Figure 15-60), again it can be seen that it ramped up with no interaction of the forced angle feature, taking the motor into a closed loop right from standstill.
Looking at the estimated speed (Figure 15-61), it can be seen that there is no negative rotation. Instead, the speed response is the speed controller speed response, with no forced angle initial misalignments.
The estimated torque also grows from zero to a target of almost 2 Nm (Figure 15-62), stabilizing at around 1.9 which is the target we set it to in the dynamometer.
We can see how the current overshoots at the very beginning due to the high acceleration command provided by the speed controller (Figure 15-63), and right after the overshoot we can see it stable at around 4 A producing full torque.