* SPICE netlist
V_DC NC_01 NC_02 PWL file=Rectifier_Single_Phase.txt
M1 N005 V_G1 HB+ HB+ IXTH88N30P
M3 N005 V_G3 HB- HB- IXTH88N30P
V1 V_G2 0 PULSE(0 10 0.02866m 1p 1p 0.02134m 0.05m)
V2 V_G1 HB+ PULSE(0 10 0 1p 1p 0.02866m 0.05m)
V3 V_G4 0 10
V4 V_G3 HB- 0
V_sense_1 N007 HB- 0
V_sense_2 N006 N008 0
LMotor_inductance HB+ N002 {L_motor}
LInertia_constant N001 N003 {L_inertia}
RMotor_resistance N002 N004 {R_motor}
RFriction N003 N006 {R_loss}
BV_torque N001 N008 V=I(V_sense_1)*K_t
Back_emf N004 N007 V=I(V_sense_2)*K_emf
V5 N005 0 320
M2 HB+ V_G2 0 0 IXTH88N30P
M4 HB- V_G4 0 0 IXTH88N30P
.tran 0 56m 0 0.01m
.PARAM K_t=0.2
.PARAM K_emf = 0.25
.PARAM L_motor = 1000u
.PARAM R_motor =1.2
.PARAM R_loss = 0.1m
.PARAM L_inertia = 20u

* LTspice schematic (.asc)
Version 4
SHEET 1 2672 928
WIRE -1016 -464 -1048 -464
WIRE -904 -464 -936 -464
WIRE -584 -464 -616 -464
WIRE -472 -464 -504 -464
WIRE 1336 -368 920 -368
WIRE 552 -336 552 -384
WIRE 920 -336 920 -368
WIRE 1336 -320 1336 -368
WIRE -1016 -304 -1048 -304
WIRE -904 -304 -936 -304
WIRE -584 -304 -616 -304
WIRE -472 -304 -504 -304
WIRE 552 -208 552 -256
WIRE 1336 -144 1336 -240
WIRE 552 -48 552 -128
WIRE -840 -16 -1160 -16
WIRE -424 -16 -840 -16
WIRE -840 16 -840 -16
WIRE -424 16 -424 -16
WIRE 1336 64 1336 -64
WIRE 552 144 552 32
WIRE -840 160 -840 112
WIRE -840 160 -856 160
WIRE -424 160 -424 112
WIRE -424 160 -440 160
WIRE -1160 176 -1160 -16
WIRE -840 208 -840 160
WIRE -712 208 -840 208
WIRE -424 208 -424 160
WIRE -424 208 -552 208
WIRE 552 240 552 224
WIRE 920 240 920 -256
WIRE 1336 240 1336 144
WIRE 1336 240 920 240
WIRE -840 304 -840 208
WIRE -424 304 -424 208
WIRE -840 416 -840 400
WIRE -840 416 -856 416
WIRE -424 416 -424 400
WIRE -424 416 -440 416
WIRE -1160 432 -1160 256
WIRE -840 432 -840 416
WIRE -840 432 -1160 432
WIRE -424 432 -424 416
WIRE -424 432 -840 432
WIRE -1160 464 -1160 432
FLAG -1160 464 0
FLAG -888 96 V_G1
IOPIN 496 -32 In
FLAG -888 384 V_G2
IOPIN 496 256 In
FLAG -472 96 V_G3
IOPIN 912 -32 In
FLAG -472 384 V_G4
IOPIN 912 256 In
FLAG -440 160 V_S3
IOPIN 944 32 In
FLAG -856 160 V_S1
IOPIN 528 32 In
FLAG -856 416 V_S2
IOPIN 528 288 In
FLAG -440 416 V_S4
IOPIN 944 288 In
FLAG -472 -464 V_G1
IOPIN 912 -592 Out
FLAG -616 -464 V_S1
IOPIN 768 -592 Out
FLAG -472 -304 V_G2
IOPIN 912 -432 Out
FLAG -616 -304 V_S2
IOPIN 768 -432 Out
FLAG -904 -464 V_G3
IOPIN 480 -592 Out
FLAG -1048 -464 V_S3
IOPIN 336 -592 Out
FLAG -904 -304 V_G4
IOPIN 480 -432 Out
FLAG -1048 -304 V_S4
IOPIN 336 -432 Out
FLAG 552 -384 HB+
IOPIN 1936 -512 In
FLAG -712 208 HB+
IOPIN 672 80 Out
FLAG -552 208 HB-
IOPIN 832 80 Out
FLAG 552 240 HB-
IOPIN 1936 112 In
SYMBOL voltage -1336 192 R0
SYMATTR Value PWL file=Rectifier_Single_Phase.txt
SYMATTR InstName V_DC
SYMBOL nmos -888 16 R0
SYMATTR InstName M1
SYMATTR Value IXTH88N30P
SYMBOL nmos -472 16 R0
SYMATTR InstName M3
SYMATTR Value IXTH88N30P
SYMBOL voltage -488 -304 R90
SYMATTR InstName V1
SYMATTR Value PULSE(0 10 0.02866m 1p 1p 0.02134m 0.05m)
SYMBOL voltage -488 -464 R90
SYMATTR InstName V2
SYMATTR Value PULSE(0 10 0 1p 1p 0.02866m 0.05m)
SYMBOL voltage -920 -304 R90
SYMATTR InstName V3
SYMATTR Value 10
SYMBOL voltage -920 -464 R90
SYMATTR InstName V4
SYMATTR Value 0
SYMBOL voltage 552 128 R0
SYMATTR InstName V_sense_1
SYMATTR Value 0
SYMBOL voltage 1336 48 R0
SYMATTR InstName V_sense_2
SYMATTR Value 0
SYMBOL ind 536 -352 R0
SYMATTR InstName Motor_inductance
SYMATTR Value {L_motor}
SYMBOL ind 1320 -336 R0
SYMATTR InstName Inertia_constant
SYMATTR Value {L_inertia}
SYMBOL res 536 -224 R0
SYMATTR InstName Motor_resistance
SYMATTR Value {R_motor}
SYMBOL res 1320 -160 R0
SYMATTR InstName Friction
SYMATTR Value {R_loss}
SYMBOL bv 920 -352 R0
SYMATTR InstName V_torque
SYMATTR Value V=I(V_sense_1)*K_t
SYMBOL bv 552 -64 R0
SYMATTR InstName Back_emf
SYMATTR Value V=I(V_sense_2)*K_emf
SYMBOL voltage -1160 160 R0
SYMATTR InstName V5
SYMATTR Value 320
SYMBOL nmos -888 304 R0
SYMATTR InstName M2
SYMATTR Value IXTH88N30P
SYMBOL nmos -472 304 R0
SYMATTR InstName M4
SYMATTR Value IXTH88N30P