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.

Incorrect RPM

Other Parts Discussed in Thread: MOTORWARE, AMC1100, CONTROLSUITE

Hi Chris, Hi all,

We made a motor controller based on HVKIT. Motorware lab5a used to control the PMSM. It worked without any issue. gMotorVars.Speed_krpm was nearly accurate. Then we made some hardware changes (including Current sensors, Voltage sensors, IGBTs, wires, etc ). Then changed user.h file according to the new sensor ratings. As bellow,

#define USER_IQ_FULL_SCALE_VOLTAGE_V       (500.0)          // previous motor controller value  450.0

#define USER_ADC_FULL_SCALE_VOLTAGE_V       (450.0)      //  previous motor controller value  409.6 

#define USER_IQ_FULL_SCALE_CURRENT_A        (75.0)       //  previous motor controller value  25.0 

#define USER_ADC_FULL_SCALE_CURRENT_A      (150.00)  //  previous motor controller value  50.0 

Those are the only changes we have made. With new hardware, motor rotates smoothly without any issue. But  gMotorVars.Speed_krpm is being giving completely incorrect values. I tried with another F28069M but result did not changed. What could be the problem ? 

In both cases,

#define USER_SYSTEM_FREQ_MHz             (90.0)

#define USER_PWM_FREQ_kHz               (5.0)

#define USER_NUM_PWM_TICKS_PER_ISR_TICK        (1)

#define USER_NUM_ISR_TICKS_PER_CTRL_TICK       (1)

#define USER_NUM_CTRL_TICKS_PER_CURRENT_TICK   (1)

#define USER_NUM_CTRL_TICKS_PER_EST_TICK       (1)  

Thank you.

  • how did your voltage filter change with these new sensors?
  • No, It is same as before.
    #define USER_VOLTAGE_FILTER_POLE_Hz (372.5)

    This time I can not calculate the filter pole because I am not using resistor pair with a parallel capacitor as spruhj1f. I am using AMC1100 with a single ended opamp circuit. I have used 450kohm and 250ohm resistor pair to get inputs to AMC1100.

    Is that the reason for wrong gMotorVars.Speed_krpm ?

    gMotorVars.Speed_krpm is oscillating with incorrect numbers for nearly constant motor RPM. It is not even a constant incorrect number.
  • Hi Lakshan,

    You maybe need to set a correct filter pole based on the voltage sense circuit, can you monitor the voltage waveform of ADC input and upload it? And you can check whether the motor run smoothly using lab02 to identify parameters , and the identified parameters is right.

    Best Regards,
    Yanming Luo
  • Hi Chris and Yanming,

    I tried with different HW filter and filter poles. But still the couldn't solve the problem. Simply my voltage sensor as follows,

    How can I find filter pole using 1/(2*pi*Rparallel*C) for this circuit,

    I Tried with different PWM frequency higher then 5kHz and higher USER_MOTOR_FLUX_EST_FREQ_Hz but I couldn't solve the problem.

    Further, we are using external resolver feedback to get electrical angle. With that using estimator can we calculate rpm of the motor (using EST_setAngle_pu() or any other method).

    Thank you

  • 1. The voltage filter pole is 1/(2*1.69*47)*1000*1000, you maybe need to set a value is less than it for AMC1100 delay. You could try to use a software to do a simulation.

    2. Yes, you can use EST_setAngle_pu to get the angle of FAST estimator if you enable FAST run though you are using sensor control.
  • Hi Yanming,

    I am not sure that the way you have calculated filter pole using 1/(2*pi*Rparallel*C) with the op-amp configuration. Please double check that for me.

    Yes, We are using sensor control. I am getting electrical angle from external resolver through a SPI channel. And pump that into CTRL_runOnLine_User. With the sensor system is working fine without any issue. We have only used estimator to estimate the RPM in our previous system.

    I tried with EST_setAngle_pu to measure correct RPM. I set correct electrical angle from resolver using EST_setAngle_pu. But still I couldn't see correct RPM. How can I use EST_setAngle_pu to get correct RPM ?
  • InstaSPIN calculates the estimated frequency based on the flux measurement and do the angle estimation in parallel, is not estimating frequency based on the angle, angle and frequency are independent calculations. So you can not get correct RPM by using EST_setAngle_pu from resolver. You have to design a self frequency caculation function.

  • Got it. Thank you for the response Yanming :) ,

    Yanmin, can I calculate RPM using Flux_VpHz ? if I am correct, Flux_VpHz means V/f. Than there is rpm data. Can I use Flux_VpHz parameter to measure RPM ?
  • Lakshan,
    You are using a sensor, correct? If you are still running FAST you can use the Speed Estimate it provides. There is no need to try to look at Bemf and divide by Flux to find Hz.
  • sorry, I forgot the background on this thread...you have an issue with voltage measurement with your HW. I don't think you will have accurate flux measurements in your HW to try to make this estimation.

    I would use your change in sensor angle to estimate speed.
  • No, this is BEMF constant, can't use it to measure RPM directly. Since you had correct angle from resolver, you can refer to SPEED_FR module and find the description in DMC MATH_v13.1.pdf in TI controlSUITE.