Plecs { Name "six_phase_pmsm_nolib" Version "4.6" CircuitModel "ContStateSpace" StartTime "0.0" TimeSpan "5" Timeout "" Solver "dopri" MaxStep "1e-3" InitStep "-1" FixedStep "1e-6" Refine "1" ZCStepSize "1e-9" RelTol "1e-3" AbsTol "-1" TurnOnThreshold "0" SyncFixedStepTasks "2" UseSingleCommonBaseRate "2" LossVariableLimitExceededMsg "3" NegativeSwitchLossMsg "3" DivisionByZeroMsg "3" StiffnessDetectionMsg "2" MaxConsecutiveZCs "1000" AlgebraicLoopWithStateMachineMsg "3" AssertionAction "1" InitializationCommands "% Converter parameters\nVdc = 400; % DC source volta" "ge in V\nfsw = 10e3; % switching frequency in Hz\n\n% Plant dicretizaton\nTs_" "plant = 7e-6; % sample step size of the plant subsystem in sec\n\n% Controlle" "r dicretizaton\nTs_controller = 1/fsw; % sample step size of the control task" " in sec\n\n% PMSM parameters \np = 3;\nZeta = pi/6;\nTsc=1e-4;\nflux_magnet=0" ".7;\nLd=5e-3;\nLq=5e-3;\nLmd=3e-3;\nLmq=3e-3;\nLl = Ld-Lmd;\nRs=1.5;\nJ = 0.0" "91*4;\n\n% inverter d-q current control plant parameters\nRtot = Rs;\nLf_PI =" " Ld;\nRf_PI = Rtot;\nK_plant = 1/Rf_PI;\nT_plant = Lf_PI/Rf_PI;\nKpe = 1;\nTs" "w = 1/fsw;\nTpe = Tsw*1.5;\n\n% d-q current controller PI design: Optimum Mag" "nitude \nTn_PI = T_plant;\nTi_PI = 2*K_plant*Kpe*Tpe;\nKp_PI = Tn_PI/Ti_PI;\n" "Ki_PI = 1/Ti_PI;\nKbc_PI = Ki_PI/Kp_PI;\n\nkp_1d=Kp_PI;\nki_1d=Ki_PI;\nkp_1q=" "Kp_PI;\nki_1q=Ki_PI;\nkp_2d=Kp_PI;\nki_2d=Ki_PI;\nkp_2q=Kp_PI;\nki_2q=Ki_PI;" "\n\n% speed controller PI design: Symmetric optimum\n% Closed-loop current tr" "ansfer function\ns = tf('s');\n\nGcc = (Kp_PI+Ki_PI/s)*K_plant/(T_plant*s+1);" "\nw1 = 2*pi*10*fsw;\n[gain, ~] = bode(Gcc,w1);\ngaindB = 20*log10(gain);\nwg " "= 10^(log10(10*fsw*2*pi)+gaindB/20);\nGi_fo = 1/(1/wg*s+1); % First-order lo" "w-pass filter approximation of closed current control loop\n\n% Controller de" "sign using bandwidth based crossover specifications\n\nwcw = 20; % Desired ba" "ndwidth of the speed control loop\npm_w = 80*pi/180; % Desired phase-margin\n" "[magpw, phasepw] = bode(Gi_fo * 1/(s*J) * 3/2*p*flux_magnet,wcw);\nphasepw = " "phasepw*pi/180;\nKp_w = -1/magpw*cos(pm_w-phasepw);\nTi = 1/(-tan(pm_w-phasep" "w)*wcw);\nKi_w = Kp_w/Ti;\n\nclear Gcc s Gi_fo \n" InitialState "1" SystemState "" TaskingMode "1" TaskConfigurations "" CodeGenParameterInlining "2" CodeGenFloatingPointFormat "2" CodeGenAbsTimeUsageMsg "3" CodeGenBaseName "" CodeGenOutputDir "" CodeGenExtraOpts "" CodeGenTarget "Generic" CodeGenTargetSettings "" ExtendedMatrixPrecision "1" MatrixSignificanceCheck "2" EnableStateSpaceSplitting "2" DisplayStateSpaceSplitting "1" DiscretizationMethod "2" ExternalModeSettings "AAAAfwAAAAAWUU1hcDxRU3RyaW5nLFFTdHJpbmc+AAAAAAYAAAAYAF" "QAcgBpAGcAZwBlAHIAVgBhAGwAdQBlAAAAAgAwAAAAGABUAHIAaQBnAGcAZQByAEQAZQBsAGEAeQA" "AAAIAMAAAABYAUwBlAG4AcwBpAHQAaQB2AGkAdAB5AAAAAgAwAAAAFgBSAGUAZgByAGUAcwBoAFIA" "YQB0AGUAAAAEADIAMAAAABQATgB1AG0AUwBhAG0AcABsAGUAcwAAAAgAOAAxADkAMgAAABQARABlA" "GMAaQBtAGEAdABpAG8AbgAAAAIAMQ==" AlgebraicLoopMethod "2" AlgebraicLoopTolerance "1e-6" ScriptsDialogGeometry "" ScriptsDialogSplitterPos "0" Schematic { Location [271, 53; 841, 376] ZoomFactor 0.98661 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Subsystem Name "Plant" Show on Position [370, 135] Direction up Flipped off Frame [-70, -65; 70, 65] LabelPosition [0, 68] LabelAlign up SampleTime "-1" CodeGenSampleTime "Ts_plant" CodeGenDiscretizationMethod "2" CodeGenTarget "PLECS RT Box 1" CodeGenTargetSettings "AAAAfwAAAAAlUU1hcDxRU3RyaW5nLFFNYXA8UVN0cmluZyxRU" "3RyaW5nPiA+AAAAAAMAAAAcAFAATABFAEMAUwAgAFIAVAAgAEIAbwB4ACAAMwAAABgAAAAeAHMAeQ" "BuAGMAaAByAG8AbgBpAHoAZQBUAGkAbQBlAAAAAgAwAAAAGABzAHQAYQByAHQAdQBwAFMARgBQAF8" "ASAAAAAIAMAAAABgAcwB0AGEAcgB0AHUAcABTAEYAUABfAEcAAAACADAAAAAYAHMAdABhAHIAdAB1" "AHAAUwBGAFAAXwBGAAAAAgAwAAAAGABzAHQAYQByAHQAdQBwAFMARgBQAF8ARQAAAAIAMAAAABgAc" "wB0AGEAcgB0AHUAcABTAEYAUABfAEQAAAACADAAAAAYAHMAdABhAHIAdAB1AHAAUwBGAFAAXwBDAA" "AAAgAwAAAAGABzAHQAYQByAHQAdQBwAFMARgBQAF8AQgAAAAIAMAAAABgAcwB0AGEAcgB0AHUAcAB" "TAEYAUABfAEEAAAACADAAAAAaAHMAYQBtAHAAbABpAG4AZwBEAGUAbABhAHkAAAACADAAAAAYAG0A" "YQB4AF8AbwB2AGUAcgByAHUAbgBzAAAAAgA1AAAAEgBtAGEAcwB0AGUAcgBTAEYAUAAAAAIAMQAAA" "CQAZABpAGcAaQB0AGEAbABPAHUAdABwAHUAdABMAGUAdgBlAGwAAAACADEAAAAeAGMAYQBuADIAVA" "BlAHIAbQBpAG4AYQB0AGkAbwBuAAAAAgAyAAAAFABjAGEAbgAyAEUAbgBhAGIAbABlAAAAAgAwAAA" "AEABjAGEAbgAyAEIAYQB1AGQAAAAMADUAMAAwADAAMAAwAAAAHgBjAGEAbgAxAFQAZQByAG0AaQBu" "AGEAdABpAG8AbgAAAAIAMgAAABQAYwBhAG4AMQBFAG4AYQBiAGwAZQAAAAIAMAAAABAAYwBhAG4AM" "QBCAGEAdQBkAAAADAA1ADAAMAAwADAAMAAAABwAYQBuAGEAbABvAGcAUwBhAG0AcABsAGkAbgBnAA" "AAAgAxAAAAIgBhAG4AYQBsAG8AZwBPAHUAdABwAHUAdABSAGEAbgBnAGUAAAACADEAAAAgAGEAbgB" "hAGwAbwBnAEkAbgBwAHUAdABSAGEAbgBnAGUAAAACADEAAAAaAFQAQQBSAEcARQBUAF8ARABFAFYA" "SQBDAEUAAAAoAFIAVABCAG8AeAAzAC0AUwB0AHUAZABpAG8ALgBsAG8AYwBhAGwALgAAABoARQBYA" "FQARQBSAE4AQQBMAF8ATQBPAEQARQAAAAIAMQAAABwAUABMAEUAQwBTACAAUgBUACAAQgBvAHgAIA" "AyAAAAGAAAAB4AcwB5AG4AYwBoAHIAbwBuAGkAegBlAFQAaQBtAGUAAAACADAAAAAYAHMAdABhAHI" "AdAB1AHAAUwBGAFAAXwBIAAAAAgAwAAAAGABzAHQAYQByAHQAdQBwAFMARgBQAF8ARwAAAAIAMAAA" "ABgAcwB0AGEAcgB0AHUAcABTAEYAUABfAEYAAAACADAAAAAYAHMAdABhAHIAdAB1AHAAUwBGAFAAX" "wBFAAAAAgAwAAAAGABzAHQAYQByAHQAdQBwAFMARgBQAF8ARAAAAAIAMAAAABgAcwB0AGEAcgB0AH" "UAcABTAEYAUABfAEMAAAACADAAAAAYAHMAdABhAHIAdAB1AHAAUwBGAFAAXwBCAAAAAgAwAAAAGAB" "zAHQAYQByAHQAdQBwAFMARgBQAF8AQQAAAAIAMAAAABoAcwBhAG0AcABsAGkAbgBnAEQAZQBsAGEA" "eQAAAAIAMAAAABgAbQBhAHgAXwBvAHYAZQByAHIAdQBuAHMAAAACADUAAAASAG0AYQBzAHQAZQByA" "FMARgBQAAAAAgAxAAAAJABkAGkAZwBpAHQAYQBsAE8AdQB0AHAAdQB0AEwAZQB2AGUAbAAAAAIAMQ" "AAAB4AYwBhAG4AMgBUAGUAcgBtAGkAbgBhAHQAaQBvAG4AAAACADIAAAAUAGMAYQBuADIARQBuAGE" "AYgBsAGUAAAACADAAAAAQAGMAYQBuADIAQgBhAHUAZAAAAAwANQAwADAAMAAwADAAAAAeAGMAYQBu" "ADEAVABlAHIAbQBpAG4AYQB0AGkAbwBuAAAAAgAyAAAAFABjAGEAbgAxAEUAbgBhAGIAbABlAAAAA" "gAwAAAAEABjAGEAbgAxAEIAYQB1AGQAAAAMADUAMAAwADAAMAAwAAAAHABhAG4AYQBsAG8AZwBTAG" "EAbQBwAGwAaQBuAGcAAAACADEAAAAiAGEAbgBhAGwAbwBnAE8AdQB0AHAAdQB0AFIAYQBuAGcAZQA" "AAAIAMQAAACAAYQBuAGEAbABvAGcASQBuAHAAdQB0AFIAYQBuAGcAZQAAAAIAMQAAABoAVABBAFIA" "RwBFAFQAXwBEAEUAVgBJAEMARQAAADIAcgB0AGIAbwB4AC0AMgAwAGIAMABmADcAMAA0ADkAOABkA" "DIALgBsAG8AYwBhAGwALgAAABoARQBYAFQARQBSAE4AQQBMAF8ATQBPAEQARQAAAAIAMQAAABwAUA" "BMAEUAQwBTACAAUgBUACAAQgBvAHgAIAAxAAAAGAAAAB4AcwB5AG4AYwBoAHIAbwBuAGkAegBlAFQ" "AaQBtAGUAAAACADAAAAAYAHMAdABhAHIAdAB1AHAAUwBGAFAAXwBEAAAAAgAwAAAAGABzAHQAYQBy" "AHQAdQBwAFMARgBQAF8AQwAAAAIAMAAAABgAcwB0AGEAcgB0AHUAcABTAEYAUABfAEIAAAACADAAA" "AAYAHMAdABhAHIAdAB1AHAAUwBGAFAAXwBBAAAAAgAwAAAAGgBzAGEAbQBwAGwAaQBuAGcARABlAG" "wAYQB5AAAAAgAwAAAAGABtAGEAeABfAG8AdgBlAHIAcgB1AG4AcwAAAAIANQAAABIAbQBhAHMAdAB" "lAHIAUwBGAFAAAAACADEAAAAkAGQAaQBnAGkAdABhAGwATwB1AHQAcAB1AHQATABlAHYAZQBsAAAA" "AgAxAAAAEABjAGEAbgAyAFQAeABSAHgAAAACADEAAAAeAGMAYQBuADIAVABlAHIAbQBpAG4AYQB0A" "GkAbwBuAAAAAgAyAAAAIgBjAGEAbgAyAFIAZQBjAG8AdgBlAHIAeQBEAGUAbABhAHkAAAACADAAAA" "AUAGMAYQBuADIARQBuAGEAYgBsAGUAAAACADAAAAAQAGMAYQBuADIAQgBhAHUAZAAAAAwANQAwADA" "AMAAwADAAAAAQAGMAYQBuADEAVAB4AFIAeAAAAAIAMQAAAB4AYwBhAG4AMQBUAGUAcgBtAGkAbgBh" "AHQAaQBvAG4AAAACADIAAAAiAGMAYQBuADEAUgBlAGMAbwB2AGUAcgB5AEQAZQBsAGEAeQAAAAIAM" "AAAABQAYwBhAG4AMQBFAG4AYQBiAGwAZQAAAAIAMAAAABAAYwBhAG4AMQBCAGEAdQBkAAAADAA1AD" "AAMAAwADAAMAAAABwAYQBuAGEAbABvAGcAUwBhAG0AcABsAGkAbgBnAAAAAgAxAAAAIgBhAG4AYQB" "sAG8AZwBPAHUAdABwAHUAdABSAGEAbgBnAGUAAAACADEAAAAgAGEAbgBhAGwAbwBnAEkAbgBwAHUA" "dABSAGEAbgBnAGUAAAACADEAAAAaAFQAQQBSAEcARQBUAF8ARABFAFYASQBDAEUAAAAAAAAAGgBFA" "FgAVABFAFIATgBBAEwAXwBNAE8ARABFAAAAAgAx" ExternalModeSettings "AAAAfwAAAAAWUU1hcDxRU3RyaW5nLFFTdHJpbmc+AAAAAAcAAA" "AYAFQAcgBpAGcAZwBlAHIAVgBhAGwAdQBlAAAABgAxAC4ANgAAABgAVAByAGkAZwBnAGUAcgBEAGU" "AbABhAHkAAAAKAC0AMwA1ADYANwAAABwAVAByAGkAZwBnAGUAcgBDAGgAYQBuAG4AZQBsAAAABAAt" "ADEAAAAWAFMAZQBuAHMAaQB0AGkAdgBpAHQAeQAAAAIAMQAAABYAUgBlAGYAcgBlAHMAaABSAGEAd" "ABlAAAABAAyADAAAAAUAE4AdQBtAFMAYQBtAHAAbABlAHMAAAAKADEAMAAwADAAMAAAABQARABlAG" "MAaQBtAGEAdABpAG8AbgAAAAIAMQ==" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Output Position [74, -50] Direction right } Terminal { Type Output Position [74, -40] Direction right } Terminal { Type Output Position [74, -20] Direction right } Terminal { Type Output Position [74, -30] Direction right } Terminal { Type Input Position [-70, -30] Direction left } Terminal { Type Input Position [-70, -15] Direction left } Schematic { Location [679, 53; 1440, 533] ZoomFactor 1.00677 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Voltmeter Name "Vm1" Show off Position [185, 100] Direction up Flipped off } Component { Type Goto Name "Goto7" Show off Position [225, 100] Direction right Flipped off Parameter { Variable "Tag" Value "vdc1" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type ThreePhaseMeter Name "3ph Meter" Show off Position [435, 100] Direction up Flipped off Parameter { Variable "voltage" Value "2" Show off } } Component { Type Voltmeter Name "Vm2" Show off Position [185, 305] Direction up Flipped off } Component { Type Goto Name "Goto12" Show off Position [225, 305] Direction right Flipped off Parameter { Variable "Tag" Value "vdc2" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type ThreePhaseMeter Name "3ph Meter1" Show off Position [435, 310] Direction up Flipped off Parameter { Variable "voltage" Value "2" Show off } } Component { Type Scope Name "Scope1" Show on Position [665, 35] Direction up Flipped off Location [906, 53; 1440, 900] State "AAAA/wAAAAD9AAAAAgAAAAEAAAC0AAADYfwCAAAAA/sAAAAQAFoAb" "wBvAG0AQQByAGUAYQAAAAAA/////wAAANQA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA" "AA/////wAAAGYA////+wAAAAwAVAByAGEAYwBlAHMAAAAAHAAAA2EAAABmAP///wAAAAMAAANoAAA" "Ag/wBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAAAAA2gAAABCAP///wAAAhYAAAMz" "AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA" "AAAAAAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL/gMAAAAJA" "AAABgAAAGQAAAAHAAAAZAAAAAQAAABkAAAABQAAAGQAAAACAAAAZAAAAAMAAABkAAAAAQAAAGQAAA" "AIAAAAZAAAAAkAAABkAAAAxwAAAAsBAAABAAAAAAAAAAAAAAAAZP////8AAACBAAAAAAAAAAsAAAC" "0AAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAA" "AAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAA" "AAAAAATAAAAAQAAAAAAAAPoAAAAABM=" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "QAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "AAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAA" "AAAAAAAAAAAA=" Axes "5" TimeRange "0" ScrollingMode "1" SingleTimeAxis "1" Open "0" Ts "-1" SampleLimit "0" XAxisLabel "Time (s)" ShowLegend "1" Axis { Name "Machine stator currents 1" AutoScale 0 MinValue -16 MaxValue 16 Signals {"Phase A", "Phase B", "Phase C "} SignalTypes [ ] AxisLabel "A" Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Machine stator currents 2" AutoScale 0 MinValue -16 MaxValue 16 Signals {"Phase D", "Phase E", "Phase F"} SignalTypes [ ] AxisLabel "A" Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Machine rotational speed" AutoScale 0 MinValue 0 MaxValue 50 Signals {"Rotational speed"} SignalTypes [ ] AxisLabel "rad/s" Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Machine rotor position" AutoScale 0 MinValue -4 MaxValue 4 Signals {"Rotor position"} SignalTypes [ ] AxisLabel "rad" Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Machine electrical torque" AutoScale 0 MinValue 0 MaxValue 60 Signals {"Electrical torque"} SignalTypes [ ] AxisLabel "Nm" Untangle 0 KeepBaseline off BaselineValue 0 } Fourier { SingleXAxis on AxisLabel "Frequency" Scaling 0 PhaseDisplay 0 ShowFourierLegend off Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {"Phase A", "Phase B", "Phase C "} Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {"Phase D", "Phase E", "Phase F"} Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {"Rotational speed"} Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {"Rotor position"} Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {"Electrical torque"} Untangle 0 KeepBaseline off BaselineValue 0 } } } Component { Type PlecsProbe Name "Probe2" Show off Position [600, 130] Direction right Flipped off } Component { Type SignalMux Name "Mux" Show off Position [180, 200] Direction right Flipped on Parameter { Variable "Width" Value "2" Show off } } Component { Type RotationalDamper Name "Rotational\nDamper" Show off Position [685, 245] Direction down Flipped on Parameter { Variable "D" Value "1" Show off } Parameter { Variable "theta0" Value "" Show off } } Component { Type RotationalReference Name "Rotational\nFrame" Show off Position [715, 245] Direction left Flipped off } Component { Type PlecsProbe Name "Probe3" Show off Position [580, 45] Direction right Flipped off } Component { Type SignalDemux Name "Demux2" Show off Position [620, 45] Direction right Flipped on Parameter { Variable "Width" Value "3" Show off } } Component { Type Subsystem Name "Dual Star\nPMSM" Show on Position [620, 210] Direction up Flipped on Frame [-35, -45; 35, 45] LabelPosition [0, 48] LabelAlign up SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskType "Dual Star PMSM" MaskDescription "Generic dual-star machine model with rotor magnets " "and rotor windings in Rotor Reference Frame (RRF). Also takes into account st" "ator leakage coupling. " MaskHelp "sm_salientpole.html" MaskDisplay base64 "bG9jYWwgclMgPSAzMgpsb2NhbCByUiA9IDI0CmxvY2FsIH" "BpID0gbWF0aC5waQpsb2NhbCB6ZXRhID0gcGkvMTgwKjMwCmxvY2FsIHJEID0gclMqMC45NQogIAp" "sb2NhbCBmdW5jdGlvbiBkcmF3QXhpcyAoYWxwaGEscikKICAgbG9jYWwgYXJyb3dSID0gMC45Mipy" "CiAgIGxvY2FsIGFycm93QWxwaGEgPSBtYXRoLnBpKjAuMDIxCiAgIGxvY2FsIG1pZFggPSBtYXRoL" "mNvcyhhbHBoYSkqcgogICBsb2NhbCBtaWRZID0gbWF0aC5zaW4oYWxwaGEpKnIKICAgbG9jYWwgbG" "VmdFggPSBtYXRoLmNvcyhhbHBoYS1hcnJvd0FscGhhKSphcnJvd1IKICAgbG9jYWwgbGVmdFkgPSB" "tYXRoLnNpbihhbHBoYS1hcnJvd0FscGhhKSphcnJvd1IKICAgbG9jYWwgcmlnaHRYID0gbWF0aC5j" "b3MoYWxwaGErYXJyb3dBbHBoYSkqYXJyb3dSCiAgIGxvY2FsIHJpZ2h0WSA9IG1hdGguc2luKGFsc" "GhhK2Fycm93QWxwaGEpKmFycm93UgoKICAgSWNvbjpsaW5lKHswLG1pZFh9LHswLG1pZFl9KQogIC" "BJY29uOmxpbmUoe2xlZnRYLG1pZFh9LHtsZWZ0WSxtaWRZfSkKCUljb246bGluZSh7cmlnaHRYLG1" "pZFh9LHtyaWdodFksbWlkWX0pCgplbmQKCkljb246Y2lyY2xlKDAsIDAsIHJTKQpJY29uOmNpcmNs" "ZSgwLCAwLCByUikKSWNvbjphcmMoMCwwLHJSLzIsclIvMiwwLC16ZXRhL3BpKjE4MCkKCgpkcmF3Q" "XhpcygwLHJEKQpkcmF3QXhpcygyKnBpLzMsckQpCmRyYXdBeGlzKDQqcGkvMyxyRCkKZHJhd0F4aX" "MoemV0YSxyRCkKZHJhd0F4aXMoMipwaS8zK3pldGEsckQpCmRyYXdBeGlzKDQqcGkvMyt6ZXRhLHJ" "EKQoKSWNvbjpsaW5lKHstMjMsIC0zMiwgLTMyLCAzMiwgMzIsIDIzfSwgey0yMywgLTMyLCAtNDUs" "IC00NSwgLTMyLCAtMjN9KQpJY29uOmxpbmUoey0zNCwtMjAuNX0sezI1LDI1fSkKSWNvbjpsaW5lK" "HstMzQsLTI4LjV9LHsxNSwxNX0pCkljb246bGluZSh7LTM0LC0zMi41fSx7NSw1fSkKSWNvbjpsaW" "5lKHstMzQsLTMyLjV9LHstNSwtNX0pCkljb246bGluZSh7LTM0LC0yOC41fSx7LTE1LC0xNX0pCkl" "jb246bGluZSh7LTM0LC0yMC41fSx7LTI1LC0yNX0pCkljb246dGV4dCg1LDEyLCfOticpCgpJY29u" "OmNvbG9yKDEwOSwgNDAsIDE3MCkKSWNvbjpsaW5lKHszMiwzNX0sey0zNSwtMzV9KQoK" MaskDisplayLang "2" MaskIconFrame off MaskIconOpaque off MaskIconRotates on MaskInit "Lmd = Lm(1);\n" "Lmq = Lm(2);\n" "\n" "La1a2 = L12(1);\n" "La1b2 = L12(2);\n" "La1c2 = L12(3);\n" "\n" "\n" "Llm = La1a2*cos(Zeta)+La1b2*cos(Zeta+2*pi/3)+La1c2*cos(Zeta-2*pi/3);\n" "Lldq = La1a2*sin(Zeta)+La1b2*sin(Zeta+2*pi/3)+La1c2*sin(Zeta-2*pi/3);\n" "if (damper == 1)\n" "\tRkd = 0;\n" "\tRkq = 0;\n" "\tLlkd = 0;\n" "\tLlkq = 0;\n" "\tL = [ ...\n" " \t Lmd+Llm+Ll, 0, Lmd+Llm, Lldq; ...\n" " \t0, Lmq+Llm+Ll, -Lldq, Lmq+Llm; ...\n" "\t Lmd+Llm, -Lldq, Lmd+Llm+Ll, 0; ...\n" " \t Lldq, Lmq+Llm, 0, Lmq+Llm+Ll ...\n" " \t];\n" "\tif (det(L)~=0)\n" " \tLinv = L^(-1)\n" "\telse\n" " \terror('Inductance matrix is singular, can not calculate inverse matrix')" "\n" "\tend\n" "else\n" "\tRkd = Rk(1);\n" "\tRkq = Rk(2);\n" "\tLlkd = Llk(1);\n" "\tLlkq = Llk(2);\n" "\tL = [ ...\n" " Lmd+Llm+Ll, 0, Lmd+Llm, Lldq, Lmd, 0; ...\n" " 0, Lmq+Llm+Ll, -Lldq, Lmq+Llm, 0, Lmq; ...\n" " Lmd+Llm, -Lldq, Lmd+Llm+Ll, 0, Lmd, 0; ...\n" " Lldq, Lmq+Llm, 0, Lmq+Llm+Ll, 0, Lmq; ...\n" " Lmd, 0, Lmd, 0, Lmd+Llkd, 0; ...\n" " 0, Lmq, 0, Lmq, 0, Lmq+Llkq ." "..\n" " ]\n" "\tif (det(L)~=0)\n" " \tLinv = L^(-1)\n" "\telse\n" " \terror('Inductance matrix is singular, can not calculate inverse matrix')" "\n" "\tend\n" "end\n" MaskDialogCallback "if Dialog:get('damper') == '1' then\n" "\tDialog:set('Rk','Visible',false)\n" "\tDialog:set('Llk','Visible',false)\n" "else\n" "\tDialog:set('Rk','Visible',true)\n" "\tDialog:set('Llk','Visible',true)\n" "end" Parameter { Variable "Rs" Prompt "Stator resistance Rs" Type FreeText Value "Rs" Show off Tunable off TabName "" } Parameter { Variable "Lm" Prompt "Magn. Inductance [Lmd Lmq]" Type FreeText Value "[Lmd Lmq]" Show off Tunable off TabName "" } Parameter { Variable "Ll" Prompt "Stator leakage inductance Lls" Type FreeText Value "Ll" Show off Tunable off TabName "" } Parameter { Variable "Lambda_pm" Prompt "Flux induced by magnet Phi" Type FreeText Value "flux_magnet" Show off Tunable off TabName "" } Parameter { Variable "damper" Prompt "Include damper winding" Type FixedText PossibleValues {"No", "Yes"} Value "1" Show off Tunable off TabName "" } Parameter { Variable "Rk" Prompt "Damper resistance [Rkd' Rkq']" Type FreeText Value "[Rr Rr]" Show off Tunable off TabName "" } Parameter { Variable "Llk" Prompt "Damper leakage ind. [Llkd' Llkq']" Type FreeText Value "[Llr Llr]" Show off Tunable off TabName "" } Parameter { Variable "L12" Prompt "1-2 mutual ind. [La1a2 La1b2 La1c2]" Type FreeText Value "[0, 0, 0]" Show off Tunable off TabName "" } Parameter { Variable "Rsnub" Prompt "Snubber Resistance" Type FreeText Value "10e3" Show off Tunable off TabName "" } Parameter { Variable "Zeta" Prompt "Displacement angle" Type FreeText Value "pi/6" 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 "0.001" 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 "0" Show off Tunable off TabName "" } Parameter { Variable "thm0" Prompt "Initial rotor position thm0" Type FreeText Value "0" Show off Tunable off TabName "" } Terminal { Type Port Position [-40, 25] Direction left } Terminal { Type Port Position [-40, 15] Direction left } Terminal { Type Port Position [-40, 5] Direction left } Terminal { Type Rotational Position [40, -35] Direction right } Terminal { Type Port Position [-40, -5] Direction left } Terminal { Type Port Position [-40, -15] Direction left } Terminal { Type Port Position [-40, -25] Direction left } Schematic { Location [776, 401; 1256, 762] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Port Name "a1" Show off Position [110, 40] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "b1" Show off Position [110, 70] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "c1" Show off Position [110, 100] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type ConfigurableSubsystem Name "Electrical model" Show on Position [200, 115] Direction up Flipped off Frame [-40, -65; 40, 65] LabelPosition [0, -68] LabelAlign down SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Input Position [20, 65] Direction down } Terminal { Type Input Position [0, 65] Direction down } Terminal { Type Output Position [-20, 69] Direction down } Terminal { Type Port Position [-45, -35] Direction left } Terminal { Type Port Position [-45, -45] Direction left } Terminal { Type Port Position [-45, -55] Direction left } Terminal { Type Port Position [-45, 55] Direction left } Terminal { Type Port Position [-45, 45] Direction left } Terminal { Type Port Position [-45, 35] Direction left } TerminalNames { "th_e", "w_e", "T_e", "c1", "b1", "a1", "c2", "b" "2", "a2" } Location [262, 391; 1184, 948] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Configurations { Name "Rotor reference frame" Schematic { Component { Type CurrentSource Name "i_a1" Show on Position [225, 165] Direction up Flipped on Parameter { Variable "DiscretizationBehavior" Value "2" Show off } Parameter { Variable "StateSpaceInlining" Value "2" Show off } } Component { Type CurrentSource Name "i_c1" Show on Position [225, 215] Direction up Flipped off Parameter { Variable "DiscretizationBehavior" Value "2" Show off } Parameter { Variable "StateSpaceInlining" Value "2" Show off } } Component { Type Voltmeter Name "vab1" Show on Position [315, 165] Direction up Flipped off } Component { Type Voltmeter Name "vbc1" Show on Position [315, 215] Direction up Flipped off } Component { Type SignalDemux Name "Demux1" Show off Position [280, 120] Direction right Flipped off Parameter { Variable "Width" Value "[1 1 1]" Show off } } Component { Type CurrentSource Name "i_a2" Show on Position [225, 335] Direction up Flipped on Parameter { Variable "DiscretizationBehavior" Value "2" Show off } Parameter { Variable "StateSpaceInlining" Value "2" Show off } } Component { Type CurrentSource Name "i_c2" Show on Position [225, 385] Direction up Flipped off Parameter { Variable "DiscretizationBehavior" Value "2" Show off } Parameter { Variable "StateSpaceInlining" Value "2" Show off } } Component { Type Voltmeter Name "vab2" Show on Position [315, 335] Direction up Flipped off } Component { Type Voltmeter Name "vbc2" Show on Position [315, 385] Direction up Flipped off } Component { Type SignalDemux Name "Demux2" Show off Position [280, 430] Direction right Flipped off Parameter { Variable "Width" Value "[1 1 1]" Show off } } Component { Type Reference SrcComponent "Components/Control/Transformations/3ph->RRF" Name "3ph->RRF" Show off Position [505, 185] Direction up Flipped on Frame [-15, -15; 15, 15] LabelPosition [0, -18] LabelAlign down 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 Reference SrcComponent "Components/Control/Transformations/3ph->RRF" Name "3ph->RRF1" Show off Position [510, 365] 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 Reference SrcComponent "Components/Control/Transformations/RRF->3ph" Name "RRF->3ph" Show off Position [505, 120] Direction down Flipped on 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 Offset Name "Offset" Show off Position [585, 390] Direction left Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, -13] LabelAlign down Parameter { Variable "Offset" Value "-Zeta" Show on } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Offset Name "Offset1" Show off Position [570, 150] Direction left Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, -13] LabelAlign down Parameter { Variable "Offset" Value "0" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Reference SrcComponent "Components/Control/Transformations/RRF->3ph" Name "RRF->3ph1" Show off Position [510, 430] Direction down Flipped on 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 Resistor Name "R1" Show off Position [120, 265] Direction up Flipped off Parameter { Variable "R" Value "Rsnub" Show off } } Component { Type Resistor Name "R2" Show off Position [130, 265] Direction up Flipped off Parameter { Variable "R" Value "Rsnub" Show off } } Component { Type Resistor Name "R3" Show off Position [140, 265] Direction up Flipped off Parameter { Variable "R" Value "Rsnub" Show off } } Component { Type Resistor Name "R4" Show off Position [120, 440] Direction up Flipped off Parameter { Variable "R" Value "Rsnub" Show off } } Component { Type Resistor Name "R5" Show off Position [130, 440] Direction up Flipped off Parameter { Variable "R" Value "Rsnub" Show off } } Component { Type Resistor Name "R6" Show off Position [140, 440] Direction up Flipped off Parameter { Variable "R" Value "Rsnub" Show off } } Component { Type SignalSelector Name "Cont\nSelector" Show off Position [685, 115] Direction right Flipped on Parameter { Variable "InputWidth" Value "4" Show off } Parameter { Variable "OutputIndices" Value "[1 2]" Show on } } Component { Type SignalSelector Name "Cont\nSelector1" Show off Position [685, 425] Direction right Flipped on Parameter { Variable "InputWidth" Value "4" Show off } Parameter { Variable "OutputIndices" Value "[3 4]" Show on } } Component { Type Subsystem Name "UvVwWu2uvw" Show off Position [440, 190] Direction up Flipped off Frame [-25, -15; 25, 15] LabelPosition [0, 18] LabelAlign up SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskDisplay "Icon:text('ll->ln')" MaskDisplayLang "2" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Input Position [-25, 0] Direction left } Terminal { Type Output Position [29, 0] Direction right } Schematic { Location [839, 945; 1251, 1179] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Input Name "In1" Show off Position [55, 95] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "Out1" Show off Position [365, 95] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type SignalDemux Name "Demux" Show off Position [115, 95] Direction right Flipped on Parameter { Variable "Width" Value "3" Show off } } Component { Type SignalMux Name "Mux" Show off Position [275, 95] Direction right Flipped off Parameter { Variable "Width" Value "3" Show off } } Component { Type Sum Name "Sum1" Show off Position [195, 50] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "-+|" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Sum Name "Sum2" Show off Position [195, 95] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "-+|" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Sum Name "Sum3" Show off Position [195, 140] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "-+|" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "Gain" Show off Position [315, 95] Direction right Flipped off Parameter { Variable "K" Value "1/3" Show on } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Connection { Type Signal SrcComponent "In1" SrcTerminal 1 DstComponent "Demux" DstTerminal 1 } Connection { Type Signal SrcComponent "Sum1" SrcTerminal 1 Points [235, 50; 235, 85] DstComponent "Mux" DstTerminal 2 } Connection { Type Signal SrcComponent "Sum2" SrcTerminal 1 DstComponent "Mux" DstTerminal 3 } Connection { Type Signal SrcComponent "Sum3" SrcTerminal 1 Points [235, 140; 235, 105] DstComponent "Mux" DstTerminal 4 } Connection { Type Signal SrcComponent "Demux" SrcTerminal 4 Points [125, 105] Branch { Points [145, 105; 145, 140] DstComponent "Sum3" DstTerminal 3 } Branch { Points [125, 25] DstComponent "Sum1" DstTerminal 2 } } Connection { Type Signal SrcComponent "Demux" SrcTerminal 2 Points [145, 85; 145, 70] Branch { Points [145, 50] DstComponent "Sum1" DstTerminal 3 } Branch { DstComponent "Sum2" DstTerminal 2 } } Connection { Type Signal SrcComponent "Demux" SrcTerminal 3 Points [160, 95] Branch { DstComponent "Sum2" DstTerminal 3 } Branch { Points [160, 115] DstComponent "Sum3" DstTerminal 2 } } Connection { Type Signal SrcComponent "Mux" SrcTerminal 1 DstComponent "Gain" DstTerminal 1 } Connection { Type Signal SrcComponent "Gain" SrcTerminal 2 DstComponent "Out1" DstTerminal 1 } } } Component { Type SignalMux Name "Mux3" Show off Position [390, 190] Direction right Flipped off Parameter { Variable "Width" Value "3" Show off } } Component { Type Sum Name "Sum" Show off Position [345, 190] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "--" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Voltmeter Name "Vm1" Show off Position [175, 265] Direction up Flipped off } Component { Type SignalMux Name "Mux4" Show off Position [390, 360] Direction right Flipped off Parameter { Variable "Width" Value "3" Show off } } Component { Type Sum Name "Sum1" Show off Position [345, 360] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "--" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Subsystem Name "UvVwWu2uvw1" Show off Position [440, 360] Direction up Flipped off Frame [-25, -15; 25, 15] LabelPosition [0, 18] LabelAlign up SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskDisplay "Icon:text('ll->ln')" MaskDisplayLang "2" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Input Position [-25, 0] Direction left } Terminal { Type Output Position [29, 0] Direction right } Schematic { Location [839, 945; 1251, 1179] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Input Name "In1" Show off Position [55, 95] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "Out1" Show off Position [365, 95] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type SignalDemux Name "Demux" Show off Position [115, 95] Direction right Flipped on Parameter { Variable "Width" Value "3" Show off } } Component { Type SignalMux Name "Mux" Show off Position [275, 95] Direction right Flipped off Parameter { Variable "Width" Value "3" Show off } } Component { Type Sum Name "Sum1" Show off Position [195, 50] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "-+|" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Sum Name "Sum2" Show off Position [195, 95] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "-+|" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Sum Name "Sum3" Show off Position [195, 140] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "-+|" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "Gain" Show off Position [315, 95] Direction right Flipped off Parameter { Variable "K" Value "1/3" Show on } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Connection { Type Signal SrcComponent "In1" SrcTerminal 1 DstComponent "Demux" DstTerminal 1 } Connection { Type Signal SrcComponent "Sum1" SrcTerminal 1 Points [235, 50; 235, 85] DstComponent "Mux" DstTerminal 2 } Connection { Type Signal SrcComponent "Sum2" SrcTerminal 1 DstComponent "Mux" DstTerminal 3 } Connection { Type Signal SrcComponent "Sum3" SrcTerminal 1 Points [235, 140; 235, 105] DstComponent "Mux" DstTerminal 4 } Connection { Type Signal SrcComponent "Demux" SrcTerminal 4 Points [125, 105] Branch { Points [145, 105; 145, 140] DstComponent "Sum3" DstTerminal 3 } Branch { Points [125, 25] DstComponent "Sum1" DstTerminal 2 } } Connection { Type Signal SrcComponent "Demux" SrcTerminal 2 Points [145, 85; 145, 70] Branch { Points [145, 50] DstComponent "Sum1" DstTerminal 3 } Branch { DstComponent "Sum2" DstTerminal 2 } } Connection { Type Signal SrcComponent "Demux" SrcTerminal 3 Points [160, 95] Branch { DstComponent "Sum2" DstTerminal 3 } Branch { Points [160, 115] DstComponent "Sum3" DstTerminal 2 } } Connection { Type Signal SrcComponent "Mux" SrcTerminal 1 DstComponent "Gain" DstTerminal 1 } Connection { Type Signal SrcComponent "Gain" SrcTerminal 2 DstComponent "Out1" DstTerminal 1 } } } Component { Type ConfigurableSubsystem Name "dq12" Show on Position [835, 270] Direction up Flipped off Frame [-35, -30; 35, 30] LabelPosition [0, 33] LabelAlign up SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskDisplayLang "2" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Parameter { Variable "L" Prompt "L" Type FreeText Value "L" Show off Tunable off TabName "" } Parameter { Variable "Linv" Prompt "Inverse inductance matrix" Type FreeText Value "Linv" Show off Tunable off TabName "" } Parameter { Variable "Lambda_pm" Prompt "Flux induced by magnet Phi" Type FreeText Value "Lambda_pm" Show off Tunable off TabName "" } Parameter { Variable "Rs" Prompt "Stator resistance" Type FreeText Value "Rs" Show off Tunable off TabName "" } Parameter { Variable "Rr" Prompt "Rotor resistance [Rrd' Rrq']" Type FreeText Value "Rk" Show off Tunable off TabName "" } Parameter { Variable "p" Prompt "Pole pairs" Type FreeText Value "p" Show off Tunable off TabName "" } Parameter { Variable "Lmd" Prompt "Lmd" Type FreeText Value "Lmd" Show off Tunable off TabName "" } Parameter { Variable "Lmq" Prompt "Lmq" Type FreeText Value "Lmq" Show off Tunable off TabName "" } Terminal { Type Output Position [39, -15] Direction right } Terminal { Type Input Position [-35, -15] Direction left } Terminal { Type Input Position [-35, 10] Direction left } Terminal { Type Output Position [39, 20] Direction right } Terminal { Type Output Position [39, 0] Direction right } TerminalNames { "i", "v", "w", "Lambda", "T_e" } Location [20, 116; 942, 754] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Configurations { Name "No Damper" Schematic { Component { Type Output Name "i" Show on Position [285, 50] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "v" Show on Position [110, 50] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "w" Show on Position [110, 85] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "Lambda" Show on Position [285, 85] Direction right Flipped off Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type CScript Name "dq12" Show on Position [205, 55] Direction up Flipped off Parameter { Variable "DialogGeometry" Value "[160 45 1274 797]" Show off } Parameter { Variable "NumInputs" Value "[4, 1]" Show off } Parameter { Variable "NumOutputs" Value "[4 4]" Show off } Parameter { Variable "NumContStates" Value "4" Show off } Parameter { Variable "NumDiscStates" Value "0" Show off } Parameter { Variable "NumZCSignals" Value "0" Show off } Parameter { Variable "DirectFeedthrough" Value "0" Show off } Parameter { Variable "Ts" Value "0" Show off } Parameter { Variable "Parameters" Value "reshape(L.',1,[]), Lambda_pm, Rs" Show off } Parameter { Variable "LangStandard" Value "2" Show off } Parameter { Variable "GnuExtensions" Value "1" Show off } Parameter { Variable "RuntimeCheck" Value "2" Show off } Parameter { Variable "Declarations" Value "#include \n" "#include \n" "#include \n" "\n" "#define Vsd1 InputSignal(0,0) /* line-to-line voltage of first three " "phase winding */\n" "#define Vsq1 InputSignal(0,1) /* line-to-line voltage of first three " "phase winding */\n" "#define Vsd2 InputSignal(0,2) /* line-to-line voltage of second three" " phase winding */\n" "#define Vsq2 InputSignal(0,3) /* line-to-line voltage of second three" " phase winding */\n" "#define w InputSignal(1,0) /* electrical angular speed */\n" "\n" "#define i0 ContState(0)\n" "#define i1 ContState(1)\n" "#define i2 ContState(2)\n" "#define i3 ContState(3)\n" "\n" "#define di0 ContDeriv(0)\n" "#define di1 ContDeriv(1)\n" "#define di2 ContDeriv(2)\n" "#define di3 ContDeriv(3)\n" "\n" "double det;\n" "double term0_1, term0_2, term0_3, term0_4, term0_5, term0_6, term0_7, term0_8" ", term0_9, term0_10, term0_11, term0_12, term0_13;\n" "double term1_1, term1_2, term1_3, term1_4, term1_5, term1_6, term1_7, term1_8" ", term1_9, term1_10, term1_11, term1_12, term1_13;\n" "double term2_1, term2_2, term2_3, term2_4, term2_5, term2_6, term2_7, term2_8" ", term2_9, term2_10, term2_11, term2_12, term2_13;\n" "double term3_1, term3_2, term3_3, term3_4, term3_5, term3_6, term3_7, term3_8" ", term3_9, term3_10, term3_11, term3_12, term3_13;\n" "\n" "double Rs, Rrd, Rrq, phi;\n" "\n" "double *L;\n" "double *Lambda;\n" "double *LambdaPm;\n" "\n" "double L1;\n" "double L2;\n" "double L3;\n" "double L4;\n" "double L5;\n" "double L6;\n" "double L7;\n" "double L8;\n" "double L9;\n" "double L10;\n" "double L11;\n" "double L12;\n" "double L13;\n" "double L14;\n" "double L15;\n" "double L16;" Show off } Parameter { Variable "StartFcn" Value "int ParIdx = 0;\n" "int i;\n" "\n" "if (NumParameters != 3)\n" "{\n" " SetErrorMessage(\"Number of parameters does not match.\");\n" " return;\n" "}\n" "\n" "L = (double*) malloc(4*4*sizeof(double));\n" "for(i=0; i<4*4; i++)\n" "{\n" "\tL[i] = ParamRealData(ParIdx, i);\n" "}\n" "ParIdx++;\n" "\n" "phi = ParamRealData(ParIdx++, 0);\n" "LambdaPm = (double*) malloc(4*1*sizeof(double));\n" "LambdaPm[0] = phi;\n" "LambdaPm[1] = .0;\n" "LambdaPm[2] = phi;\n" "LambdaPm[3] = .0;\n" "\n" "Rs = ParamRealData(ParIdx++, 0);\n" "\n" "L1 = L[0];\n" "L2 = L[1];\n" "L3 = L[2];\n" "L4 = L[3];\n" "L5 = L[4];\n" "L6 = L[5];\n" "L7 = L[6];\n" "L8 = L[7];\n" "L9 = L[8];\n" "L10 = L[9];\n" "L11 = L[10];\n" "L12 = L[11];\n" "L13 = L[12];\n" "L14 = L[13];\n" "L15 = L[14];\n" "L16 = L[15];\n" "\n" "det = (L1*L11*L16*L6\n" "+ -L11*L13*L4*L6 +\n" "-L1*L10*L16*L7 +\n" "L10*L13*L4*L7 +\n" "-L1*L11*L14*L8 +\n" "-L10*L13*L3*L8 +\n" "-L16*L3*L6*L9 +\n" "-L14*L4*L7*L9 +\n" "L14*L3*L8*L9);\n" "\n" "term0_1 = ( L1*L10*L16*L3 \n" "+ L1*L11*L14*L4 \n" "+ L13*L16*L3*L6 \n" "+ L13*L14*L4*L7 \n" "+ -L13*L14*L3*L8 \n" "+ -L11*L4*L6*L9 \n" "+ L10*L4*L7*L9 \n" "+ -L10*L3*L8*L9 ) / det;\n" "\n" "term0_2 = ( L10*L16*L3*L3 \n" "+ L11*L14*L3*L4 \n" "+ -L11*L11*L4*L6 \n" "+ L10*L11*L4*L7 \n" "+ -L11*L16*L6*L7 \n" "+ L10*L16*L7*L7 \n" "+ -L10*L11*L3*L8 \n" "+ L11*L14*L7*L8 ) / det;\n" "\n" "term0_3 = ( L14*L16*L3*L6 \n" "+ -L10*L11*L4*L6 \n" "+ -L11*L16*L6*L6 \n" "+ L10*L10*L4*L7 \n" "+ L14*L14*L4*L7 \n" "+ L10*L16*L6*L7 \n" "+ -L10*L10*L3*L8 \n" "+ -L14*L14*L3*L8 \n" "+ L11*L14*L6*L8 ) / det;\n" "\n" "term0_4 = ( L10*L16*L3*L4 \n" "+ L11*L14*L4*L4 \n" "+ L16*L16*L3*L6 \n" "+ L14*L16*L4*L7 \n" "+ -L14*L16*L3*L8 \n" "+ -L11*L16*L6*L8 \n" "+ L10*L16*L7*L8 \n" "+ L11*L14*L8*L8 ) / det;\n" "\n" "term0_5 = ( L11*L16*L6*Rs \n" "+ -L10*L16*L7*Rs \n" "+ -L11*L14*L8*Rs ) / det;\n" "\n" "term0_6 = ( -L16*L3*L6*Rs \n" "+ -L14*L4*L7*Rs \n" "+ L14*L3*L8*Rs ) / det;\n" "\n" "term0_7 = ( L10*L16*L3*Rs \n" "+ L11*L14*L4*Rs ) / det;\n" "\n" "term0_8 = ( -L11*L4*L6*Rs \n" "+ L10*L4*L7*Rs \n" "+ -L10*L3*L8*Rs ) / det;\n" "\n" "term0_9 = ( L10*L16*L3*phi \n" "+ L11*L14*L4*phi \n" "+ -L11*L4*L6*phi \n" "+ L10*L4*L7*phi \n" "+ -L10*L3*L8*phi ) / det;\n" "\n" "term0_10 = ( -L11*L16*L6 \n" "+ L10*L16*L7 \n" "+ L11*L14*L8 ) / det;\n" "\n" "term0_11 = ( L16*L3*L6 \n" "+ L14*L4*L7 \n" "+ -L14*L3*L8 ) / det;\n" "\n" "term0_12 = ( -L10*L16*L3 \n" "+ -L11*L14*L4 ) / det;\n" "\n" "term0_13 = ( L11*L4*L6 \n" "+ -L10*L4*L7 \n" "+ L10*L3*L8 ) / det;\n" "\n" "\n" "//-----------------\n" "\n" "term1_1 = ( L1*L1*L11*L16 \n" "+ -L1*L11*L13*L4 \n" "+ L1*L13*L16*L7 \n" "+ -L13*L13*L4*L7 \n" "+ L13*L13*L3*L8 \n" "+ -L1*L16*L3*L9 \n" "+ -L1*L11*L8*L9 \n" "+ -L4*L7*L9*L9 \n" "+ L3*L8*L9*L9) / det;\n" "term1_2 = ( L1*L11*L16*L3 \n" "+ -L11*L13*L3*L4 \n" "+ -L1*L11*L11*L8 \n" "+ -L11*L13*L7*L8 \n" "+ -L16*L3*L3*L9 \n" "+ -L11*L4*L7*L9 \n" "+ -L16*L7*L7*L9 \n" "+ L11*L3*L8*L9)/ det;\n" "term1_3 = ( L1*L14*L16*L7 \n" "+ -L13*L14*L4*L7 \n" "+ -L1*L10*L11*L8 \n" "+ L13*L14*L3*L8 \n" "+ -L11*L13*L6*L8 \n" "+ -L10*L4*L7*L9 \n" "+ -L16*L6*L7*L9 \n" "+ L10*L3*L8*L9 ) / det;\n" "term1_4 = ( L1*L11*L16*L4 \n" "+ -L11*L13*L4*L4 \n" "+ L1*L16*L16*L7 \n" "+ -L13*L16*L4*L7 \n" "+ L13*L16*L3*L8 \n" "+ -L11*L13*L8*L8 \n" "+ -L16*L3*L4*L9 \n" "+ -L16*L7*L8*L9 )/ det;\n" "term1_5 = ( L11*L13*L8*Rs \n" "+ L16*L7*L9*Rs )/ det;\n" "term1_6 = ( -L1*L16*L7*Rs \n" "+ L13*L4*L7*Rs \n" "+ -L13*L3*L8*Rs )/ det;\n" "term1_7 = ( L1*L11*L16*Rs \n" "+ -L11*L13*L4*Rs \n" "+ -L16*L3*L9*Rs )/ det;\n" "term1_8 = ( -L1*L11*L8*Rs \n" "+ -L4*L7*L9*Rs \n" "+ L3*L8*L9*Rs )/ det;\n" "term1_9 = ( L1*L11*L16*phi \n" "+ -L11*L13*L4*phi \n" "+ -L1*L11*L8*phi \n" "+ -L16*L3*L9*phi \n" "+ -L4*L7*L9*phi \n" "+ L3*L8*L9*phi )/ det;\n" "term1_10 = ( -L11*L13*L8 \n" "+ -L16*L7*L9 )/ det;\n" "term1_11 = ( L1*L16*L7 \n" "+ -L13*L4*L7 \n" "+ L13*L3*L8 )/ det;\n" "term1_12 = ( -L1*L11*L16 \n" "+ L11*L13*L4 \n" "+ L16*L3*L9 )/ det;\n" "term1_13 = ( L1*L11*L8 \n" "+ L4*L7*L9 \n" "+ -L3*L8*L9 )/ det;\n" "\n" "//-----------------\n" "\n" "term2_1 = ( L1*L1*L10*L16 \n" "+ -L1*L10*L13*L4 \n" "+ L1*L13*L16*L6 \n" "+ -L13*L13*L4*L6 \n" "+ -L1*L13*L14*L8 \n" "+ L1*L14*L4*L9 \n" "+ -L1*L10*L8*L9 \n" "+ -L4*L6*L9*L9 )/ det;\n" "term2_2 = ( L1*L10*L16*L3 \n" "+ -L10*L13*L3*L4 \n" "+ -L1*L10*L11*L8 \n" "+ -L10*L13*L7*L8 \n" "+ L14*L3*L4*L9 \n" "+ -L11*L4*L6*L9 \n" "+ -L16*L6*L7*L9 \n" "+ L14*L7*L8*L9 )/det;\n" "term2_3 = ( L1*L14*L16*L6 \n" "+ -L13*L14*L4*L6 \n" "+ -L1*L10*L10*L8 \n" "+ -L1*L14*L14*L8 \n" "+ -L10*L13*L6*L8 \n" "+ -L10*L4*L6*L9 \n" "+ -L16*L6*L6*L9 \n" "+ L14*L6*L8*L9 ) / det;\n" "term2_4 = ( L1*L10*L16*L4 \n" "+ -L10*L13*L4*L4 \n" "+ L1*L16*L16*L6 \n" "+ -L13*L16*L4*L6 \n" "+ -L1*L14*L16*L8 \n" "+ -L10*L13*L8*L8 \n" "+ L14*L4*L4*L9 \n" "+ -L16*L6*L8*L9 \n" "+ L14*L8*L8*L9 )/ det;\n" "term2_5 = ( L10*L13*L8*Rs \n" "+ L16*L6*L9*Rs \n" "+ -L14*L8*L9*Rs )/ det;\n" "term2_6 = ( -L1*L16*L6*Rs \n" "+ L13*L4*L6*Rs \n" "+ L1*L14*L8*Rs ) / det;\n" "term2_7 = ( L1*L10*L16*Rs \n" "+ -L10*L13*L4*Rs \n" "+ L14*L4*L9*Rs )/ det;\n" "term2_8 = ( -L1*L10*L8*Rs \n" "+ -L4*L6*L9*Rs )/ det;\n" "term2_9 = ( L1*L10*L16*phi \n" "+ -L10*L13*L4*phi \n" "+ -L1*L10*L8*phi \n" "+ L14*L4*L9*phi \n" "+ -L4*L6*L9*phi )/ det;\n" "term2_10 = ( -L10*L13*L8 \n" "+ -L16*L6*L9 \n" "+ L14*L8*L9 )/ det;\n" "term2_11 = ( L1*L16*L6 \n" "+ -L13*L4*L6 \n" "+ -L1*L14*L8 )/ det;\n" "term2_12 = ( -L1*L10*L16 \n" "+ L10*L13*L4 \n" "+ -L14*L4*L9 )/ det;\n" "term2_13 = ( L1*L10*L8 \n" "+ L4*L6*L9 )/ det;\n" "\n" "//-----------------\n" "\n" "term3_1 = (L1*L1*L11*L14 \n" "+ L1*L10*L13*L3 \n" "+ L13*L13*L3*L6 \n" "+ L1*L13*L14*L7 \n" "+ -L1*L14*L3*L9 \n" "+ -L1*L11*L6*L9 \n" "+ L1*L10*L7*L9 \n" "+ L3*L6*L9*L9 )/ det;\n" "term3_2 = ( L1*L11*L14*L3 \n" "+ L10*L13*L3*L3 \n" "+ -L1*L11*L11*L6 \n" "+ L1*L10*L11*L7 \n" "+ -L11*L13*L6*L7 \n" "+ L10*L13*L7*L7 \n" "+ -L14*L3*L3*L9 \n" "+ L11*L3*L6*L9 \n" "+ -L14*L7*L7*L9 )/ det;\n" "term3_3 = ( -L1*L10*L11*L6 \n" "+ L13*L14*L3*L6 \n" "+ -L11*L13*L6*L6 \n" "+ L1*L10*L10*L7 \n" "+ L1*L14*L14*L7 \n" "+ L10*L13*L6*L7 \n" "+ L10*L3*L6*L9 \n" "+ -L14*L6*L7*L9 )/ det;\n" "term3_4 = ( L1*L11*L14*L4 \n" "+ L10*L13*L3*L4 \n" "+ L13*L16*L3*L6 \n" "+ L1*L14*L16*L7 \n" "+ -L11*L13*L6*L8 \n" "+ L10*L13*L7*L8 \n" "+ -L14*L3*L4*L9 \n" "+ -L14*L7*L8*L9 )/ det;\n" "term3_5 = ( L11*L13*L6*Rs\n" "+ -L10*L13*L7*Rs \n" "+ L14*L7*L9*Rs )/ det;\n" "term3_6 = ( -L13*L3*L6*Rs \n" "+ -L1*L14*L7*Rs )/ det;\n" "term3_7 = ( L1*L11*L14*Rs \n" "+ L10*L13*L3*Rs \n" "+ -L14*L3*L9*Rs )/ det;\n" "term3_8 = ( -L1*L11*L6*Rs \n" "+ L1*L10*L7*Rs \n" "+ L3*L6*L9*Rs )/ det;\n" "term3_9 = ( L1*L11*L14*phi \n" "+ L10*L13*L3*phi \n" "+ -L1*L11*L6*phi \n" "+ L1*L10*L7*phi \n" "+ -L14*L3*L9*phi \n" "+ L3*L6*L9*phi )/ det;\n" "term3_10 = ( -L11*L13*L6 \n" "+ L10*L13*L7 \n" "+ -L14*L7*L9 )/ det;\n" "term3_11 = ( L13*L3*L6 \n" "+ L1*L14*L7 )/ det;\n" "term3_12 = ( -L1*L11*L14 \n" "+ -L10*L13*L3 \n" "+ L14*L3*L9 )/ det;\n" "term3_13 = ( L1*L11*L6 \n" "+ -L1*L10*L7 \n" "+ -L3*L6*L9)/ det;" Show off } Parameter { Variable "OutputFcn" Value "OutputSignal(0,0) = i0;\n" "OutputSignal(0,1) = i1;\n" "OutputSignal(0,2) = i2;\n" "OutputSignal(0,3) = i3;\n" "\n" "OutputSignal(1,0) = i0;\n" "OutputSignal(1,1) = i1;\n" "OutputSignal(1,2) = i2;\n" "OutputSignal(1,3) = i3;" Show off } Parameter { Variable "UpdateFcn" Value "" Show off } Parameter { Variable "DerivativeFcn" Value "di0 = \n" "+ -( \n" "+ term0_1 * i0*w \n" "+ term0_2 * i2*w \n" "+ term0_3 * i1*w \n" "+ term0_4 * i3*w \n" "+ term0_5 * i0 \n" "+ term0_6 * i2\n" "+ term0_7 * i1\n" "+ term0_8 * i3\n" "+ term0_9 * w\n" "+ term0_10 * Vsd1\n" "+ term0_11 * Vsd2\n" "+ term0_12 * Vsq1\n" "+ term0_13 * Vsq2\n" ");\n" "di1 = \n" "+ -( \n" "+ term1_1 * i0*w\n" "+ term1_2 * i2*w \n" "+ term1_3 * i1*w\n" "+ term1_4 * i3*w \n" "+ term1_5 * i0\n" "+ term1_6 * i2\n" "+ term1_7 * i1\n" "+ term1_8 * i3\n" "+ term1_9 * w\n" "+ term1_10 * Vsd1\n" "+ term1_11 * Vsd2\n" "+ term1_12 * Vsq1\n" "+ term1_13 * Vsq2\n" ");\n" "di2 = \n" " ( \n" "+ term2_1 * i0*w\n" "+ term2_2 * i2*w \n" "+ term2_3 * i1*w\n" "+ term2_4 * i3*w \n" "+ term2_5 * i0\n" "+ term2_6 * i2\n" "+ term2_7 * i1\n" "+ term2_8 * i3\n" "+ term2_9 * w\n" "+ term2_10 * Vsd1\n" "+ term2_11 * Vsd2\n" "+ term2_12 * Vsq1\n" "+ term2_13 * Vsq2\n" ");\n" "di3 = \n" " (\n" "+ term3_1 * i0*w\n" "+ term3_2 * i2*w \n" "+ term3_3 * i1*w\n" "+ term3_4 * i3*w \n" "+ term3_5 * i0\n" "+ term3_6 * i2\n" "+ term3_7 * i1\n" "+ term3_8 * i3\n" "+ term3_9 * w\n" "+ term3_10 * Vsd1\n" "+ term3_11 * Vsd2\n" "+ term3_12 * Vsq1\n" "+ term3_13 * Vsq2\n" ");" Show off } Parameter { Variable "TerminateFcn" Value "if(L != 0){\n" "\tfree(L);\n" "}\n" "\n" "\n" "if(Lambda != 0){\n" "\tfree(Lambda);\n" "}\n" "\n" "if(LambdaPm != 0){\n" "\tfree(LambdaPm);\n" "}\n" "\n" Show off } Parameter { Variable "StoreCustomStateFcn" Value "" Show off } Parameter { Variable "RestoreCustomStateFcn" Value "" Show off } } Component { Type Output Name "T_e" Show on Position [765, 225] Direction left Flipped on Parameter { Variable "Index" Value "5" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Gain Name "Gain" Show off Position [650, 225] Direction right Flipped off Parameter { Variable "K" Value "3/2*p" Show on } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type SignalSelector Name "id1, id2" Show on Position [305, 150] Direction right Flipped off Parameter { Variable "InputWidth" Value "4" Show off } Parameter { Variable "OutputIndices" Value "[1 3]" Show on } } Component { Type Sum Name "Sum2" Show off Position [370, 150] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "+" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type SignalSelector Name "iq1, iq2" Show on Position [305, 220] Direction right Flipped off Parameter { Variable "InputWidth" Value "4" Show off } Parameter { Variable "OutputIndices" Value "[2 4]" Show on } } Component { Type Sum Name "Sum3" Show off Position [370, 220] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "+" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Product Name "Product1" Show off Position [450, 225] Direction up Flipped off Parameter { Variable "IconShape" Value "1" Show off } Parameter { Variable "Inputs" Value "2" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "Gain2" Show off Position [505, 225] Direction right Flipped off Parameter { Variable "K" Value "Lmd" Show on } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Constant Name "Constant" Show off Position [305, 285] Direction right Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Value" Value "Lambda_pm/Lmd" Show on } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Sum Name "Sum7" Show off Position [600, 225] Direction up Flipped on Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "|++" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Product Name "Product2" Show off Position [450, 155] Direction up Flipped off Parameter { Variable "IconShape" Value "1" Show off } Parameter { Variable "Inputs" Value "2" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "Gain3" Show off Position [505, 155] Direction right Flipped off Parameter { Variable "K" Value "Lmd-Lmq" Show on } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Connection { Type Signal SrcComponent "w" SrcTerminal 1 Points [155, 85; 155, 60] DstComponent "dq12" DstTerminal 2 } Connection { Type Signal SrcComponent "v" SrcTerminal 1 DstComponent "dq12" DstTerminal 1 } Connection { Type Signal SrcComponent "dq12" SrcTerminal 4 Points [250, 60; 250, 85] DstComponent "Lambda" DstTerminal 1 } Connection { Type Signal SrcComponent "Product1" SrcTerminal 1 DstComponent "Gain2" DstTerminal 1 } Connection { Type Signal SrcComponent "id1, id2" SrcTerminal 2 DstComponent "Sum2" DstTerminal 2 } Connection { Type Signal SrcComponent "iq1, iq2" SrcTerminal 2 DstComponent "Sum3" DstTerminal 2 } Connection { Type Signal SrcComponent "Sum7" SrcTerminal 1 DstComponent "Gain" DstTerminal 1 } Connection { Type Signal SrcComponent "Product2" SrcTerminal 1 DstComponent "Gain3" DstTerminal 1 } Connection { Type Signal SrcComponent "Gain3" SrcTerminal 2 Points [600, 155] DstComponent "Sum7" DstTerminal 3 } Connection { Type Signal SrcComponent "Gain2" SrcTerminal 2 DstComponent "Sum7" DstTerminal 2 } Connection { Type Signal SrcComponent "Sum2" SrcTerminal 1 DstComponent "Product2" DstTerminal 2 } Connection { Type Signal SrcComponent "Sum3" SrcTerminal 1 Points [415, 220] Branch { DstComponent "Product1" DstTerminal 2 } Branch { Points [415, 160] DstComponent "Product2" DstTerminal 3 } } Connection { Type Signal SrcComponent "Constant" SrcTerminal 1 Points [415, 285; 415, 230] DstComponent "Product1" DstTerminal 3 } Connection { Type Signal SrcComponent "Gain" SrcTerminal 2 DstComponent "T_e" DstTerminal 1 } Connection { Type Signal SrcComponent "dq12" SrcTerminal 3 Points [240, 50] Branch { DstComponent "i" DstTerminal 1 } Branch { Points [240, 150] Branch { DstComponent "id1, id2" DstTerminal 1 } Branch { Points [240, 220] DstComponent "iq1, iq2" DstTerminal 1 } } } } Name "With Damper" Schematic { Component { Type CScript Name "dq12" Show on Position [205, 55] Direction up Flipped off Parameter { Variable "DialogGeometry" Value "[0 45 1600 797]" Show off } Parameter { Variable "NumInputs" Value "[6, 1]" Show off } Parameter { Variable "NumOutputs" Value "[6, 6]" Show off } Parameter { Variable "NumContStates" Value "6" Show off } Parameter { Variable "NumDiscStates" Value "0" Show off } Parameter { Variable "NumZCSignals" Value "0" Show off } Parameter { Variable "DirectFeedthrough" Value "0" Show off } Parameter { Variable "Ts" Value "0" Show off } Parameter { Variable "Parameters" Value "reshape(L.',1,[]), reshape(Linv',1," "[]), Lambda_pm, Rs, Rr" Show off } Parameter { Variable "LangStandard" Value "2" Show off } Parameter { Variable "GnuExtensions" Value "1" Show off } Parameter { Variable "RuntimeCheck" Value "2" Show off } Parameter { Variable "Declarations" Value "#include \n" "#include \n" "#include \n" "\n" "#define Vsd1 InputSignal(0,0) /* line-to-line voltage of first three " "phase winding */\n" "#define Vsq1 InputSignal(0,1) /* line-to-line voltage of first three " "phase winding */\n" "#define Vsd2 InputSignal(0,2) /* line-to-line voltage of second three" " phase winding */\n" "#define Vsq2 InputSignal(0,3) /* line-to-line voltage of second three" " phase winding */\n" "#define w InputSignal(1,0) /* electrical angular speed */\n" "\n" "#define i0 OutputSignal(0,0)\n" "#define i1 OutputSignal(0,1)\n" "#define i2 OutputSignal(0,2)\n" "#define i3 OutputSignal(0,3)\n" "#define i4 OutputSignal(0,4)\n" "#define i5 OutputSignal(0,5)\n" "\n" "#define isd1 ContState(0)\n" "#define isq1 ContState(1)\n" "#define isd2 ContState(2)\n" "#define isq2 ContState(3)\n" "#define ird ContState(4)\n" "#define irq ContState(5)\n" "\n" "#define disd1 ContDeriv(0)\n" "#define disq1 ContDeriv(1)\n" "#define disd2 ContDeriv(2)\n" "#define disq2 ContDeriv(3)\n" "#define dird ContDeriv(4)\n" "#define dirq ContDeriv(5)\n" "\n" "\n" "double t0_0,t0_1,t0_2,t0_3,t0_4,t0_5,t0_6,t0_7,t0_8,t0_9,t0_10,t0_11,t0_12,t0" "_13,t0_14,t0_15,t0_16;\n" "double t1_0,t1_1,t1_2,t1_3,t1_4,t1_5,t1_6,t1_7,t1_8,t1_9,t1_10,t1_11,t1_12,t1" "_13,t1_14,t1_15,t1_16;\n" "double t2_0,t2_1,t2_2,t2_3,t2_4,t2_5,t2_6,t2_7,t2_8,t2_9,t2_10,t2_11,t2_12,t2" "_13,t2_14,t2_15,t2_16;\n" "double t3_0,t3_1,t3_2,t3_3,t3_4,t3_5,t3_6,t3_7,t3_8,t3_9,t3_10,t3_11,t3_12,t3" "_13,t3_14,t3_15,t3_16;\n" "double t4_0,t4_1,t4_2,t4_3,t4_4,t4_5,t4_6,t4_7,t4_8,t4_9,t4_10,t4_11,t4_12,t4" "_13,t4_14,t4_15,t4_16;\n" "double t5_0,t5_1,t5_2,t5_3,t5_4,t5_5,t5_6,t5_7,t5_8,t5_9,t5_10,t5_11,t5_12,t5" "_13,t5_14,t5_15,t5_16;\n" "\n" "double Rs, Rrd, Rrq, phi;\n" "\n" "double *L;\n" "double *Linv;\n" "double *Lambda;\n" "double *LambdaPm;\n" "\n" "double phi;\n" "\n" "double Rs, Rrd, Rrq;\n" "\n" "double L11,L12,L13,L14,L15,L16,L21,L22,L23,L24,L25,L26,L31,L32,L33,L34,L35,L3" "6,L41,L42,L43,L44,L45,L46,L51,L52,L53,L54,L55,L56,L61,L62,L63,L64,L65,L66;\n" "double Linv11,Linv12,Linv13,Linv14,Linv15,Linv16,Linv21,Linv22,Linv23,Linv24," "Linv25,Linv26,Linv31,Linv32,Linv33,Linv34,Linv35,Linv36,Linv41,Linv42,Linv43," "Linv44,Linv45,Linv46,Linv51,Linv52,Linv53,Linv54,Linv55,Linv56,Linv61,Linv62," "Linv63,Linv64,Linv65,Linv66;" Show off } Parameter { Variable "StartFcn" Value "int ParIdx = 0;\n" "int i;\n" "\n" "if (NumParameters != 5)\n" "{\n" " SetErrorMessage(\"Number of parameters does not match.\");\n" " return;\n" "}\n" "\n" "L = (double*) malloc(6*6*sizeof(double));\n" "for(i=0; i<6*6; i++)\n" "{\n" "\tL[i] = ParamRealData(ParIdx, i);\n" "}\n" "\n" "ParIdx++;\n" "\n" "Linv = (double*) malloc(6*6*sizeof(double));\n" "for(i=0; i<6*6; i++)\n" "{\n" "\tLinv[i] = ParamRealData(ParIdx, i);\n" "}\n" "\n" "ParIdx++;\n" "\n" "phi = ParamRealData(ParIdx++, 0);\n" "\n" "LambdaPm = (double*) malloc(6*1*sizeof(double));\n" "LambdaPm[0] = phi;\n" "LambdaPm[1] = .0;\n" "LambdaPm[2] = phi;\n" "LambdaPm[3] = .0;\n" "LambdaPm[4] = phi;\n" "LambdaPm[5] = .0;\n" "\n" "Rs = ParamRealData(ParIdx++, 0);\n" "Rrd = ParamRealData(ParIdx, 0);\n" "Rrq = ParamRealData(ParIdx++, 1);\n" "\n" "Linv11 = Linv[0];\n" "Linv12 = Linv[1];\n" "Linv13 = Linv[2];\n" "Linv14 = Linv[3];\n" "Linv15 = Linv[4];\n" "Linv16 = Linv[5];\n" "Linv21 = Linv[6];\n" "Linv22 = Linv[7];\n" "Linv23 = Linv[8];\n" "Linv24 = Linv[9];\n" "Linv25 = Linv[10];\n" "Linv26 = Linv[11];\n" "Linv31 = Linv[12];\n" "Linv32 = Linv[13];\n" "Linv33 = Linv[14];\n" "Linv34 = Linv[15];\n" "Linv35 = Linv[16];\n" "Linv36 = Linv[17];\n" "Linv41 = Linv[18];\n" "Linv42 = Linv[19];\n" "Linv43 = Linv[20];\n" "Linv44 = Linv[21];\n" "Linv45 = Linv[22];\n" "Linv46 = Linv[23];\n" "Linv51 = Linv[24];\n" "Linv52 = Linv[25];\n" "Linv53 = Linv[26];\n" "Linv54 = Linv[27];\n" "Linv55 = Linv[28];\n" "Linv56 = Linv[29];\n" "Linv61 = Linv[30];\n" "Linv62 = Linv[31];\n" "Linv63 = Linv[32];\n" "Linv64 = Linv[33];\n" "Linv65 = Linv[34];\n" "Linv66 = Linv[35];\n" "\n" "L11 = L[0];\n" "L12 = L[1];\n" "L13 = L[2];\n" "L14 = L[3];\n" "L15 = L[4];\n" "L16 = L[5];\n" "L21 = L[6];\n" "L22 = L[7];\n" "L23 = L[8];\n" "L24 = L[9];\n" "L25 = L[10];\n" "L26 = L[11];\n" "L31 = L[12];\n" "L32 = L[13];\n" "L33 = L[14];\n" "L34 = L[15];\n" "L35 = L[16];\n" "L36 = L[17];\n" "L41 = L[18];\n" "L42 = L[19];\n" "L43 = L[20];\n" "L44 = L[21];\n" "L45 = L[22];\n" "L46 = L[23];\n" "L51 = L[24];\n" "L52 = L[25];\n" "L53 = L[26];\n" "L54 = L[27];\n" "L55 = L[28];\n" "L56 = L[29];\n" "L61 = L[30];\n" "L62 = L[31];\n" "L63 = L[32];\n" "L64 = L[33];\n" "L65 = L[34];\n" "L66 = L[35];\n" "\n" "\n" "t0_0 = (-L15*Linv12 + -L35*Linv14);\n" "t0_1 = (L26*Linv11 + L46*Linv13);\n" "t0_2 = (-L11*Linv12+ L41*Linv13+ -L31*Linv14);\n" "t0_3 = (L23*Linv11+ -L13*Linv12+ -L33*Linv14);\n" "t0_4 = (L22*Linv11+ L42*Linv13+ -L32*Linv14);\n" "t0_5 = (L24*Linv11+ -L14*Linv12+ L44*Linv13);\n" "t0_6 = (-Linv15*Rrd);\n" "t0_7 = (-Linv16*Rrq);\n" "t0_8 = (-Linv11*Rs);\n" "t0_9 = (-Linv13*Rs);\n" "t0_10 =(-Linv12*Rs);\n" "t0_11 =(-Linv14*Rs);\n" "t0_12 =(-Linv12*phi+ -Linv14*phi);\n" "t0_13 =(Linv11);\n" "t0_14 =(Linv13);\n" "t0_15 =(Linv12);\n" "t0_16 =(Linv14);\n" "t1_0 = (-L15*Linv22 + -L35*Linv24);\n" "t1_1 = (L26*Linv21 + L46*Linv23);\n" "t1_2 = (-L11*Linv22+ L41*Linv23+ -L31*Linv24);\n" "t1_3 = (L23*Linv21+ -L13*Linv22+ -L33*Linv24);\n" "t1_4 = (L22*Linv21+ L42*Linv23+ -L32*Linv24);\n" "t1_5 = (L24*Linv21+ -L14*Linv22+ L44*Linv23);\n" "t1_6 = (-Linv25*Rrd);\n" "t1_7 = (-Linv26*Rrq);\n" "t1_8 = (-Linv21*Rs);\n" "t1_9 = (-Linv23*Rs);\n" "t1_10 =(-Linv22*Rs);\n" "t1_11 =(-Linv24*Rs);\n" "t1_12 =(-Linv22*phi+ -Linv24*phi);\n" "t1_13 =(Linv21);\n" "t1_14 =(Linv23);\n" "t1_15 =(Linv22);\n" "t1_16 =(Linv24);\n" "t2_0 = (-L15*Linv32 + -L35*Linv34);\n" "t2_1 = (L26*Linv31 + L46*Linv33);\n" "t2_2 = (-L11*Linv32+ L41*Linv33+ -L31*Linv34);\n" "t2_3 = (L23*Linv31+ -L13*Linv32+ -L33*Linv34);\n" "t2_4 = (L22*Linv31+ L42*Linv33+ -L32*Linv34);\n" "t2_5 = (L24*Linv31+ -L14*Linv32+ L44*Linv33);\n" "t2_6 = (-Linv35*Rrd);\n" "t2_7 = (-Linv36*Rrq);\n" "t2_8 = (-Linv31*Rs);\n" "t2_9 = (-Linv33*Rs);\n" "t2_10 =(-Linv32*Rs);\n" "t2_11 =(-Linv34*Rs);\n" "t2_12 =(-Linv32*phi+ -Linv34*phi);\n" "t2_13 =(Linv31);\n" "t2_14 =(Linv33);\n" "t2_15 =(Linv32);\n" "t2_16 =(Linv34);\n" "t3_0 = (-L15*Linv42 + -L35*Linv44);\n" "t3_1 = (L26*Linv41 + L46*Linv43);\n" "t3_2 = (-L11*Linv42+ L41*Linv43+ -L31*Linv44);\n" "t3_3 = (L23*Linv41+ -L13*Linv42+ -L33*Linv44);\n" "t3_4 = (L22*Linv41+ L42*Linv43+ -L32*Linv44);\n" "t3_5 = (L24*Linv41+ -L14*Linv42+ L44*Linv43);\n" "t3_6 = (-Linv45*Rrd);\n" "t3_7 = (-Linv46*Rrq);\n" "t3_8 = (-Linv41*Rs);\n" "t3_9 = (-Linv43*Rs);\n" "t3_10 =(-Linv42*Rs);\n" "t3_11 =(-Linv44*Rs);\n" "t3_12 =(-Linv42*phi+ -Linv44*phi);\n" "t3_13 =(Linv41);\n" "t3_14 =(Linv43);\n" "t3_15 =(Linv42);\n" "t3_16 =(Linv44);\n" "t4_0 = (-L15*Linv52 + -L35*Linv54);\n" "t4_1 = (L26*Linv51 + L46*Linv53);\n" "t4_2 = (-L11*Linv52+ L41*Linv53+ -L31*Linv54);\n" "t4_3 = (L23*Linv51+ -L13*Linv52+ -L33*Linv54);\n" "t4_4 = (L22*Linv51+ L42*Linv53+ -L32*Linv54);\n" "t4_5 = (L24*Linv51+ -L14*Linv52+ L44*Linv53);\n" "t4_6 = (-Linv55*Rrd);\n" "t4_7 = (-Linv56*Rrq);\n" "t4_8 = (-Linv51*Rs);\n" "t4_9 = (-Linv53*Rs);\n" "t4_10 =(-Linv52*Rs);\n" "t4_11 =(-Linv54*Rs);\n" "t4_12 =(-Linv52*phi+ -Linv54*phi);\n" "t4_13 =(Linv51);\n" "t4_14 =(Linv53);\n" "t4_15 =(Linv52);\n" "t4_16 =(Linv54);\n" "t5_0 = (-L15*Linv62 + -L35*Linv64);\n" "t5_1 = (L26*Linv61 + L46*Linv63);\n" "t5_2 = (-L11*Linv62+ L41*Linv63+ -L31*Linv64);\n" "t5_3 = (L23*Linv61+ -L13*Linv62+ -L33*Linv64);\n" "t5_4 = (L22*Linv61+ L42*Linv63+ -L32*Linv64);\n" "t5_5 = (L24*Linv61+ -L14*Linv62+ L44*Linv63);\n" "t5_6 = (-Linv65*Rrd);\n" "t5_7 = (-Linv66*Rrq);\n" "t5_8 = (-Linv61*Rs);\n" "t5_9 = (-Linv63*Rs);\n" "t5_10 =(-Linv62*Rs);\n" "t5_11 =(-Linv64*Rs);\n" "t5_12 =(-Linv62*phi+ -Linv64*phi);\n" "t5_13 =(Linv61);\n" "t5_14 =(Linv63);\n" "t5_15 =(Linv62);\n" "t5_16 =(Linv64);" Show off } Parameter { Variable "OutputFcn" Value "i0 = isd1;\n" "i1 = isq1;\n" "i2 = isd2;\n" "i3 = isq2;\n" "i4 = ird;\n" "i5 = irq;\n" "\n" "OutputSignal(1,0) = L15*ird + L11*isd1 + L13*isd2 + L14*isq2 + phi;\n" "OutputSignal(1,1) = L26*irq + L23*isd2 + L22*isq1 + L24*isq2;\n" "OutputSignal(1,2) = L35*ird + L31*isd1 + L33*isd2 + L32*isq1 + phi;\n" "OutputSignal(1,3) = L46*irq + L41*isd1 + L42*isq1 + L44*isq2;\n" "OutputSignal(1,4) = L55*ird + L51*isd1 + L53*isd2 + phi;\n" "OutputSignal(1,5) = L66*irq + L62*isq1 + L64*isq2;" Show off } Parameter { Variable "UpdateFcn" Value "" Show off } Parameter { Variable "DerivativeFcn" Value "disd1 = + t0_0 * ird*w + t0_1 * ir" "q*w + t0_2 * isd1*w + t0_3 * isd2*w + t0_4 * isq1*w + t0_5 * isq2*w + t0_6 * " "ird + t0_7 * irq + t0_8 * isd1 + t0_9 * isd2 + t0_10 * isq1 + t0_11 * isq2 + " "t0_12 * w + t0_13 * Vsd1 + t0_14 * Vsd2 + t0_15 * Vsq1 + t0_16 * Vsq2;\n" "disq1 = + t1_0 * ird*w + t1_1 * irq*w + t1_2 * isd1*w + t1_3 * isd2*w + t1_4" " * isq1*w + t1_5 * isq2*w + t1_6 * ird + t1_7 * irq + t1_8 * isd1 + t1_9 * is" "d2 + t1_10 * isq1 + t1_11 * isq2 + t1_12 * w + t1_13 * Vsd1 + t1_14 * Vsd2 + " "t1_15 * Vsq1 + t1_16 * Vsq2;\n" "disd2 = + t2_0 * ird*w + t2_1 * irq*w + t2_2 * isd1*w + t2_3 * isd2*w + t2_4" " * isq1*w + t2_5 * isq2*w + t2_6 * ird + t2_7 * irq + t2_8 * isd1 + t2_9 * is" "d2 + t2_10 * isq1 + t2_11 * isq2 + t2_12 * w + t2_13 * Vsd1 + t2_14 * Vsd2 + " "t2_15 * Vsq1 + t2_16 * Vsq2;\n" "disq2 = + t3_0 * ird*w + t3_1 * irq*w + t3_2 * isd1*w + t3_3 * isd2*w + t3_4" " * isq1*w + t3_5 * isq2*w + t3_6 * ird + t3_7 * irq + t3_8 * isd1 + t3_9 * is" "d2 + t3_10 * isq1 + t3_11 * isq2 + t3_12 * w + t3_13 * Vsd1 + t3_14 * Vsd2 + " "t3_15 * Vsq1 + t3_16 * Vsq2;\n" "dird = + t4_0 * ird*w + t4_1 * irq*w + t4_2 * isd1*w + t4_3 * isd2*w + t4_4" " * isq1*w + t4_5 * isq2*w + t4_6 * ird + t4_7 * irq + t4_8 * isd1 + t4_9 * is" "d2 + t4_10 * isq1 + t4_11 * isq2 + t4_12 * w + t4_13 * Vsd1 + t4_14 * Vsd2 + " "t4_15 * Vsq1 + t4_16 * Vsq2;\n" "dirq = + t5_0 * ird*w + t5_1 * irq*w + t5_2 * isd1*w + t5_3 * isd2*w + t5_4" " * isq1*w + t5_5 * isq2*w + t5_6 * ird + t5_7 * irq + t5_8 * isd1 + t5_9 * is" "d2 + t5_10 * isq1 + t5_11 * isq2 + t5_12 * w + t5_13 * Vsd1 + t5_14 * Vsd2 + " "t5_15 * Vsq1 + t5_16 * Vsq2;" Show off } Parameter { Variable "TerminateFcn" Value "if(Lambda != 0){\n" "\tfree(Lambda);\n" "}\n" "\n" "if(L != 0){\n" "\tfree(L);\n" "}\n" "\n" "if(Linv != 0){\n" "\tfree(Linv);\n" "}\n" "\n" "if(LambdaPm != 0){\n" "\tfree(LambdaPm);\n" "}\n" "\n" Show off } Parameter { Variable "StoreCustomStateFcn" Value "" Show off } Parameter { Variable "RestoreCustomStateFcn" Value "" Show off } } Component { Type Output Name "i" Show on Position [310, 45] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "v" Show on Position [110, 50] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "w" Show on Position [110, 85] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "Lambda" Show on Position [285, 85] Direction right Flipped off Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type SignalMux Name "Mux1" Show off Position [145, 50] Direction right Flipped off Parameter { Variable "Width" Value "[4 2]" Show off } } Component { Type Output Name "T_e" Show on Position [780, 225] Direction left Flipped on Parameter { Variable "Index" Value "5" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Gain Name "Gain" Show off Position [720, 225] Direction right Flipped off Parameter { Variable "K" Value "3/2*p" Show on } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type SignalSelector Name "id1, id2" Show on Position [375, 185] Direction right Flipped off Parameter { Variable "InputWidth" Value "6" Show off } Parameter { Variable "OutputIndices" Value "[1 3]" Show on } } Component { Type Sum Name "Sum2" Show off Position [440, 185] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "+" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type SignalSelector Name "iq1, iq2" Show on Position [375, 255] Direction right Flipped off Parameter { Variable "InputWidth" Value "6" Show off } Parameter { Variable "OutputIndices" Value "[2 4]" Show on } } Component { Type Sum Name "Sum3" Show off Position [440, 255] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "+" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Sum Name "Sum4" Show off Position [625, 225] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "-+" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Product Name "Product" Show off Position [520, 180] Direction up Flipped off Parameter { Variable "IconShape" Value "1" Show off } Parameter { Variable "Inputs" Value "2" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Product Name "Product1" Show off Position [520, 260] Direction up Flipped off Parameter { Variable "IconShape" Value "1" Show off } Parameter { Variable "Inputs" Value "2" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type SignalSelector Name "ird" Show on Position [375, 320] Direction right Flipped off Parameter { Variable "InputWidth" Value "6" Show off } Parameter { Variable "OutputIndices" Value "[5]" Show on } } Component { Type SignalSelector Name "irq" Show on Position [375, 120] Direction right Flipped off Parameter { Variable "InputWidth" Value "6" Show off } Parameter { Variable "OutputIndices" Value "[6]" Show on } } Component { Type Gain Name "Gain1" Show off Position [575, 180] Direction right Flipped off Parameter { Variable "K" Value "Lmq" Show on } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "Gain2" Show off Position [575, 260] Direction right Flipped off Parameter { Variable "K" Value "Lmd" Show on } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Sum Name "Sum6" Show off Position [435, 320] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "|++" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Constant Name "Constant" Show off Position [370, 380] Direction right Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Value" Value "Lambda_pm/Lmd" Show on } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Sum Name "Sum7" Show off Position [670, 225] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "|++" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Product Name "Product2" Show off Position [520, 310] Direction up Flipped off Parameter { Variable "IconShape" Value "1" Show off } Parameter { Variable "Inputs" Value "2" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "Gain3" Show off Position [575, 310] Direction right Flipped off Parameter { Variable "K" Value "Lmd-Lmq" Show on } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type SignalDemux Name "Demux" Show off Position [270, 50] Direction right Flipped on Parameter { Variable "Width" Value "[4 2]" Show off } } Connection { Type Signal SrcComponent "dq12" SrcTerminal 4 Points [250, 60; 250, 85] DstComponent "Lambda" DstTerminal 1 } Connection { Type Signal SrcComponent "w" SrcTerminal 1 Points [155, 85; 155, 60] DstComponent "dq12" DstTerminal 2 } Connection { Type Signal SrcComponent "v" SrcTerminal 1 DstComponent "Mux1" DstTerminal 2 } Connection { Type Signal SrcComponent "Mux1" SrcTerminal 1 DstComponent "dq12" DstTerminal 1 } Connection { Type Signal SrcComponent "Gain" SrcTerminal 2 DstComponent "T_e" DstTerminal 1 } Connection { Type Signal SrcComponent "Product" SrcTerminal 1 DstComponent "Gain1" DstTerminal 1 } Connection { Type Signal SrcComponent "Gain1" SrcTerminal 2 Points [625, 180] DstComponent "Sum4" DstTerminal 2 } Connection { Type Signal SrcComponent "Product1" SrcTerminal 1 DstComponent "Gain2" DstTerminal 1 } Connection { Type Signal SrcComponent "Gain2" SrcTerminal 2 Points [625, 260] DstComponent "Sum4" DstTerminal 3 } Connection { Type Signal SrcComponent "Sum6" SrcTerminal 1 Points [470, 320; 470, 265] DstComponent "Product1" DstTerminal 3 } Connection { Type Signal SrcComponent "Constant" SrcTerminal 1 Points [435, 380] DstComponent "Sum6" DstTerminal 3 } Connection { Type Signal SrcComponent "id1, id2" SrcTerminal 2 DstComponent "Sum2" DstTerminal 2 } Connection { Type Signal SrcComponent "iq1, iq2" SrcTerminal 2 DstComponent "Sum3" DstTerminal 2 } Connection { Type Signal SrcComponent "ird" SrcTerminal 2 DstComponent "Sum6" DstTerminal 2 } Connection { Type Signal SrcComponent "irq" SrcTerminal 2 Points [470, 120; 470, 175] DstComponent "Product" DstTerminal 2 } Connection { Type Signal SrcComponent "Sum4" SrcTerminal 1 DstComponent "Sum7" DstTerminal 2 } Connection { Type Signal SrcComponent "Sum7" SrcTerminal 1 DstComponent "Gain" DstTerminal 1 } Connection { Type Signal SrcComponent "Sum2" SrcTerminal 1 Points [490, 185] Branch { DstComponent "Product" DstTerminal 3 } Branch { DstComponent "Product2" DstTerminal 2 } } Connection { Type Signal SrcComponent "Sum3" SrcTerminal 1 Points [480, 255] Branch { DstComponent "Product1" DstTerminal 2 } Branch { Points [480, 315] DstComponent "Product2" DstTerminal 3 } } Connection { Type Signal SrcComponent "Product2" SrcTerminal 1 DstComponent "Gain3" DstTerminal 1 } Connection { Type Signal SrcComponent "Gain3" SrcTerminal 2 Points [670, 310] DstComponent "Sum7" DstTerminal 3 } Connection { Type Signal SrcComponent "Demux" SrcTerminal 2 DstComponent "i" DstTerminal 1 } Connection { Type Signal SrcComponent "dq12" SrcTerminal 3 Points [240, 50] Branch { DstComponent "Demux" DstTerminal 1 } Branch { Points [240, 120] Branch { DstComponent "irq" DstTerminal 1 } Branch { Points [240, 185] Branch { DstComponent "id1, id2" DstTerminal 1 } Branch { Points [240, 255] Branch { DstComponent "iq1, iq2" DstTerminal 1 } Branch { Points [240, 320] DstComponent "ird" DstTerminal 1 } } } } } } } Parameter { Variable "Configuration" Value "damper" Show off } } Component { Type SignalMux Name "Mux" Show off Position [685, 255] Direction right Flipped off Parameter { Variable "Width" Value "[2 2]" Show off } } Component { Type Input Name "th_e" Show on Position [585, 80] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "w_e" Show on Position [765, 280] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "T_e" Show on Position [915, 270] Direction left Flipped on Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "c1" Show on Position [55, 240] Direction right Flipped off Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "b1" Show on Position [55, 190] Direction right Flipped off Parameter { Variable "Index" Value "5" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "a1" Show on Position [55, 140] Direction right Flipped off Parameter { Variable "Index" Value "6" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "c2" Show on Position [55, 410] Direction right Flipped off Parameter { Variable "Index" Value "7" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "b2" Show on Position [55, 360] Direction right Flipped off Parameter { Variable "Index" Value "8" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "a2" Show on Position [55, 310] Direction right Flipped off Parameter { Variable "Index" Value "9" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Ammeter Name "ia1" Show on Position [95, 140] Direction right Flipped off } Component { Type Ammeter Name "ib1" Show on Position [95, 190] Direction right Flipped off } Component { Type Ammeter Name "ic1" Show on Position [95, 240] Direction right Flipped off } Component { Type Ammeter Name "ia2" Show on Position [95, 310] Direction right Flipped off } Component { Type Ammeter Name "ib2" Show on Position [95, 360] Direction right Flipped off } Component { Type Ammeter Name "ic2" Show on Position [95, 410] Direction right Flipped off } Connection { Type Wire SrcComponent "vbc1" SrcTerminal 1 Points [315, 190] Branch { Points [225, 190] Branch { Points [130, 190] Branch { DstComponent "ib1" DstTerminal 1 } Branch { DstComponent "R2" DstTerminal 1 } } Branch { DstComponent "i_a1" DstTerminal 2 } Branch { DstComponent "i_c1" DstTerminal 2 } } Branch { DstComponent "vab1" DstTerminal 2 } } Connection { Type Signal SrcComponent "Demux1" SrcTerminal 2 Points [260, 110; 260, 165] DstComponent "i_a1" DstTerminal 3 } Connection { Type Wire SrcComponent "vbc2" SrcTerminal 1 Points [315, 360] Branch { Points [225, 360] Branch { Points [130, 360] Branch { DstComponent "ib2" DstTerminal 1 } Branch { DstComponent "R5" DstTerminal 1 } } Branch { DstComponent "i_a2" DstTerminal 2 } Branch { DstComponent "i_c2" DstTerminal 2 } } Branch { DstComponent "vab2" DstTerminal 2 } } Connection { Type Wire SrcComponent "vab2" SrcTerminal 1 Points [315, 310; 225, 310] Branch { Points [140, 310] Branch { DstComponent "ia2" DstTerminal 1 } Branch { DstComponent "R6" DstTerminal 1 } } Branch { DstComponent "i_a2" DstTerminal 1 } } Connection { Type Wire SrcComponent "vbc2" SrcTerminal 2 Points [315, 410; 225, 410] Branch { Points [120, 410] Branch { DstComponent "ic2" DstTerminal 1 } Branch { DstComponent "R4" DstTerminal 1 } } Branch { DstComponent "i_c2" DstTerminal 1 } } Connection { Type Signal SrcComponent "Demux2" SrcTerminal 2 Points [270, 420; 270, 335] DstComponent "i_a2" DstTerminal 3 } Connection { Type Wire SrcComponent "vbc1" SrcTerminal 2 Points [315, 240; 225, 240] Branch { Points [120, 240] Branch { DstComponent "ic1" DstTerminal 1 } Branch { DstComponent "R1" DstTerminal 1 } } Branch { DstComponent "i_c1" DstTerminal 1 } } Connection { Type Wire SrcComponent "vab1" SrcTerminal 1 Points [315, 140; 225, 140] Branch { Points [175, 140] Branch { Points [140, 140] Branch { DstComponent "ia1" DstTerminal 1 } Branch { DstComponent "R3" DstTerminal 1 } } Branch { DstComponent "Vm1" DstTerminal 1 } } Branch { DstComponent "i_a1" DstTerminal 1 } } Connection { Type Signal SrcComponent "RRF->3ph" SrcTerminal 2 DstComponent "Demux1" DstTerminal 1 } Connection { Type Signal SrcComponent "RRF->3ph1" SrcTerminal 2 DstComponent "Demux2" DstTerminal 1 } Connection { Type Signal SrcComponent "Offset" SrcTerminal 2 Points [555, 390] Branch { Points [555, 435] DstComponent "RRF->3ph1" DstTerminal 3 } Branch { Points [480, 390] DstComponent "3ph->RRF1" DstTerminal 3 } } Connection { Type Signal SrcComponent "Demux2" SrcTerminal 4 Points [260, 440; 260, 385] DstComponent "i_c2" DstTerminal 3 } Connection { Type Signal SrcComponent "Demux1" SrcTerminal 4 Points [270, 130; 270, 215] DstComponent "i_c1" DstTerminal 3 } Connection { Type Signal SrcComponent "th_e" SrcTerminal 1 Points [630, 80; 630, 150] Branch { Points [630, 390] DstComponent "Offset" DstTerminal 1 } Branch { DstComponent "Offset1" DstTerminal 1 } } Connection { Type Signal SrcComponent "Cont\nSelector" SrcTerminal 2 DstComponent "RRF->3ph" DstTerminal 1 } Connection { Type Signal SrcComponent "Cont\nSelector1" SrcTerminal 2 DstComponent "RRF->3ph1" DstTerminal 1 } Connection { Type Signal SrcComponent "3ph->RRF" SrcTerminal 2 Points [580, 185; 580, 250] DstComponent "Mux" DstTerminal 2 } Connection { Type Signal SrcComponent "3ph->RRF1" SrcTerminal 2 Points [580, 365; 580, 260] DstComponent "Mux" DstTerminal 3 } Connection { Type Signal SrcComponent "Mux3" SrcTerminal 1 DstComponent "UvVwWu2uvw" DstTerminal 1 } Connection { Type Signal SrcComponent "vbc1" SrcTerminal 3 Points [345, 215] Branch { Points [375, 215] DstComponent "Mux3" DstTerminal 3 } Branch { DstComponent "Sum" DstTerminal 3 } } Connection { Type Signal SrcComponent "vab1" SrcTerminal 3 Points [345, 165] Branch { Points [375, 165] DstComponent "Mux3" DstTerminal 2 } Branch { DstComponent "Sum" DstTerminal 2 } } Connection { Type Signal SrcComponent "Sum" SrcTerminal 1 Points [365, 190; 365, 200] DstComponent "Mux3" DstTerminal 4 } Connection { Type Signal SrcComponent "UvVwWu2uvw" SrcTerminal 2 DstComponent "3ph->RRF" DstTerminal 1 } Connection { Type Signal SrcComponent "Mux4" SrcTerminal 1 DstComponent "UvVwWu2uvw1" DstTerminal 1 } Connection { Type Signal SrcComponent "Sum1" SrcTerminal 1 Points [365, 360; 365, 370] DstComponent "Mux4" DstTerminal 4 } Connection { Type Signal SrcComponent "vab2" SrcTerminal 3 Points [345, 335] Branch { Points [375, 335] DstComponent "Mux4" DstTerminal 2 } Branch { DstComponent "Sum1" DstTerminal 2 } } Connection { Type Signal SrcComponent "vbc2" SrcTerminal 3 Points [345, 385] Branch { Points [375, 385] DstComponent "Mux4" DstTerminal 3 } Branch { DstComponent "Sum1" DstTerminal 3 } } Connection { Type Signal SrcComponent "UvVwWu2uvw1" SrcTerminal 2 DstComponent "3ph->RRF1" DstTerminal 1 } Connection { Type Signal SrcComponent "Offset1" SrcTerminal 2 Points [535, 150] Branch { Points [475, 150] DstComponent "3ph->RRF" DstTerminal 3 } Branch { DstComponent "RRF->3ph" DstTerminal 3 } } Connection { Type Signal SrcComponent "Mux" SrcTerminal 1 DstComponent "dq12" DstTerminal 2 } Connection { Type Signal SrcComponent "dq12" SrcTerminal 5 DstComponent "T_e" DstTerminal 1 } Connection { Type Signal SrcComponent "w_e" SrcTerminal 1 DstComponent "dq12" DstTerminal 3 } Connection { Type Signal SrcComponent "dq12" SrcTerminal 1 Points [880, 255; 880, 220; 740, 220] Branch { Points [740, 115] DstComponent "Cont\nSelector" DstTerminal 1 } Branch { Points [740, 425] DstComponent "Cont\nSelector1" DstTerminal 1 } } Connection { Type Wire SrcComponent "R2" SrcTerminal 2 Points [130, 285] Branch { DstComponent "R1" DstTerminal 2 } Branch { Points [140, 285] Branch { DstComponent "Vm1" DstTerminal 2 } Branch { DstComponent "R3" DstTerminal 2 } } } Connection { Type Wire SrcComponent "R5" SrcTerminal 2 Points [130, 460] Branch { DstComponent "R4" DstTerminal 2 } Branch { DstComponent "R6" DstTerminal 2 } } Connection { Type Wire SrcComponent "ia1" SrcTerminal 2 DstComponent "a1" DstTerminal 1 } Connection { Type Wire SrcComponent "b1" SrcTerminal 1 DstComponent "ib1" DstTerminal 2 } Connection { Type Wire SrcComponent "ic1" SrcTerminal 2 DstComponent "c1" DstTerminal 1 } Connection { Type Wire SrcComponent "ia2" SrcTerminal 2 DstComponent "a2" DstTerminal 1 } Connection { Type Wire SrcComponent "ib2" SrcTerminal 2 DstComponent "b2" DstTerminal 1 } Connection { Type Wire SrcComponent "ic2" SrcTerminal 2 DstComponent "c2" DstTerminal 1 } } } Parameter { Variable "Configuration" Value "1" Show off } } Component { Type Inertia Name "Inertia" Show on Position [90, 280] 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 [40, 280] 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 [260, 315] Direction right Flipped off Parameter { Variable "SecondFlange" Value "1" Show off } } Component { Type AngleSensor Name "Rotor\nAngle" Show on Position [350, 315] Direction right Flipped off Parameter { Variable "SecondFlange" Value "1" Show off } Parameter { Variable "theta0" Value "" Show off } } Component { Type Gain Name "p*thetam" Show on Position [370, 245] Direction up Flipped off Parameter { Variable "K" Value "p" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "p*wm" Show on Position [280, 245] Direction up Flipped off Parameter { Variable "K" Value "p" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type RotationalReference Name "Rotational\nFrame" Show off Position [140, 335] Direction up Flipped off } Component { Type RotationalPort Name "Rotational\nPort" Show off Position [420, 280] 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 [140, 310] Direction right Flipped on Parameter { Variable "D" Value "F" Show off } Parameter { Variable "theta0" Value "" Show off } } Component { Type Port Name "a2" Show off Position [110, 130] Direction right Flipped off Parameter { Variable "Index" Value "5" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "b2" Show off Position [110, 160] Direction right Flipped off Parameter { Variable "Index" Value "6" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "c2" Show off Position [110, 190] Direction right Flipped off Parameter { Variable "Index" Value "7" Show on } Parameter { Variable "Width" Value "-1" Show off } } Connection { Type Rotational SrcComponent "Inertia" SrcTerminal 1 DstComponent "Te" DstTerminal 1 } Connection { Type Rotational SrcComponent "Inertia" SrcTerminal 2 Points [140, 280] Branch { Points [260, 280] Branch { Points [350, 280] Branch { DstComponent "Rotational\nPort" DstTerminal 1 } Branch { DstComponent "Rotor\nAngle" DstTerminal 1 } } Branch { DstComponent "Rotor\nSpeed" DstTerminal 1 } } Branch { DstComponent "Friction" DstTerminal 1 } } Connection { Type Signal SrcComponent "Rotor\nSpeed" SrcTerminal 2 Points [280, 315] DstComponent "p*wm" DstTerminal 1 } Connection { Type Signal SrcComponent "Rotor\nAngle" SrcTerminal 2 Points [370, 315] DstComponent "p*thetam" DstTerminal 1 } Connection { Type Rotational SrcComponent "Friction" SrcTerminal 2 DstComponent "Rotational\nFrame" DstTerminal 1 } Connection { Type Wire SrcComponent "a1" SrcTerminal 1 Points [150, 40; 150, 60] DstComponent "Electrical model" DstTerminal 6 } Connection { Type Wire SrcComponent "c1" SrcTerminal 1 Points [150, 100; 150, 80] DstComponent "Electrical model" DstTerminal 4 } Connection { Type Wire SrcComponent "c2" SrcTerminal 1 Points [150, 190; 150, 170] DstComponent "Electrical model" DstTerminal 7 } Connection { Type Wire SrcComponent "b1" SrcTerminal 1 DstComponent "Electrical model" DstTerminal 5 } Connection { Type Wire SrcComponent "a2" SrcTerminal 1 Points [145, 130; 145, 150] DstComponent "Electrical model" DstTerminal 9 } Connection { Type Wire SrcComponent "b2" SrcTerminal 1 DstComponent "Electrical model" DstTerminal 8 } Connection { Type Signal SrcComponent "Electrical model" SrcTerminal 3 Points [180, 220; 40, 220] DstComponent "Te" DstTerminal 2 } Connection { Type Signal SrcComponent "p*wm" SrcTerminal 2 Points [280, 220; 200, 220] DstComponent "Electrical model" DstTerminal 2 } Connection { Type Signal SrcComponent "p*thetam" SrcTerminal 2 Points [370, 210; 220, 210] DstComponent "Electrical model" DstTerminal 1 } } MaskProbe { Name "Stator phase currents" Probe { Component "ia1" Path "Electrical model/Rotor reference frame" Signals {"Measured current"} } Probe { Component "ib1" Path "Electrical model/Rotor reference frame" Signals {"Measured current"} } Probe { Component "ic1" Path "Electrical model/Rotor reference frame" Signals {"Measured current"} } Probe { Component "ia2" Path "Electrical model/Rotor reference frame" Signals {"Measured current"} } Probe { Component "ib2" Path "Electrical model/Rotor reference frame" Signals {"Measured current"} } Probe { Component "ic2" Path "Electrical model/Rotor reference frame" Signals {"Measured current"} } } 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 Subsystem Name "Battery\nPacks" Show on Position [155, 100] Direction up Flipped off Frame [-20, -20; 20, 20] LabelPosition [-23, 0] LabelAlign right SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskDisplay "Icon:line({0,0},{-20,-15})\n" "Icon:line({-10,10},{-15,-15})\n" "Icon:line({-5,5},{-10,-10})\n" "Icon:circle(0, 5, 0.5)\n" "Icon:circle(0, 0, 0.5)\n" "Icon:circle(0, -5, 0.5)\n" "Icon:line({-10,10},{10,10})\n" "Icon:line({-5,5},{15,15})\n" "Icon:line({0,0},{15,20})\n" "\n" "Icon:line({8,8},{-18,-22})\n" "Icon:line({6,10},{-20,-20})" MaskDisplayLang "2" MaskIconFrame off MaskIconOpaque on MaskIconRotates on Terminal { Type Port Position [0, 25] Direction down } Terminal { Type Port Position [0, -25] Direction up } Schematic { Location [960, 451; 1094, 593] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type DCVoltageSource Name "V_dc1\n(Batt.)" Show on Position [65, 70] Direction up Flipped off Parameter { Variable "V" Value "Vdc" Show off } } Component { Type Port Name "1" Show on Position [65, 115] Direction up Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "2" Show on Position [65, 25] Direction up Flipped on Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Connection { Type Wire SrcComponent "1" SrcTerminal 1 DstComponent "V_dc1\n(Batt.)" DstTerminal 2 } Connection { Type Wire SrcComponent "2" SrcTerminal 1 DstComponent "V_dc1\n(Batt.)" DstTerminal 1 } } } Component { Type Subsystem Name "UCs" Show on Position [155, 305] Direction up Flipped off Frame [-20, -20; 20, 20] LabelPosition [-23, 0] LabelAlign right SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskDisplay "local pi = math.pi\n" "local zeta = 160\n" "\n" "Icon:line({0,0},{-20,-5})\n" "Icon:line({-10,10},{-5,-5})\n" "Icon:arc(0,10,10,5,10,zeta)\n" "Icon:line({0,0},{5,20})\n" "\n" "Icon:line({8,8},{-12,-16})\n" "Icon:line({6,10},{-14,-14})" MaskDisplayLang "2" MaskIconFrame off MaskIconOpaque on MaskIconRotates on Terminal { Type Port Position [0, 25] Direction down } Terminal { Type Port Position [0, -25] Direction up } Schematic { Location [1600, 597; 1734, 739] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Port Name "1" Show on Position [65, 115] Direction up Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "2" Show on Position [65, 25] Direction up Flipped on Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type DCVoltageSource Name "V_dc2\n(UCs)" Show on Position [65, 70] Direction up Flipped off Parameter { Variable "V" Value "Vdc" Show off } } Connection { Type Wire SrcComponent "1" SrcTerminal 1 DstComponent "V_dc2\n(UCs)" DstTerminal 2 } Connection { Type Wire SrcComponent "2" SrcTerminal 1 DstComponent "V_dc2\n(UCs)" DstTerminal 1 } } } Component { Type SignalDemux Name "Demux3" Show off Position [460, 255] Direction right Flipped on Parameter { Variable "Width" Value "[2 1]" Show off } } Component { Type SignalDemux Name "Demux4" Show off Position [460, 55] Direction right Flipped on Parameter { Variable "Width" Value "[2 1]" Show off } } Component { Type Output Name "Is1" Show on Position [495, 50] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "Is2" Show on Position [495, 250] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "we,theta" Show on Position [705, 130] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "Vdc" Show on Position [140, 200] Direction left Flipped off Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Gain Name "Gain" Show on Position [655, 130] Direction right Flipped off Parameter { Variable "K" Value "p" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Reference SrcComponent "Components/Electrical/Converters/2-Level\\nMOSFET\\nC" "onv." Name "2-Level\nMOSFET\nConv." Show off Position [305, 100] Direction down Flipped on Frame [-25, -25; 25, 25] LabelPosition [-27, 0] LabelAlign right Parameter { Variable "Ron" Value "0" Show off } Parameter { Variable "therm" Value "" Show off } Parameter { Variable "Rth" Value "0" Show off } Parameter { Variable "T_init" Value "0" Show off } 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 Input Position [-15, -25] Direction up } Terminal { Type Port Position [0, -30] Direction up } Terminal { Type Port Position [0, 30] Direction down } } Component { Type Input Name "PWM1" Show on Position [270, 15] Direction right Flipped off Parameter { Variable "Index" Value "5" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Reference SrcComponent "Components/Electrical/Converters/2-Level\\nMOSFET\\nC" "onv." Name "2-Level\nMOSFET\nConv.1" Show off Position [300, 310] Direction down Flipped on Frame [-25, -25; 25, 25] LabelPosition [-27, 0] LabelAlign right Parameter { Variable "Ron" Value "0" Show off } Parameter { Variable "therm" Value "" Show off } Parameter { Variable "Rth" Value "0" Show off } Parameter { Variable "T_init" Value "0" Show off } 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 Input Position [-15, -25] Direction up } Terminal { Type Port Position [0, -30] Direction up } Terminal { Type Port Position [0, 30] Direction down } } Component { Type Input Name "PWM2" Show on Position [270, 215] Direction right Flipped off Parameter { Variable "Index" Value "6" Show on } Parameter { Variable "Width" Value "-1" Show off } } Connection { Type Wire SrcComponent "Vm2" SrcTerminal 2 Points [185, 370] Branch { Points [300, 370] DstComponent "2-Level\nMOSFET\nConv.1" DstTerminal 6 } Branch { Points [155, 370] DstComponent "UCs" DstTerminal 1 } } Connection { Type Rotational SrcComponent "Rotational\nFrame" SrcTerminal 1 DstComponent "Rotational\nDamper" DstTerminal 1 } Connection { Type Signal SrcComponent "Probe3" SrcTerminal 1 DstComponent "Demux2" DstTerminal 1 } Connection { Type Wire SrcComponent "3ph Meter" SrcTerminal 4 Points [570, 90; 570, 185] DstComponent "Dual Star\nPMSM" DstTerminal 1 } Connection { Type Wire SrcComponent "3ph Meter" SrcTerminal 5 Points [560, 100; 560, 195] DstComponent "Dual Star\nPMSM" DstTerminal 2 } Connection { Type Wire SrcComponent "Dual Star\nPMSM" SrcTerminal 5 Points [550, 215; 550, 300] DstComponent "3ph Meter1" DstTerminal 4 } Connection { Type Wire SrcComponent "3ph Meter1" SrcTerminal 5 Points [560, 310; 560, 225] DstComponent "Dual Star\nPMSM" DstTerminal 6 } Connection { Type Wire SrcComponent "3ph Meter1" SrcTerminal 6 Points [570, 320; 570, 235] DstComponent "Dual Star\nPMSM" DstTerminal 7 } Connection { Type Signal SrcComponent "Demux2" SrcTerminal 2 DstComponent "Scope1" DstTerminal 3 } Connection { Type Signal SrcComponent "Demux2" SrcTerminal 3 DstComponent "Scope1" DstTerminal 4 } Connection { Type Signal SrcComponent "Demux2" SrcTerminal 4 DstComponent "Scope1" DstTerminal 5 } Connection { Type Rotational SrcComponent "Dual Star\nPMSM" SrcTerminal 4 DstComponent "Rotational\nDamper" DstTerminal 2 } Connection { Type Signal SrcComponent "Vm1" SrcTerminal 3 Points [205, 100] Branch { DstComponent "Goto7" DstTerminal 1 } Branch { Points [205, 195] DstComponent "Mux" DstTerminal 2 } } Connection { Type Signal SrcComponent "Vm2" SrcTerminal 3 Points [205, 305] Branch { DstComponent "Goto12" DstTerminal 1 } Branch { Points [205, 205] DstComponent "Mux" DstTerminal 3 } } Connection { Type Signal SrcComponent "Demux3" SrcTerminal 2 DstComponent "Is2" DstTerminal 1 } Connection { Type Signal SrcComponent "3ph Meter1" SrcTerminal 8 Points [440, 255] Branch { Points [440, 160; 540, 160; 540, 25] DstComponent "Scope1" DstTerminal 2 } Branch { DstComponent "Demux3" DstTerminal 1 } } Connection { Type Signal SrcComponent "Demux4" SrcTerminal 2 DstComponent "Is1" DstTerminal 1 } Connection { Type Signal SrcComponent "3ph Meter" SrcTerminal 8 Points [440, 55] Branch { Points [440, 15] DstComponent "Scope1" DstTerminal 1 } Branch { DstComponent "Demux4" DstTerminal 1 } } Connection { Type Signal SrcComponent "Mux" SrcTerminal 1 DstComponent "Vdc" DstTerminal 1 } Connection { Type Signal SrcComponent "Probe2" SrcTerminal 1 DstComponent "Gain" DstTerminal 1 } Connection { Type Signal SrcComponent "Gain" SrcTerminal 2 DstComponent "we,theta" DstTerminal 1 } Connection { Type Wire SrcComponent "2-Level\nMOSFET\nConv." SrcTerminal 1 DstComponent "3ph Meter" DstTerminal 1 } Connection { Type Wire SrcComponent "2-Level\nMOSFET\nConv." SrcTerminal 2 DstComponent "3ph Meter" DstTerminal 2 } Connection { Type Wire SrcComponent "2-Level\nMOSFET\nConv." SrcTerminal 3 DstComponent "3ph Meter" DstTerminal 3 } Connection { Type Wire SrcComponent "Vm1" SrcTerminal 1 Points [185, 40] Branch { Points [155, 40] DstComponent "Battery\nPacks" DstTerminal 2 } Branch { Points [305, 40] DstComponent "2-Level\nMOSFET\nConv." DstTerminal 5 } } Connection { Type Wire SrcComponent "Vm1" SrcTerminal 2 Points [185, 160] Branch { Points [155, 160] DstComponent "Battery\nPacks" DstTerminal 1 } Branch { Points [305, 160] DstComponent "2-Level\nMOSFET\nConv." DstTerminal 6 } } Connection { Type Signal SrcComponent "PWM1" SrcTerminal 1 Points [320, 15] DstComponent "2-Level\nMOSFET\nConv." DstTerminal 4 } Connection { Type Wire SrcComponent "Dual Star\nPMSM" SrcTerminal 3 Points [550, 205; 550, 110] DstComponent "3ph Meter" DstTerminal 6 } Connection { Type Wire SrcComponent "Vm2" SrcTerminal 1 Points [185, 250] Branch { Points [155, 250] DstComponent "UCs" DstTerminal 2 } Branch { Points [300, 250] DstComponent "2-Level\nMOSFET\nConv.1" DstTerminal 5 } } Connection { Type Wire SrcComponent "3ph Meter1" SrcTerminal 1 DstComponent "2-Level\nMOSFET\nConv.1" DstTerminal 1 } Connection { Type Wire SrcComponent "3ph Meter1" SrcTerminal 2 DstComponent "2-Level\nMOSFET\nConv.1" DstTerminal 2 } Connection { Type Wire SrcComponent "3ph Meter1" SrcTerminal 3 DstComponent "2-Level\nMOSFET\nConv.1" DstTerminal 3 } Connection { Type Signal SrcComponent "PWM2" SrcTerminal 1 Points [315, 215] DstComponent "2-Level\nMOSFET\nConv.1" DstTerminal 4 } } } Component { Type Subsystem Name "Controller" Show on Position [180, 135] Direction up Flipped off Frame [-60, -65; 60, 65] LabelPosition [0, 68] LabelAlign up SampleTime "-1" CodeGenSampleTime "Ts_controller" CodeGenDiscretizationMethod "2" CodeGenInliningExceptions "AAAACwAAAAABAAAACABSAFAATQAq" CodeGenTarget "TI2806x" CodeGenTargetSettings "AAAAfwAAAAAlUU1hcDxRU3RyaW5nLFFNYXA8UVN0cmluZyxRU" "3RyaW5nPiA+AAAAAAUAAAAOAFQASQAyADgAMwA4AHgAAAAwAAAAEgB1AHMAZQBJAG4AdABPAHMAYw" "AAAAIAMQAAABgAdQBuAGkAZgBsAGEAcwBoAEYAaQBsAGUAAAAAAAAAFgB0AGEAcwBrAEYAcgBlAHE" "AVABvAGwAAAACADEAAAAUAHQAYQByAGcAZQB0AEMAbwByAGUAAAACADEAAAASAHMAeQBzAEMAbABr" "AE0ASAB6AAAABgAxADkAMAAAABQAaQBuAHMAdABhAGwAbABEAGkAcgAAAAAAAAAOAGcAZQBuAE8Ab" "gBsAHkAAAACADIAAAAcAGUAeAB0AE0AbwBkAGUAUwBjAGkAUABpAG4AcwAAAA4AUwBDAEkAXwBEAF" "MAUAAAACIAZQB4AHQATQBvAGQAZQBCAHUAZgBmAGUAcgBTAGkAegBlAAAACAAyADAAMAAwAAAAEgB" "lAHgAdABDAGwAawBNAEgAegAAAAQAMwAwAAAACABjAGgAaQBwAAAAAgAxAAAAFgBiAHUAaQBsAGQA" "QwBvAG4AZgBpAGcAAAACADIAAAAKAGIAbwBhAHIAZAAAAAIAMgAAAEoAVQBTAEUAXwBEAEEAVABBA" "F8AVABZAFAARQBTAF8ARgBPAFIAXwBUAFUATgBBAEIATABFAF8AUABBAFIAQQBNAEUAVABFAFIAUw" "AAAAIAMQAAAA4AVAB6ADMARwBwAGkAbwAAAAIAMAAAABIAVAB6ADMARQBuAGEAYgBsAGUAAAACADA" "AAAAOAFQAegAyAEcAcABpAG8AAAACADAAAAASAFQAegAyAEUAbgBhAGIAbABlAAAAAgAwAAAADgBU" "AHoAMQBHAHAAaQBvAAAAAgAwAAAAEgBUAHoAMQBFAG4AYQBiAGwAZQAAAAIAMAAAABoAVABBAFIAR" "wBFAFQAXwBEAEUAVgBJAEMARQAAAAwAMAB8AHwAMAB8ADAAAAAgAFMAYQBtAHAAbABlAFQAaQBtAG" "UAUgBlAGwAVABvAGwAAAAEADEAMAAAACIATABpAG4AawBlAHIAQwBvAG0AbQBhAG4AZABGAGkAbAB" "lAAAAAAAAABoARQBYAFQARQBSAE4AQQBMAF8ATQBPAEQARQAAAAIAMQAAACYAQQBuAFQAcgBpAHAA" "NABUAGgAcgBlAHMAaABvAGwAZABMAG8AdwAAAAIAMAAAACgAQQBuAFQAcgBpAHAANABUAGgAcgBlA" "HMAaABvAGwAZABIAGkAZwBoAAAAAgAwAAAAGgBBAG4AVAByAGkAcAA0AFMAaQBnAG4AYQBsAAAAAg" "AxAAAAGgBBAG4AVAByAGkAcAA0AEUAbgBhAGIAbABlAAAAAgAwAAAAHABBAG4AVAByAGkAcAA0AEE" "AZABjAFUAbgBpAHQAAAACADEAAAAiAEEAbgBUAHIAaQBwADQAQQBkAGMAQwBoAGEAbgBuAGUAbAAA" "AAIAMAAAACYAQQBuAFQAcgBpAHAAMwBUAGgAcgBlAHMAaABvAGwAZABMAG8AdwAAAAIAMAAAACgAQ" "QBuAFQAcgBpAHAAMwBUAGgAcgBlAHMAaABvAGwAZABIAGkAZwBoAAAAAgAwAAAAGgBBAG4AVAByAG" "kAcAAzAFMAaQBnAG4AYQBsAAAAAgAxAAAAGgBBAG4AVAByAGkAcAAzAEUAbgBhAGIAbABlAAAAAgA" "wAAAAHABBAG4AVAByAGkAcAAzAEEAZABjAFUAbgBpAHQAAAACADEAAAAiAEEAbgBUAHIAaQBwADMA" "QQBkAGMAQwBoAGEAbgBuAGUAbAAAAAIAMAAAACYAQQBuAFQAcgBpAHAAMgBUAGgAcgBlAHMAaABvA" "GwAZABMAG8AdwAAAAIAMAAAACgAQQBuAFQAcgBpAHAAMgBUAGgAcgBlAHMAaABvAGwAZABIAGkAZw" "BoAAAAAgAwAAAAGgBBAG4AVAByAGkAcAAyAFMAaQBnAG4AYQBsAAAAAgAxAAAAGgBBAG4AVAByAGk" "AcAAyAEUAbgBhAGIAbABlAAAAAgAwAAAAHABBAG4AVAByAGkAcAAyAEEAZABjAFUAbgBpAHQAAAAC" "ADEAAAAiAEEAbgBUAHIAaQBwADIAQQBkAGMAQwBoAGEAbgBuAGUAbAAAAAIAMAAAACYAQQBuAFQAc" "gBpAHAAMQBUAGgAcgBlAHMAaABvAGwAZABMAG8AdwAAAAIAMAAAACgAQQBuAFQAcgBpAHAAMQBUAG" "gAcgBlAHMAaABvAGwAZABIAGkAZwBoAAAAAgAwAAAAGgBBAG4AVAByAGkAcAAxAFMAaQBnAG4AYQB" "sAAAAAgAxAAAAGgBBAG4AVAByAGkAcAAxAEUAbgBhAGIAbABlAAAAAgAwAAAAHABBAG4AVAByAGkA" "cAAxAEEAZABjAFUAbgBpAHQAAAACADEAAAAiAEEAbgBUAHIAaQBwADEAQQBkAGMAQwBoAGEAbgBuA" "GUAbAAAAAIAMAAAABAAVABJADIAOAAzADcAeABTAAAADgAAABIAdQBzAGUASQBuAHQATwBzAGMAAA" "ACADEAAAAYAHUAbgBpAGYAbABhAHMAaABGAGkAbABlAAAAAAAAABYAdABhAHMAawBGAHIAZQBxAFQ" "AbwBsAAAAAgAxAAAAEgBzAHkAcwBDAGwAawBNAEgAegAAAAYAMQA5ADAAAAAUAGkAbgBzAHQAYQBs" "AGwARABpAHIAAAAAAAAADgBnAGUAbgBPAG4AbAB5AAAAAgAyAAAAHABlAHgAdABNAG8AZABlAFMAY" "wBpAFAAaQBuAHMAAAAOAFMAQwBJAF8ARABTAFAAAAAiAGUAeAB0AE0AbwBkAGUAQgB1AGYAZgBlAH" "IAUwBpAHoAZQAAAAgAMgAwADAAMAAAABIAZQB4AHQAQwBsAGsATQBIAHoAAAAEADMAMAAAAAgAYwB" "oAGkAcAAAAAIAMQAAABYAYgB1AGkAbABkAEMAbwBuAGYAaQBnAAAAAgAyAAAACgBiAG8AYQByAGQA" "AAACADIAAAAaAFQAQQBSAEcARQBUAF8ARABFAFYASQBDAEUAAABCADAAfAAvAGQAZQB2AC8AYwB1A" "C4AdQBzAGIAcwBlAHIAaQBhAGwALQBUAEkANAAzAEgAUwA2AFUAMQB8ADAAfAAwAAAAGgBFAFgAVA" "BFAFIATgBBAEwAXwBNAE8ARABFAAAAAgAxAAAADgBUAEkAMgA4ADMAMwB4AAAAFgAAABgAdQBuAGk" "AZgBsAGEAcwBoAEYAaQBsAGUAAAAAAAAAFgB0AGEAcwBrAEYAcgBlAHEAVABvAGwAAAACADEAAAAS" "AHMAeQBzAEMAbABrAE0ASAB6AAAABgAxADUAMAAAABQAaQBuAHMAdABhAGwAbABEAGkAcgAAAAAAA" "AAOAGcAZQBuAE8AbgBsAHkAAAACADIAAAAcAGUAeAB0AE0AbwBkAGUAUwBjAGkAUABpAG4AcwAAAB" "AAWwAyADgALAAgADIAOQBdAAAAIgBlAHgAdABNAG8AZABlAEIAdQBmAGYAZQByAFMAaQB6AGUAAAA" "IADEAMAAwADAAAAASAGUAeAB0AEMAbABrAE0ASAB6AAAABAAzADAAAAAIAGMAaABpAHAAAAACADEA" "AAAWAGIAdQBpAGwAZABDAG8AbgBmAGkAZwAAAAIAMQAAAAoAYgBvAGEAcgBkAAAAAgAxAAAASgBVA" "FMARQBfAEQAQQBUAEEAXwBUAFkAUABFAFMAXwBGAE8AUgBfAFQAVQBOAEEAQgBMAEUAXwBQAEEAUg" "BBAE0ARQBUAEUAUgBTAAAAAgAxAAAADgBUAHoAMwBHAHAAaQBvAAAAAgAwAAAAEgBUAHoAMwBFAG4" "AYQBiAGwAZQAAAAIAMAAAAA4AVAB6ADIARwBwAGkAbwAAAAIAMAAAABIAVAB6ADIARQBuAGEAYgBs" "AGUAAAACADAAAAAOAFQAegAxAEcAcABpAG8AAAACADAAAAASAFQAegAxAEUAbgBhAGIAbABlAAAAA" "gAwAAAAGgBUAEEAUgBHAEUAVABfAEQARQBWAEkAQwBFAAAADAAwAHwAfAAwAHwAMAAAACAAUwBhAG" "0AcABsAGUAVABpAG0AZQBSAGUAbABUAG8AbAAAAAQAMQAwAAAAIgBMAGkAbgBrAGUAcgBDAG8AbQB" "tAGEAbgBkAEYAaQBsAGUAAAAAAAAAGgBFAFgAVABFAFIATgBBAEwAXwBNAE8ARABFAAAAAgAwAAAA" "DgBUAEkAMgA4ADAANgB4AAAAFwAAABIAdQBzAGUASQBuAHQATwBzAGMAAAACADEAAAAYAHUAbgBpA" "GYAbABhAHMAaABGAGkAbABlAAAAAAAAABYAdABhAHMAawBGAHIAZQBxAFQAbwBsAAAAAgAxAAAAEg" "BzAHkAcwBDAGwAawBNAEgAegAAAAQAOQAwAAAAFABpAG4AcwB0AGEAbABsAEQAaQByAAAAAAAAAA4" "AZwBlAG4ATwBuAGwAeQAAAAIAMgAAABwAZQB4AHQATQBvAGQAZQBTAGMAaQBQAGkAbgBzAAAADgBT" "AEMASQBfAEQAUwBQAAAAIgBlAHgAdABNAG8AZABlAEIAdQBmAGYAZQByAFMAaQB6AGUAAAAIADIAM" "AAwADAAAAASAGUAeAB0AEMAbABrAE0ASAB6AAAABAAyADAAAAAIAGMAaABpAHAAAAACADEAAAAWAG" "IAdQBpAGwAZABDAG8AbgBmAGkAZwAAAAIAMgAAAAoAYgBvAGEAcgBkAAAAAgAyAAAASgBVAFMARQB" "fAEQAQQBUAEEAXwBUAFkAUABFAFMAXwBGAE8AUgBfAFQAVQBOAEEAQgBMAEUAXwBQAEEAUgBBAE0A" "RQBUAEUAUgBTAAAAAgAxAAAADgBUAHoAMwBHAHAAaQBvAAAAAgAwAAAAEgBUAHoAMwBFAG4AYQBiA" "GwAZQAAAAIAMAAAAA4AVAB6ADIARwBwAGkAbwAAAAIAMAAAABIAVAB6ADIARQBuAGEAYgBsAGUAAA" "ACADAAAAAOAFQAegAxAEcAcABpAG8AAAACADAAAAASAFQAegAxAEUAbgBhAGIAbABlAAAAAgAwAAA" "AGgBUAEEAUgBHAEUAVABfAEQARQBWAEkAQwBFAAAADAAwAHwAfAAwAHwAMAAAACAAUwBhAG0AcABs" "AGUAVABpAG0AZQBSAGUAbABUAG8AbAAAAAQAMQAwAAAAIgBMAGkAbgBrAGUAcgBDAG8AbQBtAGEAb" "gBkAEYAaQBsAGUAAAAAAAAAGgBFAFgAVABFAFIATgBBAEwAXwBNAE8ARABFAAAAAgAxAAAAEABUAE" "kAMgA4ADAAMAA0AHgAAAAjAAAAEgB1AHMAZQBJAG4AdABPAHMAYwAAAAIAMQAAABgAdQBuAGkAZgB" "sAGEAcwBoAEYAaQBsAGUAAAAAAAAAFgB0AGEAcwBrAEYAcgBlAHEAVABvAGwAAAACADEAAAASAHMA" "eQBzAEMAbABrAE0ASAB6AAAABgAxADAAMAAAAAwAcABnAGEANwBSAGYAAAACADEAAAAQAHAAZwBhA" "DcARwBhAGkAbgAAAAIAMQAAAAwAcABnAGEANwBFAG4AAAACADAAAAAMAHAAZwBhADYAUgBmAAAAAg" "AxAAAAEABwAGcAYQA2AEcAYQBpAG4AAAACADEAAAAMAHAAZwBhADYARQBuAAAAAgAwAAAADABwAGc" "AYQA1AFIAZgAAAAIAMQAAABAAcABnAGEANQBHAGEAaQBuAAAAAgAxAAAADABwAGcAYQA1AEUAbgAA" "AAIAMAAAAAwAcABnAGEANABSAGYAAAACADEAAAAQAHAAZwBhADQARwBhAGkAbgAAAAIAMQAAAAwAc" "ABnAGEANABFAG4AAAACADAAAAAMAHAAZwBhADMAUgBmAAAAAgAxAAAAEABwAGcAYQAzAEcAYQBpAG" "4AAAACADEAAAAMAHAAZwBhADMARQBuAAAAAgAwAAAADABwAGcAYQAyAFIAZgAAAAIAMQAAABAAcAB" "nAGEAMgBHAGEAaQBuAAAAAgAxAAAADABwAGcAYQAyAEUAbgAAAAIAMAAAAAwAcABnAGEAMQBSAGYA" "AAACADEAAAAQAHAAZwBhADEARwBhAGkAbgAAAAIAMQAAAAwAcABnAGEAMQBFAG4AAAACADAAAAAUA" "GkAbgBzAHQAYQBsAGwARABpAHIAAAAAAAAADgBnAGUAbgBPAG4AbAB5AAAAAgAyAAAAHABlAHgAdA" "BNAG8AZABlAFMAYwBpAFAAaQBuAHMAAAAOAFMAQwBJAF8ARABTAFAAAAAiAGUAeAB0AE0AbwBkAGU" "AQgB1AGYAZgBlAHIAUwBpAHoAZQAAAAgAMgAwADAAMAAAABIAZQB4AHQAQwBsAGsATQBIAHoAAAAE" "ADIAMAAAAAgAYwBoAGkAcAAAAAIAMQAAABYAYgB1AGkAbABkAEMAbwBuAGYAaQBnAAAAAgAyAAAAC" "gBiAG8AYQByAGQAAAACADIAAAAaAFQAQQBSAEcARQBUAF8ARABFAFYASQBDAEUAAAA+ADAAfAAvAG" "QAZQB2AC8AYwB1AC4AdQBzAGIAbQBvAGQAZQBtAEMATAA0ADkAMQAwADMANQAxAHwAMAB8ADAAAAA" "aAEUAWABUAEUAUgBOAEEATABfAE0ATwBEAEUAAAACADE=" CodeGenFloatingPointFormat "1" ExternalModeSettings "AAAAfwAAAAAWUU1hcDxRU3RyaW5nLFFTdHJpbmc+AAAAAAcAAA" "AYAFQAcgBpAGcAZwBlAHIAVgBhAGwAdQBlAAAADAAzADcALgAwADMANwAAABgAVAByAGkAZwBnAGU" "AcgBEAGUAbABhAHkAAAAGAC0ANQA5AAAAHABUAHIAaQBnAGcAZQByAEMAaABhAG4AbgBlAGwAAAAE" "AC0AMQAAABYAUwBlAG4AcwBpAHQAaQB2AGkAdAB5AAAAAgAxAAAAFgBSAGUAZgByAGUAcwBoAFIAY" "QB0AGUAAAAEADIAMAAAABQATgB1AG0AUwBhAG0AcABsAGUAcwAAAAgAOAAxADkAMgAAABQARABlAG" "MAaQBtAGEAdABpAG8AbgAAAAIAMQ==" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Input Position [-60, -25] Direction left } Terminal { Type Input Position [-60, -45] Direction left } Terminal { Type Input Position [-60, -35] Direction left } Terminal { Type Input Position [-60, -15] Direction left } Terminal { Type Output Position [64, -15] Direction right } Terminal { Type Output Position [64, -30] Direction right } Schematic { Location [90, 252; 1086, 629] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type From Name "From3" Show off Position [505, 40] Direction right Flipped off Parameter { Variable "Tag" Value "I1q_Ref" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From4" Show off Position [505, 180] Direction right Flipped off Parameter { Variable "Tag" Value "I2q_Ref" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Subsystem Name "Current Controller1" Show on Position [600, 80] Direction up Flipped off Frame [-60, -50; 60, 50] LabelPosition [0, -53] LabelAlign down SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Input Position [-60, 25] Direction left } Terminal { Type Output Position [64, 0] Direction right } Terminal { Type Input Position [-60, -40] Direction left } Terminal { Type Input Position [-60, -25] Direction left } Terminal { Type Input Position [-60, -15] Direction left } Terminal { Type Input Position [-60, 0] Direction left } Terminal { Type Input Position [-60, 10] Direction left } Terminal { Type Input Position [30, 50] Direction down } Terminal { Type Input Position [40, 50] Direction down } Terminal { Type Input Position [-60, 40] Direction left } Terminal { Type Output Position [-10, 54] Direction down } Terminal { Type Output Position [0, 54] Direction down } Schematic { Location [703, 524; 1464, 1053] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Input Name "Vdc1" Show on Position [440, 200] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "d" Show on Position [695, 240] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "I1q_Ref" Show on Position [65, 290] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Constant Name "Constant" Show off Position [140, 200] Direction right Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Value" Value "0" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Sum Name "Subtract" Show off Position [180, 290] Direction up Flipped on Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "|+-" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Sum Name "Subtract1" Show off Position [180, 200] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "|+-" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type SignalMux Name "Mux" Show off Position [440, 240] Direction right Flipped off Parameter { Variable "Width" Value "2" Show off } } Component { Type Sum Name "Subtract2" Show off Position [335, 90] Direction up Flipped on Parameter { Variable "IconShape" Value "1" Show off } Parameter { Variable "Inputs" Value "++" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type From Name "From11" Show off Position [225, 75] Direction left Flipped on Parameter { Variable "Tag" Value "we" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Product Name "Product" Show off Position [275, 95] Direction up Flipped off Parameter { Variable "IconShape" Value "1" Show off } Parameter { Variable "Inputs" Value "2" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Sum Name "Subtract3" Show off Position [200, 100] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "|++" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "Gain1" Show off Position [145, 100] Direction left Flipped on Parameter { Variable "K" Value "-Lmq" Show on } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "Gain2" Show off Position [145, 140] Direction left Flipped on Parameter { Variable "K" Value "-Lq" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Sum Name "Subtract4" Show off Position [400, 200] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "++|" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Sum Name "Subtract5" Show off Position [335, 400] Direction up Flipped off Parameter { Variable "IconShape" Value "1" Show off } Parameter { Variable "Inputs" Value "++" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type From Name "From14" Show off Position [215, 425] Direction left Flipped on Parameter { Variable "Tag" Value "we" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Product Name "Product1" Show off Position [275, 395] Direction up Flipped on Parameter { Variable "IconShape" Value "1" Show off } Parameter { Variable "Inputs" Value "2" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Sum Name "Subtract6" Show off Position [215, 390] Direction up Flipped on Parameter { Variable "IconShape" Value "1" Show off } Parameter { Variable "Inputs" Value "+++" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "Gain4" Show off Position [145, 400] Direction right Flipped off Parameter { Variable "K" Value "Lmd" Show on } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "Gain5" Show off Position [145, 350] Direction left Flipped on Parameter { Variable "K" Value "Ld" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Sum Name "Subtract7" Show off Position [400, 290] Direction up Flipped on Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "++|" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Constant Name "Constant1" Show off Position [225, 350] Direction left Flipped off Frame [-35, -10; 35, 10] LabelPosition [0, -13] LabelAlign down Parameter { Variable "Value" Value "flux_magnet" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Gain Name "Gain10" Show off Position [145, 450] Direction right Flipped off Parameter { Variable "K" Value "Lmq/Lq" Show on } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "Gain11" Show off Position [145, 50] Direction left Flipped on Parameter { Variable "K" Value "Lmd/Ld" Show on } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Reference SrcComponent "Components/Control/Transformations/RRF->3ph" Name "RRF->3ph" Show off Position [520, 245] 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 Product Name "Divide" Show off Position [585, 240] Direction up Flipped on Parameter { Variable "IconShape" Value "1" Show off } Parameter { Variable "Inputs" Value "*/" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "Gain" Show off Position [530, 200] Direction right Flipped off Parameter { Variable "K" Value "0.5" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Subsystem Name "V*->d" Show on Position [640, 240] Direction up Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, -13] LabelAlign down SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Output Position [24, 0] Direction right } Terminal { Type Input Position [-20, 0] Direction left } Schematic { Location [710, 453; 991, 687] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Offset Name "Offset" Show off Position [115, 60] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Offset" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "Gain2" Show off Position [170, 60] Direction right Flipped off Parameter { Variable "K" Value "0.5" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Output Name "o" Show on Position [220, 60] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "i" Show on Position [60, 60] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Connection { Type Signal SrcComponent "Offset" SrcTerminal 2 DstComponent "Gain2" DstTerminal 1 } Connection { Type Signal SrcComponent "Gain2" SrcTerminal 2 DstComponent "o" DstTerminal 1 } Connection { Type Signal SrcComponent "i" SrcTerminal 1 DstComponent "Offset" DstTerminal 1 } } } Component { Type From Name "From" Show off Position [195, 245] Direction right Flipped off Parameter { Variable "Tag" Value "rst" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Reference SrcComponent "Components/Control/Continuous/Continuous PID\\nCo" "ntroller" Name "Continuous PID\nController" Show off Position [280, 200] Direction up Flipped off Frame [-40, -25; 40, 25] LabelPosition [0, 28] LabelAlign up Parameter { Variable "cont_type" Value "3" Show off } Parameter { Variable "par_source" Value "1" Show off } Parameter { Variable "kp" Value "kp_1d" Show off } Parameter { Variable "ki" Value "ki_1d" Show off } Parameter { Variable "kd" Value "1" Show off } Parameter { Variable "kf" Value "1" Show off } Parameter { Variable "ex_reset" Value "2" Show off } Parameter { Variable "x0_source" Value "1" Show off } Parameter { Variable "x0" Value "0" Show off } Parameter { Variable "ex_sat" Value "1" Show off } Parameter { Variable "sat_lim" Value "1" Show off } Parameter { Variable "up_limit" Value "inf" Show off } Parameter { Variable "low_limit" Value "-inf" Show off } Parameter { Variable "aw_method" Value "1" Show off } Parameter { Variable "kbc" Value "1" Show off } Terminal { Type Input Position [-40, 0] Direction left } Terminal { Type Output Position [44, 0] Direction right } Terminal { Type Input Position [-5, -25] Direction up } Terminal { Type Input Position [5, -25] Direction up } Terminal { Type Input Position [15, -25] Direction up } Terminal { Type Input Position [-40, -15] Direction left } Terminal { Type Input Position [-40, 10] Direction left } Terminal { Type Input Position [25, -25] Direction up } Terminal { Type Input Position [35, -25] Direction up } Terminal { Type Input Position [-40, -20] Direction left } Terminal { Type Input Position [-40, -10] Direction left } Terminal { Type Input Position [-40, 20] Direction left } } Component { Type Reference SrcComponent "Components/Control/Continuous/Continuous PID\\nCo" "ntroller" Name "Continuous PID\nController1" Show off Position [280, 290] Direction up Flipped on Frame [-40, -25; 40, 25] LabelPosition [0, -28] LabelAlign down Parameter { Variable "cont_type" Value "3" Show off } Parameter { Variable "par_source" Value "1" Show off } Parameter { Variable "kp" Value "kp_1q" Show off } Parameter { Variable "ki" Value "ki_1q" Show off } Parameter { Variable "kd" Value "1" Show off } Parameter { Variable "kf" Value "1" Show off } Parameter { Variable "ex_reset" Value "2" Show off } Parameter { Variable "x0_source" Value "1" Show off } Parameter { Variable "x0" Value "0" Show off } Parameter { Variable "ex_sat" Value "1" Show off } Parameter { Variable "sat_lim" Value "1" Show off } Parameter { Variable "up_limit" Value "inf" Show off } Parameter { Variable "low_limit" Value "-inf" Show off } Parameter { Variable "aw_method" Value "1" Show off } Parameter { Variable "kbc" Value "1" Show off } Terminal { Type Input Position [-40, 0] Direction left } Terminal { Type Output Position [44, 0] Direction right } Terminal { Type Input Position [-5, -25] Direction up } Terminal { Type Input Position [5, -25] Direction up } Terminal { Type Input Position [15, -25] Direction up } Terminal { Type Input Position [-40, -15] Direction left } Terminal { Type Input Position [-40, 10] Direction left } Terminal { Type Input Position [25, -25] Direction up } Terminal { Type Input Position [35, -25] Direction up } Terminal { Type Input Position [-40, -20] Direction left } Terminal { Type Input Position [-40, -10] Direction left } Terminal { Type Input Position [-40, 20] Direction left } } Component { Type InitialCondition Name "IC1" Show off Position [485, 200] Direction right Flipped off Frame [-15, -15; 15, 15] LabelPosition [0, 18] LabelAlign up Parameter { Variable "InitialValue" Value "Vdc" Show off } } Component { Type Input Name "I1d" Show on Position [65, 230] Direction left Flipped on Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "I1q" Show on Position [65, 260] Direction right Flipped off Parameter { Variable "Index" Value "5" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "I2d" Show on Position [65, 400] Direction right Flipped off Parameter { Variable "Index" Value "6" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "I2q" Show on Position [65, 100] Direction right Flipped off Parameter { Variable "Index" Value "7" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "U2d_s" Show on Position [65, 50] Direction right Flipped off Parameter { Variable "Index" Value "8" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "U2q_s" Show on Position [65, 450] Direction left Flipped on Parameter { Variable "Index" Value "9" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "theta" Show on Position [470, 250] Direction right Flipped off Parameter { Variable "Index" Value "10" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "U1d_s" Show on Position [365, 220] Direction right Flipped off Parameter { Variable "Index" Value "11" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "U1q_s" Show on Position [365, 270] Direction left Flipped on Parameter { Variable "Index" Value "12" Show on } Parameter { Variable "Width" Value "-1" Show off } } Connection { Type Signal SrcComponent "Constant" SrcTerminal 1 DstComponent "Subtract1" DstTerminal 2 } Connection { Type Signal SrcComponent "theta" SrcTerminal 1 DstComponent "RRF->3ph" DstTerminal 3 } Connection { Type Signal SrcComponent "From11" SrcTerminal 1 Points [240, 75; 240, 90] DstComponent "Product" DstTerminal 2 } Connection { Type Signal SrcComponent "Subtract3" SrcTerminal 1 DstComponent "Product" DstTerminal 3 } Connection { Type Signal SrcComponent "Gain1" SrcTerminal 2 DstComponent "Subtract3" DstTerminal 2 } Connection { Type Signal SrcComponent "Gain2" SrcTerminal 2 Points [200, 140] DstComponent "Subtract3" DstTerminal 3 } Connection { Type Signal SrcComponent "Subtract2" SrcTerminal 1 Points [400, 90] DstComponent "Subtract4" DstTerminal 2 } Connection { Type Signal SrcComponent "Subtract6" SrcTerminal 1 DstComponent "Product1" DstTerminal 3 } Connection { Type Signal SrcComponent "Gain4" SrcTerminal 2 DstComponent "Subtract6" DstTerminal 2 } Connection { Type Signal SrcComponent "Gain5" SrcTerminal 2 Points [170, 350; 170, 390] DstComponent "Subtract6" DstTerminal 3 } Connection { Type Signal SrcComponent "From14" SrcTerminal 1 Points [240, 425; 240, 400] DstComponent "Product1" DstTerminal 2 } Connection { Type Signal SrcComponent "Product1" SrcTerminal 1 DstComponent "Subtract5" DstTerminal 2 } Connection { Type Signal SrcComponent "Subtract4" SrcTerminal 1 Points [420, 200; 420, 235] DstComponent "Mux" DstTerminal 2 } Connection { Type Signal SrcComponent "Constant1" SrcTerminal 1 Points [180, 350; 180, 380] DstComponent "Subtract6" DstTerminal 4 } Connection { Type Signal SrcComponent "RRF->3ph" SrcTerminal 2 DstComponent "Divide" DstTerminal 2 } Connection { Type Signal SrcComponent "Gain" SrcTerminal 2 Points [550, 235] DstComponent "Divide" DstTerminal 3 } Connection { Type Signal SrcComponent "Divide" SrcTerminal 1 DstComponent "V*->d" DstTerminal 2 } Connection { Type Signal SrcComponent "V*->d" SrcTerminal 1 DstComponent "d" DstTerminal 1 } Connection { Type Signal SrcComponent "Mux" SrcTerminal 1 DstComponent "RRF->3ph" DstTerminal 1 } Connection { Type Signal SrcComponent "Continuous PID\nController" SrcTerminal 2 Points [330, 200] Branch { Points [330, 220] DstComponent "U1d_s" DstTerminal 1 } Branch { DstComponent "Subtract4" DstTerminal 3 } } Connection { Type Signal SrcComponent "Subtract1" SrcTerminal 1 DstComponent "Continuous PID\nController" DstTerminal 1 } Connection { Type Signal SrcComponent "Subtract" SrcTerminal 1 DstComponent "Continuous PID\nController1" DstTerminal 1 } Connection { Type Signal SrcComponent "From" SrcTerminal 1 Points [220, 245] Branch { Points [220, 210] DstComponent "Continuous PID\nController" DstTerminal 7 } Branch { Points [220, 280] DstComponent "Continuous PID\nController1" DstTerminal 7 } } Connection { Type Signal SrcComponent "Vdc1" SrcTerminal 1 DstComponent "IC1" DstTerminal 1 } Connection { Type Signal SrcComponent "IC1" SrcTerminal 2 DstComponent "Gain" DstTerminal 1 } Connection { Type Signal SrcComponent "I1d" SrcTerminal 1 Points [100, 230] Branch { Points [180, 230] DstComponent "Subtract1" DstTerminal 3 } Branch { Points [100, 350] DstComponent "Gain5" DstTerminal 1 } } Connection { Type Signal SrcComponent "I1q_Ref" SrcTerminal 1 DstComponent "Subtract" DstTerminal 2 } Connection { Type Signal SrcComponent "I1q" SrcTerminal 1 Points [110, 260] Branch { Points [180, 260] DstComponent "Subtract" DstTerminal 3 } Branch { Points [110, 140] DstComponent "Gain2" DstTerminal 1 } } Connection { Type Signal SrcComponent "I2d" SrcTerminal 1 DstComponent "Gain4" DstTerminal 1 } Connection { Type Signal SrcComponent "I2q" SrcTerminal 1 DstComponent "Gain1" DstTerminal 1 } Connection { Type Signal SrcComponent "U2d_s" SrcTerminal 1 DstComponent "Gain11" DstTerminal 1 } Connection { Type Signal SrcComponent "U2q_s" SrcTerminal 1 DstComponent "Gain10" DstTerminal 1 } Connection { Type Signal SrcComponent "Gain11" SrcTerminal 2 Points [300, 50; 300, 85] DstComponent "Subtract2" DstTerminal 3 } Connection { Type Signal SrcComponent "Product" SrcTerminal 1 DstComponent "Subtract2" DstTerminal 2 } Connection { Type Signal SrcComponent "Gain10" SrcTerminal 2 Points [300, 450; 300, 405] DstComponent "Subtract5" DstTerminal 3 } Connection { Type Signal SrcComponent "Continuous PID\nController1" SrcTerminal 2 Points [330, 290] Branch { Points [330, 270] DstComponent "U1q_s" DstTerminal 1 } Branch { DstComponent "Subtract7" DstTerminal 3 } } Connection { Type Signal SrcComponent "Subtract7" SrcTerminal 1 Points [420, 290; 420, 245] DstComponent "Mux" DstTerminal 3 } Connection { Type Signal SrcComponent "Subtract5" SrcTerminal 1 Points [400, 400] DstComponent "Subtract7" DstTerminal 2 } } } Component { Type From Name "From5" Show off Position [515, 105] Direction right Flipped off Parameter { Variable "Tag" Value "Vdc1" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From8" Show off Position [515, 245] Direction right Flipped off Parameter { Variable "Tag" Value "Vdc2" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Subsystem Name "Current Controller2" Show on Position [600, 225] Direction up Flipped off Frame [-60, -55; 60, 55] LabelPosition [0, 58] LabelAlign up SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Input Position [-60, 20] Direction left } Terminal { Type Output Position [64, -5] Direction right } Terminal { Type Input Position [-60, -45] Direction left } Terminal { Type Input Position [-60, -30] Direction left } Terminal { Type Input Position [-60, -20] Direction left } Terminal { Type Input Position [-60, -5] Direction left } Terminal { Type Input Position [-60, 5] Direction left } Terminal { Type Input Position [-10, -55] Direction up } Terminal { Type Input Position [0, -55] Direction up } Terminal { Type Input Position [-60, 35] Direction left } Terminal { Type Output Position [30, -59] Direction up } Terminal { Type Output Position [40, -59] Direction up } Schematic { Location [1155, 453; 1920, 973] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Input Name "Vdc2" Show on Position [440, 205] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "d" Show on Position [695, 245] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "I2q_Ref" Show on Position [65, 295] Direction left Flipped on Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Constant Name "Constant2" Show off Position [555, 310] Direction right Flipped on Frame [-15, -10; 15, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Value" Value "Zeta" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Sum Name "Subtract" Show off Position [520, 280] Direction down Flipped on Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "|+-" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Input Name "I2d" Show on Position [65, 235] Direction left Flipped on Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "I2q" Show on Position [65, 265] Direction left Flipped on Parameter { Variable "Index" Value "5" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "I1d" Show on Position [65, 405] Direction right Flipped off Parameter { Variable "Index" Value "6" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "I1q" Show on Position [65, 105] Direction right Flipped off Parameter { Variable "Index" Value "7" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "U1d_s" Show on Position [65, 55] Direction right Flipped off Parameter { Variable "Index" Value "8" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "U1q_s" Show on Position [65, 455] Direction left Flipped on Parameter { Variable "Index" Value "9" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "theta" Show on Position [585, 280] Direction left Flipped off Parameter { Variable "Index" Value "10" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Constant Name "Constant" Show off Position [140, 205] Direction right Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Value" Value "0" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Sum Name "Subtract1" Show off Position [180, 295] Direction up Flipped on Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "|+-" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Sum Name "Subtract2" Show off Position [180, 205] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "|+-" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type SignalMux Name "Mux" Show off Position [440, 245] Direction right Flipped off Parameter { Variable "Width" Value "2" Show off } } Component { Type Sum Name "Subtract3" Show off Position [335, 95] Direction up Flipped on Parameter { Variable "IconShape" Value "1" Show off } Parameter { Variable "Inputs" Value "++" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type From Name "From11" Show off Position [225, 80] Direction left Flipped on Parameter { Variable "Tag" Value "we" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Product Name "Product" Show off Position [275, 100] Direction up Flipped off Parameter { Variable "IconShape" Value "1" Show off } Parameter { Variable "Inputs" Value "2" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Sum Name "Subtract4" Show off Position [200, 105] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "|++" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "Gain1" Show off Position [145, 105] Direction left Flipped on Parameter { Variable "K" Value "-Lmq" Show on } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "Gain2" Show off Position [145, 145] Direction left Flipped on Parameter { Variable "K" Value "-Lq" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Sum Name "Subtract5" Show off Position [400, 205] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "++|" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Sum Name "Subtract6" Show off Position [335, 405] Direction up Flipped off Parameter { Variable "IconShape" Value "1" Show off } Parameter { Variable "Inputs" Value "++" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type From Name "From14" Show off Position [215, 430] Direction left Flipped on Parameter { Variable "Tag" Value "we" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Product Name "Product1" Show off Position [275, 400] Direction up Flipped on Parameter { Variable "IconShape" Value "1" Show off } Parameter { Variable "Inputs" Value "2" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Sum Name "Subtract7" Show off Position [215, 395] Direction up Flipped on Parameter { Variable "IconShape" Value "1" Show off } Parameter { Variable "Inputs" Value "+++" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "Gain4" Show off Position [145, 405] Direction right Flipped off Parameter { Variable "K" Value "Lmd" Show on } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "Gain5" Show off Position [145, 355] Direction left Flipped on Parameter { Variable "K" Value "Ld" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Sum Name "Subtract8" Show off Position [400, 295] Direction up Flipped on Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "++|" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Constant Name "Constant1" Show off Position [225, 355] Direction left Flipped off Frame [-35, -10; 35, 10] LabelPosition [0, -13] LabelAlign down Parameter { Variable "Value" Value "flux_magnet" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Gain Name "Gain10" Show off Position [145, 455] Direction right Flipped off Parameter { Variable "K" Value "Lmq/Lq" Show on } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "Gain11" Show off Position [145, 55] Direction left Flipped on Parameter { Variable "K" Value "Lmd/Ld" Show on } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Reference SrcComponent "Components/Control/Transformations/RRF->3ph" Name "RRF->3ph" Show off Position [520, 250] 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 Product Name "Divide" Show off Position [585, 245] Direction up Flipped on Parameter { Variable "IconShape" Value "1" Show off } Parameter { Variable "Inputs" Value "*/" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "Gain" Show off Position [530, 205] Direction right Flipped off Parameter { Variable "K" Value "0.5" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Subsystem Name "V*->d" Show on Position [640, 245] Direction up Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, -13] LabelAlign down SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Output Position [24, 0] Direction right } Terminal { Type Input Position [-20, 0] Direction left } Schematic { Location [710, 453; 991, 687] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Offset Name "Offset" Show off Position [115, 60] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Offset" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "Gain2" Show off Position [170, 60] Direction right Flipped off Parameter { Variable "K" Value "0.5" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Output Name "o" Show on Position [220, 60] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "i" Show on Position [60, 60] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Connection { Type Signal SrcComponent "Offset" SrcTerminal 2 DstComponent "Gain2" DstTerminal 1 } Connection { Type Signal SrcComponent "Gain2" SrcTerminal 2 DstComponent "o" DstTerminal 1 } Connection { Type Signal SrcComponent "i" SrcTerminal 1 DstComponent "Offset" DstTerminal 1 } } } Component { Type From Name "From" Show off Position [195, 250] Direction right Flipped off Parameter { Variable "Tag" Value "rst" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Reference SrcComponent "Components/Control/Continuous/Continuous PID\\nCo" "ntroller" Name "Continuous PID\nController" Show off Position [280, 205] Direction up Flipped off Frame [-40, -25; 40, 25] LabelPosition [0, 28] LabelAlign up Parameter { Variable "cont_type" Value "3" Show off } Parameter { Variable "par_source" Value "1" Show off } Parameter { Variable "kp" Value "kp_1d" Show off } Parameter { Variable "ki" Value "ki_1d" Show off } Parameter { Variable "kd" Value "1" Show off } Parameter { Variable "kf" Value "1" Show off } Parameter { Variable "ex_reset" Value "2" Show off } Parameter { Variable "x0_source" Value "1" Show off } Parameter { Variable "x0" Value "0" Show off } Parameter { Variable "ex_sat" Value "1" Show off } Parameter { Variable "sat_lim" Value "1" Show off } Parameter { Variable "up_limit" Value "inf" Show off } Parameter { Variable "low_limit" Value "-inf" Show off } Parameter { Variable "aw_method" Value "1" Show off } Parameter { Variable "kbc" Value "1" Show off } Terminal { Type Input Position [-40, 0] Direction left } Terminal { Type Output Position [44, 0] Direction right } Terminal { Type Input Position [-5, -25] Direction up } Terminal { Type Input Position [5, -25] Direction up } Terminal { Type Input Position [15, -25] Direction up } Terminal { Type Input Position [-40, -15] Direction left } Terminal { Type Input Position [-40, 10] Direction left } Terminal { Type Input Position [25, -25] Direction up } Terminal { Type Input Position [35, -25] Direction up } Terminal { Type Input Position [-40, -20] Direction left } Terminal { Type Input Position [-40, -10] Direction left } Terminal { Type Input Position [-40, 20] Direction left } } Component { Type Reference SrcComponent "Components/Control/Continuous/Continuous PID\\nCo" "ntroller" Name "Continuous PID\nController1" Show off Position [280, 295] Direction up Flipped on Frame [-40, -25; 40, 25] LabelPosition [0, -28] LabelAlign down Parameter { Variable "cont_type" Value "3" Show off } Parameter { Variable "par_source" Value "1" Show off } Parameter { Variable "kp" Value "kp_1q" Show off } Parameter { Variable "ki" Value "ki_1q" Show off } Parameter { Variable "kd" Value "1" Show off } Parameter { Variable "kf" Value "1" Show off } Parameter { Variable "ex_reset" Value "2" Show off } Parameter { Variable "x0_source" Value "1" Show off } Parameter { Variable "x0" Value "0" Show off } Parameter { Variable "ex_sat" Value "1" Show off } Parameter { Variable "sat_lim" Value "1" Show off } Parameter { Variable "up_limit" Value "inf" Show off } Parameter { Variable "low_limit" Value "-inf" Show off } Parameter { Variable "aw_method" Value "1" Show off } Parameter { Variable "kbc" Value "1" Show off } Terminal { Type Input Position [-40, 0] Direction left } Terminal { Type Output Position [44, 0] Direction right } Terminal { Type Input Position [-5, -25] Direction up } Terminal { Type Input Position [5, -25] Direction up } Terminal { Type Input Position [15, -25] Direction up } Terminal { Type Input Position [-40, -15] Direction left } Terminal { Type Input Position [-40, 10] Direction left } Terminal { Type Input Position [25, -25] Direction up } Terminal { Type Input Position [35, -25] Direction up } Terminal { Type Input Position [-40, -20] Direction left } Terminal { Type Input Position [-40, -10] Direction left } Terminal { Type Input Position [-40, 20] Direction left } } Component { Type InitialCondition Name "IC1" Show off Position [485, 205] Direction right Flipped off Frame [-15, -15; 15, 15] LabelPosition [0, 18] LabelAlign up Parameter { Variable "InitialValue" Value "Vdc" Show off } } Component { Type Output Name "U2d_s" Show on Position [365, 225] Direction right Flipped off Parameter { Variable "Index" Value "11" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "U2q_s" Show on Position [365, 275] Direction left Flipped on Parameter { Variable "Index" Value "12" Show on } Parameter { Variable "Width" Value "-1" Show off } } Connection { Type Signal SrcComponent "Constant2" SrcTerminal 1 Points [520, 310] DstComponent "Subtract" DstTerminal 3 } Connection { Type Signal SrcComponent "theta" SrcTerminal 1 DstComponent "Subtract" DstTerminal 2 } Connection { Type Signal SrcComponent "Constant" SrcTerminal 1 DstComponent "Subtract2" DstTerminal 2 } Connection { Type Signal SrcComponent "From11" SrcTerminal 1 Points [240, 80; 240, 95] DstComponent "Product" DstTerminal 2 } Connection { Type Signal SrcComponent "Subtract4" SrcTerminal 1 DstComponent "Product" DstTerminal 3 } Connection { Type Signal SrcComponent "Gain1" SrcTerminal 2 DstComponent "Subtract4" DstTerminal 2 } Connection { Type Signal SrcComponent "Gain2" SrcTerminal 2 Points [200, 145] DstComponent "Subtract4" DstTerminal 3 } Connection { Type Signal SrcComponent "Subtract3" SrcTerminal 1 Points [400, 95] DstComponent "Subtract5" DstTerminal 2 } Connection { Type Signal SrcComponent "Subtract7" SrcTerminal 1 DstComponent "Product1" DstTerminal 3 } Connection { Type Signal SrcComponent "Gain4" SrcTerminal 2 DstComponent "Subtract7" DstTerminal 2 } Connection { Type Signal SrcComponent "Gain5" SrcTerminal 2 Points [170, 355; 170, 395] DstComponent "Subtract7" DstTerminal 3 } Connection { Type Signal SrcComponent "From14" SrcTerminal 1 Points [240, 430; 240, 405] DstComponent "Product1" DstTerminal 2 } Connection { Type Signal SrcComponent "Product1" SrcTerminal 1 DstComponent "Subtract6" DstTerminal 2 } Connection { Type Signal SrcComponent "Subtract5" SrcTerminal 1 Points [420, 205; 420, 240] DstComponent "Mux" DstTerminal 2 } Connection { Type Signal SrcComponent "Constant1" SrcTerminal 1 Points [180, 355; 180, 385] DstComponent "Subtract7" DstTerminal 4 } Connection { Type Signal SrcComponent "RRF->3ph" SrcTerminal 2 DstComponent "Divide" DstTerminal 2 } Connection { Type Signal SrcComponent "Gain" SrcTerminal 2 Points [550, 240] DstComponent "Divide" DstTerminal 3 } Connection { Type Signal SrcComponent "Divide" SrcTerminal 1 DstComponent "V*->d" DstTerminal 2 } Connection { Type Signal SrcComponent "Mux" SrcTerminal 1 DstComponent "RRF->3ph" DstTerminal 1 } Connection { Type Signal SrcComponent "Continuous PID\nController" SrcTerminal 2 Points [330, 205] Branch { Points [330, 225] DstComponent "U2d_s" DstTerminal 1 } Branch { DstComponent "Subtract5" DstTerminal 3 } } Connection { Type Signal SrcComponent "Subtract2" SrcTerminal 1 DstComponent "Continuous PID\nController" DstTerminal 1 } Connection { Type Signal SrcComponent "Subtract1" SrcTerminal 1 DstComponent "Continuous PID\nController1" DstTerminal 1 } Connection { Type Signal SrcComponent "From" SrcTerminal 1 Points [220, 250] Branch { Points [220, 215] DstComponent "Continuous PID\nController" DstTerminal 7 } Branch { Points [220, 285] DstComponent "Continuous PID\nController1" DstTerminal 7 } } Connection { Type Signal SrcComponent "IC1" SrcTerminal 2 DstComponent "Gain" DstTerminal 1 } Connection { Type Signal SrcComponent "I2d" SrcTerminal 1 Points [100, 235] Branch { Points [180, 235] DstComponent "Subtract2" DstTerminal 3 } Branch { Points [100, 355] DstComponent "Gain5" DstTerminal 1 } } Connection { Type Signal SrcComponent "I2q_Ref" SrcTerminal 1 DstComponent "Subtract1" DstTerminal 2 } Connection { Type Signal SrcComponent "I2q" SrcTerminal 1 Points [110, 265] Branch { Points [180, 265] DstComponent "Subtract1" DstTerminal 3 } Branch { Points [110, 145] DstComponent "Gain2" DstTerminal 1 } } Connection { Type Signal SrcComponent "I1d" SrcTerminal 1 DstComponent "Gain4" DstTerminal 1 } Connection { Type Signal SrcComponent "I1q" SrcTerminal 1 DstComponent "Gain1" DstTerminal 1 } Connection { Type Signal SrcComponent "U1d_s" SrcTerminal 1 DstComponent "Gain11" DstTerminal 1 } Connection { Type Signal SrcComponent "U1q_s" SrcTerminal 1 DstComponent "Gain10" DstTerminal 1 } Connection { Type Signal SrcComponent "Gain11" SrcTerminal 2 Points [300, 55; 300, 90] DstComponent "Subtract3" DstTerminal 3 } Connection { Type Signal SrcComponent "Product" SrcTerminal 1 DstComponent "Subtract3" DstTerminal 2 } Connection { Type Signal SrcComponent "Gain10" SrcTerminal 2 Points [300, 455; 300, 410] DstComponent "Subtract6" DstTerminal 3 } Connection { Type Signal SrcComponent "Continuous PID\nController1" SrcTerminal 2 Points [330, 295] Branch { Points [330, 275] DstComponent "U2q_s" DstTerminal 1 } Branch { DstComponent "Subtract8" DstTerminal 3 } } Connection { Type Signal SrcComponent "Subtract8" SrcTerminal 1 Points [420, 295; 420, 250] DstComponent "Mux" DstTerminal 3 } Connection { Type Signal SrcComponent "Subtract6" SrcTerminal 1 Points [400, 405] DstComponent "Subtract8" DstTerminal 2 } Connection { Type Signal SrcComponent "Vdc2" SrcTerminal 1 DstComponent "IC1" DstTerminal 1 } Connection { Type Signal SrcComponent "Subtract" SrcTerminal 1 Points [490, 280] DstComponent "RRF->3ph" DstTerminal 3 } Connection { Type Signal SrcComponent "V*->d" SrcTerminal 1 DstComponent "d" DstTerminal 1 } } } Component { Type Goto Name "Goto4" Show off Position [175, 85] Direction right Flipped off Parameter { Variable "Tag" Value "Vdc1" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Goto Name "Goto5" Show off Position [175, 95] Direction right Flipped off Parameter { Variable "Tag" Value "Vdc2" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Scope Name "Scope1" Show on Position [425, 220] Direction up Flipped off Location [812, 468; 1385, 820] State "AAAA/wAAAAD9AAAAAgAAAAEAAAC0AAABRPwCAAAAA/sAAAAQAFoAb" "wBvAG0AQQByAGUAYQAAAAAA/////wAAAFwA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA" "AA/////wAAAGYA////+wAAAAwAVAByAGEAYwBlAHMAAAAAHAAAAUQAAABmAP///wAAAAMAAAAAAAA" "AAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABCAP///wAAAj0AAAFE" "AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA" "AAAAAAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL/gMAAAAJA" "AAABgAAAGQAAAAHAAAAZAAAAAQAAABkAAAABQAAAGQAAAACAAAAZAAAAAMAAABkAAAAAQAAAGQAAA" "AIAAAAZAAAAAkAAABkAAABTgAAAAsBAAABAAAAAAAAAAAAAAAAZP////8AAACBAAAAAAAAAAsAAAE" "7AAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAA" "AAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAA" "AAAAAATAAAAAQAAAAAAAAPoAAAAABM=" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "QAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" Axes "2" TimeRange "0" ScrollingMode "1" SingleTimeAxis "1" Open "1" Ts "-1" SampleLimit "0" XAxisLabel "Time (s)" ShowLegend "1" Axis { Name "Inverter 1 q-axis current reference vs measurement" AutoScale 0 MinValue 0 MaxValue 16 Signals {} SignalTypes [ ] AxisLabel "A" Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Inverter 2 q-axis current reference vs measurement" AutoScale 0 MinValue -16 MaxValue 16 Signals {} SignalTypes [ ] AxisLabel "A" Untangle 0 KeepBaseline off BaselineValue 0 } Fourier { SingleXAxis on AxisLabel "Frequency" Scaling 0 PhaseDisplay 0 ShowFourierLegend off 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 SignalMux Name "Mux1" Show off Position [380, 205] Direction right Flipped off Parameter { Variable "Width" Value "2" Show off } } Component { Type From Name "From12" Show off Position [360, 210] Direction right Flipped off Parameter { Variable "Tag" Value "I1q" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type SignalMux Name "Mux2" Show off Position [380, 235] Direction left Flipped on Parameter { Variable "Width" Value "2" Show off } } Component { Type From Name "From13" Show off Position [360, 230] Direction left Flipped on Parameter { Variable "Tag" Value "I2q" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Goto Name "Goto9" Show off Position [215, 165] Direction right Flipped off Parameter { Variable "Tag" Value "we" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Goto Name "Goto6" Show off Position [120, 320] Direction right Flipped off Parameter { Variable "Tag" Value "rst" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Subsystem Name "Speed Controller" Show on Position [155, 235] Direction up Flipped off Frame [-45, -20; 45, 20] LabelPosition [0, 23] LabelAlign up SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Input Position [-45, -10] Direction left } Terminal { Type Input Position [-45, 10] Direction left } Terminal { Type Output Position [49, -10] Direction right } Terminal { Type Output Position [49, 10] Direction right } Schematic { Location [1309, 542; 1879, 777] ZoomFactor 1.00225 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Input Name "we" Show on Position [25, 95] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "RPM*" Show on Position [25, 130] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Sum Name "Subtract1" Show off Position [450, 120] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "-+|" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Output Name "I1q_Ref" Show on Position [515, 70] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "I2q_Ref" Show on Position [515, 120] Direction right Flipped off Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type TransferFunction Name "Current distribution\nLow-pass Filter" Show on Position [400, 70] Direction left Flipped on Frame [-30, -15; 30, 15] LabelPosition [0, -18] LabelAlign down Parameter { Variable "Numerator" Value "[2*pi*0.2]" Show off } Parameter { Variable "Denominator" Value "[1 2*pi*0.2]" Show off } Parameter { Variable "X0" Value "0" Show off } } Component { Type From Name "From" Show off Position [180, 130] Direction up Flipped off Parameter { Variable "Tag" Value "rst" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Gain Name "we->wm" Show on Position [85, 95] Direction left Flipped on Parameter { Variable "K" Value "1/p" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Sum Name "Subtract" Show off Position [150, 95] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "|-+" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Reference SrcComponent "Components/Control/Continuous/Continuous PID\\nCo" "ntroller" Name "Continuous PID\nController" Show off Position [235, 95] Direction up Flipped off Frame [-40, -25; 40, 25] LabelPosition [0, 28] LabelAlign up Parameter { Variable "cont_type" Value "3" Show off } Parameter { Variable "par_source" Value "1" Show off } Parameter { Variable "kp" Value "Kp_w" Show off } Parameter { Variable "ki" Value "Ki_w" Show off } Parameter { Variable "kd" Value "1" Show off } Parameter { Variable "kf" Value "1" Show off } Parameter { Variable "ex_reset" Value "2" Show off } Parameter { Variable "x0_source" Value "1" Show off } Parameter { Variable "x0" Value "0" Show off } Parameter { Variable "ex_sat" Value "1" Show off } Parameter { Variable "sat_lim" Value "1" Show off } Parameter { Variable "up_limit" Value "15*3/2*p*flux_magnet" Show off } Parameter { Variable "low_limit" Value "-15*3/2*p*flux_magnet" Show off } Parameter { Variable "aw_method" Value "3" Show off } Parameter { Variable "kbc" Value "Ki_w/Kp_w" Show off } Terminal { Type Input Position [-40, 0] Direction left } Terminal { Type Output Position [44, 0] Direction right } Terminal { Type Input Position [-5, -25] Direction up } Terminal { Type Input Position [5, -25] Direction up } Terminal { Type Input Position [15, -25] Direction up } Terminal { Type Input Position [-40, -15] Direction left } Terminal { Type Input Position [-40, 10] Direction left } Terminal { Type Input Position [25, -25] Direction up } Terminal { Type Input Position [35, -25] Direction up } Terminal { Type Input Position [-40, -20] Direction left } Terminal { Type Input Position [-40, -10] Direction left } Terminal { Type Input Position [-40, 20] Direction left } } Component { Type Gain Name "Gain" Show off Position [110, 130] Direction right Flipped off Parameter { Variable "K" Value "pi/30" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Gain Name "Gain1" Show off Position [310, 95] Direction right Flipped off Parameter { Variable "K" Value "1/(3/2*p*flux_magnet)" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "10" Show off } } Connection { Type Signal SrcComponent "Subtract1" SrcTerminal 1 DstComponent "I2q_Ref" DstTerminal 1 } Connection { Type Signal SrcComponent "Current distribution\nLow-pass Filter" SrcTerminal 2 Points [450, 70] Branch { DstComponent "I1q_Ref" DstTerminal 1 } Branch { DstComponent "Subtract1" DstTerminal 2 } } Connection { Type Signal SrcComponent "Gain" SrcTerminal 2 Points [150, 130] DstComponent "Subtract" DstTerminal 3 } Connection { Type Signal SrcComponent "Subtract" SrcTerminal 1 DstComponent "Continuous PID\nController" DstTerminal 1 } Connection { Type Signal SrcComponent "we->wm" SrcTerminal 2 DstComponent "Subtract" DstTerminal 2 } Connection { Type Signal SrcComponent "Continuous PID\nController" SrcTerminal 2 DstComponent "Gain1" DstTerminal 1 } Connection { Type Signal SrcComponent "we" SrcTerminal 1 DstComponent "we->wm" DstTerminal 1 } Connection { Type Signal SrcComponent "RPM*" SrcTerminal 1 DstComponent "Gain" DstTerminal 1 } Connection { Type Signal SrcComponent "From" SrcTerminal 1 DstComponent "Continuous PID\nController" DstTerminal 7 } Connection { Type Signal SrcComponent "Gain1" SrcTerminal 2 Points [340, 95] Branch { Points [340, 120] DstComponent "Subtract1" DstTerminal 3 } Branch { Points [340, 70] DstComponent "Current distribution\nLow-pass Filter" DstTerminal 1 } } } } Component { Type From Name "From6" Show off Position [75, 225] Direction right Flipped off Parameter { Variable "Tag" Value "we" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Constant Name "RPM*" Show on Position [60, 245] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Value" Value "300" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Goto Name "Goto7" Show off Position [225, 225] Direction right Flipped off Parameter { Variable "Tag" Value "I1q_Ref" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Goto Name "Goto10" Show off Position [225, 245] Direction right Flipped off Parameter { Variable "Tag" Value "I2q_Ref" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From14" Show off Position [335, 240] Direction left Flipped on Parameter { Variable "Tag" Value "I2q_Ref" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From15" Show off Position [335, 200] Direction left Flipped on Parameter { Variable "Tag" Value "I1q_Ref" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Subsystem Name "abc1 - dq1\nTransformation" Show on Position [330, 60] Direction up Flipped off Frame [-70, -20; 70, 20] LabelPosition [0, 0] SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskDisplayLang "2" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Input Position [-70, -10] Direction left } Terminal { Type Output Position [74, -10] Direction right } Terminal { Type Output Position [74, 10] Direction right } Terminal { Type Input Position [-70, 10] Direction left } Schematic { Location [0, 492; 374, 657] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Reference SrcComponent "Components/Control/Transformations/3ph->RRF" Name "3ph->RRF2" Show off Position [245, 95] 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 "Demux1" Show off Position [280, 95] Direction right Flipped on Parameter { Variable "Width" Value "2" Show off } } Component { Type Sum Name "Sum1" Show off Position [110, 70] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "+" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Gain Name "Gain" Show off Position [155, 70] Direction right Flipped off Parameter { Variable "K" Value "-1" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type SignalMux Name "Mux" Show off Position [190, 65] Direction right Flipped off Parameter { Variable "Width" Value "[2 1]" Show off } } Component { Type Input Name "Is1" Show on Position [50, 70] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "I1d" Show on Position [325, 85] Direction left Flipped on Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "I1q" Show on Position [325, 105] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "theta" Show on Position [50, 100] Direction right Flipped off Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "Width" Value "-1" Show off } } Connection { Type Signal SrcComponent "Is1" SrcTerminal 1 Points [80, 70] Branch { DstComponent "Sum1" DstTerminal 2 } Branch { Points [80, 50; 175, 50] DstComponent "Mux" DstTerminal 2 } } Connection { Type Signal SrcComponent "Mux" SrcTerminal 1 Points [210, 65; 210, 90] DstComponent "3ph->RRF2" DstTerminal 1 } Connection { Type Signal SrcComponent "3ph->RRF2" SrcTerminal 2 DstComponent "Demux1" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux1" SrcTerminal 2 Points [290, 90; 290, 85] DstComponent "I1d" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux1" SrcTerminal 3 Points [290, 100; 290, 105] DstComponent "I1q" DstTerminal 1 } Connection { Type Signal SrcComponent "Sum1" SrcTerminal 1 DstComponent "Gain" DstTerminal 1 } Connection { Type Signal SrcComponent "Gain" SrcTerminal 2 DstComponent "Mux" DstTerminal 3 } Connection { Type Signal SrcComponent "theta" SrcTerminal 1 DstComponent "3ph->RRF2" DstTerminal 3 } } } Component { Type Subsystem Name "abc2 - dq2\nTransformation" Show on Position [330, 140] Direction up Flipped off Frame [-70, -20; 70, 20] LabelPosition [0, 0] SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskDisplayLang "2" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Input Position [-70, -10] Direction left } Terminal { Type Output Position [74, -10] Direction right } Terminal { Type Output Position [74, 10] Direction right } Terminal { Type Input Position [-70, 10] Direction left } Schematic { Location [0, 777; 374, 942] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Reference SrcComponent "Components/Control/Transformations/3ph->RRF" Name "3ph->RRF2" Show off Position [245, 95] 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 "Demux1" Show off Position [280, 95] Direction right Flipped on Parameter { Variable "Width" Value "2" Show off } } Component { Type Sum Name "Sum1" Show off Position [110, 70] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "+" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Gain Name "Gain" Show off Position [155, 70] Direction right Flipped off Parameter { Variable "K" Value "-1" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type SignalMux Name "Mux" Show off Position [190, 65] Direction right Flipped off Parameter { Variable "Width" Value "[2 1]" Show off } } Component { Type Input Name "Is2" Show on Position [50, 70] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "I2d" Show on Position [325, 85] Direction left Flipped on Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "I2q" Show on Position [325, 105] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "theta" Show on Position [50, 100] Direction right Flipped off Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Constant Name "Constant" Show off Position [150, 130] Direction right Flipped off Frame [-15, -10; 15, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Value" Value "Zeta" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Sum Name "Subtract" Show off Position [180, 100] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "|+-" Show off } Parameter { Variable "DataType" Value "11" Show off } } Connection { Type Signal SrcComponent "Mux" SrcTerminal 1 Points [210, 65; 210, 90] DstComponent "3ph->RRF2" DstTerminal 1 } Connection { Type Signal SrcComponent "3ph->RRF2" SrcTerminal 2 DstComponent "Demux1" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux1" SrcTerminal 2 Points [290, 90; 290, 85] DstComponent "I2d" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux1" SrcTerminal 3 Points [290, 100; 290, 105] DstComponent "I2q" DstTerminal 1 } Connection { Type Signal SrcComponent "Sum1" SrcTerminal 1 DstComponent "Gain" DstTerminal 1 } Connection { Type Signal SrcComponent "Gain" SrcTerminal 2 DstComponent "Mux" DstTerminal 3 } Connection { Type Signal SrcComponent "Constant" SrcTerminal 1 Points [180, 130] DstComponent "Subtract" DstTerminal 3 } Connection { Type Signal SrcComponent "theta" SrcTerminal 1 DstComponent "Subtract" DstTerminal 2 } Connection { Type Signal SrcComponent "Subtract" SrcTerminal 1 DstComponent "3ph->RRF2" DstTerminal 3 } Connection { Type Signal SrcComponent "Is2" SrcTerminal 1 Points [80, 70] Branch { DstComponent "Sum1" DstTerminal 2 } Branch { Points [80, 50; 175, 50] DstComponent "Mux" DstTerminal 2 } } } } Component { Type Goto Name "Goto11" Show off Position [215, 175] Direction right Flipped off Parameter { Variable "Tag" Value "theta" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From7" Show off Position [215, 120] Direction right Flipped off Parameter { Variable "Tag" Value "theta" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From9" Show off Position [515, 120] Direction right Flipped off Parameter { Variable "Tag" Value "theta" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From10" Show off Position [515, 260] Direction right Flipped off Parameter { Variable "Tag" Value "theta" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Goto Name "Goto12" Show off Position [425, 150] Direction right Flipped off Parameter { Variable "Tag" Value "I2q" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Goto Name "Goto8" Show off Position [425, 70] Direction right Flipped off Parameter { Variable "Tag" Value "I1q" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Goto Name "Goto13" Show off Position [425, 50] Direction right Flipped off Parameter { Variable "Tag" Value "I1d" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Goto Name "Goto14" Show off Position [425, 130] Direction right Flipped off Parameter { Variable "Tag" Value "I2d" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From16" Show off Position [515, 65] Direction right Flipped off Parameter { Variable "Tag" Value "I1q" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From17" Show off Position [515, 205] Direction left Flipped on Parameter { Variable "Tag" Value "I2q" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From18" Show off Position [515, 55] Direction right Flipped off Parameter { Variable "Tag" Value "I1d" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From19" Show off Position [505, 220] Direction right Flipped off Parameter { Variable "Tag" Value "I1d" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From20" Show off Position [505, 230] Direction right Flipped off Parameter { Variable "Tag" Value "I1q" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From21" Show off Position [515, 195] Direction left Flipped on Parameter { Variable "Tag" Value "I2d" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From22" Show off Position [505, 80] Direction left Flipped on Parameter { Variable "Tag" Value "I2d" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From23" Show off Position [505, 90] Direction left Flipped on Parameter { Variable "Tag" Value "I2q" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Step Name "Step" Show off Position [75, 320] Direction right Flipped off Parameter { Variable "Time" Value "1e-3" Show off } Parameter { Variable "Before" Value "0" Show off } Parameter { Variable "After" Value "1" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Input Name "Vdc" Show on Position [105, 90] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "Is1" Show on Position [105, 50] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "Is2" Show on Position [105, 130] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "we,theta" Show on Position [100, 170] Direction right Flipped off Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type SignalDemux Name "Demux1" Show off Position [180, 170] Direction right Flipped on Parameter { Variable "Width" Value "2" Show off } } Component { Type SignalDemux Name "Demux2" Show off Position [145, 90] Direction right Flipped on Parameter { Variable "Width" Value "2" Show off } } Component { Type Reference SrcComponent "Components/Control/Modulators/Symmetrical PWM" Name "Symmetrical PWM" Show on Position [715, 220] Direction up Flipped off Frame [-20, -20; 20, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "sampling" Value "4" Show off } Parameter { Variable "fc" Value "fsw" Show off } Parameter { Variable "offset" Value "0" Show off } Parameter { Variable "input_limits" Value "[0 1]" Show off } Parameter { Variable "output_values" Value "[-1 1]" Show off } Terminal { Type Output Position [24, 0] Direction right } Terminal { Type Input Position [-20, 0] Direction left } } Component { Type Reference SrcComponent "Components/Control/Modulators/Blanking Time" Name "Blanking Time" Show on Position [810, 220] Direction up Flipped off Frame [-20, -20; 20, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "tb" Value "0.1e-6" Show off } Terminal { Type Output Position [24, 0] Direction right } Terminal { Type Input Position [-20, 0] Direction left } } Component { Type Output Name "PWM2" Show on Position [880, 220] Direction right Flipped off Parameter { Variable "Index" Value "5" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Reference SrcComponent "Components/Control/Modulators/Symmetrical PWM" Name "Symmetrical PWM1" Show on Position [715, 80] Direction up Flipped off Frame [-20, -20; 20, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "sampling" Value "4" Show off } Parameter { Variable "fc" Value "fsw" Show off } Parameter { Variable "offset" Value "0" Show off } Parameter { Variable "input_limits" Value "[0 1]" Show off } Parameter { Variable "output_values" Value "[-1 1]" Show off } Terminal { Type Output Position [24, 0] Direction right } Terminal { Type Input Position [-20, 0] Direction left } } Component { Type Reference SrcComponent "Components/Control/Modulators/Blanking Time" Name "Blanking Time1" Show on Position [810, 80] Direction up Flipped off Frame [-20, -20; 20, 20] LabelPosition [0, 23] LabelAlign up Parameter { Variable "tb" Value "0.1e-6" Show off } Terminal { Type Output Position [24, 0] Direction right } Terminal { Type Input Position [-20, 0] Direction left } } Component { Type Output Name "PWM1" Show on Position [880, 80] Direction right Flipped off Parameter { Variable "Index" Value "6" Show on } Parameter { Variable "Width" Value "-1" Show off } } Connection { Type Signal SrcComponent "From3" SrcTerminal 1 DstComponent "Current Controller1" DstTerminal 3 } Connection { Type Signal SrcComponent "From4" SrcTerminal 1 DstComponent "Current Controller2" DstTerminal 3 } Connection { Type Signal SrcComponent "Mux1" SrcTerminal 1 Points [395, 205] DstComponent "Scope1" DstTerminal 1 } Connection { Type Signal SrcComponent "Mux2" SrcTerminal 1 Points [395, 235] DstComponent "Scope1" DstTerminal 2 } Connection { Type Signal SrcComponent "From6" SrcTerminal 1 DstComponent "Speed Controller" DstTerminal 1 } Connection { Type Signal SrcComponent "RPM*" SrcTerminal 1 DstComponent "Speed Controller" DstTerminal 2 } Connection { Type Signal SrcComponent "From14" SrcTerminal 1 DstComponent "Mux2" DstTerminal 2 } Connection { Type Signal SrcComponent "From15" SrcTerminal 1 DstComponent "Mux1" DstTerminal 2 } Connection { Type Signal SrcComponent "Speed Controller" SrcTerminal 3 DstComponent "Goto7" DstTerminal 1 } Connection { Type Signal SrcComponent "Speed Controller" SrcTerminal 4 DstComponent "Goto10" DstTerminal 1 } Connection { Type Signal SrcComponent "Current Controller2" SrcTerminal 2 DstComponent "Symmetrical PWM" DstTerminal 2 } Connection { Type Signal SrcComponent "Is1" SrcTerminal 1 DstComponent "abc1 - dq1\nTransformation" DstTerminal 1 } Connection { Type Signal SrcComponent "Is2" SrcTerminal 1 DstComponent "abc2 - dq2\nTransformation" DstTerminal 1 } Connection { Type Signal SrcComponent "From5" SrcTerminal 1 DstComponent "Current Controller1" DstTerminal 1 } Connection { Type Signal SrcComponent "From8" SrcTerminal 1 DstComponent "Current Controller2" DstTerminal 1 } Connection { Type Signal SrcComponent "Current Controller1" SrcTerminal 11 DstComponent "Current Controller2" DstTerminal 8 } Connection { Type Signal SrcComponent "Current Controller1" SrcTerminal 12 DstComponent "Current Controller2" DstTerminal 9 } Connection { Type Signal SrcComponent "From9" SrcTerminal 1 DstComponent "Current Controller1" DstTerminal 10 } Connection { Type Signal SrcComponent "From10" SrcTerminal 1 DstComponent "Current Controller2" DstTerminal 10 } Connection { Type Signal SrcComponent "From13" SrcTerminal 1 DstComponent "Mux2" DstTerminal 3 } Connection { Type Signal SrcComponent "From12" SrcTerminal 1 DstComponent "Mux1" DstTerminal 3 } Connection { Type Signal SrcComponent "abc1 - dq1\nTransformation" SrcTerminal 3 DstComponent "Goto8" DstTerminal 1 } Connection { Type Signal SrcComponent "abc1 - dq1\nTransformation" SrcTerminal 2 DstComponent "Goto13" DstTerminal 1 } Connection { Type Signal SrcComponent "abc2 - dq2\nTransformation" SrcTerminal 3 DstComponent "Goto12" DstTerminal 1 } Connection { Type Signal SrcComponent "abc2 - dq2\nTransformation" SrcTerminal 2 DstComponent "Goto14" DstTerminal 1 } Connection { Type Signal SrcComponent "From16" SrcTerminal 1 DstComponent "Current Controller1" DstTerminal 5 } Connection { Type Signal SrcComponent "From17" SrcTerminal 1 DstComponent "Current Controller2" DstTerminal 5 } Connection { Type Signal SrcComponent "From7" SrcTerminal 1 Points [230, 120] Branch { Points [230, 70] DstComponent "abc1 - dq1\nTransformation" DstTerminal 4 } Branch { Points [230, 150] DstComponent "abc2 - dq2\nTransformation" DstTerminal 4 } } Connection { Type Signal SrcComponent "From18" SrcTerminal 1 DstComponent "Current Controller1" DstTerminal 4 } Connection { Type Signal SrcComponent "From19" SrcTerminal 1 DstComponent "Current Controller2" DstTerminal 6 } Connection { Type Signal SrcComponent "From20" SrcTerminal 1 DstComponent "Current Controller2" DstTerminal 7 } Connection { Type Signal SrcComponent "From21" SrcTerminal 1 DstComponent "Current Controller2" DstTerminal 4 } Connection { Type Signal SrcComponent "From22" SrcTerminal 1 DstComponent "Current Controller1" DstTerminal 6 } Connection { Type Signal SrcComponent "From23" SrcTerminal 1 DstComponent "Current Controller1" DstTerminal 7 } Connection { Type Signal SrcComponent "Current Controller2" SrcTerminal 12 DstComponent "Current Controller1" DstTerminal 9 } Connection { Type Signal SrcComponent "Current Controller2" SrcTerminal 11 DstComponent "Current Controller1" DstTerminal 8 } Connection { Type Signal SrcComponent "Step" SrcTerminal 1 DstComponent "Goto6" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux1" SrcTerminal 3 DstComponent "Goto11" DstTerminal 1 } Connection { Type Signal SrcComponent "we,theta" SrcTerminal 1 DstComponent "Demux1" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux2" SrcTerminal 2 DstComponent "Goto4" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux2" SrcTerminal 3 DstComponent "Goto5" DstTerminal 1 } Connection { Type Signal SrcComponent "Vdc" SrcTerminal 1 DstComponent "Demux2" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux1" SrcTerminal 2 DstComponent "Goto9" DstTerminal 1 } Connection { Type Signal SrcComponent "Symmetrical PWM" SrcTerminal 1 DstComponent "Blanking Time" DstTerminal 2 } Connection { Type Signal SrcComponent "Symmetrical PWM1" SrcTerminal 1 DstComponent "Blanking Time1" DstTerminal 2 } Connection { Type Signal SrcComponent "Current Controller1" SrcTerminal 2 DstComponent "Symmetrical PWM1" DstTerminal 2 } Connection { Type Signal SrcComponent "Blanking Time1" SrcTerminal 1 DstComponent "PWM1" DstTerminal 1 } Connection { Type Signal SrcComponent "Blanking Time" SrcTerminal 1 DstComponent "PWM2" DstTerminal 1 } } } Connection { Type Signal SrcComponent "Plant" SrcTerminal 3 Points [455, 115; 455, 220; 100, 220; 100, 120] DstComponent "Controller" DstTerminal 4 } Connection { Type Signal SrcComponent "Plant" SrcTerminal 4 Points [460, 105; 460, 235; 95, 235; 95, 110] DstComponent "Controller" DstTerminal 1 } Connection { Type Signal SrcComponent "Plant" SrcTerminal 2 Points [465, 95; 465, 265; 90, 265; 90, 100] DstComponent "Controller" DstTerminal 3 } Connection { Type Signal SrcComponent "Plant" SrcTerminal 1 Points [470, 85; 470, 295; 85, 295; 85, 90] DstComponent "Controller" DstTerminal 2 } Connection { Type Signal SrcComponent "Controller" SrcTerminal 5 DstComponent "Plant" DstTerminal 6 } Connection { Type Signal SrcComponent "Controller" SrcTerminal 6 DstComponent "Plant" DstTerminal 5 } Annotation { Name "\n

Speed and current casca" "ded control of a 6-phase PMSM

\n

[No RT Box / TI C2000 " "TSP Components]

" Position [280, 40] } } ProbeBlock { Tag "six_phase_pmsm_nolib/Plant/Probe2" Probe { Component "Dual Star\nPMSM" Path "Plant" Signals {"Rotor position", "Rotational speed"} } } ProbeBlock { Tag "six_phase_pmsm_nolib/Plant/Probe3" Probe { Component "Dual Star\nPMSM" Path "Plant" Signals {"Electrical torque", "Rotational speed", "Rotor position"} } } } DemoSignature "8EeRkJaSOw3vCmpq79YniVEeQKX0HJSqkJpNQho6vVc="