cancel
Showing results for 
Search instead for 
Did you mean: 

Doing 6-step using FOC algorithm

Quentin Ch
Associate III

Hello,

I've generated a functional FOC project, with speed encoder. I also have Hall sensors wired (only used for my 6-step mode).

I'd like to implement a basic 6-step control mode in this project.

The FOC code allows me to set (eg. during the encoder alignment phase, hacking it) the IqdRef values.

I thought that I could control the orientation of the magnetic field to place it in each of the six sectors like so:

switch (sector_step) {
    case 1: 
      IqdRef.q = cos(0°) * magnitude;
      IqdRef.d = sin(0°) * magnitude;
    break;
    
  case 2: 
      IqdRef.q = cos(60°) * magnitude;
      IqdRef.d = sin(60°) * magnitude;
    break;
    
  case 3: 
      IqdRef.q = cos(120°) * magnitude;
      IqdRef.d = sin(120°) * magnitude;
    break;
 
And so on...

But this does not behaves as expected (weak torque, torque weaker in one direction... despite correct Hall alignment and position confirmed on oscilloscope).

Is this logic correct ?

Can I do basic 6-step control like this by controlling the IqdRef currents ?

1 REPLY 1
Zied b.
ST Employee

hello @Quentin Ch ,
Hello, we already offer in our MCSDK a solution that works with 6-step, trying to do 6-step with a Foc algo does not seem relevant to me. If you need help using our 6 step algo, don't hesitate to look at the MCSDK documentation or ask a new question on the forum. 
regards

If you agree with my answer, please accept it by clicking on "Accept as solution".