# DQ currents of BLDC

I am trying to apply FOC scheme with SVPWM for controlling a BLDC and comparing the resuls with trapezoidal commutation. I have my BLDC model and it is working correctly with trapezoidal commutation. My sign convention is positive speed CCW and when the motor is turning CCW, stators are located as A-B-C, stator A is located at electrical 0 degree. When i drive the motor with trapezoidal commutation i am measuring the phase currents and applying the DQ transformation to measured currents. When i apply the transformation i can see that trapezoidal commutation forces D current to stay as close as to zero, however Q has negative value under this sign convention.

The thing that i am trying to understand is if i force D current to be zero in FOC (as it suggested in all papers), Q current supposed to have negative reference for positive speed but in the suggested FOC schemes, Q reference is generated with speed reference and has positive sign for positive speed references. When i apply the FOC scheme it simply does not work because of this problem, Q goes negative for positive set points whereas controller tries to drive Q to a positive value.

## 1 Answer

Nice show. Your Clarke/Park seem to work properly. You have almost zero Id and almost constant Iq with ripples, which is normal if you run in six-step commutation.

From my intuition, you have wrong current measurements. Everything behaves as the phasor diagram is flipped, that means that Ia = -Ia, I =-Ib, Ic = -Ic. Could be current sensor swapped, or the opamp measuring configuration.

• I don't think this is the case, because when i check my waveform from the beginning of the simulation, they match with my expectetion. I find this documentation in matlab website; it.mathworks.com/help/physmod/sps/ref/parktransform.html I have same current waveforms as in the second diagram (a-phase aligned with vector d). In this documentation is also D is at zero, where Q has negative values for CCW rotation. Nov 6, 2019 at 7:30
• Actually you were right, but the problem was not measuring the wrong currents but instead i was supposed to flip my back emf generators in space phase domain Nov 6, 2019 at 8:24