Plecs { Name "power_factor_measurement" Version "4.5" CircuitModel "ContStateSpace" StartTime "0.0" TimeSpan "1.0" Timeout "" Solver "auto" 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 "% Grid\nVll=480;\nVln=Vll/sqrt(3);\nFg=50;\nVllpk=Vl" "l*sqrt(2);\n\n% Load\nS=10e3;\nPF=0.8;\nphi=acos(PF);\nP=S*PF;\nQ=S*sin(phi);" "\nZ=3*Vln^2/S;\nR=3*Z*cos(phi);\nL=3*Z*sin(phi)/(2*pi*Fg);\n\n\nTau=1/Fg;" 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 [508, 667; 1170, 970] ZoomFactor 0.977776 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type ThreePhaseVoltageSource Name "V_3ph" Show on Position [110, 190] Direction up Flipped off Parameter { Variable "V" Value "Vllpk" Show off } Parameter { Variable "w" Value "Fg" Show off } Parameter { Variable "phi" Value "0" Show off } Parameter { Variable "neutral" Value "1" Show off } } Component { Type WireMux Name "WMux1" Show off Position [315, 190] Direction right Flipped on Parameter { Variable "Width" Value "3" Show off } } Component { Type Inductor Name "L3" Show off Position [235, 190] Direction left Flipped off Parameter { Variable "L" Value "L" Show off } Parameter { Variable "i_init" Value "0" Show off } } Component { Type Resistor Name "R3" Show off Position [280, 190] Direction right Flipped off Parameter { Variable "R" Value "R" Show off } } Component { Type ThreePhaseMeter Name "3ph Meter" Show off Position [170, 190] Direction up Flipped off Parameter { Variable "voltage" Value "1" Show off } } Component { Type WireMux Name "WMux" Show off Position [205, 190] Direction right Flipped off Parameter { Variable "Width" Value "3" Show off } } Component { Type Scope Name "Scope" Show on Position [285, 125] Direction up Flipped off Location [640, 313; 1262, 857] State "AAAA/wAAAAD9AAAAAgAAAAEAAAC0AAACBPwCAAAAA/sAAAAQAFoAbwBvA" "G0AQQByAGUAYQAAAAAA/////wAAAIQA////+wAAABQAUwBhAHYAZQBkAFYAaQBlAHcAcwAAAAAA//" "///wAAAGYA////+wAAAAwAVAByAGEAYwBlAHMBAAAAHAAAAgQAAABmAP///wAAAAMAAAAAAAAAAPw" "BAAAAAfsAAAAUAEQAYQB0AGEAVwBpAGQAZwBlAHQAAAAAAP////8AAABCAP///wAAAbkAAAIEAAAA" "BAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAOAFQAbwBvAGwAQgBhAHIBAAAAAP////8AAAAAA" "AAAAA==" SavedViews "AAAAAgAAAAA=" HeaderState "AAAA/wAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAL/gMAAAAJAAAAB" "gAAAGQAAAAJAAAAZAAAAAgAAABkAAAAAQAAAGQAAAADAAAAZAAAAAIAAABkAAAABQAAAGQAAAAEAA" "AAZAAAAAcAAABkAAAAvgAAAAsBAAABAAAAAAAAAAAAAAAAZP////8AAACBAAAAAAAAAAsAAACrAAA" "AAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAA" "AAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAA" "AATAAAAAQAAAAAAAAPoAAAAABM=" PlotPalettes "AAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAA" "AEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "==" Axes "3" TimeRange "0" ScrollingMode "1" SingleTimeAxis "1" Open "0" Ts "-1" SampleLimit "0" XAxisLabel "" ShowLegend "1" Axis { Name "Real Power" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] AxisLabel "W" Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Reactive Power" AutoScale 1 MinValue 0 MaxValue 1 Signals {} SignalTypes [ ] AxisLabel "VAr" Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "Power Factor" 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 } Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} Untangle 0 KeepBaseline off BaselineValue 0 } Axis { Name "" AutoScale 1 MinValue 0 MaxValue 1 Signals {} Untangle 0 KeepBaseline off BaselineValue 0 } } } Component { Type Subsystem Name "Three-Phase Meter" Show on Position [215, 120] Direction up Flipped off Frame [-25, -25; 25, 25] LabelPosition [0, -28] LabelAlign down SampleTime "-1" CodeGenDiscretizationMethod "2" CodeGenTarget "Generic" MaskDisplayLang "2" MaskIconFrame on MaskIconOpaque off MaskIconRotates on Terminal { Type Output Position [29, 15] Direction right } Terminal { Type Input Position [-25, 10] Direction left } Terminal { Type Input Position [-25, -15] Direction left } Terminal { Type Output Position [29, -15] Direction right } Terminal { Type Output Position [29, -5] Direction right } Terminal { Type Output Position [29, 5] Direction right } Schematic { Location [640, 313; 1139, 511] ZoomFactor 1 SliderPosition [0, 0] ShowBrowser off BrowserWidth 100 Component { Type Function Name "Pi" Show on Position [140, 85] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "f(u)" Value "u(1)*u(4) + u(2)*u(5)+u(3)*u(6)" Show off } } Component { Type Function Name "Qi" Show on Position [140, 125] Direction right Flipped off Frame [-20, -10; 20, 10] LabelPosition [0, 13] LabelAlign up Parameter { Variable "f(u)" Value "1/sqrt(3)*( (u(1)-u(2))*u(6) + (u(3)-u(1))*u(5) + (" "u(2)-u(3))*u(4) )" Show off } } Component { Type SignalMux Name "Mux1" Show off Position [180, 105] Direction right Flipped off Parameter { Variable "Width" Value "2" Show off } } Component { Type TransferFunction Name "Low Pass \nFilter" Show on Position [230, 105] 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 Math Name "Math" Show off Position [305, 105] Direction up Flipped off Parameter { Variable "Operator" Value "1" Show off } } Component { Type Math Name "Math1" Show off Position [385, 105] Direction up Flipped off Parameter { Variable "Operator" Value "2" Show off } } Component { Type Sum Name "Sum" Show off Position [345, 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 Product Name "Divide" Show off Position [490, 100] Direction up Flipped off Parameter { Variable "Inputs" Value "*/" Show off } Parameter { Variable "DataType" Value "10" Show off } } Component { Type Saturation Name "Saturation" Show off Position [435, 105] Direction right Flipped off Parameter { Variable "UpperLimit" Value "inf" Show off } Parameter { Variable "LowerLimit" Value "eps" Show off } } Component { Type Output Name "PF" Show on Position [540, 100] Direction right Flipped off Parameter { Variable "Index" Value "1" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "Iabc" Show on Position [20, 125] Direction right Flipped off Parameter { Variable "Index" Value "2" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Input Name "Vabc" Show on Position [20, 85] Direction right Flipped off Parameter { Variable "Index" Value "3" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type SignalMux Name "Mux" Show off Position [70, 105] Direction right Flipped off Parameter { Variable "Width" Value "[3 3]" Show off } } Component { Type SignalDemux Name "Demux" Show off Position [420, 55] Direction right Flipped on Parameter { Variable "Width" Value "2" Show off } } Component { Type Output Name "S" Show on Position [540, 140] Direction right Flipped off Parameter { Variable "Index" Value "4" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "P" Show on Position [540, 40] Direction right Flipped off Parameter { Variable "Index" Value "5" Show on } Parameter { Variable "Width" Value "-1" Show off } } Component { Type Output Name "Q" Show on Position [540, 70] Direction right Flipped off Parameter { Variable "Index" Value "6" Show on } Parameter { Variable "Width" Value "-1" Show off } } Connection { Type Signal SrcComponent "Pi" SrcTerminal 2 DstComponent "Mux1" DstTerminal 2 } Connection { Type Signal SrcComponent "Qi" SrcTerminal 2 DstComponent "Mux1" DstTerminal 3 } Connection { Type Signal SrcComponent "Mux1" SrcTerminal 1 DstComponent "Low Pass \nFilter" DstTerminal 1 } Connection { Type Signal SrcComponent "Math" SrcTerminal 1 DstComponent "Sum" DstTerminal 2 } Connection { Type Signal SrcComponent "Sum" SrcTerminal 1 DstComponent "Math1" DstTerminal 2 } Connection { Type Signal SrcComponent "Saturation" SrcTerminal 2 DstComponent "Divide" DstTerminal 3 } Connection { Type Signal SrcComponent "Divide" SrcTerminal 1 Points [510, 100; 510, 100] DstComponent "PF" DstTerminal 1 } Connection { Type Signal SrcComponent "Vabc" SrcTerminal 1 Points [50, 85; 50, 100] DstComponent "Mux" DstTerminal 2 } Connection { Type Signal SrcComponent "Iabc" SrcTerminal 1 Points [50, 125; 50, 110] DstComponent "Mux" DstTerminal 3 } Connection { Type Signal SrcComponent "Mux" SrcTerminal 1 Points [95, 105] Branch { Points [95, 85] DstComponent "Pi" DstTerminal 1 } Branch { Points [95, 125] DstComponent "Qi" DstTerminal 1 } } Connection { Type Signal SrcComponent "Math1" SrcTerminal 1 Points [405, 105] Branch { DstComponent "Saturation" DstTerminal 1 } Branch { Points [405, 140] DstComponent "S" DstTerminal 1 } } Connection { Type Signal SrcComponent "Demux" SrcTerminal 3 Points [440, 60; 440, 70] DstComponent "Q" DstTerminal 1 } Connection { Type Signal SrcComponent "Low Pass \nFilter" SrcTerminal 2 Points [275, 105] Branch { DstComponent "Math" DstTerminal 2 } Branch { Points [275, 55] DstComponent "Demux" DstTerminal 1 } } Connection { Type Signal SrcComponent "Demux" SrcTerminal 2 Points [440, 50; 440, 40; 460, 40] Branch { DstComponent "P" DstTerminal 1 } Branch { DstComponent "Divide" DstTerminal 2 } } } } Connection { Type Wire SrcComponent "WMux1" SrcTerminal 1 DstComponent "R3" DstTerminal 1 } Connection { Type Wire SrcComponent "WMux1" SrcTerminal 2 Points [325, 180; 325, 190] Branch { DstComponent "WMux1" DstTerminal 3 } Branch { Points [325, 200] DstComponent "WMux1" DstTerminal 4 } } Connection { Type Signal SrcComponent "Three-Phase Meter" SrcTerminal 1 DstComponent "Scope" DstTerminal 3 } Connection { Type Wire SrcComponent "L3" SrcTerminal 1 DstComponent "WMux" DstTerminal 1 } Connection { Type Wire SrcComponent "R3" SrcTerminal 2 DstComponent "L3" DstTerminal 2 } Connection { Type Wire SrcComponent "3ph Meter" SrcTerminal 1 DstComponent "V_3ph" DstTerminal 1 } Connection { Type Wire SrcComponent "3ph Meter" SrcTerminal 2 DstComponent "V_3ph" DstTerminal 2 } Connection { Type Wire SrcComponent "3ph Meter" SrcTerminal 3 DstComponent "V_3ph" DstTerminal 3 } Connection { Type Wire SrcComponent "WMux" SrcTerminal 2 DstComponent "3ph Meter" DstTerminal 4 } Connection { Type Wire SrcComponent "WMux" SrcTerminal 3 DstComponent "3ph Meter" DstTerminal 5 } Connection { Type Wire SrcComponent "WMux" SrcTerminal 4 DstComponent "3ph Meter" DstTerminal 6 } Connection { Type Signal SrcComponent "3ph Meter" SrcTerminal 7 Points [165, 105] DstComponent "Three-Phase Meter" DstTerminal 3 } Connection { Type Signal SrcComponent "3ph Meter" SrcTerminal 8 Points [175, 130] DstComponent "Three-Phase Meter" DstTerminal 2 } Connection { Type Wire SrcComponent "V_3ph" SrcTerminal 4 Points [90, 245; 170, 245] DstComponent "3ph Meter" DstTerminal 9 } Connection { Type Signal SrcComponent "Three-Phase Meter" SrcTerminal 5 DstComponent "Scope" DstTerminal 1 } Connection { Type Signal SrcComponent "Three-Phase Meter" SrcTerminal 6 DstComponent "Scope" DstTerminal 2 } } } DemoSignature "w5BH1dGwQ+5Bfk1ZvsFJAXOt8WQQMxLY2Jt9OZHxTdQ="