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.

Current Loop control like proj_lab4 with DRV8301-69M KIT REVD

Other Parts Discussed in Thread: DRV8301, MOTORWARE, CONTROLSUITE

Hi,

i'm runing my motor with the current loop control like proj_lab4. By increasing the IqRef_a the currents of 3 phase are getting distorted and no more sinus

3-Phase current measured with LEM by IqRef_A =25A

3-Phase current measured with LEM by IqRef_A =35A

1. it seems to be an issue with this hight current or what can i change in the setting  ?. My user.h:

#define USER_IQ_FULL_SCALE_FREQ_Hz      

#define USER_IQ_FULL_SCALE_VOLTAGE_V      (30.0)  

#define USER_ADC_FULL_SCALE_VOLTAGE_V       (66.32)     

#define USER_VOLTAGE_SF               ((float_t)((USER_ADC_FULL_SCALE_VOLTAGE_V)/(USER_IQ_FULL_SCALE_VOLTAGE_V)))

#define USER_IQ_FULL_SCALE_CURRENT_A          (50)   // 41.25 Example for drv8301_revd typical usage

#define USER_ADC_FULL_SCALE_CURRENT_A        (100)     // 82.5 drv8301_revd current scaling

2. I observed the "distortion" of phase current depending on USER_MOTOR_RATED_FLUX. Wtih higher USER_MOTOR_RATED_FLUX the "distortion" begins already at IqRef_A = 15A

3. why is the IqRef_A different or higher than amplitude of  Phase current (see attachment of IqRef_A 25A)? are there some issues with control parameter Iq_Ki and Iq_Kp?


Any advice would be highly appreciated

Best,

