### Re: code to change the motor amp limit

Posted:

**04 Jul 2017, 09:05**rew wrote:A full sine cycle is 2*pi. So a third of that is 2/3 PI

Phase A is energized with the voltage: Va = Vs * sin (f * t + 0*2/3PI);

Phase B is energized with the voltage: Vb = Vs * sin (f * t + 1*2/3PI);

Phase C is energized with the voltage: Vc = Vs * sin (f * t + 2*2/3PI);

here Vs is the "duty cycle" dependent voltage scale. and f is the RPM (in the proper units).

Now the question is: what does it mean that a phase is energized with a voltage: We can only drive either to V+ or to V-?

Well, when the target voltage is 0, we alternate the highside and the lowside switch in a 50/50 fashion. 50% PWM. So now by varying the PWM percentage we can apply (effective) voltages anywhere between -Vbat/2 to +Vbat/2.

@rew For arguments sake, let's imagine in the following diagram showing a wye-wound motor that at a particular time mosfets D, B & C are ON leading to voltage across all 3 wye phases simultaneously:

Now we swap out the wye-wound motor for a delta-wound motor:

^Now, with the delta motor, even though mosfets D, B & C are ON, now there is no voltage across one of the 3 phases (bottom phase).

So @rew, please correct me if I am wrong, but by extension of logic you are basically saying that in BLDC mode 2/3rds Wye phases and 3/3rds Delta phases become energized simultaneously, but when in FOC mode, 3/3rds Wye phases and 2/3rds Delta phases become energized simultaneously.

@Rew can you please confirm that in FOC mode, only 2/3rds of the phases in a delta-wound motor become simultaneously energized, as opposed to in BLDC mode when all 3/3rds of the phases in a delta-wound motor become simultaneously energized?

---------------------------

Where:

Red Area = Phase "A" -- Energized

Green Area = Phase "B" -- Energized

Blue Area = Phase "C" -- Energized

Black Line = 12 Pole Wye Stator Magnetic Field Vectors w/ 3 Energized Phases

White Line = 14 Pole Rotor Magnetic Field Vectors

---------------------------

Where:

Red Area = Phase "A" -- Energized

Green Area = Phase "B" -- Energized

Blue Area = Phase "C" -- Not Energized

Black Line = 12 Pole Wye Stator Magnetic Field Vectors w/ 2 Energized Phases

White Line = 14 Pole Rotor Magnetic Field Vectors