* Z:\home\khalils\Downloads\files\data\raw_asc\ef4bcf3f1aff_VSI_PMSM.asc
* Generated by LTspice 26.0.1 for Windows.
* Leg A
* A
* Leg B
* B
* Leg C
* C
* Three Phase Inverter for PMSM motor
S1 A N001 N003 N008 SW
R2 B N023 2
R3 C N025 2
E4 N014 N018 N013 0 1
V1 N001 0 314
V3 N024 N022 SINE(0 75 {f1} 0 0 120)
VctrA VctrA 0 SINE({Vtri/2} {Vctr} {f1} 0 0 0)
E2 N012 N017 N011 0 1
VctrC VctrC 0 SINE({Vtri/2} {Vctr} {f1} 0 0 -120)
B2 N011 0 V= if(V(VctrA)<V(tri),1,0)
VctrB VctrB 0 SINE({Vtri/2} {Vctr} {f1} 0 0 120)
B1 N002 0 V= if(V(VctrA)>=V(tri),1,0)
V5 tri 0 PULSE(0 {Vtri} 0 {1/(2*Fs)} {1/(2*Fs)} 0 {1/Fs})
L1 N020 N021 10m
E5 N007 N010 N006 0 1
S3 B N001 N005 N009 SW
B3 N004 0 V= if(V(VctrB)>=V(tri),1,0)
E3 N005 N009 N004 0 1
V2 N021 N022 SINE(0 75 {f1} 0 0 0)
S4 0 B N014 N018 SW
B4 N013 0 V= if(V(VctrB)<V(tri),1,0)
V4 N026 N022 SINE(0 75 {f1} 0 0 -120)
L3 N025 N026 10m
S5 C N001 N007 N010 SW
E1 N003 N008 N002 0 1
B6 N015 0 V= if(V(VctrC)<V(tri),1,0)
S6 0 C N016 N019 SW
B5 N006 0 V= if(V(VctrC)>=V(tri),1,0)
R1 A N020 2
S2 0 A N012 N017 SW
E6 N016 N019 N015 0 1
L2 N023 N024 10m
.param f1=50
.param Fs= 1k
.param Vtri=1
.param ma=0.95
.param Vctr= 0.5*Vtri*ma
.model SW SW(Ron=10m, Roff=10Meg, Vt=0.1)
.tran 0 100m 41m
.four {f1} I(L1)
.backanno
.end

