* Z:\home\khalils\Downloads\files\data\raw_asc\9b275f7a2a27_3phase_inverter.asc
* Generated by LTspice 26.0.1 for Windows.
* LEG A
* LEG B
* LEG C
* THREE PHASE INVERTER FOR PMSM MOTOR
B3 N004 0 V=if(V(VctrB)>=V(tri),1,0)
L1 N021 N020 10m
S6 0 C N016 N019 SW
V1 VctrA 0 SINE({Vtri/2} {Vctr} {f1} 0 0 0)
E4 N014 N018 N013 0 1
E6 N016 N019 N015 0 1
V2 VctrB 0 SINE({Vtri/2} {Vctr} {f1} 0 0 120)
V4 N001 0 314
L2 N024 N023 10m
S4 0 B N014 N018 SW
B2 N011 0 V=if(V(VctrA)<V(tri),1,0)
E2 N012 N017 N011 0 1
R2 N023 B 2
E3 N005 N009 N004 0 1
B5 N006 0 V=if(V(VctrC)>=V(tri),1,0)
B6 N015 0 V=if(V(VctrC)<V(tri),1,0)
R3 N025 C 2
V5 N021 N022 SINE(0 75 {f1} 0 0 0)
B4 N013 0 V=if(V(VctrB)<V(tri),1,0)
S2 0 A N012 N017 SW
E1 N003 N008 N002 0 1
S5 C N001 N007 N010 SW
B1 N002 0 V=if(V(VctrA)>=V(tri),1,0)
S1 A N001 N003 N008 SW
V3 VctrC 0 SINE({Vtri/2} {Vctr} {f1} 0 0 -120)
S3 B N001 N005 N009 SW
V8 tri 0 PULSE(0 {Vtri} 0 {1/(2*Fs)} {1/(2*Fs)} 0 {1/Fs})
V6 N024 N022 SINE(0 75 {f1} 0 0 120)
R1 N020 A 2
L3 N026 N025 10m
E5 N007 N010 N006 0 1
V7 N026 N022 SINE(0 75 {f1} 0 0 -120)
.param f1=50
.param Fs=1k
.param Vtri=1
.param ma=0.95
.param Vctr=0.5*ma*Vtri
.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
SHEET 1 2304 1072
WIRE 928 80 384 80
WIRE 1408 80 928 80
WIRE 1888 80 1408 80
WIRE 384 128 384 80
WIRE 16 176 0 176
WIRE 720 176 592 176
WIRE 880 176 768 176
WIRE 1200 176 1072 176
WIRE 1360 176 1248 176
WIRE 1680 176 1552 176
WIRE 1840 176 1728 176
WIRE 0 208 0 176
WIRE 592 208 592 176
WIRE 768 208 768 176
WIRE 928 208 928 80
WIRE 1072 208 1072 176
WIRE 1248 208 1248 176
WIRE 1408 208 1408 80
WIRE 1552 208 1552 176
WIRE 1728 208 1728 176
WIRE 1888 208 1888 80
WIRE 384 224 384 208
WIRE 720 224 720 176
WIRE 880 224 880 176
WIRE 1200 224 1200 176
WIRE 1360 224 1360 176
WIRE 1680 224 1680 176
WIRE 1840 224 1840 176
WIRE 592 304 592 288
WIRE 720 304 720 272
WIRE 720 304 592 304
WIRE 1072 304 1072 288
WIRE 1200 304 1200 272
WIRE 1200 304 1072 304
WIRE 1552 304 1552 288
WIRE 1680 304 1680 272
WIRE 1680 304 1552 304
WIRE 16 320 0 320
WIRE 592 320 592 304
WIRE 768 320 768 288
WIRE 880 320 880 272
WIRE 880 320 768 320
WIRE 1072 320 1072 304
WIRE 1248 320 1248 288
WIRE 1360 320 1360 272
WIRE 1360 320 1248 320
WIRE 1552 320 1552 304
WIRE 1728 320 1728 288
WIRE 1840 320 1840 272
WIRE 1840 320 1728 320
WIRE 0 352 0 320
WIRE 928 368 928 288
WIRE 960 368 928 368
WIRE 1408 368 1408 288
WIRE 1440 368 1408 368
WIRE 1888 368 1888 288
WIRE 2000 368 1888 368
WIRE 720 432 592 432
WIRE 880 432 768 432
WIRE 1200 432 1072 432
WIRE 1360 432 1248 432
WIRE 1680 432 1552 432
WIRE 1840 432 1728 432
WIRE 0 464 -16 464
WIRE 592 464 592 432
WIRE 768 464 768 432
WIRE 928 464 928 368
WIRE 1072 464 1072 432
WIRE 1248 464 1248 432
WIRE 1408 464 1408 368
WIRE 1552 464 1552 432
WIRE 1728 464 1728 432
WIRE 1888 464 1888 368
WIRE 720 480 720 432
WIRE 880 480 880 432
WIRE 1200 480 1200 432
WIRE 1360 480 1360 432
WIRE 1680 480 1680 432
WIRE 1840 480 1840 432
WIRE -16 496 -16 464
WIRE 592 560 592 544
WIRE 720 560 720 528
WIRE 720 560 592 560
WIRE 1072 560 1072 544
WIRE 1200 560 1200 528
WIRE 1200 560 1072 560
WIRE 1552 560 1552 544
WIRE 1680 560 1680 528
WIRE 1680 560 1552 560
WIRE 592 576 592 560
WIRE 768 576 768 544
WIRE 880 576 880 528
WIRE 880 576 768 576
WIRE 1072 576 1072 560
WIRE 1248 576 1248 544
WIRE 1360 576 1360 528
WIRE 1360 576 1248 576
WIRE 1552 576 1552 560
WIRE 1728 576 1728 544
WIRE 1840 576 1840 528
WIRE 1840 576 1728 576
WIRE 928 672 928 544
WIRE 1408 672 1408 544
WIRE 1888 672 1888 544
WIRE 624 704 576 704
WIRE 752 704 704 704
WIRE 1024 704 832 704
WIRE 1200 704 1104 704
WIRE 1360 752 1360 720
WIRE 624 784 576 784
WIRE 752 784 704 784
WIRE 1024 784 832 784
WIRE 1200 784 1200 704
WIRE 1200 784 1104 784
WIRE 640 864 592 864
WIRE 768 864 720 864
WIRE 1040 864 848 864
WIRE 1200 864 1200 784
WIRE 1200 864 1120 864
WIRE 1360 864 1360 832
RECTANGLE Normal 992 656 512 96 1
RECTANGLE Normal 1504 656 1024 96 1
RECTANGLE Normal 1952 656 1520 96 1
SYMBOL voltage 1008 704 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 44 225 VBottom 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V5
SYMATTR Value SINE(0 75 {f1} 0 0 0)
SYMBOL sw 1888 560 M180
SYMATTR InstName S6
SYMBOL bv 1552 192 R0
WINDOW 3 -168 151 Invisible 2
SYMATTR InstName B5
SYMATTR Value V=if(V(VctrC)>=V(tri),1,0)
SYMBOL sw 1408 304 M180
SYMATTR InstName S3
SYMBOL res 720 768 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R2
SYMATTR Value 2
SYMBOL e 1728 192 R0
SYMATTR InstName E5
SYMATTR Value 1
SYMBOL sw 928 560 M180
SYMATTR InstName S2
SYMBOL bv 592 192 R0
WINDOW 3 -168 151 Left 2
SYMATTR InstName B1
SYMATTR Value V=if(V(VctrA)>=V(tri),1,0)
SYMBOL ind 864 848 R90
WINDOW 0 5 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName L3
SYMATTR Value 10m
SYMBOL voltage 0 192 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value SINE({Vtri/2} {Vctr} {f1} 0 0 0)
SYMBOL res 720 688 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R1
SYMATTR Value 2
SYMBOL e 1248 448 R0
SYMATTR InstName E4
SYMATTR Value 1
SYMBOL voltage 1360 736 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V8
SYMATTR Value PULSE(0 {Vtri} 0 {1/(2*Fs)} {1/(2*Fs)} 0 {1/Fs})
SYMBOL e 768 192 R0
SYMATTR InstName E1
SYMATTR Value 1
SYMBOL res 736 848 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R3
SYMATTR Value 2
SYMBOL ind 848 768 R90
WINDOW 0 5 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName L2
SYMATTR Value 10m
SYMBOL ind 848 688 R90
WINDOW 0 5 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName L1
SYMATTR Value 10m
SYMBOL sw 928 304 M180
SYMATTR InstName S1
SYMBOL voltage -16 480 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V3
SYMATTR Value SINE({Vtri/2} {Vctr} {f1} 0 0 -120)
SYMBOL e 1728 448 R0
SYMATTR InstName E6
SYMATTR Value 1
SYMBOL bv 592 448 R0
WINDOW 3 -168 151 Left 2
SYMATTR InstName B2
SYMATTR Value V=if(V(VctrA)<V(tri),1,0)
SYMBOL sw 1408 560 M180
SYMATTR InstName S4
SYMBOL voltage 0 336 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V2
SYMATTR Value SINE({Vtri/2} {Vctr} {f1} 0 0 120)
SYMBOL voltage 384 112 R0
SYMATTR InstName V4
SYMATTR Value 314
SYMBOL voltage 1024 864 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 -32 56 Invisible 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V7
SYMATTR Value SINE(0 75 {f1} 0 0 -120)
SYMBOL voltage 1008 784 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 -32 56 Invisible 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V6
SYMATTR Value SINE(0 75 {f1} 0 0 120)
SYMBOL e 768 448 R0
SYMATTR InstName E2
SYMATTR Value 1
SYMBOL bv 1072 448 R0
WINDOW 3 -168 151 Invisible 2
SYMATTR InstName B4
SYMATTR Value V=if(V(VctrB)<V(tri),1,0)
SYMBOL e 1248 192 R0
SYMATTR InstName E3
SYMATTR Value 1
SYMBOL bv 1552 448 R0
WINDOW 3 -168 151 Invisible 2
SYMATTR InstName B6
SYMATTR Value V=if(V(VctrC)<V(tri),1,0)
SYMBOL bv 1072 192 R0
WINDOW 3 -168 151 Invisible 2
SYMATTR InstName B3
SYMATTR Value V=if(V(VctrB)>=V(tri),1,0)
SYMBOL sw 1888 304 M180
SYMATTR InstName S5
FLAG 16 176 VctrA
FLAG 0 288 0
FLAG 16 320 VctrB
FLAG 0 432 0
FLAG 0 464 VctrC
FLAG -16 576 0
FLAG 592 320 0
FLAG 592 576 0
FLAG 960 368 A
FLAG 928 672 0
FLAG 1072 320 0
FLAG 1072 576 0
FLAG 1440 368 B
FLAG 1408 672 0
FLAG 1552 320 0
FLAG 1552 576 0
FLAG 2000 368 C
FLAG 1888 672 0
FLAG 384 224 0
FLAG 576 704 A
FLAG 576 784 B
FLAG 592 864 C
FLAG 1360 864 0
FLAG 1360 720 tri
TEXT -16 632 Left 2 !.param f1=50\n.param Fs=1k\n.param Vtri=1\n.param ma=0.95\n.param Vctr=0.5*ma*Vtri
TEXT -8 792 Left 2 !.model SW SW(Ron=10m, Roff=10Meg, Vt=0.1)
TEXT 712 144 Left 4 ;LEG A
TEXT 1192 144 Left 4 ;LEG B
TEXT 1672 144 Left 4 ;LEG C
TEXT 496 8 Left 5 ;THREE PHASE INVERTER FOR PMSM MOTOR
TEXT -50 926 Left 2 !.tran 0 100m 41m
TEXT 264 384 Left 2 !.four {f1}   I(L1)