This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28069F: RsOnline Erratic

Part Number: TMS320F28069F

I've been trying to add RsOnline Estimation into my code, and I am finding that the value that it calculates to vary significantly.

The motor I'm using is low resistance - the motor tuning algorithm picks the Rs as 0.045 ohms. This value is quite repeatable.  I'd like to add online Rs updates to improve low speed performance.   When I enable the EST_setFlag_enableRsOnLine() the Rs value varies between 0.99 and 0.02 ohms.  Here is a plot of what it looks like over time, with the motor running at constant load and 2000 RPM (233Hz):

I'm looking for suggestions on making RsOnline functional.  Here's the motor parameter from user.h in case this is helpful.

#define USER_MOTOR_TYPE                 MOTOR_Type_Pm
#define USER_MOTOR_NUM_POLE_PAIRS       (7.0)
#define USER_MOTOR_Rr                   (NULL)
#define USER_MOTOR_Rs                   (0.308)        //
#define USER_MOTOR_Ls_d                 (0.000309814903)     //
#define USER_MOTOR_Ls_q                 (USER_MOTOR_Ls_d)     // d and q are the same
#define USER_MOTOR_RATED_FLUX           (0.0164)           // 320 RPM/V/14p = 0.0134 V/Hz
#define USER_MOTOR_MAGNETIZING_CURRENT  (NULL)
#define USER_MOTOR_RES_EST_CURRENT      (2.0)
#define USER_MOTOR_IND_EST_CURRENT      (-USER_MOTOR_RES_EST_CURRENT)
#define USER_MOTOR_MAX_CURRENT          (10.0) //return to (40.0)
#define USER_MOTOR_FLUX_EST_FREQ_Hz     (30.0)

What I've tried:

I've tried this at 500 RPM, 1000 RPM both have similar response.

I've increased the RsOnline_Current_A from 0.75 to 1.5A   didn't change anything

The RsRecalc before startup provides a consistent value.

If I allow the algorithm to use the Rs values calculated, then the motor gets crazy and stops running.

Can anyone help me figure out where to look next?

Thanks!

  • After I wrote this - I decided to try going back to  Lab11A code which my code is based on.  This code works! 

    Debugging a bit further, I find that EST_getRsOnLineId_pu() returns 0 in my code and a sensible value in the Lab11a code.  This is because the line:

    refValue = TRAJ_getIntValue(trajHandle_Id) + EST_getRsOnLineId_pu(estHandle);

      which add the detection current component to the Id axis, is in the wrong place in this code.  I moved it to run in the proper state if(EST_getState(estHandle) >= EST_State_MotorIdentified) (where the code was not adding , and now it works!  Whoever wrote this code in the first place mixed up the location of where to add the RsOnline component.

    I'll leave this posted in case it might help someone else.