2024-02-12 06:26 AM - edited 2024-02-14 11:46 PM
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:
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.
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
Solved! Go to Solution.
2024-02-16 01:35 AM
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
2024-02-16 01:35 AM
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
2024-02-16 05:56 AM - edited 2024-02-18 10:26 PM
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.
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
2024-02-16 06:14 AM
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
2024-02-19 04:52 AM - edited 2024-02-19 04:59 AM
Hello @ADAVE.1
Thank you for the explanation.
Here are the phase voltages along side the phase currents:
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
2024-02-19 05:52 AM
The following describes how I calculated the 'Placement Electrical Angle'.
Measurements of the frequency of the period and the delay between a rising edge on D0 and a peak on Phase U (ch 3).
The placement electrical angle is calculated:
(I redid my measurements therefore a slight diffrence in result)
If you notice anything off about the measurements/calculations feel free to say so.
2024-02-19 08:12 AM
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
2024-02-20 03:48 AM - edited 2024-02-20 06:47 AM
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:
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?
2024-02-21 06:19 AM
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
2024-02-22 06:09 AM
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