cancel
Showing results for 
Search instead for 
Did you mean: 

6-step speed fluctuation & current spikes

Nikolaj_TL
Associate III

I am facing issues while running a BLDC motor using the 6-step algorithm on the STEVAL-SPIN3201 board. The only modification I have made is to the Hall effect sensor low-pass filter to address noisy input signals.

I am encountering the following problems:

  1. Current spike on startup: 
    When starting the motor I apply a soft speed ramp, still I get this current spike on the phase current, which sometimes result in 'Over Current' Fault. What can be done to mitigate this? 
    scope_47.png
  2. Speed fluctuations: The motor speed fluctuates around the reference speed, resulting in uneven current draw (see "1500rpm_no_load.png"). I have tried adjusting the speed regulator tuning to be less aggressive, but this has not resolved the issue.

    1500rpm_no_load.png
  3. Current Spikes: Occasional current spikes in the phase currents trigger "Over Current" faults.

Do you have any suggestions on how to address these problems?


The .stwb6 project is included in the Info.zip file

1 ACCEPTED SOLUTION

Accepted Solutions
ADAVE.1
ST Employee

Hello @Nikolaj_TL ,

As far as the current spike at start-up is concerned, I suppose you find it not at first run but after stopped and run again the motor and it may due to improper initialization of the PID. So I would suggest to set a lower speed setpoint before stopping the motor or add the following line of code in the function "void SixStep_Clear(uint8_t bMotor)" in mc_tasks.c

SixStepVars[M1].bDriveInput = EXTERNAL;    

 

I wasn't able to reproduce the instability at high speed but from your project I noticed the setting

Placement electrical angle = 231

in the configuration of the sensors that is pretty unusual and if wrong it can lead to pronounced current ripples. On the other hand, I don't see any voltage waveform in your picture to understand bemf position and synchronization. Try to tune that parameter and see if it improves

Regards

Alessio   

View solution in original post

10 REPLIES 10
ADAVE.1
ST Employee

Hello @Nikolaj_TL ,

As far as the current spike at start-up is concerned, I suppose you find it not at first run but after stopped and run again the motor and it may due to improper initialization of the PID. So I would suggest to set a lower speed setpoint before stopping the motor or add the following line of code in the function "void SixStep_Clear(uint8_t bMotor)" in mc_tasks.c

SixStepVars[M1].bDriveInput = EXTERNAL;    

 

I wasn't able to reproduce the instability at high speed but from your project I noticed the setting

Placement electrical angle = 231

in the configuration of the sensors that is pretty unusual and if wrong it can lead to pronounced current ripples. On the other hand, I don't see any voltage waveform in your picture to understand bemf position and synchronization. Try to tune that parameter and see if it improves

Regards

Alessio   

Hello @ADAVE.1 

You are right, the start-up current spike usually comes after the first run or so. I have added the suggested line to the SixStep_Clear(uint8_t bMotor) function and it has greatly improved the start-up characteristic.

Solution.png
startup.png

I am not sure I fully understand why this line of code helps. The only thing mentioned about the bDriveInput is: 
It specifies whether the current reference source must be * #INTERNAL or #EXTERNAL.

Would you care to explain how this affects the start-up behaviour?

How would you suggest that I plot the BEMF as I only measure the pulsed supply voltage when I measure across the phases to ground?

Regarding the Placement Electrical Angle I measured this as described in um1052, ch. 8.3

Best Regards Nikolaj

 

Hello @Nikolaj_TL 

If the reference source is  #EXTERNAL the calculation of the PID does not take into account the speed target setpoint. This has to be done since PID is reset and speed ramp command sent only afterwards.

I'm not suggesting to plot BEMF but simply phase voltages from which BEMF behavior and rotor synchronization can be understood.

Regards

Alessio

Nikolaj_TL
Associate III

Hello @ADAVE.1 

Thank you for the explanation.

Here are the phase voltages along side the phase currents:
2340rpm_unloaded2340rpm_unloaded2340rpm_loaded2340rpm_loaded
Left plot 2340rpm motor unloaded, right plot 2340rpm motor loaded
Ch1: Phase U current
Ch2: Phase V current
Ch3: Phase U voltage
Ch4: Phase V voltage

I am curious to hear what you can say about the BEMF behavior and rotor synchronization from this.

Previously you mentioned that Placement electrical angle = 231 is unusual, what are common values for the placement electrical angle?

Regards Nikolaj

Nikolaj_TL
Associate III

The following describes how I calculated the 'Placement Electrical Angle'.
_Setup.png

Measurements of the frequency of the period and the delay between a rising edge on D0 and a peak on Phase U (ch 3).

Frequency measurementFrequency measurementDelay measurementDelay measurement

The placement electrical angle is calculated:
{8CAE434C-C191-4031-9B5F-D025422D7BDE}.png

(I redid my measurements therefore a slight diffrence in result)


If you notice anything off about the measurements/calculations feel free to say so.

Hi @Nikolaj_TL ,

even though your measurement looks fine the waveforms you sent tells me that rotor is not well synchronized. The baseline of the voltage when the phase is floating is a measure of the BEMF. With 6step algorithm, BEMF zero crossing is supposed to be in the center of the step, while in your acquisition looks in advance determining pronounced current ripples.

In the attached picture you can see the effect on my motor reducing the placement electrical angle by about 12degrees: the zero crossing moves with consequent asymmetricity in the voltage waveform and inefficiency (=increased current).

My suggestion is to increase your placement electrical angle and see what happens

Alessio

test--00012.png

test--00013.png

  

  

Nikolaj_TL
Associate III

Hello @ADAVE.1 

I see what you mean regarding the misalignment and the current ripples.To investigate this I have increase the 'Placement Electrical Angle' incrementally and measured the phase voltage, current and the Hall sensor signals. 

The problem is as I increased the 'Placement Electrical Angle', the control got worse. 
Here are the measurements, all made at 1500rpm:

'Placement Electrical Angle' = 231'Placement Electrical Angle' = 231'Placement Electrical Angle' = 240'Placement Electrical Angle' = 240'Placement Electrical Angle' = 260'Placement Electrical Angle' = 260'Placement Electrical Angle' = 280'Placement Electrical Angle' = 280'Placement Electrical Angle' = 300'Placement Electrical Angle' = 300
Channel 1: Phase Voltage
Channel 4: Phase current
D0: Hall1
D1: Hall2
D2: Hall3

 

I am unsure why I get these results. Do you have an idea?

Hi @Nikolaj_TL 

I see that a value around 240-245 gives the best results with symmetric waveform. However I can understand your point with such a low inductance motor that gives a huge variation of current during each step. Unfortunately I don't have an easy solution for you: voltage mode six step controls the duty cycle once each step because the speed is calculated once each step and the current is not regulated, it's intrinsic in this kind of algorithm.

I can suggest you to check whether an increase PWM frequency leads to lower ripples, eventually increase speed average depth to make it less reactive if acceptable or increase STEVAL-SPIN3201 overcurrent threshold

Nikolaj_TL
Associate III

Hi @ADAVE.1,

I will try to increase the PWM frequency and average speed depth to make it more less reactive, both good ideas. 
Thank you for all support, your suggestions has improved the motor control a lot. 

 

Do you also have a good understanding of FOC control as well? 

My goal is to develop a motor controller, which can control the current through the motor. I have had a hard time adjusting the FOC control, which is why I temporarily switched to 6-step to see if I could get the motor to run satisfactorily, I have achieved this now. 
This means it is back to the FOC algorithm