Plecs { Name "Modelo_basico_en_PLECS_de_FOC" Version "4.1" CircuitModel "ContStateSpace" StartTime "0.0" StopTime "6" Timeout "" Solver "dopri" MaxStep "Tsc" InitStep "-1" FixedStep "Tsc/100" Refine "1" ZCStepSize "1e-9" RelTol "1e-3" AbsTol "-1" TurnOnThreshold "0" SyncFixedStepTasks "2" UseSingleCommonBaseRate "2" LossVariableLimitExceededMsg "3" NegativeSwitchLossMsg "3" DivisionByZeroMsg "2" StiffnessDetectionMsg "2" MaxConsecutiveZCs "1000" AssertionAction "1" InitializationCommands "fs=10000;\nVc0=540;\nVdc=700;\nidnom = 5.17;\niqnom " "= 20.6;\nTsc=1/(2*fs);\nRs\t= 0.567;\nLs = 0.13953; \nRr\t= 0.733;\nLr = 0.13" "953;\nTr=Lr/Rr;\nL0 = 0.1353;\nLm = L0;\no = (Ls*Lr-L0^2)/(Ls*Lr);\nJ = 0.1;" "\nB = 0.005;\np = 2;\nwm0 = 0;\nthm0 = 0;\nLls = Ls - L0;\nLlr = Lr - L0;\n%" "\n%constante controladores de corriente id\n%\nKp_id = 8.64834;%(fn=110Hz amo" "rtiguamiento de 0.8)\nKi_id = 3980.74;%(fn=110Hz amortiguamiento de 0.8)\nUdm" "ax = 10*idnom*Rs; %limites sugeridos por Matias Diaz\nUdmin =-10*idnom*Rs; % " "no se como los obtuvo\n%\n%constante controladores de corriente iq\n%\nKp_iq " "= 8.64834;%(fn=110Hz amortiguamiento de 0.8)\nKi_iq = 3980.74;%(fn=110Hz amor" "tiguamiento de 0.8)\nUqmax = Vc0/2; %5*iqnom*Rs;\nUqmin = -Vc0/2; %-5*iqnom*R" "s;\n%\n% Controladores de corriente\n%\nKw = 3*p*L0^2*idnom/(2*Lr*J)\nKp_w" "m = 4.93764 %(fn=10Hz amortiguamiento de 0.8)\nKi_wm = 193.997 %(fn=10Hz amor" "tiguamiento de 0.8)\niqmax = 1.5*iqnom;\niqmin =-1.5*iqnom;\n\nidmax = 1.5*id" "nom;\nidmin =-1.5*idnom;" InitialState "1" SystemState "" CodeGenParameterInlining "2" CodeGenInliningExceptions "AAAACwAAAAAA" CodeGenFloatingPointFormat "2" CodeGenIntegerWordSize "32" CodeGenAbsTimeUsageMsg "3" CodeGenBaseName "" CodeGenOutputDir "" CodeGenExtraOpts "" CodeGenTarget "Generic" CodeGenTargetSettings "" ExtendedMatrixPrecision "1" MatrixSignificanceCheck "2" EnableStateSpaceSplitting "2" DisplayStateSpaceSplitting "1" DiscretizationMethod "2" ExternalModeSettings "" AlgebraicLoopMethod "1" AlgebraicLoopTolerance "1e-6" Schematic { Location [0, 23; 1536, 776] ZoomFactor 0.999997 SliderPosition [0, 0] ShowBrowser off BrowserWidth 134 Component { Type ThreePhaseVoltageSource Name "V_3ph" Show off Position [595, 375] Direction up Flipped off Parameter { Variable "V" Value "310" Show off } Parameter { Variable "w" Value "50" Show off } Parameter { Variable "phi" Value "0" Show off } Parameter { Variable "neutral" Value "2" Show off } } Component { Type Reference SrcComponent "Components/Electrical/Converters/Diode\\nRectifier" Name "Diode\nRectifier" Show off Position [735, 375] Direction left Flipped off Frame [-25, -25; 25, 25] LabelPosition [27, 0] LabelAlign left Parameter { Variable "Vf" Value "0" Show off } Parameter { Variable "Ron" Value "0" Show off } Parameter { Variable "therm" Value "" Show off } Parameter { Variable "T_init" Value "0" Show off } Terminal { Type Port Position [10, -30] Direction up } Terminal { Type Port Position [0, -30] Direction up } Terminal { Type Port Position [-10, -30] Direction up } Terminal { Type Port Position [30, 0] Direction right } Terminal { Type Port Position [-30, 0] Direction left } } Component { Type Inductor Name "L1" Show off Position [645, 365] Direction left Flipped off Parameter { Variable "L" Value "1e-6" Show off } Parameter { Variable "i_init" Value "0" Show off } } Component { Type Inductor Name "L2" Show off Position [645, 375] Direction left Flipped off Parameter { Variable "L" Value "1e-6" Show off } Parameter { Variable "i_init" Value "0" Show off } } Component { Type Inductor Name "L3" Show off Position [645, 385] Direction left Flipped off Parameter { Variable "L" Value "1e-6" Show off } Parameter { Variable "i_init" Value "0" Show off } } Component { Type Switch Name "S1" Show off Position [820, 310] Direction left Flipped off Parameter { Variable "s_init" Value "0" Show off } } Component { Type Resistor Name "R1" Show off Position [795, 330] Direction right Flipped off Parameter { Variable "R" Value "10" Show off } } Component { Type RelationalOperator Name "Relational\nOperator2" Show off Position [785, 280] Direction right Flipped off Parameter { Variable "Operator" Value "3" Show off } } Component { Type From Name "From3" Show off Position [750, 285] Direction right Flipped off Parameter { Variable "Tag" Value "Vc" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Constant Name "Constant2" Show off Position [700, 275] Direction right Flipped off Frame [-25, -10; 25, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Value" Value "500" Show off } } Component { Type Goto Name "Goto5" Show off Position [950, 405] Direction right Flipped off Parameter { Variable "Tag" Value "Vc" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Subsystem Name "H" Show on Position [1010, 375] Direction up Flipped off Frame [-30, -25; 30, 25] LabelPosition [0, 0] SampleTime "-1" CodeGenTarget "Generic" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Port Position [35, 0] Direction right } Terminal { Type Port Position [35, -15] Direction right } Terminal { Type Port Position [0, 30] Direction down } Terminal { Type Port Position [0, -30] Direction up } Terminal { Type Input Position [-30, 0] Direction left } Terminal { Type Port Position [35, 15] Direction right } Schematic { Location [222, 155; 943, 606] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type IgbtWithDiode Name "IGBTD1" Show off Position [240, 200] Direction up Flipped off Parameter { Variable "s_init" Value "0" Show off } Parameter { Variable "thermal" Value "" Show off } Parameter { Variable "T_init" Value "0" Show off } } Component { Type IgbtWithDiode Name "IGBTD2" Show off Position [240, 270] Direction up Flipped off Parameter { Variable "s_init" Value "0" Show off } Parameter { Variable "thermal" Value "" Show off } Parameter { Variable "T_init" Value "0" Show off } } Component { Type IgbtWithDiode Name "IGBTD3" Show off Position [400, 265] Direction up Flipped off Parameter { Variable "s_init" Value "0" Show off } Parameter { Variable "thermal" Value "" Show off } Parameter { Variable "T_init" Value "0" Show off } } Component { Type IgbtWithDiode Name "IGBTD4" Show off Position [400, 205] Direction up Flipped off Parameter { Variable "s_init" Value "0" Show off } Parameter { Variable "thermal" Value "" Show off } Parameter { Variable "T_init" Value "0" Show off } } Component { Type LogicalOperator Name "Logical\nOperator1" Show off Position [185, 270] Direction up Flipped off Parameter { Variable "Operator" Value "6" Show off } Parameter { Variable "Inputs" Value "1" Show off } } Component { Type Port Name "Vb" Show on Position [440, 340] Direction up Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "Va" Show on Position [280, 340] Direction up Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "V-" Show on Position [125, 295] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "V+" Show on Position [125, 175] Direction right Flipped off Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "S" Show on Position [160, 80] Direction up Flipped on Parameter { Variable "Index" Value "5" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type IgbtWithDiode Name "IGBTD5" Show off Position [560, 265] Direction up Flipped off Parameter { Variable "s_init" Value "0" Show off } Parameter { Variable "thermal" Value "" Show off } Parameter { Variable "T_init" Value "0" Show off } } Component { Type IgbtWithDiode Name "IGBTD6" Show off Position [560, 205] Direction up Flipped off Parameter { Variable "s_init" Value "0" Show off } Parameter { Variable "thermal" Value "" Show off } Parameter { Variable "T_init" Value "0" Show off } } Component { Type Port Name "Vc" Show on Position [600, 340] Direction up Flipped off Parameter { Variable "Index" Value "6" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type SignalDemux Name "Demux" Show off Position [160, 120] Direction up Flipped off Parameter { Variable "Width" Value "3" Show off } } Component { Type LogicalOperator Name "Logical\nOperator2" Show off Position [345, 265] Direction up Flipped off Parameter { Variable "Operator" Value "6" Show off } Parameter { Variable "Inputs" Value "1" Show off } } Component { Type LogicalOperator Name "Logical\nOperator3" Show off Position [505, 265] Direction up Flipped off Parameter { Variable "Operator" Value "6" Show off } Parameter { Variable "Inputs" Value "1" Show off } } Connection { Type Wire SrcComponent "IGBTD1" SrcTerminal 1 Points [240, 175] Branch { DstComponent "V+" DstTerminal 1 } Branch { Points [400, 175] Branch { DstComponent "IGBTD4" DstTerminal 1 } Branch { Points [560, 175] DstComponent "IGBTD6" DstTerminal 1 } } } Connection { Type Wire SrcComponent "IGBTD1" SrcTerminal 2 Points [240, 235] Branch { DstComponent "IGBTD2" DstTerminal 1 } Branch { Points [280, 235] DstComponent "Va" DstTerminal 1 } } Connection { Type Wire SrcComponent "IGBTD2" SrcTerminal 2 Points [240, 295] Branch { DstComponent "V-" DstTerminal 1 } Branch { Points [400, 295] Branch { DstComponent "IGBTD3" DstTerminal 2 } Branch { Points [560, 295] DstComponent "IGBTD5" DstTerminal 2 } } } Connection { Type Signal SrcComponent "Logical\nOperator1" SrcTerminal 1 DstComponent "IGBTD2" DstTerminal 3 } Connection { Type Wire SrcComponent "IGBTD3" SrcTerminal 1 Points [400, 235] Branch { DstComponent "IGBTD4" DstTerminal 2 } Branch { Points [440, 235] DstComponent "Vb" DstTerminal 1 } } Connection { Type Signal SrcComponent "Logical\nOperator2" SrcTerminal 1 DstComponent "IGBTD3" DstTerminal 3 } Connection { Type Signal SrcComponent "Logical\nOperator3" SrcTerminal 1 DstComponent "IGBTD5" DstTerminal 3 } Connection { Type Wire SrcComponent "IGBTD6" SrcTerminal 2 Points [560, 235] Branch { DstComponent "IGBTD5" DstTerminal 1 } Branch { Points [600, 235] DstComponent "Vc" DstTerminal 1 } } Connection { Type Signal SrcComponent "S" SrcTerminal 1 DstComponent "Demux" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux" SrcTerminal 2 Points [150, 200] Branch { DstComponent "IGBTD1" DstTerminal 3 } Branch { Points [150, 270] DstComponent "Logical\nOperator1" DstTerminal 2 } } Connection { Type Signal SrcComponent "Demux" SrcTerminal 3 Points [160, 140; 305, 140; 305, 205] Branch { DstComponent "IGBTD4" DstTerminal 3 } Branch { Points [305, 265] DstComponent "Logical\nOperator2" DstTerminal 2 } } Connection { Type Signal SrcComponent "Demux" SrcTerminal 4 Points [170, 130; 475, 130; 475, 205] Branch { DstComponent "IGBTD6" DstTerminal 3 } Branch { DstComponent "Logical\nOperator3" DstTerminal 2 } } } } Component { Type Subsystem Name "Squirrel-Cage IM" Show off Position [1145, 375] Direction up Flipped off Frame [-25, -25; 25, 35] LabelPosition [0, 38] LabelAlign up SampleTime "-1" CodeGenTarget "Generic" MaskType "Induction Machine (Squirrel Cage)" MaskDescription "Three-phase induction machine with short-circuited roto" "r windings. All parameters and electrical quantities are referred to the stat" "or side." MaskHelp "im_squirrelcage.html" MaskDisplay "circle(0, 0, 18)\ncircle(0, 0, 25)\nline([-25, -23], [10," " 10])\nline([-25, -23], [-10, -10])\nline([-18, -25, -25, 25, 25, 18], [18, 2" "5, 35, 35, 25, 18])\ncircle(-26.5, -13.5, .5)\n" MaskIconFrame off MaskIconOpaque off MaskIconRotates on MaskInit "isd0 = is0(1);\nisq0 = 1/sqrt(3)*(is0(1)+2*is0(2));\nimd0" " = (psisdq0(1)-Lls*isd0)/Lm;\nimq0 = (psisdq0(2)-Lls*isq0)/Lm;\n" Parameter { Variable "Rs" Prompt "Stator resistance Rs" Type FreeText Value "Rs" Show off Tunable off TabName "" } Parameter { Variable "Lls" Prompt "Stator leakage inductance Lls" Type FreeText Value "Lls" Show off Tunable off TabName "" } Parameter { Variable "Rr" Prompt "Rotor resistance Rr'" Type FreeText Value "Rr" Show off Tunable off TabName "" } Parameter { Variable "Llr" Prompt "Rotor leakage inductance Llr'" Type FreeText Value "Llr" Show off Tunable off TabName "" } Parameter { Variable "Lm" Prompt "Magnetizing inductance Lm" Type FreeText Value "Lm" Show off Tunable off TabName "" } Parameter { Variable "J" Prompt "Inertia J" Type FreeText Value "J" Show off Tunable off TabName "" } Parameter { Variable "F" Prompt "Friction coefficient F" Type FreeText Value "B" Show off Tunable off TabName "" } Parameter { Variable "p" Prompt "Number of pole pairs p" Type FreeText Value "p" Show off Tunable off TabName "" } Parameter { Variable "wm0" Prompt "Initial rotor speed wm0" Type FreeText Value "wm0" Show off Tunable off TabName "" } Parameter { Variable "thm0" Prompt "Initial rotor position thm0" Type FreeText Value "thm0" Show off Tunable off TabName "" } Parameter { Variable "is0" Prompt "Initial stator currents [isa0 isb0]" Type FreeText Value "[0 0]" Show off Tunable off TabName "" } Parameter { Variable "psisdq0" Prompt "Initial stator flux [psisd0 psisq0]" Type FreeText Value "[0 0]" Show off Tunable off TabName "" } Terminal { Type Port Position [-30, -10] Direction left } Terminal { Type Port Position [-30, 0] Direction left } Terminal { Type Port Position [-30, 10] Direction left } Terminal { Type Rotational Position [30, 30] Direction right } Schematic { Location [1065, 330; 1786, 809] ZoomFactor 1 SliderPosition [0, -3] ShowBrowser off BrowserWidth 100 Component { Type Port Name "A" Show off Position [25, 40] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "B" Show off Position [25, 90] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "C" Show off Position [25, 140] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Inductor Name "Lls" Show on Position [330, 55] Direction left Flipped off Parameter { Variable "L" Value "Lls" Show off } Parameter { Variable "i_init" Value "[isd0 isq0]" Show off } } Component { Type Resistor Name "Rs" Show on Position [270, 55] Direction left Flipped off Parameter { Variable "R" Value "Rs" Show off } } Component { Type Inductor Name "Lm" Show on Position [375, 100] Direction down Flipped on Parameter { Variable "L" Value "Lm" Show off } Parameter { Variable "i_init" Value "[imd0 imq0]" Show off } } Component { Type Ammeter Name "isdq" Show on Position [225, 55] Direction right Flipped on } Component { Type Inductor Name "Llr'" Show on Position [420, 55] Direction left Flipped on Parameter { Variable "L" Value "Llr" Show off } Parameter { Variable "i_init" Value "[imd0-isd0 imq0-isq0]" Show off } } Component { Type Resistor Name "Rr'" Show on Position [480, 55] Direction left Flipped off Parameter { Variable "R" Value "Rr" Show off } } Component { Type Ammeter Name "irdq'" Show on Position [590, 55] Direction left Flipped on } Component { Type VoltageSource Name "w*j*psir" Show on Position [540, 55] Direction right Flipped on Parameter { Variable "DiscretizationBehavior" Value "2" Show off } Parameter { Variable "StateSpaceInlining" Value "2" Show off } } Component { Type SignalMux Name "isdq,irdq" Show on Position [295, 120] Direction up Flipped on Parameter { Variable "Width" Value "[2 2]" Show off } } Component { Type Function Name "Te<-" Show on Position [240, 230] Direction right Flipped on Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "f(u)" Value "3/2*p*Lm*(u(2)*u(3)-u(1)*u(4))" Show off } } Component { Type Function Name "psisd" Show on Position [485, 170] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "f(u)" Value "Lls*u(1) + u(5)" Show off } } Component { Type Function Name "psisq" Show on Position [485, 210] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "f(u)" Value "Lls*u(2) + u(6)" Show off } } Component { Type Function Name "psimd" Show on Position [350, 230] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "f(u)" Value "Lm*(u(1)+u(3))" Show off } } Component { Type Function Name "psimq" Show on Position [350, 270] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "f(u)" Value "Lm*(u(2)+u(4))" Show off } } Component { Type SignalMux Name "isdq,irdq,\npsimdq" Show on Position [415, 230] Direction right Flipped off Parameter { Variable "Width" Value "[4 1 1]" Show off } } Component { Type Function Name "psird" Show on Position [485, 250] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "f(u)" Value "Llr*u(3) + u(5)" Show off } } Component { Type Function Name "psirq" Show on Position [485, 290] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "f(u)" Value "Llr*u(4) + u(6)" Show off } } Component { Type VoltageSource Name "vdq" Show on Position [185, 100] Direction down Flipped on Parameter { Variable "DiscretizationBehavior" Value "2" Show off } Parameter { Variable "StateSpaceInlining" Value "2" Show off } } Component { Type Subsystem Name "abc <-> dq" Show on Position [125, 90] Direction up Flipped off Frame [-25, -30; 25, 30] LabelPosition [0, 33] LabelAlign up SampleTime "-1" CodeGenTarget "Generic" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Port Position [-30, -20] Direction left } Terminal { Type Port Position [-30, 20] Direction left } Terminal { Type Port Position [-30, 0] Direction left } Terminal { Type Output Position [29, 10] Direction right } Terminal { Type Input Position [25, -10] Direction right } Schematic { Location [174, 574; 605, 874] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Transformer Name "a<->d" Show on Position [85, 35] Direction right Flipped on Parameter { Variable "Windings" Value "[1 1]" Show off } Parameter { Variable "n" Value "[1 1]" Show off } Parameter { Variable "Polarity" Value "+" Show off } Parameter { Variable "Lm" Value "inf" Show off } Parameter { Variable "im0" Value "0" Show off } } Component { Type Transformer Name "b<->dq" Show on Position [85, 110] Direction right Flipped on Parameter { Variable "Windings" Value "[1 2]" Show off } Parameter { Variable "n" Value "[1, -1/2, sqrt(3)/2]" Show off } Parameter { Variable "Polarity" Value "+" Show off } Parameter { Variable "Lm" Value "inf" Show off } Parameter { Variable "im0" Value "0" Show off } } Component { Type Transformer Name "c<->dq" Show on Position [85, 205] Direction right Flipped on Parameter { Variable "Windings" Value "[1 2]" Show off } Parameter { Variable "n" Value "[1, -1/2, -sqrt(3)/2]" Show off } Parameter { Variable "Polarity" Value "+" Show off } Parameter { Variable "Lm" Value "inf" Show off } Parameter { Variable "im0" Value "0" Show off } } Component { Type Voltmeter Name "vd'" Show on Position [225, 35] Direction up Flipped off } Component { Type Function Name "f: vd" Show on Position [280, 35] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "f(u)" Value "2/3*u" Show off } } Component { Type CurrentSource Name "id'" Show on Position [165, 35] Direction up Flipped on Parameter { Variable "DiscretizationBehavior" Value "2" Show off } Parameter { Variable "StateSpaceInlining" Value "2" Show off } } Component { Type Voltmeter Name "vq'" Show on Position [225, 215] Direction up Flipped off } Component { Type Function Name "f: vq" Show on Position [280, 215] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "f(u)" Value "2/3*u" Show off } } Component { Type CurrentSource Name "iq'" Show on Position [165, 215] Direction up Flipped on Parameter { Variable "DiscretizationBehavior" Value "2" Show off } Parameter { Variable "StateSpaceInlining" Value "2" Show off } } Component { Type Port Name "a" Show on Position [25, 15] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "c" Show on Position [25, 185] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "b" Show on Position [25, 90] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "vdq" Show on Position [390, 40] Direction right Flipped off Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "Width" Value "2" Show off } } Component { Type Input Name "idq" Show on Position [390, 135] Direction right Flipped on Parameter { Variable "Index" Value "5" Show on } Parameter { Variable "Width" Value "2" Show off } } Component { Type SignalMux Name "vd,vq" Show on Position [345, 40] Direction right Flipped off Parameter { Variable "Width" Value "2" Show off } } Component { Type SignalDemux Name "id,iq" Show on Position [205, 135] Direction right Flipped off Parameter { Variable "Width" Value "2" Show off } } Connection { Type Wire SrcComponent "a<->d" SrcTerminal 4 Points [110, 45; 110, 70] DstComponent "b<->dq" DstTerminal 3 } Connection { Type Wire SrcComponent "b<->dq" SrcTerminal 4 Points [110, 100; 110, 165] DstComponent "c<->dq" DstTerminal 3 } Connection { Type Wire SrcComponent "b<->dq" SrcTerminal 6 Points [135, 140; 135, 205] DstComponent "c<->dq" DstTerminal 5 } Connection { Type Wire SrcComponent "a<->d" SrcTerminal 1 DstComponent "a" DstTerminal 1 } Connection { Type Wire SrcComponent "c<->dq" SrcTerminal 1 DstComponent "c" DstTerminal 1 } Connection { Type Wire SrcComponent "b<->dq" SrcTerminal 1 DstComponent "b" DstTerminal 1 } Connection { Type Wire SrcComponent "b<->dq" SrcTerminal 2 Points [60, 120] Branch { Points [60, 45] DstComponent "a<->d" DstTerminal 2 } Branch { Points [60, 215] DstComponent "c<->dq" DstTerminal 2 } } Connection { Type Signal SrcComponent "vd'" SrcTerminal 3 DstComponent "f: vd" DstTerminal 1 } Connection { Type Signal SrcComponent "vq'" SrcTerminal 3 DstComponent "f: vq" DstTerminal 1 } Connection { Type Signal SrcComponent "f: vd" SrcTerminal 2 DstComponent "vd,vq" DstTerminal 2 } Connection { Type Signal SrcComponent "f: vq" SrcTerminal 2 Points [320, 215; 320, 45] DstComponent "vd,vq" DstTerminal 3 } Connection { Type Signal SrcComponent "vd,vq" SrcTerminal 1 DstComponent "vdq" DstTerminal 1 } Connection { Type Signal SrcComponent "idq" SrcTerminal 1 DstComponent "id,iq" DstTerminal 1 } Connection { Type Signal SrcComponent "id,iq" SrcTerminal 2 Points [190, 130] DstComponent "id'" DstTerminal 3 } Connection { Type Signal SrcComponent "id,iq" SrcTerminal 3 Points [190, 140] DstComponent "iq'" DstTerminal 3 } Connection { Type Wire SrcComponent "iq'" SrcTerminal 1 Points [165, 195] Branch { DstComponent "vq'" DstTerminal 1 } Branch { Points [145, 195; 145, 110] DstComponent "b<->dq" DstTerminal 5 } } Connection { Type Wire SrcComponent "iq'" SrcTerminal 2 Points [165, 235] Branch { DstComponent "vq'" DstTerminal 2 } Branch { DstComponent "c<->dq" DstTerminal 6 } } Connection { Type Wire SrcComponent "id'" SrcTerminal 2 Points [165, 55] Branch { DstComponent "vd'" DstTerminal 2 } Branch { Points [120, 55; 120, 195] DstComponent "c<->dq" DstTerminal 4 } } Connection { Type Wire SrcComponent "id'" SrcTerminal 1 Points [165, 15] Branch { DstComponent "vd'" DstTerminal 1 } Branch { DstComponent "a<->d" DstTerminal 3 } } } } Component { Type SignalMux Name "psirdq,we" Show on Position [545, 290] Direction right Flipped off Parameter { Variable "Width" Value "3" Show off } } Component { Type Function Name "-w*psirq" Show on Position [610, 270] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "f(u)" Value "-u[3]*u[2]" Show off } } Component { Type Function Name "w*psird" Show on Position [610, 310] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "f(u)" Value "u[3]*u[1]" Show off } } Component { Type SignalMux Name "j*w*psirdq" Show on Position [670, 290] Direction right Flipped off Parameter { Variable "Width" Value "2" Show off } } Component { Type Ammeter Name "isa" Show on Position [65, 40] Direction right Flipped on } Component { Type Ammeter Name "isb" Show on Position [65, 90] Direction right Flipped on } Component { Type Ammeter Name "isc" Show on Position [65, 140] Direction right Flipped on } Component { Type Inertia Name "Inertia" Show on Position [260, 400] Direction up Flipped off Parameter { Variable "J" Value "J" Show off } Parameter { Variable "w0" Value "wm0" Show off } Parameter { Variable "theta0" Value "thm0" Show off } } Component { Type ControlledTorque Name "Te" Show on Position [200, 400] Direction down Flipped on Parameter { Variable "SecondFlange" Value "1" Show off } Parameter { Variable "StateSpaceInlining" Value "2" Show off } } Component { Type RotationalSpeedSensor Name "Rotor\nSpeed" Show on Position [430, 435] Direction right Flipped off Parameter { Variable "SecondFlange" Value "1" Show off } } Component { Type Gain Name "p*wm" Show on Position [485, 340] Direction right Flipped off Parameter { Variable "K" Value "p" Show off } Parameter { Variable "Multiplication" Value "1" Show off } } Component { Type RotationalReference Name "Rotational\nFrame" Show off Position [310, 455] Direction up Flipped off } Component { Type RotationalPort Name "Rotational\nPort" Show off Position [620, 400] Direction right Flipped on Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type RotationalDamper Name "Friction" Show on Position [310, 430] Direction right Flipped on Parameter { Variable "D" Value "F" Show off } Parameter { Variable "theta0" Value "" Show off } } Connection { Type Wire SrcComponent "isdq" SrcTerminal 2 DstComponent "Rs" DstTerminal 1 } Connection { Type Wire SrcComponent "Lm" SrcTerminal 2 Points [375, 145] Branch { Points [630, 145; 630, 55] DstComponent "irdq'" DstTerminal 1 } Branch { Points [185, 145] DstComponent "vdq" DstTerminal 2 } } Connection { Type Wire SrcComponent "Lls" SrcTerminal 2 Points [375, 55] Branch { DstComponent "Lm" DstTerminal 1 } Branch { DstComponent "Llr'" DstTerminal 2 } } Connection { Type Wire SrcComponent "Rs" SrcTerminal 2 DstComponent "Lls" DstTerminal 1 } Connection { Type Wire SrcComponent "vdq" SrcTerminal 1 Points [185, 55] DstComponent "isdq" DstTerminal 1 } Connection { Type Wire SrcComponent "Llr'" SrcTerminal 1 DstComponent "Rr'" DstTerminal 1 } Connection { Type Signal SrcComponent "psimq" SrcTerminal 2 Points [380, 270; 380, 240] DstComponent "isdq,irdq,\npsimdq" DstTerminal 4 } Connection { Type Signal SrcComponent "psimd" SrcTerminal 2 DstComponent "isdq,irdq,\npsimdq" DstTerminal 3 } Connection { Type Signal SrcComponent "isdq" SrcTerminal 3 Points [225, 80] Branch { DstComponent "abc <-> dq" DstTerminal 5 } Branch { Points [290, 80] DstComponent "isdq,irdq" DstTerminal 2 } } Connection { Type Signal SrcComponent "psirdq,we" SrcTerminal 1 Points [575, 290] Branch { DstComponent "-w*psirq" DstTerminal 1 } Branch { DstComponent "w*psird" DstTerminal 1 } } Connection { Type Signal SrcComponent "-w*psirq" SrcTerminal 2 Points [640, 270; 640, 285] DstComponent "j*w*psirdq" DstTerminal 2 } Connection { Type Signal SrcComponent "w*psird" SrcTerminal 2 Points [640, 310; 640, 295] DstComponent "j*w*psirdq" DstTerminal 3 } Connection { Type Signal SrcComponent "psirq" SrcTerminal 2 DstComponent "psirdq,we" DstTerminal 3 } Connection { Type Signal SrcComponent "psird" SrcTerminal 2 Points [515, 250; 515, 280] DstComponent "psirdq,we" DstTerminal 2 } Connection { Type Wire SrcComponent "Rr'" SrcTerminal 2 DstComponent "w*j*psir" DstTerminal 1 } Connection { Type Wire SrcComponent "w*j*psir" SrcTerminal 2 DstComponent "irdq'" DstTerminal 2 } Connection { Type Signal SrcComponent "j*w*psirdq" SrcTerminal 1 Points [685, 290; 685, 190; 540, 190] DstComponent "w*j*psir" DstTerminal 3 } Connection { Type Signal SrcComponent "abc <-> dq" SrcTerminal 4 DstComponent "vdq" DstTerminal 3 } Connection { Type Wire SrcComponent "C" SrcTerminal 1 DstComponent "isc" DstTerminal 1 } Connection { Type Wire SrcComponent "isc" SrcTerminal 2 Points [85, 110] DstComponent "abc <-> dq" DstTerminal 2 } Connection { Type Wire SrcComponent "B" SrcTerminal 1 DstComponent "isb" DstTerminal 1 } Connection { Type Wire SrcComponent "isb" SrcTerminal 2 DstComponent "abc <-> dq" DstTerminal 3 } Connection { Type Wire SrcComponent "A" SrcTerminal 1 DstComponent "isa" DstTerminal 1 } Connection { Type Wire SrcComponent "isa" SrcTerminal 2 Points [85, 70] DstComponent "abc <-> dq" DstTerminal 1 } Connection { Type Signal SrcComponent "irdq'" SrcTerminal 3 Points [590, 20; 300, 20] DstComponent "isdq,irdq" DstTerminal 3 } Connection { Type Rotational SrcComponent "Inertia" SrcTerminal 1 DstComponent "Te" DstTerminal 1 } Connection { Type Rotational SrcComponent "Inertia" SrcTerminal 2 Points [310, 400] Branch { Points [430, 400] Branch { DstComponent "Rotor\nSpeed" DstTerminal 1 } Branch { DstComponent "Rotational\nPort" DstTerminal 1 } } Branch { DstComponent "Friction" DstTerminal 1 } } Connection { Type Signal SrcComponent "Rotor\nSpeed" SrcTerminal 2 Points [450, 435; 450, 340] DstComponent "p*wm" DstTerminal 1 } Connection { Type Rotational SrcComponent "Friction" SrcTerminal 2 DstComponent "Rotational\nFrame" DstTerminal 1 } Connection { Type Signal SrcComponent "Te<-" SrcTerminal 2 Points [200, 230] DstComponent "Te" DstTerminal 2 } Connection { Type Signal SrcComponent "isdq,irdq" SrcTerminal 1 Points [295, 230] Branch { DstComponent "Te<-" DstTerminal 1 } Branch { Points [315, 230] Branch { DstComponent "psimq" DstTerminal 1 } Branch { Points [315, 230] Branch { Points [315, 205; 380, 205; 380, 220] DstComponent "isdq,irdq,\npsimdq" DstTerminal 2 } Branch { DstComponent "psimd" DstTerminal 1 } } } } Connection { Type Signal SrcComponent "isdq,irdq,\npsimdq" SrcTerminal 1 Points [450, 230] Branch { Points [450, 250] Branch { DstComponent "psird" DstTerminal 1 } Branch { DstComponent "psirq" DstTerminal 1 } } Branch { Points [450, 210] Branch { DstComponent "psisq" DstTerminal 1 } Branch { DstComponent "psisd" DstTerminal 1 } } } Connection { Type Signal SrcComponent "p*wm" SrcTerminal 2 Points [515, 340; 515, 300] DstComponent "psirdq,we" DstTerminal 4 } } MaskProbe { Name "Stator phase currents" Probe { Component "isa" Path "" Signals {"Measured current"} } Probe { Component "isb" Path "" Signals {"Measured current"} } Probe { Component "isc" Path "" Signals {"Measured current"} } } MaskProbe { Name "Rotor currents (dq)" Probe { Component "irdq'" Path "" Signals {"Measured current"} } } MaskProbe { Name "Stator flux (dq)" Probe { Component "psisd" Path "" Signals {"Output"} } Probe { Component "psisq" Path "" Signals {"Output"} } } MaskProbe { Name "Magnetizing flux (dq)" Probe { Component "psimd" Path "" Signals {"Output"} } Probe { Component "psimq" Path "" Signals {"Output"} } } MaskProbe { Name "Rotor flux (dq)" Probe { Component "psird" Path "" Signals {"Output"} } Probe { Component "psirq" Path "" Signals {"Output"} } } MaskProbe { Name "Rotational speed" Probe { Component "Inertia" Path "" Signals {"Speed"} } } MaskProbe { Name "Rotor position" Probe { Component "Inertia" Path "" Signals {"Angle"} } } MaskProbe { Name "Electrical torque" Probe { Component "Te" Path "" Signals {"Torque"} } } } Component { Type ThreePhaseMeter Name "3ph Meter" Show off Position [1085, 375] Direction up Flipped off Parameter { Variable "voltage" Value "2" Show off } } Component { Type Subsystem Name "Modulador" Show on Position [975, 190] Direction up Flipped off Frame [-25, -40; 25, 40] LabelPosition [0, -43] LabelAlign down SampleTime "-1" CodeGenTarget "Generic" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Output Position [29, -5] Direction right } Terminal { Type Input Position [-25, -30] Direction left } Terminal { Type Input Position [-25, -5] Direction left } Terminal { Type Input Position [-25, 15] Direction left } Terminal { Type Input Position [-25, 30] Direction left } Schematic { Location [8, 27; 952, 688] ZoomFactor 1 SliderPosition [0, -3] ShowBrowser off BrowserWidth 100 Component { Type TriangleGenerator Name "Triangular Wave" Show off Position [475, 310] Direction right Flipped off Parameter { Variable "Min" Value "-0.5" Show off } Parameter { Variable "Max" Value "0.5" Show off } Parameter { Variable "f" Value "fs" Show off } Parameter { Variable "DutyCycle" Value "0.5" Show off } Parameter { Variable "Delay" Value "0" Show off } } Component { Type MinMax Name "Min/Max" Show off Position [325, 140] Direction up Flipped off Parameter { Variable "Operation" Value "1" Show off } Parameter { Variable "Inputs" Value "3" Show off } } Component { Type SignalDemux Name "Demux1" Show off Position [255, 105] Direction right Flipped on Parameter { Variable "Width" Value "3" Show off } } Component { Type MinMax Name "Min/Max1" Show off Position [325, 205] Direction up Flipped off Parameter { Variable "Operation" Value "2" Show off } Parameter { Variable "Inputs" Value "3" Show off } } Component { Type Function Name "Fcn" Show off Position [420, 175] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "f(u)" Value "(u[1] + u[2])/2" Show off } } Component { Type SignalMux Name "Mux1" Show off Position [370, 175] Direction right Flipped off Parameter { Variable "Width" Value "2" Show off } } Component { Type Sum Name "Sum" Show off Position [455, 95] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "|+-" Show off } } Component { Type Sum Name "Sum1" Show off Position [505, 105] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "|+-" Show off } } Component { Type Sum Name "Sum2" Show off Position [550, 115] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "|+-" Show off } } Component { Type RelationalOperator Name "Relational\nOperator" Show off Position [675, 100] Direction right Flipped off Parameter { Variable "Operator" Value "6" Show off } } Component { Type RelationalOperator Name "Relational\nOperator1" Show off Position [675, 135] Direction right Flipped off Parameter { Variable "Operator" Value "6" Show off } } Component { Type RelationalOperator Name "Relational\nOperator3" Show off Position [675, 170] Direction right Flipped off Parameter { Variable "Operator" Value "6" Show off } } Component { Type SignalMux Name "Mux2" Show off Position [735, 135] Direction right Flipped off Parameter { Variable "Width" Value "3" Show off } } Component { Type Output Name "S" Show on Position [790, 135] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "Vd*" Show on Position [25, 95] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "Vq*" Show on Position [65, 105] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "the" Show on Position [105, 120] Direction right Flipped off Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Reference SrcComponent "Components/Control/Transformations/RRF->3ph" Name "RRF->3ph" Show off Position [200, 105] Direction up Flipped off Frame [-15, -15; 15, 15] LabelPosition [0, 18] LabelAlign up Terminal { Type Input Position [-15, -5] Direction left } Terminal { Type Output Position [19, 0] Direction right } Terminal { Type Input Position [-15, 5] Direction left } } Component { Type SignalMux Name "Mux" Show off Position [130, 100] Direction right Flipped off Parameter { Variable "Width" Value "2" Show off } } Component { Type Scope Name "Scope1" Show on Position [715, 30] Direction up Flipped off Location [592, 26; 1536, 850] State "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb" "wBvAG0AQQByAGUAYQAAAAAA/////wAAAJ0A////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA" "AA/////wAAAH4A////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAAB+AP///wAAAAMAAAVWAAA" "AsPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAAAABVYAAABbAP///wAABJwAAAPn" "AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA" "AAAAAAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL/gMAAAAJA" "AAABAAAAGQAAAAFAAAAZAAAAAYAAABkAAAABwAAAGQAAAABAAAAZAAAAAIAAABkAAAAAwAAAGQAAA" "AIAAAAZAAAAAkAAABkAAAAywAAAAsBAAABAAAAAAAAAAAAAAAAZP////8AAACBAAAAAAAAAAsAAAC" "aAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAA" "AAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAA" "AAAAAAxAAAAAQAAAAAAAAPoAA==" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "QAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "AAAA==" Axes "3" TimeRange "0.0" ScrollingMode "1" SingleTimeAxis "1" Open "0" Ts "-1" SampleLimit "0" XAxisLabel "" Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Fourier { SingleXAxis on AxisLabel "Frequency" Scaling 0 PhaseDisplay 0 Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} Untangle 0 KeepBaseline off BaselineValue 0 } } } Component { Type Input Name "Vc" Show on Position [385, 205] Direction right Flipped off Parameter { Variable "Index" Value "5" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Product Name "Product" Show off Position [615, 305] Direction up Flipped off Parameter { Variable "Inputs" Value "2" Show off } } Component { Type SignalMux Name "Mux3" Show off Position [605, 45] Direction right Flipped off Parameter { Variable "Width" Value "3" Show off } } Component { Type TransferFunction Name "Transfer Fcn1" Show off Position [460, 225] Direction right Flipped off Frame [-30, -15; 30, 15] LabelPosition [0, 18] LabelAlign up Parameter { Variable "Numerator" Value "[1]" Show off } Parameter { Variable "Denominator" Value "[1/(2*pi*1) 1]" Show off } Parameter { Variable "X0" Value "Vc0*1/(2*pi*1)" Show off } } Component { Type SignalMux Name "Mux4" Show off Position [570, 200] Direction right Flipped off Parameter { Variable "Width" Value "2" Show off } } Connection { Type Signal SrcComponent "Min/Max" SrcTerminal 1 Points [350, 140; 350, 170] DstComponent "Mux1" DstTerminal 2 } Connection { Type Signal SrcComponent "Demux1" SrcTerminal 2 Points [275, 95] Branch { Points [275, 130] Branch { Points [275, 195] DstComponent "Min/Max1" DstTerminal 2 } Branch { DstComponent "Min/Max" DstTerminal 2 } } Branch { DstComponent "Sum" DstTerminal 2 } } Connection { Type Signal SrcComponent "Demux1" SrcTerminal 3 Points [280, 105] Branch { Points [280, 140] Branch { Points [280, 205] DstComponent "Min/Max1" DstTerminal 3 } Branch { DstComponent "Min/Max" DstTerminal 3 } } Branch { DstComponent "Sum1" DstTerminal 2 } } Connection { Type Signal SrcComponent "Demux1" SrcTerminal 4 Points [285, 115] Branch { Points [285, 150] Branch { Points [285, 215] DstComponent "Min/Max1" DstTerminal 4 } Branch { DstComponent "Min/Max" DstTerminal 4 } } Branch { DstComponent "Sum2" DstTerminal 2 } } Connection { Type Signal SrcComponent "Min/Max1" SrcTerminal 1 Points [350, 205; 350, 180] DstComponent "Mux1" DstTerminal 3 } Connection { Type Signal SrcComponent "Mux1" SrcTerminal 1 DstComponent "Fcn" DstTerminal 1 } Connection { Type Signal SrcComponent "Relational\nOperator" SrcTerminal 3 Points [700, 100; 700, 125] DstComponent "Mux2" DstTerminal 2 } Connection { Type Signal SrcComponent "Relational\nOperator1" SrcTerminal 3 DstComponent "Mux2" DstTerminal 3 } Connection { Type Signal SrcComponent "Relational\nOperator3" SrcTerminal 3 Points [700, 170; 700, 145] DstComponent "Mux2" DstTerminal 4 } Connection { Type Signal SrcComponent "Mux2" SrcTerminal 1 DstComponent "S" DstTerminal 1 } Connection { Type Signal SrcComponent "Vd*" SrcTerminal 1 DstComponent "Mux" DstTerminal 2 } Connection { Type Signal SrcComponent "Vq*" SrcTerminal 1 DstComponent "Mux" DstTerminal 3 } Connection { Type Signal SrcComponent "the" SrcTerminal 1 Points [140, 120; 140, 110] DstComponent "RRF->3ph" DstTerminal 3 } Connection { Type Signal SrcComponent "RRF->3ph" SrcTerminal 2 Points [230, 105] Branch { DstComponent "Demux1" DstTerminal 1 } Branch { Points [230, 20] DstComponent "Scope1" DstTerminal 1 } } Connection { Type Signal SrcComponent "Fcn" SrcTerminal 2 Points [455, 175] Branch { DstComponent "Sum" DstTerminal 3 } Branch { Points [505, 175] Branch { DstComponent "Sum1" DstTerminal 3 } Branch { Points [550, 175] DstComponent "Sum2" DstTerminal 3 } } } Connection { Type Signal SrcComponent "Triangular Wave" SrcTerminal 1 DstComponent "Product" DstTerminal 3 } Connection { Type Signal SrcComponent "Mux3" SrcTerminal 1 Points [630, 45; 630, 30] DstComponent "Scope1" DstTerminal 2 } Connection { Type Signal SrcComponent "Sum" SrcTerminal 1 Points [570, 95] Branch { DstComponent "Relational\nOperator" DstTerminal 1 } Branch { Points [570, 35] DstComponent "Mux3" DstTerminal 2 } } Connection { Type Signal SrcComponent "Sum1" SrcTerminal 1 Points [575, 105] Branch { Points [615, 105; 615, 130] DstComponent "Relational\nOperator1" DstTerminal 1 } Branch { Points [575, 45] DstComponent "Mux3" DstTerminal 3 } } Connection { Type Signal SrcComponent "Sum2" SrcTerminal 1 Points [580, 115] Branch { Points [600, 115; 600, 165] DstComponent "Relational\nOperator3" DstTerminal 1 } Branch { Points [580, 55] DstComponent "Mux3" DstTerminal 4 } } Connection { Type Signal SrcComponent "Mux" SrcTerminal 1 DstComponent "RRF->3ph" DstTerminal 1 } Connection { Type Signal SrcComponent "Vc" SrcTerminal 1 Points [410, 205] Branch { Points [410, 225] DstComponent "Transfer Fcn1" DstTerminal 1 } Branch { Points [410, 195] DstComponent "Mux4" DstTerminal 2 } } Connection { Type Signal SrcComponent "Mux4" SrcTerminal 1 Points [625, 200; 625, 40] DstComponent "Scope1" DstTerminal 3 } Connection { Type Signal SrcComponent "Product" SrcTerminal 1 Points [635, 175] Branch { Points [630, 175; 630, 140] Branch { Points [630, 105] DstComponent "Relational\nOperator" DstTerminal 2 } Branch { DstComponent "Relational\nOperator1" DstTerminal 2 } } Branch { DstComponent "Relational\nOperator3" DstTerminal 2 } } Connection { Type Signal SrcComponent "Transfer Fcn1" SrcTerminal 2 Points [505, 225; 505, 230] Branch { Points [555, 230] DstComponent "Mux4" DstTerminal 3 } Branch { Points [505, 300] DstComponent "Product" DstTerminal 2 } } Annotation { Name "Filtro pasabajo" Position [460, 260] } } } Component { Type PlecsProbe Name "iabc" Show on Position [220, 155] Direction right Flipped off } Component { Type From Name "From4" Show off Position [225, 205] Direction right Flipped off Parameter { Variable "Tag" Value "the" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Reference SrcComponent "Components/Control/Transformations/3ph->RRF" Name "3ph->RRF" Show off Position [295, 200] Direction up Flipped off Frame [-15, -15; 15, 15] LabelPosition [0, 18] LabelAlign up Terminal { Type Input Position [-15, -5] Direction left } Terminal { Type Output Position [19, 0] Direction right } Terminal { Type Input Position [-15, 5] Direction left } } Component { Type SignalDemux Name "Demux" Show off Position [340, 200] Direction right Flipped on Parameter { Variable "Width" Value "2" Show off } } Component { Type Goto Name "Goto6" Show off Position [395, 195] Direction right Flipped off Parameter { Variable "Tag" Value "id^" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Goto Name "Goto7" Show off Position [395, 205] Direction right Flipped off Parameter { Variable "Tag" Value "iq^" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From7" Show off Position [930, 205] Direction right Flipped off Parameter { Variable "Tag" Value "the" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Function Name "Fcn" Show off Position [330, 325] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "f(u)" Value "u[1]/(u[2]*u[3]/u[4]+0.0001)" Show off } } Component { Type SignalMux Name "Mux2" Show off Position [275, 325] Direction right Flipped off Parameter { Variable "Width" Value "4" Show off } } Component { Type Goto Name "Goto8" Show off Position [530, 325] Direction right Flipped off Parameter { Variable "Tag" Value "the" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Constant Name "Constant4" Show off Position [215, 395] Direction right Flipped off Frame [-25, -10; 25, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Value" Value "Rr" Show off } } Component { Type Constant Name "Constant5" Show off Position [200, 355] Direction right Flipped off Frame [-15, -10; 15, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Value" Value "Lr" Show off } } Component { Type Sum Name "Sum2" Show off Position [390, 325] Direction up Flipped on Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "|++" Show off } } Component { Type Gain Name "Gain" Show off Position [325, 285] Direction right Flipped off Parameter { Variable "K" Value "p" Show off } Parameter { Variable "Multiplication" Value "1" Show off } } Component { Type Integrator Name "Integrator" Show off Position [460, 325] Direction right Flipped off Parameter { Variable "ExternalReset" Value "1" Show off } Parameter { Variable "InitialConditionSource" Value "1" Show off } Parameter { Variable "x0" Value "0" Show off } Parameter { Variable "ShowStatePort" Value "1" Show off } Parameter { Variable "UpperLimit" Value "inf" Show off } Parameter { Variable "LowerLimit" Value "-inf" Show off } } Component { Type Goto Name "Goto9" Show off Position [505, 285] Direction right Flipped off Parameter { Variable "Tag" Value "we^" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Goto Name "Goto10" Show off Position [805, 210] Direction right Flipped off Parameter { Variable "Tag" Value "iq*" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From12" Show off Position [190, 310] Direction right Flipped off Parameter { Variable "Tag" Value "iq*" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From13" Show off Position [245, 285] Direction right Flipped off Parameter { Variable "Tag" Value "wm^" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From15" Show off Position [190, 330] Direction right Flipped off Parameter { Variable "Tag" Value "im*" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type ControlledTorque Name "Torque2" Show on Position [1245, 405] Direction up Flipped on Parameter { Variable "SecondFlange" Value "1" Show off } Parameter { Variable "StateSpaceInlining" Value "2" Show off } } Component { Type Step Name "TL" Show on Position [1150, 460] Direction right Flipped off Parameter { Variable "Time" Value "1" Show off } Parameter { Variable "Before" Value "0" Show off } Parameter { Variable "After" Value "-40" Show off } } Component { Type From Name "From18" Show off Position [920, 245] Direction right Flipped off Parameter { Variable "Tag" Value "Vc" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Step Name "id*" Show on Position [785, 105] Direction right Flipped off Parameter { Variable "Time" Value "0.25" Show off } Parameter { Variable "Before" Value "0.00001" Show off } Parameter { Variable "After" Value "idnom" Show off } } Component { Type SignalMux Name "Mux5" Show off Position [610, 535] Direction left Flipped on Parameter { Variable "Width" Value "2" Show off } } Component { Type SignalMux Name "Mux6" Show off Position [610, 560] Direction left Flipped on Parameter { Variable "Width" Value "2" Show off } } Component { Type SignalMux Name "Mux7" Show off Position [565, 495] Direction left Flipped on Parameter { Variable "Width" Value "2" Show off } } Component { Type From Name "From14" Show off Position [520, 480] Direction right Flipped off Parameter { Variable "Tag" Value "wm^" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From17" Show off Position [520, 500] Direction right Flipped off Parameter { Variable "Tag" Value "wm*" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From19" Show off Position [520, 580] Direction right Flipped off Parameter { Variable "Tag" Value "iq^" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From20" Show off Position [520, 560] Direction right Flipped off Parameter { Variable "Tag" Value "iq*" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From21" Show off Position [520, 540] Direction right Flipped off Parameter { Variable "Tag" Value "id^" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From22" Show off Position [520, 520] Direction right Flipped off Parameter { Variable "Tag" Value "id*" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Goto Name "Goto11" Show off Position [505, 240] Direction right Flipped off Parameter { Variable "Tag" Value "fe^" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Gain Name "Gain2" Show off Position [465, 240] Direction right Flipped off Parameter { Variable "K" Value "1/(2*pi)" Show off } Parameter { Variable "Multiplication" Value "1" Show off } } Component { Type Scope Name "fe^" Show on Position [660, 630] Direction up Flipped off Location [346, 254; 696, 481] State "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAbwBvA" "G0AQQByAGUAYQAAAAAA/////wAAAD8A////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAAAA//" "///wAAAH4A////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAAB+AP///wAAAAMAAAAAAAAAAPw" "BAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABbAP///wAAAbYAAAD9AAAA" "BAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AAAAAA" "AAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL/gMAAAAJAAAAA" "wAAAGQAAAACAAAAZAAAAAEAAABkAAAABwAAAGQAAAAGAAAAZAAAAAUAAABkAAAABAAAAGQAAAAJAA" "AAZAAAAAgAAABkAAAAjAAAAAsBAAABAAAAAAAAAAAAAAAAff////8AAACBAAAAAAAAAAsAAABbAAA" "AAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAA" "AAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAA" "AAxAAAAAQAAAAAAAAPoAA==" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" Axes "1" TimeRange "0.0" ScrollingMode "1" SingleTimeAxis "1" Open "0" Ts "-1" SampleLimit "0" XAxisLabel "" Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Fourier { SingleXAxis on AxisLabel "Frequency" Scaling 0 PhaseDisplay 0 Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} Untangle 0 KeepBaseline off BaselineValue 0 } } } Component { Type From Name "From23" Show off Position [515, 630] Direction right Flipped off Parameter { Variable "Tag" Value "fe^" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Capacitor Name "C2" Show off Position [835, 355] Direction down Flipped on Parameter { Variable "C" Value "6e-3" Show off } Parameter { Variable "v_init" Value "Vc0/2" Show off } } Component { Type Goto Name "Goto18" Show off Position [1115, 335] Direction right Flipped off Parameter { Variable "Tag" Value "iabc" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From25" Show off Position [520, 600] Direction right Flipped off Parameter { Variable "Tag" Value "iabc" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Capacitor Name "C3" Show off Position [835, 395] Direction down Flipped on Parameter { Variable "C" Value "6e-3" Show off } Parameter { Variable "v_init" Value "Vc0/2" Show off } } Component { Type Voltmeter Name "Vm1" Show off Position [915, 370] Direction up Flipped off } Component { Type Gain Name "Gain3" Show off Position [610, 485] Direction right Flipped off Parameter { Variable "K" Value "30/pi" Show off } Parameter { Variable "Multiplication" Value "1" Show off } } Component { Type Step Name "wm*(rpm)" Show on Position [560, 120] Direction right Flipped off Parameter { Variable "Time" Value "1" Show off } Parameter { Variable "Before" Value "0" Show off } Parameter { Variable "After" Value "1000" Show off } } Component { Type Scope Name "Most of the variables" Show on Position [745, 530] Direction up Flipped off Location [-83, 74; 1456, 783] State "AAAA/wAAAAD9AAAAAgAAAAEAAAEOAAADV/wCAAAAA/sAAAAQAFoAbwBvA" "G0AQQByAGUAYQAAAAAA/////wAAAPsA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwIAAAa4AA" "ACuQAAAMgAAAB4+wAAAAwAVAByAGEAYwBlAHMBAAAAOAAAA1cAAAB+AP///wAAAAMAAAAAAAAAAPw" "BAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABbAP///wAABnEAAANXAAAA" "BAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AAAAAA" "AAAAA==" SavedViews "AAAAAgAAAAEAAAAYAFMAYQB2AGUAZAAgAHYAaQBlAHcAIAAxAAAAAAAAA" "ABAGAAAAAAAAAAAAAUAf/gAAAAAAAB/+AAAAAAAAAB/+AAAAAAAAH/4AAAAAAAAAH/4AAAAAAAAf/" "gAAAAAAAAAf/gAAAAAAAB/+AAAAAAAAAB/+AAAAAAAAH/4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "A" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL/gMAAAAJAAAAA" "wAAAGQAAAACAAAAZAAAAAEAAABkAAAABwAAAGQAAAAGAAAAZAAAAAUAAABkAAAABAAAAGQAAAAJAA" "AAZAAAAAgAAABkAAAA3wAAAAsBAAABAAAAAAAAAAAAAAAAff////8AAACBAAAAAAAAAAsAAACuAAA" "AAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAA" "AAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAA" "AAxAAAAAQAAAAAAAAPoAA==" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAA" "AEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "AAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAA" "AAAAAAAA=" Axes "5" TimeRange "0.0" ScrollingMode "1" SingleTimeAxis "1" Open "0" Ts "-1" SampleLimit "0" XAxisLabel "" Axis { Name "Valocidad" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Torque de carga" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "corriente magnetizante" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "corriente de torque" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name base64 "Y29ycmllbnRlIHRyaWbDoXNpY2E=" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Fourier { SingleXAxis on AxisLabel "Frequency" Scaling 0 PhaseDisplay 0 Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} Untangle 0 KeepBaseline off BaselineValue 0 } } } Component { Type Subsystem Name "PI \nVelocidad" Show on Position [715, 170] Direction up Flipped off Frame [-55, -20; 55, 20] LabelPosition [0, 0] SampleTime "-1" CodeGenTarget "Generic" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Output Position [59, 0] Direction right } Terminal { Type Input Position [-55, 0] Direction left } Schematic { Location [658, 116; 1032, 390] ZoomFactor 1 SliderPosition [1, 0] ShowBrowser off BrowserWidth 100 Component { Type PlecsProbe Name "wm^" Show on Position [165, 175] Direction right Flipped off } Component { Type Subsystem Name "Speed Controller3" Show off Position [295, 135] Direction up Flipped off Frame [-25, -10; 25, 10] LabelPosition [0, 13] LabelAlign up SampleTime "250e-6" CodeGenTarget "Generic" MaskType "PI controller" MaskDescription "This is a parallel discrete PI controller with anti" " windup protection. The algorithm used to the integral part was the Tustin Tr" "ansformation." MaskDisplay "color(0, 0, 0)\nline([-15,-15,15],[-8,8,8])\ncolor(25" "5, 0, 0)\nline([-12,-12,12],[8,0,-8])\n" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Parameter { Variable "Kp" Prompt "Proportional gain (Kp)" Type FreeText Value "Kp_wm" Show off Tunable off TabName "" } Parameter { Variable "Ki" Prompt "Integral gain (Ki)" Type FreeText Value "Ki_wm" Show off Tunable off TabName "" } Parameter { Variable "u0" Prompt "Inicial condition (u0)" Type FreeText Value "0" Show off Tunable off TabName "" } Parameter { Variable "umax" Prompt "Maximun output (umax)" Type FreeText Value "iqmax" Show off Tunable off TabName "" } Parameter { Variable "umin" Prompt "Minimun output (umin)" Type FreeText Value "iqmin" Show off Tunable off TabName "" } Parameter { Variable "Ts" Prompt "Sample time" Type FreeText Value "Tsc" Show off Tunable off TabName "" } Terminal { Type Output Position [29, 0] Direction right } Terminal { Type Input Position [-25, -5] Direction left } Terminal { Type Input Position [-25, 5] Direction left } Schematic { Location [4, 23; 679, 663] ZoomFactor 1 SliderPosition [190, 0] ShowBrowser off BrowserWidth 100 Component { Type Output Name "u" Show on Position [555, 190] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "+" Show on Position [245, 185] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "-" Show on Position [245, 215] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type CScript Name "C-Script" Show off Position [460, 190] Direction up Flipped off Parameter { Variable "NumInputs" Value "2" Show off } Parameter { Variable "NumOutputs" Value "1" Show off } Parameter { Variable "NumContStates" Value "0" Show off } Parameter { Variable "NumDiscStates" Value "0" Show off } Parameter { Variable "NumZCSignals" Value "0" Show off } Parameter { Variable "DirectFeedthrough" Value "1" Show off } Parameter { Variable "Ts" Value "Ts" Show off } Parameter { Variable "Parameters" Value "Ts, Kp, Ki, umax, umin, u0" Show off } Parameter { Variable "LangStandard" Value "2" Show off } Parameter { Variable "RuntimeCheck" Value "2" Show off } Parameter { Variable "Declarations" Value "#include \n#include\t\n\n#defi" "ne \tr\t Input(0)\n#define \ty\t Input(1)\n#define \tu\t Output(0)\n" "\n#define Ts \t\tParamRealData(0,0)\n#define Kp \t\tParamRealData(1,0)\n#defi" "ne Ki \t\tParamRealData(2,0)\n#define umax \tParamRealData(3,0)\n#define umin" " \tParamRealData(4,0)\n#define u0 \t\tParamRealData(5,0)\n\ndouble up, ui, ui" "1=0, e=0, e1=0;" Show off } Parameter { Variable "StartFcn" Value "" Show off } Parameter { Variable "OutputFcn" Value "e=r-y;\nup=Kp*e;\nui=Ki*Ts*(e+e1)/2+ui1;\nu= up" " + ui + u0;\n\nif (u>umax)\n\t{u=umax;}\nelse if (u\n#include\t\n\n#defi" "ne \tr\t Input(0)\n#define \ty\t Input(1)\n#define \tu\t Output(0)\n" "\n#define Ts \t\tParamRealData(0,0)\n#define Kp \t\tParamRealData(1,0)\n#defi" "ne Ki \t\tParamRealData(2,0)\n#define umax \tParamRealData(3,0)\n#define umin" " \tParamRealData(4,0)\n#define u0 \t\tParamRealData(5,0)\n\ndouble up, ui, ui" "1=0, e=0, e1=0;" Show off } Parameter { Variable "StartFcn" Value "" Show off } Parameter { Variable "OutputFcn" Value "e=r-y;\nup=Kp*e;\nui=Ki*Ts*(e+e1)/2+ui1;\nu= up" " + ui + u0;\n\nif (u>umax)\n\t{u=umax;}\nelse if (u\n#include\t\n\n#defi" "ne \tr\t Input(0)\n#define \ty\t Input(1)\n#define \tu\t Output(0)\n" "\n#define Ts \t\tParamRealData(0,0)\n#define Kp \t\tParamRealData(1,0)\n#defi" "ne Ki \t\tParamRealData(2,0)\n#define umax \tParamRealData(3,0)\n#define umin" " \tParamRealData(4,0)\n#define u0 \t\tParamRealData(5,0)\n\ndouble up, ui, ui" "1=0, e=0, e1=0;" Show off } Parameter { Variable "StartFcn" Value "" Show off } Parameter { Variable "OutputFcn" Value "e=r-y;\nup=Kp*e;\nui=Ki*Ts*(e+e1)/2+ui1;\nu= up" " + ui + u0;\n\nif (u>umax)\n\t{u=umax;}\nelse if (uRRF" SrcTerminal 2 DstComponent "Demux" DstTerminal 1 } Connection { Type Signal SrcComponent "Mux2" SrcTerminal 1 DstComponent "Fcn" DstTerminal 1 } Connection { Type Signal SrcComponent "Constant5" SrcTerminal 1 Points [245, 355; 245, 330] DstComponent "Mux2" DstTerminal 4 } Connection { Type Signal SrcComponent "From12" SrcTerminal 1 DstComponent "Mux2" DstTerminal 2 } Connection { Type Signal SrcComponent "From15" SrcTerminal 1 Points [200, 330; 200, 325; 260, 325] DstComponent "Mux2" DstTerminal 3 } Connection { Type Signal SrcComponent "Gain" SrcTerminal 2 Points [390, 285] DstComponent "Sum2" DstTerminal 3 } Connection { Type Rotational SrcComponent "Squirrel-Cage IM" SrcTerminal 4 DstComponent "Torque2" DstTerminal 1 } Connection { Type Wire SrcComponent "V_3ph" SrcTerminal 1 DstComponent "L1" DstTerminal 1 } Connection { Type Wire SrcComponent "L2" SrcTerminal 1 DstComponent "V_3ph" DstTerminal 2 } Connection { Type Wire SrcComponent "V_3ph" SrcTerminal 3 DstComponent "L3" DstTerminal 1 } Connection { Type Signal SrcComponent "From4" SrcTerminal 1 DstComponent "3ph->RRF" DstTerminal 3 } Connection { Type Signal SrcComponent "iabc" SrcTerminal 1 Points [255, 155; 255, 195] DstComponent "3ph->RRF" DstTerminal 1 } Connection { Type Signal SrcComponent "Sum2" SrcTerminal 1 Points [420, 325] Branch { DstComponent "Integrator" DstTerminal 1 } Branch { Points [420, 285] Branch { DstComponent "Goto9" DstTerminal 1 } Branch { Points [420, 240] DstComponent "Gain2" DstTerminal 1 } } } Connection { Type Signal SrcComponent "Modulador" SrcTerminal 1 Points [1015, 185; 1015, 300; 965, 300] DstComponent "H" DstTerminal 5 } Connection { Type Signal SrcComponent "From18" SrcTerminal 1 Points [930, 245; 930, 220] DstComponent "Modulador" DstTerminal 5 } Connection { Type Signal SrcComponent "From7" SrcTerminal 1 DstComponent "Modulador" DstTerminal 4 } Connection { Type Wire SrcComponent "H" SrcTerminal 6 Points [1055, 390; 1055, 385] DstComponent "3ph Meter" DstTerminal 3 } Connection { Type Signal SrcComponent "Fcn" SrcTerminal 2 DstComponent "Sum2" DstTerminal 2 } Connection { Type Signal SrcComponent "From13" SrcTerminal 1 DstComponent "Gain" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux" SrcTerminal 3 DstComponent "Goto7" DstTerminal 1 } Connection { Type Signal SrcComponent "From17" SrcTerminal 1 DstComponent "Mux7" DstTerminal 2 } Connection { Type Signal SrcComponent "From19" SrcTerminal 1 Points [560, 580; 560, 565] DstComponent "Mux6" DstTerminal 2 } Connection { Type Signal SrcComponent "From21" SrcTerminal 1 DstComponent "Mux5" DstTerminal 2 } Connection { Type Signal SrcComponent "Gain2" SrcTerminal 2 DstComponent "Goto11" DstTerminal 1 } Connection { Type Signal SrcComponent "3ph Meter" SrcTerminal 8 Points [1090, 335] DstComponent "Goto18" DstTerminal 1 } Connection { Type Wire Points [1085, 400; 1085, 395] } Connection { Type Signal SrcComponent "Mux7" SrcTerminal 1 Points [580, 495] DstComponent "Gain3" DstTerminal 1 } Connection { Type Wire SrcComponent "L1" SrcTerminal 2 DstComponent "Diode\nRectifier" DstTerminal 1 } Connection { Type Signal SrcComponent "id*" SrcTerminal 1 Points [805, 160] DstComponent "PIs\nCorriente \ndq" DstTerminal 4 } Connection { Type Signal SrcComponent "From22" SrcTerminal 1 Points [560, 520; 560, 530] DstComponent "Mux5" DstTerminal 3 } Connection { Type Signal SrcComponent "From14" SrcTerminal 1 Points [540, 480; 540, 490] DstComponent "Mux7" DstTerminal 3 } Connection { Type Signal SrcComponent "From23" SrcTerminal 1 DstComponent "fe^" DstTerminal 1 } Connection { Type Signal SrcComponent "From20" SrcTerminal 1 Points [560, 560; 560, 555] DstComponent "Mux6" DstTerminal 3 } Connection { Type Wire SrcComponent "3ph Meter" SrcTerminal 1 Points [1050, 365; 1050, 360] DstComponent "H" DstTerminal 2 } Connection { Type Wire SrcComponent "H" SrcTerminal 1 DstComponent "3ph Meter" DstTerminal 2 } Connection { Type Signal SrcComponent "Mux5" SrcTerminal 1 Points [665, 535; 665, 530] DstComponent "Most of the variables" DstTerminal 3 } Connection { Type Signal SrcComponent "Mux6" SrcTerminal 1 Points [695, 560; 695, 540] DstComponent "Most of the variables" DstTerminal 4 } Connection { Type Signal SrcComponent "Gain3" SrcTerminal 2 Points [670, 485; 670, 510] DstComponent "Most of the variables" DstTerminal 1 } Connection { Type Signal SrcComponent "From25" SrcTerminal 1 Points [715, 600] DstComponent "Most of the variables" DstTerminal 5 } Connection { Type Signal SrcComponent "From3" SrcTerminal 1 DstComponent "Relational\nOperator2" DstTerminal 2 } Connection { Type Signal SrcComponent "Constant2" SrcTerminal 1 DstComponent "Relational\nOperator2" DstTerminal 1 } Connection { Type Signal SrcComponent "Relational\nOperator2" SrcTerminal 3 Points [820, 280] DstComponent "S1" DstTerminal 3 } Connection { Type Signal SrcComponent "From16" SrcTerminal 1 Points [675, 515; 675, 520] DstComponent "Most of the variables" DstTerminal 2 } Connection { Type Wire SrcComponent "C3" SrcTerminal 1 DstComponent "C2" DstTerminal 2 } Connection { Type Signal SrcComponent "TL" SrcTerminal 1 Points [1175, 460; 1175, 495] DstComponent "Sum" DstTerminal 2 } Connection { Type Signal SrcComponent "TL1" SrcTerminal 1 Points [1205, 525] DstComponent "Sum" DstTerminal 3 } Connection { Type Signal SrcComponent "Sum" SrcTerminal 1 Points [1245, 495; 1245, 445] Branch { DstComponent "Torque2" DstTerminal 2 } Branch { DstComponent "Goto12" DstTerminal 1 } } Connection { Type Signal SrcComponent "Filtro para obtener im" SrcTerminal 2 Points [450, 115] Branch { Points [450, 165] DstComponent "Goto13" DstTerminal 1 } Branch { Points [450, 105] DstComponent "i Magnetizante" DstTerminal 1 } } Connection { Type Signal SrcComponent "Demux" SrcTerminal 2 Points [345, 180] Branch { Points [320, 180; 320, 115] DstComponent "Filtro para obtener im" DstTerminal 1 } Branch { Points [375, 180] DstComponent "Goto6" DstTerminal 1 } } Connection { Type Signal SrcComponent "Integrator" SrcTerminal 2 Points [485, 325] Branch { DstComponent "Goto8" DstTerminal 1 } Branch { DstComponent "Angulo Theta e" DstTerminal 1 } } Connection { Type Signal SrcComponent "3ph Meter" SrcTerminal 7 Points [1080, 250] DstComponent "Voltajes de estator" DstTerminal 1 } Connection { Type Signal SrcComponent "PI \nVelocidad" SrcTerminal 1 Points [785, 170] Branch { DstComponent "PIs\nCorriente \ndq" DstTerminal 3 } Branch { DstComponent "Goto10" DstTerminal 1 } } Connection { Type Signal SrcComponent "Constant4" SrcTerminal 1 Points [315, 395; 315, 370; 250, 370; 250, 340] DstComponent "Mux2" DstTerminal 5 } Connection { Type Signal SrcComponent "PIs\nCorriente \ndq" SrcTerminal 1 Points [905, 150] Branch { Points [935, 150] DstComponent "Modulador" DstTerminal 2 } Branch { Points [905, 90] DstComponent "Voltajes de estator d-q" DstTerminal 1 } } Connection { Type Signal SrcComponent "PIs\nCorriente \ndq" SrcTerminal 2 Points [900, 185; 920, 185] Branch { DstComponent "Modulador" DstTerminal 3 } Branch { Points [920, 100] DstComponent "Voltajes de estator d-q" DstTerminal 2 } } Connection { Type Wire SrcComponent "Diode\nRectifier" SrcTerminal 4 Points [735, 330; 765, 330] Branch { DstComponent "R1" DstTerminal 2 } Branch { Points [765, 310] DstComponent "S1" DstTerminal 1 } } Connection { Type Wire SrcComponent "Diode\nRectifier" SrcTerminal 5 Points [735, 455; 830, 455] Branch { Points [830, 405] DstComponent "C3" DstTerminal 2 } Branch { Points [880, 455] Branch { Points [915, 455] Branch { DstComponent "Vm1" DstTerminal 2 } Branch { Points [1010, 455] DstComponent "H" DstTerminal 3 } } Branch { DstComponent "S2" DstTerminal 1 } } } Connection { Type Wire SrcComponent "R2" SrcTerminal 1 DstComponent "S2" DstTerminal 2 } Connection { Type Signal SrcComponent "Sum3" SrcTerminal 1 DstComponent "Relay" DstTerminal 1 } Connection { Type Signal SrcComponent "Constant1" SrcTerminal 1 Points [1075, 625; 1075, 590] DstComponent "Sum3" DstTerminal 2 } Connection { Type Signal SrcComponent "Vm1" SrcTerminal 3 Points [930, 405] Branch { DstComponent "Goto5" DstTerminal 1 } Branch { Points [930, 505; 1060, 505; 1060, 565] Branch { DstComponent "Sum3" DstTerminal 3 } Branch { DstComponent "Tension DC_link" DstTerminal 1 } } } Connection { Type Signal SrcComponent "Relay" SrcTerminal 2 Points [860, 585] DstComponent "S2" DstTerminal 3 } Connection { Type Signal SrcComponent "wm*(rpm)" SrcTerminal 1 Points [590, 120; 590, 165] DstComponent "Sum1" DstTerminal 2 } Connection { Type Signal SrcComponent "Sum1" SrcTerminal 1 DstComponent "PI \nVelocidad" DstTerminal 2 } Connection { Type Signal SrcComponent "wm*(rpm)1" SrcTerminal 1 Points [595, 190; 595, 175] DstComponent "Sum1" DstTerminal 3 } Annotation { Name "Deslizamiento" Position [320, 345] } Annotation { Name "Clarke" Position [295, 175] } Annotation { Name "Wm electrico" Position [365, 260] } Annotation { Name base64 "U2lzdGVtYSBkaXNlw7FhZG8gcGFyYSBvcGVyYXIgYmFqbyBsYS" "B2ZWxvY2lkYWQgYmFzZS4gTW9kZWxvIG11eSBiw6FzaWNvLCBkZWJlIHNlciBtZWpvcmFkbyBzaSB" "xdWllcmUgdXRpbGl6YXJsbyBlbiBhbGd1bmEgYXBsaWNhY2lvbg==" Position [700, 685] } Annotation { Name "Control de histeresis Frenado disipativo" Position [900, 620] } } ProbeBlock { Tag "Modelo_basico_en_PLECS_de_FOC/iabc" Probe { Component "Squirrel-Cage IM" Path "" Signals {"Stator phase currents"} } } ProbeBlock { Tag "Modelo_basico_en_PLECS_de_FOC/PI \\nVelocidad/wm^" Probe { Component "Squirrel-Cage IM" Path "" Signals {"Rotational speed"} } } } DemoSignature "e24kDFrJaS6BL04wo815Rfk7nvokUb2Ipy2yfwvlx4I="