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.

DRV8301-69M-KIT: Rs_online calculation

Part Number: DRV8301-69M-KIT

Hi,

In my project I am using the Rs_Online calculation as temperature sensor for the motor. I did this as desribed in chapter 15.2 of the instaspin guide.

The problem is, that the Rs calculation doesn't seem te to trustworthy.

At times the calculation is correct and provides me with a steady and correct temperature, but the Rs value keeps spiking and dipping.

With my Rs offline begin arround 0.72 ohms, the Rs_online dips and spikes to 0.24 ohms and 1,17 ohms (resulting in -150 degrees C and + 177 degrees C). These spikes last for several seconds, so I can't filter it by taking multiple samples.

Any suggestions on how i can get a stable reading from Rs_online?

Thanks,

Alain

  • As you observed in your application, stator resistance is measured while the motor is running through a current injection on d-axis. So it's better to work below the base speed without field weakening control. You might adjust the injected current magnitude (gMotorVars.RsOnLineCurrent_A), increase it to get a good resolution.

    Or you might refer to lab11a to configure the RsOnline slow rotating angle, delta increment/decrement value and calculation filter parameters to improve the resolution. A more detailed description can be found in Chapter 15.8 of instaSPIN user's guide.
  • I've looked at you suggestions and by default the RsOnline_CurrentA was already set to 10% of max current.

    The issue only seems to occure when the motor speed is 0

    In the user guid chatper 15.8 there is a mention of introducing a Id current (through RsOnline_currentA).

    Does that mean that this sets a gMotorVars.IdRef_A

    because if i set a watch expression for this, i don't see anything happening.

    the function used for runRs online is taken from the guide

    void runRsOnLine(CTRL_Handle handle)
    {
      CTRL_Obj *obj = (CTRL_Obj *)handle;
    
      // execute Rs OnLine code
      if(gMotorVars.Flag_Run_Identify == true)
        {
          if(EST_getState(obj->estHandle) == EST_State_OnLine)
            {
              float_t RsError_Ohm = gMotorVars.RsOnLine_Ohm - gMotorVars.Rs_Ohm;
    
              EST_setFlag_enableRsOnLine(obj->estHandle,true);
              EST_setRsOnLineId_mag_pu(obj->estHandle,_IQmpy(gMotorVars.RsOnLineCurrent_A,_IQ(1.0/USER_IQ_FULL_SCALE_CURRENT_A)));
    
              if(abs(RsError_Ohm) < (gMotorVars.Rs_Ohm * 0.05))
                {
                  EST_setFlag_updateRs(obj->estHandle,true);
                }
            }
          else
            {
              EST_setRsOnLineId_mag_pu(obj->estHandle,_IQ(0.0));
              EST_setRsOnLineId_pu(obj->estHandle,_IQ(0.0));
              EST_setRsOnLine_pu(obj->estHandle, EST_getRs_pu(obj->estHandle));
              EST_setFlag_enableRsOnLine(obj->estHandle,false);
              EST_setFlag_updateRs(obj->estHandle,false);
              EST_setRsOnLine_qFmt(obj->estHandle,EST_getRs_qFmt(obj->estHandle));
            }
        }
    
      return;
    } // end of runRsOnLine() function

    So I'm not any further than I was before.
    The other suggestion of increasing the resolution doens't relate to my problem I'd say

    Any other suggestions?

  • You may just use Rs re-calculation to get the new Rs value if the motor is stopping, both Rs online calibration and Rs re-calculation used current injection on d-axis to get the new Rs value. The Rs online could work well if the loading of a motor is stable, but it's not recommended during zero or low speed with light loading since the vector current is too small, the motor can't run smoothly if using the Rs-online with an Id injection.

    Btw, you don't need to set gMotorVars.IdRef_A, the Id injection is done by EST_setRsOnLineId_mag_pu(obj->estHandle,_IQmpy(gMotorVars.RsOnLineCurrent_A,_IQ(1.0/USER_IQ_FULL_SCALE_CURRENT_A)));