Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr Modelica_3.1_Modelica.Electrical.PowerConverters.Examples.DCAC.MultiPhaseTwoLevel.ThreePhaseTwoLevel_PWM.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo", uses=false) Using package Modelica with version 3.2.3 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo) Using package Complex with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo) Using package ModelicaServices with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo) Running command: translateModel(Modelica.Electrical.PowerConverters.Examples.DCAC.MultiPhaseTwoLevel.ThreePhaseTwoLevel_PWM,tolerance=1e-05,outputFormat="empty",numberOfIntervals=4000,variableFilter="",fileNamePrefix="Modelica_3.1_Modelica.Electrical.PowerConverters.Examples.DCAC.MultiPhaseTwoLevel.ThreePhaseTwoLevel_PWM") translateModel(Modelica.Electrical.PowerConverters.Examples.DCAC.MultiPhaseTwoLevel.ThreePhaseTwoLevel_PWM,tolerance=1e-05,outputFormat="empty",numberOfIntervals=4000,variableFilter="",fileNamePrefix="Modelica_3.1_Modelica.Electrical.PowerConverters.Examples.DCAC.MultiPhaseTwoLevel.ThreePhaseTwoLevel_PWM") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001017/0.001018, allocations: 108 kB / 16.42 MB, free: 5.984 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.001016/0.001016, allocations: 186.2 kB / 17.36 MB, free: 5.574 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo): time 1.451/1.451, allocations: 205.1 MB / 223.2 MB, free: 12.22 MB / 190.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 2.843e-05/2.844e-05, allocations: 3.547 kB / 327.2 MB, free: 3.312 MB / 270.1 MB Notification: Performance of NFInst.instantiate(Modelica.Electrical.PowerConverters.Examples.DCAC.MultiPhaseTwoLevel.ThreePhaseTwoLevel_PWM): time 0.007445/0.007481, allocations: 6.026 MB / 333.2 MB, free: 13.26 MB / 286.1 MB Notification: Performance of NFInst.instExpressions: time 0.00924/0.01675, allocations: 4.598 MB / 337.8 MB, free: 8.645 MB / 286.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.001683/0.01847, allocations: 35.75 kB / 337.9 MB, free: 8.609 MB / 286.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0008091/0.01928, allocations: 285.8 kB / 338.1 MB, free: 8.328 MB / 286.1 MB Notification: Performance of NFTyping.typeBindings: time 0.001367/0.02066, allocations: 469.4 kB / 338.6 MB, free: 7.867 MB / 286.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.004477/0.02515, allocations: 1.776 MB / 340.4 MB, free: 6.09 MB / 286.1 MB Notification: Performance of NFFlatten.flatten: time 0.003436/0.0286, allocations: 2.842 MB / 343.2 MB, free: 3.234 MB / 286.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.001106/0.02971, allocations: 0.8725 MB / 344.1 MB, free: 2.34 MB / 286.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.001584/0.03131, allocations: 0.9818 MB / 345.1 MB, free: 1.355 MB / 286.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.001165/0.03249, allocations: 0.8994 MB / 346 MB, free: 464 kB / 286.1 MB Notification: Performance of NFPackage.collectConstants: time 0.0002142/0.03272, allocations: 160 kB / 346.1 MB, free: 304 kB / 286.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0005438/0.03327, allocations: 291.7 kB / 346.4 MB, free: 12 kB / 286.1 MB Notification: Performance of combineBinaries: time 0.001735/0.03501, allocations: 2.156 MB / 348.6 MB, free: 13.83 MB / 302.1 MB Notification: Performance of replaceArrayConstructors: time 0.0009958/0.03602, allocations: 1.339 MB / 349.9 MB, free: 12.48 MB / 302.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0003391/0.03637, allocations: 199.4 kB / 350.1 MB, free: 12.28 MB / 302.1 MB Notification: Performance of FrontEnd: time 0.000312/0.03669, allocations: 47.81 kB / 350.1 MB, free: 12.23 MB / 302.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 400 (206) * Number of variables: 400 (182) Notification: Performance of Bindings: time 0.006809/0.0435, allocations: 6.638 MB / 356.8 MB, free: 5.422 MB / 302.1 MB Notification: Performance of FunctionAlias: time 0.0006506/0.04417, allocations: 0.502 MB / 357.3 MB, free: 4.922 MB / 302.1 MB Notification: Performance of Early Inline: time 0.003762/0.04794, allocations: 3.545 MB / 360.8 MB, free: 1.336 MB / 302.1 MB Notification: Performance of simplify1: time 0.0002466/0.0482, allocations: 159.8 kB / 361 MB, free: 1.18 MB / 302.1 MB Notification: Performance of Alias: time 0.004123/0.05233, allocations: 3.337 MB / 364.3 MB, free: 13.61 MB / 318.1 MB Notification: Performance of simplify2: time 0.000196/0.05254, allocations: 143.8 kB / 364.5 MB, free: 13.46 MB / 318.1 MB Notification: Performance of Events: time 0.0008994/0.05345, allocations: 0.7476 MB / 365.2 MB, free: 12.71 MB / 318.1 MB Notification: Performance of Detect States: time 0.001181/0.05464, allocations: 1.153 MB / 366.4 MB, free: 11.54 MB / 318.1 MB Notification: Performance of Partitioning: time 0.001611/0.05627, allocations: 1.477 MB / 367.8 MB, free: 9.965 MB / 318.1 MB Error: Internal error NBSlice.fillDependencyArray failed because number of flattened indices 3 for dependency toSpacePhasor.u could not be divided 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 (176/402) **************************** (1) [ALGB] (3) flow Real[3] potentialSensor.plug_p.pin.i (2) [DISC] (1) protected discrete Real pwm.svPWM.ta (fixed = true, start = 0.0) (3) [DISC] (1) protected discrete Real pwm.svPWM.tb (fixed = true, start = 0.0) (4) [DISC] (1) Boolean $SEV_20 (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) [ALGB] (1) Real harmonic.product1.y (29) [ALGB] (3) flow Real[3] multiPhase2Level.transistor_n.plug_p.pin.i (30) [ALGB] (3) flow Real[3] multiPhase2Level.transistor_p.plug_p.pin.i (31) [DISC] (3) Boolean[3] $SEV_14[$i1] (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 $FUN_7 (60) [ALGB] (1) Real $FUN_6 (61) [ALGB] (1) Real harmonic.sin1.y (62) [ALGB] (1) Real $FUN_5 (63) [ALGB] (1) flow Real ground.p.i (64) [ALGB] (1) Real $FUN_2 (65) [ALGB] (1) Real dcNeg.n.v (66) [ALGB] (1) Real $FUN_1 (67) [ALGB] (1) Real toSpacePhasor.zero (68) [DISC] (3) Boolean[3] multiPhase2Level.transistor_p.idealGTOThyristor.fire (69) [ALGB] (1) Real $FUN_22 (70) [DISC] (3) Boolean[3] pwm.svPWM.fire_p (71) [ALGB] (1) Real $FUN_21 (72) [ALGB] (3) Real[3] multiPhase2Level.diode_p.i (73) [ALGB] (3) Real[3] multiPhase2Level.vAC = multiPhase2Level.ac.pin[:].v (74) [ALGB] (1) Real $FUN_20 (75) [DISC] (3) Boolean[3] pwm.svPWM.fire_n (76) [DISC] (3) Boolean[3] $SEV_13[$i1] (77) [ALGB] (3) Real[3] multiPhase2Level.transistor_n.idealGTOThyristor.LossPower (78) [ALGB] (3) flow Real[3] multiPhase2Level.diode_n.idealDiode.p.i (79) [DISC] (3) Boolean[3] $SEV_9[$i1] (80) [DISC] (1) protected discrete Real pwm.svPWM.uRef (fixed = true, start = 0.0) (81) [DISC] (3) Boolean[3] multiPhase2Level.transistor_n.idealGTOThyristor.fire (82) [ALGB] (3) Real[3] multiPhase2Level.powerAC = multiPhase2Level.vAC * multiPhase2Level.iAC (83) [DISC] (3) Boolean[3] multiPhase2Level.transistor_p.fire (84) [DISC] (3) Boolean[3] multiPhase2Level.diode_n.idealDiode.off (start = {true for $i1 in 1:3}) (85) [ALGB] (3) Real[3] multiPhase2Level.transistor_p.idealGTOThyristor.LossPower (86) [ALGB] (3) Real[3] multiPhase2Level.iAC = multiPhase2Level.ac.pin[:].i (87) [ALGB] (1) Real $FUN_19 (88) [ALGB] (1) Real $FUN_18 (89) [ALGB] (1) Real $FUN_17 (90) [ALGB] (1) Real $FUN_16 (91) [ALGB] (1) Real $FUN_15 (92) [ALGB] (1) Real dcNeg.i (93) [ALGB] (1) Real multiPhase2Level.powerTotalAC = sum(multiPhase2Level.powerAC) (94) [DISC] (3) Boolean[3] multiPhase2Level.fire_n (95) [DISC] (3) Boolean[3] multiPhase2Level.transistor_n.idealGTOThyristor.off (start = {true for $i1 in 1:3}) (96) [DISC] (3) Boolean[3] multiPhase2Level.fire_p (97) [DER-] (4) Real[2, 2] $DER.filter.x (98) [ALGB] (3) Real[3] multiPhase2Level.transistor_p.idealGTOThyristor.v (99) [DISC] (1) Boolean $SEV_3 (100) [ALGB] (3) protected Real[3] multiPhase2Level.transistor_p.idealGTOThyristor.s (start = {0.0 for $i1 in 1:3}) (101) [ALGB] (3) flow Real[3] multiPhase2Level.transistor_n.idealGTOThyristor.p.i (102) [DISC] (3) Boolean[3] multiPhase2Level.andCondition_n.y (103) [DISC] (3) Boolean[3] multiPhase2Level.andCondition_n.u2 (104) [DISC] (3) Boolean[3] multiPhase2Level.andCondition_n.u1 (105) [DISC] (3) Boolean[3] $SEV_12[$i1] (106) [DISC] (3) Boolean[3] pwm.fire_p (107) [DISC] (3) Boolean[3] pwm.fire_n (108) [ALGB] (3) Real[3] multiPhase2Level.transistor_p.idealGTOThyristor.i (109) [DISC] (3) Boolean[3] $SEV_8[$i1] (110) [ALGB] (3) Real[3] potentialSensor.potentialSensor.phi (111) [ALGB] (3) Real[3] multiPhase2Level.transistor_n.idealGTOThyristor.p.v (112) [ALGB] (1) Real sine.y (113) [ALGB] (2) Real[2] rotator.y (114) [ALGB] (3) Real[3] multiPhase2Level.diode_p.plug_n.pin.v (115) [ALGB] (3) Real[3] multiPhase2Level.diode_n.plug_n.pin.v (116) [ALGB] (3) Real[3] multiPhase2Level.transistor_p.idealGTOThyristor.n.v (117) [ALGB] (2) Real[2] rotator.u (118) [DISC] (3) Boolean[3] multiPhase2Level.enableLogic.booleanReplicator.y (119) [ALGB] (3) Real[3] multiPhase2Level.transistor_n.i (120) [DISS] (1) protected Boolean pwm.svPWM.firstTrigger (fixed = true, start = false) (121) [ALGB] (3) flow Real[3] multiPhase2Level.diode_p.plug_n.pin.i (122) [ALGB] (3) flow Real[3] multiPhase2Level.diode_n.plug_n.pin.i (123) [ALGB] (3) flow Real[3] multiPhase2Level.transistor_p.idealGTOThyristor.n.i (124) [ALGB] (3) Real[3] multiPhase2Level.transistor_n.v (125) [DISC] (1) protected Boolean pwm.svPWM.sampleTrigger (126) [DISC] (1) protected discrete Real pwm.svPWM.T0 (fixed = true, start = pwm.svPWM.startTime) (127) [DER-] (1) Real $DER.integrator.y (128) [ALGB] (6) protected Real[2, 3] filter.uu (129) [ALGB] (2) Real[2] pwm.u (130) [ALGB] (3) flow Real[3] multiPhase2Level.transistor_n.plug_n.pin.i (131) [ALGB] (3) flow Real[3] multiPhase2Level.transistor_p.plug_n.pin.i (132) [ALGB] (1) Real multiPhase2Level.powerDC = multiPhase2Level.vDC * multiPhase2Level.iDC (133) [ALGB] (3) flow Real[3] multiPhase2Level.diode_p.idealDiode.n.i (134) [DISC] (3) Boolean[3] $SEV_11[$i1] (135) [ALGB] (3) Real[3] multiPhase2Level.diode_n.v (136) [DISC] (3) Boolean[3] $SEV_7[$i1] (137) [ALGB] (3) Real[3] multiPhase2Level.diode_n.idealDiode.n.v (138) [ALGB] (1) Real dcPos.p.v (139) [ALGB] (2) Real[2] filter.y (140) [DISC] (3) Boolean[3] multiPhase2Level.transistor_n.fire (141) [ALGB] (2) Real[2] filter.u (142) [ALGB] (3) Real[3] multiPhase2Level.transistor_n.plug_n.pin.v (143) [ALGB] (3) Real[3] multiPhase2Level.transistor_p.plug_n.pin.v (144) [ALGB] (3) Real[3] multiPhase2Level.diode_p.idealDiode.n.v (145) [ALGB] (3) Real[3] multiPhase2Level.diode_n.i (146) [DISC] (1) protected discrete Real pwm.svPWM.t0 (fixed = true, start = pwm.svPWM.samplePeriod) (147) [ALGB] (3) flow Real[3] multiPhase2Level.diode_n.idealDiode.n.i (148) [ALGB] (3) Real[3] multiPhase2Level.transistor_n.idealGTOThyristor.v (149) [ALGB] (2) Real[2] pwm.svPWM.u (150) [ALGB] (3) flow Real[3] multiPhase2Level.star_n.plug_p.pin.i (151) [ALGB] (3) flow Real[3] multiPhase2Level.star_p.plug_p.pin.i (152) [ALGB] (3) protected Real[3] multiPhase2Level.transistor_n.idealGTOThyristor.s (start = {0.0 for $i1 in 1:3}) (153) [ALGB] (3) Real[3] multiPhase2Level.diode_p.idealDiode.LossPower (154) [DISC] (1) protected Integer pwm.svPWM.ka (fixed = true, start = 0) (155) [DISC] (1) protected Integer pwm.svPWM.kb (fixed = true, start = 0) (156) [DER-] (1) Real $DER.harmonic.mean1.x (157) [DISC] (3) Boolean[3] multiPhase2Level.andCondition_p.u2 (158) [DISC] (3) Boolean[3] multiPhase2Level.andCondition_p.u1 (159) [ALGB] (3) Real[3] multiPhase2Level.transistor_n.idealGTOThyristor.i (160) [ALGB] (3) Real[3] multiPhase2Level.diode_p.idealDiode.v (161) [ALGB] (3) Real[3] multiPhase2Level.diode_n.idealDiode.v (162) [ALGB] (3) Real[3] multiPhase2Level.star_n.plug_p.pin.v (163) [ALGB] (1) Real harmonic.product2.y (164) [ALGB] (3) Real[3] multiPhase2Level.star_p.plug_p.pin.v (165) [ALGB] (3) protected Real[3] multiPhase2Level.diode_p.idealDiode.s (start = {0.0 for $i1 in 1:3}) (166) [ALGB] (3) protected Real[3] multiPhase2Level.diode_n.idealDiode.s (start = {0.0 for $i1 in 1:3}) (167) [ALGB] (2) Real[2] harmonic.product2.u (168) [ALGB] (3) Real[3] potentialSensor.phi (169) [DISC] (1) protected discrete Real pwm.svPWM.phiSec (fixed = true, start = 0.0) (170) [ALGB] (1) Real multiPhase2Level.LossPower (171) [ALGB] (3) Real[3] potentialSensor.plug_p.pin.v (172) [ALGB] (3) Real[3] multiPhase2Level.diode_p.idealDiode.i (173) [ALGB] (3) Real[3] multiPhase2Level.diode_n.idealDiode.i (174) [ALGB] (4) protected Real[2, 2] rotator.RotationMatrix = {{cos(-integrator.y), -sin(-integrator.y)}, {sin(-integrator.y), cos(-integrator.y)}} (175) [ALGB] (1) Real multiPhase2Level.vDC = dcPos.p.v - dcNeg.n.v (176) [DISC] (3) Boolean[3] $SEV_10[$i1] System Equations (200/402) **************************** (1) [ARRY] (3) multiPhase2Level.andCondition_p.u1 = multiPhase2Level.fire_p ($RES_SIM_204) (2) [SCAL] (1) multiPhase2Level.enableLogic.internalEnable[3] = multiPhase2Level.andCondition_n[3].u2 ($RES_SIM_205) (3) [FOR-] (3) ($RES_SIM_80) (3) [----] for $i1 in 1:3 loop (3) [----] [SCAL] (1) multiPhase2Level.diode_n.idealDiode[$i1].LossPower = multiPhase2Level.diode_n.idealDiode[$i1].v * multiPhase2Level.diode_n.idealDiode[$i1].i ($RES_SIM_81) (3) [----] end for; (4) [SCAL] (1) multiPhase2Level.enableLogic.internalEnable[3] = multiPhase2Level.andCondition_p[3].u2 ($RES_SIM_206) (5) [FOR-] (3) ($RES_SIM_121) (5) [----] for $i1 in 1:3 loop (5) [----] [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_122) (5) [----] end for; (6) [ARRY] (2) pwm.u = pwm.svPWM.u ($RES_SIM_280) (7) [SCAL] (1) multiPhase2Level.enableLogic.internalEnable[2] = multiPhase2Level.andCondition_n[2].u2 ($RES_SIM_207) (8) [FOR-] (3) ($RES_SIM_82) (8) [----] for $i1 in 1:3 loop (8) [----] [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_83) (8) [----] end for; (9) [SCAL] (1) multiPhase2Level.powerTotalAC = sum(multiPhase2Level.powerAC) ($RES_$AUX_289) (10) [SCAL] (1) multiPhase2Level.enableLogic.internalEnable[2] = multiPhase2Level.andCondition_p[2].u2 ($RES_SIM_208) (11) [FOR-] (3) ($RES_SIM_123) (11) [----] for $i1 in 1:3 loop (11) [----] [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_124) (11) [----] end for; (12) [SCAL] (1) multiPhase2Level.enableLogic.internalEnable[1] = multiPhase2Level.andCondition_n[1].u2 ($RES_SIM_209) (13) [FOR-] (3) ($RES_SIM_84) (13) [----] for $i1 in 1:3 loop (13) [----] [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_85) (13) [----] end for; (14) [FOR-] (3) ($RES_SIM_125) (14) [----] for $i1 in 1:3 loop (14) [----] [SCAL] (1) multiPhase2Level.diode_p.idealDiode[$i1].off = $SEV_10[$i1] ($RES_SIM_126) (14) [----] end for; (15) [FOR-] (3) ($RES_SIM_86) (15) [----] for $i1 in 1:3 loop (15) [----] [SCAL] (1) multiPhase2Level.diode_n.idealDiode[$i1].off = $SEV_7[$i1] ($RES_SIM_87) (15) [----] end for; (16) [ARRY] (3) multiPhase2Level.transistor_p.i = multiPhase2Level.transistor_p.plug_p.pin.i ($RES_SIM_127) (17) [ARRY] (3) multiPhase2Level.transistor_n.i = multiPhase2Level.transistor_n.plug_p.pin.i ($RES_SIM_88) (18) [ARRY] (3) multiPhase2Level.transistor_p.v = multiPhase2Level.transistor_p.plug_p.pin.v - multiPhase2Level.transistor_p.plug_n.pin.v ($RES_SIM_128) (19) [ARRY] (3) multiPhase2Level.transistor_n.v = multiPhase2Level.transistor_n.plug_p.pin.v - multiPhase2Level.transistor_n.plug_n.pin.v ($RES_SIM_89) (20) [FOR-] (3) ($RES_SIM_129) (20) [----] for $i1 in 1:3 loop (20) [----] [SCAL] (1) multiPhase2Level.transistor_p.idealGTOThyristor[$i1].i = multiPhase2Level.transistor_p.idealGTOThyristor[$i1].p.i ($RES_SIM_130) (20) [----] end for; (21) [SCAL] (1) multiPhase2Level.enableLogic.internalEnable[1] = multiPhase2Level.andCondition_p[1].u2 ($RES_SIM_210) (22) [ARRY] (3) multiPhase2Level.fire_n = multiPhase2Level.andCondition_n.u1 ($RES_SIM_211) (23) [ARRY] (3) multiPhase2Level.andCondition_n.y = multiPhase2Level.transistor_n.fire ($RES_SIM_212) (24) [ARRY] (3) multiPhase2Level.andCondition_p.y = multiPhase2Level.transistor_p.fire ($RES_SIM_213) (25) [ALGO] (10) ($RES_SIM_15) (25) [----] when pwm.svPWM.sampleTrigger then (25) [----] pwm.svPWM.uRef := min($FUN_17 / (pwm.svPWM.uMax * 0.6666666666666666), 0.8660254037844387); (25) [----] pwm.svPWM.phiRef := if noEvent(pwm.svPWM.uRef < 1e-60) then 0.0 else $FUN_18; (25) [----] pwm.svPWM.phiPos := max(pwm.svPWM.phiRef + (if pwm.svPWM.phiRef < (-1e-15) then 6.283185307179586 else 0.0), 0.0); (25) [----] pwm.svPWM.ka := integer(pwm.svPWM.phiPos / 1.0471975511965976); (25) [----] pwm.svPWM.kb := if noEvent(pwm.svPWM.ka >= 5) then 0 else pwm.svPWM.ka + 1; (25) [----] pwm.svPWM.phiSec := pwm.svPWM.phiPos - (3.141592653589793 * pwm.svPWM.ka) / 3.0; (25) [----] pwm.svPWM.tb := min(($FUN_19 * pwm.svPWM.uRef) / 0.8660254037844386, 1.0); (25) [----] pwm.svPWM.ta := min(pwm.svPWM.uRef * $FUN_20 - pwm.svPWM.tb * 0.5000000000000001, 1.0); (25) [----] pwm.svPWM.t0 := max(1.0 - (pwm.svPWM.tb + pwm.svPWM.ta), 0.0); (25) [----] pwm.svPWM.T0 := time; (25) [----] end when; (26) [SCAL] (1) toPolar.y[2] = if noEvent($SEV_3) then 0.0 else $FUN_16 ($RES_SIM_16) (27) [FOR-] (3) ($RES_SIM_90) (27) [----] for $i1 in 1:3 loop (27) [----] [SCAL] (1) multiPhase2Level.transistor_n.idealGTOThyristor[$i1].i = multiPhase2Level.transistor_n.idealGTOThyristor[$i1].p.i ($RES_SIM_91) (27) [----] end for; (28) [SCAL] (1) toPolar.y[1] = $FUN_15 ($RES_SIM_17) (29) [FOR-] (3) ($RES_SIM_131) (29) [----] for $i1 in 1:3 loop (29) [----] [SCAL] (1) 0.0 = multiPhase2Level.transistor_p.idealGTOThyristor[$i1].p.i + multiPhase2Level.transistor_p.idealGTOThyristor[$i1].n.i ($RES_SIM_132) (29) [----] end for; (30) [FOR-] (2) ($RES_SIM_18) (30) [----] for $i1 in 1:2 loop (30) [----] [SCAL] (1) filter[$i1].y = filter[$i1].u_nominal * filter[$i1].gain * filter[$i1].uu[3] ($RES_SIM_19) (30) [----] end for; (31) [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_217) (32) [FOR-] (3) ($RES_SIM_92) (32) [----] for $i1 in 1:3 loop (32) [----] [SCAL] (1) 0.0 = multiPhase2Level.transistor_n.idealGTOThyristor[$i1].p.i + multiPhase2Level.transistor_n.idealGTOThyristor[$i1].n.i ($RES_SIM_93) (32) [----] end for; (33) [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_218) (34) [FOR-] (3) ($RES_SIM_133) (34) [----] for $i1 in 1:3 loop (34) [----] [SCAL] (1) multiPhase2Level.transistor_p.idealGTOThyristor[$i1].v = multiPhase2Level.transistor_p.idealGTOThyristor[$i1].p.v - multiPhase2Level.transistor_p.idealGTOThyristor[$i1].n.v ($RES_SIM_134) (34) [----] end for; (35) [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_219) (36) [FOR-] (3) ($RES_SIM_94) (36) [----] for $i1 in 1:3 loop (36) [----] [SCAL] (1) multiPhase2Level.transistor_n.idealGTOThyristor[$i1].v = multiPhase2Level.transistor_n.idealGTOThyristor[$i1].p.v - multiPhase2Level.transistor_n.idealGTOThyristor[$i1].n.v ($RES_SIM_95) (36) [----] end for; (37) [FOR-] (3) ($RES_SIM_137) (37) [----] for $i1 in 1:3 loop (37) [----] [SCAL] (1) multiPhase2Level.transistor_p.idealGTOThyristor[$i1].LossPower = multiPhase2Level.transistor_p.idealGTOThyristor[$i1].v * multiPhase2Level.transistor_p.idealGTOThyristor[$i1].i ($RES_SIM_138) (37) [----] end for; (38) [FOR-] (3) ($RES_SIM_98) (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_99) (38) [----] end for; (39) [FOR-] (3) ($RES_SIM_139) (39) [----] for $i1 in 1:3 loop (39) [----] [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_140) (39) [----] end for; (40) [FOR-] (4) ($RES_SIM_20) (40) [----] for {$i1 in 1:2, $i2 in 1:2} loop (40) [----] [SCAL] (1) filter[$i1].uu[$i2 + 1] = filter[$i1].x[$i2] ($RES_SIM_21) (40) [----] end for; (41) [SCAL] (1) multiPhase2Level.transistor_n.plug_p.pin[3].v = multiPhase2Level.diode_p.plug_p.pin[3].v ($RES_SIM_220) (42) [FOR-] (4) ($RES_SIM_22) (42) [----] for {$i1 in 1:2, $i2 in 1:2} loop (42) [----] [SCAL] (1) $DER.filter[$i1].x[$i2] = filter[$i1].r[$i2] * (filter[$i1].x[$i2] - filter[$i1].uu[$i2]) ($RES_SIM_23) (42) [----] end for; (43) [SCAL] (1) multiPhase2Level.transistor_n.plug_p.pin[3].v = multiPhase2Level.diode_n.plug_n.pin[3].v ($RES_SIM_221) (44) [SCAL] (1) multiPhase2Level.transistor_n.plug_p.pin[3].v = multiPhase2Level.transistor_p.plug_n.pin[3].v ($RES_SIM_222) (45) [FOR-] (2) ($RES_SIM_24) (45) [----] for $i1 in 1:2 loop (45) [----] [SCAL] (1) filter[$i1].uu[1] = filter[$i1].u / filter[$i1].u_nominal ($RES_SIM_25) (45) [----] end for; (46) [SCAL] (1) multiPhase2Level.transistor_n.plug_p.pin[3].v = multiPhase2Level.ac.pin[3].v ($RES_SIM_223) (47) [SCAL] (1) multiPhase2Level.transistor_n.plug_p.pin[2].v = multiPhase2Level.diode_p.plug_p.pin[2].v ($RES_SIM_224) (48) [SCAL] (1) multiPhase2Level.transistor_n.plug_p.pin[2].v = multiPhase2Level.diode_n.plug_n.pin[2].v ($RES_SIM_225) (49) [SCAL] (1) multiPhase2Level.transistor_n.plug_p.pin[2].v = multiPhase2Level.transistor_p.plug_n.pin[2].v ($RES_SIM_226) (50) [FOR-] (3) ($RES_SIM_141) (50) [----] for $i1 in 1:3 loop (50) [----] [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_142) (50) [----] end for; (51) [SCAL] (1) multiPhase2Level.transistor_n.plug_p.pin[2].v = multiPhase2Level.ac.pin[2].v ($RES_SIM_227) (52) [SCAL] (1) multiPhase2Level.transistor_n.plug_p.pin[1].v = multiPhase2Level.diode_p.plug_p.pin[1].v ($RES_SIM_228) (53) [FOR-] (3) ($RES_SIM_143) (53) [----] for $i1 in 1:3 loop (53) [----] [SCAL] (1) multiPhase2Level.transistor_p.idealGTOThyristor[$i1].off = $SEV_12[$i1] ($RES_SIM_144) (53) [----] end for; (54) [SCAL] (1) multiPhase2Level.transistor_n.plug_p.pin[1].v = multiPhase2Level.diode_n.plug_n.pin[1].v ($RES_SIM_229) (55) [FOR-] (3) ($RES_SIM_145) (55) [----] for $i1 in 1:3 loop (55) [----] [SCAL] (1) multiPhase2Level.andCondition_n[$i1].y = $SEV_13[$i1] ($RES_SIM_146) (55) [----] end for; (56) [ARRY] (3) multiPhase2Level.enableLogic.booleanReplicator.y = {multiPhase2Level.enableLogic.enableConstantSource.k for $i1 in 1:3} ($RES_SIM_147) (57) [FOR-] (3) ($RES_SIM_149) (57) [----] for $i1 in 1:3 loop (57) [----] [SCAL] (1) multiPhase2Level.andCondition_p[$i1].y = $SEV_14[$i1] ($RES_SIM_150) (57) [----] end for; (58) [SCAL] (1) multiPhase2Level.transistor_n.plug_p.pin[1].v = multiPhase2Level.transistor_p.plug_n.pin[1].v ($RES_SIM_230) (59) [SCAL] (1) $DER.integrator.y = integrator.k * const.k ($RES_SIM_32) (60) [SCAL] (1) multiPhase2Level.vDC = dcPos.p.v - dcNeg.n.v ($RES_BND_281) (61) [SCAL] (1) multiPhase2Level.transistor_n.plug_p.pin[1].v = multiPhase2Level.ac.pin[1].v ($RES_SIM_231) (62) [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_232) (63) [SCAL] (1) multiPhase2Level.powerDC = multiPhase2Level.vDC * multiPhase2Level.iDC ($RES_BND_283) (64) [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_233) (65) [ARRY] (3) multiPhase2Level.vAC = multiPhase2Level.ac.pin[:].v ($RES_BND_284) (66) [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_234) (67) [ARRY] (2) rotator.y = rotator.RotationMatrix * rotator.u ($RES_SIM_36) (68) [ARRY] (3) multiPhase2Level.iAC = multiPhase2Level.ac.pin[:].i ($RES_BND_285) (69) [SCAL] (1) multiPhase2Level.star_n.plug_p.pin[3].v = multiPhase2Level.transistor_n.plug_n.pin[3].v ($RES_SIM_235) (70) [ARRY] (2) toSpacePhasor.y = toSpacePhasor.TransformationMatrix * toSpacePhasor.u ($RES_SIM_37) (71) [ARRY] (3) multiPhase2Level.powerAC = multiPhase2Level.vAC * multiPhase2Level.iAC ($RES_BND_286) (72) [SCAL] (1) multiPhase2Level.star_n.plug_p.pin[3].v = multiPhase2Level.diode_n.plug_p.pin[3].v ($RES_SIM_236) (73) [WHEN] (1)when pwm.svPWM.sampleTrigger then (73) [----] pwm.svPWM.firstTrigger := time <= (pwm.svPWM.startTime + pwm.svPWM.samplePeriod / 2.0) (73) [----] end when; (74) [SCAL] (1) multiPhase2Level.star_n.plug_p.pin[2].v = multiPhase2Level.transistor_n.plug_n.pin[2].v ($RES_SIM_237) (75) [SCAL] (1) pwm.svPWM.sampleTrigger = $TEV_6 ($RES_SIM_152) (76) [ARRY] (4) rotator.RotationMatrix = {{$FUN_21, -$FUN_22}, {$FUN_22, $FUN_21}} ($RES_BND_288) (77) [SCAL] (1) multiPhase2Level.star_n.plug_p.pin[2].v = multiPhase2Level.diode_n.plug_p.pin[2].v ($RES_SIM_238) (78) [ARRY] (3) pwm.svPWM.fire_n = not pwm.svPWM.fire_p ($RES_SIM_153) (79) [SCAL] (1) multiPhase2Level.star_n.plug_p.pin[1].v = multiPhase2Level.transistor_n.plug_n.pin[1].v ($RES_SIM_239) (80) [-IF-] (3)if $TEV_7 then (80) [----] [ARRY] (3) pwm.svPWM.fire_p = {true for $i1 in 1:3} ($RES_SIM_155) (80) [----] elseif $SEV_15 then (80) [----] [ARRY] (3) pwm.svPWM.fire_p = {false for $i1 in 1:3} ($RES_SIM_156) (80) [----] elseif $SEV_16 then (80) [----] [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) (80) [----] elseif $SEV_17 then (80) [----] [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_158) (80) [----] elseif $SEV_18 then (80) [----] [ARRY] (3) pwm.svPWM.fire_p = {true for $i1 in 1:3} ($RES_SIM_159) (80) [----] elseif $SEV_19 then (80) [----] [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_160) (80) [----] elseif $SEV_20 then (80) [----] [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_161) (80) [----] else (80) [----] [ARRY] (3) pwm.svPWM.fire_p = {false for $i1 in 1:3} ($RES_SIM_162) (80) [----] end if; (81) [SCAL] (1) $TEV_4 = time < harmonic.sin2.startTime ($RES_EVT_323) (82) [SCAL] (1) $TEV_5 = time < harmonic.sin1.startTime ($RES_EVT_324) (83) [SCAL] (1) $TEV_6 = sample(6, pwm.svPWM.startTime, pwm.svPWM.samplePeriod) ($RES_EVT_325) (84) [SCAL] (1) $TEV_7 = time < pwm.svPWM.startTime ($RES_EVT_326) (85) [SCAL] (1) $TEV_8 = time < sine.startTime ($RES_EVT_327) (86) [SCAL] (1) $TEV_9 = time < cosine.startTime ($RES_EVT_328) (87) [SCAL] (1) $SEV_3 = toPolar.y[1] <= 1e-60 ($RES_EVT_329) (88) [SCAL] (1) multiPhase2Level.star_n.plug_p.pin[1].v = multiPhase2Level.diode_n.plug_p.pin[1].v ($RES_SIM_240) (89) [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_241) (90) [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_242) (91) [SCAL] (1) $DER.harmonic.mean2.x = harmonic.product2.y ($RES_SIM_44) (92) [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_243) (93) [SCAL] (1) multiPhase2Level.star_p.plug_p.pin[3].v = multiPhase2Level.transistor_p.plug_p.pin[3].v ($RES_SIM_244) (94) [SCAL] (1) multiPhase2Level.star_p.plug_p.pin[3].v = multiPhase2Level.diode_p.plug_n.pin[3].v ($RES_SIM_245) (95) [SCAL] (1) $DER.harmonic.mean1.x = harmonic.product1.y ($RES_SIM_47) (96) [SCAL] (1) multiPhase2Level.star_p.plug_p.pin[2].v = multiPhase2Level.transistor_p.plug_p.pin[2].v ($RES_SIM_246) (97) [SCAL] (1) multiPhase2Level.star_p.plug_p.pin[2].v = multiPhase2Level.diode_p.plug_n.pin[2].v ($RES_SIM_247) (98) [SCAL] (1) multiPhase2Level.star_p.plug_p.pin[1].v = multiPhase2Level.transistor_p.plug_p.pin[1].v ($RES_SIM_248) (99) [SCAL] (1) sine.y = sine.offset + (if $TEV_8 then 0.0 else sine.amplitude * $FUN_2) ($RES_SIM_163) (100) [SCAL] (1) multiPhase2Level.star_p.plug_p.pin[1].v = multiPhase2Level.diode_p.plug_n.pin[1].v ($RES_SIM_249) (101) [SCAL] (1) cosine.y = cosine.offset + (if $TEV_9 then 0.0 else cosine.amplitude * $FUN_1) ($RES_SIM_164) (102) [SCAL] (1) dcNeg.i + ground.p.i + multiPhase2Level.iDC = 0.0 ($RES_SIM_166) (103) [ARRY] (2) filter.y = toPolar.u ($RES_SIM_169) (104) [FOR-] (3) ($RES_EVT_336) (104) [----] for $i1 in 1:3 loop (104) [----] [SCAL] (1) $SEV_7[$i1] = multiPhase2Level.diode_n.idealDiode[$i1].s < 0.0 ($RES_EVT_337) (104) [----] end for; (105) [FOR-] (3) ($RES_EVT_338) (105) [----] for $i1 in 1:3 loop (105) [----] [SCAL] (1) $SEV_8[$i1] = multiPhase2Level.transistor_n.idealGTOThyristor[$i1].s < 0.0 ($RES_EVT_339) (105) [----] end for; (106) [SCAL] (1) harmonic.sin2.y = harmonic.sin2.offset + (if $TEV_4 then 0.0 else harmonic.sin2.amplitude * $FUN_9) ($RES_SIM_50) (107) [SCAL] (1) harmonic.sin1.y = harmonic.sin1.offset + (if $TEV_5 then 0.0 else harmonic.sin1.amplitude * $FUN_8) ($RES_SIM_51) (108) [FOR-] (3) ($RES_SIM_250) (108) [----] for $i1 in 1:3 loop (108) [----] [SCAL] (1) multiPhase2Level.diode_n.idealDiode[$i1].n.i - multiPhase2Level.diode_n.plug_n.pin[$i1].i = 0.0 ($RES_SIM_251) (108) [----] end for; (109) [FOR-] (3) ($RES_SIM_52) (109) [----] for $i1 in 1:3 loop (109) [----] [SCAL] (1) potentialSensor.potentialSensor[$i1].phi = potentialSensor.potentialSensor[$i1].p.v ($RES_SIM_53) (109) [----] end for; (110) [ARRY] (3) multiPhase2Level.diode_n.idealDiode.n.v = multiPhase2Level.diode_n.plug_n.pin.v ($RES_SIM_252) (111) [FOR-] (3) ($RES_SIM_54) (111) [----] for $i1 in 1:3 loop (111) [----] [SCAL] (1) potentialSensor.potentialSensor[$i1].p.i = 0.0 ($RES_SIM_55) (111) [----] end for; (112) [FOR-] (3) ($RES_SIM_253) (112) [----] for $i1 in 1:3 loop (112) [----] [SCAL] (1) multiPhase2Level.diode_n.idealDiode[$i1].p.i - multiPhase2Level.diode_n.plug_p.pin[$i1].i = 0.0 ($RES_SIM_254) (112) [----] end for; (113) [ARRY] (3) multiPhase2Level.diode_n.plug_p.pin.v = multiPhase2Level.diode_n.idealDiode.p.v ($RES_SIM_255) (114) [ARRY] (2) rotator.y = filter.u ($RES_SIM_170) (115) [ARRY] (3) multiPhase2Level.transistor_n.fire = multiPhase2Level.transistor_n.idealGTOThyristor.fire ($RES_SIM_256) (116) [FOR-] (3) ($RES_SIM_257) (116) [----] for $i1 in 1:3 loop (116) [----] [SCAL] (1) multiPhase2Level.transistor_n.idealGTOThyristor[$i1].n.i - multiPhase2Level.transistor_n.plug_n.pin[$i1].i = 0.0 ($RES_SIM_258) (116) [----] end for; (117) [SCAL] (1) dcNeg.V = -dcNeg.n.v ($RES_SIM_59) (118) [SCAL] (1) potentialSensor.phi[3] = toSpacePhasor.u[3] ($RES_SIM_173) (119) [ARRY] (3) multiPhase2Level.transistor_n.idealGTOThyristor.n.v = multiPhase2Level.transistor_n.plug_n.pin.v ($RES_SIM_259) (120) [SCAL] (1) potentialSensor.phi[2] = toSpacePhasor.u[2] ($RES_SIM_174) (121) [SCAL] (1) potentialSensor.phi[1] = toSpacePhasor.u[1] ($RES_SIM_175) (122) [SCAL] (1) potentialSensor.phi[1] = harmonic.u ($RES_SIM_176) (123) [ARRY] (2) toSpacePhasor.y = rotator.u ($RES_SIM_177) (124) [FOR-] (3) ($RES_SIM_178) (124) [----] for $i1 in 1:3 loop (124) [----] [SCAL] (1) multiPhase2Level.ac.pin[$i1].i + potentialSensor.plug_p.pin[$i1].i = 0.0 ($RES_SIM_179) (124) [----] end for; (125) [FOR-] (3) ($RES_EVT_340) (125) [----] for $i1 in 1:3 loop (125) [----] [SCAL] (1) $SEV_9[$i1] = $SEV_8[$i1] or not multiPhase2Level.transistor_n.idealGTOThyristor[$i1].fire ($RES_EVT_341) (125) [----] end for; (126) [FOR-] (3) ($RES_EVT_342) (126) [----] for $i1 in 1:3 loop (126) [----] [SCAL] (1) $SEV_10[$i1] = multiPhase2Level.diode_p.idealDiode[$i1].s < 0.0 ($RES_EVT_343) (126) [----] end for; (127) [FOR-] (3) ($RES_EVT_344) (127) [----] for $i1 in 1:3 loop (127) [----] [SCAL] (1) $SEV_11[$i1] = multiPhase2Level.transistor_p.idealGTOThyristor[$i1].s < 0.0 ($RES_EVT_345) (127) [----] end for; (128) [SCAL] (1) $FUN_1 = cos(6.283185307179586 * cosine.freqHz * (time - cosine.startTime) + cosine.phase) ($RES_$AUX_311) (129) [FOR-] (3) ($RES_EVT_346) (129) [----] for $i1 in 1:3 loop (129) [----] [SCAL] (1) $SEV_12[$i1] = $SEV_11[$i1] or not multiPhase2Level.transistor_p.idealGTOThyristor[$i1].fire ($RES_EVT_347) (129) [----] end for; (130) [SCAL] (1) $FUN_2 = sin(6.283185307179586 * sine.freqHz * (time - sine.startTime) + sine.phase) ($RES_$AUX_310) (131) [FOR-] (3) ($RES_EVT_348) (131) [----] for $i1 in 1:3 loop (131) [----] [SCAL] (1) $SEV_13[$i1] = multiPhase2Level.andCondition_n[$i1].u1 and multiPhase2Level.andCondition_n[$i1].u2 ($RES_EVT_349) (131) [----] end for; (132) [FOR-] (3) ($RES_SIM_100) (132) [----] for $i1 in 1:3 loop (132) [----] [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_101) (132) [----] end for; (133) [FOR-] (3) ($RES_SIM_260) (133) [----] for $i1 in 1:3 loop (133) [----] [SCAL] (1) multiPhase2Level.transistor_n.idealGTOThyristor[$i1].p.i - multiPhase2Level.transistor_n.plug_p.pin[$i1].i = 0.0 ($RES_SIM_261) (133) [----] end for; (134) [FOR-] (3) ($RES_SIM_102) (134) [----] for $i1 in 1:3 loop (134) [----] [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_103) (134) [----] end for; (135) [SCAL] (1) dcPos.V = dcPos.p.v ($RES_SIM_63) (136) [ARRY] (3) multiPhase2Level.transistor_n.idealGTOThyristor.p.v = multiPhase2Level.transistor_n.plug_p.pin.v ($RES_SIM_262) (137) [FOR-] (3) ($RES_SIM_104) (137) [----] for $i1 in 1:3 loop (137) [----] [SCAL] (1) multiPhase2Level.transistor_n.idealGTOThyristor[$i1].off = $SEV_9[$i1] ($RES_SIM_105) (137) [----] end for; (138) [FOR-] (3) ($RES_SIM_263) (138) [----] for $i1 in 1:3 loop (138) [----] [SCAL] (1) multiPhase2Level.diode_p.idealDiode[$i1].n.i - multiPhase2Level.diode_p.plug_n.pin[$i1].i = 0.0 ($RES_SIM_264) (138) [----] end for; (139) [SCAL] (1) multiPhase2Level.LossPower = $FUN_5 + $FUN_6 + $FUN_7 + $FUN_6 ($RES_SIM_66) (140) [ARRY] (3) multiPhase2Level.diode_p.idealDiode.n.v = multiPhase2Level.diode_p.plug_n.pin.v ($RES_SIM_265) (141) [ARRY] (3) multiPhase2Level.ac.pin.v = potentialSensor.plug_p.pin.v ($RES_SIM_180) (142) [FOR-] (3) ($RES_SIM_107) (142) [----] for $i1 in 1:3 loop (142) [----] [SCAL] (1) multiPhase2Level.star_p.plug_p.pin[$i1].v = dcPos.p.v ($RES_SIM_108) (142) [----] end for; (143) [FOR-] (3) ($RES_SIM_266) (143) [----] for $i1 in 1:3 loop (143) [----] [SCAL] (1) multiPhase2Level.diode_p.idealDiode[$i1].p.i - multiPhase2Level.diode_p.plug_p.pin[$i1].i = 0.0 ($RES_SIM_267) (143) [----] end for; (144) [SCAL] (1) sine.y = pwm.u[2] ($RES_SIM_181) (145) [FOR-] (3) ($RES_SIM_68) (145) [----] for $i1 in 1:3 loop (145) [----] [SCAL] (1) multiPhase2Level.star_n.plug_p.pin[$i1].v = dcNeg.n.v ($RES_SIM_69) (145) [----] end for; (146) [SCAL] (1) cosine.y = pwm.u[1] ($RES_SIM_182) (147) [ARRY] (3) multiPhase2Level.diode_p.i = multiPhase2Level.diode_p.plug_p.pin.i ($RES_SIM_109) (148) [ARRY] (3) multiPhase2Level.diode_p.plug_p.pin.v = multiPhase2Level.diode_p.idealDiode.p.v ($RES_SIM_268) (149) [ARRY] (3) multiPhase2Level.transistor_p.fire = multiPhase2Level.transistor_p.idealGTOThyristor.fire ($RES_SIM_269) (150) [ARRY] (3) pwm.fire_n = multiPhase2Level.fire_n ($RES_SIM_187) (151) [SCAL] (1) -multiPhase2Level.iDC = sum(multiPhase2Level.star_p.plug_p.pin.i) ($RES_$AUX_309) (152) [ARRY] (3) pwm.fire_p = multiPhase2Level.fire_p ($RES_SIM_188) (153) [SCAL] (1) -dcNeg.i = sum(multiPhase2Level.star_n.plug_p.pin.i) ($RES_$AUX_308) (154) [SCAL] (1) $FUN_5 = sum(multiPhase2Level.transistor_n.idealGTOThyristor.LossPower) ($RES_$AUX_307) (155) [FOR-] (3) ($RES_EVT_350) (155) [----] for $i1 in 1:3 loop (155) [----] [SCAL] (1) $SEV_14[$i1] = multiPhase2Level.andCondition_p[$i1].u1 and multiPhase2Level.andCondition_p[$i1].u2 ($RES_EVT_351) (155) [----] end for; (156) [SCAL] (1) $FUN_6 = sum(multiPhase2Level.diode_n.idealDiode.LossPower) ($RES_$AUX_306) (157) [SCAL] (1) $FUN_7 = sum(multiPhase2Level.transistor_p.idealGTOThyristor.LossPower) ($RES_$AUX_305) (158) [SCAL] (1) $SEV_15 = (time - pwm.svPWM.T0) / pwm.svPWM.samplePeriod < pwm.svPWM.t0 / 4.0 ($RES_EVT_352) (159) [SCAL] (1) $FUN_8 = cos(6.283185307179586 * harmonic.sin1.freqHz * (time - harmonic.sin1.startTime) + harmonic.sin1.phase) ($RES_$AUX_304) (160) [SCAL] (1) $SEV_16 = (time - pwm.svPWM.T0) / pwm.svPWM.samplePeriod < (pwm.svPWM.t0 / 4.0 + pwm.svPWM.ta / 2.0) ($RES_EVT_353) (161) [SCAL] (1) $FUN_9 = sin(6.283185307179586 * harmonic.sin2.freqHz * (time - harmonic.sin2.startTime) + harmonic.sin2.phase) ($RES_$AUX_303) (162) [SCAL] (1) $SEV_17 = (time - pwm.svPWM.T0) / pwm.svPWM.samplePeriod < (pwm.svPWM.ta / 2.0 + pwm.svPWM.t0 / 4.0 + pwm.svPWM.tb / 2.0) ($RES_EVT_354) (163) [SCAL] (1) harmonic.product1.y = product(harmonic.product1.u) ($RES_$AUX_302) (164) [SCAL] (1) $SEV_18 = (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_355) (165) [SCAL] (1) harmonic.product2.y = product(harmonic.product2.u) ($RES_$AUX_301) (166) [SCAL] (1) $SEV_19 = (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_356) (167) [SCAL] (1) $SEV_20 = (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_357) (168) [ARRY] (3) multiPhase2Level.diode_p.v = multiPhase2Level.diode_p.plug_p.pin.v - multiPhase2Level.diode_p.plug_n.pin.v ($RES_SIM_110) (169) [ARRY] (3) multiPhase2Level.diode_n.i = multiPhase2Level.diode_n.plug_p.pin.i ($RES_SIM_70) (170) [FOR-] (3) ($RES_SIM_111) (170) [----] for $i1 in 1:3 loop (170) [----] [SCAL] (1) multiPhase2Level.diode_p.idealDiode[$i1].i = multiPhase2Level.diode_p.idealDiode[$i1].p.i ($RES_SIM_112) (170) [----] end for; (171) [ARRY] (3) multiPhase2Level.diode_n.v = multiPhase2Level.diode_n.plug_p.pin.v - multiPhase2Level.diode_n.plug_n.pin.v ($RES_SIM_71) (172) [FOR-] (3) ($RES_SIM_270) (172) [----] for $i1 in 1:3 loop (172) [----] [SCAL] (1) multiPhase2Level.transistor_p.idealGTOThyristor[$i1].n.i - multiPhase2Level.transistor_p.plug_n.pin[$i1].i = 0.0 ($RES_SIM_271) (172) [----] end for; (173) [FOR-] (3) ($RES_SIM_72) (173) [----] for $i1 in 1:3 loop (173) [----] [SCAL] (1) multiPhase2Level.diode_n.idealDiode[$i1].i = multiPhase2Level.diode_n.idealDiode[$i1].p.i ($RES_SIM_73) (173) [----] end for; (174) [FOR-] (3) ($RES_SIM_113) (174) [----] for $i1 in 1:3 loop (174) [----] [SCAL] (1) 0.0 = multiPhase2Level.diode_p.idealDiode[$i1].p.i + multiPhase2Level.diode_p.idealDiode[$i1].n.i ($RES_SIM_114) (174) [----] end for; (175) [SCAL] (1) 3.0 * toSpacePhasor.zero = sum(toSpacePhasor.u) ($RES_$AUX_298) (176) [ARRY] (3) multiPhase2Level.transistor_p.idealGTOThyristor.n.v = multiPhase2Level.transistor_p.plug_n.pin.v ($RES_SIM_272) (177) [FOR-] (3) ($RES_SIM_74) (177) [----] for $i1 in 1:3 loop (177) [----] [SCAL] (1) 0.0 = multiPhase2Level.diode_n.idealDiode[$i1].p.i + multiPhase2Level.diode_n.idealDiode[$i1].n.i ($RES_SIM_75) (177) [----] end for; (178) [SCAL] (1) $FUN_15 = sqrt(toPolar.u[1] ^ 2.0 + toPolar.u[2] ^ 2.0) ($RES_$AUX_297) (179) [FOR-] (3) ($RES_SIM_273) (179) [----] for $i1 in 1:3 loop (179) [----] [SCAL] (1) multiPhase2Level.transistor_p.idealGTOThyristor[$i1].p.i - multiPhase2Level.transistor_p.plug_p.pin[$i1].i = 0.0 ($RES_SIM_274) (179) [----] end for; (180) [FOR-] (3) ($RES_SIM_115) (180) [----] for $i1 in 1:3 loop (180) [----] [SCAL] (1) multiPhase2Level.diode_p.idealDiode[$i1].v = multiPhase2Level.diode_p.idealDiode[$i1].p.v - multiPhase2Level.diode_p.idealDiode[$i1].n.v ($RES_SIM_116) (180) [----] end for; (181) [SCAL] (1) $FUN_16 = atan2(toPolar.u[2], toPolar.u[1]) ($RES_$AUX_296) (182) [FOR-] (3) ($RES_SIM_76) (182) [----] for $i1 in 1:3 loop (182) [----] [SCAL] (1) multiPhase2Level.diode_n.idealDiode[$i1].v = multiPhase2Level.diode_n.idealDiode[$i1].p.v - multiPhase2Level.diode_n.idealDiode[$i1].n.v ($RES_SIM_77) (182) [----] end for; (183) [SCAL] (1) $FUN_17 = sqrt(pwm.svPWM.u[1] ^ 2.0 + pwm.svPWM.u[2] ^ 2.0) ($RES_$AUX_295) (184) [ARRY] (3) multiPhase2Level.transistor_p.idealGTOThyristor.p.v = multiPhase2Level.transistor_p.plug_p.pin.v ($RES_SIM_275) (185) [SCAL] (1) $FUN_18 = atan2(pwm.svPWM.u[2], pwm.svPWM.u[1]) ($RES_$AUX_294) (186) [SCAL] (1) harmonic.sin2.y = harmonic.product2.u[2] ($RES_SIM_191) (187) [SCAL] (1) $FUN_19 = sin(pwm.svPWM.phiSec) ($RES_$AUX_293) (188) [ARRY] (3) multiPhase2Level.enableLogic.internalEnable = multiPhase2Level.enableLogic.booleanReplicator.y ($RES_SIM_277) (189) [SCAL] (1) harmonic.u = harmonic.product1.u[2] ($RES_SIM_192) (190) [FOR-] (3) ($RES_SIM_119) (190) [----] for $i1 in 1:3 loop (190) [----] [SCAL] (1) multiPhase2Level.diode_p.idealDiode[$i1].LossPower = multiPhase2Level.diode_p.idealDiode[$i1].v * multiPhase2Level.diode_p.idealDiode[$i1].i ($RES_SIM_120) (190) [----] end for; (191) [SCAL] (1) $FUN_20 = cos(pwm.svPWM.phiSec) ($RES_$AUX_292) (192) [ARRY] (3) pwm.svPWM.fire_n = pwm.fire_n ($RES_SIM_278) (193) [SCAL] (1) harmonic.u = harmonic.product2.u[1] ($RES_SIM_193) (194) [SCAL] (1) $FUN_21 = cos(-integrator.y) ($RES_$AUX_291) (195) [ARRY] (3) pwm.svPWM.fire_p = pwm.fire_p ($RES_SIM_279) (196) [SCAL] (1) harmonic.sin1.y = harmonic.product1.u[1] ($RES_SIM_194) (197) [SCAL] (1) $FUN_22 = sin(-integrator.y) ($RES_$AUX_290) (198) [ARRY] (3) potentialSensor.potentialSensor.phi = potentialSensor.phi ($RES_SIM_200) (199) [FOR-] (3) ($RES_SIM_201) (199) [----] for $i1 in 1:3 loop (199) [----] [SCAL] (1) potentialSensor.potentialSensor[$i1].p.i - potentialSensor.plug_p.pin[$i1].i = 0.0 ($RES_SIM_202) (199) [----] end for; (200) [ARRY] (3) potentialSensor.potentialSensor.p.v = potentialSensor.plug_p.pin.v ($RES_SIM_203)