INVCTRL

Control for the Brushless DC/AC machine
Parameters(1) p1
Default p1=0,
Select from Components/Blocks/Machines
Function Use this block to control the inverter for the Brushless machine. The first input A is the amplitude of the gate signal. The second input Angle indicates the position for the switches. The third input Advance is added to the second input Angle.
The parameter p1 determines wether the gate signals are rectangular or sinusoid.

g1:=A*sin(Angle+Advance);g2:=A*sin(Angle+Advance-(2*PI/3));g3:=A*sin(Angle+Advance-(4*PI/3));if(p1=0)then  begin  if(g1 < 0) then g1:=A else g1:=-A;  if(g2 < 0) then g2:=A else g2:=-A;  if(g3 < 0) then g3:=A else g3:=-A;  end;
The output is the first gate signal g1. The remaining gate signals are given by using a INT_VAR block as indicated in the table below.
Use an INT_VAR block to get the gate signals and position of the rotor:

 INT_VAR Output p1=1 g2 p1=2 g3 p1=3 -g1 p1=4 -g2 p1=5 -g3 p1=6 Rotor position polar x-coordinate p1=7 Rotor position polar y-coordinate

p1=0 Rectangular gate signals
p1=1 Sinusoid gate signals
Special You can use the block BLDCM for modeling the Brushless machine