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.

DRV8316REVM: How to get trapezoidal back-emf waveform

Part Number: DRV8316REVM
Other Parts Discussed in Thread: DRV8316

Hi All,

I'm working on driving sensorless BLDC motor by 120 degrees trapezoidal control.

I'm stuck on to get back-emf voltage like below figure:

My result is like this.

And the circuit used for voltage sens part is as follow.
I am using the circuit of DRV8216REVM with some modification. Remove the capacitor, and add 75kΩ for generate a virtual neutral point .

I don't know if it's a circuit problem or a control firmware problem.
Please suggest how to get trapezoidal back-emf waveform.

  • Hi All,

    I will add new figure.
    This is the waveform when drive the Bull-Running model BR2804-1700 kV BLDC motor as a trial (The firmware was same).
    The slope of the no-energized period appears to be reversed.

  • Hi Kenji,

    Thanks for posting to the MD forum!

    To obtain the BEMF sensorlessly, you should be able to use your current hardware configuration to measure the BEMF of the floating phase (after using align or another startup technique to get the initial position of the rotor). As the motor starts to spin, one technique is to integrate the increasing/decreasing BEMF once it crosses the zero-crossing (PWM period / 2) and once the BEMF hits a predetermined BEMF threshold, you can use that to switch the states accordingly. 

    It seems from the waveform above that you may either be commutating to the wrong state or calculating the BEMF of the wrong phase. I don't think the virtual neutral point is the issue from the 75k resistor you added, but could you confirm that there's no difference by replacing with 0ohm resistors?

    This looks to be a control firmware problem.

    Can you ensure that the states you are implementing once you calculate the BEMF are following a pattern like this table below?

    Thanks, 

    Aaron

  • Hi Aaron-san

    My aim is to make ESC for drone. The circuit of the ESC I refer, use commutation method based on virtual neutral voltage. We are trying to detect the cross point by comparing the virtual neutral point and the BEMF of each phase. For now, we thinking of making it the same way, like above figure (or above waveform).

    I use DRV8316REVM with STM32G474 for drive BLDC motor.
    Assuming that GHx and GLx in the table are INHx INLx in DRV8316, the next figure is the drive control signal for the motor driver.
    Since I can't get the aim back-EMF signal, for now I control the motor under open-loop control.

    After few Align period, are energized in this order:

    1. AH→CL
    2. AH→BL
    3. BH→CL
    4. BH→AL
    5. CH→AL
    6. CH→BL 

    PWM control signal to DRV8316:

    ※A is U, B is V, C is W on the figure.

    Zooming of PWM control signal to DFV8316:

    Actual back-EMF signal:

    Q. The shape of the waveform during the non-energized period is different.
    Is this due to firmware?

    Actual back-EMF and I-sens signal:

    I believe it is energized as per the table pattern, but please let me know if you notice anything.

    And no changed, in case remove 75kOhm register.

  • Hi Kenji-san,

    Thanks for the reply and information. 

    Is the motor spinning with this waveform? Do you notice any unusual behavior in the motor spinning, i.e. vibrations, noise, etc.?

    Can you spin the motor with your hand and see its BEMF waveform? It may be possible that the motor commutation is matching the BEMF pattern of this motor. If this is the case then there may be no issues at all. 

    Yes, INHx matches the GHx waveforms and INLx matches the GLx waveforms in the table. 

    You may also need to consider adding delay compensation for the BEMF signals, since there is delay in the DRV8316 device from inputs to outputs. 

    Thanks,
    Aaron

  • Hi Aeron-san

    Motor spinning with waveform, and this is the output waveform when spinning the motor by hand.  

    And about the sound, there sound noise, like a beep and some kind of hit the mecha.

    I will up the sound file. Both file is the sound when ramp up the speed to 100rpm from 1000rpm. The difference is, the firmware is based on

    [Question] 

    1. Because I thought that the BEMF waveform could be obtained without consider delay compensation. I figured I would need it for closed loop control and not now. Should it be considered in open loop?
    2. If align sequence failed, will the BEMF waveform  collapse?
    3. Looking at the BEMF waveform, there is a period when the desired output waveform is obtained. Are there any factors you can think from this?
    4. I use complementary PWM with dead time to control DRV8316. I know that DRV8316 has y protected for any cross conduction(dead time) of MOSFETs. To use DRV8316, is not necessary a dead time in complementary PWM?
  • Hi Kenji-san,

    Let me answer those questions:

    1. My apologies, rather than delay compensation, I meant to say commutation phase angle. Sometimes having an advance angle for driving the phases can improve the performance due to the inductor causing the angle to lag. It may not be needed for sensorless applications. 


    2. If the align fails, then spinning during open loop too fast will not synchronize and spin the motor properly becuase there will not be enough BEMF not enough to close the loop.

    3. Conversely, could you try spinning faster to ensure there is enough BEMF to measure? The biggest factor to measure the BEMF waveform is to ensure the motor is spinning fast enough to generate enough BEMF. Can you share the motor datasheet? We would like to know BEMF constant of the motor.

    4. Dead time is recommended to have from the MCU side. the dead time in the device is important because it allows for VGS monitors in the device to ensure the minimum dead time exists between the HS + LS FETs switching, even through variations in the system such temperature drift.

    Thanks,
    Aaron

  • Hi Aaron-san

    • This is the waveform when drive the motor at 5000rpm under open-loop.  More than 5000 rpm can't be controlled by open-loop with my test firmware.  The shape of BEMF has become like the target. And do you know why there is a difference in voltage height during the non-energized period? What is the factor? Is it because the phase is not aligned?
    • About the motor, we don't have much information, but the specifications are as follows

      Poles: 12
      Rated voltage: 7.6[V].
      KV value: 4300 - 4700[rpm/V] @ no-load
      No-load current: 400[mA]
      Winding resistance: 0.35[ohm]
  • Hi Aaron-san

    • After speed ramping up to 3500 rpm with 20% of PWM duty, I checked if the BEMF waveform would change if changed the duty.
      The result is like this.

      I could confirm the needed waveform. About this do you have any opinion or suggestion?
    • I used THIs RAMP functions. May be it's not suitable for the motor I use. I will modify and check. 

  • Hello Kenji-san,

    Aaron will get back to you tomorrow.

    Thanks,

    Matt

  • Hi Kenji-san,

    I will interpret the data carefully next week as I will be out of office tomorrow. I believe there may be something to do with it not being aligned correctly. Can you make sure that your align:

    - Generates inverting PWM waveforms on the phase you want to align (i.e phase A)

    - Grounds the other phases (i.e. turning on LS of phase B and C)

    If you spin the motor by hand to a fixed position and run your align function, you should see it align to that phase every time. You can also measure the known current going through the aligned phase by taking the average voltage (duty cycle * motor voltage) and dividing it by the motor's phase resistance * 3/2. 

    Can you also remove the ramp functions and see if this improves performance? Sometimes ramp functions can affect the dead time of the PWMs and as a result affect the sampling time of the BEMF for lower duty cycles. 

    Thanks,
    Aaron

  • Hi Kenji-san, 

    Have you confirmed your align to be working yet? And have you checked whether your ramp functions improve performance?

    Thanks,
    Aaron

  • Hi Kenji-san,

    Do you need any additional help here, or should I close the thread?

    Thanks,

    Matt

  • Hi Matt-san

    No. Problem solved.

    Thank you.