Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr Modelica_trunk_Modelica.Electrical.PowerConverters.Examples.DCAC.PolyphaseTwoLevel.ThreePhaseTwoLevel_PWM.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo", uses=false) Using package Modelica with version trunk (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo) Using package Complex with version trunk (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo) Using package ModelicaServices with version trunk (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo) Running command: translateModel(Modelica.Electrical.PowerConverters.Examples.DCAC.PolyphaseTwoLevel.ThreePhaseTwoLevel_PWM,tolerance=1e-05,outputFormat="mat",numberOfIntervals=4000,variableFilter="time|filter.1..x.1.|filter.1..x.2.|filter.2..x.1.|filter.2..x.2.|harmonic.mean1.x|harmonic.mean2.x|harmonic.y_rms|harmonic.y_arg|integrator.y|potentialSensor.phi.1.|potentialSensor.phi.2.|potentialSensor.phi.3.|toPolar.y.1.|toPolar.y.2.",fileNamePrefix="Modelica_trunk_Modelica.Electrical.PowerConverters.Examples.DCAC.PolyphaseTwoLevel.ThreePhaseTwoLevel_PWM") translateModel(Modelica.Electrical.PowerConverters.Examples.DCAC.PolyphaseTwoLevel.ThreePhaseTwoLevel_PWM,tolerance=1e-05,outputFormat="mat",numberOfIntervals=4000,variableFilter="time|filter.1..x.1.|filter.1..x.2.|filter.2..x.1.|filter.2..x.2.|harmonic.mean1.x|harmonic.mean2.x|harmonic.y_rms|harmonic.y_arg|integrator.y|potentialSensor.phi.1.|potentialSensor.phi.2.|potentialSensor.phi.3.|toPolar.y.1.|toPolar.y.2.",fileNamePrefix="Modelica_trunk_Modelica.Electrical.PowerConverters.Examples.DCAC.PolyphaseTwoLevel.ThreePhaseTwoLevel_PWM") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo): time 0.001167/0.001168, allocations: 113.2 kB / 18.41 MB, free: 4.777 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo): time 0.00129/0.00129, allocations: 212.6 kB / 19.36 MB, free: 3.832 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo): time 1.236/1.236, allocations: 227.4 MB / 247.5 MB, free: 10.41 MB / 206.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 2.238e-05/2.245e-05, allocations: 2.281 kB / 308.3 MB, free: 15.96 MB / 254.1 MB Notification: Performance of NFInst.instantiate(Modelica.Electrical.PowerConverters.Examples.DCAC.PolyphaseTwoLevel.ThreePhaseTwoLevel_PWM): time 0.007/0.007035, allocations: 6.128 MB / 314.4 MB, free: 9.816 MB / 254.1 MB Notification: Performance of NFInst.instExpressions: time 0.007186/0.01425, allocations: 4.688 MB / 319.1 MB, free: 5.113 MB / 254.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0009113/0.01519, allocations: 39.75 kB / 319.2 MB, free: 5.074 MB / 254.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0006635/0.01586, allocations: 285.8 kB / 319.5 MB, free: 4.793 MB / 254.1 MB Notification: Performance of NFTyping.typeBindings: time 0.001062/0.01693, allocations: 473.3 kB / 319.9 MB, free: 4.328 MB / 254.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0035/0.02044, allocations: 1.812 MB / 321.7 MB, free: 2.523 MB / 254.1 MB Notification: Performance of NFFlatten.flatten: time 0.002712/0.02317, allocations: 2.87 MB / 324.6 MB, free: 15.65 MB / 270.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.001042/0.02422, allocations: 0.9202 MB / 325.5 MB, free: 14.7 MB / 270.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.001167/0.0254, allocations: 0.9974 MB / 326.5 MB, free: 13.7 MB / 270.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0009499/0.02636, allocations: 0.9149 MB / 327.4 MB, free: 12.78 MB / 270.1 MB Notification: Performance of NFPackage.collectConstants: time 0.0001904/0.02656, allocations: 160 kB / 327.6 MB, free: 12.62 MB / 270.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0004769/0.02704, allocations: 315.7 kB / 327.9 MB, free: 12.32 MB / 270.1 MB Notification: Performance of combineBinaries: time 0.001597/0.02865, allocations: 2.202 MB / 330.1 MB, free: 10.09 MB / 270.1 MB Notification: Performance of replaceArrayConstructors: time 0.0008814/0.02954, allocations: 1.366 MB / 331.5 MB, free: 8.711 MB / 270.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0002326/0.02978, allocations: 207.4 kB / 331.7 MB, free: 8.508 MB / 270.1 MB Notification: Performance of FrontEnd: time 0.0001825/0.02997, allocations: 51.73 kB / 331.7 MB, free: 8.457 MB / 270.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 402 (212) * Number of variables: 402 (184) Notification: Performance of Bindings: time 0.00704/0.03702, allocations: 6.744 MB / 338.5 MB, free: 1.535 MB / 270.1 MB Notification: Performance of FunctionAlias: time 0.0005578/0.03759, allocations: 446.1 kB / 338.9 MB, free: 1.102 MB / 270.1 MB Notification: Performance of Early Inline: time 0.004112/0.04171, allocations: 4.2 MB / 343.1 MB, free: 12.86 MB / 286.1 MB Notification: Performance of simplify1: time 0.0002126/0.04194, allocations: 167.8 kB / 343.3 MB, free: 12.7 MB / 286.1 MB Notification: Performance of Alias: time 0.003679/0.04563, allocations: 3.368 MB / 346.6 MB, free: 9.094 MB / 286.1 MB Notification: Performance of simplify2: time 0.0001751/0.04581, allocations: 147.8 kB / 346.8 MB, free: 8.949 MB / 286.1 MB Notification: Performance of Events: time 0.0008399/0.04666, allocations: 0.7497 MB / 347.5 MB, free: 8.207 MB / 286.1 MB Notification: Performance of Detect States: time 0.001086/0.04776, allocations: 1.161 MB / 348.7 MB, free: 7.027 MB / 286.1 MB Notification: Performance of Partitioning: time 0.001526/0.04929, allocations: 1.485 MB / 350.2 MB, free: 5.445 MB / 286.1 MB Error: Internal error NBSlice.fillDependencyArray failed because number of flattened indices 3 for dependency toSpacePhasor.u could not be devided by the body size 2 without rest. Error: Internal error NBAdjacency.Matrix.createPseudo failed for: [ARRY] (2) toSpacePhasor.y = toSpacePhasor.TransformationMatrix * toSpacePhasor.u ($RES_SIM_37) Error: Internal error NBAdjacency.Matrix.create failed to create adjacency matrix for system: System Variables (171/397) **************************** (1) [DISC] (3) Boolean[3] $SEV_6[$i1] (2) [ALGB] (3) flow Real[3] potentialSensor.plug_p.pin.i (3) [DISC] (1) protected discrete Real pwm.svPWM.ta (fixed = true, start = 0.0) (4) [DISC] (1) protected discrete Real pwm.svPWM.tb (fixed = true, start = 0.0) (5) [DISC] (1) Boolean $TEV_9 (6) [DISC] (1) Boolean $TEV_8 (7) [DISC] (1) Boolean $TEV_7 (8) [DISC] (1) Boolean $TEV_6 (9) [DISC] (1) Boolean $TEV_5 (10) [DISC] (1) Boolean $TEV_4 (11) [ALGB] (1) Real multiPhase2Level.iDC = multiPhase2Level.iDC (12) [ALGB] (3) flow Real[3] multiPhase2Level.transistor_n.idealGTOThyristor.n.i (13) [DISC] (3) Boolean[3] multiPhase2Level.andCondition_p.y (14) [ALGB] (1) Real harmonic.u (15) [ALGB] (1) Real harmonic.sin2.y (16) [ALGB] (3) Real[3] multiPhase2Level.diode_n.idealDiode.LossPower (17) [DER-] (1) Real $DER.harmonic.mean2.x (18) [ALGB] (3) Real[3] multiPhase2Level.transistor_n.idealGTOThyristor.n.v (19) [DISC] (3) Boolean[3] multiPhase2Level.enableLogic.internalEnable (20) [DISC] (1) Boolean $SEV_19 (21) [DISC] (1) Boolean $SEV_18 (22) [DISC] (1) Boolean $SEV_17 (23) [ALGB] (3) Real[3] multiPhase2Level.transistor_p.i (24) [ALGB] (3) flow Real[3] potentialSensor.potentialSensor.p.i (25) [DISC] (1) Boolean $SEV_16 (26) [DISC] (1) Boolean $SEV_15 (27) [ALGB] (3) flow Real[3] multiPhase2Level.ac.pin.i (28) [DISC] (1) Boolean $SEV_14 (29) [ALGB] (1) Real harmonic.product1.y (30) [ALGB] (3) flow Real[3] multiPhase2Level.transistor_n.plug_p.pin.i (31) [ALGB] (3) flow Real[3] multiPhase2Level.transistor_p.plug_p.pin.i (32) [ALGB] (2) Real[2] harmonic.product1.u (33) [DISC] (1) protected discrete Real pwm.svPWM.phiRef (fixed = true, start = 0.0) (34) [ALGB] (3) Real[3] multiPhase2Level.transistor_p.idealGTOThyristor.p.v (35) [DISC] (3) Boolean[3] multiPhase2Level.diode_p.idealDiode.off (start = {true for $i1 in 1:3}) (36) [ALGB] (3) Real[3] multiPhase2Level.transistor_p.v (37) [ALGB] (3) Real[3] potentialSensor.potentialSensor.p.v (38) [ALGB] (1) Real cosine.y (39) [ALGB] (3) Real[3] multiPhase2Level.ac.pin.v (40) [ALGB] (3) Real[3] multiPhase2Level.transistor_n.plug_p.pin.v (41) [ALGB] (3) Real[3] multiPhase2Level.transistor_p.plug_p.pin.v (42) [ALGB] (3) flow Real[3] multiPhase2Level.transistor_p.idealGTOThyristor.p.i (43) [ALGB] (3) flow Real[3] multiPhase2Level.diode_p.idealDiode.p.i (44) [ALGB] (3) Real[3] multiPhase2Level.diode_p.plug_p.pin.v (45) [ALGB] (3) Real[3] multiPhase2Level.diode_n.plug_p.pin.v (46) [ALGB] (2) Real[2] toPolar.y (47) [ALGB] (3) Real[3] toSpacePhasor.u (48) [DISC] (3) Boolean[3] multiPhase2Level.transistor_p.idealGTOThyristor.off (start = {true for $i1 in 1:3}) (49) [ALGB] (2) Real[2] toPolar.u (50) [ALGB] (2) Real[2] toSpacePhasor.y (51) [ALGB] (3) Real[3] multiPhase2Level.diode_p.idealDiode.p.v (52) [ALGB] (3) flow Real[3] multiPhase2Level.diode_p.plug_p.pin.i (53) [ALGB] (3) flow Real[3] multiPhase2Level.diode_n.plug_p.pin.i (54) [DISC] (1) protected discrete Real pwm.svPWM.phiPos (fixed = true, start = 0.0) (55) [ALGB] (3) Real[3] multiPhase2Level.diode_p.v (56) [ALGB] (1) Real $FUN_9 (57) [ALGB] (1) Real $FUN_8 (58) [ALGB] (3) Real[3] multiPhase2Level.diode_n.idealDiode.p.v (59) [ALGB] (1) Real harmonic.sin1.y (60) [ALGB] (1) Real $FUN_3 (61) [ALGB] (1) flow Real ground.p.i (62) [ALGB] (1) Real $FUN_2 (63) [ALGB] (1) Real dcNeg.n.v (64) [ALGB] (1) Real $FUN_1 (65) [ALGB] (1) Real toSpacePhasor.zero (66) [DISC] (3) Boolean[3] multiPhase2Level.transistor_p.idealGTOThyristor.fire (67) [DISC] (3) Boolean[3] pwm.svPWM.fire_p (68) [ALGB] (3) Real[3] multiPhase2Level.diode_p.i (69) [ALGB] (3) Real[3] multiPhase2Level.vAC = multiPhase2Level.ac.pin[:].v (70) [DISC] (3) Boolean[3] pwm.svPWM.fire_n (71) [DISC] (3) Boolean[3] $SEV_13[$i1] (72) [ALGB] (3) Real[3] multiPhase2Level.transistor_n.idealGTOThyristor.LossPower (73) [ALGB] (3) flow Real[3] multiPhase2Level.diode_n.idealDiode.p.i (74) [DISC] (3) Boolean[3] $SEV_9[$i1] (75) [DISC] (1) protected discrete Real pwm.svPWM.uRef (fixed = true, start = 0.0) (76) [DISC] (3) Boolean[3] multiPhase2Level.transistor_n.idealGTOThyristor.fire (77) [ALGB] (3) Real[3] multiPhase2Level.powerAC = multiPhase2Level.vAC * multiPhase2Level.iAC (78) [DISC] (3) Boolean[3] multiPhase2Level.transistor_p.fire (79) [DISC] (3) Boolean[3] multiPhase2Level.diode_n.idealDiode.off (start = {true for $i1 in 1:3}) (80) [ALGB] (3) Real[3] multiPhase2Level.transistor_p.idealGTOThyristor.LossPower (81) [ALGB] (3) Real[3] multiPhase2Level.iAC = multiPhase2Level.ac.pin[:].i (82) [ALGB] (1) Real $FUN_14 (83) [ALGB] (1) Real $FUN_13 (84) [ALGB] (1) Real dcNeg.i (85) [ALGB] (1) Real multiPhase2Level.powerTotalAC = sum(multiPhase2Level.powerAC) (86) [ALGB] (1) Real $FUN_12 (87) [DISC] (3) Boolean[3] multiPhase2Level.fire_n (88) [ALGB] (1) Real $FUN_11 (89) [DISC] (3) Boolean[3] multiPhase2Level.transistor_n.idealGTOThyristor.off (start = {true for $i1 in 1:3}) (90) [DISC] (1) Integer $FUN_10 (91) [DISC] (3) Boolean[3] multiPhase2Level.fire_p (92) [DER-] (4) Real[2, 2] $DER.filter.x (93) [ALGB] (3) Real[3] multiPhase2Level.transistor_p.idealGTOThyristor.v (94) [ALGB] (3) protected Real[3] multiPhase2Level.transistor_p.idealGTOThyristor.s (start = {0.0 for $i1 in 1:3}) (95) [DISC] (1) Boolean $SEV_2 (96) [ALGB] (3) flow Real[3] multiPhase2Level.transistor_n.idealGTOThyristor.p.i (97) [DISC] (3) Boolean[3] multiPhase2Level.andCondition_n.y (98) [DISC] (3) Boolean[3] multiPhase2Level.andCondition_n.u2 (99) [DISC] (3) Boolean[3] multiPhase2Level.andCondition_n.u1 (100) [DISC] (3) Boolean[3] $SEV_12[$i1] (101) [DISC] (3) Boolean[3] pwm.fire_p (102) [DISC] (3) Boolean[3] pwm.fire_n (103) [ALGB] (3) Real[3] multiPhase2Level.transistor_p.idealGTOThyristor.i (104) [DISC] (3) Boolean[3] $SEV_8[$i1] (105) [ALGB] (3) Real[3] potentialSensor.potentialSensor.phi (106) [ALGB] (3) Real[3] multiPhase2Level.transistor_n.idealGTOThyristor.p.v (107) [ALGB] (1) Real sine.y (108) [ALGB] (2) Real[2] rotator.y (109) [ALGB] (3) Real[3] multiPhase2Level.diode_p.plug_n.pin.v (110) [ALGB] (3) Real[3] multiPhase2Level.diode_n.plug_n.pin.v (111) [ALGB] (3) Real[3] multiPhase2Level.transistor_p.idealGTOThyristor.n.v (112) [ALGB] (2) Real[2] rotator.u (113) [DISC] (3) Boolean[3] multiPhase2Level.enableLogic.booleanReplicator.y (114) [ALGB] (3) Real[3] multiPhase2Level.transistor_n.i (115) [DISS] (1) protected Boolean pwm.svPWM.firstTrigger (fixed = true, start = false) (116) [ALGB] (3) flow Real[3] multiPhase2Level.diode_p.plug_n.pin.i (117) [ALGB] (3) flow Real[3] multiPhase2Level.diode_n.plug_n.pin.i (118) [ALGB] (3) flow Real[3] multiPhase2Level.transistor_p.idealGTOThyristor.n.i (119) [ALGB] (3) Real[3] multiPhase2Level.transistor_n.v (120) [DISC] (1) protected Boolean pwm.svPWM.sampleTrigger (121) [DISC] (1) protected discrete Real pwm.svPWM.T0 (fixed = true, start = pwm.svPWM.startTime) (122) [DER-] (1) Real $DER.integrator.y (123) [ALGB] (6) protected Real[2, 3] filter.uu (124) [ALGB] (2) Real[2] pwm.u (125) [ALGB] (3) flow Real[3] multiPhase2Level.transistor_n.plug_n.pin.i (126) [ALGB] (3) flow Real[3] multiPhase2Level.transistor_p.plug_n.pin.i (127) [ALGB] (1) Real multiPhase2Level.powerDC = multiPhase2Level.vDC * multiPhase2Level.iDC (128) [ALGB] (3) flow Real[3] multiPhase2Level.diode_p.idealDiode.n.i (129) [DISC] (3) Boolean[3] $SEV_11[$i1] (130) [ALGB] (3) Real[3] multiPhase2Level.diode_n.v (131) [DISC] (3) Boolean[3] $SEV_7[$i1] (132) [ALGB] (3) Real[3] multiPhase2Level.diode_n.idealDiode.n.v (133) [ALGB] (1) Real dcPos.p.v (134) [ALGB] (2) Real[2] filter.y (135) [DISC] (3) Boolean[3] multiPhase2Level.transistor_n.fire (136) [ALGB] (2) Real[2] filter.u (137) [ALGB] (3) Real[3] multiPhase2Level.transistor_n.plug_n.pin.v (138) [ALGB] (3) Real[3] multiPhase2Level.transistor_p.plug_n.pin.v (139) [ALGB] (3) Real[3] multiPhase2Level.diode_p.idealDiode.n.v (140) [ALGB] (3) Real[3] multiPhase2Level.diode_n.i (141) [DISC] (1) protected discrete Real pwm.svPWM.t0 (fixed = true, start = 1.0) (142) [ALGB] (3) flow Real[3] multiPhase2Level.diode_n.idealDiode.n.i (143) [ALGB] (3) Real[3] multiPhase2Level.transistor_n.idealGTOThyristor.v (144) [ALGB] (2) Real[2] pwm.svPWM.u (145) [ALGB] (3) flow Real[3] multiPhase2Level.star_n.plug_p.pin.i (146) [ALGB] (3) flow Real[3] multiPhase2Level.star_p.plug_p.pin.i (147) [ALGB] (3) protected Real[3] multiPhase2Level.transistor_n.idealGTOThyristor.s (start = {0.0 for $i1 in 1:3}) (148) [ALGB] (3) Real[3] multiPhase2Level.diode_p.idealDiode.LossPower (149) [DISC] (1) protected Integer pwm.svPWM.ka (fixed = true, start = 0) (150) [DISC] (1) protected Integer pwm.svPWM.kb (fixed = true, start = 0) (151) [DER-] (1) Real $DER.harmonic.mean1.x (152) [DISC] (3) Boolean[3] multiPhase2Level.andCondition_p.u2 (153) [DISC] (3) Boolean[3] multiPhase2Level.andCondition_p.u1 (154) [ALGB] (3) Real[3] multiPhase2Level.transistor_n.idealGTOThyristor.i (155) [ALGB] (3) Real[3] multiPhase2Level.diode_p.idealDiode.v (156) [ALGB] (3) Real[3] multiPhase2Level.diode_n.idealDiode.v (157) [ALGB] (3) Real[3] multiPhase2Level.star_n.plug_p.pin.v (158) [ALGB] (1) Real harmonic.product2.y (159) [ALGB] (3) Real[3] multiPhase2Level.star_p.plug_p.pin.v (160) [ALGB] (3) protected Real[3] multiPhase2Level.diode_p.idealDiode.s (start = {0.0 for $i1 in 1:3}) (161) [ALGB] (3) protected Real[3] multiPhase2Level.diode_n.idealDiode.s (start = {0.0 for $i1 in 1:3}) (162) [ALGB] (2) Real[2] harmonic.product2.u (163) [ALGB] (3) Real[3] potentialSensor.phi (164) [DISC] (1) protected discrete Real pwm.svPWM.phiSec (fixed = true, start = 0.0) (165) [ALGB] (1) Real multiPhase2Level.LossPower (166) [ALGB] (3) Real[3] potentialSensor.plug_p.pin.v (167) [ALGB] (3) Real[3] multiPhase2Level.diode_p.idealDiode.i (168) [ALGB] (3) Real[3] multiPhase2Level.diode_n.idealDiode.i (169) [ALGB] (4) protected Real[2, 2] rotator.RotationMatrix = {{cos(-integrator.y), -sin(-integrator.y)}, {sin(-integrator.y), cos(-integrator.y)}} (170) [ALGB] (1) Real multiPhase2Level.vDC = dcPos.p.v - dcNeg.n.v (171) [DISC] (3) Boolean[3] $SEV_10[$i1] System Equations (199/397) **************************** (1) [SCAL] (1) multiPhase2Level.enableLogic.internalEnable[2] = multiPhase2Level.andCondition_p[2].u2 ($RES_SIM_204) (2) [SCAL] (1) multiPhase2Level.enableLogic.internalEnable[1] = multiPhase2Level.andCondition_n[1].u2 ($RES_SIM_205) (3) [SCAL] (1) multiPhase2Level.enableLogic.internalEnable[1] = multiPhase2Level.andCondition_p[1].u2 ($RES_SIM_206) (4) [FOR-] (3) ($RES_SIM_121) (4) [----] for $i1 in 1:3 loop (4) [----] [SCAL] (1) multiPhase2Level.diode_p.idealDiode[$i1].off = $SEV_9[$i1] ($RES_SIM_122) (4) [----] end for; (5) [FOR-] (3) ($RES_SIM_81) (5) [----] for $i1 in 1:3 loop (5) [----] [SCAL] (1) multiPhase2Level.diode_n.idealDiode[$i1].i = multiPhase2Level.diode_n.idealDiode[$i1].s * (if multiPhase2Level.diode_n.idealDiode[$i1].off then multiPhase2Level.diode_n.idealDiode[$i1].Goff else 1.0) + multiPhase2Level.diode_n.idealDiode[$i1].Goff * multiPhase2Level.diode_n.idealDiode[$i1].Vknee ($RES_SIM_82) (5) [----] end for; (6) [ARRY] (3) multiPhase2Level.fire_n = multiPhase2Level.andCondition_n.u1 ($RES_SIM_207) (7) [ARRY] (3) multiPhase2Level.enableLogic.internalEnable = multiPhase2Level.enableLogic.booleanReplicator.y ($RES_SIM_281) (8) [ARRY] (3) multiPhase2Level.andCondition_n.y = multiPhase2Level.transistor_n.fire ($RES_SIM_208) (9) [ARRY] (3) multiPhase2Level.transistor_p.i = multiPhase2Level.transistor_p.plug_p.pin.i ($RES_SIM_123) (10) [FOR-] (3) ($RES_SIM_83) (10) [----] for $i1 in 1:3 loop (10) [----] [SCAL] (1) multiPhase2Level.diode_n.idealDiode[$i1].v = multiPhase2Level.diode_n.idealDiode[$i1].s * (if multiPhase2Level.diode_n.idealDiode[$i1].off then 1.0 else multiPhase2Level.diode_n.idealDiode[$i1].Ron) + multiPhase2Level.diode_n.idealDiode[$i1].Vknee ($RES_SIM_84) (10) [----] end for; (11) [ARRY] (3) pwm.svPWM.fire_n = pwm.fire_n ($RES_SIM_282) (12) [ARRY] (3) multiPhase2Level.andCondition_p.y = multiPhase2Level.transistor_p.fire ($RES_SIM_209) (13) [ARRY] (3) multiPhase2Level.transistor_p.v = multiPhase2Level.transistor_p.plug_p.pin.v - multiPhase2Level.transistor_p.plug_n.pin.v ($RES_SIM_124) (14) [ARRY] (3) pwm.svPWM.fire_p = pwm.fire_p ($RES_SIM_283) (15) [FOR-] (3) ($RES_SIM_125) (15) [----] for $i1 in 1:3 loop (15) [----] [SCAL] (1) multiPhase2Level.transistor_p.idealGTOThyristor[$i1].v = multiPhase2Level.transistor_p.idealGTOThyristor[$i1].p.v - multiPhase2Level.transistor_p.idealGTOThyristor[$i1].n.v ($RES_SIM_126) (15) [----] end for; (16) [FOR-] (3) ($RES_SIM_85) (16) [----] for $i1 in 1:3 loop (16) [----] [SCAL] (1) multiPhase2Level.diode_n.idealDiode[$i1].off = $SEV_6[$i1] ($RES_SIM_86) (16) [----] end for; (17) [ARRY] (2) pwm.u = pwm.svPWM.u ($RES_SIM_284) (18) [FOR-] (3) ($RES_SIM_127) (18) [----] for $i1 in 1:3 loop (18) [----] [SCAL] (1) multiPhase2Level.transistor_p.idealGTOThyristor[$i1].i = multiPhase2Level.transistor_p.idealGTOThyristor[$i1].p.i ($RES_SIM_128) (18) [----] end for; (19) [ARRY] (3) multiPhase2Level.transistor_n.i = multiPhase2Level.transistor_n.plug_p.pin.i ($RES_SIM_87) (20) [ARRY] (3) multiPhase2Level.transistor_n.v = multiPhase2Level.transistor_n.plug_p.pin.v - multiPhase2Level.transistor_n.plug_n.pin.v ($RES_SIM_88) (21) [FOR-] (3) ($RES_SIM_89) (21) [----] for $i1 in 1:3 loop (21) [----] [SCAL] (1) multiPhase2Level.transistor_n.idealGTOThyristor[$i1].v = multiPhase2Level.transistor_n.idealGTOThyristor[$i1].p.v - multiPhase2Level.transistor_n.idealGTOThyristor[$i1].n.v ($RES_SIM_90) (21) [----] end for; (22) [FOR-] (3) ($RES_SIM_129) (22) [----] for $i1 in 1:3 loop (22) [----] [SCAL] (1) 0.0 = multiPhase2Level.transistor_p.idealGTOThyristor[$i1].p.i + multiPhase2Level.transistor_p.idealGTOThyristor[$i1].n.i ($RES_SIM_130) (22) [----] end for; (23) [SCAL] (1) (multiPhase2Level.diode_n.plug_n.pin[3].i + multiPhase2Level.transistor_p.plug_n.pin[3].i + multiPhase2Level.transistor_n.plug_p.pin[3].i + multiPhase2Level.diode_p.plug_p.pin[3].i) - multiPhase2Level.ac.pin[3].i = 0.0 ($RES_SIM_213) (24) [ALGO] (10) ($RES_SIM_15) (24) [----] when pwm.svPWM.sampleTrigger then (24) [----] pwm.svPWM.uRef := min($FUN_9 / (pwm.svPWM.uMax * 0.6666666666666666), 0.8660254037844387); (24) [----] pwm.svPWM.phiRef := if pwm.svPWM.uRef < 2.2250738585072014e-308 then 0.0 else atan2(pwm.svPWM.u[2], pwm.svPWM.u[1]); (24) [----] pwm.svPWM.phiPos := max(0.0, pwm.svPWM.phiRef + (if pwm.svPWM.phiRef < (-1.3951473992034527e-15) then 6.283185307179586 else 0.0)); (24) [----] pwm.svPWM.ka := min(integer(pwm.svPWM.phiPos / 1.0471975511965976), 5); (24) [----] pwm.svPWM.kb := $FUN_10; (24) [----] pwm.svPWM.phiSec := pwm.svPWM.phiPos - (3.141592653589793 * pwm.svPWM.ka) / 3.0; (24) [----] pwm.svPWM.tb := min(($FUN_11 * pwm.svPWM.uRef) / 0.8660254037844386, 1.0); (24) [----] pwm.svPWM.ta := min(pwm.svPWM.uRef * $FUN_12 - pwm.svPWM.tb * 0.5000000000000001, 1.0); (24) [----] pwm.svPWM.t0 := max(1.0 - (pwm.svPWM.tb + pwm.svPWM.ta), 0.0); (24) [----] pwm.svPWM.T0 := time; (24) [----] end when; (25) [SCAL] (1) (multiPhase2Level.diode_n.plug_n.pin[2].i + multiPhase2Level.transistor_p.plug_n.pin[2].i + multiPhase2Level.transistor_n.plug_p.pin[2].i + multiPhase2Level.diode_p.plug_p.pin[2].i) - multiPhase2Level.ac.pin[2].i = 0.0 ($RES_SIM_214) (26) [SCAL] (1) toPolar.y[2] = if noEvent($SEV_2) then 0.0 else atan2(toPolar.u[2], toPolar.u[1]) ($RES_SIM_16) (27) [SCAL] (1) (multiPhase2Level.diode_n.plug_n.pin[1].i + multiPhase2Level.transistor_p.plug_n.pin[1].i + multiPhase2Level.transistor_n.plug_p.pin[1].i + multiPhase2Level.diode_p.plug_p.pin[1].i) - multiPhase2Level.ac.pin[1].i = 0.0 ($RES_SIM_215) (28) [SCAL] (1) toPolar.y[1] = $FUN_8 ($RES_SIM_17) (29) [SCAL] (1) multiPhase2Level.transistor_n.plug_p.pin[3].v = multiPhase2Level.diode_p.plug_p.pin[3].v ($RES_SIM_216) (30) [FOR-] (3) ($RES_SIM_91) (30) [----] for $i1 in 1:3 loop (30) [----] [SCAL] (1) multiPhase2Level.transistor_n.idealGTOThyristor[$i1].i = multiPhase2Level.transistor_n.idealGTOThyristor[$i1].p.i ($RES_SIM_92) (30) [----] end for; (31) [FOR-] (2) ($RES_SIM_18) (31) [----] for $i1 in 1:2 loop (31) [----] [SCAL] (1) filter[$i1].y = filter[$i1].u_nominal * filter[$i1].gain * filter[$i1].uu[3] ($RES_SIM_19) (31) [----] end for; (32) [SCAL] (1) multiPhase2Level.transistor_n.plug_p.pin[3].v = multiPhase2Level.diode_n.plug_n.pin[3].v ($RES_SIM_217) (33) [SCAL] (1) multiPhase2Level.transistor_n.plug_p.pin[3].v = multiPhase2Level.transistor_p.plug_n.pin[3].v ($RES_SIM_218) (34) [FOR-] (3) ($RES_SIM_93) (34) [----] for $i1 in 1:3 loop (34) [----] [SCAL] (1) 0.0 = multiPhase2Level.transistor_n.idealGTOThyristor[$i1].p.i + multiPhase2Level.transistor_n.idealGTOThyristor[$i1].n.i ($RES_SIM_94) (34) [----] end for; (35) [FOR-] (3) ($RES_SIM_133) (35) [----] for $i1 in 1:3 loop (35) [----] [SCAL] (1) multiPhase2Level.transistor_p.idealGTOThyristor[$i1].LossPower = multiPhase2Level.transistor_p.idealGTOThyristor[$i1].v * multiPhase2Level.transistor_p.idealGTOThyristor[$i1].i ($RES_SIM_134) (35) [----] end for; (36) [SCAL] (1) multiPhase2Level.transistor_n.plug_p.pin[3].v = multiPhase2Level.ac.pin[3].v ($RES_SIM_219) (37) [FOR-] (3) ($RES_SIM_135) (37) [----] for $i1 in 1:3 loop (37) [----] [SCAL] (1) multiPhase2Level.transistor_p.idealGTOThyristor[$i1].i = multiPhase2Level.transistor_p.idealGTOThyristor[$i1].s * (if multiPhase2Level.transistor_p.idealGTOThyristor[$i1].off then multiPhase2Level.transistor_p.idealGTOThyristor[$i1].Goff else 1.0) + multiPhase2Level.transistor_p.idealGTOThyristor[$i1].Goff * multiPhase2Level.transistor_p.idealGTOThyristor[$i1].Vknee ($RES_SIM_136) (37) [----] end for; (38) [FOR-] (3) ($RES_SIM_97) (38) [----] for $i1 in 1:3 loop (38) [----] [SCAL] (1) multiPhase2Level.transistor_n.idealGTOThyristor[$i1].LossPower = multiPhase2Level.transistor_n.idealGTOThyristor[$i1].v * multiPhase2Level.transistor_n.idealGTOThyristor[$i1].i ($RES_SIM_98) (38) [----] end for; (39) [FOR-] (3) ($RES_SIM_137) (39) [----] for $i1 in 1:3 loop (39) [----] [SCAL] (1) multiPhase2Level.transistor_p.idealGTOThyristor[$i1].v = multiPhase2Level.transistor_p.idealGTOThyristor[$i1].s * (if multiPhase2Level.transistor_p.idealGTOThyristor[$i1].off then 1.0 else multiPhase2Level.transistor_p.idealGTOThyristor[$i1].Ron) + multiPhase2Level.transistor_p.idealGTOThyristor[$i1].Vknee ($RES_SIM_138) (39) [----] end for; (40) [FOR-] (3) ($RES_SIM_99) (40) [----] for $i1 in 1:3 loop (40) [----] [SCAL] (1) multiPhase2Level.transistor_n.idealGTOThyristor[$i1].i = multiPhase2Level.transistor_n.idealGTOThyristor[$i1].s * (if multiPhase2Level.transistor_n.idealGTOThyristor[$i1].off then multiPhase2Level.transistor_n.idealGTOThyristor[$i1].Goff else 1.0) + multiPhase2Level.transistor_n.idealGTOThyristor[$i1].Goff * multiPhase2Level.transistor_n.idealGTOThyristor[$i1].Vknee ($RES_SIM_100) (40) [----] end for; (41) [FOR-] (3) ($RES_SIM_139) (41) [----] for $i1 in 1:3 loop (41) [----] [SCAL] (1) multiPhase2Level.transistor_p.idealGTOThyristor[$i1].off = $SEV_11[$i1] ($RES_SIM_140) (41) [----] end for; (42) [FOR-] (4) ($RES_SIM_20) (42) [----] for {$i1 in 1:2, $i2 in 1:2} loop (42) [----] [SCAL] (1) filter[$i1].uu[$i2 + 1] = filter[$i1].x[$i2] ($RES_SIM_21) (42) [----] end for; (43) [SCAL] (1) multiPhase2Level.transistor_n.plug_p.pin[2].v = multiPhase2Level.diode_p.plug_p.pin[2].v ($RES_SIM_220) (44) [FOR-] (4) ($RES_SIM_22) (44) [----] for {$i1 in 1:2, $i2 in 1:2} loop (44) [----] [SCAL] (1) $DER.filter[$i1].x[$i2] = filter[$i1].r[$i2] * (filter[$i1].x[$i2] - filter[$i1].uu[$i2]) ($RES_SIM_23) (44) [----] end for; (45) [SCAL] (1) multiPhase2Level.transistor_n.plug_p.pin[2].v = multiPhase2Level.diode_n.plug_n.pin[2].v ($RES_SIM_221) (46) [SCAL] (1) multiPhase2Level.transistor_n.plug_p.pin[2].v = multiPhase2Level.transistor_p.plug_n.pin[2].v ($RES_SIM_222) (47) [FOR-] (2) ($RES_SIM_24) (47) [----] for $i1 in 1:2 loop (47) [----] [SCAL] (1) filter[$i1].uu[1] = filter[$i1].u / filter[$i1].u_nominal ($RES_SIM_25) (47) [----] end for; (48) [SCAL] (1) multiPhase2Level.transistor_n.plug_p.pin[2].v = multiPhase2Level.ac.pin[2].v ($RES_SIM_223) (49) [SCAL] (1) multiPhase2Level.transistor_n.plug_p.pin[1].v = multiPhase2Level.diode_p.plug_p.pin[1].v ($RES_SIM_224) (50) [SCAL] (1) multiPhase2Level.transistor_n.plug_p.pin[1].v = multiPhase2Level.diode_n.plug_n.pin[1].v ($RES_SIM_225) (51) [SCAL] (1) multiPhase2Level.transistor_n.plug_p.pin[1].v = multiPhase2Level.transistor_p.plug_n.pin[1].v ($RES_SIM_226) (52) [FOR-] (3) ($RES_SIM_141) (52) [----] for $i1 in 1:3 loop (52) [----] [SCAL] (1) multiPhase2Level.andCondition_n[$i1].y = $SEV_12[$i1] ($RES_SIM_142) (52) [----] end for; (53) [SCAL] (1) multiPhase2Level.transistor_n.plug_p.pin[1].v = multiPhase2Level.ac.pin[1].v ($RES_SIM_227) (54) [SCAL] (1) multiPhase2Level.diode_n.plug_p.pin[3].i + multiPhase2Level.star_n.plug_p.pin[3].i + multiPhase2Level.transistor_n.plug_n.pin[3].i = 0.0 ($RES_SIM_228) (55) [ARRY] (3) multiPhase2Level.enableLogic.booleanReplicator.y = {multiPhase2Level.enableLogic.enableConstantSource.k for $i1 in 1:3} ($RES_SIM_143) (56) [SCAL] (1) multiPhase2Level.diode_n.plug_p.pin[2].i + multiPhase2Level.star_n.plug_p.pin[2].i + multiPhase2Level.transistor_n.plug_n.pin[2].i = 0.0 ($RES_SIM_229) (57) [FOR-] (3) ($RES_SIM_145) (57) [----] for $i1 in 1:3 loop (57) [----] [SCAL] (1) multiPhase2Level.andCondition_p[$i1].y = $SEV_13[$i1] ($RES_SIM_146) (57) [----] end for; (58) [WHEN] (1)when pwm.svPWM.sampleTrigger then (58) [----] pwm.svPWM.firstTrigger := time <= (pwm.svPWM.startTime + pwm.svPWM.samplePeriod / 2.0) (58) [----] end when; (59) [SCAL] (1) pwm.svPWM.sampleTrigger = $TEV_6 ($RES_SIM_148) (60) [ARRY] (3) pwm.svPWM.fire_n = not pwm.svPWM.fire_p ($RES_SIM_149) (61) [SCAL] (1) $TEV_4 = time < harmonic.sin2.startTime ($RES_EVT_319) (62) [SCAL] (1) multiPhase2Level.diode_n.plug_p.pin[1].i + multiPhase2Level.star_n.plug_p.pin[1].i + multiPhase2Level.transistor_n.plug_n.pin[1].i = 0.0 ($RES_SIM_230) (63) [SCAL] (1) $DER.integrator.y = integrator.k * const.k ($RES_SIM_32) (64) [SCAL] (1) multiPhase2Level.star_n.plug_p.pin[3].v = multiPhase2Level.transistor_n.plug_n.pin[3].v ($RES_SIM_231) (65) [SCAL] (1) multiPhase2Level.star_n.plug_p.pin[3].v = multiPhase2Level.diode_n.plug_p.pin[3].v ($RES_SIM_232) (66) [SCAL] (1) multiPhase2Level.star_n.plug_p.pin[2].v = multiPhase2Level.transistor_n.plug_n.pin[2].v ($RES_SIM_233) (67) [SCAL] (1) multiPhase2Level.star_n.plug_p.pin[2].v = multiPhase2Level.diode_n.plug_p.pin[2].v ($RES_SIM_234) (68) [ARRY] (2) rotator.y = rotator.RotationMatrix * rotator.u ($RES_SIM_36) (69) [SCAL] (1) multiPhase2Level.vDC = dcPos.p.v - dcNeg.n.v ($RES_BND_285) (70) [SCAL] (1) multiPhase2Level.star_n.plug_p.pin[1].v = multiPhase2Level.transistor_n.plug_n.pin[1].v ($RES_SIM_235) (71) [-IF-] (3)if $TEV_7 then (71) [----] [ARRY] (3) pwm.svPWM.fire_p = {true for $i1 in 1:3} ($RES_SIM_151) (71) [----] elseif $SEV_14 then (71) [----] [ARRY] (3) pwm.svPWM.fire_p = {false for $i1 in 1:3} ($RES_SIM_152) (71) [----] elseif $SEV_15 then (71) [----] [ARRY] (3) pwm.svPWM.fire_p = ({{true, false, false}, {true, true, false}, {false, true, false}, {false, true, true}, {false, false, true}, {true, false, true}})[pwm.svPWM.ka + 1, :] ($RES_SIM_153) (71) [----] elseif $SEV_16 then (71) [----] [ARRY] (3) pwm.svPWM.fire_p = ({{true, false, false}, {true, true, false}, {false, true, false}, {false, true, true}, {false, false, true}, {true, false, true}})[pwm.svPWM.kb + 1, :] ($RES_SIM_154) (71) [----] elseif $SEV_17 then (71) [----] [ARRY] (3) pwm.svPWM.fire_p = {true for $i1 in 1:3} ($RES_SIM_155) (71) [----] elseif $SEV_18 then (71) [----] [ARRY] (3) pwm.svPWM.fire_p = ({{true, false, false}, {true, true, false}, {false, true, false}, {false, true, true}, {false, false, true}, {true, false, true}})[pwm.svPWM.kb + 1, :] ($RES_SIM_156) (71) [----] elseif $SEV_19 then (71) [----] [ARRY] (3) pwm.svPWM.fire_p = ({{true, false, false}, {true, true, false}, {false, true, false}, {false, true, true}, {false, false, true}, {true, false, true}})[pwm.svPWM.ka + 1, :] ($RES_SIM_157) (71) [----] else (71) [----] [ARRY] (3) pwm.svPWM.fire_p = {false for $i1 in 1:3} ($RES_SIM_158) (71) [----] end if; (72) [ARRY] (2) toSpacePhasor.y = toSpacePhasor.TransformationMatrix * toSpacePhasor.u ($RES_SIM_37) (73) [SCAL] (1) multiPhase2Level.star_n.plug_p.pin[1].v = multiPhase2Level.diode_n.plug_p.pin[1].v ($RES_SIM_236) (74) [SCAL] (1) multiPhase2Level.powerDC = multiPhase2Level.vDC * multiPhase2Level.iDC ($RES_BND_287) (75) [SCAL] (1) multiPhase2Level.diode_p.plug_n.pin[3].i + multiPhase2Level.star_p.plug_p.pin[3].i + multiPhase2Level.transistor_p.plug_p.pin[3].i = 0.0 ($RES_SIM_237) (76) [ARRY] (3) multiPhase2Level.vAC = multiPhase2Level.ac.pin[:].v ($RES_BND_288) (77) [SCAL] (1) multiPhase2Level.diode_p.plug_n.pin[2].i + multiPhase2Level.star_p.plug_p.pin[2].i + multiPhase2Level.transistor_p.plug_p.pin[2].i = 0.0 ($RES_SIM_238) (78) [ARRY] (3) multiPhase2Level.iAC = multiPhase2Level.ac.pin[:].i ($RES_BND_289) (79) [SCAL] (1) multiPhase2Level.diode_p.plug_n.pin[1].i + multiPhase2Level.star_p.plug_p.pin[1].i + multiPhase2Level.transistor_p.plug_p.pin[1].i = 0.0 ($RES_SIM_239) (80) [SCAL] (1) sine.y = sine.offset + (if $TEV_8 then 0.0 else sine.amplitude * sin(sine.phase + 6.283185307179586 * (time - sine.startTime) * sine.f)) ($RES_SIM_159) (81) [SCAL] (1) $TEV_5 = time < harmonic.sin1.startTime ($RES_EVT_320) (82) [SCAL] (1) $TEV_6 = sample(6, pwm.svPWM.startTime, pwm.svPWM.samplePeriod) ($RES_EVT_321) (83) [SCAL] (1) $TEV_7 = time < pwm.svPWM.startTime ($RES_EVT_322) (84) [SCAL] (1) $TEV_8 = time < sine.startTime ($RES_EVT_323) (85) [SCAL] (1) $TEV_9 = time < cosine.startTime ($RES_EVT_324) (86) [SCAL] (1) $SEV_2 = toPolar.y[1] <= 2.2250738585072014e-308 ($RES_EVT_325) (87) [ARRY] (3) multiPhase2Level.powerAC = multiPhase2Level.vAC * multiPhase2Level.iAC ($RES_BND_290) (88) [SCAL] (1) multiPhase2Level.star_p.plug_p.pin[3].v = multiPhase2Level.transistor_p.plug_p.pin[3].v ($RES_SIM_240) (89) [SCAL] (1) multiPhase2Level.star_p.plug_p.pin[3].v = multiPhase2Level.diode_p.plug_n.pin[3].v ($RES_SIM_241) (90) [ARRY] (4) rotator.RotationMatrix = {{$FUN_13, -$FUN_14}, {$FUN_14, $FUN_13}} ($RES_BND_292) (91) [SCAL] (1) multiPhase2Level.star_p.plug_p.pin[2].v = multiPhase2Level.transistor_p.plug_p.pin[2].v ($RES_SIM_242) (92) [SCAL] (1) multiPhase2Level.star_p.plug_p.pin[2].v = multiPhase2Level.diode_p.plug_n.pin[2].v ($RES_SIM_243) (93) [SCAL] (1) $DER.harmonic.mean2.x = harmonic.product2.y ($RES_SIM_45) (94) [SCAL] (1) multiPhase2Level.star_p.plug_p.pin[1].v = multiPhase2Level.transistor_p.plug_p.pin[1].v ($RES_SIM_244) (95) [SCAL] (1) multiPhase2Level.star_p.plug_p.pin[1].v = multiPhase2Level.diode_p.plug_n.pin[1].v ($RES_SIM_245) (96) [SCAL] (1) cosine.y = cosine.offset + (if $TEV_9 then 0.0 else cosine.amplitude * cos(cosine.phase + 6.283185307179586 * (time - cosine.startTime) * cosine.f)) ($RES_SIM_160) (97) [SCAL] (1) -(multiPhase2Level.star_n.plug_p.pin[2].i + dcNeg.i + multiPhase2Level.star_n.plug_p.pin[3].i + multiPhase2Level.star_n.plug_p.pin[1].i) = 0.0 ($RES_SIM_246) (98) [SCAL] (1) multiPhase2Level.star_n.plug_p.pin[3].v = multiPhase2Level.star_n.plug_p.pin[1].v ($RES_SIM_247) (99) [SCAL] (1) dcNeg.i + ground.p.i + multiPhase2Level.iDC = 0.0 ($RES_SIM_162) (100) [SCAL] (1) $DER.harmonic.mean1.x = harmonic.product1.y ($RES_SIM_49) (101) [SCAL] (1) multiPhase2Level.star_n.plug_p.pin[3].v = multiPhase2Level.star_n.plug_p.pin[2].v ($RES_SIM_248) (102) [SCAL] (1) multiPhase2Level.star_n.plug_p.pin[3].v = dcNeg.n.v ($RES_SIM_249) (103) [ARRY] (2) filter.y = toPolar.u ($RES_SIM_165) (104) [ARRY] (2) rotator.y = filter.u ($RES_SIM_166) (105) [SCAL] (1) potentialSensor.phi[3] = toSpacePhasor.u[3] ($RES_SIM_169) (106) [FOR-] (3) ($RES_EVT_332) (106) [----] for $i1 in 1:3 loop (106) [----] [SCAL] (1) $SEV_6[$i1] = multiPhase2Level.diode_n.idealDiode[$i1].s < 0.0 ($RES_EVT_333) (106) [----] end for; (107) [FOR-] (3) ($RES_EVT_334) (107) [----] for $i1 in 1:3 loop (107) [----] [SCAL] (1) $SEV_7[$i1] = multiPhase2Level.transistor_n.idealGTOThyristor[$i1].s < 0.0 ($RES_EVT_335) (107) [----] end for; (108) [FOR-] (3) ($RES_EVT_336) (108) [----] for $i1 in 1:3 loop (108) [----] [SCAL] (1) $SEV_8[$i1] = $SEV_7[$i1] or not multiPhase2Level.transistor_n.idealGTOThyristor[$i1].fire ($RES_EVT_337) (108) [----] end for; (109) [FOR-] (3) ($RES_EVT_338) (109) [----] for $i1 in 1:3 loop (109) [----] [SCAL] (1) $SEV_9[$i1] = multiPhase2Level.diode_p.idealDiode[$i1].s < 0.0 ($RES_EVT_339) (109) [----] end for; (110) [FOR-] (3) ($RES_SIM_250) (110) [----] for $i1 in 1:3 loop (110) [----] [SCAL] (1) multiPhase2Level.diode_n.idealDiode[$i1].n.i - multiPhase2Level.diode_n.plug_n.pin[$i1].i = 0.0 ($RES_SIM_251) (110) [----] end for; (111) [SCAL] (1) harmonic.sin2.y = harmonic.sin2.offset + (if $TEV_4 then 0.0 else harmonic.sin2.amplitude * sin(harmonic.sin2.phase + 6.283185307179586 * (time - harmonic.sin2.startTime) * harmonic.sin2.f)) ($RES_SIM_52) (112) [SCAL] (1) harmonic.sin1.y = harmonic.sin1.offset + (if $TEV_5 then 0.0 else harmonic.sin1.amplitude * cos(harmonic.sin1.phase + 6.283185307179586 * (time - harmonic.sin1.startTime) * harmonic.sin1.f)) ($RES_SIM_53) (113) [ARRY] (3) multiPhase2Level.diode_n.idealDiode.n.v = multiPhase2Level.diode_n.plug_n.pin.v ($RES_SIM_252) (114) [FOR-] (3) ($RES_SIM_54) (114) [----] for $i1 in 1:3 loop (114) [----] [SCAL] (1) potentialSensor.potentialSensor[$i1].phi = potentialSensor.potentialSensor[$i1].p.v ($RES_SIM_55) (114) [----] end for; (115) [FOR-] (3) ($RES_SIM_253) (115) [----] for $i1 in 1:3 loop (115) [----] [SCAL] (1) multiPhase2Level.diode_n.idealDiode[$i1].p.i - multiPhase2Level.diode_n.plug_p.pin[$i1].i = 0.0 ($RES_SIM_254) (115) [----] end for; (116) [FOR-] (3) ($RES_SIM_56) (116) [----] for $i1 in 1:3 loop (116) [----] [SCAL] (1) potentialSensor.potentialSensor[$i1].p.i = 0.0 ($RES_SIM_57) (116) [----] end for; (117) [ARRY] (3) multiPhase2Level.diode_n.plug_p.pin.v = multiPhase2Level.diode_n.idealDiode.p.v ($RES_SIM_255) (118) [SCAL] (1) potentialSensor.phi[2] = toSpacePhasor.u[2] ($RES_SIM_170) (119) [ARRY] (3) multiPhase2Level.transistor_n.fire = multiPhase2Level.transistor_n.idealGTOThyristor.fire ($RES_SIM_256) (120) [SCAL] (1) potentialSensor.phi[1] = toSpacePhasor.u[1] ($RES_SIM_171) (121) [FOR-] (3) ($RES_SIM_257) (121) [----] for $i1 in 1:3 loop (121) [----] [SCAL] (1) multiPhase2Level.transistor_n.idealGTOThyristor[$i1].n.i - multiPhase2Level.transistor_n.plug_n.pin[$i1].i = 0.0 ($RES_SIM_258) (121) [----] end for; (122) [SCAL] (1) potentialSensor.phi[1] = harmonic.u ($RES_SIM_172) (123) [SCAL] (1) dcNeg.V = -dcNeg.n.v ($RES_SIM_59) (124) [ARRY] (2) toSpacePhasor.y = rotator.u ($RES_SIM_173) (125) [ARRY] (3) multiPhase2Level.transistor_n.idealGTOThyristor.n.v = multiPhase2Level.transistor_n.plug_n.pin.v ($RES_SIM_259) (126) [FOR-] (3) ($RES_SIM_174) (126) [----] for $i1 in 1:3 loop (126) [----] [SCAL] (1) multiPhase2Level.ac.pin[$i1].i + potentialSensor.plug_p.pin[$i1].i = 0.0 ($RES_SIM_175) (126) [----] end for; (127) [ARRY] (3) multiPhase2Level.ac.pin.v = potentialSensor.plug_p.pin.v ($RES_SIM_176) (128) [SCAL] (1) sine.y = pwm.u[2] ($RES_SIM_177) (129) [SCAL] (1) cosine.y = pwm.u[1] ($RES_SIM_178) (130) [FOR-] (3) ($RES_EVT_340) (130) [----] for $i1 in 1:3 loop (130) [----] [SCAL] (1) $SEV_10[$i1] = multiPhase2Level.transistor_p.idealGTOThyristor[$i1].s < 0.0 ($RES_EVT_341) (130) [----] end for; (131) [FOR-] (3) ($RES_EVT_342) (131) [----] for $i1 in 1:3 loop (131) [----] [SCAL] (1) $SEV_11[$i1] = $SEV_10[$i1] or not multiPhase2Level.transistor_p.idealGTOThyristor[$i1].fire ($RES_EVT_343) (131) [----] end for; (132) [FOR-] (3) ($RES_EVT_344) (132) [----] for $i1 in 1:3 loop (132) [----] [SCAL] (1) $SEV_12[$i1] = multiPhase2Level.andCondition_n[$i1].u1 and multiPhase2Level.andCondition_n[$i1].u2 ($RES_EVT_345) (132) [----] end for; (133) [FOR-] (3) ($RES_EVT_346) (133) [----] for $i1 in 1:3 loop (133) [----] [SCAL] (1) $SEV_13[$i1] = multiPhase2Level.andCondition_p[$i1].u1 and multiPhase2Level.andCondition_p[$i1].u2 ($RES_EVT_347) (133) [----] end for; (134) [SCAL] (1) $SEV_14 = time < (pwm.svPWM.T0 + pwm.svPWM.samplePeriod * (pwm.svPWM.t0 / 4.0)) ($RES_EVT_348) (135) [SCAL] (1) $SEV_15 = time < (pwm.svPWM.T0 + pwm.svPWM.samplePeriod * (pwm.svPWM.t0 / 4.0 + pwm.svPWM.ta / 2.0)) ($RES_EVT_349) (136) [FOR-] (3) ($RES_SIM_101) (136) [----] for $i1 in 1:3 loop (136) [----] [SCAL] (1) multiPhase2Level.transistor_n.idealGTOThyristor[$i1].v = multiPhase2Level.transistor_n.idealGTOThyristor[$i1].s * (if multiPhase2Level.transistor_n.idealGTOThyristor[$i1].off then 1.0 else multiPhase2Level.transistor_n.idealGTOThyristor[$i1].Ron) + multiPhase2Level.transistor_n.idealGTOThyristor[$i1].Vknee ($RES_SIM_102) (136) [----] end for; (137) [FOR-] (3) ($RES_SIM_260) (137) [----] for $i1 in 1:3 loop (137) [----] [SCAL] (1) multiPhase2Level.transistor_n.idealGTOThyristor[$i1].p.i - multiPhase2Level.transistor_n.plug_p.pin[$i1].i = 0.0 ($RES_SIM_261) (137) [----] end for; (138) [FOR-] (3) ($RES_SIM_103) (138) [----] for $i1 in 1:3 loop (138) [----] [SCAL] (1) multiPhase2Level.transistor_n.idealGTOThyristor[$i1].off = $SEV_8[$i1] ($RES_SIM_104) (138) [----] end for; (139) [SCAL] (1) dcPos.V = dcPos.p.v ($RES_SIM_63) (140) [ARRY] (3) multiPhase2Level.transistor_n.idealGTOThyristor.p.v = multiPhase2Level.transistor_n.plug_p.pin.v ($RES_SIM_262) (141) [SCAL] (1) -(multiPhase2Level.star_p.plug_p.pin[2].i + multiPhase2Level.iDC + multiPhase2Level.star_p.plug_p.pin[3].i + multiPhase2Level.star_p.plug_p.pin[1].i) = 0.0 ($RES_SIM_263) (142) [ARRY] (3) multiPhase2Level.diode_p.i = multiPhase2Level.diode_p.plug_p.pin.i ($RES_SIM_105) (143) [SCAL] (1) multiPhase2Level.star_p.plug_p.pin[3].v = multiPhase2Level.star_p.plug_p.pin[1].v ($RES_SIM_264) (144) [ARRY] (3) multiPhase2Level.diode_p.v = multiPhase2Level.diode_p.plug_p.pin.v - multiPhase2Level.diode_p.plug_n.pin.v ($RES_SIM_106) (145) [SCAL] (1) multiPhase2Level.star_p.plug_p.pin[3].v = multiPhase2Level.star_p.plug_p.pin[2].v ($RES_SIM_265) (146) [FOR-] (3) ($RES_SIM_107) (146) [----] for $i1 in 1:3 loop (146) [----] [SCAL] (1) multiPhase2Level.diode_p.idealDiode[$i1].v = multiPhase2Level.diode_p.idealDiode[$i1].p.v - multiPhase2Level.diode_p.idealDiode[$i1].n.v ($RES_SIM_108) (146) [----] end for; (147) [SCAL] (1) multiPhase2Level.star_p.plug_p.pin[3].v = dcPos.p.v ($RES_SIM_266) (148) [SCAL] (1) multiPhase2Level.LossPower = $FUN_1 + $FUN_2 + $FUN_3 + $FUN_2 ($RES_SIM_68) (149) [FOR-] (3) ($RES_SIM_267) (149) [----] for $i1 in 1:3 loop (149) [----] [SCAL] (1) multiPhase2Level.diode_p.idealDiode[$i1].n.i - multiPhase2Level.diode_p.plug_n.pin[$i1].i = 0.0 ($RES_SIM_268) (149) [----] end for; (150) [FOR-] (3) ($RES_SIM_109) (150) [----] for $i1 in 1:3 loop (150) [----] [SCAL] (1) multiPhase2Level.diode_p.idealDiode[$i1].i = multiPhase2Level.diode_p.idealDiode[$i1].p.i ($RES_SIM_110) (150) [----] end for; (151) [ARRY] (3) multiPhase2Level.diode_n.i = multiPhase2Level.diode_n.plug_p.pin.i ($RES_SIM_69) (152) [ARRY] (3) pwm.fire_n = multiPhase2Level.fire_n ($RES_SIM_183) (153) [ARRY] (3) multiPhase2Level.diode_p.idealDiode.n.v = multiPhase2Level.diode_p.plug_n.pin.v ($RES_SIM_269) (154) [ARRY] (3) pwm.fire_p = multiPhase2Level.fire_p ($RES_SIM_184) (155) [SCAL] (1) harmonic.sin2.y = harmonic.product2.u[2] ($RES_SIM_187) (156) [SCAL] (1) harmonic.u = harmonic.product1.u[2] ($RES_SIM_188) (157) [SCAL] (1) harmonic.u = harmonic.product2.u[1] ($RES_SIM_189) (158) [SCAL] (1) $FUN_1 = sum(multiPhase2Level.transistor_n.idealGTOThyristor.LossPower) ($RES_$AUX_307) (159) [SCAL] (1) $SEV_16 = time < (pwm.svPWM.T0 + pwm.svPWM.samplePeriod * (pwm.svPWM.ta / 2.0 + pwm.svPWM.t0 / 4.0 + pwm.svPWM.tb / 2.0)) ($RES_EVT_350) (160) [SCAL] (1) $FUN_2 = sum(multiPhase2Level.diode_n.idealDiode.LossPower) ($RES_$AUX_306) (161) [SCAL] (1) $SEV_17 = time < (pwm.svPWM.T0 + pwm.svPWM.samplePeriod * (pwm.svPWM.tb / 2.0 + pwm.svPWM.ta / 2.0 + pwm.svPWM.t0 / 4.0 + pwm.svPWM.t0 / 2.0)) ($RES_EVT_351) (162) [SCAL] (1) $FUN_3 = sum(multiPhase2Level.transistor_p.idealGTOThyristor.LossPower) ($RES_$AUX_305) (163) [SCAL] (1) $SEV_18 = time < (pwm.svPWM.T0 + pwm.svPWM.samplePeriod * (pwm.svPWM.t0 / 2.0 + pwm.svPWM.tb / 2.0 + pwm.svPWM.ta / 2.0 + pwm.svPWM.t0 / 4.0 + pwm.svPWM.tb / 2.0)) ($RES_EVT_352) (164) [SCAL] (1) harmonic.product1.y = product(harmonic.product1.u) ($RES_$AUX_304) (165) [SCAL] (1) $SEV_19 = time < (pwm.svPWM.T0 + pwm.svPWM.samplePeriod * (pwm.svPWM.tb / 2.0 + pwm.svPWM.t0 / 2.0 + pwm.svPWM.tb / 2.0 + pwm.svPWM.ta / 2.0 + pwm.svPWM.t0 / 4.0 + pwm.svPWM.ta / 2.0)) ($RES_EVT_353) (166) [SCAL] (1) harmonic.product2.y = product(harmonic.product2.u) ($RES_$AUX_303) (167) [SCAL] (1) 3.0 * toSpacePhasor.zero = sum(toSpacePhasor.u) ($RES_$AUX_301) (168) [SCAL] (1) $FUN_8 = sqrt(toPolar.u[1] ^ 2.0 + toPolar.u[2] ^ 2.0) ($RES_$AUX_300) (169) [ARRY] (3) multiPhase2Level.diode_n.v = multiPhase2Level.diode_n.plug_p.pin.v - multiPhase2Level.diode_n.plug_n.pin.v ($RES_SIM_70) (170) [FOR-] (3) ($RES_SIM_111) (170) [----] for $i1 in 1:3 loop (170) [----] [SCAL] (1) 0.0 = multiPhase2Level.diode_p.idealDiode[$i1].p.i + multiPhase2Level.diode_p.idealDiode[$i1].n.i ($RES_SIM_112) (170) [----] end for; (171) [FOR-] (3) ($RES_SIM_71) (171) [----] for $i1 in 1:3 loop (171) [----] [SCAL] (1) multiPhase2Level.diode_n.idealDiode[$i1].v = multiPhase2Level.diode_n.idealDiode[$i1].p.v - multiPhase2Level.diode_n.idealDiode[$i1].n.v ($RES_SIM_72) (171) [----] end for; (172) [FOR-] (3) ($RES_SIM_270) (172) [----] for $i1 in 1:3 loop (172) [----] [SCAL] (1) multiPhase2Level.diode_p.idealDiode[$i1].p.i - multiPhase2Level.diode_p.plug_p.pin[$i1].i = 0.0 ($RES_SIM_271) (172) [----] end for; (173) [SCAL] (1) $FUN_9 = sqrt(pwm.svPWM.u[1] ^ 2.0 + pwm.svPWM.u[2] ^ 2.0) ($RES_$AUX_299) (174) [FOR-] (3) ($RES_SIM_73) (174) [----] for $i1 in 1:3 loop (174) [----] [SCAL] (1) multiPhase2Level.diode_n.idealDiode[$i1].i = multiPhase2Level.diode_n.idealDiode[$i1].p.i ($RES_SIM_74) (174) [----] end for; (175) [SCAL] (1) $FUN_10 = mod(1 + pwm.svPWM.ka, 6) ($RES_$AUX_298) (176) [ARRY] (3) multiPhase2Level.diode_p.plug_p.pin.v = multiPhase2Level.diode_p.idealDiode.p.v ($RES_SIM_272) (177) [SCAL] (1) $FUN_11 = sin(pwm.svPWM.phiSec) ($RES_$AUX_297) (178) [ARRY] (3) multiPhase2Level.transistor_p.fire = multiPhase2Level.transistor_p.idealGTOThyristor.fire ($RES_SIM_273) (179) [FOR-] (3) ($RES_SIM_115) (179) [----] for $i1 in 1:3 loop (179) [----] [SCAL] (1) multiPhase2Level.diode_p.idealDiode[$i1].LossPower = multiPhase2Level.diode_p.idealDiode[$i1].v * multiPhase2Level.diode_p.idealDiode[$i1].i ($RES_SIM_116) (179) [----] end for; (180) [FOR-] (3) ($RES_SIM_75) (180) [----] for $i1 in 1:3 loop (180) [----] [SCAL] (1) 0.0 = multiPhase2Level.diode_n.idealDiode[$i1].p.i + multiPhase2Level.diode_n.idealDiode[$i1].n.i ($RES_SIM_76) (180) [----] end for; (181) [SCAL] (1) $FUN_12 = cos(pwm.svPWM.phiSec) ($RES_$AUX_296) (182) [FOR-] (3) ($RES_SIM_274) (182) [----] for $i1 in 1:3 loop (182) [----] [SCAL] (1) multiPhase2Level.transistor_p.idealGTOThyristor[$i1].n.i - multiPhase2Level.transistor_p.plug_n.pin[$i1].i = 0.0 ($RES_SIM_275) (182) [----] end for; (183) [SCAL] (1) $FUN_13 = cos(-integrator.y) ($RES_$AUX_295) (184) [SCAL] (1) harmonic.sin1.y = harmonic.product1.u[1] ($RES_SIM_190) (185) [FOR-] (3) ($RES_SIM_117) (185) [----] for $i1 in 1:3 loop (185) [----] [SCAL] (1) multiPhase2Level.diode_p.idealDiode[$i1].i = multiPhase2Level.diode_p.idealDiode[$i1].s * (if multiPhase2Level.diode_p.idealDiode[$i1].off then multiPhase2Level.diode_p.idealDiode[$i1].Goff else 1.0) + multiPhase2Level.diode_p.idealDiode[$i1].Goff * multiPhase2Level.diode_p.idealDiode[$i1].Vknee ($RES_SIM_118) (185) [----] end for; (186) [SCAL] (1) $FUN_14 = sin(-integrator.y) ($RES_$AUX_294) (187) [ARRY] (3) multiPhase2Level.transistor_p.idealGTOThyristor.n.v = multiPhase2Level.transistor_p.plug_n.pin.v ($RES_SIM_276) (188) [SCAL] (1) multiPhase2Level.powerTotalAC = sum(multiPhase2Level.powerAC) ($RES_$AUX_293) (189) [FOR-] (3) ($RES_SIM_277) (189) [----] for $i1 in 1:3 loop (189) [----] [SCAL] (1) multiPhase2Level.transistor_p.idealGTOThyristor[$i1].p.i - multiPhase2Level.transistor_p.plug_p.pin[$i1].i = 0.0 ($RES_SIM_278) (189) [----] end for; (190) [FOR-] (3) ($RES_SIM_119) (190) [----] for $i1 in 1:3 loop (190) [----] [SCAL] (1) multiPhase2Level.diode_p.idealDiode[$i1].v = multiPhase2Level.diode_p.idealDiode[$i1].s * (if multiPhase2Level.diode_p.idealDiode[$i1].off then 1.0 else multiPhase2Level.diode_p.idealDiode[$i1].Ron) + multiPhase2Level.diode_p.idealDiode[$i1].Vknee ($RES_SIM_120) (190) [----] end for; (191) [FOR-] (3) ($RES_SIM_79) (191) [----] for $i1 in 1:3 loop (191) [----] [SCAL] (1) multiPhase2Level.diode_n.idealDiode[$i1].LossPower = multiPhase2Level.diode_n.idealDiode[$i1].v * multiPhase2Level.diode_n.idealDiode[$i1].i ($RES_SIM_80) (191) [----] end for; (192) [ARRY] (3) multiPhase2Level.transistor_p.idealGTOThyristor.p.v = multiPhase2Level.transistor_p.plug_p.pin.v ($RES_SIM_279) (193) [ARRY] (3) potentialSensor.potentialSensor.phi = potentialSensor.phi ($RES_SIM_196) (194) [FOR-] (3) ($RES_SIM_197) (194) [----] for $i1 in 1:3 loop (194) [----] [SCAL] (1) potentialSensor.potentialSensor[$i1].p.i - potentialSensor.plug_p.pin[$i1].i = 0.0 ($RES_SIM_198) (194) [----] end for; (195) [ARRY] (3) potentialSensor.potentialSensor.p.v = potentialSensor.plug_p.pin.v ($RES_SIM_199) (196) [ARRY] (3) multiPhase2Level.andCondition_p.u1 = multiPhase2Level.fire_p ($RES_SIM_200) (197) [SCAL] (1) multiPhase2Level.enableLogic.internalEnable[3] = multiPhase2Level.andCondition_n[3].u2 ($RES_SIM_201) (198) [SCAL] (1) multiPhase2Level.enableLogic.internalEnable[3] = multiPhase2Level.andCondition_p[3].u2 ($RES_SIM_202) (199) [SCAL] (1) multiPhase2Level.enableLogic.internalEnable[2] = multiPhase2Level.andCondition_n[2].u2 ($RES_SIM_203)