Giang

  • 1a. Is your bus voltage 30V? did you change the voltage sensing circuits at all?
    1b. did you change the current scaling on the HW to measure +/- 50A as noted in USER_ADC_FULL_SCALE_CURRENT_A ?
    1c. Are you using the LEMs for current feedback into the system or are you still using shunts for the control system and just LEMs for verification?

    2. Why are you changing USER_MOTOR_RATED_FLUX? I assume you have valid USER_MOTOR settings? Please post them.

    3. do you have enough load on the machine to command the 25A? You can command 25A of peak IqRef, but if there is no load it will draw minimal current. If there is heavy load it will draw more, but not necessarily the maximum command. If you do have enough load and it's still incorrect I would suggest looking at your current scaling once again.
  • Hi Chris,

    1a. Is your bus voltage 30V? did you change the voltage sensing circuits at all?

    -->  yes bus voltage is 30V. I changed also the voltage sensing circuit
    1b. did you change the current scaling on the HW to measure +/- 50A as noted in USER_ADC_FULL_SCALE_CURRENT_A ?

    --> yes. please see my user.h3005.user.h
    1c. Are you using the LEMs for current feedback into the system or are you still using shunts for the control system and just LEMs for verification?
    --> i'm using LEMs just for verification. Shunts are still used for current feedback and control system. Nothing changed on DRV8301 REVD  Board


    2. Why are you changing USER_MOTOR_RATED_FLUX? I assume you have valid USER_MOTOR settings? Please post them.
    --> i just want to play around to see how the influence from the parameter on the behavior of control system. I estimated the USER_MOTOR_RATED_FLUX using measured no load voltage of motor, USER_MOTOR_RATED_FLUX = no load voltage / frequency at no load speed.


    3. do you have enough load on the machine to command the 25A? You can command 25A of peak IqRef, but if there is no load it will draw minimal current. If there is heavy load it will draw more, but not necessarily the maximum command. If you do have enough load and it's still incorrect I would suggest looking at your current scaling once again.

    --> load is enough. The test motor is connected with a load machine in a test bench. The load machine is running in speed controll, that's why i'm running the test motor in torque (current controll). I'm just wondering why the IqRef_A is different or higher than amplitude of measured phase current, as you see IqRef_A = 25A, the amplitude of phase current is around 20A. Do i miss a scalling factor for IqRef_A ??

  • 1. if you changed the voltage sensing circuit why do you still have the same
    USER_IQ_FULL_SCALE_VOLTAGE_V
    and
    USER_VOLTAGE_FILTER_POLE_Hz

    2. were you not able to perform motor ID using proj_Lab02c?

    3. no scaling. How are you providing your load? Is the motor already running with some IqRef? Then you increase load, then increase IqRef? It's surprising to see the IqRef_A= 25 case not showing the full peak 25A if you have enough load.


    The DRV8301 EVM does not have great current sensing. There is cross coupling and we see quite a bit of noise picked up when over> 50% duty cycle. It doesn't surprise me that it's getting noisy at 35A (full scale is 40A).
  • 1. i chosed the wrong user.h in wrong directory . Now i attached the right one. USER_VOLTAGE_FILTER_POLE_Hz i just used the default value of 335Hz ( this should be greater than the minimum pole)

    0647.user.h

    2. i rather use my estimated values and they are mostly more accurate than the parameter found by ID

    3. My motor (current control ) is coupled with a load machine, the rated power of the load machine is much higher than the power of a test motor. The load machine is running in speed control e.g. 2000 rpm, and i just put the IqRef_A starting with 5 A  and increasing until 35A. By increasing the IqRef Value my motor would try to rotate faster, but the speed is controled by a load machine and the current of my motor should reach the IqRef value, shouldn't it?

    4. "The DRV8301 EVM does not have great current sensing. There is cross coupling and we see quite a bit of noise picked up when over> 50% duty cycle. It doesn't surprise me that it's getting noisy at 35A (full scale is 40A)."

    --> i tried to understand how to use the in phase current feedback and put a question here:

    could you give me some advice for that.

    Thanks a lot.

    Giang

  • a. this should be
    #define USER_NUM_PWM_TICKS_PER_ISR_TICK (1)

    b. you need to calculate the new voltage filter pole base on your new R and C values. It is important that this value matches the HW calculation shown in SPRUHJ1 chapter 5.2.4
    #define USER_VOLTAGE_FILTER_POLE_Hz (335.648)

    2. "i rather use my estimated values and they are mostly more accurate than the parameter found by ID". Our parameter ID should be more valid than you datasheet, assuming the HW and SW is done correctly

    3. yes, it should reach the IqRef under these conditions

    4. if you want to use the phase current sensors you will just replace the shunt current measurement inputs to the MCU ADC pins. Make sure you scale the signals to 0 to +3.3V and use the phase A and B inputs (U, V). Also make sure that the current polarity is in the same orientation as the existing (negative)

    or, you can bring them to 2 free ADC pins and then update the ADC sampling pins for current in the HAL files
  • Hi Chris,

    thank you for the help.

    3. now the Iq_Ref is the same as measured current. The reasons are the parameters:     

    #define USER_IQ_FULL_SCALE_CURRENT_A        
    #define USER_ADC_FULL_SCALE_CURRENT_A       

    If i just set the ADC_FULL_SCALE_CURRENT_A not around 82.5 A, the differences between Iq_Ref and measured phase current occur. For example:

    #define USER_IQ_FULL_SCALE_CURRENT_A          (35)
    #define USER_ADC_FULL_SCALE_CURRENT_A        (100)

    or

    #define USER_IQ_FULL_SCALE_CURRENT_A          (35)
    #define USER_ADC_FULL_SCALE_CURRENT_A        (70)

     with following parameter it works best for me:

    #define USER_IQ_FULL_SCALE_CURRENT_A          (35)
    #define USER_ADC_FULL_SCALE_CURRENT_A        (82.5)

    4.

    a. I would try first with a Resistor 0,002 Ohm parallel connected with the existing shunt resistor 0,002 Ohm also --> total resistance 0.001 Ohm. According to SPRUHJ1 chapter 5.2.4 formula 4, with the same  Rfbk and Rin: Iin can be increased from 41.25 to 82.5A when Rshunt reduces to 0.001Ohm. What do you think?

    b. i'm going to use ACS759 current sensor using hall effect with 3,3V output. what 2 free pins would you suggest? i'm thinking about  2 ADC pins (ADC B0 and ADC B2) that can be connected over J5 (pin 34 and 38).

    Further question regarding user manual: will chapter 20-21 "Building Your InstaSPIN-FOC and InstaSPIN-MOTION Board" be released someday?

    Best

    Giang

  • 3. #define USER_ADC_FULL_SCALE_CURRENT_A needs to match the actual measurement circuit. You should never change this once HW is set.
    #define USER_IQ_FULL_SCALE_CURRENT_A should be set to >= (USER_ADC_FULL_SCALE_CURRENT_A / 2), so (35.0) shouldn't be used. 41.25 or greater should give the same results.

    4a. Not sure what you are trying to do. Are you trying to increase USER_ADC_FULL_SCALE_CURRENT_A to (165.0) ?
    there will be some heat dissipation issues with this EVM at those current levels, it's only been tested to about 60A peak to peak.

    4b. Any two that are free.

    chapter 20-21, unfortunately no, not anytime soon.
  • 4a. Yes i want to increase the USER_ADC_FULL_SCALE_CURRENT_A to (165.0). I will controll the temperature of the board if it works :)

    4b. I'm going to use ADC-B0 and B2. So i'm changing the SOCs in hal.c. Could you give me any advice how to disconnect the signal of Vdc-Bus (currently aktive for ADC-B2) on the Board 8301 EVM or how to deactivate those chanels?.

      // EXT IA-FB
      ADC_setSocChanNumber(obj->adcHandle,ADC_SocNumber_0,ADC_SocChanNumber_B0);
      ADC_setSocTrigSrc(obj->adcHandle,ADC_SocNumber_0,ADC_SocTrigSrc_EPWM1_ADCSOCA);
      ADC_setSocSampleDelay(obj->adcHandle,ADC_SocNumber_0,ADC_SocSampleDelay_9_cycles);

      // EXT IA-FB
      // Duplicate conversion due to ADC Initial Conversion bug (SPRZ342)
      ADC_setSocChanNumber(obj->adcHandle,ADC_SocNumber_1,ADC_SocChanNumber_B0);
      ADC_setSocTrigSrc(obj->adcHandle,ADC_SocNumber_1,ADC_SocTrigSrc_EPWM1_ADCSOCA);
      ADC_setSocSampleDelay(obj->adcHandle,ADC_SocNumber_1,ADC_SocSampleDelay_9_cycles);

      // EXT IB-FB
      ADC_setSocChanNumber(obj->adcHandle,ADC_SocNumber_2,ADC_SocChanNumber_B2);
      ADC_setSocTrigSrc(obj->adcHandle,ADC_SocNumber_2,ADC_SocTrigSrc_EPWM1_ADCSOCA);
      ADC_setSocSampleDelay(obj->adcHandle,ADC_SocNumber_2,ADC_SocSampleDelay_9_cycles);

      // EXT IC-FB --> THIS CHANEL WON'T BE USED
      ADC_setSocChanNumber(obj->adcHandle,ADC_SocNumber_3,ADC_SocChanNumber_A0);
      ADC_setSocTrigSrc(obj->adcHandle,ADC_SocNumber_3,ADC_SocTrigSrc_EPWM1_ADCSOCA);
      ADC_setSocSampleDelay(obj->adcHandle,ADC_SocNumber_3,ADC_SocSampleDelay_9_cycles);

    and comment out the following:

     // VDCBUS
      //comment out To 04082016
      //ADC_setSocChanNumber(obj->adcHandle,ADC_SocNumber_7,ADC_SocChanNumber_B2);
      //ADC_setSocTrigSrc(obj->adcHandle,ADC_SocNumber_7,ADC_SocTrigSrc_EPWM1_ADCSOCA);
      //ADC_setSocSampleDelay(obj->adcHandle,ADC_SocNumber_7,ADC_SocSampleDelay_9_cycles);

  • you should keep the VDCBUS signal. choose a different ADC channel for your currents
  • Hi Chris,

    what is the differentiation between EXT_IA-FB and the two IA-FB?. From the schematic i understand that EXT_IA-FB is current feedback from Shunt on DRV8301 EVM Board but what is IA-FB then using for?

  • they are both measurements from the shunt. the EXT use external OPA and have a scaling of +/- 41.25A. These are used for MotorWare projects.
    The non-EXT use the two on-chip PGAs of DRV830x and have a scaling of ~+/- 60A. These are used for controlSUITE projects.
  • Hi Chris,

    i'm trying to implement the in phase current measurement as feedback for the control loop until now without success and one damaged board ...

    I did the change as following:

    1.

    using curent sensor ACS 759 (output 0- 3,3V for current from -125A -  +125A) that are connected to ADC B0 and ADC A4

    2.

    #define USER_IQ_FULL_SCALE_CURRENT_A          (130)

    #define USER_ADC_FULL_SCALE_CURRENT_A        (250)

    #define USER_NUM_CURRENT_SENSORS            (2)

    3. changing the ADC setup in hal.c

     // EXT IA-FB
      ADC_setSocChanNumber(obj->adcHandle,ADC_SocNumber_0,ADC_SocChanNumber_A4);


      // EXT IA-FB
      // Duplicate conversion due to ADC Initial Conversion bug (SPRZ342)
      ADC_setSocChanNumber(obj->adcHandle,ADC_SocNumber_1,ADC_SocChanNumber_A4);


      // EXT IB-FB
      ADC_setSocChanNumber(obj->adcHandle,ADC_SocNumber_2,ADC_SocChanNumber_B0);


    Then i started proj_lab4 with low Iq_refA, then the current went to max. current around 50-70A unless i set #define USER_MOTOR_MAX_CURRENT          (30.0), i the DRV8301 Gate driver exploded

    I controled the in-phase current sensor with external current source, and every things are fine with the scaling (0-3,3V), so the problem is not the current sensor.

    May you have any idea, what i'm missing.

  • did you check the polarity of current measurement from the sensor vs. the shunt sensors on the EVM?
    see SPRUHJ1 chapter 5.2.2

    Is A4 the U phase and B0 the V phase of the machine/inverter leg?