FOC control modes

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FOC control modes

2,017 Views
mark_chylinski
Contributor I

Hello all!
I'm starting out learning about motor controllers and FOC. I have the S32K144 along with the motor development kit : MTRDEVKSPNK144: S32K144 

I'm struggling quite alot with finding documentation or descriptions of the different motor control techniques that are available to the FOC control: in the example project downloaded, called MTRDEVKSPNK144_S32DS, the FOC control-modes are in struct "controlStructMode_t" in "motor_structure.h" file. The available modes are Scalar control, voltage control, current control, and speed control. I'd like to know the differences or advantages/disadvantages between them so I can decide on which is best, and why it is better.

I have attached the structs that contain the control modes and how each is implemented in the FOCFastLoop of the main code (current loop of the cascaded control), in case this can help in understanding what is going on. The FOCFastLoop is shown in 2 pictures where "FOC_FastLoop_2" is the immediate continuation of the code from the first picture.

FOC_control_structs.jpg

FOC control structures, with available modes.

FOC_FastLoop_1.jpg

FOC FastLoop function with scalar and voltage control implementations

FOC_FastLoop_2.jpg

FOC FastLoop function with current and speed control implementations

I hope someone can point me in the right direction.
Thanks in advance
Mark

0 Kudos
5 Replies

1,787 Views
marekmusak
NXP Employee
NXP Employee

Hi Mark,

MTRDEVKSPNK144 demonstrates primarily advantage of the Field Oriented Control (FOC) technique in Sensorless mode. One of the MTRDEVKSPNK144 feature is that you can select character of the control (or mode). This feature can be used for debug purposes to setup new hardware or to control motor to demanded speed (speed control) or torque (current control).

So it depends on what requires your application either constant torque or constant speed.

Nevertheless, detailed discussion also with block diagrams you can find in application note AN4642 - "Motor Control Application Tuning (MCAT) Tool for 3-Phase PMSM":

https://www.nxp.com/docs/en/application-note/AN4642.pdf 

FOC implementation on S32K144 is discussed in application note AN12235 - "3-phase Sensorless PMSM Motor Control Kit with S32K144" 

https://www.nxp.com/docs/en/application-note/AN12235.pdf 

Regards,

Marek

0 Kudos

1,787 Views
bhanu_kassel
Contributor II

Hi,

I am using MTRDEVKSBNK144. How to maintain constant torque for BLDC motors?

Regards,

BHANU

0 Kudos

1,787 Views
marekmusak
NXP Employee
NXP Employee

Hi Bhanu,

There are two PI controllers used in this application: speed PI controller for speed control and current PI controller for current limit. You can use current PI controller to maintain constant torque. Ignore output of the speed controller and use only current PI for duty cycle control. Then, create new variable for example "torque_req" that you will use for constant torque control:

torqueErr = MLIB_Sub(torque_req, torque_filt);
duty_cycle = GFLIB_ControllerPIpAW(torqueErr, &currentPIPrms);

You can modify "torque_req" in FreeMASTER apps.

Constant "torque_req" = constant torque.

Regards,

Marek

0 Kudos

1,787 Views
kruthik_kumar
Contributor I

Hello marekmusak‌ ,

I also have the same issue of understanding torque control from the https://www.nxp.com/docs/en/application-note/AN12235.pdf , to maintain constant torque . 

The solution pointed out to bhanu.kassel@gmail.com‌ is for AN12435.pdf .

Could you please give more information on the same ?

Regards,

Kruthik 

0 Kudos

1,787 Views
bhanu_kassel
Contributor II

Hi,

I didn't understand your view. Can you explain in more detail?  

0 Kudos