Plecs { Name "TN114_Motor_Speed_Control_v2" Version "4.4" CircuitModel "ContStateSpace" StartTime "0.0" StopTime "1.0" Timeout "" Solver "radau" MaxStep "1e-3" InitStep "-1" FixedStep "1e-3" 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 "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" "%%%%%%%%%%%%%%%%%%%%%%%\n% Technical Note TN114\n% Parameters for 'Motor spee" "d control' system\n% Copyright imperix ltd, 2021\n% dev@imperix.ch\n%%%%%%%%%" "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\n%% ====" "=============== System parameters ======================== %%\n\nControlFreq " " = 20e3; % Control interrupt frequency [Hz]\nControlPeriod = " "1/ControlFreq; % Control interrupt period [s]\nSamplingPeriod = ControlPe" "riod; % Sampling period [s]\n\n% Deadtime\ndt = 1e-6;\n\n\n%% ===========" "======== Plant model ======================== %%\n\n% PMSM\nPmsm.p = 3;\t\t" "\t\t% Pole pairs [-]\nPmsm.Usn = 460;\t\t\t% Rated voltage [V]\nPmsm.Isn = 2." "43;\t\t\t% Rated current [Arms]\nPmsm.fsn = 50;\t\t\t\t% Rated frequency [Hz]" "\nPmsm.wsn = 2*pi*50;\t\t% Rated angular frequency [rad/s]\nPmsm.Rs = 3.4;\t" "\t\t% Stator resistance [Ohm]\nPmsm.Ls = 12.15e-3;\t\t% Stator inductance [H" "]\nPmsm.Ld = Pmsm.Ls; \t% Stator inductance along d axis [H]\nPmsm.Lq = Pm" "sm.Ls; \t% Stator inductance along q axis [H]\n\nPmsm.Jm = 2.9e-4;\t\t% Mom" "ent of inertia [Nm^2]\nPmsm.kF = 0.0003035;\t% Friction coefficient \nPmsm.P" "hi_pm = 0.25;\t\t% Flux from permanent magnets [Nm/Apeak]\n\nPmsm.Temn = 3.9;" " \t\t\t% Nominal torque [Nm]\nPmsm.Pn = 1.23e3;\t\t% Nominal active power [" "W]\n\nPmsm.Is_max = 8.1;\t\t% Peak current [A]\nPmsm.Wm_Max = 4800;\t\t% Max " "mechanical speed [rpm]\n\n% Encoder parameters\nPPR = 4096; % Enc" "oder pulses per turn [-]\n\n\n%% ============== DC link - Voltage control ===" "============ %%\n\nDcLink.Rbr = 50;\t\t\t% Braking chopper resistor [Ohm]\nD" "cLink.Vdc0 = 800; % Initial DC bus voltage [V]\n\n\n%% =============== P" "MSM - Current control ================= %%\n\n% Plant model\nIpmsm.K1 = 1 / P" "msm.Rs;\nIpmsm.T1 = Pmsm.Ld / Pmsm.Rs;\nIpmsm.K2 = 1 / Pmsm.Rs;\nIpmsm.T2 = P" "msm.Lq / Pmsm.Rs;\n\n% Small time constants\nIpmsm.Ts = ControlPeriod; " " % Current controller control period [s]\n\nIpmsm.Tsens = 0;\t\t\t\t\t\t\t" "% Sensing delay (ideal sensor) [s]\nIpmsm.Tctrl = 0.5 * Ipmsm.Ts;\t\t\t% Cont" "rol delay [s]\nIpmsm.Tpwm = 0.5 * ControlPeriod;\t% Modulator delay [s]\n\nI" "pmsm.Kcm = 1;\nIpmsm.Ttot = Ipmsm.Tctrl + Ipmsm.Tpwm + Ipmsm.Tsens;\n\n% Mag" "nitude optimum\nIpmsm.Tn_d = Ipmsm.T1;\nIpmsm.Ti_d = 2 * Ipmsm.Kcm * Ipmsm.K1" " * Ipmsm.Ttot;\nIpmsm.Tn_q = Ipmsm.T2;\nIpmsm.Ti_q = 2 * Ipmsm.Kcm * Ipmsm.K2" " * Ipmsm.Ttot;\n\nIpmsm.Kp_d = Ipmsm.Tn_d / Ipmsm.Ti_d;\nIpmsm.Ki_d = 1 / Ipm" "sm.Ti_d;\nIpmsm.Kp_q = Ipmsm.Tn_q / Ipmsm.Ti_q;\nIpmsm.Ki_q = 1 / Ipmsm.Ti_q;" "\n\n\n%% =============== PMSM - Speed control =================== %%\n\n% Pla" "nt model\nSpeed.T1 = Pmsm.Jm;\n\n% Speed LPF cut-off frequency\nSpeed.fc = 1e" "3;\n\n% Small time constants\nSpeed.Ratio = 100; % Decimatio" "n ratio of the speed control loop [s]\nSpeed.Ts = Speed.Ratio * Ipmsm.Ts; % " "Speed controller period [s]\n\nSpeed.Tsens = ControlPeriod + 1/(2*pi*Speed.fc" "); % Sensing delay [s]\n % (angle derivati" "ve computation and LPF)\nSpeed.Tctrl = Speed.Ts; % Control delay " "[s]\n\nSpeed.Kcm = 1;\nSpeed.Ttot = Speed.Tctrl + Speed.Tsens;\n\n% Symmetri" "cal optimum\nSpeed.Tn = 4 * Speed.Ttot;\nSpeed.Ti = 8 * (Speed.Ttot^2 / Speed" ".T1) * Speed.Kcm;\n\nSpeed.Kp = Speed.Tn / Speed.Ti;\nSpeed.Ki = 1 / Speed.Ti" ";\n\n% Torque saturation\nSpeed.Tem_sat = 1.1 * Pmsm.Temn;" 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 "" AlgebraicLoopMethod "1" AlgebraicLoopTolerance "1e-6" ScriptsDialogGeometry "" ScriptsDialogSplitterPos "0" Schematic { Location [6, 36; 559, 445] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Subsystem Name "PMSM drive" Show on Position [370, 110] Direction up Flipped off Frame [-75, -35; 75, 35] LabelPosition [0, 38] LabelAlign up SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskDisplayLang "2" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Output Position [79, -15] Direction right } Terminal { Type Output Position [79, 0] Direction right } Terminal { Type Output Position [79, 15] Direction right } Terminal { Type Input Position [-75, -10] Direction left } Terminal { Type Input Position [-75, 10] Direction left } Schematic { Location [6, 36; 1024, 478] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Reference SrcComponent "Components/Electrical/Machines/Perm.-Magnet SM" Name "PMSM" Show on Position [745, 285] Direction up Flipped off Frame [-25, -25; 25, 35] LabelPosition [0, 38] LabelAlign up Parameter { Variable "configuration" Value "1" Show off } Parameter { Variable "R" Value "Pmsm.Rs" Show off } Parameter { Variable "L" Value "[Pmsm.Ld Pmsm.Lq]" Show off } Parameter { Variable "phi" Value "Pmsm.Phi_pm" Show off } Parameter { Variable "J" Value "Pmsm.Jm" Show off } Parameter { Variable "F" Value "0" Show off } Parameter { Variable "p" Value "Pmsm.p" Show off } Parameter { Variable "wm0" Value "0" Show off } Parameter { Variable "thm0" Value "0" Show off } Parameter { Variable "is0" Value "[0 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 Rotational Position [30, 30] Direction right } } Component { Type PlecsProbe Name "PMSM meas" Show on Position [790, 190] Direction right Flipped off } Component { Type SignalDemux Name "Demux1" Show off Position [365, 35] Direction right Flipped on Parameter { Variable "Width" Value "[2 2 2]" Show off } } Component { Type ThreePhaseMeter Name "3ph Meter" Show off Position [695, 285] Direction up Flipped off Parameter { Variable "voltage" Value "2" Show off } } Component { Type Resistor Name "Rchopper" Show on Position [265, 205] Direction up Flipped off Parameter { Variable "R" Value "DcLink.Rbr" Show off } } Component { Type Ammeter Name "Am1" Show off Position [265, 240] Direction up Flipped off } Component { Type Diode Name "D1" Show off Position [55, 140] Direction down Flipped off Parameter { Variable "Vf" Value "0" Show off } Parameter { Variable "Ron" Value "0" Show off } Parameter { Variable "thermal" Value "" Show off } Parameter { Variable "T_init" Value "0" Show off } } Component { Type Ammeter Name "Am3" Show off Position [55, 235] Direction up Flipped on } Component { Type DCVoltageSource Name "V_dc" Show on Position [55, 190] Direction up Flipped off Parameter { Variable "V" Value "DcLink.Vdc0" Show off } } Component { Type Scope Name "Machine current\nand speed" Show on Position [605, 320] Direction up Flipped off Location [694, 560; 1025, 899] State "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb" "wBvAG0AQQByAGUAYQAAAAAA/////wAAAFwA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA" "AA/////wAAAGYA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABmAP///wAAAAMAAAAAAAA" "AAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABQAP///wAAAUsAAAE4" "AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA" "AAAAAAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL/gMAAAAJA" "AAACQAAAGQAAAAIAAAAZAAAAAUAAABkAAAABAAAAGQAAAAHAAAAZAAAAAYAAABkAAAAAQAAAGQAAA" "ADAAAAZAAAAAIAAABkAAAAxQAAAAsBAAABAAAAAAAAAAAAAAAAZP////8AAACBAAAAAAAAAAsAAAC" "eAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAA" "AAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAA" "AAAAAAnAAAAAQAAAAAAAAPoAAAAACc=" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "QAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" Axes "2" TimeRange "0" ScrollingMode "1" SingleTimeAxis "1" Open "0" Ts "-1" SampleLimit "0" XAxisLabel "Time [s]" ShowLegend "2" Axis { Name "Stator currents" AutoScale 1 MinValue 0 MaxValue 1 Signals {"Ia", "Ib", "Ic"} SignalTypes [ ] AxisLabel "Current [A]" Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Rotor mechanical speed" AutoScale 1 MinValue 0 MaxValue 1 Signals {"speed"} SignalTypes [ ] AxisLabel "Speed [rad/s]" 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 {"Ia", "Ib", "Ic"} Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {"speed"} Untangle 0 KeepBaseline off BaselineValue 0 } } } Component { Type PlecsProbe Name "Probe1" Show off Position [520, 320] Direction right Flipped off } Component { Type SignalDemux Name "Demux2" Show off Position [565, 320] Direction right Flipped on Parameter { Variable "Width" Value "[3 1]" Show off } } Component { Type ConfigurableSubsystem Name "M1" Show off Position [420, 185] Direction up Flipped off Frame [-25, -50; 25, 50] LabelPosition [-28, 0] LabelAlign right SampleTime "-1" CodeGenSampleTime "NaN" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskType "PEB8032" MaskDisplay "local function drawRectangle(x,y,w,h,color)\n\tIcon:c" "olor(221,4,45)\n\tIcon:line({x,x+w,x+w,x,x},{y,y,y+h,y+h,y})\nend\n\nlocal fu" "nction drawIgbt(x,y)\n\tIcon:line(Vector{0, 0}+x, Vector{-25, -10}+y)\n\tIcon" ":line(Vector{0, 0}+x, Vector{10, 25}+y)\n\tIcon:line(Vector{0, -10}+x, Vector" "{-10, -4}+y)\n\tIcon:line(Vector{-10, 0}+x, Vector{4, 10}+y)\n\tIcon:line(Vec" "tor{-10, -10}+x, Vector{8, -8}+y)\n\tIcon:line(Vector{-14, -14}+x, Vector{8, " "-8}+y)\n\tIcon:line(Vector{-5.65, -1.667, -3.864}+x, Vector{8.634, 9, 5.658}+" "y)\n\tIcon:line(Vector{-14, -20}+x, Vector{0, 0}+y)\n\tIcon:line(Vector{0, 10" ", 10}+x, Vector{-14, -14, -6}+y)\n\tIcon:line(Vector{10, 10, 0}+x, Vector{6, " "14, 14}+y)\n\tIcon:line(Vector{3, 17}+x, Vector{-6, -6}+y)\n\tIcon:line(Vecto" "r{10, 17, 3, 10}+x, Vector{-6, 6, 6, -6}+y)\nend\n\ndrawRectangle(-25,-50,50," "100)\ndrawRectangle(-24,-49,48,98)\nIcon:color(0,0,0)\n\ndrawIgbt(0,25)\ndraw" "Igbt(0,-25)\n\nIcon:line({0,25},{0,0}) --Midpoint outpout\nIcon:line({0,0},{-" "10,10}) --Midpoint interconnection\nIcon:circle(0,0,1)\nIcon:line({0,0},{50,4" "5}) -- +VCC point\nIcon:line({0,0},{-50,-45}) -- -VCC point\n\nIcon:text(0,-6" "5,\"PEB8032\", 'FontSize',9)" MaskDisplayLang "2" MaskIconFrame off MaskIconOpaque off MaskIconRotates on MaskInit "% sensor bandwidth\ntau_i = 1/(200e3*2*pi);\ntau_v = " "1/(50e3*2*pi);\n\n% sensor sensitivities\nS_current = 50e-3;\nS_voltage = 2.5" "e-3;\n\n% DC bus\nCdc = 260e-6;\nResr = 0.02;\nRdis = 100e3;" Parameter { Variable "V0" Prompt "Initial DC bus voltage" Type FreeText Value "DcLink.Vdc0" Show off Tunable off TabName "" } Terminal { Type Input Position [-25, 10] Direction left } Terminal { Type Output Position [29, 30] Direction right } Terminal { Type Port Position [0, -55] Direction up } Terminal { Type Port Position [0, 55] Direction down } Terminal { Type Port Position [30, 0] Direction right } Terminal { Type Output Position [29, 40] Direction right } TerminalNames { "s", "I", "VDC+", "VDC-", "AC", "V" } Location [411, 516; 1241, 854] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Configurations { Name "Ideal model" Schematic { Component { Type Input Name "s" Show on Position [240, 50] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "2" Show off } } Component { Type Output Name "I" Show on Position [510, 95] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "1" Show off } } Component { Type Port Name "AC" Show off Position [485, 150] Direction right Flipped on Parameter { Variable "Index" Value "5" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Ammeter Name "Iac" Show off Position [420, 150] Direction left Flipped off } Component { Type Port Name "VDC+" Show off Position [210, 90] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "VDC-" Show off Position [210, 220] Direction right Flipped off Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type SignalDemux Name "Demux" Show off Position [285, 50] Direction right Flipped on Parameter { Variable "Width" Value "2" Show off } } Component { Type Capacitor Name "C" Show on Position [285, 135] Direction up Flipped off Parameter { Variable "C" Value "Cdc" Show off } Parameter { Variable "v_init" Value "V0" Show off } } Component { Type Gain Name "Si" Show on Position [460, 95] Direction right Flipped off Parameter { Variable "K" Value "S_current" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Voltmeter Name "Vdc" Show off Position [395, 195] Direction up Flipped off } Component { Type Gain Name "Sv" Show on Position [460, 195] Direction right Flipped off Parameter { Variable "K" Value "S_voltage" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Output Name "V" Show on Position [510, 195] Direction right Flipped off Parameter { Variable "Index" Value "6" Show on } Parameter { Variable "Width" Value "1" Show off } } Component { Type Resistor Name "ESR" Show on Position [285, 185] Direction down Flipped off Parameter { Variable "R" Value "0.02" Show off } } Component { Type IgbtWithDiode Name "IGBTD" Show off Position [355, 125] Direction up Flipped off Parameter { Variable "s_init" Value "0" Show off } Parameter { Variable "thermal" Value "" Show off } Parameter { Variable "T_init" Value "0" Show off } } Component { Type IgbtWithDiode Name "IGBTD1" Show off Position [355, 185] Direction up Flipped off Parameter { Variable "s_init" Value "0" Show off } Parameter { Variable "thermal" Value "" Show off } Parameter { Variable "T_init" Value "0" Show off } } Component { Type Resistor Name "Discharge" Show on Position [250, 155] Direction down Flipped off Parameter { Variable "R" Value "Rdis" Show off } } Connection { Type Wire SrcComponent "AC" SrcTerminal 1 DstComponent "Iac" DstTerminal 2 } Connection { Type Signal SrcComponent "s" SrcTerminal 1 DstComponent "Demux" DstTerminal 1 } Connection { Type Signal SrcComponent "Si" SrcTerminal 2 DstComponent "I" DstTerminal 1 } Connection { Type Signal SrcComponent "Iac" SrcTerminal 3 Points [420, 95] DstComponent "Si" DstTerminal 1 } Connection { Type Wire SrcComponent "IGBTD1" SrcTerminal 2 Points [355, 220] Branch { Points [285, 220] Branch { Points [250, 220] Branch { DstComponent "VDC-" DstTerminal 1 } Branch { DstComponent "Discharge" DstTerminal 1 } } Branch { DstComponent "ESR" DstTerminal 1 } } Branch { Points [395, 220] DstComponent "Vdc" DstTerminal 2 } } Connection { Type Wire SrcComponent "IGBTD" SrcTerminal 1 Points [355, 90] Branch { Points [285, 90] Branch { Points [250, 90] Branch { DstComponent "VDC+" DstTerminal 1 } Branch { DstComponent "Discharge" DstTerminal 2 } } Branch { DstComponent "C" DstTerminal 1 } } Branch { Points [395, 90] DstComponent "Vdc" DstTerminal 1 } } Connection { Type Signal SrcComponent "Vdc" SrcTerminal 3 DstComponent "Sv" DstTerminal 1 } Connection { Type Signal SrcComponent "Sv" SrcTerminal 2 DstComponent "V" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux" SrcTerminal 2 Points [320, 45] DstComponent "IGBTD" DstTerminal 3 } Connection { Type Wire SrcComponent "Iac" SrcTerminal 1 Points [355, 150] Branch { DstComponent "IGBTD1" DstTerminal 1 } Branch { DstComponent "IGBTD" DstTerminal 2 } } Connection { Type Signal SrcComponent "Demux" SrcTerminal 3 Points [310, 55; 310, 185] DstComponent "IGBTD1" DstTerminal 3 } Connection { Type Wire SrcComponent "ESR" SrcTerminal 2 DstComponent "C" DstTerminal 2 } } Name "Ideal averaged (PLECS)" Schematic { Component { Type Input Name "s" Show on Position [45, 160] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "2" Show off } } Component { Type Output Name "I" Show on Position [765, 105] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "1" Show off } } Component { Type Port Name "AC" Show off Position [765, 160] Direction right Flipped on Parameter { Variable "Index" Value "5" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "VDC+" Show off Position [95, 40] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "VDC-" Show off Position [95, 280] Direction right Flipped off Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "V" Show on Position [765, 205] Direction right Flipped off Parameter { Variable "Index" Value "6" Show on } Parameter { Variable "Width" Value "1" Show off } } Component { Type SignalDemux Name "Demux" Show off Position [95, 160] Direction left Flipped off Parameter { Variable "Width" Value "2" Show off } } Component { Type Voltmeter Name "v_dc" Show on Position [375, 160] Direction up Flipped off } Component { Type VoltageSource Name "V2" Show on Position [635, 230] Direction down Flipped on Parameter { Variable "DiscretizationBehavior" Value "1" Show off } Parameter { Variable "StateSpaceInlining" Value "1" Show off } } Component { Type VoltageSource Name "V1" Show on Position [635, 90] Direction down Flipped on Parameter { Variable "DiscretizationBehavior" Value "1" Show off } Parameter { Variable "StateSpaceInlining" Value "1" Show off } } Component { Type Product Name "Product1" Show off Position [555, 90] Direction up Flipped off Parameter { Variable "Inputs" Value "2" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Product Name "Product2" Show off Position [310, 120] Direction right Flipped on Parameter { Variable "Inputs" Value "2" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type CurrentSource Name "i_dc" Show on Position [245, 160] Direction up Flipped on Parameter { Variable "DiscretizationBehavior" Value "1" Show off } Parameter { Variable "StateSpaceInlining" Value "1" Show off } } Component { Type Ammeter Name "Am1" Show on Position [585, 60] Direction down Flipped on } Component { Type Offset Name "Offset" Show off Position [196, 85] 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 Product Name "Product3" Show off Position [555, 230] Direction up Flipped off Parameter { Variable "Inputs" Value "2" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Product Name "Product4" Show off Position [310, 200] Direction left Flipped off Parameter { Variable "Inputs" Value "2" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type DiodePair Name "D1" Show on Position [635, 160] Direction up Flipped off } Component { Type Ammeter Name "Am2" Show on Position [585, 260] Direction down Flipped on } Component { Type Sum Name "Sum" Show off Position [310, 160] 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 Reference SrcComponent "Components/Electrical/Power Modules/Boost1/Sub-" "cycle average/Data Type\\nCheck" Name "Data Type\nCheck" Show off Position [55, 85] Direction down Flipped on Frame [-20, -15; 20, 15] LabelPosition [0, 18] LabelAlign up Parameter { Variable "TargetPortIndices" Value "" Show off } Terminal { Type Input Position [-20, 0] Direction left } } Component { Type Reference SrcComponent "Components/Electrical/Power Modules/Boost1/Sub-" "cycle average/Data Type\\nCheck" Name "Data Type\nCheck1" Show off Position [55, 235] Direction down Flipped on Frame [-20, -15; 20, 15] LabelPosition [0, 18] LabelAlign up Parameter { Variable "TargetPortIndices" Value "" Show off } Terminal { Type Input Position [-20, 0] Direction left } } Component { Type Ammeter Name "Iac" Show off Position [675, 160] Direction left Flipped off } Component { Type Gain Name "Si" Show on Position [715, 105] Direction right Flipped off Parameter { Variable "K" Value "S_current" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "Sv" Show on Position [715, 205] Direction right Flipped off Parameter { Variable "K" Value "S_voltage" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Capacitor Name "C" Show on Position [420, 120] Direction up Flipped off Parameter { Variable "C" Value "Cdc" Show off } Parameter { Variable "v_init" Value "V0" Show off } } Component { Type Resistor Name "ESR" Show on Position [420, 205] Direction down Flipped off Parameter { Variable "R" Value "Resr" Show off } } Component { Type Resistor Name "Discharge" Show on Position [455, 135] Direction up Flipped off Parameter { Variable "R" Value "Rdis" Show off } } Connection { Type Signal SrcComponent "s" SrcTerminal 1 DstComponent "Demux" DstTerminal 1 } Connection { Type Wire SrcComponent "i_dc" SrcTerminal 2 Points [245, 280] Branch { Points [375, 280] Branch { Points [420, 280] Branch { Points [455, 280] Branch { Points [520, 280; 520, 160; 585, 160] Branch { DstComponent "Am2" DstTerminal 1 } Branch { DstComponent "Am1" DstTerminal 2 } } Branch { DstComponent "Discharge" DstTerminal 2 } } Branch { DstComponent "ESR" DstTerminal 1 } } Branch { DstComponent "v_dc" DstTerminal 2 } } Branch { DstComponent "VDC-" DstTerminal 1 } } Connection { Type Signal SrcComponent "Product3" SrcTerminal 1 DstComponent "V2" DstTerminal 3 } Connection { Type Signal SrcComponent "Product1" SrcTerminal 1 DstComponent "V1" DstTerminal 3 } Connection { Type Wire SrcComponent "D1" SrcTerminal 3 DstComponent "V2" DstTerminal 1 } Connection { Type Wire SrcComponent "V1" SrcTerminal 2 DstComponent "D1" DstTerminal 1 } Connection { Type Signal SrcComponent "Am2" SrcTerminal 3 Points [315, 260] DstComponent "Product4" DstTerminal 3 } Connection { Type Signal SrcComponent "Product2" SrcTerminal 1 DstComponent "Sum" DstTerminal 2 } Connection { Type Signal SrcComponent "Product4" SrcTerminal 1 DstComponent "Sum" DstTerminal 3 } Connection { Type Signal SrcComponent "Sum" SrcTerminal 1 DstComponent "i_dc" DstTerminal 3 } Connection { Type Wire SrcComponent "i_dc" SrcTerminal 1 Points [245, 40] Branch { DstComponent "VDC+" DstTerminal 1 } Branch { Points [375, 40] Branch { DstComponent "v_dc" DstTerminal 1 } Branch { Points [420, 40] Branch { DstComponent "C" DstTerminal 1 } Branch { Points [455, 40] DstComponent "Discharge" DstTerminal 1 } } } } Connection { Type Signal SrcComponent "Am1" SrcTerminal 3 Points [315, 60] DstComponent "Product2" DstTerminal 3 } Connection { Type Signal SrcComponent "Offset" SrcTerminal 2 Points [305, 85] Branch { DstComponent "Product2" DstTerminal 2 } Branch { DstComponent "Product1" DstTerminal 2 } } Connection { Type Signal SrcComponent "Iac" SrcTerminal 3 Points [675, 105] DstComponent "Si" DstTerminal 1 } Connection { Type Wire SrcComponent "Iac" SrcTerminal 2 DstComponent "AC" DstTerminal 1 } Connection { Type Wire SrcComponent "Iac" SrcTerminal 1 DstComponent "D1" DstTerminal 2 } Connection { Type Signal SrcComponent "Si" SrcTerminal 2 DstComponent "I" DstTerminal 1 } Connection { Type Signal SrcComponent "Sv" SrcTerminal 2 DstComponent "V" DstTerminal 1 } Connection { Type Wire SrcComponent "Am1" SrcTerminal 1 Points [635, 40] DstComponent "V1" DstTerminal 1 } Connection { Type Wire SrcComponent "V2" SrcTerminal 2 Points [635, 280] DstComponent "Am2" DstTerminal 2 } Connection { Type Signal SrcComponent "v_dc" SrcTerminal 3 Points [480, 160] Branch { Points [480, 95] DstComponent "Product1" DstTerminal 3 } Branch { Points [480, 205] Branch { Points [480, 225] DstComponent "Product3" DstTerminal 2 } Branch { DstComponent "Sv" DstTerminal 1 } } } Connection { Type Wire SrcComponent "ESR" SrcTerminal 2 DstComponent "C" DstTerminal 2 } Connection { Type Signal SrcComponent "Demux" SrcTerminal 2 Points [105, 165; 105, 235] Branch { Points [305, 235] Branch { DstComponent "Product4" DstTerminal 2 } Branch { DstComponent "Product3" DstTerminal 3 } } Branch { DstComponent "Data Type\nCheck1" DstTerminal 1 } } Connection { Type Signal SrcComponent "Demux" SrcTerminal 3 Points [105, 155; 105, 85] Branch { DstComponent "Offset" DstTerminal 1 } Branch { DstComponent "Data Type\nCheck" DstTerminal 1 } } } } Parameter { Variable "Configuration" Value "1" Show off } MaskProbe { Name "Gate signals" Probe { Component "s" Path "Ideal model" Signals {"Output"} } Probe { Component "s" Path "Ideal averaged (PLECS)" Signals {"Output"} } } MaskProbe { Name "DC bus voltage (true value)" Probe { Component "Vdc" Path "Ideal model" Signals {"Measured voltage"} } Probe { Component "v_dc" Path "Ideal averaged (PLECS)" Signals {"Measured voltage"} } } MaskProbe { Name "DC bus voltage (sensor signal)" Probe { Component "V" Path "Ideal model" Signals {"Input"} } Probe { Component "V" Path "Ideal averaged (PLECS)" Signals {"Input"} } } MaskProbe { Name "Output current (true value)" Probe { Component "Iac" Path "Ideal model" Signals {"Measured current"} } Probe { Component "Iac" Path "Ideal averaged (PLECS)" Signals {"Measured current"} } } MaskProbe { Name "Output current (sensor signal)" Probe { Component "I" Path "Ideal model" Signals {"Input"} } Probe { Component "I" Path "Ideal averaged (PLECS)" Signals {"Input"} } } } Component { Type ConfigurableSubsystem Name "M2" Show off Position [530, 180] Direction up Flipped off Frame [-25, -50; 25, 50] LabelPosition [-28, 0] LabelAlign right SampleTime "-1" CodeGenSampleTime "NaN" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskType "PEB8032" MaskDisplay "local function drawRectangle(x,y,w,h,color)\n\tIcon:c" "olor(221,4,45)\n\tIcon:line({x,x+w,x+w,x,x},{y,y,y+h,y+h,y})\nend\n\nlocal fu" "nction drawIgbt(x,y)\n\tIcon:line(Vector{0, 0}+x, Vector{-25, -10}+y)\n\tIcon" ":line(Vector{0, 0}+x, Vector{10, 25}+y)\n\tIcon:line(Vector{0, -10}+x, Vector" "{-10, -4}+y)\n\tIcon:line(Vector{-10, 0}+x, Vector{4, 10}+y)\n\tIcon:line(Vec" "tor{-10, -10}+x, Vector{8, -8}+y)\n\tIcon:line(Vector{-14, -14}+x, Vector{8, " "-8}+y)\n\tIcon:line(Vector{-5.65, -1.667, -3.864}+x, Vector{8.634, 9, 5.658}+" "y)\n\tIcon:line(Vector{-14, -20}+x, Vector{0, 0}+y)\n\tIcon:line(Vector{0, 10" ", 10}+x, Vector{-14, -14, -6}+y)\n\tIcon:line(Vector{10, 10, 0}+x, Vector{6, " "14, 14}+y)\n\tIcon:line(Vector{3, 17}+x, Vector{-6, -6}+y)\n\tIcon:line(Vecto" "r{10, 17, 3, 10}+x, Vector{-6, 6, 6, -6}+y)\nend\n\ndrawRectangle(-25,-50,50," "100)\ndrawRectangle(-24,-49,48,98)\nIcon:color(0,0,0)\n\ndrawIgbt(0,25)\ndraw" "Igbt(0,-25)\n\nIcon:line({0,25},{0,0}) --Midpoint outpout\nIcon:line({0,0},{-" "10,10}) --Midpoint interconnection\nIcon:circle(0,0,1)\nIcon:line({0,0},{50,4" "5}) -- +VCC point\nIcon:line({0,0},{-50,-45}) -- -VCC point\n\nIcon:text(0,-6" "5,\"PEB8032\", 'FontSize',9)" MaskDisplayLang "2" MaskIconFrame off MaskIconOpaque off MaskIconRotates on MaskInit "% sensor bandwidth\ntau_i = 1/(200e3*2*pi);\ntau_v = " "1/(50e3*2*pi);\n\n% sensor sensitivities\nS_current = 50e-3;\nS_voltage = 2.5" "e-3;\n\n% DC bus\nCdc = 260e-6;\nResr = 0.02;\nRdis = 100e3;" Parameter { Variable "V0" Prompt "Initial DC bus voltage" Type FreeText Value "DcLink.Vdc0" Show off Tunable off TabName "" } Terminal { Type Input Position [-25, 10] Direction left } Terminal { Type Output Position [29, 30] Direction right } Terminal { Type Port Position [0, -55] Direction up } Terminal { Type Port Position [0, 55] Direction down } Terminal { Type Port Position [30, 0] Direction right } Terminal { Type Output Position [29, 40] Direction right } TerminalNames { "s", "I", "VDC+", "VDC-", "AC", "V" } Location [411, 516; 1241, 854] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Configurations { Name "Ideal model" Schematic { Component { Type Input Name "s" Show on Position [240, 50] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "2" Show off } } Component { Type Output Name "I" Show on Position [510, 95] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "1" Show off } } Component { Type Port Name "AC" Show off Position [485, 150] Direction right Flipped on Parameter { Variable "Index" Value "5" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Ammeter Name "Iac" Show off Position [420, 150] Direction left Flipped off } Component { Type Port Name "VDC+" Show off Position [210, 90] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "VDC-" Show off Position [210, 220] Direction right Flipped off Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type SignalDemux Name "Demux" Show off Position [285, 50] Direction right Flipped on Parameter { Variable "Width" Value "2" Show off } } Component { Type Capacitor Name "C" Show on Position [285, 135] Direction up Flipped off Parameter { Variable "C" Value "Cdc" Show off } Parameter { Variable "v_init" Value "V0" Show off } } Component { Type Gain Name "Si" Show on Position [460, 95] Direction right Flipped off Parameter { Variable "K" Value "S_current" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Voltmeter Name "Vdc" Show off Position [395, 195] Direction up Flipped off } Component { Type Gain Name "Sv" Show on Position [460, 195] Direction right Flipped off Parameter { Variable "K" Value "S_voltage" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Output Name "V" Show on Position [510, 195] Direction right Flipped off Parameter { Variable "Index" Value "6" Show on } Parameter { Variable "Width" Value "1" Show off } } Component { Type Resistor Name "ESR" Show on Position [285, 185] Direction down Flipped off Parameter { Variable "R" Value "0.02" Show off } } Component { Type IgbtWithDiode Name "IGBTD" Show off Position [355, 125] Direction up Flipped off Parameter { Variable "s_init" Value "0" Show off } Parameter { Variable "thermal" Value "" Show off } Parameter { Variable "T_init" Value "0" Show off } } Component { Type IgbtWithDiode Name "IGBTD1" Show off Position [355, 185] Direction up Flipped off Parameter { Variable "s_init" Value "0" Show off } Parameter { Variable "thermal" Value "" Show off } Parameter { Variable "T_init" Value "0" Show off } } Component { Type Resistor Name "Discharge" Show on Position [250, 155] Direction down Flipped off Parameter { Variable "R" Value "Rdis" Show off } } Connection { Type Wire SrcComponent "AC" SrcTerminal 1 DstComponent "Iac" DstTerminal 2 } Connection { Type Signal SrcComponent "s" SrcTerminal 1 DstComponent "Demux" DstTerminal 1 } Connection { Type Signal SrcComponent "Si" SrcTerminal 2 DstComponent "I" DstTerminal 1 } Connection { Type Signal SrcComponent "Iac" SrcTerminal 3 Points [420, 95] DstComponent "Si" DstTerminal 1 } Connection { Type Wire SrcComponent "IGBTD1" SrcTerminal 2 Points [355, 220] Branch { Points [285, 220] Branch { Points [250, 220] Branch { DstComponent "VDC-" DstTerminal 1 } Branch { DstComponent "Discharge" DstTerminal 1 } } Branch { DstComponent "ESR" DstTerminal 1 } } Branch { Points [395, 220] DstComponent "Vdc" DstTerminal 2 } } Connection { Type Wire SrcComponent "IGBTD" SrcTerminal 1 Points [355, 90] Branch { Points [285, 90] Branch { Points [250, 90] Branch { DstComponent "VDC+" DstTerminal 1 } Branch { DstComponent "Discharge" DstTerminal 2 } } Branch { DstComponent "C" DstTerminal 1 } } Branch { Points [395, 90] DstComponent "Vdc" DstTerminal 1 } } Connection { Type Signal SrcComponent "Vdc" SrcTerminal 3 DstComponent "Sv" DstTerminal 1 } Connection { Type Signal SrcComponent "Sv" SrcTerminal 2 DstComponent "V" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux" SrcTerminal 2 Points [320, 45] DstComponent "IGBTD" DstTerminal 3 } Connection { Type Wire SrcComponent "Iac" SrcTerminal 1 Points [355, 150] Branch { DstComponent "IGBTD1" DstTerminal 1 } Branch { DstComponent "IGBTD" DstTerminal 2 } } Connection { Type Signal SrcComponent "Demux" SrcTerminal 3 Points [310, 55; 310, 185] DstComponent "IGBTD1" DstTerminal 3 } Connection { Type Wire SrcComponent "ESR" SrcTerminal 2 DstComponent "C" DstTerminal 2 } } Name "Ideal averaged (PLECS)" Schematic { Component { Type Input Name "s" Show on Position [45, 160] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "2" Show off } } Component { Type Output Name "I" Show on Position [765, 105] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "1" Show off } } Component { Type Port Name "AC" Show off Position [765, 160] Direction right Flipped on Parameter { Variable "Index" Value "5" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "VDC+" Show off Position [95, 40] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "VDC-" Show off Position [95, 280] Direction right Flipped off Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "V" Show on Position [765, 205] Direction right Flipped off Parameter { Variable "Index" Value "6" Show on } Parameter { Variable "Width" Value "1" Show off } } Component { Type SignalDemux Name "Demux" Show off Position [95, 160] Direction left Flipped off Parameter { Variable "Width" Value "2" Show off } } Component { Type Voltmeter Name "v_dc" Show on Position [375, 160] Direction up Flipped off } Component { Type VoltageSource Name "V2" Show on Position [635, 230] Direction down Flipped on Parameter { Variable "DiscretizationBehavior" Value "1" Show off } Parameter { Variable "StateSpaceInlining" Value "1" Show off } } Component { Type VoltageSource Name "V1" Show on Position [635, 90] Direction down Flipped on Parameter { Variable "DiscretizationBehavior" Value "1" Show off } Parameter { Variable "StateSpaceInlining" Value "1" Show off } } Component { Type Product Name "Product1" Show off Position [555, 90] Direction up Flipped off Parameter { Variable "Inputs" Value "2" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Product Name "Product2" Show off Position [310, 120] Direction right Flipped on Parameter { Variable "Inputs" Value "2" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type CurrentSource Name "i_dc" Show on Position [245, 160] Direction up Flipped on Parameter { Variable "DiscretizationBehavior" Value "1" Show off } Parameter { Variable "StateSpaceInlining" Value "1" Show off } } Component { Type Ammeter Name "Am1" Show on Position [585, 60] Direction down Flipped on } Component { Type Offset Name "Offset" Show off Position [196, 85] 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 Product Name "Product3" Show off Position [555, 230] Direction up Flipped off Parameter { Variable "Inputs" Value "2" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Product Name "Product4" Show off Position [310, 200] Direction left Flipped off Parameter { Variable "Inputs" Value "2" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type DiodePair Name "D1" Show on Position [635, 160] Direction up Flipped off } Component { Type Ammeter Name "Am2" Show on Position [585, 260] Direction down Flipped on } Component { Type Sum Name "Sum" Show off Position [310, 160] 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 Reference SrcComponent "Components/Electrical/Power Modules/Boost1/Sub-" "cycle average/Data Type\\nCheck" Name "Data Type\nCheck" Show off Position [55, 85] Direction down Flipped on Frame [-20, -15; 20, 15] LabelPosition [0, 18] LabelAlign up Parameter { Variable "TargetPortIndices" Value "" Show off } Terminal { Type Input Position [-20, 0] Direction left } } Component { Type Reference SrcComponent "Components/Electrical/Power Modules/Boost1/Sub-" "cycle average/Data Type\\nCheck" Name "Data Type\nCheck1" Show off Position [55, 235] Direction down Flipped on Frame [-20, -15; 20, 15] LabelPosition [0, 18] LabelAlign up Parameter { Variable "TargetPortIndices" Value "" Show off } Terminal { Type Input Position [-20, 0] Direction left } } Component { Type Ammeter Name "Iac" Show off Position [675, 160] Direction left Flipped off } Component { Type Gain Name "Si" Show on Position [715, 105] Direction right Flipped off Parameter { Variable "K" Value "S_current" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "Sv" Show on Position [715, 205] Direction right Flipped off Parameter { Variable "K" Value "S_voltage" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Capacitor Name "C" Show on Position [420, 120] Direction up Flipped off Parameter { Variable "C" Value "Cdc" Show off } Parameter { Variable "v_init" Value "V0" Show off } } Component { Type Resistor Name "ESR" Show on Position [420, 205] Direction down Flipped off Parameter { Variable "R" Value "Resr" Show off } } Component { Type Resistor Name "Discharge" Show on Position [455, 135] Direction up Flipped off Parameter { Variable "R" Value "Rdis" Show off } } Connection { Type Signal SrcComponent "s" SrcTerminal 1 DstComponent "Demux" DstTerminal 1 } Connection { Type Wire SrcComponent "i_dc" SrcTerminal 2 Points [245, 280] Branch { Points [375, 280] Branch { Points [420, 280] Branch { Points [455, 280] Branch { Points [520, 280; 520, 160; 585, 160] Branch { DstComponent "Am2" DstTerminal 1 } Branch { DstComponent "Am1" DstTerminal 2 } } Branch { DstComponent "Discharge" DstTerminal 2 } } Branch { DstComponent "ESR" DstTerminal 1 } } Branch { DstComponent "v_dc" DstTerminal 2 } } Branch { DstComponent "VDC-" DstTerminal 1 } } Connection { Type Signal SrcComponent "Product3" SrcTerminal 1 DstComponent "V2" DstTerminal 3 } Connection { Type Signal SrcComponent "Product1" SrcTerminal 1 DstComponent "V1" DstTerminal 3 } Connection { Type Wire SrcComponent "D1" SrcTerminal 3 DstComponent "V2" DstTerminal 1 } Connection { Type Wire SrcComponent "V1" SrcTerminal 2 DstComponent "D1" DstTerminal 1 } Connection { Type Signal SrcComponent "Am2" SrcTerminal 3 Points [315, 260] DstComponent "Product4" DstTerminal 3 } Connection { Type Signal SrcComponent "Product2" SrcTerminal 1 DstComponent "Sum" DstTerminal 2 } Connection { Type Signal SrcComponent "Product4" SrcTerminal 1 DstComponent "Sum" DstTerminal 3 } Connection { Type Signal SrcComponent "Sum" SrcTerminal 1 DstComponent "i_dc" DstTerminal 3 } Connection { Type Wire SrcComponent "i_dc" SrcTerminal 1 Points [245, 40] Branch { DstComponent "VDC+" DstTerminal 1 } Branch { Points [375, 40] Branch { DstComponent "v_dc" DstTerminal 1 } Branch { Points [420, 40] Branch { DstComponent "C" DstTerminal 1 } Branch { Points [455, 40] DstComponent "Discharge" DstTerminal 1 } } } } Connection { Type Signal SrcComponent "Am1" SrcTerminal 3 Points [315, 60] DstComponent "Product2" DstTerminal 3 } Connection { Type Signal SrcComponent "Offset" SrcTerminal 2 Points [305, 85] Branch { DstComponent "Product2" DstTerminal 2 } Branch { DstComponent "Product1" DstTerminal 2 } } Connection { Type Signal SrcComponent "Iac" SrcTerminal 3 Points [675, 105] DstComponent "Si" DstTerminal 1 } Connection { Type Wire SrcComponent "Iac" SrcTerminal 2 DstComponent "AC" DstTerminal 1 } Connection { Type Wire SrcComponent "Iac" SrcTerminal 1 DstComponent "D1" DstTerminal 2 } Connection { Type Signal SrcComponent "Si" SrcTerminal 2 DstComponent "I" DstTerminal 1 } Connection { Type Signal SrcComponent "Sv" SrcTerminal 2 DstComponent "V" DstTerminal 1 } Connection { Type Wire SrcComponent "Am1" SrcTerminal 1 Points [635, 40] DstComponent "V1" DstTerminal 1 } Connection { Type Wire SrcComponent "V2" SrcTerminal 2 Points [635, 280] DstComponent "Am2" DstTerminal 2 } Connection { Type Signal SrcComponent "v_dc" SrcTerminal 3 Points [480, 160] Branch { Points [480, 95] DstComponent "Product1" DstTerminal 3 } Branch { Points [480, 205] Branch { Points [480, 225] DstComponent "Product3" DstTerminal 2 } Branch { DstComponent "Sv" DstTerminal 1 } } } Connection { Type Wire SrcComponent "ESR" SrcTerminal 2 DstComponent "C" DstTerminal 2 } Connection { Type Signal SrcComponent "Demux" SrcTerminal 2 Points [105, 165; 105, 235] Branch { Points [305, 235] Branch { DstComponent "Product4" DstTerminal 2 } Branch { DstComponent "Product3" DstTerminal 3 } } Branch { DstComponent "Data Type\nCheck1" DstTerminal 1 } } Connection { Type Signal SrcComponent "Demux" SrcTerminal 3 Points [105, 155; 105, 85] Branch { DstComponent "Offset" DstTerminal 1 } Branch { DstComponent "Data Type\nCheck" DstTerminal 1 } } } } Parameter { Variable "Configuration" Value "1" Show off } MaskProbe { Name "Gate signals" Probe { Component "s" Path "Ideal model" Signals {"Output"} } Probe { Component "s" Path "Ideal averaged (PLECS)" Signals {"Output"} } } MaskProbe { Name "DC bus voltage (true value)" Probe { Component "Vdc" Path "Ideal model" Signals {"Measured voltage"} } Probe { Component "v_dc" Path "Ideal averaged (PLECS)" Signals {"Measured voltage"} } } MaskProbe { Name "DC bus voltage (sensor signal)" Probe { Component "V" Path "Ideal model" Signals {"Input"} } Probe { Component "V" Path "Ideal averaged (PLECS)" Signals {"Input"} } } MaskProbe { Name "Output current (true value)" Probe { Component "Iac" Path "Ideal model" Signals {"Measured current"} } Probe { Component "Iac" Path "Ideal averaged (PLECS)" Signals {"Measured current"} } } MaskProbe { Name "Output current (sensor signal)" Probe { Component "I" Path "Ideal model" Signals {"Input"} } Probe { Component "I" Path "Ideal averaged (PLECS)" Signals {"Input"} } } } Component { Type ConfigurableSubsystem Name "M3" Show off Position [640, 175] Direction up Flipped off Frame [-25, -50; 25, 50] LabelPosition [-28, 0] LabelAlign right SampleTime "-1" CodeGenSampleTime "NaN" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskType "PEB8032" MaskDisplay "local function drawRectangle(x,y,w,h,color)\n\tIcon:c" "olor(221,4,45)\n\tIcon:line({x,x+w,x+w,x,x},{y,y,y+h,y+h,y})\nend\n\nlocal fu" "nction drawIgbt(x,y)\n\tIcon:line(Vector{0, 0}+x, Vector{-25, -10}+y)\n\tIcon" ":line(Vector{0, 0}+x, Vector{10, 25}+y)\n\tIcon:line(Vector{0, -10}+x, Vector" "{-10, -4}+y)\n\tIcon:line(Vector{-10, 0}+x, Vector{4, 10}+y)\n\tIcon:line(Vec" "tor{-10, -10}+x, Vector{8, -8}+y)\n\tIcon:line(Vector{-14, -14}+x, Vector{8, " "-8}+y)\n\tIcon:line(Vector{-5.65, -1.667, -3.864}+x, Vector{8.634, 9, 5.658}+" "y)\n\tIcon:line(Vector{-14, -20}+x, Vector{0, 0}+y)\n\tIcon:line(Vector{0, 10" ", 10}+x, Vector{-14, -14, -6}+y)\n\tIcon:line(Vector{10, 10, 0}+x, Vector{6, " "14, 14}+y)\n\tIcon:line(Vector{3, 17}+x, Vector{-6, -6}+y)\n\tIcon:line(Vecto" "r{10, 17, 3, 10}+x, Vector{-6, 6, 6, -6}+y)\nend\n\ndrawRectangle(-25,-50,50," "100)\ndrawRectangle(-24,-49,48,98)\nIcon:color(0,0,0)\n\ndrawIgbt(0,25)\ndraw" "Igbt(0,-25)\n\nIcon:line({0,25},{0,0}) --Midpoint outpout\nIcon:line({0,0},{-" "10,10}) --Midpoint interconnection\nIcon:circle(0,0,1)\nIcon:line({0,0},{50,4" "5}) -- +VCC point\nIcon:line({0,0},{-50,-45}) -- -VCC point\n\nIcon:text(0,-6" "5,\"PEB8032\", 'FontSize',9)" MaskDisplayLang "2" MaskIconFrame off MaskIconOpaque off MaskIconRotates on MaskInit "% sensor bandwidth\ntau_i = 1/(200e3*2*pi);\ntau_v = " "1/(50e3*2*pi);\n\n% sensor sensitivities\nS_current = 50e-3;\nS_voltage = 2.5" "e-3;\n\n% DC bus\nCdc = 260e-6;\nResr = 0.02;\nRdis = 100e3;" Parameter { Variable "V0" Prompt "Initial DC bus voltage" Type FreeText Value "DcLink.Vdc0" Show off Tunable off TabName "" } Terminal { Type Input Position [-25, 10] Direction left } Terminal { Type Output Position [29, 30] Direction right } Terminal { Type Port Position [0, -55] Direction up } Terminal { Type Port Position [0, 55] Direction down } Terminal { Type Port Position [30, 0] Direction right } Terminal { Type Output Position [29, 40] Direction right } TerminalNames { "s", "I", "VDC+", "VDC-", "AC", "V" } Location [411, 516; 1241, 854] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Configurations { Name "Ideal model" Schematic { Component { Type Input Name "s" Show on Position [240, 50] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "2" Show off } } Component { Type Output Name "I" Show on Position [510, 95] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "1" Show off } } Component { Type Port Name "AC" Show off Position [485, 150] Direction right Flipped on Parameter { Variable "Index" Value "5" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Ammeter Name "Iac" Show off Position [420, 150] Direction left Flipped off } Component { Type Port Name "VDC+" Show off Position [210, 90] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "VDC-" Show off Position [210, 220] Direction right Flipped off Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type SignalDemux Name "Demux" Show off Position [285, 50] Direction right Flipped on Parameter { Variable "Width" Value "2" Show off } } Component { Type Capacitor Name "C" Show on Position [285, 135] Direction up Flipped off Parameter { Variable "C" Value "Cdc" Show off } Parameter { Variable "v_init" Value "V0" Show off } } Component { Type Gain Name "Si" Show on Position [460, 95] Direction right Flipped off Parameter { Variable "K" Value "S_current" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Voltmeter Name "Vdc" Show off Position [395, 195] Direction up Flipped off } Component { Type Gain Name "Sv" Show on Position [460, 195] Direction right Flipped off Parameter { Variable "K" Value "S_voltage" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Output Name "V" Show on Position [510, 195] Direction right Flipped off Parameter { Variable "Index" Value "6" Show on } Parameter { Variable "Width" Value "1" Show off } } Component { Type Resistor Name "ESR" Show on Position [285, 185] Direction down Flipped off Parameter { Variable "R" Value "0.02" Show off } } Component { Type IgbtWithDiode Name "IGBTD" Show off Position [355, 125] Direction up Flipped off Parameter { Variable "s_init" Value "0" Show off } Parameter { Variable "thermal" Value "" Show off } Parameter { Variable "T_init" Value "0" Show off } } Component { Type IgbtWithDiode Name "IGBTD1" Show off Position [355, 185] Direction up Flipped off Parameter { Variable "s_init" Value "0" Show off } Parameter { Variable "thermal" Value "" Show off } Parameter { Variable "T_init" Value "0" Show off } } Component { Type Resistor Name "Discharge" Show on Position [250, 155] Direction down Flipped off Parameter { Variable "R" Value "Rdis" Show off } } Connection { Type Wire SrcComponent "AC" SrcTerminal 1 DstComponent "Iac" DstTerminal 2 } Connection { Type Signal SrcComponent "s" SrcTerminal 1 DstComponent "Demux" DstTerminal 1 } Connection { Type Signal SrcComponent "Si" SrcTerminal 2 DstComponent "I" DstTerminal 1 } Connection { Type Signal SrcComponent "Iac" SrcTerminal 3 Points [420, 95] DstComponent "Si" DstTerminal 1 } Connection { Type Wire SrcComponent "IGBTD1" SrcTerminal 2 Points [355, 220] Branch { Points [285, 220] Branch { Points [250, 220] Branch { DstComponent "VDC-" DstTerminal 1 } Branch { DstComponent "Discharge" DstTerminal 1 } } Branch { DstComponent "ESR" DstTerminal 1 } } Branch { Points [395, 220] DstComponent "Vdc" DstTerminal 2 } } Connection { Type Wire SrcComponent "IGBTD" SrcTerminal 1 Points [355, 90] Branch { Points [285, 90] Branch { Points [250, 90] Branch { DstComponent "VDC+" DstTerminal 1 } Branch { DstComponent "Discharge" DstTerminal 2 } } Branch { DstComponent "C" DstTerminal 1 } } Branch { Points [395, 90] DstComponent "Vdc" DstTerminal 1 } } Connection { Type Signal SrcComponent "Vdc" SrcTerminal 3 DstComponent "Sv" DstTerminal 1 } Connection { Type Signal SrcComponent "Sv" SrcTerminal 2 DstComponent "V" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux" SrcTerminal 2 Points [320, 45] DstComponent "IGBTD" DstTerminal 3 } Connection { Type Wire SrcComponent "Iac" SrcTerminal 1 Points [355, 150] Branch { DstComponent "IGBTD1" DstTerminal 1 } Branch { DstComponent "IGBTD" DstTerminal 2 } } Connection { Type Signal SrcComponent "Demux" SrcTerminal 3 Points [310, 55; 310, 185] DstComponent "IGBTD1" DstTerminal 3 } Connection { Type Wire SrcComponent "ESR" SrcTerminal 2 DstComponent "C" DstTerminal 2 } } Name "Ideal averaged (PLECS)" Schematic { Component { Type Input Name "s" Show on Position [45, 160] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "2" Show off } } Component { Type Output Name "I" Show on Position [765, 105] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "1" Show off } } Component { Type Port Name "AC" Show off Position [765, 160] Direction right Flipped on Parameter { Variable "Index" Value "5" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "VDC+" Show off Position [95, 40] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "VDC-" Show off Position [95, 280] Direction right Flipped off Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "V" Show on Position [765, 205] Direction right Flipped off Parameter { Variable "Index" Value "6" Show on } Parameter { Variable "Width" Value "1" Show off } } Component { Type SignalDemux Name "Demux" Show off Position [95, 160] Direction left Flipped off Parameter { Variable "Width" Value "2" Show off } } Component { Type Voltmeter Name "v_dc" Show on Position [375, 160] Direction up Flipped off } Component { Type VoltageSource Name "V2" Show on Position [635, 230] Direction down Flipped on Parameter { Variable "DiscretizationBehavior" Value "1" Show off } Parameter { Variable "StateSpaceInlining" Value "1" Show off } } Component { Type VoltageSource Name "V1" Show on Position [635, 90] Direction down Flipped on Parameter { Variable "DiscretizationBehavior" Value "1" Show off } Parameter { Variable "StateSpaceInlining" Value "1" Show off } } Component { Type Product Name "Product1" Show off Position [555, 90] Direction up Flipped off Parameter { Variable "Inputs" Value "2" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Product Name "Product2" Show off Position [310, 120] Direction right Flipped on Parameter { Variable "Inputs" Value "2" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type CurrentSource Name "i_dc" Show on Position [245, 160] Direction up Flipped on Parameter { Variable "DiscretizationBehavior" Value "1" Show off } Parameter { Variable "StateSpaceInlining" Value "1" Show off } } Component { Type Ammeter Name "Am1" Show on Position [585, 60] Direction down Flipped on } Component { Type Offset Name "Offset" Show off Position [196, 85] 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 Product Name "Product3" Show off Position [555, 230] Direction up Flipped off Parameter { Variable "Inputs" Value "2" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Product Name "Product4" Show off Position [310, 200] Direction left Flipped off Parameter { Variable "Inputs" Value "2" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type DiodePair Name "D1" Show on Position [635, 160] Direction up Flipped off } Component { Type Ammeter Name "Am2" Show on Position [585, 260] Direction down Flipped on } Component { Type Sum Name "Sum" Show off Position [310, 160] 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 Reference SrcComponent "Components/Electrical/Power Modules/Boost1/Sub-" "cycle average/Data Type\\nCheck" Name "Data Type\nCheck" Show off Position [55, 85] Direction down Flipped on Frame [-20, -15; 20, 15] LabelPosition [0, 18] LabelAlign up Parameter { Variable "TargetPortIndices" Value "" Show off } Terminal { Type Input Position [-20, 0] Direction left } } Component { Type Reference SrcComponent "Components/Electrical/Power Modules/Boost1/Sub-" "cycle average/Data Type\\nCheck" Name "Data Type\nCheck1" Show off Position [55, 235] Direction down Flipped on Frame [-20, -15; 20, 15] LabelPosition [0, 18] LabelAlign up Parameter { Variable "TargetPortIndices" Value "" Show off } Terminal { Type Input Position [-20, 0] Direction left } } Component { Type Ammeter Name "Iac" Show off Position [675, 160] Direction left Flipped off } Component { Type Gain Name "Si" Show on Position [715, 105] Direction right Flipped off Parameter { Variable "K" Value "S_current" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "Sv" Show on Position [715, 205] Direction right Flipped off Parameter { Variable "K" Value "S_voltage" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Capacitor Name "C" Show on Position [420, 120] Direction up Flipped off Parameter { Variable "C" Value "Cdc" Show off } Parameter { Variable "v_init" Value "V0" Show off } } Component { Type Resistor Name "ESR" Show on Position [420, 205] Direction down Flipped off Parameter { Variable "R" Value "Resr" Show off } } Component { Type Resistor Name "Discharge" Show on Position [455, 135] Direction up Flipped off Parameter { Variable "R" Value "Rdis" Show off } } Connection { Type Signal SrcComponent "s" SrcTerminal 1 DstComponent "Demux" DstTerminal 1 } Connection { Type Wire SrcComponent "i_dc" SrcTerminal 2 Points [245, 280] Branch { Points [375, 280] Branch { Points [420, 280] Branch { Points [455, 280] Branch { Points [520, 280; 520, 160; 585, 160] Branch { DstComponent "Am2" DstTerminal 1 } Branch { DstComponent "Am1" DstTerminal 2 } } Branch { DstComponent "Discharge" DstTerminal 2 } } Branch { DstComponent "ESR" DstTerminal 1 } } Branch { DstComponent "v_dc" DstTerminal 2 } } Branch { DstComponent "VDC-" DstTerminal 1 } } Connection { Type Signal SrcComponent "Product3" SrcTerminal 1 DstComponent "V2" DstTerminal 3 } Connection { Type Signal SrcComponent "Product1" SrcTerminal 1 DstComponent "V1" DstTerminal 3 } Connection { Type Wire SrcComponent "D1" SrcTerminal 3 DstComponent "V2" DstTerminal 1 } Connection { Type Wire SrcComponent "V1" SrcTerminal 2 DstComponent "D1" DstTerminal 1 } Connection { Type Signal SrcComponent "Am2" SrcTerminal 3 Points [315, 260] DstComponent "Product4" DstTerminal 3 } Connection { Type Signal SrcComponent "Product2" SrcTerminal 1 DstComponent "Sum" DstTerminal 2 } Connection { Type Signal SrcComponent "Product4" SrcTerminal 1 DstComponent "Sum" DstTerminal 3 } Connection { Type Signal SrcComponent "Sum" SrcTerminal 1 DstComponent "i_dc" DstTerminal 3 } Connection { Type Wire SrcComponent "i_dc" SrcTerminal 1 Points [245, 40] Branch { DstComponent "VDC+" DstTerminal 1 } Branch { Points [375, 40] Branch { DstComponent "v_dc" DstTerminal 1 } Branch { Points [420, 40] Branch { DstComponent "C" DstTerminal 1 } Branch { Points [455, 40] DstComponent "Discharge" DstTerminal 1 } } } } Connection { Type Signal SrcComponent "Am1" SrcTerminal 3 Points [315, 60] DstComponent "Product2" DstTerminal 3 } Connection { Type Signal SrcComponent "Offset" SrcTerminal 2 Points [305, 85] Branch { DstComponent "Product2" DstTerminal 2 } Branch { DstComponent "Product1" DstTerminal 2 } } Connection { Type Signal SrcComponent "Iac" SrcTerminal 3 Points [675, 105] DstComponent "Si" DstTerminal 1 } Connection { Type Wire SrcComponent "Iac" SrcTerminal 2 DstComponent "AC" DstTerminal 1 } Connection { Type Wire SrcComponent "Iac" SrcTerminal 1 DstComponent "D1" DstTerminal 2 } Connection { Type Signal SrcComponent "Si" SrcTerminal 2 DstComponent "I" DstTerminal 1 } Connection { Type Signal SrcComponent "Sv" SrcTerminal 2 DstComponent "V" DstTerminal 1 } Connection { Type Wire SrcComponent "Am1" SrcTerminal 1 Points [635, 40] DstComponent "V1" DstTerminal 1 } Connection { Type Wire SrcComponent "V2" SrcTerminal 2 Points [635, 280] DstComponent "Am2" DstTerminal 2 } Connection { Type Signal SrcComponent "v_dc" SrcTerminal 3 Points [480, 160] Branch { Points [480, 95] DstComponent "Product1" DstTerminal 3 } Branch { Points [480, 205] Branch { Points [480, 225] DstComponent "Product3" DstTerminal 2 } Branch { DstComponent "Sv" DstTerminal 1 } } } Connection { Type Wire SrcComponent "ESR" SrcTerminal 2 DstComponent "C" DstTerminal 2 } Connection { Type Signal SrcComponent "Demux" SrcTerminal 2 Points [105, 165; 105, 235] Branch { Points [305, 235] Branch { DstComponent "Product4" DstTerminal 2 } Branch { DstComponent "Product3" DstTerminal 3 } } Branch { DstComponent "Data Type\nCheck1" DstTerminal 1 } } Connection { Type Signal SrcComponent "Demux" SrcTerminal 3 Points [105, 155; 105, 85] Branch { DstComponent "Offset" DstTerminal 1 } Branch { DstComponent "Data Type\nCheck" DstTerminal 1 } } } } Parameter { Variable "Configuration" Value "1" Show off } MaskProbe { Name "Gate signals" Probe { Component "s" Path "Ideal model" Signals {"Output"} } Probe { Component "s" Path "Ideal averaged (PLECS)" Signals {"Output"} } } MaskProbe { Name "DC bus voltage (true value)" Probe { Component "Vdc" Path "Ideal model" Signals {"Measured voltage"} } Probe { Component "v_dc" Path "Ideal averaged (PLECS)" Signals {"Measured voltage"} } } MaskProbe { Name "DC bus voltage (sensor signal)" Probe { Component "V" Path "Ideal model" Signals {"Input"} } Probe { Component "V" Path "Ideal averaged (PLECS)" Signals {"Input"} } } MaskProbe { Name "Output current (true value)" Probe { Component "Iac" Path "Ideal model" Signals {"Measured current"} } Probe { Component "Iac" Path "Ideal averaged (PLECS)" Signals {"Measured current"} } } MaskProbe { Name "Output current (sensor signal)" Probe { Component "I" Path "Ideal model" Signals {"Input"} } Probe { Component "I" Path "Ideal averaged (PLECS)" Signals {"Input"} } } } Component { Type ConfigurableSubsystem Name "Vbus" Show on Position [345, 185] Direction up Flipped off Frame [-10, -15; 10, 15] LabelPosition [-13, 0] LabelAlign right SampleTime "-1" CodeGenSampleTime "NaN" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskType "DIN800V" MaskDisplay "Icon:color(221,4,45)\nIcon:circle(0,0,9)\nIcon:circle" "(0,0,10)\n\nIcon:color(0,0,0)\nIcon:line({0,0}, {-20,-10})\nIcon:line({0,0}, " "{20,10})\n\nIcon:line({2,6}, {-15,-15})\nIcon:line({4,4}, {-13,-17})\n\nIcon:" "text(0,-0.,\"V\", 'FontSize',11)" MaskDisplayLang "2" MaskIconFrame off MaskIconOpaque on MaskIconRotates on MaskInit "% sensor bandwidth\ntau = 1/(100e3*2*pi);\n\n% sensor" " sensitivity\nS = 2.46e-3;" Terminal { Type Output Position [14, 0] Direction right } Terminal { Type Port Position [0, -20] Direction up } Terminal { Type Port Position [0, 20] Direction down } TerminalNames { "M", "In", "Out" } Location [632, 343; 1012, 530] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Configurations { Name "Ideal model" Schematic { Component { Type Output Name "M" Show on Position [305, 90] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "1" Show off } } Component { Type Gain Name "Sv" Show on Position [185, 90] Direction right Flipped off Parameter { Variable "K" Value "S" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Port Name "In" Show on Position [130, 45] Direction down Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "Out" Show on Position [130, 135] Direction down Flipped on Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Voltmeter Name "Voltmeter" Show on Position [130, 90] Direction up Flipped off } Connection { Type Signal SrcComponent "Voltmeter" SrcTerminal 3 DstComponent "Sv" DstTerminal 1 } Connection { Type Signal SrcComponent "Sv" SrcTerminal 2 DstComponent "M" DstTerminal 1 } Connection { Type Wire SrcComponent "In" SrcTerminal 1 DstComponent "Voltmeter" DstTerminal 1 } Connection { Type Wire SrcComponent "Out" SrcTerminal 1 DstComponent "Voltmeter" DstTerminal 2 } } Name "First-order model" Schematic { Component { Type Output Name "M" Show on Position [305, 90] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "1" Show off } } Component { Type Port Name "In" Show on Position [130, 45] Direction down Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "Out" Show on Position [130, 135] Direction down Flipped on Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type TransferFunction Name "LPF1" Show off Position [245, 90] Direction right Flipped off Frame [-30, -15; 30, 15] LabelPosition [0, 18] LabelAlign up Parameter { Variable "Numerator" Value "[1]" Show off } Parameter { Variable "Denominator" Value "[tau 1]" Show off } Parameter { Variable "X0" Value "0" Show off } } Component { Type Gain Name "Sv" Show on Position [185, 90] Direction right Flipped off Parameter { Variable "K" Value "S" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Voltmeter Name "Voltmeter" Show on Position [130, 90] Direction up Flipped off } Connection { Type Signal SrcComponent "LPF1" SrcTerminal 2 DstComponent "M" DstTerminal 1 } Connection { Type Signal SrcComponent "Voltmeter" SrcTerminal 3 DstComponent "Sv" DstTerminal 1 } Connection { Type Signal SrcComponent "Sv" SrcTerminal 2 DstComponent "LPF1" DstTerminal 1 } Connection { Type Wire SrcComponent "Voltmeter" SrcTerminal 1 DstComponent "In" DstTerminal 1 } Connection { Type Wire SrcComponent "Voltmeter" SrcTerminal 2 DstComponent "Out" DstTerminal 1 } } } Parameter { Variable "Configuration" Value "2" Show off } MaskProbe { Name "True voltage value" Probe { Component "Voltmeter" Path "Ideal model" Signals {"Measured voltage"} } Probe { Component "Voltmeter" Path "First-order model" Signals {"Measured voltage"} } } MaskProbe { Name "Sensor output" Probe { Component "M" Path "Ideal model" Signals {"Input"} } Probe { Component "M" Path "First-order model" Signals {"Input"} } } } Component { Type PlecsProbe Name "V dc" Show on Position [790, 45] Direction right Flipped off } Component { Type ConfigurableSubsystem Name "M4" Show off Position [210, 185] Direction up Flipped off Frame [-25, -50; 25, 50] LabelPosition [-28, 0] LabelAlign right SampleTime "-1" CodeGenSampleTime "NaN" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskType "PEB8032" MaskDisplay "local function drawRectangle(x,y,w,h,color)\n\tIcon:c" "olor(221,4,45)\n\tIcon:line({x,x+w,x+w,x,x},{y,y,y+h,y+h,y})\nend\n\nlocal fu" "nction drawIgbt(x,y)\n\tIcon:line(Vector{0, 0}+x, Vector{-25, -10}+y)\n\tIcon" ":line(Vector{0, 0}+x, Vector{10, 25}+y)\n\tIcon:line(Vector{0, -10}+x, Vector" "{-10, -4}+y)\n\tIcon:line(Vector{-10, 0}+x, Vector{4, 10}+y)\n\tIcon:line(Vec" "tor{-10, -10}+x, Vector{8, -8}+y)\n\tIcon:line(Vector{-14, -14}+x, Vector{8, " "-8}+y)\n\tIcon:line(Vector{-5.65, -1.667, -3.864}+x, Vector{8.634, 9, 5.658}+" "y)\n\tIcon:line(Vector{-14, -20}+x, Vector{0, 0}+y)\n\tIcon:line(Vector{0, 10" ", 10}+x, Vector{-14, -14, -6}+y)\n\tIcon:line(Vector{10, 10, 0}+x, Vector{6, " "14, 14}+y)\n\tIcon:line(Vector{3, 17}+x, Vector{-6, -6}+y)\n\tIcon:line(Vecto" "r{10, 17, 3, 10}+x, Vector{-6, 6, 6, -6}+y)\nend\n\ndrawRectangle(-25,-50,50," "100)\ndrawRectangle(-24,-49,48,98)\nIcon:color(0,0,0)\n\ndrawIgbt(0,25)\ndraw" "Igbt(0,-25)\n\nIcon:line({0,25},{0,0}) --Midpoint outpout\nIcon:line({0,0},{-" "10,10}) --Midpoint interconnection\nIcon:circle(0,0,1)\nIcon:line({0,0},{50,4" "5}) -- +VCC point\nIcon:line({0,0},{-50,-45}) -- -VCC point\n\nIcon:text(0,-6" "5,\"PEB8032\", 'FontSize',9)" MaskDisplayLang "2" MaskIconFrame off MaskIconOpaque off MaskIconRotates on MaskInit "% sensor bandwidth\ntau_i = 1/(200e3*2*pi);\ntau_v = " "1/(50e3*2*pi);\n\n% sensor sensitivities\nS_current = 50e-3;\nS_voltage = 2.5" "e-3;\n\n% DC bus\nCdc = 260e-6;\nResr = 0.02;\nRdis = 100e3;" Parameter { Variable "V0" Prompt "Initial DC bus voltage" Type FreeText Value "DcLink.Vdc0" Show off Tunable off TabName "" } Terminal { Type Input Position [-25, 10] Direction left } Terminal { Type Output Position [29, 30] Direction right } Terminal { Type Port Position [0, -55] Direction up } Terminal { Type Port Position [0, 55] Direction down } Terminal { Type Port Position [30, 0] Direction right } Terminal { Type Output Position [29, 40] Direction right } TerminalNames { "s", "I", "VDC+", "VDC-", "AC", "V" } Location [411, 516; 1241, 854] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Configurations { Name "Ideal model" Schematic { Component { Type Input Name "s" Show on Position [240, 50] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "2" Show off } } Component { Type Output Name "I" Show on Position [510, 95] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "1" Show off } } Component { Type Port Name "AC" Show off Position [485, 150] Direction right Flipped on Parameter { Variable "Index" Value "5" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Ammeter Name "Iac" Show off Position [420, 150] Direction left Flipped off } Component { Type Port Name "VDC+" Show off Position [210, 90] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "VDC-" Show off Position [210, 220] Direction right Flipped off Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type SignalDemux Name "Demux" Show off Position [285, 50] Direction right Flipped on Parameter { Variable "Width" Value "2" Show off } } Component { Type Capacitor Name "C" Show on Position [285, 135] Direction up Flipped off Parameter { Variable "C" Value "Cdc" Show off } Parameter { Variable "v_init" Value "V0" Show off } } Component { Type Gain Name "Si" Show on Position [460, 95] Direction right Flipped off Parameter { Variable "K" Value "S_current" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Voltmeter Name "Vdc" Show off Position [395, 195] Direction up Flipped off } Component { Type Gain Name "Sv" Show on Position [460, 195] Direction right Flipped off Parameter { Variable "K" Value "S_voltage" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Output Name "V" Show on Position [510, 195] Direction right Flipped off Parameter { Variable "Index" Value "6" Show on } Parameter { Variable "Width" Value "1" Show off } } Component { Type Resistor Name "ESR" Show on Position [285, 185] Direction down Flipped off Parameter { Variable "R" Value "0.02" Show off } } Component { Type IgbtWithDiode Name "IGBTD" Show off Position [355, 125] Direction up Flipped off Parameter { Variable "s_init" Value "0" Show off } Parameter { Variable "thermal" Value "" Show off } Parameter { Variable "T_init" Value "0" Show off } } Component { Type IgbtWithDiode Name "IGBTD1" Show off Position [355, 185] Direction up Flipped off Parameter { Variable "s_init" Value "0" Show off } Parameter { Variable "thermal" Value "" Show off } Parameter { Variable "T_init" Value "0" Show off } } Component { Type Resistor Name "Discharge" Show on Position [250, 155] Direction down Flipped off Parameter { Variable "R" Value "Rdis" Show off } } Connection { Type Wire SrcComponent "AC" SrcTerminal 1 DstComponent "Iac" DstTerminal 2 } Connection { Type Signal SrcComponent "s" SrcTerminal 1 DstComponent "Demux" DstTerminal 1 } Connection { Type Signal SrcComponent "Si" SrcTerminal 2 DstComponent "I" DstTerminal 1 } Connection { Type Signal SrcComponent "Iac" SrcTerminal 3 Points [420, 95] DstComponent "Si" DstTerminal 1 } Connection { Type Wire SrcComponent "IGBTD1" SrcTerminal 2 Points [355, 220] Branch { Points [285, 220] Branch { Points [250, 220] Branch { DstComponent "VDC-" DstTerminal 1 } Branch { DstComponent "Discharge" DstTerminal 1 } } Branch { DstComponent "ESR" DstTerminal 1 } } Branch { Points [395, 220] DstComponent "Vdc" DstTerminal 2 } } Connection { Type Wire SrcComponent "IGBTD" SrcTerminal 1 Points [355, 90] Branch { Points [285, 90] Branch { Points [250, 90] Branch { DstComponent "VDC+" DstTerminal 1 } Branch { DstComponent "Discharge" DstTerminal 2 } } Branch { DstComponent "C" DstTerminal 1 } } Branch { Points [395, 90] DstComponent "Vdc" DstTerminal 1 } } Connection { Type Signal SrcComponent "Vdc" SrcTerminal 3 DstComponent "Sv" DstTerminal 1 } Connection { Type Signal SrcComponent "Sv" SrcTerminal 2 DstComponent "V" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux" SrcTerminal 2 Points [320, 45] DstComponent "IGBTD" DstTerminal 3 } Connection { Type Wire SrcComponent "Iac" SrcTerminal 1 Points [355, 150] Branch { DstComponent "IGBTD1" DstTerminal 1 } Branch { DstComponent "IGBTD" DstTerminal 2 } } Connection { Type Signal SrcComponent "Demux" SrcTerminal 3 Points [310, 55; 310, 185] DstComponent "IGBTD1" DstTerminal 3 } Connection { Type Wire SrcComponent "ESR" SrcTerminal 2 DstComponent "C" DstTerminal 2 } } Name "Ideal averaged (PLECS)" Schematic { Component { Type Input Name "s" Show on Position [45, 160] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "2" Show off } } Component { Type Output Name "I" Show on Position [765, 105] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "1" Show off } } Component { Type Port Name "AC" Show off Position [765, 160] Direction right Flipped on Parameter { Variable "Index" Value "5" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "VDC+" Show off Position [95, 40] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Port Name "VDC-" Show off Position [95, 280] Direction right Flipped off Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "V" Show on Position [765, 205] Direction right Flipped off Parameter { Variable "Index" Value "6" Show on } Parameter { Variable "Width" Value "1" Show off } } Component { Type SignalDemux Name "Demux" Show off Position [95, 160] Direction left Flipped off Parameter { Variable "Width" Value "2" Show off } } Component { Type Voltmeter Name "v_dc" Show on Position [375, 160] Direction up Flipped off } Component { Type VoltageSource Name "V2" Show on Position [635, 230] Direction down Flipped on Parameter { Variable "DiscretizationBehavior" Value "1" Show off } Parameter { Variable "StateSpaceInlining" Value "1" Show off } } Component { Type VoltageSource Name "V1" Show on Position [635, 90] Direction down Flipped on Parameter { Variable "DiscretizationBehavior" Value "1" Show off } Parameter { Variable "StateSpaceInlining" Value "1" Show off } } Component { Type Product Name "Product1" Show off Position [555, 90] Direction up Flipped off Parameter { Variable "Inputs" Value "2" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Product Name "Product2" Show off Position [310, 120] Direction right Flipped on Parameter { Variable "Inputs" Value "2" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type CurrentSource Name "i_dc" Show on Position [245, 160] Direction up Flipped on Parameter { Variable "DiscretizationBehavior" Value "1" Show off } Parameter { Variable "StateSpaceInlining" Value "1" Show off } } Component { Type Ammeter Name "Am1" Show on Position [585, 60] Direction down Flipped on } Component { Type Offset Name "Offset" Show off Position [196, 85] 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 Product Name "Product3" Show off Position [555, 230] Direction up Flipped off Parameter { Variable "Inputs" Value "2" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Product Name "Product4" Show off Position [310, 200] Direction left Flipped off Parameter { Variable "Inputs" Value "2" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type DiodePair Name "D1" Show on Position [635, 160] Direction up Flipped off } Component { Type Ammeter Name "Am2" Show on Position [585, 260] Direction down Flipped on } Component { Type Sum Name "Sum" Show off Position [310, 160] 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 Reference SrcComponent "Components/Electrical/Power Modules/Boost1/Sub-" "cycle average/Data Type\\nCheck" Name "Data Type\nCheck" Show off Position [55, 85] Direction down Flipped on Frame [-20, -15; 20, 15] LabelPosition [0, 18] LabelAlign up Parameter { Variable "TargetPortIndices" Value "" Show off } Terminal { Type Input Position [-20, 0] Direction left } } Component { Type Reference SrcComponent "Components/Electrical/Power Modules/Boost1/Sub-" "cycle average/Data Type\\nCheck" Name "Data Type\nCheck1" Show off Position [55, 235] Direction down Flipped on Frame [-20, -15; 20, 15] LabelPosition [0, 18] LabelAlign up Parameter { Variable "TargetPortIndices" Value "" Show off } Terminal { Type Input Position [-20, 0] Direction left } } Component { Type Ammeter Name "Iac" Show off Position [675, 160] Direction left Flipped off } Component { Type Gain Name "Si" Show on Position [715, 105] Direction right Flipped off Parameter { Variable "K" Value "S_current" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Gain Name "Sv" Show on Position [715, 205] Direction right Flipped off Parameter { Variable "K" Value "S_voltage" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Capacitor Name "C" Show on Position [420, 120] Direction up Flipped off Parameter { Variable "C" Value "Cdc" Show off } Parameter { Variable "v_init" Value "V0" Show off } } Component { Type Resistor Name "ESR" Show on Position [420, 205] Direction down Flipped off Parameter { Variable "R" Value "Resr" Show off } } Component { Type Resistor Name "Discharge" Show on Position [455, 135] Direction up Flipped off Parameter { Variable "R" Value "Rdis" Show off } } Connection { Type Signal SrcComponent "s" SrcTerminal 1 DstComponent "Demux" DstTerminal 1 } Connection { Type Wire SrcComponent "i_dc" SrcTerminal 2 Points [245, 280] Branch { Points [375, 280] Branch { Points [420, 280] Branch { Points [455, 280] Branch { Points [520, 280; 520, 160; 585, 160] Branch { DstComponent "Am2" DstTerminal 1 } Branch { DstComponent "Am1" DstTerminal 2 } } Branch { DstComponent "Discharge" DstTerminal 2 } } Branch { DstComponent "ESR" DstTerminal 1 } } Branch { DstComponent "v_dc" DstTerminal 2 } } Branch { DstComponent "VDC-" DstTerminal 1 } } Connection { Type Signal SrcComponent "Product3" SrcTerminal 1 DstComponent "V2" DstTerminal 3 } Connection { Type Signal SrcComponent "Product1" SrcTerminal 1 DstComponent "V1" DstTerminal 3 } Connection { Type Wire SrcComponent "D1" SrcTerminal 3 DstComponent "V2" DstTerminal 1 } Connection { Type Wire SrcComponent "V1" SrcTerminal 2 DstComponent "D1" DstTerminal 1 } Connection { Type Signal SrcComponent "Am2" SrcTerminal 3 Points [315, 260] DstComponent "Product4" DstTerminal 3 } Connection { Type Signal SrcComponent "Product2" SrcTerminal 1 DstComponent "Sum" DstTerminal 2 } Connection { Type Signal SrcComponent "Product4" SrcTerminal 1 DstComponent "Sum" DstTerminal 3 } Connection { Type Signal SrcComponent "Sum" SrcTerminal 1 DstComponent "i_dc" DstTerminal 3 } Connection { Type Wire SrcComponent "i_dc" SrcTerminal 1 Points [245, 40] Branch { DstComponent "VDC+" DstTerminal 1 } Branch { Points [375, 40] Branch { DstComponent "v_dc" DstTerminal 1 } Branch { Points [420, 40] Branch { DstComponent "C" DstTerminal 1 } Branch { Points [455, 40] DstComponent "Discharge" DstTerminal 1 } } } } Connection { Type Signal SrcComponent "Am1" SrcTerminal 3 Points [315, 60] DstComponent "Product2" DstTerminal 3 } Connection { Type Signal SrcComponent "Offset" SrcTerminal 2 Points [305, 85] Branch { DstComponent "Product2" DstTerminal 2 } Branch { DstComponent "Product1" DstTerminal 2 } } Connection { Type Signal SrcComponent "Iac" SrcTerminal 3 Points [675, 105] DstComponent "Si" DstTerminal 1 } Connection { Type Wire SrcComponent "Iac" SrcTerminal 2 DstComponent "AC" DstTerminal 1 } Connection { Type Wire SrcComponent "Iac" SrcTerminal 1 DstComponent "D1" DstTerminal 2 } Connection { Type Signal SrcComponent "Si" SrcTerminal 2 DstComponent "I" DstTerminal 1 } Connection { Type Signal SrcComponent "Sv" SrcTerminal 2 DstComponent "V" DstTerminal 1 } Connection { Type Wire SrcComponent "Am1" SrcTerminal 1 Points [635, 40] DstComponent "V1" DstTerminal 1 } Connection { Type Wire SrcComponent "V2" SrcTerminal 2 Points [635, 280] DstComponent "Am2" DstTerminal 2 } Connection { Type Signal SrcComponent "v_dc" SrcTerminal 3 Points [480, 160] Branch { Points [480, 95] DstComponent "Product1" DstTerminal 3 } Branch { Points [480, 205] Branch { Points [480, 225] DstComponent "Product3" DstTerminal 2 } Branch { DstComponent "Sv" DstTerminal 1 } } } Connection { Type Wire SrcComponent "ESR" SrcTerminal 2 DstComponent "C" DstTerminal 2 } Connection { Type Signal SrcComponent "Demux" SrcTerminal 2 Points [105, 165; 105, 235] Branch { Points [305, 235] Branch { DstComponent "Product4" DstTerminal 2 } Branch { DstComponent "Product3" DstTerminal 3 } } Branch { DstComponent "Data Type\nCheck1" DstTerminal 1 } } Connection { Type Signal SrcComponent "Demux" SrcTerminal 3 Points [105, 155; 105, 85] Branch { DstComponent "Offset" DstTerminal 1 } Branch { DstComponent "Data Type\nCheck" DstTerminal 1 } } } } Parameter { Variable "Configuration" Value "1" Show off } MaskProbe { Name "Gate signals" Probe { Component "s" Path "Ideal model" Signals {"Output"} } Probe { Component "s" Path "Ideal averaged (PLECS)" Signals {"Output"} } } MaskProbe { Name "DC bus voltage (true value)" Probe { Component "Vdc" Path "Ideal model" Signals {"Measured voltage"} } Probe { Component "v_dc" Path "Ideal averaged (PLECS)" Signals {"Measured voltage"} } } MaskProbe { Name "DC bus voltage (sensor signal)" Probe { Component "V" Path "Ideal model" Signals {"Input"} } Probe { Component "V" Path "Ideal averaged (PLECS)" Signals {"Input"} } } MaskProbe { Name "Output current (true value)" Probe { Component "Iac" Path "Ideal model" Signals {"Measured current"} } Probe { Component "Iac" Path "Ideal averaged (PLECS)" Signals {"Measured current"} } } MaskProbe { Name "Output current (sensor signal)" Probe { Component "I" Path "Ideal model" Signals {"Input"} } Probe { Component "I" Path "Ideal averaged (PLECS)" Signals {"Input"} } } } Component { Type SignalMux Name "Mux" Show off Position [150, 45] Direction right Flipped off Parameter { Variable "Width" Value "2" Show off } } Component { Type Constant Name "Constant" Show off Position [110, 75] 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 XYPlot Name "Flux locus" Show on Position [415, 325] Direction up Flipped off Location [359, 560; 691, 899] State "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAAvsAAAAQAFoAb" "wBvAG0AQQByAGUAYQAAAAAA/////wAAADQA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA" "AA/////wAAAGYA////AAAAAwAAAAAAAAAA/AEAAAAB+wAAABIAVABpAG0AZQBSAGEAbgBnAGUAAAA" "AAP////8AAAB4AP///wAAAUwAAAE4AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQA" "bwBvAGwAQgBhAHIBAAAAAP////8AAAAAAAAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" TimeRange "0.0" ShownPeriods "1" Open "0" Ts "-1" SampleLimit "0" XAxisLabel "Stator flux - Alpha [Wb]" AspectRatioX "1" AspectRatioY "1" PlotStyle "1" ShowLegend "1" Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} } Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} } } Component { Type PlecsProbe Name "Probe3" Show off Position [265, 325] Direction right Flipped off } Component { Type PlecsProbe Name "Probe4" Show off Position [80, 325] Direction right Flipped off } Component { Type Scope Name "DC bus\nquantities" Show on Position [165, 325] Direction up Flipped off Location [6, 560; 356, 899] State "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb" "wBvAG0AQQByAGUAYQAAAAAA/////wAAAIQA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA" "AA/////wAAAGYA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABmAP///wAAAAMAAAAAAAA" "AAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABQAP///wAAAV4AAAE4" "AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA" "AAAAAAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL/gMAAAAJA" "AAACQAAAGQAAAAIAAAAZAAAAAUAAABkAAAABAAAAGQAAAAHAAAAZAAAAAYAAABkAAAAAQAAAGQAAA" "ADAAAAZAAAAAIAAABkAAAAxwAAAAsBAAABAAAAAAAAAAAAAAAAZP////8AAACBAAAAAAAAAAsAAAC" "gAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAA" "AAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAA" "AAAAAAnAAAAAQAAAAAAAAPoAAAAACc=" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "QAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "AAAA==" Axes "3" TimeRange "0" ScrollingMode "1" SingleTimeAxis "1" Open "0" Ts "-1" SampleLimit "0" XAxisLabel "Time [s]" ShowLegend "1" Axis { Name "DC bus voltage" AutoScale 0 MinValue 0 MaxValue 400 Signals {} SignalTypes [ ] AxisLabel "Voltage [V]" Untangle 0 KeepBaseline on BaselineValue 0 } Axis { Name "DC source current" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] AxisLabel "Current [A]" Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Braking chopper current" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] AxisLabel "Current [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 } Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} Untangle 0 KeepBaseline off BaselineValue 0 } } } Component { Type SignalDemux Name "Demux5" Show off Position [125, 325] Direction right Flipped on Parameter { Variable "Width" Value "3" Show off } } Component { Type SignalDemux Name "Demux3" Show off Position [380, 325] Direction right Flipped on Parameter { Variable "Width" Value "2" Show off } } Component { Type Reference SrcComponent "Components/Control/Transformations/RRF->SRF" Name "RRF->SRF" Show off Position [340, 325] 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 "Demux4" Show off Position [305, 325] Direction right Flipped on Parameter { Variable "Width" Value "[2 1]" Show off } } Component { Type PlecsProbe Name "Is abc" Show on Position [790, 115] Direction right Flipped off } Component { Type ControlledTorque Name "Torque" Show on Position [935, 365] Direction right Flipped on Parameter { Variable "SecondFlange" Value "1" Show off } Parameter { Variable "StateSpaceInlining" Value "1" Show off } } Component { Type RotationalSpeedSensor Name "Speed\nSensor" Show on Position [820, 365] Direction right Flipped off Parameter { Variable "SecondFlange" Value "1" Show off } } Component { Type Gain Name "Gain" Show off Position [875, 365] Direction right Flipped off Parameter { Variable "K" Value "-Pmsm.Temn/Pmsm.wsn" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Output Name "BusVoltage" Show on Position [875, 45] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "StatorCurrents" Show on Position [875, 115] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "RotorAngle" Show on Position [875, 190] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "InverterGates" Show on Position [300, 35] Direction right Flipped off Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "BrakingGate" Show on Position [80, 40] Direction right Flipped off Parameter { Variable "Index" Value "5" Show on } Parameter { Variable "Width" Value "-1" Show off } } Connection { Type Wire SrcComponent "D1" SrcTerminal 1 DstComponent "V_dc" DstTerminal 1 } Connection { Type Wire SrcComponent "V_dc" SrcTerminal 2 DstComponent "Am3" DstTerminal 2 } Connection { Type Wire SrcComponent "3ph Meter" SrcTerminal 4 DstComponent "PMSM" DstTerminal 1 } Connection { Type Wire SrcComponent "PMSM" SrcTerminal 2 DstComponent "3ph Meter" DstTerminal 5 } Connection { Type Wire SrcComponent "3ph Meter" SrcTerminal 6 DstComponent "PMSM" DstTerminal 3 } Connection { Type Signal SrcComponent "Probe1" SrcTerminal 1 DstComponent "Demux2" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux2" SrcTerminal 3 DstComponent "Machine current\nand speed" DstTerminal 2 } Connection { Type Wire SrcComponent "M1" SrcTerminal 3 Points [420, 90] Branch { Points [530, 90] Branch { Points [640, 90] DstComponent "M3" DstTerminal 3 } Branch { DstComponent "M2" DstTerminal 3 } } Branch { Points [345, 90] Branch { Points [210, 90] Branch { Points [55, 90] DstComponent "D1" DstTerminal 2 } Branch { DstComponent "M4" DstTerminal 3 } } Branch { DstComponent "Vbus" DstTerminal 2 } } } Connection { Type Wire SrcComponent "M1" SrcTerminal 5 Points [460, 185; 460, 275] DstComponent "3ph Meter" DstTerminal 1 } Connection { Type Wire SrcComponent "M2" SrcTerminal 5 Points [570, 180; 570, 285] DstComponent "3ph Meter" DstTerminal 2 } Connection { Type Wire SrcComponent "M3" SrcTerminal 5 Points [680, 175] DstComponent "3ph Meter" DstTerminal 3 } Connection { Type Signal SrcComponent "V dc" SrcTerminal 1 DstComponent "BusVoltage" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux1" SrcTerminal 2 Points [380, 25] DstComponent "M1" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux1" SrcTerminal 3 Points [490, 35] DstComponent "M2" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux1" SrcTerminal 4 Points [600, 45] DstComponent "M3" DstTerminal 1 } Connection { Type Signal SrcComponent "Constant" SrcTerminal 1 Points [130, 75; 130, 50] DstComponent "Mux" DstTerminal 3 } Connection { Type Signal SrcComponent "BrakingGate" SrcTerminal 1 DstComponent "Mux" DstTerminal 2 } Connection { Type Signal SrcComponent "Mux" SrcTerminal 1 Points [170, 45] DstComponent "M4" DstTerminal 1 } Connection { Type Signal SrcComponent "Probe4" SrcTerminal 1 DstComponent "Demux5" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux5" SrcTerminal 2 DstComponent "DC bus\nquantities" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux5" SrcTerminal 3 DstComponent "DC bus\nquantities" DstTerminal 2 } Connection { Type Signal SrcComponent "Demux5" SrcTerminal 4 DstComponent "DC bus\nquantities" DstTerminal 3 } Connection { Type Signal SrcComponent "RRF->SRF" SrcTerminal 2 DstComponent "Demux3" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux4" SrcTerminal 2 DstComponent "RRF->SRF" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux4" SrcTerminal 3 DstComponent "RRF->SRF" DstTerminal 3 } Connection { Type Signal SrcComponent "Probe3" SrcTerminal 1 DstComponent "Demux4" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux3" SrcTerminal 2 DstComponent "Flux locus" DstTerminal 2 } Connection { Type Signal SrcComponent "Demux3" SrcTerminal 3 DstComponent "Flux locus" DstTerminal 1 } Connection { Type Signal SrcComponent "Is abc" SrcTerminal 1 DstComponent "StatorCurrents" DstTerminal 1 } Connection { Type Wire SrcComponent "Rchopper" SrcTerminal 1 DstComponent "M4" DstTerminal 5 } Connection { Type Wire SrcComponent "Rchopper" SrcTerminal 2 DstComponent "Am1" DstTerminal 1 } Connection { Type Wire SrcComponent "Vbus" SrcTerminal 3 Points [345, 260] Branch { Points [420, 260] Branch { DstComponent "M1" DstTerminal 4 } Branch { Points [530, 260] Branch { DstComponent "M2" DstTerminal 4 } Branch { Points [640, 260] DstComponent "M3" DstTerminal 4 } } } Branch { Points [265, 260] Branch { Points [210, 260] Branch { DstComponent "M4" DstTerminal 4 } Branch { Points [55, 260] DstComponent "Am3" DstTerminal 1 } } Branch { DstComponent "Am1" DstTerminal 2 } } } Connection { Type Signal SrcComponent "InverterGates" SrcTerminal 1 DstComponent "Demux1" DstTerminal 1 } Connection { Type Signal SrcComponent "PMSM meas" SrcTerminal 1 DstComponent "RotorAngle" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux2" SrcTerminal 2 DstComponent "Machine current\nand speed" DstTerminal 1 } Connection { Type Rotational SrcComponent "Torque" SrcTerminal 1 Points [935, 315; 820, 315] Branch { DstComponent "PMSM" DstTerminal 4 } Branch { DstComponent "Speed\nSensor" DstTerminal 1 } } Connection { Type Signal SrcComponent "Speed\nSensor" SrcTerminal 2 DstComponent "Gain" DstTerminal 1 } Connection { Type Signal SrcComponent "Gain" SrcTerminal 2 DstComponent "Torque" DstTerminal 2 } Annotation { Name "Permanent Magnet Synchronous Motor (PMSM) Drive\nimpe" "rix Ltd. 2021" Position [360, 400] } } } Component { Type Subsystem Name "B-Box RCP" Show on Position [180, 110] Direction up Flipped off Frame [-85, -35; 85, 35] LabelPosition [0, 38] LabelAlign up TreatAsAtomicUnit on SampleTime "-1" TaskingMode "1" CodeGenEnable on CodeGenSampleTime "ControlPeriod" CodeGenDiscretizationMethod "2" CodeGenTarget "Imperix Controllers" CodeGenTargetSettings "AAAAfwAAAAAlUU1hcDxRU3RyaW5nLFFNYXA8UVN0cmluZyxRU" "3RyaW5nPiA+AAAAAAEAAAAmAEkAbQBwAGUAcgBpAHgAIABDAG8AbgB0AHIAbwBsAGwAZQByAHMAAA" "ABAAAAGgBjAGEAbgBfAGIAYQB1AGQAXwByAGEAdABlAAAADgAxADAAMAAwADAAMAAw" MaskDisplayLang "2" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Input Position [-85, -15] Direction left Index "1" } Terminal { Type Input Position [-85, 0] Direction left Index "2" } Terminal { Type Input Position [-85, 15] Direction left Index "3" } Terminal { Type Output Position [89, -10] Direction right Index "1" } Terminal { Type Output Position [89, 10] Direction right Index "2" } Schematic { Location [6, 36; 1093, 596] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Reference SrcComponent "Imperix_Control/Configuration" Name "Configuration" Show on Position [50, 65] Direction up Flipped off Frame [-30, -30; 30, 30] LabelPosition [0, 33] LabelAlign up Parameter { Variable "clock_freq" Value "ControlFreq" Show off } Parameter { Variable "phase" Value "0.5" Show off } Parameter { Variable "postscaler" Value "0" Show off } Parameter { Variable "cycle_delay" Value "ControlPeriod*0.2" Show off } Parameter { Variable "TargetPortIndices" Value "" Show off } Terminal { Type EventOutput Position [34, -15] Direction right } Terminal { Type EventOutput Position [34, 5] Direction right } Terminal { Type EventOutput Position [34, -5] Direction right } } Component { Type Reference SrcComponent "Imperix_Control/Control Task Trigger" Name "Control Task\nTrigger" Show on Position [140, 50] Direction left Flipped on } Component { Type Reference SrcComponent "Imperix_Control/ADC" Name "BusVoltage" Show on Position [180, 125] Direction up Flipped off Frame [-30, -25; 30, 25] LabelPosition [0, 28] LabelAlign up Parameter { Variable "device" Value "0" Show off } Parameter { Variable "channel" Value "0" Show off } Parameter { Variable "sensor" Value "2" Show off } Parameter { Variable "sensor_gain" Value "0.00246" Show off } Parameter { Variable "sensor_offset" Value "0.0" Show off } Parameter { Variable "analog_gain" Value "3" Show off } Parameter { Variable "TargetPortIndices" Value "1" Show off } Terminal { Type Output Position [34, 0] Direction right } Terminal { Type EventInput Position [-30, 15] Direction left } } Component { Type Reference SrcComponent "Imperix_Control/ADC" Name "StatorCurrents" Show on Position [180, 205] Direction up Flipped off Frame [-30, -25; 30, 25] LabelPosition [0, 28] LabelAlign up Parameter { Variable "device" Value "0" Show off } Parameter { Variable "channel" Value "1:3" Show off } Parameter { Variable "sensor" Value "7" Show off } Parameter { Variable "sensor_gain" Value "0.05" Show off } Parameter { Variable "sensor_offset" Value "0.0" Show off } Parameter { Variable "analog_gain" Value "2" Show off } Parameter { Variable "TargetPortIndices" Value "2" Show off } Terminal { Type Output Position [34, 0] Direction right } Terminal { Type EventInput Position [-30, 15] Direction left } } Component { Type Reference SrcComponent "Imperix_Control/DEC" Name "RotorAngle" Show on Position [180, 285] Direction up Flipped off Frame [-30, -25; 30, 25] LabelPosition [0, 28] LabelAlign up Parameter { Variable "device" Value "0" Show off } Parameter { Variable "input_mode" Value "2" Show off } Parameter { Variable "module_single" Value "1" Show off } Parameter { Variable "module_diff" Value "1" Show off } Parameter { Variable "ppr" Value "PPR" Show off } Parameter { Variable "reset_mode" Value "1" Show off } Parameter { Variable "direction" Value "1" Show off } Parameter { Variable "invert" Value "1" Show off } Parameter { Variable "TargetPortIndices" Value "3" Show off } Terminal { Type Output Position [34, 0] Direction right } Terminal { Type EventInput Position [-30, 15] Direction left } } Component { Type Subsystem Name "Speed/position" Show on Position [410, 295] Direction up Flipped off Frame [-35, -25; 35, 25] LabelPosition [0, 28] LabelAlign up SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskDisplayLang "2" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Input Position [-35, -10] Direction left } Terminal { Type Output Position [39, 15] Direction right } Terminal { Type Output Position [39, 0] Direction right } Terminal { Type Output Position [39, -15] Direction right } Terminal { Type Input Position [-35, 10] Direction left } Schematic { Location [7, 36; 443, 339] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Input Name base64 "zrht" Show on Position [50, 45] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name base64 "zrhz" Show on Position [320, 45] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name base64 "z4lz" Show on Position [320, 125] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name base64 "z4lt" Show on Position [320, 195] Direction right Flipped off Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "reset" Show on Position [50, 135] Direction right Flipped off Parameter { Variable "Index" Value "5" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Gain Name "Mechanical to\nelectrical" Show on Position [255, 45] Direction right Flipped off Parameter { Variable "K" Value "Pmsm.p" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Subsystem Name "Angle to speed" Show on Position [150, 125] Direction up Flipped off Frame [-30, -20; 30, 20] LabelPosition [0, 23] LabelAlign up SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskDescription "Compute the derivative of the rotor angle to es" "timate the speed." MaskDisplayLang "2" MaskIconFrame on MaskIconOpaque off MaskIconRotates on MaskInit "wc = 2*pi*fc;" Parameter { Variable "Ts" Prompt "Discretization period [s]" Type FreeText Value "SamplingPeriod" Show off Tunable off TabName "" } Parameter { Variable "fc" Prompt "Filter cutoff frequency [Hz]" Type FreeText Value "Speed.fc" Show off Tunable off TabName "" } Terminal { Type Input Position [-30, -5] Direction left } Terminal { Type Output Position [34, 0] Direction right } Terminal { Type Input Position [-30, 10] Direction left } Schematic { Location [10, 42; 698, 228] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type SignalMux Name "Mux" Show off Position [195, 55] Direction right Flipped off Parameter { Variable "Width" Value "2" Show off } } Component { Type Function Name "Discontinuity\ncompensation" Show on Position [270, 55] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "f(u)" Value "u[1] + 2*pi*((u[1]-u[2])<-pi) - 2*pi*((u[1]" "-u[2])>pi)" Show off } } Component { Type Product Name "Divide" Show off Position [415, 60] Direction up Flipped off Parameter { Variable "Inputs" Value "*/" Show off } Parameter { Variable "DataType" Value "11" Show off } } Component { Type Constant Name "Constant" Show off Position [355, 100] Direction right Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Value" Value "Ts" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Delay Name "Delay" Show off Position [130, 100] Direction right Flipped off Parameter { Variable "N" Value "1" Show off } Parameter { Variable "X0" Value "0" Show off } Parameter { Variable "Ts" Value "Ts" Show off } } Component { Type Input Name base64 "zrht" Show on Position [55, 50] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name base64 "z4lt" Show on Position [590, 65] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "reset" Show on Position [430, 100] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Subsystem Name "IIR LPF" Show on Position [515, 65] Direction up Flipped off Frame [-30, -20; 30, 20] LabelPosition [0, 23] LabelAlign up SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskDisplayLang "2" MaskIconFrame on MaskIconOpaque off MaskIconRotates on MaskInit "alpha = Ts / (1 / (2*pi*fc) + Ts);" Parameter { Variable "fc" Prompt "Filter cutoff frequency [Hz]" Type FreeText Value "fc" Show off Tunable off TabName "" } Parameter { Variable "Ts" Prompt "Sample time [s]" Type FreeText Value "Ts" Show off Tunable off TabName "" } Terminal { Type Input Position [-30, -5] Direction left } Terminal { Type Output Position [34, 0] Direction right } Terminal { Type Input Position [-30, 5] Direction left } Schematic { Location [7, 41; 502, 253] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Input Name "u" Show on Position [60, 80] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "y" Show on Position [410, 80] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "reset" Show on Position [355, 135] Direction left Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Subsystem Name "Delay" Show on Position [285, 125] Direction down Flipped off Frame [-15, -15; 15, 15] LabelPosition [0, 18] LabelAlign up SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskDisplayLang "2" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Input Position [-15, 0] Direction left } Terminal { Type Output Position [19, 0] Direction right } Terminal { Type Input Position [-15, -10] Direction left } Schematic { Location [12, 42; 295, 210] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Input Name "u" Show off Position [60, 80] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "y" Show off Position [225, 85] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "reset" Show on Position [60, 120] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type CScript Name "C-Script" Show on Position [155, 85] Direction up Flipped off Parameter { Variable "DialogGeometry" Value "[524 593 422 314]" Show off } Parameter { Variable "NumInputs" Value "[1 1]" Show off } Parameter { Variable "NumOutputs" Value "1" Show off } Parameter { Variable "NumContStates" Value "0" Show off } Parameter { Variable "NumDiscStates" Value "1" Show off } Parameter { Variable "NumZCSignals" Value "0" Show off } Parameter { Variable "DirectFeedthrough" Value "0" Show off } Parameter { Variable "Ts" Value "-1" Show off } Parameter { Variable "Parameters" Value "" 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 "" Show off } Parameter { Variable "StartFcn" Value "" Show off } Parameter { Variable "OutputFcn" Value "OutputSignal(0, 0) = DiscState(0);" Show off } Parameter { Variable "UpdateFcn" Value "if (InputSignal(1, 0) > 0.0)\n\tDis" "cState(0) = 0.0;\nelse\n\tDiscState(0) = InputSignal(0, 0);" Show off } Parameter { Variable "DerivativeFcn" Value "" Show off } Parameter { Variable "TerminateFcn" Value "" Show off } } Connection { Type Signal SrcComponent "C-Script" SrcTerminal 3 DstComponent "y" DstTerminal 1 } Connection { Type Signal SrcComponent "u" SrcTerminal 1 DstComponent "C-Script" DstTerminal 1 } Connection { Type Signal SrcComponent "reset" SrcTerminal 1 Points [85, 120; 85, 90] DstComponent "C-Script" DstTerminal 2 } } } Component { Type Gain Name "Gain" Show off Position [115, 80] Direction right Flipped off Parameter { Variable "K" Value "alpha" Show on } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Sum Name "Sum" Show off Position [190, 80] 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 "Gain1" Show off Position [220, 125] Direction right Flipped on Parameter { Variable "K" Value "1-alpha" Show on } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "10" Show off } } Connection { Type Signal SrcComponent "u" SrcTerminal 1 DstComponent "Gain" DstTerminal 1 } Connection { Type Signal SrcComponent "Gain" SrcTerminal 2 DstComponent "Sum" DstTerminal 2 } Connection { Type Signal SrcComponent "Delay" SrcTerminal 2 DstComponent "Gain1" DstTerminal 1 } Connection { Type Signal SrcComponent "Gain1" SrcTerminal 2 Points [190, 125] DstComponent "Sum" DstTerminal 3 } Connection { Type Signal SrcComponent "Sum" SrcTerminal 1 Points [315, 80] Branch { DstComponent "y" DstTerminal 1 } Branch { DstComponent "Delay" DstTerminal 1 } } Connection { Type Signal SrcComponent "reset" SrcTerminal 1 DstComponent "Delay" DstTerminal 3 } } } Component { Type Sum Name "Sum" Show off Position [330, 55] Direction up Flipped off Parameter { Variable "IconShape" Value "2" Show off } Parameter { Variable "Inputs" Value "|+-" Show off } Parameter { Variable "DataType" Value "10" Show off } } Connection { Type Signal SrcComponent base64 "zrht" SrcTerminal 1 Points [95, 50] Branch { DstComponent "Mux" DstTerminal 2 } Branch { Points [95, 100] DstComponent "Delay" DstTerminal 1 } } Connection { Type Signal SrcComponent "Delay" SrcTerminal 2 Points [165, 100] Branch { Points [165, 60] DstComponent "Mux" DstTerminal 3 } Branch { Points [330, 100] DstComponent "Sum" DstTerminal 3 } } Connection { Type Signal SrcComponent "Constant" SrcTerminal 1 Points [385, 100] DstComponent "Divide" DstTerminal 3 } Connection { Type Signal SrcComponent "Mux" SrcTerminal 1 DstComponent "Discontinuity\ncompensation" DstTerminal 1 } Connection { Type Signal SrcComponent "Discontinuity\ncompensation" SrcTerminal 2 DstComponent "Sum" DstTerminal 2 } Connection { Type Signal SrcComponent "reset" SrcTerminal 1 Points [460, 100; 460, 70] DstComponent "IIR LPF" DstTerminal 3 } Connection { Type Signal SrcComponent "Divide" SrcTerminal 1 DstComponent "IIR LPF" DstTerminal 1 } Connection { Type Signal SrcComponent "IIR LPF" SrcTerminal 2 DstComponent base64 "z4lt" DstTerminal 1 } Connection { Type Signal SrcComponent "Sum" SrcTerminal 1 DstComponent "Divide" DstTerminal 2 } } } Component { Type Gain Name "Mechanical to\nelectrical1" Show on Position [255, 125] Direction right Flipped off Parameter { Variable "K" Value "Pmsm.p" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Reference SrcComponent "Imperix_Control/Probe variable" Name "Probe variable3" Show off Position [325, 245] Direction up Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 18] LabelAlign up Parameter { Variable "name" Value "speed_rpm" Show off Evaluate off } Parameter { Variable "TargetPortIndices" Value "" Show off } Terminal { Type Input Position [-10, 0] Direction left } } Component { Type Gain Name "rad/s->rpm" Show on Position [270, 245] Direction right Flipped off Parameter { Variable "K" Value "30/pi" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "10" Show off } } Connection { Type Signal SrcComponent base64 "zrht" SrcTerminal 1 Points [80, 45] Branch { DstComponent "Mechanical to\nelectrical" DstTerminal 1 } Branch { Points [80, 120] DstComponent "Angle to speed" DstTerminal 1 } } Connection { Type Signal SrcComponent "Mechanical to\nelectrical" SrcTerminal 2 DstComponent base64 "zrhz" DstTerminal 1 } Connection { Type Signal SrcComponent "Mechanical to\nelectrical1" SrcTerminal 2 DstComponent base64 "z4lz" DstTerminal 1 } Connection { Type Signal SrcComponent "Angle to speed" SrcTerminal 2 Points [215, 125] Branch { DstComponent "Mechanical to\nelectrical1" DstTerminal 1 } Branch { Points [215, 195] Branch { DstComponent base64 "z4lt" DstTerminal 1 } Branch { Points [215, 245] DstComponent "rad/s->rpm" DstTerminal 1 } } } Connection { Type Signal SrcComponent "reset" SrcTerminal 1 DstComponent "Angle to speed" DstTerminal 3 } Connection { Type Signal SrcComponent "rad/s->rpm" SrcTerminal 2 DstComponent "Probe variable3" DstTerminal 1 } } } Component { Type Sum Name "Sum" Show off Position [325, 285] 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 Reference SrcComponent "Imperix_Control/Tunable parameter" Name "Tunable parameter" Show off Position [290, 370] Direction up Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "name" Value "angle_offset" Show off Evaluate off } Parameter { Variable "initial_value" Value "0" Show off } Parameter { Variable "sim_output" Value "1" Show off } Parameter { Variable "step_time" Value "[1 2]" Show off } Parameter { Variable "step_data" Value "[0 1]" Show off } Parameter { Variable "TargetPortIndices" Value "" Show off } Terminal { Type Output Position [14, 0] Direction right } } Component { Type Reference SrcComponent "Imperix_Control/Core state" Name "Core state" Show on Position [295, 470] Direction up Flipped off Frame [-25, -15; 25, 15] LabelPosition [0, 18] LabelAlign up Parameter { Variable "core_state_visibility" Value "2" Show off } Parameter { Variable "reset_visibility" Value "1" Show off } Parameter { Variable "TargetPortIndices" Value "" Show off } Terminal { Type Output Position [29, -5] Direction right } Terminal { Type Output Position [29, 0] Direction right } } Component { Type Subsystem Name "Speed Control" Show on Position [525, 195] Direction up Flipped off Frame [-40, -40; 40, 40] LabelPosition [0, -43] LabelAlign down SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskDisplayLang "2" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Input Position [-40, -25] Direction left } Terminal { Type Output Position [44, 25] Direction right } Terminal { Type Input Position [-40, -10] Direction left } Terminal { Type Input Position [-40, 25] Direction left } Schematic { Location [12, 34; 442, 273] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Input Name base64 "z4ltKg==" Show on Position [50, 105] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "Tem*" Show on Position [370, 105] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name base64 "z4lt" Show on Position [50, 150] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "reset" Show on Position [50, 185] Direction right Flipped off Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Reference SrcComponent "Components/Control/Discrete/Discrete PID\\nContro" "ller" Name "Discrete PID\nController" Show on Position [275, 105] 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 "Speed.Kp" Show off } Parameter { Variable "ki" Value "Speed.Ki" Show off } Parameter { Variable "kd" Value "1" Show off } Parameter { Variable "kf" Value "1" Show off } Parameter { Variable "ex_reset" Value "5" 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 "int_method" Value "1" Show off } Parameter { Variable "t_sample" Value "ControlPeriod" Show off } Parameter { Variable "up_limit" Value "Speed.Tem_sat" Show off } Parameter { Variable "low_limit" Value "-Speed.Tem_sat" Show off } Parameter { Variable "aw_method" Value "2" Show off } Parameter { Variable "kbc" Value "Speed.Kp/Speed.Ki" 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 Sum Name "Sum" Show off Position [180, 105] 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 Scope Name "Speed\ntracking" Show on Position [255, 35] Direction up Flipped off Location [5, 34; 428, 389] State "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQA" "FoAbwBvAG0AQQByAGUAYQAAAAAA/////wAAADQA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcw" "AAAAAA/////wAAAGYA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABmAP///wAAAAMAAAA" "AAAAAAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABQAP///wAAAacA" "AAFIAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP///" "/8AAAAAAAAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL/gMAA" "AAJAAAACQAAAGQAAAAIAAAAZAAAAAUAAABkAAAABAAAAGQAAAAHAAAAZAAAAAYAAABkAAAAAQAAAG" "QAAAADAAAAZAAAAAIAAABkAAAAxQAAAAsBAAABAAAAAAAAAAAAAAAAZP////8AAACBAAAAAAAAAAs" "AAACeAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAA" "AAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAA" "QAAAAAAAAAnAAAAAQAAAAAAAAPoAAAAACc=" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" Axes "1" TimeRange "0" ScrollingMode "1" SingleTimeAxis "1" Open "0" Ts "-1" SampleLimit "0" XAxisLabel "" ShowLegend "2" Axis { Name "Rotor mechanical speed" AutoScale 1 MinValue 0 MaxValue 1 Signals {"Reference", "Measured"} SignalTypes [ ] AxisLabel "Speed [rad/s]" 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 {"Reference", "Measured"} Untangle 0 KeepBaseline off BaselineValue 0 } } } Component { Type SignalMux Name "Mux" Show off Position [210, 35] Direction right Flipped off Parameter { Variable "Width" Value "2" Show off } } Component { Type RateLimiter Name "Rate Limiter" Show on Position [105, 105] Direction right Flipped off Parameter { Variable "RisingRateLimit" Value "7000*pi/30" Show off } Parameter { Variable "FallingRateLimit" Value "-7000*pi/30" Show off } Parameter { Variable "SampleTimeMode" Value "1" Show off } } Connection { Type Signal SrcComponent "Sum" SrcTerminal 1 DstComponent "Discrete PID\nController" DstTerminal 1 } Connection { Type Signal SrcComponent "reset" SrcTerminal 1 Points [205, 185; 205, 115] DstComponent "Discrete PID\nController" DstTerminal 7 } Connection { Type Signal SrcComponent "Discrete PID\nController" SrcTerminal 2 DstComponent "Tem*" DstTerminal 1 } Connection { Type Signal SrcComponent "Mux" SrcTerminal 1 DstComponent "Speed\ntracking" DstTerminal 1 } Connection { Type Signal SrcComponent base64 "z4ltKg==" SrcTerminal 1 DstComponent "Rate Limiter" DstTerminal 1 } Connection { Type Signal SrcComponent "Rate Limiter" SrcTerminal 2 Points [145, 105] Branch { DstComponent "Sum" DstTerminal 2 } Branch { Points [145, 30] DstComponent "Mux" DstTerminal 2 } } Connection { Type Signal SrcComponent base64 "z4lt" SrcTerminal 1 Points [155, 150] Branch { Points [155, 40] DstComponent "Mux" DstTerminal 3 } Branch { Points [180, 150] DstComponent "Sum" DstTerminal 3 } } } } Component { Type Subsystem Name "Torque Control" Show on Position [650, 265] Direction up Flipped off Frame [-45, -80; 45, 80] LabelPosition [0, 83] LabelAlign up SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskDisplayLang "2" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Input Position [-45, -45] Direction left } Terminal { Type Output Position [49, -5] Direction right } Terminal { Type Input Position [-45, -70] Direction left } Terminal { Type Input Position [-45, 65] Direction left } Terminal { Type Input Position [-45, 30] Direction left } Terminal { Type Input Position [-45, 45] Direction left } Terminal { Type Input Position [-45, -10] Direction left } Schematic { Location [5, 38; 587, 338] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Input Name "Tem*" Show on Position [55, 65] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "Vs_abc*" Show on Position [515, 170] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "Vdc" Show on Position [290, 75] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "reset" Show on Position [255, 215] Direction right Flipped off Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name base64 "z4lz" Show on Position [255, 185] Direction right Flipped off Parameter { Variable "Index" Value "5" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name base64 "zrhz" Show on Position [55, 245] Direction right Flipped off Parameter { Variable "Index" Value "6" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Gain Name "Tem -> Iq" Show on Position [115, 65] Direction right Flipped off Parameter { Variable "K" Value "2/(3*Pmsm.p*Pmsm.Phi_pm)" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type SignalMux Name "Mux" Show off Position [195, 60] Direction right Flipped off Parameter { Variable "Width" Value "2" Show off } } Component { Type Constant Name "Id*" Show on Position [150, 35] 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 Input Name "Is_abc" Show on Position [55, 145] Direction right Flipped off Parameter { Variable "Index" Value "7" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Reference SrcComponent "Components/Control/Transformations/3ph->RRF" Name "3ph->RRF" Show off Position [185, 150] 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 Subsystem Name "DQ current control" Show on Position [335, 170] Direction up Flipped off Frame [-45, -55; 45, 55] LabelPosition [0, 58] LabelAlign up SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskDisplayLang "2" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Input Position [-10, -55] Direction up } Terminal { Type Output Position [49, -5] Direction right } Terminal { Type Input Position [-45, -40] Direction left } Terminal { Type Input Position [-45, -20] Direction left } Terminal { Type Input Position [-45, 15] Direction left } Terminal { Type Input Position [-45, 45] Direction left } Schematic { Location [2, 37; 658, 557] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Input Name "Vdc" Show on Position [80, 405] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "Vdq*" Show on Position [595, 235] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Reference SrcComponent "Components/Control/Discrete/Discrete PID\\nCo" "ntroller" Name "PI d-axis" Show on Position [355, 130] 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 "Ipmsm.Kp_d" Show off } Parameter { Variable "ki" Value "Ipmsm.Ki_d" Show off } Parameter { Variable "kd" Value "1" Show off } Parameter { Variable "kf" Value "1" Show off } Parameter { Variable "ex_reset" Value "5" 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 "2" Show off } Parameter { Variable "int_method" Value "1" Show off } Parameter { Variable "t_sample" Value "ControlPeriod" Show off } Parameter { Variable "up_limit" Value "inf" Show off } Parameter { Variable "low_limit" Value "-inf" Show off } Parameter { Variable "aw_method" Value "2" Show off } Parameter { Variable "kbc" Value "Ipmsm.Kp_d/Ipmsm.Ki_d" 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 Input Name "Idq*" Show on Position [65, 135] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "Idq" Show on Position [65, 210] Direction right Flipped off Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type SignalDemux Name "Demux" Show off Position [115, 135] Direction right Flipped on Parameter { Variable "Width" Value "2" Show off } } Component { Type SignalDemux Name "Demux1" Show off Position [115, 210] Direction right Flipped on Parameter { Variable "Width" Value "2" Show off } } Component { Type Sum Name "Sum" Show off Position [215, 130] 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 Sum Name "Sum1" Show off Position [475, 320] 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 Product Name "Product" Show off Position [320, 210] Direction up Flipped off Parameter { Variable "Inputs" Value "2" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Input Name base64 "z4lz" Show on Position [265, 230] Direction right Flipped off Parameter { Variable "Index" Value "5" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Product Name "Product1" Show off Position [320, 250] Direction up Flipped off Parameter { Variable "Inputs" Value "2" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Gain Name "Gain" Show off Position [390, 250] Direction right Flipped off Parameter { Variable "K" Value "Pmsm.Lq" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Gain Name "Gain1" Show off Position [390, 210] Direction right Flipped off Parameter { Variable "K" Value "Pmsm.Lq" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Sum Name "Sum2" Show off Position [495, 130] 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 SignalMux Name "Mux" Show off Position [550, 235] Direction right Flipped off Parameter { Variable "Width" Value "2" Show off } } Component { Type Reference SrcComponent "Components/Control/Discrete/Discrete PID\\nCo" "ntroller" Name "PI q-axis" Show on Position [360, 320] 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 "Ipmsm.Kp_q" Show off } Parameter { Variable "ki" Value "Ipmsm.Ki_q" Show off } Parameter { Variable "kd" Value "1" Show off } Parameter { Variable "kf" Value "1" Show off } Parameter { Variable "ex_reset" Value "5" 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 "2" Show off } Parameter { Variable "int_method" Value "1" Show off } Parameter { Variable "t_sample" Value "ControlPeriod" Show off } Parameter { Variable "up_limit" Value "inf" Show off } Parameter { Variable "low_limit" Value "-inf" Show off } Parameter { Variable "aw_method" Value "2" Show off } Parameter { Variable "kbc" Value "Ipmsm.Kp_q/Ipmsm.Ki_q" 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 Sum Name "Sum3" Show off Position [175, 320] 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 "Gain2" Show off Position [145, 405] Direction right Flipped off Parameter { Variable "K" Value "1/sqrt(2)" Show on } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Goto Name "Goto" Show off Position [315, 410] Direction right Flipped off Parameter { Variable "Tag" Value "MaxMin" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Gain Name "Gain3" Show off Position [230, 425] 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 "Mux1" Show off Position [285, 410] Direction right Flipped off Parameter { Variable "Width" Value "2" Show off } } Component { Type From Name "From" Show off Position [275, 305] Direction right Flipped off Parameter { Variable "Tag" Value "MaxMin" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type SignalDemux Name "Demux2" Show off Position [300, 305] Direction right Flipped on Parameter { Variable "Width" Value "2" Show off } } Component { Type From Name "From1" Show off Position [270, 115] Direction right Flipped off Parameter { Variable "Tag" Value "MaxMin" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type SignalDemux Name "Demux3" Show off Position [295, 115] Direction right Flipped on Parameter { Variable "Width" Value "2" Show off } } Component { Type Input Name "reset" Show on Position [85, 475] Direction right Flipped off Parameter { Variable "Index" Value "6" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Goto Name "Goto1" Show off Position [130, 475] Direction right Flipped off Parameter { Variable "Tag" Value "reset" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From2" Show off Position [275, 330] Direction right Flipped off Parameter { Variable "Tag" Value "reset" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From3" Show off Position [270, 140] Direction right Flipped off Parameter { Variable "Tag" Value "reset" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Scope Name "Current\ntracking" Show on Position [275, 45] Direction up Flipped off Location [5, 36; 427, 388] State "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAA" "AAQAFoAbwBvAG0AQQByAGUAYQAAAAAA/////wAAAFwA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAH" "cAcwAAAAAA/////wAAAGYA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABmAP///wAAAAM" "AAAAAAAAAAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABQAP///wAA" "AaYAAAFFAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAA" "P////8AAAAAAAAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL/" "gMAAAAJAAAACQAAAGQAAAAIAAAAZAAAAAUAAABkAAAABAAAAGQAAAAHAAAAZAAAAAYAAABkAAAAAQ" "AAAGQAAAADAAAAZAAAAAIAAABkAAAAuAAAAAsBAAABAAAAAAAAAAAAAAAAZP////8AAACBAAAAAAA" "AAAsAAACRAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAA" "AQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAA" "AAAAQAAAAAAAAAnAAAAAQAAAAAAAAPoAAAAACc=" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "AAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" Axes "2" TimeRange "0" ScrollingMode "1" SingleTimeAxis "1" Open "0" Ts "-1" SampleLimit "0" XAxisLabel "" ShowLegend "2" Axis { Name "Stator current (d-axis)" AutoScale 1 MinValue 0 MaxValue 1 Signals {"Reference", "Measured"} SignalTypes [ ] AxisLabel "Current [A]" Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Stator current (q-axis)" AutoScale 1 MinValue 0 MaxValue 1 Signals {"Reference", "Measured"} SignalTypes [ ] AxisLabel "Current [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 {"Reference", "Measured"} Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {"Reference", "Measured"} Untangle 0 KeepBaseline off BaselineValue 0 } } } Component { Type SignalMux Name "Mux2" Show off Position [225, 30] Direction right Flipped off Parameter { Variable "Width" Value "2" Show off } } Component { Type SignalMux Name "Mux3" Show off Position [225, 60] Direction right Flipped off Parameter { Variable "Width" Value "2" Show off } } Connection { Type Signal SrcComponent "Idq*" SrcTerminal 1 DstComponent "Demux" DstTerminal 1 } Connection { Type Signal SrcComponent "Idq" SrcTerminal 1 DstComponent "Demux1" DstTerminal 1 } Connection { Type Signal SrcComponent base64 "z4lz" SrcTerminal 1 Points [290, 230] Branch { DstComponent "Product" DstTerminal 3 } Branch { DstComponent "Product1" DstTerminal 2 } } Connection { Type Signal SrcComponent "Product" SrcTerminal 1 DstComponent "Gain1" DstTerminal 1 } Connection { Type Signal SrcComponent "Product1" SrcTerminal 1 DstComponent "Gain" DstTerminal 1 } Connection { Type Signal SrcComponent "PI d-axis" SrcTerminal 2 DstComponent "Sum2" DstTerminal 2 } Connection { Type Signal SrcComponent "Gain" SrcTerminal 2 Points [495, 250] DstComponent "Sum2" DstTerminal 3 } Connection { Type Signal SrcComponent "Sum2" SrcTerminal 1 Points [530, 130; 530, 230] DstComponent "Mux" DstTerminal 2 } Connection { Type Signal SrcComponent "Mux" SrcTerminal 1 DstComponent "Vdq*" DstTerminal 1 } Connection { Type Signal SrcComponent "Sum" SrcTerminal 1 DstComponent "PI d-axis" DstTerminal 1 } Connection { Type Signal SrcComponent "PI q-axis" SrcTerminal 2 DstComponent "Sum1" DstTerminal 3 } Connection { Type Signal SrcComponent "Gain1" SrcTerminal 2 Points [475, 210] DstComponent "Sum1" DstTerminal 2 } Connection { Type Signal SrcComponent "Sum1" SrcTerminal 1 Points [530, 320; 530, 240] DstComponent "Mux" DstTerminal 3 } Connection { Type Signal SrcComponent "Sum3" SrcTerminal 1 DstComponent "PI q-axis" DstTerminal 1 } Connection { Type Signal SrcComponent "Vdc" SrcTerminal 1 DstComponent "Gain2" DstTerminal 1 } Connection { Type Signal SrcComponent "Mux1" SrcTerminal 1 DstComponent "Goto" DstTerminal 1 } Connection { Type Signal SrcComponent "Gain3" SrcTerminal 2 Points [260, 425; 260, 415] DstComponent "Mux1" DstTerminal 3 } Connection { Type Signal SrcComponent "Gain2" SrcTerminal 2 Points [185, 405] Branch { DstComponent "Mux1" DstTerminal 2 } Branch { Points [185, 425] DstComponent "Gain3" DstTerminal 1 } } Connection { Type Signal SrcComponent "Demux2" SrcTerminal 2 DstComponent "PI q-axis" DstTerminal 10 } Connection { Type Signal SrcComponent "Demux2" SrcTerminal 3 DstComponent "PI q-axis" DstTerminal 11 } Connection { Type Signal SrcComponent "From" SrcTerminal 1 DstComponent "Demux2" DstTerminal 1 } Connection { Type Signal SrcComponent "From1" SrcTerminal 1 DstComponent "Demux3" DstTerminal 1 } Connection { Type Signal SrcComponent "Demux3" SrcTerminal 2 DstComponent "PI d-axis" DstTerminal 10 } Connection { Type Signal SrcComponent "Demux3" SrcTerminal 3 DstComponent "PI d-axis" DstTerminal 11 } Connection { Type Signal SrcComponent "reset" SrcTerminal 1 DstComponent "Goto1" DstTerminal 1 } Connection { Type Signal SrcComponent "From2" SrcTerminal 1 DstComponent "PI q-axis" DstTerminal 7 } Connection { Type Signal SrcComponent "From3" SrcTerminal 1 DstComponent "PI d-axis" DstTerminal 7 } Connection { Type Signal SrcComponent "Mux2" SrcTerminal 1 Points [240, 30; 240, 40] DstComponent "Current\ntracking" DstTerminal 1 } Connection { Type Signal SrcComponent "Mux3" SrcTerminal 1 Points [240, 60; 240, 50] DstComponent "Current\ntracking" DstTerminal 2 } Connection { Type Signal SrcComponent "Demux" SrcTerminal 2 Points [125, 130] Branch { DstComponent "Sum" DstTerminal 2 } Branch { Points [125, 25] DstComponent "Mux2" DstTerminal 2 } } Connection { Type Signal SrcComponent "Demux1" SrcTerminal 2 Points [130, 205] Branch { Points [215, 205] Branch { DstComponent "Sum" DstTerminal 3 } Branch { DstComponent "Product" DstTerminal 2 } } Branch { Points [130, 35] DstComponent "Mux2" DstTerminal 3 } } Connection { Type Signal SrcComponent "Demux1" SrcTerminal 3 Points [145, 215] Branch { Points [145, 255] Branch { DstComponent "Product1" DstTerminal 3 } Branch { Points [145, 320] DstComponent "Sum3" DstTerminal 3 } } Branch { Points [145, 65] DstComponent "Mux3" DstTerminal 3 } } Connection { Type Signal SrcComponent "Demux" SrcTerminal 3 Points [175, 140] Branch { Points [175, 55] DstComponent "Mux3" DstTerminal 2 } Branch { DstComponent "Sum3" DstTerminal 2 } } } } Component { Type Reference SrcComponent "Components/Control/Transformations/RRF->3ph" Name "RRF->3ph" Show off Position [445, 170] 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 } } Connection { Type Signal SrcComponent "Tem*" SrcTerminal 1 DstComponent "Tem -> Iq" DstTerminal 1 } Connection { Type Signal SrcComponent "Tem -> Iq" SrcTerminal 2 DstComponent "Mux" DstTerminal 3 } Connection { Type Signal SrcComponent "Id*" SrcTerminal 1 Points [180, 35] DstComponent "Mux" DstTerminal 2 } Connection { Type Signal SrcComponent "Is_abc" SrcTerminal 1 DstComponent "3ph->RRF" DstTerminal 1 } Connection { Type Signal SrcComponent "Mux" SrcTerminal 1 Points [260, 60; 260, 130] DstComponent "DQ current control" DstTerminal 3 } Connection { Type Signal SrcComponent "3ph->RRF" SrcTerminal 2 DstComponent "DQ current control" DstTerminal 4 } Connection { Type Signal SrcComponent "Vdc" SrcTerminal 1 Points [325, 75] DstComponent "DQ current control" DstTerminal 1 } Connection { Type Signal SrcComponent "RRF->3ph" SrcTerminal 2 DstComponent "Vs_abc*" DstTerminal 1 } Connection { Type Signal SrcComponent base64 "zrhz" SrcTerminal 1 Points [115, 245] Branch { Points [115, 155] DstComponent "3ph->RRF" DstTerminal 3 } Branch { Points [415, 245] DstComponent "RRF->3ph" DstTerminal 3 } } Connection { Type Signal SrcComponent base64 "z4lz" SrcTerminal 1 DstComponent "DQ current control" DstTerminal 5 } Connection { Type Signal SrcComponent "reset" SrcTerminal 1 DstComponent "DQ current control" DstTerminal 6 } Connection { Type Signal SrcComponent "DQ current control" SrcTerminal 2 DstComponent "RRF->3ph" DstTerminal 1 } } } Component { Type Subsystem Name "Duty-cycle" Show on Position [775, 250] Direction up Flipped off Frame [-30, -20; 30, 20] LabelPosition [0, -23] LabelAlign down SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskDisplayLang "2" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Input Position [-30, 10] Direction left } Terminal { Type Output Position [34, 0] Direction right } Terminal { Type Input Position [-30, -10] Direction left } Schematic { Location [7, 35; 424, 221] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Input Name "Vs_abc*" Show on Position [55, 45] 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 [335, 50] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "Vdc" Show on Position [55, 90] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Saturation Name "Avoid division\nby zero" Show on Position [115, 90] Direction right Flipped off Parameter { Variable "UpperLimit" Value "inf" Show off } Parameter { Variable "LowerLimit" Value "0.1" Show off } } Component { Type Product Name "Divide" Show off Position [200, 50] Direction up Flipped off Parameter { Variable "Inputs" Value "*/" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Offset Name "Offset" Show off Position [265, 50] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Offset" Value "0.5" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Scope Name "Duty-cycles" Show on Position [335, 100] Direction up Flipped off Location [6, 34; 429, 389] State "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQA" "FoAbwBvAG0AQQByAGUAYQAAAAAA/////wAAADQA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcw" "AAAAAA/////wAAAGYA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABmAP///wAAAAMAAAA" "AAAAAAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABQAP///wAAAacA" "AAFIAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP///" "/8AAAAAAAAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL/gMAA" "AAJAAAACQAAAGQAAAAIAAAAZAAAAAUAAABkAAAABAAAAGQAAAAHAAAAZAAAAAYAAABkAAAAAQAAAG" "QAAAADAAAAZAAAAAIAAABkAAAAkAAAAAsBAAABAAAAAAAAAAAAAAAAZP////8AAACBAAAAAAAAAAs" "AAABpAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAA" "AAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAA" "QAAAAAAAAAnAAAAAQAAAAAAAAPoAAAAACc=" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" Axes "1" TimeRange "0.0" ScrollingMode "1" SingleTimeAxis "1" Open "0" Ts "-1" SampleLimit "0" XAxisLabel "" ShowLegend "1" Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 KeepBaseline off BaselineValue 0 } Fourier { SingleXAxis on AxisLabel "Frequency" Scaling 0 PhaseDisplay 0 ShowFourierLegend off Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} Untangle 0 KeepBaseline off BaselineValue 0 } } } Connection { Type Signal SrcComponent "Vdc" SrcTerminal 1 DstComponent "Avoid division\nby zero" DstTerminal 1 } Connection { Type Signal SrcComponent "Avoid division\nby zero" SrcTerminal 2 Points [155, 90; 155, 55] DstComponent "Divide" DstTerminal 3 } Connection { Type Signal SrcComponent "Vs_abc*" SrcTerminal 1 DstComponent "Divide" DstTerminal 2 } Connection { Type Signal SrcComponent "Divide" SrcTerminal 1 DstComponent "Offset" DstTerminal 1 } Connection { Type Signal SrcComponent "Offset" SrcTerminal 2 Points [300, 50] Branch { DstComponent "d" DstTerminal 1 } Branch { Points [300, 100] DstComponent "Duty-cycles" DstTerminal 1 } } } } Component { Type Reference SrcComponent "Imperix_Control/CB_PWM" Name "InverterPwm" Show on Position [990, 300] Direction up Flipped off Frame [-30, -30; 30, 30] LabelPosition [0, 33] LabelAlign up Parameter { Variable "nb_bbx" Value "0" Show off } Parameter { Variable "out_conf" Value "2" Show off } Parameter { Variable "pwm_out_single" Value "0" Show off } Parameter { Variable "pwm_out_dual" Value "0:2" Show off } Parameter { Variable "carrier" Value "1" Show off } Parameter { Variable "block_input_duty" Value "2" Show off } Parameter { Variable "block_input_phase" Value "1" Show off } Parameter { Variable "block_input_activate" Value "2" Show off } Parameter { Variable "rate" Value "1" Show off } Parameter { Variable "duty" Value "0.5" Show off } Parameter { Variable "phase" Value "[0 0 0]" Show off } Parameter { Variable "block_input_clock" Value "2" Show off } Parameter { Variable "dead_time" Value "dt" Show off } Parameter { Variable "sim_dead_time" Value "1" Show off } Parameter { Variable "TargetPortIndices" Value "4" Show off } Terminal { Type Input Position [-30, -15] Direction left } Terminal { Type Input Position [-30, 5] Direction left } Terminal { Type Input Position [-30, -5] Direction left } Terminal { Type EventInput Position [-30, 20] Direction left } } Component { Type Reference SrcComponent "Imperix_Control/Tunable parameter" Name "Tunable parameter1" Show off Position [375, 170] Direction up Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "name" Value "speed_ref_rpm" Show off Evaluate off } Parameter { Variable "initial_value" Value "0" Show off } Parameter { Variable "sim_output" Value "2" Show off } Parameter { Variable "step_time" Value "[0 0.3]" Show off } Parameter { Variable "step_data" Value "[1500 750]" Show off } Parameter { Variable "TargetPortIndices" Value "" Show off } Terminal { Type Output Position [14, 0] Direction right } } Component { Type Gain Name "rpm->rad/s" Show on Position [425, 170] 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 SignalSwitch Name "Switch" Show off Position [855, 285] Direction left Flipped on Parameter { Variable "Criteria" Value "2" Show off } Parameter { Variable "Threshold" Value "0" Show off } } Component { Type Subsystem Name "Rotor pos. init" Show on Position [775, 320] Direction up Flipped off Frame [-30, -15; 30, 15] LabelPosition [0, 18] LabelAlign up SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskDisplayLang "2" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Output Position [34, 0] Direction right } Terminal { Type Input Position [-30, 0] Direction left } Schematic { Location [556, 318; 1050, 549] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Output Name "d" Show on Position [395, 55] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "Vdc" Show on Position [115, 95] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Saturation Name "Avoid division\nby zero" Show on Position [175, 95] Direction right Flipped off Parameter { Variable "UpperLimit" Value "inf" Show off } Parameter { Variable "LowerLimit" Value "0.1" Show off } } Component { Type Constant Name "Current reference" Show on Position [85, 40] Direction right Flipped off Frame [-45, -10; 45, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Value" Value "0.5*Pmsm.Isn" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Gain Name "3R/2" Show on Position [175, 40] Direction right Flipped off Parameter { Variable "K" Value "Pmsm.Rs*3/2" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Product Name "Divide" Show on Position [255, 45] Direction up Flipped off Parameter { Variable "Inputs" Value "*/" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type SignalMux Name "Mux" Show off Position [340, 55] Direction right Flipped off Parameter { Variable "Width" Value "3" Show off } } Component { Type Constant Name "Constant" Show off Position [300, 65] 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 } } Connection { Type Signal SrcComponent "Vdc" SrcTerminal 1 DstComponent "Avoid division\nby zero" DstTerminal 1 } Connection { Type Signal SrcComponent "Current reference" SrcTerminal 1 DstComponent "3R/2" DstTerminal 1 } Connection { Type Signal SrcComponent "3R/2" SrcTerminal 2 DstComponent "Divide" DstTerminal 2 } Connection { Type Signal SrcComponent "Avoid division\nby zero" SrcTerminal 2 Points [210, 95; 210, 50] DstComponent "Divide" DstTerminal 3 } Connection { Type Signal SrcComponent "Divide" SrcTerminal 1 DstComponent "Mux" DstTerminal 2 } Connection { Type Signal SrcComponent "Mux" SrcTerminal 1 DstComponent "d" DstTerminal 1 } Connection { Type Signal SrcComponent "Constant" SrcTerminal 1 Points [320, 65] Branch { DstComponent "Mux" DstTerminal 4 } Branch { Points [320, 55] DstComponent "Mux" DstTerminal 3 } } Annotation { Name base64 "RHVyaW5nIGluaXRpYWxpemF0aW9uLCB0aGUgcm90b3" "IgaXMgYmxvY2tlZCBhdCDOuD0wIGJ5IGFwcGx5aW5nIGEgdm9sdGFnZSBhbG9uZyBwaGFzZSBhLgp" "UaGlzIGFsbG93cyB0byBnZXQgYW5kIGNvbXBlbnNhdGUgdGhlIGFuZ2xlIHBvc2l0aW9uIG1lYXN1" "cmVtZW50IG9mZnNldCAoYW5nbGVfb2Zmc2V0KS4KVGhlIGN1cnJlbnQgaW4gcGhhc2UgYSBpcyBzZ" "XQgdG8gMC41KnJhdGVkX2N1cnJlbnQu" Position [240, 175] } } } Component { Type Reference SrcComponent "Imperix_Control/Tunable parameter" Name "Tunable parameter2" Show off Position [555, 430] Direction up Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "name" Value "block_rotor" Show off Evaluate off } Parameter { Variable "initial_value" Value "0" Show off } Parameter { Variable "sim_output" Value "1" Show off } Parameter { Variable "step_time" Value "[1 2]" Show off } Parameter { Variable "step_data" Value "[0 1]" Show off } Parameter { Variable "TargetPortIndices" Value "" Show off } Terminal { Type Output Position [14, 0] Direction right } } Component { Type Reference SrcComponent "Imperix_Control/CB_PWM" Name "BrakingChopperPwm" Show on Position [995, 115] Direction up Flipped off Frame [-30, -30; 30, 30] LabelPosition [0, 33] LabelAlign up Parameter { Variable "nb_bbx" Value "0" Show off } Parameter { Variable "out_conf" Value "1" Show off } Parameter { Variable "pwm_out_single" Value "6" Show off } Parameter { Variable "pwm_out_dual" Value "0:2" Show off } Parameter { Variable "carrier" Value "1" Show off } Parameter { Variable "block_input_duty" Value "2" Show off } Parameter { Variable "block_input_phase" Value "1" Show off } Parameter { Variable "block_input_activate" Value "1" Show off } Parameter { Variable "rate" Value "1" Show off } Parameter { Variable "duty" Value "0.5" Show off } Parameter { Variable "phase" Value "0" Show off } Parameter { Variable "block_input_clock" Value "2" Show off } Parameter { Variable "dead_time" Value "dt" Show off } Parameter { Variable "sim_dead_time" Value "1" Show off } Parameter { Variable "TargetPortIndices" Value "5" Show off } Terminal { Type Input Position [-30, -10] Direction left } Terminal { Type Input Position [-30, 5] Direction left } Terminal { Type Input Position [-30, 0] Direction left } Terminal { Type EventInput Position [-30, 20] Direction left } } Component { Type Subsystem Name "Braking Chopper\nControl" Show on Position [775, 115] Direction up Flipped off Frame [-30, -30; 30, 30] LabelPosition [0, 33] LabelAlign up SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskDisplayLang "2" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Input Position [-30, 10] Direction left } Terminal { Type Output Position [34, -10] Direction right } Terminal { Type Input Position [-30, -15] Direction left } Schematic { Location [11, 36; 403, 244] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Input Name "Vdc" Show on Position [50, 45] 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 [325, 45] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "Vdc_th" Show on Position [50, 80] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Offset Name "Offset" Show off Position [115, 80] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "Offset" Value "5" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Sum Name "Sum" Show off Position [165, 45] 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 [215, 45] Direction right Flipped off Parameter { Variable "K" Value "0.1" Show off } Parameter { Variable "Multiplication" Value "1" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Saturation Name "Saturation" Show off Position [270, 45] Direction right Flipped off Parameter { Variable "UpperLimit" Value "1" Show off } Parameter { Variable "LowerLimit" Value "0" Show off } } Connection { Type Signal SrcComponent "Vdc_th" SrcTerminal 1 DstComponent "Offset" DstTerminal 1 } Connection { Type Signal SrcComponent "Vdc" SrcTerminal 1 DstComponent "Sum" DstTerminal 2 } Connection { Type Signal SrcComponent "Offset" SrcTerminal 2 Points [165, 80] DstComponent "Sum" DstTerminal 3 } Connection { Type Signal SrcComponent "Sum" SrcTerminal 1 DstComponent "Gain" DstTerminal 1 } Connection { Type Signal SrcComponent "Gain" SrcTerminal 2 DstComponent "Saturation" DstTerminal 1 } Connection { Type Signal SrcComponent "Saturation" SrcTerminal 2 DstComponent "d" DstTerminal 1 } Annotation { Name "The braking chopper protects the DC bus from an o" "vervoltage\nby dissipating the excess of power into a resistor. It is trigger" "ed\nwhen the DC bus voltage is 5V over the threshold." Position [180, 145] } } } Component { Type Reference SrcComponent "Imperix_Control/Tunable parameter" Name "Tunable parameter3" Show off Position [700, 100] Direction up Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "name" Value "Vdc_thres" Show off Evaluate off } Parameter { Variable "initial_value" Value "800" Show off } Parameter { Variable "sim_output" Value "1" Show off } Parameter { Variable "step_time" Value "[1 2]" Show off } Parameter { Variable "step_data" Value "[0 1]" Show off } Parameter { Variable "TargetPortIndices" Value "" Show off } Terminal { Type Output Position [14, 0] Direction right } } Component { Type Subsystem Name "Check operating conditions" Show on Position [705, 465] Direction up Flipped off Frame [-90, -50; 90, 50] LabelPosition [0, 53] LabelAlign up SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskDisplayLang "2" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Input Position [-90, -35] Direction left } Terminal { Type Output Position [94, 0] Direction right } Terminal { Type Input Position [-90, 5] Direction left } Terminal { Type Input Position [-90, 15] Direction left } Terminal { Type Input Position [-90, 40] Direction left } Terminal { Type Output Position [94, -35] Direction right } Terminal { Type Output Position [94, 25] Direction right } Terminal { Type Input Position [-90, -15] Direction left } Schematic { Location [8, 39; 665, 333] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Input Name "rotor_blocked" Show on Position [60, 65] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "reset_current_ctrl" Show on Position [320, 75] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "output_disabled" Show on Position [60, 120] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "Vdc" Show on Position [60, 170] Direction right Flipped off Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "Vdc_min" Show on Position [60, 200] Direction right Flipped off Parameter { Variable "Index" Value "5" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "activate_inverter" Show on Position [320, 125] Direction right Flipped off Parameter { Variable "Index" Value "6" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "reset_speed_ctrl" Show on Position [585, 190] Direction right Flipped off Parameter { Variable "Index" Value "7" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type LogicalOperator Name "Logical\nOperator" Show off Position [195, 75] Direction up Flipped off Parameter { Variable "Operator" Value "2" Show off } Parameter { Variable "Inputs" Value "3" Show off } } Component { Type RelationalOperator Name "Relational\nOperator" Show off Position [125, 185] Direction right Flipped off Parameter { Variable "Operator" Value "3" Show off } } Component { Type LogicalOperator Name "Logical\nOperator1" Show off Position [195, 125] Direction up Flipped off Parameter { Variable "Operator" Value "2" Show off } Parameter { Variable "Inputs" Value "2" Show off } } Component { Type LogicalOperator Name "Logical\nOperator2" Show off Position [250, 125] Direction up Flipped off Parameter { Variable "Operator" Value "6" Show off } Parameter { Variable "Inputs" Value "2" Show off } } Component { Type FsmBlock Name "State Machine" Show on Position [390, 190] Direction up Flipped off Frame [-90, -15; 90, 15] LabelPosition [0, 18] LabelAlign up Parameter { Variable "InputVariables" Value "ReadyToOperate,Speed" Show off } Parameter { Variable "InputTypes" Value "1,1" Show off } Parameter { Variable "InternalConstants" Value "" Show off } Parameter { Variable "InternalConstantValues" Value "" Show off } Parameter { Variable "InternalVariables" Value "" Show off } Parameter { Variable "InternalVariableValues" Value "" Show off } Parameter { Variable "OutputVariables" Value "Operating" Show off } Parameter { Variable "Declarations" Value "#include " Show off } Parameter { Variable "TransitionOrder" Value "2" Show off } Parameter { Variable "SampleTime" Value "0" Show off } Parameter { Variable "Animate" Value "1" Show off } FSM { Location [21, 6; 782, 480] ZoomFactor 1 SliderPosition [0, 0] FsmState { Name "ENTER" Position [190, 160] Frame [-90, -60; 90, 60] Parameter { Name "EnterAction" Value "Operating = 0;" } Parameter { Name "DuringAction" Value "" } Parameter { Name "ExitAction" Value "" } } FsmState { Name ".PointState" Position [190, 30] } FsmState { Name "STANDSTILL" Position [570, 160] Frame [-90, -60; 90, 60] Parameter { Name "EnterAction" Value "" } Parameter { Name "DuringAction" Value "" } Parameter { Name "ExitAction" Value "" } } FsmState { Name "OPERATING" Position [380, 360] Frame [-90, -60; 90, 60] Parameter { Name "EnterAction" Value "Operating = 1;" } Parameter { Name "DuringAction" Value "" } Parameter { Name "ExitAction" Value "" } } FsmTransition { FsmSrcInfo { StatePath ".PointState" TerminalLoc bottom TerminalCoord 0.5 External on } FsmDstInfo { StatePath "ENTER" TerminalLoc top TerminalCoord 0.5 External on } SegmentLengths [] LabelPosition 0.5 Parameter { Name "Trigger" Value "" } Parameter { Name "Condition" Value "" } Parameter { Name "Action" Value "" } Parameter { Name "Priority" Value "1" } } FsmTransition { FsmSrcInfo { StatePath "STANDSTILL" TerminalLoc bottom TerminalCoord 0.487805 External on } FsmDstInfo { StatePath "OPERATING" TerminalLoc right TerminalCoord 0.471154 External on } SegmentLengths [] LabelPosition 0.5 Parameter { Name "Trigger" Value "" } Parameter { Name "Condition" Value "ReadyToOperate == 1" } Parameter { Name "Action" Value "" } Parameter { Name "Priority" Value "1" } } FsmTransition { FsmSrcInfo { StatePath "OPERATING" TerminalLoc left TerminalCoord 0.548077 External on } FsmDstInfo { StatePath "ENTER" TerminalLoc bottom TerminalCoord 0.5 External on } SegmentLengths [] LabelPosition 0.615 Parameter { Name "Trigger" Value "" } Parameter { Name "Condition" Value "ReadyToOperate == 0" } Parameter { Name "Action" Value "" } Parameter { Name "Priority" Value "1" } } FsmTransition { FsmSrcInfo { StatePath "ENTER" TerminalLoc right TerminalCoord 0.0961538 External on } FsmDstInfo { StatePath "STANDSTILL" TerminalLoc left TerminalCoord 0.0961538 External on } SegmentLengths [] LabelPosition 0.5 Parameter { Name "Trigger" Value "" } Parameter { Name "Condition" Value "fabs(Speed) <= 10\n" } Parameter { Name "Action" Value "" } Parameter { Name "Priority" Value "1" } } FsmTransition { FsmSrcInfo { StatePath "STANDSTILL" TerminalLoc left TerminalCoord 0.682692 External on } FsmDstInfo { StatePath "ENTER" TerminalLoc right TerminalCoord 0.682692 External on } SegmentLengths [] LabelPosition 0.5 Parameter { Name "Trigger" Value "" } Parameter { Name "Condition" Value "fabs(Speed) > 12" } Parameter { Name "Action" Value "" } Parameter { Name "Priority" Value "2" } } FsmAnnotation { Text "The state machine ensures that the\nmot" "or starts from standstill." Position [370, 50] } } } Component { Type LogicalOperator Name "Logical\nOperator3" Show off Position [255, 185] Direction up Flipped off Parameter { Variable "Operator" Value "6" Show off } Parameter { Variable "Inputs" Value "2" Show off } } Component { Type LogicalOperator Name "Logical\nOperator4" Show off Position [530, 190] Direction up Flipped off Parameter { Variable "Operator" Value "6" Show off } Parameter { Variable "Inputs" Value "2" Show off } } Component { Type Input Name "Speed" Show on Position [255, 215] Direction right Flipped off Parameter { Variable "Index" Value "8" Show on } Parameter { Variable "Width" Value "-1" Show off } } Connection { Type Signal SrcComponent "Vdc" SrcTerminal 1 Points [90, 170; 90, 180] DstComponent "Relational\nOperator" DstTerminal 1 } Connection { Type Signal SrcComponent "Vdc_min" SrcTerminal 1 Points [90, 200; 90, 190] DstComponent "Relational\nOperator" DstTerminal 2 } Connection { Type Signal SrcComponent "rotor_blocked" SrcTerminal 1 DstComponent "Logical\nOperator" DstTerminal 2 } Connection { Type Signal SrcComponent "output_disabled" SrcTerminal 1 Points [125, 120] Branch { Points [125, 75] DstComponent "Logical\nOperator" DstTerminal 3 } Branch { DstComponent "Logical\nOperator1" DstTerminal 2 } } Connection { Type Signal SrcComponent "Relational\nOperator" SrcTerminal 3 Points [155, 185; 155, 130] Branch { Points [155, 85] DstComponent "Logical\nOperator" DstTerminal 4 } Branch { DstComponent "Logical\nOperator1" DstTerminal 3 } } Connection { Type Signal SrcComponent "Logical\nOperator1" SrcTerminal 1 DstComponent "Logical\nOperator2" DstTerminal 2 } Connection { Type Signal SrcComponent "Logical\nOperator2" SrcTerminal 1 DstComponent "activate_inverter" DstTerminal 1 } Connection { Type Signal SrcComponent "Logical\nOperator" SrcTerminal 1 Points [220, 75] Branch { DstComponent "reset_current_ctrl" DstTerminal 1 } Branch { Points [220, 185] DstComponent "Logical\nOperator3" DstTerminal 2 } } Connection { Type Signal SrcComponent "Logical\nOperator3" SrcTerminal 1 DstComponent "State Machine" DstTerminal 2 } Connection { Type Signal SrcComponent "State Machine" SrcTerminal 1 DstComponent "Logical\nOperator4" DstTerminal 2 } Connection { Type Signal SrcComponent "Logical\nOperator4" SrcTerminal 1 DstComponent "reset_speed_ctrl" DstTerminal 1 } Connection { Type Signal SrcComponent "Speed" SrcTerminal 1 Points [280, 215; 280, 195] DstComponent "State Machine" DstTerminal 3 } } } Component { Type Goto Name "Goto" Show off Position [270, 115] Direction right Flipped off Parameter { Variable "Tag" Value "Vdc" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From" Show off Position [575, 480] Direction right Flipped off Parameter { Variable "Tag" Value "Vdc" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Reference SrcComponent "Imperix_Control/Tunable parameter" Name "Tunable parameter4" Show off Position [575, 505] Direction up Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "name" Value "Vdc_min" Show off Evaluate off } Parameter { Variable "initial_value" Value "450" Show off } Parameter { Variable "sim_output" Value "1" Show off } Parameter { Variable "step_time" Value "[1 2]" Show off } Parameter { Variable "step_data" Value "[0 1]" Show off } Parameter { Variable "TargetPortIndices" Value "" Show off } Terminal { Type Output Position [14, 0] Direction right } } Component { Type Reference SrcComponent "Imperix_Control/Probe variable" Name "Probe variable" Show off Position [255, 265] Direction up Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 18] LabelAlign up Parameter { Variable "name" Value "theta" Show off Evaluate off } Parameter { Variable "TargetPortIndices" Value "" Show off } Terminal { Type Input Position [-10, 0] Direction left } } Component { Type Reference SrcComponent "Imperix_Control/Probe variable" Name "Probe variable1" Show off Position [255, 185] Direction up Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 18] LabelAlign up Parameter { Variable "name" Value "Is" Show off Evaluate off } Parameter { Variable "TargetPortIndices" Value "" Show off } Terminal { Type Input Position [-10, 0] Direction left } } Component { Type Reference SrcComponent "Imperix_Control/Probe variable" Name "Probe variable2" Show off Position [250, 90] Direction up Flipped off Frame [-10, -10; 10, 10] LabelPosition [0, 18] LabelAlign up Parameter { Variable "name" Value "Vdc" Show off Evaluate off } Parameter { Variable "TargetPortIndices" Value "" Show off } Terminal { Type Input Position [-10, 0] Direction left } } Component { Type Goto Name "Goto1" Show off Position [835, 465] Direction right Flipped off Parameter { Variable "Tag" Value "reset_current_ctrl" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Goto Name "Goto2" Show off Position [835, 490] Direction right Flipped off Parameter { Variable "Tag" Value "reset_speed_ctrl" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From1" Show off Position [575, 330] Direction right Flipped off Parameter { Variable "Tag" Value "reset_current_ctrl" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From2" Show off Position [425, 220] Direction right Flipped off Parameter { Variable "Tag" Value "reset_speed_ctrl" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Connection { Type Event SrcComponent "Configuration" SrcTerminal 1 DstComponent "Control Task\nTrigger" DstTerminal 1 } Connection { Type Signal SrcComponent "Tunable parameter" SrcTerminal 1 Points [325, 370] DstComponent "Sum" DstTerminal 3 } Connection { Type Signal SrcComponent "Sum" SrcTerminal 1 DstComponent "Speed/position" DstTerminal 1 } Connection { Type Signal SrcComponent "Speed Control" SrcTerminal 2 DstComponent "Torque Control" DstTerminal 1 } Connection { Type Signal SrcComponent "Speed/position" SrcTerminal 3 DstComponent "Torque Control" DstTerminal 5 } Connection { Type Signal SrcComponent "Speed/position" SrcTerminal 2 DstComponent "Torque Control" DstTerminal 6 } Connection { Type Signal SrcComponent "Tunable parameter1" SrcTerminal 1 DstComponent "rpm->rad/s" DstTerminal 1 } Connection { Type Signal SrcComponent "rpm->rad/s" SrcTerminal 2 DstComponent "Speed Control" DstTerminal 1 } Connection { Type Signal SrcComponent "Switch" SrcTerminal 1 DstComponent "InverterPwm" DstTerminal 1 } Connection { Type Signal SrcComponent "Torque Control" SrcTerminal 2 DstComponent "Duty-cycle" DstTerminal 1 } Connection { Type Signal SrcComponent "Rotor pos. init" SrcTerminal 1 Points [825, 320] DstComponent "Switch" DstTerminal 2 } Connection { Type Signal SrcComponent "Braking Chopper\nControl" SrcTerminal 2 DstComponent "BrakingChopperPwm" DstTerminal 1 } Connection { Type Signal SrcComponent "Tunable parameter3" SrcTerminal 1 DstComponent "Braking Chopper\nControl" DstTerminal 3 } Connection { Type Signal SrcComponent "BusVoltage" SrcTerminal 1 Points [225, 125] Branch { Points [245, 125] Branch { Points [590, 125] Branch { Points [715, 125] Branch { DstComponent "Braking Chopper\nControl" DstTerminal 1 } Branch { Points [715, 240] Branch { Points [715, 320] DstComponent "Rotor pos. init" DstTerminal 2 } Branch { DstComponent "Duty-cycle" DstTerminal 3 } } } Branch { DstComponent "Torque Control" DstTerminal 3 } } Branch { Points [245, 115] DstComponent "Goto" DstTerminal 1 } } Branch { DstComponent "Probe variable2" DstTerminal 1 } } Connection { Type Signal SrcComponent "From" SrcTerminal 1 DstComponent "Check operating conditions" DstTerminal 4 } Connection { Type Signal SrcComponent "Tunable parameter4" SrcTerminal 1 DstComponent "Check operating conditions" DstTerminal 5 } Connection { Type Signal SrcComponent "Check operating conditions" SrcTerminal 2 DstComponent "Goto1" DstTerminal 1 } Connection { Type Signal SrcComponent "Check operating conditions" SrcTerminal 7 DstComponent "Goto2" DstTerminal 1 } Connection { Type Signal SrcComponent "From2" SrcTerminal 1 DstComponent "Speed Control" DstTerminal 4 } Connection { Type Signal SrcComponent "From1" SrcTerminal 1 DstComponent "Torque Control" DstTerminal 4 } Connection { Type Signal SrcComponent "Check operating conditions" SrcTerminal 6 Points [905, 430; 905, 295] DstComponent "InverterPwm" DstTerminal 3 } Connection { Type Signal SrcComponent "Duty-cycle" SrcTerminal 2 Points [825, 250] DstComponent "Switch" DstTerminal 3 } Connection { Type Signal SrcComponent "Tunable parameter2" SrcTerminal 1 Points [585, 430] Branch { DstComponent "Check operating conditions" DstTerminal 1 } Branch { Points [585, 390; 855, 390] DstComponent "Switch" DstTerminal 4 } } Connection { Type Event SrcComponent "Configuration" SrcTerminal 3 Points [930, 60; 930, 135] Branch { DstComponent "BrakingChopperPwm" DstTerminal 4 } Branch { Points [930, 320] DstComponent "InverterPwm" DstTerminal 4 } } Connection { Type Signal SrcComponent "Core state" SrcTerminal 2 Points [355, 470] Branch { DstComponent "Check operating conditions" DstTerminal 3 } Branch { Points [355, 305] DstComponent "Speed/position" DstTerminal 5 } } Connection { Type Signal SrcComponent "Speed/position" SrcTerminal 4 Points [465, 280] Branch { Points [465, 185] DstComponent "Speed Control" DstTerminal 3 } Branch { Points [465, 450] DstComponent "Check operating conditions" DstTerminal 8 } } Connection { Type Signal SrcComponent "StatorCurrents" SrcTerminal 1 Points [220, 205] Branch { Points [315, 205; 315, 255] DstComponent "Torque Control" DstTerminal 7 } Branch { Points [220, 185] DstComponent "Probe variable1" DstTerminal 1 } } Connection { Type Signal SrcComponent "RotorAngle" SrcTerminal 1 Points [220, 285] Branch { DstComponent "Sum" DstTerminal 2 } Branch { Points [220, 265] DstComponent "Probe variable" DstTerminal 1 } } Connection { Type Event SrcComponent "Configuration" SrcTerminal 2 Points [125, 70; 125, 140] Branch { DstComponent "BusVoltage" DstTerminal 2 } Branch { Points [125, 215] Branch { Points [125, 300] DstComponent "RotorAngle" DstTerminal 2 } Branch { Points [130, 215; 130, 220] DstComponent "StatorCurrents" DstTerminal 2 } } } Annotation { Name "TN114: Motor Speed Control\nimperix Ltd. 2021" Position [95, 505] } } } Connection { Type Signal SrcComponent "B-Box RCP" SrcTerminal 4 DstComponent "PMSM drive" DstTerminal 4 } Connection { Type Signal SrcComponent "PMSM drive" SrcTerminal 1 Points [455, 95; 455, 65; 80, 65] DstComponent "B-Box RCP" DstTerminal 1 } Connection { Type Signal SrcComponent "PMSM drive" SrcTerminal 2 Points [465, 110; 465, 55; 70, 55; 70, 110] DstComponent "B-Box RCP" DstTerminal 2 } Connection { Type Signal SrcComponent "PMSM drive" SrcTerminal 3 Points [475, 125; 475, 45; 60, 45; 60, 125] DstComponent "B-Box RCP" DstTerminal 3 } Connection { Type Signal SrcComponent "B-Box RCP" SrcTerminal 5 DstComponent "PMSM drive" DstTerminal 5 } Annotation { Name "Simulation story board\n--------------------------------" "\n\nAt t=0 the desired speed is set to 1500 rpm and\nthe finite state machin" "e limits its variation rate to\n7000 rpm/s.\n\nAt t=0.3s, the desired speed i" "s reduced to 750 rpm.\n\nThe load torque is proportional to the speed. At\nno" "minal speed the load is equal to the nominal\ntorque of the PMSM.\n\nimperix " "Ltd. 2021" Position [280, 280] } } ProbeBlock { Tag "TN114_Motor_Speed_Control_v2/PMSM drive/PMSM meas" Probe { Component "PMSM" Path "PMSM drive" Signals {"Rotor position"} } } ProbeBlock { Tag "TN114_Motor_Speed_Control_v2/PMSM drive/Probe1" Probe { Component "PMSM" Path "PMSM drive" Signals {"Stator phase currents", "Rotational speed"} } } ProbeBlock { Tag "TN114_Motor_Speed_Control_v2/PMSM drive/V dc" Probe { Component "Vbus" Path "PMSM drive" Signals {"Sensor output"} } } ProbeBlock { Tag "TN114_Motor_Speed_Control_v2/PMSM drive/Probe3" Probe { Component "PMSM" Path "PMSM drive" Signals {"Stator flux (dq)", "Rotor position"} } } ProbeBlock { Tag "TN114_Motor_Speed_Control_v2/PMSM drive/Probe4" Probe { Component "Vbus" Path "PMSM drive" Signals {"True voltage value"} } Probe { Component "V_dc" Path "PMSM drive" Signals {"Source current"} } Probe { Component "Rchopper" Path "PMSM drive" Signals {"Resistor current"} } } ProbeBlock { Tag "TN114_Motor_Speed_Control_v2/PMSM drive/Is abc" Probe { Component "M1" Path "PMSM drive" Signals {"Output current (sensor signal)"} } Probe { Component "M2" Path "PMSM drive" Signals {"Output current (sensor signal)"} } Probe { Component "M3" Path "PMSM drive" Signals {"Output current (sensor signal)"} } } } DemoSignature "SlgJ5ZMCJMHY1etvas4SnIDAur8XZunygl1r4dmSyfU="