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.

A problem occurred with current sensor change.

Other Parts Discussed in Thread: MOTORWARE

Hi all,

We made a motor controller using TI's TMDSHVMTRPFCKIT solution. We are using Proj_Lab5a to control the motor in torque control mode.

Initially we used 20A current sensor to control the motor. We realized that the existing current sensor  is not enough for our application. So we used 200A current sensor (means +/_ 200A) with motor controller and it is a hall effect based linear current sensor ( ACS758ECB-200B-PFF-T ). We scaled down sensor output to match the motorware requirement (0V = -Max pint, 1.65V = 0 point, 3.3V = Max point), With that hardware upgrade,  we changed user.h file using that current setting as below,

#define USER_IQ_FULL_SCALE_CURRENT_A         (200.0)

#define USER_ADC_FULL_SCALE_CURRENT_A       (400.0)

So that is only changed we made.
Now when we start the motor, it starts to spin at iq_ref = 10.00 as previous case. But the spin is not stable as before. Within few seconds, it accelerate and rotate with a sound.  At that time we noticed that, PWM goes to it's maximum duty. Motor controller draws nearly 15A from the source.
What should be the problem?
Is there any settings I forgot to change in user.h ?
Why PWM goes to it's maximum duty with this much of small current?

Thank you.
 

 

  • Hi Lakshan,

    The SW problem is that you are losing resolution for the ADC and subsequent variables that are scaled based on the ADC range which directly impacts USER_IQ_FULL_SCALE_CURRENT_A.

    The HW problem is that the TMDSHVMTRPFCKIT is not designed for such high currents. Please refer to the HW guide (HVMotorCtrl+PFC_HWGuide.pdf).

    Jeff
  • Hi Jeff,

    We are not using  TMDSHVMTRPFCKIT itself. We made our own motor controller using  TMDSHVMTRPFCKIT solution.  So the controller we made is capable to handle 200A. 

    I think it will not be a problem because the iqFullScaleVoltage_V variable is in float format. Also current_sf variable in float format. Therefor 200 and 400 numbers will not exceed the variable ranges (correct me if I am wrong).
    Is there a problem with the other calculation in side firmware ? 
    Is there a any problem with InstaSPIN firmware to handle that much of current which I don't know?

    When my motor get unstable with sound. I noticed that my current current sensor out put get deformed as below. At that time PWM runs at it's maximum duties. 

    The blue channel shows the senor out put signal. Is this happened due to hardware issue or firmware issue ? 
    Are there any other parameters to tune or change to fix this issue. 

    Thank you.

  • Not sure Lakshan, but have you tried giving some headroom to the USER_IQ_FULL_SCALE_CURRENT_A value by adding 20-30% (240-260) with subsequent increase to USER_ADC_FULL_SCALE_CURRENT_A?

    Jeff
  • Hi,

    From the sensor's datasheet, it has a sensitivity of 10mV per Amp. With a 3.3V power supply, this would give you a full range of 330Amps peak to peak. So the value you need to enter in user.h is:

    #define USER_ADC_FULL_SCALE_CURRENT_A        (330.0)

    Please give this a try and let us know what the behavior is. You can leave this one as 200A as you have it already, since that one is only a software scaling.

    #define USER_IQ_FULL_SCALE_CURRENT_A          (200.0)

    Regards,

    -Jorge

  • HI Jorge,

    It  worked with my previous settings as

    #define USER_IQ_FULL_SCALE_CURRENT_A         (200.0)
    #define USER_ADC_FULL_SCALE_CURRENT_A       (400.0)

    There was a noise problem with current sensor lines and it worked after the noise problem was fixed. 

    But we are facing another problem. 

    We are using motorware for a traction application. Our motor can handle maximum 400A current. We are using 200A current sensor for each phase to take the current measurements for motorware algorithm. We have changed below current settings for our use case.

    #define USER_IQ_FULL_SCALE_CURRENT_A         (200.0)
    #define USER_ADC_FULL_SCALE_CURRENT_A       (400.0)

    #define USER_MOTOR_MAX_CURRENT          (400.0)

    Now, in load condition, we are increasing IqRef_A gradually. Until it comes to some certain amount of IqRef_A value (Ex : _IQ(80.0) ) motor shows very smooth operation. very fine operation. At that time the current consumption of the motor controller is nearly 15A. 

    When we further increase the IqRef_A value, motor get start to produce noise sound. Like a hum sound. And showing a vibration as well. At that time, we can see that the PWMs are running at their maximum duties from oscilloscope.

    But our intention is to accelerate the motor when we further increase the IqRef_A value, because our motor and current sensor of motor controller capable to draw much more than 20A. But it is not happening. Seems there is no error with hardware.

    What should be the problem? Where should be the problem? Are there any settings should be changed related to current ?

    Thank you

  • Correction

    I used  #define USER_MOTOR_MAX_CURRENT          (190.0)  not 400.0 as mentioned above. That is because to avoid the

    USER_MOTOR_MAX_CURRENT > USER_IQ_FULL_SCALE_CURRENT_A  error. Please help to solve this issue.

    Thanks

  • If you are using the same sensor, you have to use this value in order to match hardware with software:

    #define USER_ADC_FULL_SCALE_CURRENT_A        (330.0)

    Could you also confirm your value of this define? USER_IQ_FULL_SCALE_VOLTAGE_V. And please take a look at DCbus and make sure is not collapsing. Keep in mind that 1/DCbus is used to scale the Kp gains of the current controllers, and if DCbus collapses, Kp gains could be amplified a bit too much.

    -Jorge

  • Hi Jorge,

    We are using same current sensor. I think the USER_ADC_FULL_SCALE_CURRENT_A should not be 330.0 . Because the sensor supply voltage is 5V. Sensor sensitivity is 10mV/A. Sensor output shows 2.5V when the current equals to zero. According to sensitivity 250A of current should be passed through the sensor ( (5V-2.5V)/10mV/A = 250A).  After that we scale current sensor output to 0V - 3.3V to mactch the motorware requirement.

    Anyhow finally, 250A of current should be passed through the sensor, when ADC pin voltage is going 1.65V to 3.3V. Sounds like 

    #define USER_IQ_FULL_SCALE_CURRENT_A         (250.0)
    #define USER_ADC_FULL_SCALE_CURRENT_A       (500.0)

    We used that settings as well.
    Since you asked, we used 330.0 as well. Still could not solve the problem. 
    Our intention is to absorb more current and accelerate the motor when we further increase the IqRef_A value, but it is not happening. It is not adsorbing more than around 20A from source.  

  • You are absolutely correct, at the end, a current of 500A peak to peak creates a signal in the ADC from 0.0 to 3.3, so yes, your value is correct:

    #define USER_ADC_FULL_SCALE_CURRENT_A       (500.0)

    Could you confirm your DC bus, and also the value of USER_IQ_FULL_SCALE_VOLTAGE_V?

    Also please send as much information as you can, like schematics, user.h, current plots from the scope, etc.

    -Jorge

  • Hi Jorge,

    I confirm that our dc bus does not collapse when the motor draws currents.  I have attached my user.h file below. I noticed from oscilloscope, PWM duties go to their maximum when motor start the hum.

    What is the maximum IqRef_A value that we can use? Variable range vise it should be 128 to -128 in iq24 format. We are using big numbers for IqRef_A value around 90 to get start to rotate the motor,  Is the IqRef_A is pu (per unit) number?  

    We have used same voltage sensor setting as   TMDSHVMTRPFCKIT. I can verify that our voltage sensors meet that hardware configuration as   TMDSHVMTRPFCKIT. So we have used,

    #define USER_IQ_FULL_SCALE_VOLTAGE_V      (450.0)
    #define USER_ADC_FULL_SCALE_VOLTAGE_V       (409.6)  

    7673.user.h

  • Looking at the voltage offsets, it seems that Vbus is around 170V, is that correct?

    If that is true, please use a smaller value on USER_IQ_FULL_SCALE_VOLTAGE_V.

    Actually, it could be that the resistor divider and filter aren't set appropriately according to the hardware you have

    So, please confirm the voltage feedback circuit (including the capacitor).

    And please confirm the Vbus value you are using.

    I think what's happening is that 1/Vbus compensation is amplifying the current controller gains a bit too much.

    -Jorge

  • Hi Jorge,

    I did some experiments today and test with small USER_IQ_FULL_SCALE_VOLTAGE_V as you said. I am using several voltage levels to test the controller.

    As you told we mostly used around 170Vdc as DC bus voltage. And we used 330Vdc voltage as well to testing. We tested motor in NO LOAD condition with 170Vdc bus voltage. At that time around 25A current was drawn by motor and IqRef_A value was 70. Motor RPM was nearly 3000rpm. Further we increased IqRef_A and tried to hit more current and achieve more acceleration with more higher speed. But it was not happened. We could not pumped more than 25A continuous current to the motor. Why that happens?

    Further, when we test motor with load condition,  we could not pump more than continuous 25A current. At that time with load condition we have to used IqRef_A value 90. Seems to be that, near 25A there is a ceiling. Which causes this? Hadware or Motorware algorithm? Or any other reason? Our motor is capable to draw nearly 400A continuous current.

  • You said you are using lab 5a, which runs it in torque mode, correct? We might be getting an overflow on an IQ multiplication, since, like you mention above, IQ24 values are from -128 to 127.9999. If you use IqRef_A variable you will be limited by that range. Please create another global variable so that you can set references in kiloAmps.

    _iq IqRef_kA;

    So that, when you want to have 50 Amps, you set it to this value:

    IqRef_kA = _IQ(0.05);

    This requires the highlighted changes to lab 5a code:

    _iq iq_ref = _IQmpy(IqRef_kA,_IQ(1000.0/USER_IQ_FULL_SCALE_CURRENT_A));

    Not sure if that solves the problem, but let's make that change for now.

    -Jorge