* LTspice schematic (.asc):
Version 4.1
SHEET 1 2196 1076
WIRE -16 256 -48 256
WIRE 848 256 352 256
WIRE 1408 256 848 256
WIRE 1984 256 1408 256
WIRE -48 288 -48 256
WIRE 672 320 592 320
WIRE 800 320 720 320
WIRE 848 320 848 256
WIRE 1232 320 1152 320
WIRE 1360 320 1280 320
WIRE 1408 320 1408 256
WIRE 1808 320 1728 320
WIRE 1936 320 1856 320
WIRE 1984 320 1984 256
WIRE 672 336 672 320
WIRE 800 336 800 320
WIRE 1232 336 1232 320
WIRE 1360 336 1360 320
WIRE 1808 336 1808 320
WIRE 1936 336 1936 320
WIRE 352 368 352 336
WIRE -48 384 -48 368
WIRE 672 400 672 384
WIRE 672 400 592 400
WIRE 800 400 800 384
WIRE 800 400 720 400
WIRE 1232 400 1232 384
WIRE 1232 400 1152 400
WIRE 1360 400 1360 384
WIRE 1360 400 1280 400
WIRE 1808 400 1808 384
WIRE 1808 400 1728 400
WIRE 1936 400 1936 384
WIRE 1936 400 1856 400
WIRE -16 416 -48 416
WIRE 592 416 592 400
WIRE 1152 416 1152 400
WIRE 1728 416 1728 400
WIRE -48 448 -48 416
WIRE 848 448 848 400
WIRE 960 448 848 448
WIRE 1408 448 1408 400
WIRE 1536 448 1408 448
WIRE 1984 448 1984 400
WIRE 2112 448 1984 448
WIRE 672 496 592 496
WIRE 800 496 720 496
WIRE 848 496 848 448
WIRE 1232 496 1152 496
WIRE 1360 496 1280 496
WIRE 1408 496 1408 448
WIRE 1808 496 1728 496
WIRE 1936 496 1856 496
WIRE 1984 496 1984 448
WIRE 672 512 672 496
WIRE 800 512 800 496
WIRE 1232 512 1232 496
WIRE 1360 512 1360 496
WIRE 1808 512 1808 496
WIRE 1936 512 1936 496
WIRE -48 544 -48 528
WIRE -16 576 -48 576
WIRE 672 576 672 560
WIRE 672 576 592 576
WIRE 800 576 800 560
WIRE 800 576 720 576
WIRE 1232 576 1232 560
WIRE 1232 576 1152 576
WIRE 1360 576 1360 560
WIRE 1360 576 1280 576
WIRE 1808 576 1808 560
WIRE 1808 576 1728 576
WIRE 1936 576 1936 560
WIRE 1936 576 1856 576
WIRE 592 592 592 576
WIRE 1152 592 1152 576
WIRE 1728 592 1728 576
WIRE -48 608 -48 576
WIRE 848 608 848 576
WIRE 1408 608 1408 576
WIRE 1984 608 1984 576
WIRE -48 704 -48 688
WIRE 864 720 832 720
WIRE 1040 720 944 720
WIRE 1184 720 1120 720
WIRE 1408 720 1264 720
WIRE 1584 768 1568 768
WIRE 1568 800 1568 768
WIRE 864 848 832 848
WIRE 1040 848 944 848
WIRE 1184 848 1120 848
WIRE 1408 848 1408 720
WIRE 1408 848 1264 848
WIRE 1568 896 1568 880
WIRE 864 976 832 976
WIRE 1040 976 944 976
WIRE 1184 976 1120 976
WIRE 1408 976 1408 848
WIRE 1408 976 1264 976
RECTANGLE Normal 944 640 432 272 1
RECTANGLE Normal 1504 640 992 272 1
RECTANGLE Normal 2080 640 1568 272 1
RECTANGLE Normal 2192 1072 -112 112 3
SYMBOL voltage 1168 976 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 -32 56 VBottom 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V4
SYMATTR Value SINE(0 75 {f1} 0 0 -120)
SYMBOL voltage 1168 848 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 -32 56 VBottom 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V3
SYMATTR Value SINE(0 75 {f1} 0 0 120)
SYMBOL sw 1408 416 M180
SYMATTR InstName S3
SYMBOL e 1280 480 R0
SYMATTR InstName E4
SYMATTR Value 1
SYMBOL bv 1728 304 R0
WINDOW 3 -125 145 Left 2
SYMATTR InstName B5
SYMATTR Value V= if(V(VctrC)>=V(tri),1,0)
SYMBOL voltage -48 432 R0
WINDOW 0 36 57 Left 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName VctrB
SYMATTR Value SINE({Vtri/2} {Vctr} {f1} 0 0 120)
SYMBOL ind 1024 736 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 5 56 VBottom 2
SYMATTR InstName L1
SYMATTR Value 10m
SYMBOL e 720 304 R0
SYMATTR InstName E1
SYMATTR Value 1
SYMBOL res 848 736 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName R1
SYMATTR Value 2
SYMBOL sw 1408 592 M180
SYMATTR InstName S4
SYMBOL bv 592 480 R0
WINDOW 3 -125 145 Left 2
SYMATTR InstName B2
SYMATTR Value V= if(V(VctrA)<V(tri),1,0)
SYMBOL ind 1024 864 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 5 56 VBottom 2
SYMATTR InstName L2
SYMATTR Value 10m
SYMBOL voltage -48 592 R0
WINDOW 0 36 61 Left 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName VctrC
SYMATTR Value SINE({Vtri/2} {Vctr} {f1} 0 0 -120)
SYMBOL res 848 992 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName R3
SYMATTR Value 2
SYMBOL e 1280 304 R0
SYMATTR InstName E3
SYMATTR Value 1
SYMBOL e 720 480 R0
SYMATTR InstName E2
SYMATTR Value 1
SYMBOL bv 592 304 R0
WINDOW 3 -125 145 Left 2
SYMATTR InstName B1
SYMATTR Value V= if(V(VctrA)>=V(tri),1,0)
SYMBOL voltage 352 240 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 314
SYMBOL bv 1152 304 R0
WINDOW 3 -125 145 Left 2
SYMATTR InstName B3
SYMATTR Value V= if(V(VctrB)>=V(tri),1,0)
SYMBOL bv 1728 480 R0
WINDOW 3 -125 145 Left 2
SYMATTR InstName B6
SYMATTR Value V= if(V(VctrC)<V(tri),1,0)
SYMBOL voltage 1168 720 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 -32 56 VBottom 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V2
SYMATTR Value SINE(0 75 {f1} 0 0 0)
SYMBOL e 1856 480 R0
SYMATTR InstName E6
SYMATTR Value 1
SYMBOL voltage -48 272 R0
WINDOW 0 36 55 Left 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName VctrA
SYMATTR Value SINE({Vtri/2} {Vctr} {f1} 0 0 0)
SYMBOL sw 1984 416 M180
SYMATTR InstName S5
SYMBOL e 1856 304 R0
SYMATTR InstName E5
SYMATTR Value 1
SYMBOL ind 1024 992 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 5 56 VBottom 2
SYMATTR InstName L3
SYMATTR Value 10m
SYMBOL sw 848 592 M180
SYMATTR InstName S2
SYMBOL sw 1984 592 M180
SYMATTR InstName S6
SYMBOL bv 1152 480 R0
WINDOW 3 -125 145 Left 2
SYMATTR InstName B4
SYMATTR Value V= if(V(VctrB)<V(tri),1,0)
SYMBOL sw 848 416 M180
SYMATTR InstName S1
SYMBOL res 848 864 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName R2
SYMATTR Value 2
SYMBOL voltage 1568 784 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V5
SYMATTR Value PULSE(0 {Vtri} 0 {1/(2*Fs)} {1/(2*Fs)} 0 {1/Fs})
FLAG -48 384 0
FLAG -48 544 0
FLAG -48 704 0
FLAG -16 256 VctrA
FLAG -16 416 VctrB
FLAG -16 576 VctrC
FLAG 352 368 0
FLAG 848 608 0
FLAG 1408 608 0
FLAG 1984 608 0
FLAG 1536 448 B
FLAG 2112 448 C
FLAG 832 848 B
FLAG 832 976 C
FLAG 1584 768 tri
FLAG 1568 896 0
FLAG 592 416 0
FLAG 592 592 0
FLAG 1152 416 0
FLAG 1152 592 0
FLAG 1728 416 0
FLAG 1728 592 0
FLAG 960 448 A
FLAG 832 720 A
TEXT -56 784 Left 2 !.param f1=50\n.param Fs= 1k\n.param Vtri=1\n.param ma=0.95\n.param Vctr= 0.5*Vtri*ma
TEXT -56 760 Left 2 !.model SW SW(Ron=10m, Roff=10Meg, Vt=0.1)
TEXT 656 296 Left 2 ;Leg A
TEXT 872 432 Left 2 ;A
TEXT 1216 296 Left 2 ;Leg B
TEXT 1432 432 Left 2 ;B
TEXT 1792 296 Left 2 ;Leg C
TEXT 2008 432 Left 2 ;C
TEXT -56 928 Left 2 !.tran 0 100m 41m
TEXT 376 152 Left 5 ;Three Phase Inverter for PMSM motor
TEXT -56 952 Left 2 !.four {f1}   I(L1)