Plecs { Name "Snubber" Version "3.5" CircuitModel "DiscStateSpace" StartTime "0.0" StopTime "5" Solver "FixedStepDiscrete" MaxStep "0.000005" InitStep "0.000005" FixedStep "1e-5" Refine "1" ZCStepSize "1e-9" RelTol "1e-6" AbsTol "-1" TurnOnThreshold "0" SyncFixedStepTasks "2" UseSingleCommonBaseRate "2" NegativeSwitchLossMsg "3" InitializationCommands "" InitialState "1" SystemState "" CodeGenTopologies "[]" CodeGenParameterInlining "2" CodeGenInliningExceptions "AAAACwAAAAAA" CodeGenIntegerWordSize "32" CodeGenAbsTimeUsageMsg "3" CodeGenBaseName "" CodeGenOutputDir "" Schematic { Location [4, 38; 1600, 813] ZoomFactor 1.77777 SliderPosition [0, 108] ShowBrowser off BrowserWidth 100 Component { Type Igbt Name "IGBT1" Show on Position [300, 320] Direction left Flipped off Parameter { Variable "Vf" Value "0" Show off } Parameter { Variable "Ron" Value "0.1" Show 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 Diode Name "D1" Show on Position [300, 215] Direction left 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 Capacitor Name "C1" Show on Position [370, 270] Direction down Flipped on Parameter { Variable "C" Value "1e-3" Show on } Parameter { Variable "v_init" Value "0" Show off } } Component { Type DCVoltageSource Name "V_dc" Show on Position [115, 325] Direction down Flipped on Parameter { Variable "V" Value "1" Show on } } Component { Type Inductor Name "L1" Show on Position [160, 260] Direction left Flipped off Parameter { Variable "L" Value "1" Show off } Parameter { Variable "i_init" Value "0" Show off } } Component { Type Resistor Name "R1" Show on Position [640, 330] Direction up Flipped off Parameter { Variable "R" Value "1" Show on } } Component { Type Igbt Name "IGBT2" Show on Position [465, 215] Direction left Flipped off Parameter { Variable "Vf" Value "0" Show off } Parameter { Variable "Ron" Value "0.1" Show 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 Diode Name "D2" Show on Position [470, 320] Direction left 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 Ground Name "Ground" Show off Position [115, 405] Direction up Flipped off } Component { Type Ground Name "Ground1" Show off Position [640, 410] Direction up Flipped off } Component { Type Voltmeter Name "Vm1" Show on Position [430, 265] Direction up Flipped off } Component { Type Ammeter Name "Am1" Show on Position [580, 255] Direction left Flipped off } Component { Type CScript Name "C-Script" Show on Position [275, 465] Direction right Flipped off Parameter { Variable "NumInputs" Value "3" Show off } Parameter { Variable "NumOutputs" Value "1" Show off } Parameter { Variable "NumContStates" Value "0" Show off } Parameter { Variable "NumDiscStates" Value "0" Show off } Parameter { Variable "NumZCSignals" Value "0" Show off } Parameter { Variable "DirectFeedthrough" Value "1" Show off } Parameter { Variable "Ts" Value "1e-4" Show off } Parameter { Variable "Parameters" Value "" Show off } Parameter { Variable "LangStandard" Value "2" Show off } Parameter { Variable "RuntimeCheck" Value "1" Show off } Parameter { Variable "Declarations" Value "#include \n#include \n#include \n#include \"track.h\"\n#include \"track.c\"\n \n\n#define REF Input(0) // " "Reference Current\n#define ISB Input(1) // Snubber Output Current\n#define VC" "S Input(2) // Capacitor Voltage\n#define IGBT Output(0) // IGBT Firing\n\n\n" "\n\n\n" Show off } Parameter { Variable "StartFcn" Value "" Show off } Parameter { Variable "OutputFcn" Value "\nIGBT = track(REF,ISB,VCS);\n" Show off } Parameter { Variable "UpdateFcn" Value "" Show off } Parameter { Variable "DerivativeFcn" Value "" Show off } Parameter { Variable "TerminateFcn" Value "" Show off } } Component { Type Goto Name "Goto" Show off Position [535, 165] Direction up Flipped off Parameter { Variable "Tag" Value "ISB" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Goto Name "Goto1" Show off Position [505, 165] Direction up Flipped off Parameter { Variable "Tag" Value "VCS" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Subsystem Name "Sub2" Show off Position [120, 430] Direction up Flipped off Frame [-25, -10; 25, 10] LabelPosition [-28, 0] LabelAlign right SampleTime "-1" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Parameter { Variable "A" Prompt "Amplitude" Type FreeText Value "2" Show on Tunable off } Parameter { Variable "f" Prompt "Frequency" Type FreeText Value "1" Show on Tunable off } Terminal { Type Output Position [29, 0] Direction right } Schematic { Location [410, 309; 997, 711] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Reference SrcComponent "Components/Control/Sources/Sine Wave" Name "Sine Wave1" Show on Position [160, 85] Direction up Flipped off Frame [-15, -15; 15, 15] LabelPosition [0, 18] LabelAlign up Parameter { Variable "Amplitude" Value "A" Show on } Parameter { Variable "Bias" Value "0" Show off } Parameter { Variable "Frequency" Value "f" Show on } Parameter { Variable "Phase" Value "0" Show off } Parameter { Variable "Units" Value "3" Show off } Terminal { Type Output Position [19, 0] Direction right } } Component { Type Reference SrcComponent "Components/Control/Sources/Sine Wave" Name "Sine Wave2" Show on Position [160, 160] Direction up Flipped off Frame [-15, -15; 15, 15] LabelPosition [0, 18] LabelAlign up Parameter { Variable "Amplitude" Value "A" Show on } Parameter { Variable "Bias" Value "0" Show off } Parameter { Variable "Frequency" Value "f" Show on } Parameter { Variable "Phase" Value "120" Show on } Parameter { Variable "Units" Value "3" Show off } Terminal { Type Output Position [19, 0] Direction right } } Component { Type Reference SrcComponent "Components/Control/Sources/Sine Wave" Name "Sine Wave3" Show on Position [160, 250] Direction up Flipped off Frame [-15, -15; 15, 15] LabelPosition [0, 18] LabelAlign up Parameter { Variable "Amplitude" Value "A" Show on } Parameter { Variable "Bias" Value "0" Show off } Parameter { Variable "Frequency" Value "f" Show on } Parameter { Variable "Phase" Value "-120" Show on } Parameter { Variable "Units" Value "3" Show off } Terminal { Type Output Position [19, 0] Direction right } } Component { Type Abs Name "Abs" Show on Position [350, 160] Direction right Flipped off } Component { Type MinMax Name "Min/Max" Show on Position [405, 160] Direction right Flipped off Parameter { Variable "Operation" Value "1" Show off } Parameter { Variable "Inputs" Value "1" Show off } } Component { Type SignalMux Name "Mux" Show off Position [305, 160] Direction right Flipped off Parameter { Variable "Width" Value "3" Show off } } Component { Type Output Name "Reference" Show on Position [460, 160] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Scope Name "Scope" Show on Position [470, 100] Direction up Flipped off Location [0, 29; 1600, 825] State "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAb" "wBvAG0AQQByAGUAYQAAAAAA/////wAAADgA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAA" "AA/////wAAAGoA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABqAP///wAAAAMAAAAAAAA" "AAPwBAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABbAP///wAABkAAAAL9" "AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AA" "AAAAAAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL/gMAAAAJA" "AAACQAAAGQAAAAIAAAAZAAAAAcAAABkAAAABgAAAGQAAAAFAAAAZAAAAAQAAABkAAAAAwAAAGQAAA" "ACAAAAZAAAAAEAAABkAAAAiwAAAAsBAAABAAAAAAAAAAAAAAAAZP////8AAACBAAAAAAAAAAMAAAB" "fAAAAAQAAAAAAAAAAAAAACQAAAAAAAAAsAAAAAQAAAAA=" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" Axes "1" TimeRange "0.0" SingleTimeAxis "1" Open "0" Ts "-1" SampleLimit "0" XAxisLabel "" Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 } Fourier { SingleXAxis on AxisLabel "Frequency" Scaling 0 PhaseDisplay 0 Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} Untangle 0 } } } Connection { Type Signal SrcComponent "Sine Wave1" SrcTerminal 1 Points [235, 85; 235, 150] DstComponent "Mux" DstTerminal 2 } Connection { Type Signal SrcComponent "Sine Wave2" SrcTerminal 1 DstComponent "Mux" DstTerminal 3 } Connection { Type Signal SrcComponent "Sine Wave3" SrcTerminal 1 Points [235, 250; 235, 170] DstComponent "Mux" DstTerminal 4 } Connection { Type Signal SrcComponent "Mux" SrcTerminal 1 DstComponent "Abs" DstTerminal 1 } Connection { Type Signal SrcComponent "Min/Max" SrcTerminal 1 DstComponent "Reference" DstTerminal 1 } Connection { Type Signal SrcComponent "Abs" SrcTerminal 2 Points [375, 160] Branch { DstComponent "Min/Max" DstTerminal 2 } Branch { Points [375, 100] DstComponent "Scope" DstTerminal 1 } } } } Component { Type SignalMux Name "Mux1" Show off Position [205, 465] Direction right Flipped off Parameter { Variable "Width" Value "3" Show off } } Component { Type From Name "From3" Show off Position [135, 455] Direction right Flipped off Parameter { Variable "Tag" Value "ISB" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type From Name "From4" Show off Position [135, 475] Direction right Flipped off Parameter { Variable "Tag" Value "VCS" Show off } Parameter { Variable "Visibility" Value "1" Show off } } Component { Type Scope Name "Scope1" Show on Position [285, 400] Direction up Flipped off Location [-1920, 29; 0, 1005] State "AAAA/wAAAAD9AAAAAgAAAAEAAAAAAAAAAPwCAAAAA/sAAAAQAFoAbwBvA" "G0AQQByAGUAYQAAAAAA/////wAAAIgA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAAAA//" "///wAAAGoA////+wAAAAwAVAByAGEAYwBlAHMAAAAAAP////8AAABqAP///wAAAAMAAAAAAAAAAPw" "BAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABbAP///wAAB4AAAAOxAAAA" "BAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AAAAAA" "AAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL/gMAAAAJAAAAC" "QAAAGQAAAAIAAAAZAAAAAcAAABkAAAABgAAAGQAAAAFAAAAZAAAAAQAAABkAAAAAwAAAGQAAAACAA" "AAZAAAAAEAAABkAAABHgAAAAsBAAABAAAAAAAAAAAAAAAAZP////8AAACBAAAAAAAAAAMAAADyAAA" "AAQAAAAAAAAAAAAAACQAAAAAAAAAsAAAAAQAAAAA=" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAA" "AEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "==" Axes "3" TimeRange "0.0" SingleTimeAxis "1" Open "1" Ts "-1" SampleLimit "0" XAxisLabel "" Axis { Name "Reference [REF] + Snubber Current [ISB]" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 } Axis { Name "Capacitor Voltage [VCS]" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 } Axis { Name "IGBT Firing [OUT]" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] Untangle 0 } Fourier { SingleXAxis on AxisLabel "Frequency" Scaling 0 PhaseDisplay 0 Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} Untangle 0 } Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} Untangle 0 } Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} Untangle 0 } } } Component { Type SignalMux Name "Mux" Show off Position [175, 400] Direction right Flipped off Parameter { Variable "Width" Value "2" Show off } } Component { Type DiscreteMean Name "Discrete\nMean Value" Show on Position [65, 180] Direction right Flipped off Parameter { Variable "x0" Value "0" Show off } Parameter { Variable "ts" Value "0.1" Show off } Parameter { Variable "ns" Value "10" Show off } } Component { Type Display Name "Display" Show on Position [140, 180] Direction up Flipped off Frame [-31, -11; 31, 11] LabelPosition [0, 14] LabelAlign up Parameter { Variable "Notation" Value "1" Show off } Parameter { Variable "Precision" Value "4" Show off } } Component { Type DiscreteMean Name "Discrete\nMean Value1" Show on Position [650, 155] Direction right Flipped off Parameter { Variable "x0" Value "0" Show off } Parameter { Variable "ts" Value "0.1" Show off } Parameter { Variable "ns" Value "10" Show off } } Component { Type Display Name "Display1" Show on Position [725, 155] Direction up Flipped off Frame [-31, -11; 31, 11] LabelPosition [0, 14] LabelAlign up Parameter { Variable "Notation" Value "1" Show off } Parameter { Variable "Precision" Value "4" Show off } } Connection { Type Wire SrcComponent "C1" SrcTerminal 1 Points [370, 235; 395, 235] Branch { Points [395, 215] Branch { DstComponent "IGBT2" DstTerminal 1 } Branch { DstComponent "D1" DstTerminal 2 } } Branch { Points [430, 235] DstComponent "Vm1" DstTerminal 1 } } Connection { Type Wire SrcComponent "Vm1" SrcTerminal 2 Points [430, 300; 395, 300] Branch { Points [395, 320] Branch { DstComponent "D2" DstTerminal 1 } Branch { DstComponent "IGBT1" DstTerminal 2 } } Branch { Points [370, 300] DstComponent "C1" DstTerminal 2 } } Connection { Type Wire SrcComponent "IGBT1" SrcTerminal 1 Points [235, 320; 235, 260] Branch { Points [235, 215] DstComponent "D1" DstTerminal 1 } Branch { DstComponent "L1" DstTerminal 2 } } Connection { Type Wire SrcComponent "L1" SrcTerminal 1 Points [115, 260] DstComponent "V_dc" DstTerminal 1 } Connection { Type Wire SrcComponent "V_dc" SrcTerminal 2 DstComponent "Ground" DstTerminal 1 } Connection { Type Wire SrcComponent "IGBT2" SrcTerminal 2 Points [535, 215; 535, 255] Branch { Points [535, 320] DstComponent "D2" DstTerminal 2 } Branch { DstComponent "Am1" DstTerminal 1 } } Connection { Type Signal SrcComponent "Mux1" SrcTerminal 1 DstComponent "C-Script" DstTerminal 1 } Connection { Type Signal SrcComponent "From3" SrcTerminal 1 Points [155, 455] Branch { Points [170, 455; 170, 465] DstComponent "Mux1" DstTerminal 3 } Branch { Points [155, 405] DstComponent "Mux" DstTerminal 3 } } Connection { Type Signal SrcComponent "Mux" SrcTerminal 1 Points [220, 400; 220, 390] DstComponent "Scope1" DstTerminal 1 } Connection { Type Signal SrcComponent "From4" SrcTerminal 1 Points [185, 475] Branch { DstComponent "Mux1" DstTerminal 4 } Branch { Points [185, 400] DstComponent "Scope1" DstTerminal 2 } } Connection { Type Signal SrcComponent "Sub2" SrcTerminal 1 Points [150, 430] Branch { Points [155, 430] Branch { Points [180, 430; 180, 455] DstComponent "Mux1" DstTerminal 2 } Branch { Points [155, 395] DstComponent "Mux" DstTerminal 2 } } Branch { Points [150, 415; 35, 415] DstComponent "Discrete\nMean Value" DstTerminal 1 } } Connection { Type Signal SrcComponent "Discrete\nMean Value" SrcTerminal 2 DstComponent "Display" DstTerminal 1 } Connection { Type Wire SrcComponent "Ground1" SrcTerminal 1 DstComponent "R1" DstTerminal 2 } Connection { Type Signal SrcComponent "Discrete\nMean Value1" SrcTerminal 2 DstComponent "Display1" DstTerminal 1 } Connection { Type Signal SrcComponent "Am1" SrcTerminal 3 Points [580, 205; 565, 205] Branch { Points [535, 205] DstComponent "Goto" DstTerminal 1 } Branch { Points [565, 155] DstComponent "Discrete\nMean Value1" DstTerminal 1 } } Connection { Type Signal SrcComponent "C-Script" SrcTerminal 2 Points [325, 465; 325, 445; 300, 445] Branch { Points [240, 445; 240, 410] DstComponent "Scope1" DstTerminal 3 } Branch { Points [300, 365] Branch { DstComponent "IGBT1" DstTerminal 3 } Branch { Points [465, 365] DstComponent "IGBT2" DstTerminal 3 } } } Connection { Type Signal SrcComponent "Vm1" SrcTerminal 3 Points [505, 265] DstComponent "Goto1" DstTerminal 1 } Connection { Type Wire SrcComponent "Am1" SrcTerminal 2 Points [640, 255] DstComponent "R1" DstTerminal 1 } } Script { Name "Script" Script "" } } DemoSignature "CuTIGwYQ4YFX1UocWy9tGmU+vrr0IGtpUoHPr33UAck="