Phase current of Brushless motor

Thread Starter

kalemaxon89

Joined Oct 12, 2022
389
I am using the TI's microcontroller with the BOOSTXL-3PHGANINV driver.
I'm running a sensorless brushless motor using FOC.

Looking at the schematic of the BOOSTXL-3PHGANINV, an INA240A1 produces on one of the three phases a Vout=Ia * Rsense * gain - Vref which sends to pin 27 "Analog_In/I2S_WS."
So I connected that pin to the oscilloscope and displayed the motor phase waveform by inverse mathematical formula: Ia=(Vout-Vref) / (gain*Vdiff)
This is phase A current "Ia":
1736416130680.png

1736416139716.png

The motor turns correctly, with a Hall I verified that the set speed is the speed actually achieved by the motor. However, I do not understand why the current on the phase (top photo) is NOT sinusoidal.

Am I missing something at the theoretical level? Or is something wrong in the code? It should be sinusoidal, rigth?

The code has thousands of lines and it'is already written by TI, it makes it available to you officially with its software (c2000ware-MotorControl). The algorithm is already all written by TI, I just set the parameters of my engine. I will not upload it because I would like more of a "theoretical" answer to:

what are the reasons why the phase current is so distorted and not a sinewave?

Consider that the motor I am testing is this one and its parameters (inductance, resistance, etc.) were estimated by TI software, which provides an automated parameter recognition procedure. I hope it is reliable.
 

nsaspook

Joined Aug 27, 2009
16,273
FOC is not simple sinusoidal commutation. sinusoidal commutation controls phase currents by effectually pushing the motor from slightly behind to where it should go, whereas FOC applies coordinate based phase current to pull to motor to the calculated future position.

https://www.pmdcorp.com/resources/type/articles/get/field-oriented-control-foc-a-deep-dive-article

1736439891776.png
Figure 3a shows control schemes for both sinusoidal commutation and field oriented control. In the sinusoidal control approach, the torque command is 'vectorized' through a sinusoidal lookup table, thereby developing a separate command for each winding of the motor. As the rotor advances, the lookup angle advances in kind. Once the vectorized phase command is generated, it is passed on to a current loop, one for each winding, which attempts to keeps the actual winding current at the desired current value.

An important characteristic of this approach is that as the frequency of motor rotation increases, so does the challenge of maintaining the desired current. This is because the current loop is affected by the rotation frequency. Lag in the current loop, insignificant at low rotation speeds, generates increasing amounts of D (unwanted) torque at higher rotation speeds, resulting in a reduction of available torque.

The control scheme for FOC, Figure 3b, differs in that the current loop occurs de-referenced from the motor's rotation. That is, independent of the motor's rotation. In the FOC approach, there are two current loops, one for the Q torque and another for the D torque. The Q torque loop is driven with the user's desired torque from the servo controller. The D loop is driven with an input command of zero, so as to minimize the unwanted direct torque component.

The trick to making all of this work is math-intensive transform operations that convert the vectorized phase angle to, and from, the de-referenced D and Q reference frame. Known as Park and Clarke transforms, their practical implementation in Brushless DC drives are now commonplace due to the availability of low-cost, high-performance DSPs and microprocessors.
At full speed and load the waveforms might begin to look more sinusoidal with FOC.
https://forum.allaboutcircuits.com/...ation-type-for-bldc-motor.199825/post-1897376

A good educational series from TI.
 
Last edited:

MisterBill2

Joined Jan 23, 2018
27,318
In addition to the correct answer already presented, it is clear that PWM at a much higher frequency, is also in use. That certainly assures the very high frequency portion of the wave form. A sinewave would be mush less efficient.
 

Thread Starter

kalemaxon89

Joined Oct 12, 2022
389
FOC is not simple sinusoidal commutation. sinusoidal commutation controls phase currents by effectually pushing the motor from slightly behind to where it should go, whereas FOC applies coordinate based phase current to pull to motor to the calculated future position.

https://www.pmdcorp.com/resources/type/articles/get/field-oriented-control-foc-a-deep-dive-article

View attachment 339959


At full speed and load the waveforms might begin to look more sinusoidal with FOC.
https://forum.allaboutcircuits.com/...ation-type-for-bldc-motor.199825/post-1897376

A good educational series from TI.
Eventually I found out that it was not sine wave because there was no load connected.

Once connected, the phase current looked a lot like a sine wave
 

Thread Starter

kalemaxon89

Joined Oct 12, 2022
389
Great. That's what I told you.
Can I take the opportunity to ask you one more thing?
(If it's within your field of course)

It is always about the Field Oriented Control, which in my application does speed control on a PMSM motor.

Among the various parameters are the coefficients (Kp and Ki) of the PID of the inner current loop and the outer loop of the speed. I am playing with them and giving as input a reference speed step (the motor from 0 gets to that reference).
However, there is an additional parameter that can be changed and that changes things: the acceleration of the motor.
The concept that is not clear to me is what role the "motor acceleration" plays in tuning the PID.
I mean, since I have to give the system a step input (ideally with infinite slope) ... I guess I have to set the acceleration to the maximum value? Or am I wrong?
Because I believe that with low acceleration, regardless of Kp and Ki of the PID the motor will reach reference (from standstill) very slowly.

I read online that limiting acceleration has the same effect as "D" in a PID motor-rotor position-controller. In other words, the higher the value of D the more the controller will subdue acceleration when closing in on the rotor-position demand-point.

If you would like to share an opinion on this, otherwise I still thank you for your response in the previous post!
 

MisterBill2

Joined Jan 23, 2018
27,318
The motor response time equals a phase delay in the response and that does affect the "D" term. In fact it is one of the bigger influences of stability, and often a source of setup pain.
 
Top