diff --git a/.gitignore b/.gitignore index ad577d0..a1ced8c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,10 @@ +# Matlab generated files + +*.autosave +SOCfile.mat +Data1.mat + + # Created by https://www.gitignore.io ### Matlab ### @@ -6,6 +13,7 @@ ## We have git for backups! ##--------------------------------------------------- + # Windows default autosave extension *.asv diff --git a/Microgrid_24h_Simulation.mdl b/Microgrid_24h_Simulation.mdl index 26c44f1..14edcbe 100644 --- a/Microgrid_24h_Simulation.mdl +++ b/Microgrid_24h_Simulation.mdl @@ -6,7 +6,7 @@ Model { NumRootInports 0 NumRootOutports 0 ParameterArgumentNames "" - ComputedModelVersion "1.97" + ComputedModelVersion "1.270" NumModelReferences 0 NumTestPointedSignals 0 } @@ -21,6 +21,10 @@ Model { MinMaxOverflowArchiveMode "Overwrite" FPTRunName "Run 1" MaxMDLFileLineLength 120 + StartFcn "%The GUI handles are by default hidden, turn them on\nset(0,'ShowHiddenHandles','on');\n\n%Set up the a" + "rguments that will go into the gain block event callback listener\nblk = 'Microgrid_24h_Simulation/Subsystem/Clock';" + "\nevent = 'PostOutputs';\nlistener = @updategui;\n\n%Create the listener\nh = add_exec_event_listener(blk, event, li" + "stener);\n\n" UserBdParams "PhysicalModelingChecksum;PhysicalModelingParameterChecksum;PhysicalModelingProducts" Object { $PropName "BdWindowsInfo" @@ -31,7 +35,7 @@ Model { $ObjectID 2 $ClassName "Simulink.WindowInfo" IsActive [1] - Location [0.0, 0.0, 1600.0, 876.0] + Location [-8.0, -8.0, 1616.0, 916.0] Object { $PropName "ModelBrowserInfo" $ObjectID 3 @@ -50,40 +54,58 @@ Model { } Array { Type "Simulink.EditorInfo" - Dimension 3 + Dimension 5 Object { $ObjectID 5 IsActive [0] ViewObjType "SimulinkSubsys" - LoadSaveID "1726" - Extents [1550.0, 729.0] + LoadSaveID "2800" + Extents [1566.0, 769.0] ZoomFactor [1.0] Offset [0.0, 0.0] } Object { $ObjectID 6 IsActive [1] - ViewObjType "SimulinkSubsys" - LoadSaveID "1362" - Extents [1550.0, 729.0] + ViewObjType "SimulinkTopLevel" + LoadSaveID "0" + Extents [1566.0, 769.0] ZoomFactor [0.8] - Offset [-170.41666666666652, 68.75] + Offset [0.0, 0.0] } Object { $ObjectID 7 IsActive [0] - ViewObjType "SimulinkTopLevel" - LoadSaveID "0" - Extents [1550.0, 729.0] + ViewObjType "SimulinkSubsys" + LoadSaveID "3018" + Extents [1566.0, 769.0] + ZoomFactor [1.0] + Offset [0.0, 0.0] + } + Object { + $ObjectID 8 + IsActive [0] + ViewObjType "SimulinkSubsys" + LoadSaveID "2981" + Extents [1566.0, 769.0] ZoomFactor [0.8] Offset [0.0, 0.0] } + Object { + $ObjectID 9 + IsActive [0] + ViewObjType "SimulinkSubsys" + LoadSaveID "2165" + Extents [1566.0, 769.0] + ZoomFactor [1.0] + Offset [0.0, 0.0] + } PropName "EditorsInfo" } } } - PhysicalModelingChecksum "3340571203" - PhysicalModelingParameterChecksum "3868783005" + PhysicalModelingChecksum "3851408854" + PhysicalModelingParameterChecksum "1991397807" PhysicalModelingProducts "Power_System_Blocks" Created "Sat Apr 20 11:36:48 2013" Creator "Student" @@ -91,9 +113,9 @@ Model { ModifiedByFormat "%" LastModifiedBy "Honorat" ModifiedDateFormat "%" - LastModifiedDate "Thu Jul 16 13:28:28 2015" - RTWModifiedTimeStamp 358954103 - ModelVersionFormat "1.%" + LastModifiedDate "Tue Sep 15 17:06:25 2015" + RTWModifiedTimeStamp 364235536 + ModelVersionFormat "1.%" ConfigurationManager "None" SampleTimeColors off SampleTimeAnnotations off @@ -128,7 +150,7 @@ Model { TryForcingSFcnDF off Object { $PropName "DataLoggingOverride" - $ObjectID 8 + $ObjectID 10 $ClassName "Simulink.SimulationData.ModelLoggingInfo" model_ "Dena_batea" signals_ [] @@ -150,6 +172,7 @@ Model { CovPath "/" CovSaveName "covdata" CovMetricSettings "dw" + CovHTMLOptions " -sRT=1 -aTS=1 -bRG=1 -bTC=1 -hTR=0 -nFC=0 -scm=1 -bcm=1 -xEv=0" CovNameIncrementing off CovHtmlReporting on CovForceBlockReductionOff on @@ -188,16 +211,16 @@ Model { Type "Handle" Dimension 1 Simulink.ConfigSet { - $ObjectID 9 + $ObjectID 11 Version "1.13.0" Array { Type "Handle" Dimension 9 Simulink.SolverCC { - $ObjectID 10 + $ObjectID 12 Version "1.13.0" StartTime "0.0" - StopTime "1" + StopTime "2.4" AbsTol "auto" FixedStep "auto" InitialStep "auto" @@ -229,7 +252,7 @@ Model { InsertRTBMode "Whenever possible" } Simulink.DataIOCC { - $ObjectID 11 + $ObjectID 13 Version "1.13.0" Decimation "1" ExternalInput "[t, u]" @@ -261,7 +284,7 @@ Model { Refine "1" } Simulink.OptimizationCC { - $ObjectID 12 + $ObjectID 14 Version "1.13.0" Array { Type "Cell" @@ -317,7 +340,7 @@ Model { ParallelExecutionInRapidAccelerator on } Simulink.DebuggingCC { - $ObjectID 13 + $ObjectID 15 Version "1.13.0" RTPrefix "error" ConsistencyChecking "none" @@ -369,9 +392,9 @@ Model { InvalidFcnCallConnMsg "error" FcnCallInpInsideContextMsg "UseLocalSettings" SignalLabelMismatchMsg "none" - UnconnectedInputMsg "warning" - UnconnectedOutputMsg "warning" - UnconnectedLineMsg "warning" + UnconnectedInputMsg "none" + UnconnectedOutputMsg "none" + UnconnectedLineMsg "none" SFcnCompatibilityMsg "none" FrameProcessingCompatibilityMsg "warning" UniqueDataStoreMsg "none" @@ -407,7 +430,7 @@ Model { SFTransitionActionBeforeConditionDiag "warning" } Simulink.HardwareCC { - $ObjectID 14 + $ObjectID 16 Version "1.13.0" ProdBitPerChar 8 ProdBitPerShort 16 @@ -448,7 +471,7 @@ Model { ProdEqTarget on } Simulink.ModelReferenceCC { - $ObjectID 15 + $ObjectID 17 Version "1.13.0" UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange" CheckModelReferenceTargetMessage "error" @@ -463,7 +486,7 @@ Model { SupportModelReferenceSimTargetCustomCode off } Simulink.SFSimCC { - $ObjectID 16 + $ObjectID 18 Version "1.13.0" SFSimEnableDebug on SFSimOverflowDetection on @@ -478,7 +501,7 @@ Model { } Simulink.RTWCC { $BackupClass "Simulink.RTWCC" - $ObjectID 17 + $ObjectID 19 Version "1.13.0" Array { Type "Cell" @@ -541,7 +564,7 @@ Model { Type "Handle" Dimension 2 Simulink.CodeAppCC { - $ObjectID 18 + $ObjectID 20 Version "1.13.0" Array { Type "Cell" @@ -608,7 +631,7 @@ Model { } Simulink.GRTTargetCC { $BackupClass "Simulink.TargetCC" - $ObjectID 19 + $ObjectID 21 Version "1.13.0" Array { Type "Cell" @@ -691,7 +714,7 @@ Model { } } SSC.SimscapeCC { - $ObjectID 20 + $ObjectID 22 Version "1.0" Array { Type "Cell" @@ -720,11 +743,11 @@ Model { } Simulink.ConfigSet { $PropName "ActiveConfigurationSet" - $ObjectID 9 + $ObjectID 11 } Object { $PropName "DataTransfer" - $ObjectID 21 + $ObjectID 23 $ClassName "Simulink.GlobalDataTransfer" DefaultTransitionBetweenSyncTasks "Ensure deterministic transfer (maximum delay)" DefaultTransitionBetweenAsyncTasks "Ensure data integrity only" @@ -813,6 +836,15 @@ Model { FramePeriod "inf" PreserveConstantTs off } + Block { + BlockType DeadZone + LowerValue "-0.5" + UpperValue "0.5" + SaturateOnIntegerOverflow on + LinearizeAsGain on + ZeroCross on + SampleTime "-1" + } Block { BlockType Demux Outputs "4" @@ -953,14 +985,6 @@ Model { InitialCondition "0" LinearizeAsGain on } - Block { - BlockType RelationalOperator - Operator ">=" - InputSameDT on - OutDataTypeStr "Inherit: Logical (see Configuration Parameters: Optimization)" - ZeroCross on - SampleTime "-1" - } Block { BlockType S-Function FunctionName "system" @@ -1001,33 +1025,6 @@ Model { SampleInput off SampleTime "-1" } - Block { - BlockType Signum - ZeroCross on - SampleTime "-1" - } - Block { - BlockType Sin - SineType "Time based" - TimeSource "Use simulation time" - Amplitude "1" - Bias "0" - Frequency "1" - Phase "0" - Samples "10" - Offset "0" - SampleTime "-1" - VectorParams1D on - } - Block { - BlockType Step - Time "1" - Before "0" - After "1" - SampleTime "-1" - VectorParams1D on - ZeroCross on - } Block { BlockType SubSystem ShowPortLabels "FromPortIcon" @@ -1088,7 +1085,7 @@ Model { } System { Name "Microgrid_24h_Simulation" - Location [0, 0, 1600, 876] + Location [-8, -8, 1608, 908] Open on ModelBrowserVisibility off ModelBrowserWidth 200 @@ -1102,7 +1099,7 @@ Model { ShowPageBoundaries off ZoomFactor "80" ReportName "simulink-default.rpt" - SIDHighWatermark "2624" + SIDHighWatermark "3076" Block { BlockType SubSystem Name "AC Load" @@ -1119,14 +1116,14 @@ Model { MaskHideContents off Object { $PropName "MaskObject" - $ObjectID 22 + $ObjectID 24 $ClassName "Simulink.Mask" - Display "image(imread('Plug.bmp'))" + Display "image(imread('img/Plug.bmp'))" } System { Name "AC Load" - Location [0, 0, 1600, 876] - Open off + Location [-8, -8, 1608, 908] + Open on ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" @@ -1149,7 +1146,7 @@ Model { SourceBlock "powerlib/Elements/Three-Phase\nDynamic Load" SourceType "Three-Phase Dynamic Load" NominalVoltage "[ 400 50 ]" - ActiveReactivePowers "[25000 -500]" + ActiveReactivePowers "[0 0]" PositiveSequence "[1 0]" ExternalControl on NpNq "[1 1]" @@ -1198,6 +1195,67 @@ Model { TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" + Block { + BlockType DeadZone + Name "Dead Zone" + SID "3071" + Position [880, 280, 910, 310] + ZOrder 33 + LowerValue "-10000" + UpperValue "0" + } + Block { + BlockType DeadZone + Name "Dead Zone1" + SID "3072" + Position [880, 355, 910, 385] + ZOrder 34 + LowerValue "-10000" + UpperValue "0" + } + Block { + BlockType Gain + Name "Gain" + SID "3074" + Position [960, 355, 990, 385] + ZOrder 35 + Gain "0.1" + ParamDataTypeStr "Inherit: Inherit via internal rule" + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Goto + Name "Goto" + SID "3035" + Position [1025, 355, 1085, 385] + ZOrder 30 + ShowName off + GotoTag "RPower" + TagVisibility "global" + } + Block { + BlockType Goto + Name "Goto1" + SID "3041" + Position [1025, 280, 1085, 310] + ZOrder 29 + ShowName off + GotoTag "APower" + TagVisibility "global" + } + Block { + BlockType Reference + Name "Power\n(3ph, Instantaneous)" + SID "3040" + Ports [2, 2] + Position [725, 315, 775, 355] + ZOrder 2 + LibraryVersion "1.31" + FontName "Arial" + SourceBlock "powerlib_meascontrol/Measurements/Power\n(3ph, Instantaneous)" + SourceType "Power (3ph, Instantaneous)" + } Block { BlockType SubSystem Name "Subsystem1" @@ -1489,14 +1547,30 @@ Model { Line { SrcBlock "Three-Phase \nI Measurement" SrcPort 1 - DstBlock "Subsystem2" - DstPort 1 + Points [7, 0] + Branch { + Points [0, 300] + DstBlock "Power\n(3ph, Instantaneous)" + DstPort 2 + } + Branch { + DstBlock "Subsystem2" + DstPort 1 + } } Line { SrcBlock "Three-Phase\nV Measurement" SrcPort 1 - DstBlock "Subsystem1" - DstPort 1 + Points [9, 0] + Branch { + Points [0, 265] + DstBlock "Power\n(3ph, Instantaneous)" + DstPort 1 + } + Branch { + DstBlock "Subsystem1" + DstPort 1 + } } Line { LineType "Connection" @@ -1540,15 +1614,47 @@ Model { DstBlock "C " DstPort RConn1 } + Line { + SrcBlock "Power\n(3ph, Instantaneous)" + SrcPort 1 + Points [44, 0; 0, -30] + DstBlock "Dead Zone" + DstPort 1 + } + Line { + SrcBlock "Power\n(3ph, Instantaneous)" + SrcPort 2 + Points [55, 0; 0, 25] + DstBlock "Dead Zone1" + DstPort 1 + } + Line { + SrcBlock "Dead Zone" + SrcPort 1 + DstBlock "Goto1" + DstPort 1 + } + Line { + SrcBlock "Dead Zone1" + SrcPort 1 + DstBlock "Gain" + DstPort 1 + } + Line { + SrcBlock "Gain" + SrcPort 1 + DstBlock "Goto" + DstPort 1 + } } } Block { BlockType SubSystem Name "Load Measurements1" - SID "2179" + SID "3042" Ports [0, 0, 0, 0, 0, 3, 3] - Position [165, 240, 305, 330] - ZOrder -4 + Position [145, 270, 285, 360] + ZOrder 2 BlockRotation 270 BlockMirror on NamePlacement "alternate" @@ -1578,7 +1684,7 @@ Model { Block { BlockType SubSystem Name "Subsystem1" - SID "2356" + SID "3043" Ports [1] Position [640, 41, 675, 79] ZOrder -1 @@ -1608,7 +1714,7 @@ Model { Block { BlockType Inport Name "Vabc" - SID "2357" + SID "3044" Position [25, 38, 55, 52] ZOrder -1 IconDisplay "Port number" @@ -1616,7 +1722,7 @@ Model { Block { BlockType Goto Name "Goto2" - SID "2358" + SID "3045" Position [185, 31, 245, 59] ZOrder -20 NamePlacement "alternate" @@ -1627,7 +1733,7 @@ Model { Block { BlockType ToWorkspace Name "To Workspace1" - SID "2359" + SID "3046" Ports [1] Position [185, 75, 245, 105] ZOrder -21 @@ -1655,7 +1761,7 @@ Model { Block { BlockType SubSystem Name "Subsystem2" - SID "2360" + SID "3047" Ports [1] Position [190, 26, 225, 64] ZOrder -2 @@ -1685,7 +1791,7 @@ Model { Block { BlockType Inport Name "Iabc3" - SID "2361" + SID "3048" Position [25, 38, 55, 52] ZOrder -1 IconDisplay "Port number" @@ -1693,7 +1799,7 @@ Model { Block { BlockType Goto Name "Goto2" - SID "2362" + SID "3049" Position [185, 31, 245, 59] ZOrder -20 NamePlacement "alternate" @@ -1704,7 +1810,7 @@ Model { Block { BlockType ToWorkspace Name "To Workspace1" - SID "2363" + SID "3050" Ports [1] Position [185, 75, 245, 105] ZOrder -21 @@ -1732,7 +1838,7 @@ Model { Block { BlockType Reference Name "Three-Phase\nV Measurement" - SID "2182" + SID "3051" Ports [0, 1, 0, 0, 0, 3, 3] Position [525, 40, 610, 170] ZOrder -3 @@ -1759,7 +1865,7 @@ Model { Block { BlockType Reference Name "Three-Phase \nI Measurement" - SID "2183" + SID "3052" Ports [0, 1, 0, 0, 0, 3, 3] Position [80, 25, 165, 155] ZOrder -4 @@ -1786,7 +1892,7 @@ Model { Block { BlockType PMIOPort Name "a" - SID "2184" + SID "3053" Position [25, 38, 55, 52] ZOrder -5 Port "1" @@ -1795,7 +1901,7 @@ Model { Block { BlockType PMIOPort Name "A " - SID "2185" + SID "3054" Position [835, 83, 865, 97] ZOrder -6 BlockMirror on @@ -1805,7 +1911,7 @@ Model { Block { BlockType PMIOPort Name "B" - SID "2186" + SID "3055" Position [25, 83, 55, 97] ZOrder -7 Port "3" @@ -1814,7 +1920,7 @@ Model { Block { BlockType PMIOPort Name "B " - SID "2187" + SID "3056" Position [835, 113, 865, 127] ZOrder -8 BlockMirror on @@ -1824,7 +1930,7 @@ Model { Block { BlockType PMIOPort Name "C" - SID "2188" + SID "3057" Position [25, 128, 55, 142] ZOrder -9 Port "5" @@ -1833,7 +1939,7 @@ Model { Block { BlockType PMIOPort Name "C " - SID "2189" + SID "3058" Position [835, 143, 865, 157] ZOrder -10 BlockMirror on @@ -1970,7 +2076,7 @@ Model { MaskHideContents off System { Name "Power Demand 24h" - Location [0, 0, 1600, 876] + Location [-8, -8, 1608, 908] Open off ModelBrowserVisibility off ModelBrowserWidth 200 @@ -1990,8 +2096,10 @@ Model { Position [20, 58, 85, 82] ZOrder 23 VariableName "VARPA'" - SampleTime "0" - ZeroCross on + OutDataTypeStr "double" + SampleTime "[0.1,0]" + Interpolate off + OutputAfterFinalValue "Setting to zero" } Block { BlockType FromWorkspace @@ -2000,8 +2108,10 @@ Model { Position [20, 148, 85, 172] ZOrder 24 VariableName "VARPQ'" - SampleTime "0" - ZeroCross on + OutDataTypeStr "double" + SampleTime "[0.1,0]" + Interpolate off + OutputAfterFinalValue "Setting to zero" } Block { BlockType Concatenate @@ -2045,10 +2155,10 @@ Model { Block { BlockType Reference Name "Three-Phase\nParallel RLC Load1" - SID "2206" + SID "3059" Ports [0, 0, 0, 0, 0, 3] - Position [165, 410, 305, 575] - ZOrder -21 + Position [145, 440, 285, 605] + ZOrder 1 BlockRotation 270 BlockMirror on ShowName off @@ -2062,7 +2172,7 @@ Model { Configuration "Y (grounded)" NominalVoltage "400" NominalFrequency "50" - ActivePower "1e3" + ActivePower "10" InductivePower "0" CapacitivePower "0" Measurements "Branch voltages and currents" @@ -2117,15 +2227,16 @@ Model { LineType "Connection" SrcBlock "A" SrcPort RConn1 - Points [105, 0] + Points [85, 0] Branch { - ConnectType "DEST_SRC" - DstBlock "Load Measurements" - DstPort LConn1 + ConnectType "DEST_DEST" + SrcBlock "Load Measurements1" + SrcPort LConn1 + Points [0, -150] } Branch { ConnectType "DEST_SRC" - DstBlock "Load Measurements1" + DstBlock "Load Measurements" DstPort LConn1 } } @@ -2133,48 +2244,58 @@ Model { LineType "Connection" SrcBlock "Load Measurements" SrcPort LConn2 - Points [-150, 0] + Points [-170, 0] Branch { ConnectType "DEST_SRC" DstBlock "B" DstPort RConn1 } Branch { - ConnectType "DEST_SRC" - DstBlock "Load Measurements1" - DstPort LConn2 + ConnectType "DEST_DEST" + SrcBlock "Load Measurements1" + SrcPort LConn2 + Points [0, -110] } } Line { LineType "Connection" SrcBlock "Load Measurements" SrcPort LConn3 - Points [-105, 0] + Points [-125, 0] Branch { ConnectType "DEST_SRC" DstBlock "C" DstPort RConn1 } Branch { - ConnectType "DEST_SRC" - DstBlock "Load Measurements1" - DstPort LConn3 + ConnectType "DEST_DEST" + SrcBlock "Load Measurements1" + SrcPort LConn3 + Points [0, -70] } } Line { LineType "Connection" - SrcBlock "Load Measurements1" + SrcBlock "Load Measurements" SrcPort RConn1 - DstBlock "Three-Phase\nParallel RLC Load1" + Points [35, 0; 0, 20; 210, 0; 0, -20] + DstBlock "3-Phase\nDynamic Load" DstPort LConn1 } Line { LineType "Connection" - SrcBlock "Load Measurements1" + SrcBlock "Load Measurements" SrcPort RConn2 - DstBlock "Three-Phase\nParallel RLC Load1" + DstBlock "3-Phase\nDynamic Load" DstPort LConn2 } + Line { + LineType "Connection" + SrcBlock "Load Measurements" + SrcPort RConn3 + DstBlock "3-Phase\nDynamic Load" + DstPort LConn3 + } Line { LineType "Connection" SrcBlock "Load Measurements1" @@ -2184,26 +2305,18 @@ Model { } Line { LineType "Connection" - SrcBlock "Load Measurements" + SrcBlock "Load Measurements1" SrcPort RConn1 - Points [35, 0; 0, 20; 210, 0; 0, -20] - DstBlock "3-Phase\nDynamic Load" + DstBlock "Three-Phase\nParallel RLC Load1" DstPort LConn1 } Line { LineType "Connection" - SrcBlock "Load Measurements" + SrcBlock "Load Measurements1" SrcPort RConn2 - DstBlock "3-Phase\nDynamic Load" + DstBlock "Three-Phase\nParallel RLC Load1" DstPort LConn2 } - Line { - LineType "Connection" - SrcBlock "Load Measurements" - SrcPort RConn3 - DstBlock "3-Phase\nDynamic Load" - DstPort LConn3 - } } } Block { @@ -2223,13 +2336,13 @@ Model { MaskHideContents off Object { $PropName "MaskObject" - $ObjectID 23 + $ObjectID 25 $ClassName "Simulink.Mask" - Display "image(imread('Battery.bmp'))" + Display "image(imread('img/Battery.bmp'))" } System { Name "Battery" - Location [-8, 0, 1604, 876] + Location [-8, -8, 1608, 908] Open off ModelBrowserVisibility off ModelBrowserWidth 200 @@ -2247,7 +2360,7 @@ Model { Name "Battery" SID "422" Ports [0, 1, 0, 0, 0, 2] - Position [245, 66, 345, 184] + Position [270, 66, 370, 184] ZOrder -1 BlockMirror on LibraryVersion "1.996" @@ -2257,20 +2370,20 @@ Model { SourceType "Battery" BatType "Lead-Acid" ShowDetailedParameters off - NomV "250" - NomQ "500" - SOC "30" + NomV "1800" + NomQ "3" + SOC "50" PresetModel on - MaxQ "520.8333" - FullV "272.2039" - Dis_rate "100" - R "0.005" - Normal_OP "155.1389" - expZone "[254.523 1.666667]" + MaxQ "10.4167" + FullV "1959.8684" + Dis_rate "2" + R "1.8" + Normal_OP "3.1028" + expZone "[1832.5658 0.033333333]" Dis_Char off current "[20 50 100]" Units "Time" - Batt_Tr "1" + Batt_Tr "2.7e-10" } Block { BlockType BusSelector @@ -2621,20 +2734,6 @@ Model { DstBlock "LPF vq1" DstPort 1 } - Line { - LineType "Connection" - SrcBlock "-" - SrcPort RConn1 - DstBlock "Battery" - DstPort LConn2 - } - Line { - LineType "Connection" - SrcBlock "Battery" - SrcPort LConn1 - DstBlock "+" - DstPort RConn1 - } Line { SrcBlock "LPF vq1" SrcPort 1 @@ -2663,21 +2762,36 @@ Model { DstBlock "Subsystem2" DstPort 1 } + Line { + LineType "Connection" + SrcBlock "Battery" + SrcPort LConn1 + DstBlock "+" + DstPort RConn1 + } + Line { + LineType "Connection" + SrcBlock "Battery" + SrcPort LConn2 + DstBlock "-" + DstPort RConn1 + } } } Block { BlockType SubSystem Name "Bidirectional DC/DC\n Converter" SID "429" + Tag "Bidirectional" Ports [0, 0, 0, 0, 0, 2, 2] Position [555, 700, 710, 840] ZOrder -3 - BackgroundColor "lightBlue" + BackgroundColor "[0.380392, 0.741176, 0.988235]" ShowName off FontName "Arial Narrow" FontSize 16 FontWeight "bold" - MinAlgLoopOccurrences off + MinAlgLoopOccurrences on PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off @@ -2686,7 +2800,7 @@ Model { MaskHideContents off Object { $PropName "MaskObject" - $ObjectID 24 + $ObjectID 26 $ClassName "Simulink.Mask" Display "disp('Bidirectional Converter') \n" } @@ -2706,1310 +2820,848 @@ Model { ShowPageBoundaries off ZoomFactor "100" Block { - BlockType SubSystem - Name "Battery Converter\n Control" - SID "629" - Ports [0, 2] - Position [135, 52, 290, 143] - ZOrder -1 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Battery Converter\n Control" - Location [-8, -8, 1608, 908] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Reference - Name "Compare\nTo Constant" - SID "630" - Ports [1, 1] - Position [1055, 50, 1085, 80] - ZOrder -1 - ShowName off - LibraryVersion "1.274" - SourceBlock "simulink/Logic and Bit\nOperations/Compare\nTo Constant" - SourceType "Compare To Constant" - relop "==" - const "1" - OutDataTypeStr "uint8" - ZeroCross on - } - Block { - BlockType Reference - Name "Compare\nTo Constant1" - SID "631" - Ports [1, 1] - Position [1055, 215, 1085, 245] - ZOrder -2 - ShowName off - LibraryVersion "1.274" - SourceBlock "simulink/Logic and Bit\nOperations/Compare\nTo Constant" - SourceType "Compare To Constant" - relop "==" - const "-1" - OutDataTypeStr "uint8" - ZeroCross on - } - Block { - BlockType Scope - Name "DC Bus Measurements4" - SID "636" - Ports [2] - Position [1285, 130, 1325, 185] - ZOrder -19 - ShowName off - Floating off - Location [6, 48, 1372, 727] - Open off - NumInputPorts "2" - ZoomMode "xonly" - List { - ListType AxesTitles - axes1 "Phase to Ground Load Voltages, Vabc (V)" - axes2 "Load Currents, Iabc (A)" - } - List { - ListType ScopeGraphics - FigureColor "[0.5 0.5 0.5]" - AxesColor "[0 0 0]" - AxesTickColor "[1 1 1]" - LineColors "[1 1 0;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" - LineStyles "-|-|-|-|-|-" - LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" - MarkerStyles "none|none|none|none|none|none" - } - ShowLegends off - TimeRange "0.5" - YMin "320~16" - YMax "410~20.5" - SaveName "ScopeData3" - DataFormat "StructureWithTime" - LimitDataPoints off - SampleTime "0" + BlockType Reference + Name "Breaker" + SID "2684" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [495, 250, 550, 290] + ZOrder 5 + LibraryVersion "1.2191" + SourceBlock "powerlib/Elements/Breaker" + SourceType "Breaker" + BreakerResistance "0.01" + InitialState "1" + SnubberResistance "1e6" + SnubberCapacitance "inf" + SwitchingTimes "[ 1/60 5/60 ]" + External on + Measurements "None" + MoreParameters off + NoBreakLoop off + } + Block { + BlockType Reference + Name "Breaker1" + SID "2685" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [485, 445, 540, 485] + ZOrder 6 + LibraryVersion "1.2191" + SourceBlock "powerlib/Elements/Breaker" + SourceType "Breaker" + BreakerResistance "0.01" + InitialState "1" + SnubberResistance "1e6" + SnubberCapacitance "inf" + SwitchingTimes "[ 1/60 5/60 ]" + External on + Measurements "None" + MoreParameters off + NoBreakLoop off + } + Block { + BlockType Reference + Name "Current Measurement1" + SID "677" + Ports [0, 1, 0, 0, 0, 1, 1] + Position [770, 88, 795, 112] + ZOrder -4 + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Current Measurement" + SourceType "Current Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" + } + Block { + BlockType Reference + Name "Current Measurement2" + SID "435" + Ports [0, 1, 0, 0, 0, 1, 1] + Position [245, 263, 270, 287] + ZOrder -5 + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Current Measurement" + SourceType "Current Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" + } + Block { + BlockType From + Name "From1" + SID "2690" + Position [365, 106, 450, 134] + ZOrder 11 + NamePlacement "alternate" + ShowName off + GotoTag "ChargeControl" + TagVisibility "global" + } + Block { + BlockType From + Name "From2" + SID "3025" + Position [980, 261, 1055, 289] + ZOrder 13 + NamePlacement "alternate" + ShowName off + GotoTag "Vbus_solar" + TagVisibility "global" + } + Block { + BlockType From + Name "From3" + SID "3034" + Position [980, 301, 1055, 329] + ZOrder 14 + NamePlacement "alternate" + ShowName off + GotoTag "Ibus_solar" + TagVisibility "global" + } + Block { + BlockType From + Name "From4" + SID "2660" + Position [980, 221, 1055, 249] + ZOrder 1 + NamePlacement "alternate" + ShowName off + GotoTag "SOC" + TagVisibility "global" + } + Block { + BlockType Goto + Name "Goto" + SID "436" + Position [170, 350, 230, 380] + ZOrder -10 + ShowName off + GotoTag "V_bat" + TagVisibility "global" + } + Block { + BlockType Goto + Name "Goto3" + SID "439" + Position [300, 190, 355, 220] + ZOrder -10 + ShowName off + GotoTag "ILbat" + TagVisibility "global" + } + Block { + BlockType Goto + Name "Goto5" + SID "2682" + Position [1325, 260, 1400, 290] + ZOrder 3 + NamePlacement "alternate" + ShowName off + GotoTag "ChargeControl" + TagVisibility "global" + } + Block { + BlockType SubSystem + Name "MATLAB Function" + SID "2681" + Ports [3, 1] + Position [1115, 234, 1270, 316] + ZOrder 2 + LibraryVersion "1.32" + ErrorFcn "Stateflow.Translate.translate" + PermitHierarchicalResolution "ExplicitOnly" + TreatAsAtomicUnit on + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + SFBlockType "MATLAB Function" + System { + Name "MATLAB Function" + Location [223, 338, 826, 833] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + SIDHighWatermark "23" + Block { + BlockType Inport + Name "SOC" + SID "2681::1" + Position [20, 101, 40, 119] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Inport + Name "Vbus" + SID "2681::22" + Position [20, 136, 40, 154] + ZOrder 8 + Port "2" + IconDisplay "Port number" + } + Block { + BlockType Inport + Name "Ibus" + SID "2681::23" + Position [20, 171, 40, 189] + ZOrder 9 + Port "3" + IconDisplay "Port number" } Block { BlockType Demux - Name "Demux" - SID "639" - Ports [1, 2] - Position [965, 129, 970, 196] - ZOrder -20 - ShowName off - Outputs "2" - DisplayOption "bar" + Name " Demux " + SID "2681::19" + Ports [1, 1] + Position [270, 230, 320, 270] + ZOrder 5 + Outputs "1" } Block { - BlockType From - Name "From1" - SID "640" - Position [15, 216, 80, 244] - ZOrder -8 - ShowName off - GotoTag "Vdc" - TagVisibility "global" + BlockType S-Function + Name " SFunction " + SID "2681::18" + Tag "Stateflow S-Function Microgrid_24h_Simulation 2" + Ports [3, 2] + Position [180, 100, 230, 180] + ZOrder 4 + FunctionName "sf_sfun" + PortCounts "[3 2]" + EnableBusSupport on + Port { + PortNumber 2 + Name "ChargeControl" + RTWStorageClass "Auto" + DataLoggingNameMode "SignalName" + } } Block { - BlockType From - Name "From2" - SID "641" - Position [315, 216, 380, 244] - ZOrder -8 - ShowName off - GotoTag "ILbat" - TagVisibility "global" + BlockType Terminator + Name " Terminator " + SID "2681::20" + Position [460, 241, 480, 259] + ZOrder 6 } Block { - BlockType SubSystem - Name "PI 1" - SID "644" - Ports [1, 1] - Position [285, 144, 380, 186] - ZOrder -23 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "PI 1" - Location [-8, -8, 1608, 908] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "e" - SID "645" - Position [30, 65, 45, 95] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Gain - Name "Gain1" - SID "646" - Position [160, 61, 215, 99] - ZOrder -2 - ShowName off - Gain "0.65" - ParamDataTypeStr "Inherit: Inherit via internal rule" - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Gain - Name "Gain2" - SID "647" - Position [160, 136, 215, 174] - ZOrder -3 - ShowName off - Gain "150" - ParamDataTypeStr "Inherit: Inherit via internal rule" - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Integrator - Name "Integrator" - SID "649" - Ports [1, 1] - Position [280, 140, 310, 170] - ZOrder -4 - ShowName off - } - Block { - BlockType Saturate - Name "Saturation" - SID "650" - Ports [1, 1] - Position [410, 65, 440, 95] - ZOrder -5 - ShowName off - InputPortMap "u0" - UpperLimit "500" - LowerLimit "-100" - } - Block { - BlockType Sum - Name "Sum1" - SID "651" - Ports [2, 1] - Position [335, 70, 355, 90] - ZOrder -6 - ShowName off - IconShape "round" - Inputs "|++" - InputSameDT off - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Outport - Name " " - SID "652" - Position [505, 65, 520, 95] - ZOrder -7 - IconDisplay "Port number" - } - Line { - SrcBlock "Saturation" - SrcPort 1 - DstBlock " " - DstPort 1 - } - Line { - SrcBlock "Gain2" - SrcPort 1 - DstBlock "Integrator" - DstPort 1 - } - Line { - SrcBlock "e" - SrcPort 1 - Points [50, 0] - Branch { - DstBlock "Gain1" - DstPort 1 - } - Branch { - Points [0, 75] - DstBlock "Gain2" - DstPort 1 - } - } - Line { - SrcBlock "Gain1" - SrcPort 1 - DstBlock "Sum1" - DstPort 1 - } - Line { - SrcBlock "Integrator" - SrcPort 1 - Points [30, 0] - DstBlock "Sum1" - DstPort 2 - } - Line { - SrcBlock "Sum1" - SrcPort 1 - DstBlock "Saturation" - DstPort 1 - } - } + BlockType Outport + Name "ChargeControl" + SID "2681::5" + Position [460, 101, 480, 119] + ZOrder -5 + IconDisplay "Port number" } - Block { - BlockType SubSystem - Name "PI 2" - SID "653" - Ports [1, 1] - Position [615, 144, 710, 186] - ZOrder -24 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "PI 2" - Location [-8, -8, 1608, 908] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "e" - SID "654" - Position [30, 65, 45, 95] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Gain - Name "Gain1" - SID "655" - Position [160, 61, 215, 99] - ZOrder -2 - ShowName off - ParamDataTypeStr "Inherit: Inherit via internal rule" - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Gain - Name "Gain2" - SID "656" - Position [160, 136, 215, 174] - ZOrder -3 - ShowName off - ParamDataTypeStr "Inherit: Inherit via internal rule" - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Integrator - Name "Integrator" - SID "657" - Ports [1, 1] - Position [280, 140, 310, 170] - ZOrder -4 - ShowName off - } - Block { - BlockType Saturate - Name "Saturation" - SID "658" - Ports [1, 1] - Position [410, 65, 440, 95] - ZOrder -5 - ShowName off - InputPortMap "u0" - UpperLimit "1" - LowerLimit "-1" - } - Block { - BlockType Sum - Name "Sum1" - SID "659" - Ports [2, 1] - Position [335, 70, 355, 90] - ZOrder -6 - ShowName off - IconShape "round" - Inputs "|++" - InputSameDT off - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Outport - Name " " - SID "660" - Position [505, 65, 520, 95] - ZOrder -7 - IconDisplay "Port number" - } - Line { - SrcBlock "Sum1" - SrcPort 1 - DstBlock "Saturation" - DstPort 1 - } - Line { - SrcBlock "Integrator" - SrcPort 1 - Points [30, 0] - DstBlock "Sum1" - DstPort 2 - } - Line { - SrcBlock "Gain1" - SrcPort 1 - DstBlock "Sum1" - DstPort 1 - } - Line { - SrcBlock "e" - SrcPort 1 - Points [50, 0] - Branch { - Points [0, 75] - DstBlock "Gain2" - DstPort 1 - } - Branch { - DstBlock "Gain1" - DstPort 1 - } - } - Line { - SrcBlock "Gain2" - SrcPort 1 - DstBlock "Integrator" - DstPort 1 - } - Line { - SrcBlock "Saturation" - SrcPort 1 - DstBlock " " - DstPort 1 - } - } + Line { + SrcBlock "SOC" + SrcPort 1 + Points [120, 0] + DstBlock " SFunction " + DstPort 1 } - Block { - BlockType Reference - Name "PWM Generator2" - SID "661" - Ports [1, 1] - Position [815, 141, 925, 189] - ZOrder -25 - LibraryVersion "1.664" - LinkData { - BlockName "Triangle" - DialogParameters { - rep_seq_y "[0 1 0]" - rep_seq_t "[0 1/Fc/2 1/Fc]" - } - } - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib_extras/Control \nBlocks/PWM Generator" - SourceType "PWM Generator" - GeneratorMode "1-arm bridge (2 pulses)" - Fc "10000" - Internal off - mIndex "0.2" - Freq "0" - Phase "0" + Line { + SrcBlock "Vbus" + SrcPort 1 + DstBlock " SFunction " + DstPort 2 } - Block { - BlockType Product - Name "Product" - SID "662" - Ports [2, 1] - Position [1175, 57, 1205, 88] - ZOrder -26 - ShowName off - InputSameDT off - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off + Line { + SrcBlock "Ibus" + SrcPort 1 + DstBlock " SFunction " + DstPort 3 } - Block { - BlockType Product - Name "Product1" - SID "663" - Ports [2, 1] - Position [1175, 222, 1205, 253] - ZOrder -27 - ShowName off - InputSameDT off - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off + Line { + Name "ChargeControl" + Labels [0, 0] + SrcBlock " SFunction " + SrcPort 2 + DstBlock "ChargeControl" + DstPort 1 } - Block { - BlockType Signum - Name "Sign" - SID "664" - Position [815, 50, 845, 80] - ZOrder -28 - SampleTime "5e-6" + Line { + SrcBlock " Demux " + SrcPort 1 + DstBlock " Terminator " + DstPort 1 + } + Line { + SrcBlock " SFunction " + SrcPort 1 + DstBlock " Demux " + DstPort 1 } + } + } + Block { + BlockType SubSystem + Name "Subsystem1" + SID "726" + Ports [1] + Position [815, 16, 850, 54] + ZOrder -17 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem1" + Location [-8, 0, 1608, 916] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" Block { - BlockType Step - Name "Step1" - SID "665" - Position [15, 150, 45, 180] - ZOrder -22 - ShowName off - Time "0" - After "1000" - SampleTime "0" + BlockType Inport + Name "Idc" + SID "727" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" } Block { - BlockType SubSystem - Name "Subsystem1" - SID "784" - Ports [1] - Position [110, 91, 145, 129] - ZOrder -30 - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem1" - Location [982, 630, 1308, 931] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "Vdc_ref" - SID "785" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Goto - Name "Goto2" - SID "786" - Position [185, 31, 245, 59] - ZOrder -20 - NamePlacement "alternate" - ShowName off - GotoTag "Vdc_ref" - TagVisibility "global" - } - Block { - BlockType Reference - Name "LPF vq6" - SID "787" - Ports [1, 1] - Position [85, 29, 125, 61] - ZOrder -21 - ShowName off - LibraryVersion "1.664" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" - SourceType "Discrete 1st-Order Filter" - FilterType "Lowpass" - Tc "10e-3" - Ts "5e-6" - Initialize off - Vac_Init "[0.8 -25 60]" - Vdc_Init "0" - PlotResponse off - param1 "[1 100 0.1]" - } - Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "788" - Ports [1] - Position [185, 75, 245, 105] - ZOrder -22 - ShowName off - VariableName "Vdc_ref" - MaxDataPoints "inf" - SampleTime "-1" - } - Line { - SrcBlock "Vdc_ref" - SrcPort 1 - DstBlock "LPF vq6" - DstPort 1 - } - Line { - SrcBlock "LPF vq6" - SrcPort 1 - Points [15, 0] - Branch { - DstBlock "Goto2" - DstPort 1 - } - Branch { - Points [0, 45] - DstBlock "To Workspace1" - DstPort 1 - } - } - } + BlockType Goto + Name "Goto2" + SID "728" + Position [175, 31, 235, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Idc" + TagVisibility "global" } Block { - BlockType SubSystem - Name "Subsystem2" - SID "789" + BlockType Reference + Name "LPF vq11" + SID "1819" + Ports [1, 1] + Position [120, 134, 150, 166] + ZOrder -21 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "729" Ports [1] - Position [455, 91, 490, 129] - ZOrder -31 + Position [175, 75, 235, 105] + ZOrder -22 ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem2" - Location [982, 630, 1308, 931] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "Ibat_ref" - SID "790" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Goto - Name "Goto2" - SID "791" - Position [185, 31, 245, 59] - ZOrder -20 - NamePlacement "alternate" - ShowName off - GotoTag "Ibat_ref" - TagVisibility "global" - } - Block { - BlockType Reference - Name "LPF vq6" - SID "792" - Ports [1, 1] - Position [85, 29, 125, 61] - ZOrder -21 - ShowName off - LibraryVersion "1.664" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" - SourceType "Discrete 1st-Order Filter" - FilterType "Lowpass" - Tc "10e-3" - Ts "5e-6" - Initialize off - Vac_Init "[0.8 -25 60]" - Vdc_Init "0" - PlotResponse off - param1 "[1 100 0.1]" - } - Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "793" - Ports [1] - Position [185, 75, 245, 105] - ZOrder -22 - ShowName off - VariableName "Ibat_ref" - MaxDataPoints "inf" - SampleTime "-1" - } - Line { - SrcBlock "LPF vq6" - SrcPort 1 - Points [15, 0] - Branch { - Points [0, 45] - DstBlock "To Workspace1" - DstPort 1 - } - Branch { - DstBlock "Goto2" - DstPort 1 - } - } - Line { - SrcBlock "Ibat_ref" - SrcPort 1 - DstBlock "LPF vq6" - DstPort 1 - } - } + VariableName "Idc" + MaxDataPoints "inf" + SampleTime "-1" } Block { - BlockType SubSystem - Name "Subsystem3" - SID "794" + BlockType ToWorkspace + Name "To Workspace2" + SID "1818" Ports [1] - Position [595, 211, 630, 249] - ZOrder -32 + Position [175, 135, 235, 165] + ZOrder -23 ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem3" - Location [982, 630, 1308, 931] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "ILbat" - SID "795" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" + VariableName "Idc1" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Idc" + SrcPort 1 + Points [45, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + Branch { + DstBlock "To Workspace1" + DstPort 1 } - Block { - BlockType Reference - Name "LPF vq6" - SID "797" - Ports [1, 1] - Position [85, 29, 125, 61] - ZOrder -2 - ShowName off - LibraryVersion "1.664" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" - SourceType "Discrete 1st-Order Filter" - FilterType "Lowpass" - Tc "10e-3" - Ts "5e-6" - Initialize off - Vac_Init "[0.8 -25 60]" - Vdc_Init "0" - PlotResponse off - param1 "[1 100 0.1]" - } - Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "798" - Ports [1] - Position [185, 75, 245, 105] - ZOrder -3 - ShowName off - VariableName "ILbat" - MaxDataPoints "inf" - SampleTime "-1" - } - Line { - SrcBlock "ILbat" - SrcPort 1 - DstBlock "LPF vq6" - DstPort 1 - } - Line { - SrcBlock "LPF vq6" - SrcPort 1 - Points [15, 0; 0, 45] - DstBlock "To Workspace1" + Branch { + DstBlock "LPF vq11" DstPort 1 } } } + Line { + SrcBlock "LPF vq11" + SrcPort 1 + DstBlock "To Workspace2" + DstPort 1 + } + } + } + Block { + BlockType SubSystem + Name "Subsystem2" + SID "730" + Ports [1] + Position [685, 251, 720, 289] + ZOrder -18 + BlockMirror on + NamePlacement "alternate" + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem2" + Location [-8, -8, 1608, 908] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Vdc" + SID "731" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } Block { - BlockType SubSystem - Name "Subsystem4" - SID "1736" + BlockType Goto + Name "Goto2" + SID "732" + Position [190, 31, 250, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Vdc" + TagVisibility "global" + } + Block { + BlockType Reference + Name "LPF vq11" + SID "1821" + Ports [1, 1] + Position [135, 159, 165, 191] + ZOrder -21 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "733" Ports [1] - Position [1260, 271, 1295, 309] - ZOrder -33 + Position [190, 75, 250, 105] + ZOrder -22 ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem4" - Location [982, 630, 1308, 931] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "S1" - SID "1737" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1740" - Ports [1] - Position [185, 75, 245, 105] - ZOrder -2 - ShowName off - VariableName "S1" - MaxDataPoints "inf" - SampleTime "-1" - } - Block { - BlockType ZeroOrderHold - Name "Zero-Order\nHold" - SID "1771" - Position [90, 30, 125, 60] - ZOrder -3 - SampleTime "5e-6" - } - Line { - SrcBlock "S1" - SrcPort 1 - DstBlock "Zero-Order\nHold" - DstPort 1 - } - Line { - SrcBlock "Zero-Order\nHold" - SrcPort 1 - Points [15, 0; 0, 45] - DstBlock "To Workspace1" - DstPort 1 - } - } + VariableName "Vdc" + MaxDataPoints "inf" + SampleTime "-1" } Block { - BlockType SubSystem - Name "Subsystem5" - SID "1741" + BlockType ToWorkspace + Name "To Workspace2" + SID "1820" Ports [1] - Position [1260, 16, 1295, 54] - ZOrder -34 + Position [190, 160, 250, 190] + ZOrder -23 ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem5" - Location [982, 630, 1308, 931] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "S2" - SID "1742" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1744" - Ports [1] - Position [185, 75, 245, 105] - ZOrder -2 - ShowName off - VariableName "S2" - MaxDataPoints "inf" - SampleTime "-1" - } - Block { - BlockType ZeroOrderHold - Name "Zero-Order\nHold" - SID "1770" - Position [90, 30, 125, 60] - ZOrder -3 - SampleTime "5e-6" - } - Line { - SrcBlock "S2" - SrcPort 1 - DstBlock "Zero-Order\nHold" + VariableName "Vdc1" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Vdc" + SrcPort 1 + Points [60, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + Branch { + DstBlock "To Workspace1" DstPort 1 } - Line { - SrcBlock "Zero-Order\nHold" - SrcPort 1 - Points [15, 0; 0, 45] - DstBlock "To Workspace1" + Branch { + DstBlock "LPF vq11" DstPort 1 } } } - Block { - BlockType SubSystem - Name "Subsystem6" - SID "1745" - Ports [1] - Position [935, 16, 970, 54] - ZOrder -35 - BlockMirror on - NamePlacement "alternate" - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem6" - Location [982, 630, 1308, 931] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "Sign" - SID "1746" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Goto - Name "Goto2" - SID "1747" - Position [185, 31, 245, 59] - ZOrder -20 - NamePlacement "alternate" - ShowName off - GotoTag "Sign" - TagVisibility "global" - } - Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1748" - Ports [1] - Position [185, 75, 245, 105] - ZOrder -21 - ShowName off - VariableName "Sign" - MaxDataPoints "inf" - SampleTime "-1" - } - Block { - BlockType ZeroOrderHold - Name "Zero-Order\nHold" - SID "1772" - Position [85, 30, 120, 60] - ZOrder -22 - SampleTime "5e-6" - } - Line { - SrcBlock "Sign" - SrcPort 1 - DstBlock "Zero-Order\nHold" - DstPort 1 - } - Line { - SrcBlock "Zero-Order\nHold" - SrcPort 1 - Points [20, 0] - Branch { - DstBlock "Goto2" - DstPort 1 - } - Branch { - Points [0, 45] - DstBlock "To Workspace1" - DstPort 1 - } - } - } - } - Block { - BlockType Sum - Name "Sum1" - SID "668" - Ports [2, 1] - Position [545, 155, 565, 175] - ZOrder -36 - ShowName off - IconShape "round" - Inputs "|+-" - InputSameDT off - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Sum - Name "Sum3" - SID "669" - Ports [2, 1] - Position [180, 155, 200, 175] - ZOrder -37 - ShowName off - IconShape "round" - Inputs "|+-" - InputSameDT off - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Outport - Name "S1" - SID "670" - Position [1265, 233, 1295, 247] - ZOrder -38 - IconDisplay "Port number" - } - Block { - BlockType Outport - Name "S2" - SID "671" - Position [1265, 68, 1295, 82] - ZOrder -39 - Port "2" - IconDisplay "Port number" - } - Line { - SrcBlock "Step1" - SrcPort 1 - Points [25, 0] - Branch { - DstBlock "Sum3" - DstPort 1 - } - Branch { - Points [0, -55] - DstBlock "Subsystem1" - DstPort 1 - } - } - Line { - SrcBlock "Sum3" - SrcPort 1 - DstBlock "PI 1" - DstPort 1 - } - Line { - SrcBlock "Sum1" - SrcPort 1 - DstBlock "PI 2" - DstPort 1 - } - Line { - SrcBlock "From2" - SrcPort 1 - Points [170, 0] - Branch { - DstBlock "Sum1" - DstPort 2 - } - Branch { - DstBlock "Subsystem3" - DstPort 1 - } - } - Line { - SrcBlock "PI 1" - SrcPort 1 - Points [30, 0] - Branch { - Points [100, 0] - Branch { - DstBlock "Sum1" - DstPort 1 - } - Branch { - Points [0, -100] - DstBlock "Sign" - DstPort 1 - } - } - Branch { - Points [0, -55] - DstBlock "Subsystem2" - DstPort 1 - } - } - Line { - SrcBlock "PI 2" - SrcPort 1 - DstBlock "PWM Generator2" - DstPort 1 - } - Line { - SrcBlock "PWM Generator2" - SrcPort 1 - DstBlock "Demux" - DstPort 1 - } - Line { - SrcBlock "Sign" - SrcPort 1 - Points [150, 0] - Branch { - DstBlock "Compare\nTo Constant" - DstPort 1 - } - Branch { - Points [0, 165] - DstBlock "Compare\nTo Constant1" - DstPort 1 - } - Branch { - Points [0, -30] - DstBlock "Subsystem6" - DstPort 1 - } - } - Line { - SrcBlock "Compare\nTo Constant" - SrcPort 1 - DstBlock "Product" - DstPort 1 - } Line { - SrcBlock "Demux" - SrcPort 1 - Points [165, 0; 0, -65] - DstBlock "Product" - DstPort 2 - } - Line { - SrcBlock "Compare\nTo Constant1" + SrcBlock "LPF vq11" SrcPort 1 - DstBlock "Product1" + DstBlock "To Workspace2" DstPort 1 } - Line { - SrcBlock "Product" - SrcPort 1 - Points [15, 0] - Branch { - Points [0, 70] - DstBlock "DC Bus Measurements4" - DstPort 1 - } - Branch { - DstBlock "S2" - DstPort 1 - } - Branch { - Points [0, -40] - DstBlock "Subsystem5" - DstPort 1 - } - } - Line { - SrcBlock "Product1" - SrcPort 1 - Points [15, 0] - Branch { - DstBlock "S1" - DstPort 1 - } - Branch { - Points [0, 50] - DstBlock "Subsystem4" - DstPort 1 - } - Branch { - Points [0, -70] - DstBlock "DC Bus Measurements4" - DstPort 2 - } - } - Line { - SrcBlock "Demux" - SrcPort 2 - Points [170, 0; 0, 65] - DstBlock "Product1" - DstPort 2 - } - Line { - SrcBlock "From1" - SrcPort 1 - Points [105, 0] - DstBlock "Sum3" - DstPort 2 - } } } Block { BlockType Reference - Name "C" - SID "432" - Ports [0, 0, 0, 0, 0, 1, 1] - Position [691, 200, 719, 270] - ZOrder -2 - BlockRotation 270 - BlockMirror on - NamePlacement "alternate" + Name "Voltage Measurement1" + SID "445" + Ports [0, 1, 0, 0, 0, 2] + Position [120, 353, 145, 377] + ZOrder -19 + ShowName off LibraryVersion "1.2191" FontName "Verdana" FontSize 11 - SourceBlock "powerlib/Elements/Series RLC Branch" - SourceType "Series RLC Branch" - LConnTagsString "__new0" - RConnTagsString "__new0" - BranchType "C" - Resistance "1" - Inductance "1e-3" - SetiL0 off - InitialCurrent "0" - Capacitance "1200e-6" - Setx0 off - InitialVoltage "400" - Measurements "None" + SourceBlock "powerlib/Measurements/Voltage Measurement" + SourceType "Voltage Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" } Block { BlockType Reference - Name "C " - SID "433" - Ports [0, 0, 0, 0, 0, 1, 1] - Position [281, 290, 309, 360] - ZOrder -2 - BlockRotation 270 + Name "Voltage Measurement2" + SID "680" + Ports [0, 1, 0, 0, 0, 2] + Position [780, 258, 805, 282] + ZOrder -20 BlockMirror on - NamePlacement "alternate" + ShowName off LibraryVersion "1.2191" FontName "Verdana" FontSize 11 - SourceBlock "powerlib/Elements/Series RLC Branch" - SourceType "Series RLC Branch" - LConnTagsString "__new0" - RConnTagsString "__new0" - BranchType "C" - Resistance "1" - Inductance "1e-3" + SourceBlock "powerlib/Measurements/Voltage Measurement" + SourceType "Voltage Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" + } + Block { + BlockType PMIOPort + Name "+ " + SID "449" + Position [25, 268, 55, 282] + ZOrder -21 + Port "1" + Side "Left" + } + Block { + BlockType PMIOPort + Name "- " + SID "450" + Position [25, 468, 55, 482] + ZOrder -22 + Port "2" + Side "Left" + } + Block { + BlockType PMIOPort + Name "+" + SID "451" + Position [1025, 98, 1055, 112] + ZOrder -23 + BlockMirror on + Port "3" + Side "Right" + } + Block { + BlockType PMIOPort + Name "-" + SID "452" + Position [910, 458, 940, 472] + ZOrder -24 + BlockMirror on + Port "4" + Side "Right" + } + Line { + LineType "Connection" + SrcBlock "-" + SrcPort RConn1 + Points [-55, 0] + Branch { + ConnectType "DEST_DEST" + SrcBlock "Breaker1" + SrcPort RConn1 + Points [285, 0] + } + Branch { + ConnectType "DEST_SRC" + Points [0, -190] + DstBlock "Voltage Measurement2" + DstPort LConn2 + } + } + Line { + SrcBlock "Voltage Measurement1" + SrcPort 1 + DstBlock "Goto" + DstPort 1 + } + Line { + SrcBlock "Current Measurement2" + SrcPort 1 + Points [10, 0] + DstBlock "Goto3" + DstPort 1 + } + Line { + LineType "Connection" + SrcBlock "Current Measurement1" + SrcPort RConn1 + Points [30, 0] + Branch { + ConnectType "DEST_SRC" + Points [0, 160] + DstBlock "Voltage Measurement2" + DstPort LConn1 + } + Branch { + ConnectType "DEST_DEST" + SrcBlock "+" + SrcPort RConn1 + Points [-170, 0] + } + } + Line { + SrcBlock "Voltage Measurement2" + SrcPort 1 + DstBlock "Subsystem2" + DstPort 1 + } + Line { + SrcBlock "Current Measurement1" + SrcPort 1 + Points [5, 0; 0, -60] + DstBlock "Subsystem1" + DstPort 1 + } + Line { + SrcBlock "From4" + SrcPort 1 + Points [40, 0] + DstBlock "MATLAB Function" + DstPort 1 + } + Line { + SrcBlock "MATLAB Function" + SrcPort 1 + DstBlock "Goto5" + DstPort 1 + } + Line { + LineType "Connection" + SrcBlock "- " + SrcPort RConn1 + Points [20, 0] + Branch { + ConnectType "DEST_DEST" + SrcBlock "Breaker1" + SrcPort LConn1 + Points [-380, 0] + } + Branch { + ConnectType "DEST_SRC" + Points [0, -105] + DstBlock "Voltage Measurement1" + DstPort LConn2 + } + } + Line { + LineType "Connection" + SrcBlock "+ " + SrcPort RConn1 + Points [20, 0] + Branch { + ConnectType "DEST_DEST" + SrcBlock "Voltage Measurement1" + SrcPort LConn1 + Points [-15, 0; 0, -85] + } + Branch { + ConnectType "DEST_SRC" + DstBlock "Current Measurement2" + DstPort LConn1 + } + } + Line { + LineType "Connection" + SrcBlock "Current Measurement2" + SrcPort RConn1 + DstBlock "Breaker" + DstPort LConn1 + } + Line { + LineType "Connection" + SrcBlock "Breaker" + SrcPort RConn1 + Points [93, 0; 0, -170] + DstBlock "Current Measurement1" + DstPort LConn1 + } + Line { + SrcBlock "From1" + SrcPort 1 + Points [10, 0; 0, 140] + Branch { + Points [0, 195] + DstBlock "Breaker1" + DstPort 1 + } + Branch { + DstBlock "Breaker" + DstPort 1 + } + } + Line { + SrcBlock "From2" + SrcPort 1 + DstBlock "MATLAB Function" + DstPort 2 + } + Line { + SrcBlock "From3" + SrcPort 1 + Points [25, 0; 0, -15] + DstBlock "MATLAB Function" + DstPort 3 + } + } + } + Block { + BlockType SubSystem + Name "Boost" + SID "2800" + Ports [0, 0, 0, 0, 0, 2, 2] + Position [310, 435, 465, 575] + ZOrder 3 + BackgroundColor "lightBlue" + NamePlacement "alternate" + ShowName off + FontName "Arial Narrow" + FontSize 20 + FontWeight "bold" + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + Object { + $PropName "MaskObject" + $ObjectID 27 + $ClassName "Simulink.Mask" + Display "disp('Boost Converter')" + } + System { + Name "Boost" + Location [-8, -8, 1608, 908] + Open on + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Reference + Name "Cdc" + SID "2801" + Ports [0, 0, 0, 0, 0, 1, 1] + Position [596, 255, 624, 325] + ZOrder -1 + BlockRotation 270 + BlockMirror on + NamePlacement "alternate" + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Elements/Series RLC Branch" + SourceType "Series RLC Branch" + LConnTagsString "__new0" + RConnTagsString "__new0" + BranchType "C" + Resistance "1" + Inductance "1e-3" SetiL0 off InitialCurrent "0" - Capacitance "1e-3" - Setx0 on - InitialVoltage "192" + Capacitance "1200e-6" + Setx0 off + InitialVoltage "400" Measurements "None" } Block { BlockType Reference - Name "Current Measurement1" - SID "677" + Name "Current Measurement" + SID "2802" Ports [0, 1, 0, 0, 0, 1, 1] - Position [770, 43, 795, 67] - ZOrder -4 + Position [260, 173, 285, 197] + ZOrder -2 ShowName off LibraryVersion "1.2191" FontName "Verdana" @@ -4022,11 +3674,11 @@ Model { } Block { BlockType Reference - Name "Current Measurement2" - SID "435" + Name "Current Measurement1" + SID "2803" Ports [0, 1, 0, 0, 0, 1, 1] - Position [340, 218, 365, 242] - ZOrder -5 + Position [700, 188, 725, 212] + ZOrder -3 ShowName off LibraryVersion "1.2191" FontName "Verdana" @@ -4038,116 +3690,96 @@ Model { PSBequivalent "0" } Block { - BlockType From - Name "From1" - SID "676" - Position [490, 256, 555, 284] - ZOrder -8 - ShowName off - GotoTag "S2" - TagVisibility "global" - } - Block { - BlockType From - Name "From19" - SID "675" - Position [490, 61, 555, 89] - ZOrder -8 - ShowName off - GotoTag "S1" - TagVisibility "global" - } - Block { - BlockType Goto - Name "Goto" - SID "436" - Position [170, 310, 230, 340] - ZOrder -10 + BlockType Reference + Name "Diode" + SID "2804" + Ports [0, 1, 0, 0, 0, 1, 1] + Position [465, 170, 520, 210] + ZOrder -4 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Power\nElectronics/Diode" + SourceType "Diode" + Ron "0.001 " + Lon "0" + Vf "0.8" + IC "0" + UseSnubber off + Rs "500" + Cs "250e-9" + Measurements on + } + Block { + BlockType From + Name "From17" + SID "2805" + Position [260, 251, 325, 279] + ZOrder -8 ShowName off - GotoTag "V_bat" + GotoTag "S" TagVisibility "global" } Block { BlockType Goto Name "Goto1" - SID "672" - Position [340, 60, 395, 90] + SID "2806" + Position [320, 150, 375, 180] ZOrder -10 ShowName off - GotoTag "S1" + GotoTag "IL" TagVisibility "global" } Block { BlockType Goto Name "Goto2" - SID "673" - Position [340, 105, 395, 135] - ZOrder -10 + SID "3026" + Position [760, 321, 835, 349] + ZOrder 1 + NamePlacement "alternate" ShowName off - GotoTag "S2" + GotoTag "Vbus_solar" TagVisibility "global" } Block { BlockType Goto Name "Goto3" - SID "439" - Position [405, 175, 460, 205] - ZOrder -10 + SID "3033" + Position [770, 111, 845, 139] + ZOrder 2 + NamePlacement "alternate" ShowName off - GotoTag "ILbat" + GotoTag "Ibus_solar" TagVisibility "global" } Block { - BlockType Reference - Name "L" - SID "442" - Ports [0, 0, 0, 0, 0, 1, 1] - Position [400, 221, 470, 249] - ZOrder -6 - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Elements/Series RLC Branch" - SourceType "Series RLC Branch" - LConnTagsString "__new0" - RConnTagsString "__new0" - BranchType "L" - Resistance "1" - Inductance "0.1e-3" - SetiL0 on - InitialCurrent "0" - Capacitance "1e-6" - Setx0 off - InitialVoltage "0" - Measurements "None" + BlockType Goto + Name "Goto6" + SID "2807" + Position [175, 269, 220, 291] + ZOrder -17 + NamePlacement "alternate" + ShowName off + GotoTag "Vin" + TagVisibility "global" } Block { - BlockType Reference - Name "S1 " - SID "443" - Ports [1, 0, 0, 0, 0, 1, 1] - Position [568, 105, 612, 165] - ZOrder -5 - BlockRotation 270 - BlockMirror on - NamePlacement "alternate" - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Power\nElectronics/IGBT//Diode" - SourceType "IGBT/Diode" - Ron "1e-3" - Rs "1e5" - Cs "inf" - Measurements off + BlockType Goto + Name "Goto7" + SID "2808" + Position [525, 45, 580, 75] + ZOrder -10 + ShowName off + GotoTag "S" + TagVisibility "global" } Block { BlockType Reference - Name "S2 " - SID "444" + Name "IGBT/Diode" + SID "2809" Ports [1, 0, 0, 0, 0, 1, 1] - Position [558, 295, 602, 355] - ZOrder -5 + Position [333, 285, 377, 345] + ZOrder -19 BlockRotation 270 BlockMirror on NamePlacement "alternate" @@ -4163,12 +3795,11 @@ Model { } Block { BlockType SubSystem - Name "Subsystem1" - SID "726" - Ports [1] - Position [830, 16, 865, 54] - ZOrder -17 - ShowName off + Name "Incremental Conductance MPPT" + SID "2810" + Ports [0, 1] + Position [290, 28, 445, 92] + ZOrder -20 MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" @@ -4177,8 +3808,8 @@ Model { RequestExecContextInheritance off MaskHideContents off System { - Name "Subsystem1" - Location [982, 630, 1314, 1011] + Name "Incremental Conductance MPPT" + Location [-8, -8, 1608, 908] Open off ModelBrowserVisibility off ModelBrowserWidth 200 @@ -4192,11244 +3823,770 @@ Model { ShowPageBoundaries off ZoomFactor "100" Block { - BlockType Inport - Name "Idc" - SID "727" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Goto - Name "Goto2" - SID "728" - Position [175, 31, 235, 59] - ZOrder -20 - NamePlacement "alternate" + BlockType Demux + Name "Demux" + SID "2811" + Ports [1, 2] + Position [650, 61, 655, 99] + ZOrder -6 ShowName off - GotoTag "Idc" - TagVisibility "global" + Outputs "2" + DisplayOption "bar" } Block { - BlockType Reference - Name "LPF vq11" - SID "1819" - Ports [1, 1] - Position [120, 134, 150, 166] - ZOrder -21 + BlockType From + Name "From3" + SID "2812" + Position [45, 141, 85, 169] + ZOrder 33 ShowName off - LibraryVersion "1.664" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" - SourceType "Discrete 1st-Order Filter" - FilterType "Lowpass" - Tc "10e-3" - Ts "5e-6" - Initialize off - Vac_Init "[0.8 -25 60]" - Vdc_Init "0" - PlotResponse off - param1 "[1 100 0.1]" + GotoTag "Vpv" + TagVisibility "global" } Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "729" - Ports [1] - Position [175, 75, 235, 105] - ZOrder -22 + BlockType From + Name "From4" + SID "2813" + Position [45, 61, 85, 89] + ZOrder 34 ShowName off - VariableName "Idc" - MaxDataPoints "inf" - SampleTime "-1" + GotoTag "Ipv" + TagVisibility "global" } Block { - BlockType ToWorkspace - Name "To Workspace2" - SID "1818" - Ports [1] - Position [175, 135, 235, 165] - ZOrder -23 - ShowName off - VariableName "Idc1" - MaxDataPoints "inf" - SampleTime "-1" - } - Line { - SrcBlock "Idc" - SrcPort 1 - Points [45, 0] - Branch { - DstBlock "Goto2" - DstPort 1 - } - Branch { - Points [0, 45] - Branch { - DstBlock "To Workspace1" - DstPort 1 + BlockType SubSystem + Name "MPPT IC" + SID "2814" + Ports [5, 4] + Position [195, 53, 320, 257] + ZOrder 35 + NamePlacement "alternate" + LibraryVersion "1.32" + ErrorFcn "Stateflow.Translate.translate" + PermitHierarchicalResolution "ExplicitOnly" + TreatAsAtomicUnit on + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + SFBlockType "MATLAB Function" + System { + Name "MPPT IC" + Location [163, 114, 878, 977] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + SIDHighWatermark "36" + Block { + BlockType Inport + Name "Ipv" + SID "2814::1" + Position [20, 101, 40, 119] + ZOrder -1 + IconDisplay "Port number" } - Branch { - DstBlock "LPF vq11" - DstPort 1 + Block { + BlockType Inport + Name "Iprevious" + SID "2814::24" + Position [20, 136, 40, 154] + ZOrder 10 + Port "2" + IconDisplay "Port number" } - } - } - Line { - SrcBlock "LPF vq11" - SrcPort 1 - DstBlock "To Workspace2" - DstPort 1 - } - } - } - Block { - BlockType SubSystem - Name "Subsystem2" - SID "730" - Ports [1] - Position [765, 216, 800, 254] - ZOrder -18 - BlockMirror on - NamePlacement "alternate" - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem2" - Location [-8, -8, 1608, 908] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "Vdc" - SID "731" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" + Block { + BlockType Inport + Name "Vpv" + SID "2814::23" + Position [20, 171, 40, 189] + ZOrder 9 + Port "3" + IconDisplay "Port number" + } + Block { + BlockType Inport + Name "Vprevious" + SID "2814::25" + Position [20, 206, 40, 224] + ZOrder 11 + Port "4" + IconDisplay "Port number" + } + Block { + BlockType Inport + Name "Vref_previous" + SID "2814::26" + Position [20, 246, 40, 264] + ZOrder 12 + Port "5" + IconDisplay "Port number" + } + Block { + BlockType Demux + Name " Demux " + SID "2814::35" + Ports [1, 1] + Position [270, 280, 320, 320] + ZOrder 21 + Outputs "1" + } + Block { + BlockType S-Function + Name " SFunction " + SID "2814::34" + Tag "Stateflow S-Function Microgrid_24h_Simulation 3" + Ports [5, 5] + Position [180, 100, 230, 220] + ZOrder 20 + FunctionName "sf_sfun" + PortCounts "[5 5]" + EnableBusSupport on + Port { + PortNumber 2 + Name "delta" + RTWStorageClass "Auto" + DataLoggingNameMode "SignalName" + } + Port { + PortNumber 3 + Name "Vref" + RTWStorageClass "Auto" + DataLoggingNameMode "SignalName" + } + Port { + PortNumber 4 + Name "Ipv_prev_out" + RTWStorageClass "Auto" + DataLoggingNameMode "SignalName" + } + Port { + PortNumber 5 + Name "Vpv_prev_out" + RTWStorageClass "Auto" + DataLoggingNameMode "SignalName" + } + } + Block { + BlockType Terminator + Name " Terminator " + SID "2814::36" + Position [460, 291, 480, 309] + ZOrder 22 + } + Block { + BlockType Outport + Name "delta" + SID "2814::29" + Position [460, 101, 480, 119] + ZOrder 15 + IconDisplay "Port number" + } + Block { + BlockType Outport + Name "Vref" + SID "2814::5" + Position [460, 136, 480, 154] + ZOrder -5 + Port "2" + IconDisplay "Port number" + } + Block { + BlockType Outport + Name "Ipv_prev_out" + SID "2814::27" + Position [460, 171, 480, 189] + ZOrder 13 + Port "3" + IconDisplay "Port number" + } + Block { + BlockType Outport + Name "Vpv_prev_out" + SID "2814::28" + Position [460, 206, 480, 224] + ZOrder 14 + Port "4" + IconDisplay "Port number" + } + Line { + SrcBlock "Ipv" + SrcPort 1 + DstBlock " SFunction " + DstPort 1 + } + Line { + SrcBlock "Iprevious" + SrcPort 1 + DstBlock " SFunction " + DstPort 2 + } + Line { + SrcBlock "Vpv" + SrcPort 1 + DstBlock " SFunction " + DstPort 3 + } + Line { + SrcBlock "Vprevious" + SrcPort 1 + DstBlock " SFunction " + DstPort 4 + } + Line { + SrcBlock "Vref_previous" + SrcPort 1 + DstBlock " SFunction " + DstPort 5 + } + Line { + Name "delta" + Labels [0, 0] + SrcBlock " SFunction " + SrcPort 2 + Points [0, -25] + DstBlock "delta" + DstPort 1 + } + Line { + Name "Vref" + Labels [0, 0] + SrcBlock " SFunction " + SrcPort 3 + DstBlock "Vref" + DstPort 1 + } + Line { + Name "Ipv_prev_out" + Labels [0, 0] + SrcBlock " SFunction " + SrcPort 4 + DstBlock "Ipv_prev_out" + DstPort 1 + } + Line { + Name "Vpv_prev_out" + Labels [0, 0] + SrcBlock " SFunction " + SrcPort 5 + DstBlock "Vpv_prev_out" + DstPort 1 + } + Line { + SrcBlock " Demux " + SrcPort 1 + DstBlock " Terminator " + DstPort 1 + } + Line { + SrcBlock " SFunction " + SrcPort 1 + DstBlock " Demux " + DstPort 1 + } + } } Block { - BlockType Goto - Name "Goto2" - SID "732" - Position [190, 31, 250, 59] - ZOrder -20 - NamePlacement "alternate" + BlockType Memory + Name "Memory" + SID "2815" + Position [120, 60, 150, 90] + ZOrder -10 ShowName off - GotoTag "Vdc" - TagVisibility "global" } Block { - BlockType Reference - Name "LPF vq11" - SID "1821" - Ports [1, 1] - Position [135, 159, 165, 191] - ZOrder -21 + BlockType Memory + Name "Memory1" + SID "2816" + Position [120, 140, 150, 170] + ZOrder -11 ShowName off - LibraryVersion "1.664" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" - SourceType "Discrete 1st-Order Filter" - FilterType "Lowpass" - Tc "10e-3" - Ts "5e-6" - Initialize off - Vac_Init "[0.8 -25 60]" - Vdc_Init "0" - PlotResponse off - param1 "[1 100 0.1]" } Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "733" - Ports [1] - Position [190, 75, 250, 105] - ZOrder -22 + BlockType Memory + Name "Memory2" + SID "2817" + Position [120, 315, 150, 345] + ZOrder -12 + BlockMirror on ShowName off - VariableName "Vdc" - MaxDataPoints "inf" - SampleTime "-1" } Block { - BlockType ToWorkspace - Name "To Workspace2" - SID "1820" - Ports [1] - Position [190, 160, 250, 190] - ZOrder -23 + BlockType Memory + Name "Memory4" + SID "2818" + Position [120, 365, 150, 395] + ZOrder -13 + BlockMirror on ShowName off - VariableName "Vdc1" - MaxDataPoints "inf" - SampleTime "-1" } - Line { - SrcBlock "Vdc" - SrcPort 1 - Points [60, 0] - Branch { - DstBlock "Goto2" - DstPort 1 + Block { + BlockType Memory + Name "Memory5" + SID "2819" + Position [120, 265, 150, 295] + ZOrder -14 + BlockMirror on + ShowName off + } + Block { + BlockType Reference + Name "PWM Generator" + SID "2820" + Ports [1, 1] + Position [505, 56, 615, 104] + ZOrder -11 + LibraryVersion "1.664" + LinkData { + BlockName "Triangle" + DialogParameters { + rep_seq_t "[0 1/Fc/2 1/Fc]" + rep_seq_y "[0 1 0]" + } } - Branch { - Points [0, 45] - Branch { - DstBlock "To Workspace1" - DstPort 1 + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Control \nBlocks/PWM Generator" + SourceType "PWM Generator" + GeneratorMode "1-arm bridge (2 pulses)" + Fc "10e3" + Internal off + mIndex "0.4" + Freq "60" + Phase "0" + } + Block { + BlockType SubSystem + Name "Subsystem1" + SID "2821" + Ports [1] + Position [445, 111, 480, 149] + ZOrder -16 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem1" + Location [-8, -8, 1608, 908] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Vref" + SID "2822" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" } - Branch { - DstBlock "LPF vq11" + Block { + BlockType Goto + Name "Goto2" + SID "2823" + Position [175, 31, 235, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Vref" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "2824" + Ports [1] + Position [175, 75, 235, 105] + ZOrder -21 + ShowName off + VariableName "Vref" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ZeroOrderHold + Name "Zero-Order\nHold" + SID "2825" + Position [80, 30, 115, 60] + ZOrder -22 + SampleTime "5e-6" + } + Line { + SrcBlock "Vref" + SrcPort 1 + DstBlock "Zero-Order\nHold" DstPort 1 } - } - } - Line { - SrcBlock "LPF vq11" - SrcPort 1 - DstBlock "To Workspace2" - DstPort 1 - } - } - } - Block { - BlockType Reference - Name "Voltage Measurement1" - SID "445" - Ports [0, 1, 0, 0, 0, 2] - Position [120, 313, 145, 337] - ZOrder -19 - ShowName off - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Measurements/Voltage Measurement" - SourceType "Voltage Measurement" - PhasorSimulation off - OutputType "Complex" - PSBequivalent "0" - } - Block { - BlockType Reference - Name "Voltage Measurement2" - SID "680" - Ports [0, 1, 0, 0, 0, 2] - Position [820, 223, 845, 247] - ZOrder -20 - BlockMirror on - ShowName off - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Measurements/Voltage Measurement" - SourceType "Voltage Measurement" - PhasorSimulation off - OutputType "Complex" - PSBequivalent "0" - } - Block { - BlockType PMIOPort - Name "+ " - SID "449" - Position [25, 223, 55, 237] - ZOrder -21 - Port "1" - Side "Left" - } - Block { - BlockType PMIOPort - Name "- " - SID "450" - Position [25, 428, 55, 442] - ZOrder -22 - Port "2" - Side "Left" - } - Block { - BlockType PMIOPort - Name "+" - SID "451" - Position [910, 53, 940, 67] - ZOrder -23 - BlockMirror on - Port "3" - Side "Right" - } - Block { - BlockType PMIOPort - Name "-" - SID "452" - Position [910, 428, 940, 442] - ZOrder -24 - BlockMirror on - Port "4" - Side "Right" - } - Line { - LineType "Connection" - Points [705, 435; 170, 0] - Branch { - ConnectType "SRC_DEST" - Points [580, 435; 125, 0] - Branch { - ConnectType "SRC_SRC" - Points [-285, 0] - Branch { - ConnectType "DEST_DEST" - Points [90, 435; 205, 0] - Branch { - ConnectType "SRC_DEST" - SrcBlock "- " - SrcPort RConn1 + Line { + SrcBlock "Zero-Order\nHold" + SrcPort 1 Points [20, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + DstBlock "To Workspace1" + DstPort 1 + } } - Branch { - ConnectType "SRC_SRC" - Points [0, -105] - DstBlock "Voltage Measurement1" - DstPort LConn2 - } - } - Branch { - ConnectType "DEST_DEST" - SrcBlock "C " - SrcPort RConn1 - Points [0, 60] } } - Branch { - ConnectType "SRC_DEST" - SrcBlock "S2 " - SrcPort RConn1 - Points [0, 65] - } - } - Branch { - ConnectType "SRC_DEST" - SrcBlock "C" - SrcPort RConn1 - Points [0, 150] - } - Branch { - ConnectType "DEST_SRC" - DstBlock "-" - DstPort RConn1 - } - Branch { - ConnectType "DEST_SRC" - Points [0, -195] - DstBlock "Voltage Measurement2" - DstPort LConn2 - } - } - Line { - SrcBlock "Voltage Measurement1" - SrcPort 1 - DstBlock "Goto" - DstPort 1 - } - Line { - LineType "Connection" - SrcBlock "S2 " - SrcPort LConn1 - Points [0, -45] - Branch { - ConnectType "DEST_SRC" - DstBlock "S1 " - DstPort RConn1 - } - Branch { - ConnectType "DEST_DEST" - SrcBlock "L" - SrcPort RConn1 - Points [105, 0] - } - } - Line { - LineType "Connection" - SrcBlock "C" - SrcPort LConn1 - Points [0, -130] - Branch { - ConnectType "DEST_SRC" - Points [-105, 0] - DstBlock "S1 " - DstPort LConn1 - } - Branch { - ConnectType "DEST_SRC" - DstBlock "Current Measurement1" - DstPort LConn1 - } - } - Line { - SrcBlock "Current Measurement2" - SrcPort 1 - Points [20, 0] - DstBlock "Goto3" - DstPort 1 - } - Line { - LineType "Connection" - SrcBlock "Current Measurement2" - SrcPort RConn1 - DstBlock "L" - DstPort LConn1 - } - Line { - LineType "Connection" - Points [90, 230; 205, 0] - Branch { - ConnectType "SRC_DEST" - SrcBlock "+ " - SrcPort RConn1 - Points [20, 0] - } - Branch { - ConnectType "SRC_SRC" - Points [0, 90] - DstBlock "Voltage Measurement1" - DstPort LConn1 - } - Branch { - ConnectType "DEST_SRC" - DstBlock "Current Measurement2" - DstPort LConn1 - } - Branch { - ConnectType "DEST_SRC" - DstBlock "C " - DstPort LConn1 - } - } - Line { - SrcBlock "Battery Converter\n Control" - SrcPort 1 - DstBlock "Goto1" - DstPort 1 - } - Line { - SrcBlock "Battery Converter\n Control" - SrcPort 2 - DstBlock "Goto2" - DstPort 1 - } - Line { - SrcBlock "From19" - SrcPort 1 - Points [20, 0] - DstBlock "S1 " - DstPort 1 - } - Line { - SrcBlock "From1" - SrcPort 1 - Points [10, 0] - DstBlock "S2 " - DstPort 1 - } - Line { - LineType "Connection" - SrcBlock "Current Measurement1" - SrcPort RConn1 - Points [65, 0] - Branch { - ConnectType "DEST_SRC" - DstBlock "+" - DstPort RConn1 - } - Branch { - ConnectType "DEST_SRC" - Points [0, 170] - DstBlock "Voltage Measurement2" - DstPort LConn1 - } - } - Line { - SrcBlock "Voltage Measurement2" - SrcPort 1 - DstBlock "Subsystem2" - DstPort 1 - } - Line { - SrcBlock "Current Measurement1" - SrcPort 1 - Points [10, 0; 0, -15] - DstBlock "Subsystem1" - DstPort 1 - } - } - } - Block { - BlockType SubSystem - Name "Boost" - SID "519" - Ports [0, 0, 0, 0, 0, 2, 2] - Position [555, 435, 710, 575] - ZOrder -4 - BackgroundColor "lightBlue" - NamePlacement "alternate" - ShowName off - FontName "Arial Narrow" - FontSize 20 - FontWeight "bold" - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - Object { - $PropName "MaskObject" - $ObjectID 25 - $ClassName "Simulink.Mask" - Display "disp('Boost Converter')" - } - System { - Name "Boost" - Location [-8, -8, 1608, 908] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Reference - Name "Cdc" - SID "520" - Ports [0, 0, 0, 0, 0, 1, 1] - Position [596, 255, 624, 325] - ZOrder -1 - BlockRotation 270 - BlockMirror on - NamePlacement "alternate" - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Elements/Series RLC Branch" - SourceType "Series RLC Branch" - LConnTagsString "__new0" - RConnTagsString "__new0" - BranchType "C" - Resistance "1" - Inductance "1e-3" - SetiL0 off - InitialCurrent "0" - Capacitance "1200e-6" - Setx0 off - InitialVoltage "400" - Measurements "None" - } - Block { - BlockType Reference - Name "Current Measurement" - SID "521" - Ports [0, 1, 0, 0, 0, 1, 1] - Position [260, 173, 285, 197] - ZOrder -2 - ShowName off - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Measurements/Current Measurement" - SourceType "Current Measurement" - PhasorSimulation off - OutputType "Complex" - PSBequivalent "0" - } - Block { - BlockType Reference - Name "Current Measurement1" - SID "522" - Ports [0, 1, 0, 0, 0, 1, 1] - Position [700, 188, 725, 212] - ZOrder -3 - ShowName off - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Measurements/Current Measurement" - SourceType "Current Measurement" - PhasorSimulation off - OutputType "Complex" - PSBequivalent "0" - } - Block { - BlockType Reference - Name "Diode" - SID "523" - Ports [0, 1, 0, 0, 0, 1, 1] - Position [465, 170, 520, 210] - ZOrder -4 - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Power\nElectronics/Diode" - SourceType "Diode" - Ron "0.001 " - Lon "0" - Vf "0.8" - IC "0" - UseSnubber off - Rs "500" - Cs "250e-9" - Measurements on - } - Block { - BlockType From - Name "From17" - SID "524" - Position [260, 251, 325, 279] - ZOrder -8 - ShowName off - GotoTag "S" - TagVisibility "global" - } - Block { - BlockType Goto - Name "Goto1" - SID "525" - Position [320, 150, 375, 180] - ZOrder -10 - ShowName off - GotoTag "IL" - TagVisibility "global" - } - Block { - BlockType Goto - Name "Goto6" - SID "528" - Position [175, 269, 220, 291] - ZOrder -17 - NamePlacement "alternate" - ShowName off - GotoTag "Vin" - TagVisibility "global" - } - Block { - BlockType Goto - Name "Goto7" - SID "608" - Position [525, 45, 580, 75] - ZOrder -10 - ShowName off - GotoTag "S" - TagVisibility "global" - } - Block { - BlockType Reference - Name "IGBT/Diode" - SID "529" - Ports [1, 0, 0, 0, 0, 1, 1] - Position [333, 285, 377, 345] - ZOrder -19 - BlockRotation 270 - BlockMirror on - NamePlacement "alternate" - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Power\nElectronics/IGBT//Diode" - SourceType "IGBT/Diode" - Ron "1e-3" - Rs "1e5" - Cs "inf" - Measurements off - } - Block { - BlockType SubSystem - Name "Incremental Conductance MPPT" - SID "609" - Ports [0, 1] - Position [290, 28, 445, 92] - ZOrder -20 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Incremental Conductance MPPT" - Location [-8, -8, 1608, 908] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Demux - Name "Demux" - SID "611" - Ports [1, 2] - Position [650, 61, 655, 99] - ZOrder -6 - ShowName off - Outputs "2" - DisplayOption "bar" - } - Block { - BlockType From - Name "From3" - SID "612" - Position [45, 141, 85, 169] - ZOrder 33 - ShowName off - GotoTag "Vpv" - TagVisibility "global" - } - Block { - BlockType From - Name "From4" - SID "613" - Position [45, 61, 85, 89] - ZOrder 34 - ShowName off - GotoTag "Ipv" - TagVisibility "global" - } - Block { - BlockType SubSystem - Name "MPPT IC" - SID "618" - Ports [5, 4] - Position [195, 53, 320, 257] - ZOrder 35 - NamePlacement "alternate" - LibraryVersion "1.32" - ErrorFcn "Stateflow.Translate.translate" - PermitHierarchicalResolution "ExplicitOnly" - TreatAsAtomicUnit on - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - SFBlockType "MATLAB Function" - System { - Name "MPPT IC" - Location [163, 114, 878, 977] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - SIDHighWatermark "36" - Block { - BlockType Inport - Name "Ipv" - SID "618::1" - Position [20, 101, 40, 119] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Inport - Name "Iprevious" - SID "618::24" - Position [20, 136, 40, 154] - ZOrder 10 - Port "2" - IconDisplay "Port number" - } - Block { - BlockType Inport - Name "Vpv" - SID "618::23" - Position [20, 171, 40, 189] - ZOrder 9 - Port "3" - IconDisplay "Port number" - } - Block { - BlockType Inport - Name "Vprevious" - SID "618::25" - Position [20, 206, 40, 224] - ZOrder 11 - Port "4" - IconDisplay "Port number" - } - Block { - BlockType Inport - Name "Vref_previous" - SID "618::26" - Position [20, 246, 40, 264] - ZOrder 12 - Port "5" - IconDisplay "Port number" - } - Block { - BlockType Demux - Name " Demux " - SID "618::35" - Ports [1, 1] - Position [270, 280, 320, 320] - ZOrder 21 - Outputs "1" - } - Block { - BlockType S-Function - Name " SFunction " - SID "618::34" - Tag "Stateflow S-Function Microgrid_24h_Simulation 3" - Ports [5, 5] - Position [180, 100, 230, 220] - ZOrder 20 - FunctionName "sf_sfun" - PortCounts "[5 5]" - EnableBusSupport on - Port { - PortNumber 2 - Name "delta" - RTWStorageClass "Auto" - DataLoggingNameMode "SignalName" - } - Port { - PortNumber 3 - Name "Vref" - RTWStorageClass "Auto" - DataLoggingNameMode "SignalName" - } - Port { - PortNumber 4 - Name "Ipv_prev_out" - RTWStorageClass "Auto" - DataLoggingNameMode "SignalName" - } - Port { - PortNumber 5 - Name "Vpv_prev_out" - RTWStorageClass "Auto" - DataLoggingNameMode "SignalName" - } - } - Block { - BlockType Terminator - Name " Terminator " - SID "618::36" - Position [460, 291, 480, 309] - ZOrder 22 - } - Block { - BlockType Outport - Name "delta" - SID "618::29" - Position [460, 101, 480, 119] - ZOrder 15 - IconDisplay "Port number" - } - Block { - BlockType Outport - Name "Vref" - SID "618::5" - Position [460, 136, 480, 154] - ZOrder -5 - Port "2" - IconDisplay "Port number" - } - Block { - BlockType Outport - Name "Ipv_prev_out" - SID "618::27" - Position [460, 171, 480, 189] - ZOrder 13 - Port "3" - IconDisplay "Port number" - } - Block { - BlockType Outport - Name "Vpv_prev_out" - SID "618::28" - Position [460, 206, 480, 224] - ZOrder 14 - Port "4" - IconDisplay "Port number" - } - Line { - SrcBlock "Ipv" - SrcPort 1 - DstBlock " SFunction " - DstPort 1 - } - Line { - SrcBlock "Iprevious" - SrcPort 1 - DstBlock " SFunction " - DstPort 2 - } - Line { - SrcBlock "Vpv" - SrcPort 1 - DstBlock " SFunction " - DstPort 3 - } - Line { - SrcBlock "Vprevious" - SrcPort 1 - DstBlock " SFunction " - DstPort 4 - } - Line { - SrcBlock "Vref_previous" - SrcPort 1 - DstBlock " SFunction " - DstPort 5 - } - Line { - Name "delta" - Labels [0, 0] - SrcBlock " SFunction " - SrcPort 2 - Points [0, -25] - DstBlock "delta" - DstPort 1 - } - Line { - Name "Vref" - Labels [0, 0] - SrcBlock " SFunction " - SrcPort 3 - DstBlock "Vref" - DstPort 1 - } - Line { - Name "Ipv_prev_out" - Labels [0, 0] - SrcBlock " SFunction " - SrcPort 4 - DstBlock "Ipv_prev_out" - DstPort 1 - } - Line { - Name "Vpv_prev_out" - Labels [0, 0] - SrcBlock " SFunction " - SrcPort 5 - DstBlock "Vpv_prev_out" - DstPort 1 - } - Line { - SrcBlock " Demux " - SrcPort 1 - DstBlock " Terminator " - DstPort 1 - } - Line { - SrcBlock " SFunction " - SrcPort 1 - DstBlock " Demux " - DstPort 1 - } - } - } - Block { - BlockType Memory - Name "Memory" - SID "619" - Position [120, 60, 150, 90] - ZOrder -10 - ShowName off - } - Block { - BlockType Memory - Name "Memory1" - SID "620" - Position [120, 140, 150, 170] - ZOrder -11 - ShowName off - } - Block { - BlockType Memory - Name "Memory2" - SID "621" - Position [120, 315, 150, 345] - ZOrder -12 - BlockMirror on - ShowName off - } - Block { - BlockType Memory - Name "Memory4" - SID "622" - Position [120, 365, 150, 395] - ZOrder -13 - BlockMirror on - ShowName off - } - Block { - BlockType Memory - Name "Memory5" - SID "623" - Position [120, 265, 150, 295] - ZOrder -14 - BlockMirror on - ShowName off - } - Block { - BlockType Reference - Name "PWM Generator" - SID "2110" - Ports [1, 1] - Position [505, 56, 615, 104] - ZOrder -11 - LibraryVersion "1.664" - LinkData { - BlockName "Triangle" - DialogParameters { - rep_seq_t "[0 1/Fc/2 1/Fc]" - rep_seq_y "[0 1 0]" - } - } - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib_extras/Control \nBlocks/PWM Generator" - SourceType "PWM Generator" - GeneratorMode "1-arm bridge (2 pulses)" - Fc "10e3" - Internal off - mIndex "0.4" - Freq "60" - Phase "0" - } - Block { - BlockType SubSystem - Name "Subsystem1" - SID "1753" - Ports [1] - Position [445, 111, 480, 149] - ZOrder -16 - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem1" - Location [982, 630, 1295, 932] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "Vref" - SID "1754" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Goto - Name "Goto2" - SID "1755" - Position [175, 31, 235, 59] - ZOrder -20 - NamePlacement "alternate" - ShowName off - GotoTag "Vref" - TagVisibility "global" - } - Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1756" - Ports [1] - Position [175, 75, 235, 105] - ZOrder -21 - ShowName off - VariableName "Vref" - MaxDataPoints "inf" - SampleTime "-1" - } - Block { - BlockType ZeroOrderHold - Name "Zero-Order\nHold" - SID "1773" - Position [80, 30, 115, 60] - ZOrder -22 - SampleTime "5e-6" - } - Line { - SrcBlock "Vref" - SrcPort 1 - DstBlock "Zero-Order\nHold" - DstPort 1 - } - Line { - SrcBlock "Zero-Order\nHold" - SrcPort 1 - Points [20, 0] - Branch { - DstBlock "Goto2" - DstPort 1 - } - Branch { - Points [0, 45] - DstBlock "To Workspace1" - DstPort 1 - } - } - } - } - Block { - BlockType SubSystem - Name "Subsystem2" - SID "1757" - Ports [1] - Position [445, 16, 480, 54] - ZOrder -17 - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem2" - Location [982, 630, 1295, 932] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "delta" - SID "1758" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Goto - Name "Goto2" - SID "1759" - Position [175, 31, 235, 59] - ZOrder -20 - NamePlacement "alternate" - ShowName off - GotoTag "delta" - TagVisibility "global" - } - Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1760" - Ports [1] - Position [175, 75, 235, 105] - ZOrder -21 - ShowName off - VariableName "delta" - MaxDataPoints "inf" - SampleTime "-1" - } - Block { - BlockType ZeroOrderHold - Name "Zero-Order\nHold" - SID "1774" - Position [85, 30, 120, 60] - ZOrder -22 - SampleTime "5e-6" - } - Line { - SrcBlock "delta" - SrcPort 1 - DstBlock "Zero-Order\nHold" - DstPort 1 - } - Line { - SrcBlock "Zero-Order\nHold" - SrcPort 1 - Points [15, 0] - Branch { - Points [0, 45] - DstBlock "To Workspace1" - DstPort 1 - } - Branch { - DstBlock "Goto2" - DstPort 1 - } - } - } - } - Block { - BlockType SubSystem - Name "Subsystem3" - SID "1761" - Ports [1] - Position [740, 26, 775, 64] - ZOrder -18 - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem3" - Location [982, 630, 1295, 932] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "pulsos" - SID "1762" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Goto - Name "Goto2" - SID "1763" - Position [175, 31, 235, 59] - ZOrder -20 - NamePlacement "alternate" - ShowName off - GotoTag "pulsos" - TagVisibility "global" - } - Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1764" - Ports [1] - Position [175, 75, 235, 105] - ZOrder -21 - ShowName off - VariableName "pulsos" - MaxDataPoints "inf" - SampleTime "-1" - } - Block { - BlockType ZeroOrderHold - Name "Zero-Order\nHold" - SID "1775" - Position [85, 30, 120, 60] - ZOrder -22 - SampleTime "5e-6" - } - Line { - SrcBlock "pulsos" - SrcPort 1 - DstBlock "Zero-Order\nHold" - DstPort 1 - } - Line { - SrcBlock "Zero-Order\nHold" - SrcPort 1 - Points [15, 0] - Branch { - DstBlock "Goto2" - DstPort 1 - } - Branch { - Points [0, 45] - DstBlock "To Workspace1" - DstPort 1 - } - } - } - } - Block { - BlockType Outport - Name "Pulsos" - SID "628" - Position [745, 83, 775, 97] - ZOrder -19 - IconDisplay "Port number" - } - Line { - SrcBlock "Memory2" - SrcPort 1 - Points [-50, 0; 0, -135] - DstBlock "MPPT IC" - DstPort 4 - } - Line { - SrcBlock "Memory5" - SrcPort 1 - Points [-36, 0; 0, -45] - DstBlock "MPPT IC" - DstPort 5 - } - Line { - SrcBlock "Memory4" - SrcPort 1 - Points [-85, 0; 0, -265] - DstBlock "MPPT IC" - DstPort 2 - } - Line { - SrcBlock "Memory1" - SrcPort 1 - DstBlock "MPPT IC" - DstPort 3 - } - Line { - SrcBlock "Memory" - SrcPort 1 - DstBlock "MPPT IC" - DstPort 1 - } - Line { - SrcBlock "PWM Generator" - SrcPort 1 - DstBlock "Demux" - DstPort 1 - } - Line { - SrcBlock "Demux" - SrcPort 2 - Points [35, 0] - Branch { - DstBlock "Pulsos" - DstPort 1 - } - Branch { - Points [0, -45] - DstBlock "Subsystem3" - DstPort 1 - } - } - Line { - SrcBlock "MPPT IC" - SrcPort 1 - Points [85, 0] - Branch { - Points [0, -45] - DstBlock "Subsystem2" - DstPort 1 - } - Branch { - DstBlock "PWM Generator" - DstPort 1 - } - } - Line { - SrcBlock "MPPT IC" - SrcPort 3 - Points [65, 0; 0, 200] - DstBlock "Memory4" - DstPort 1 - } - Line { - SrcBlock "MPPT IC" - SrcPort 4 - Points [40, 0; 0, 100] - DstBlock "Memory2" - DstPort 1 - } - Line { - SrcBlock "MPPT IC" - SrcPort 2 - Points [80, 0] - Branch { - Points [0, 150] - DstBlock "Memory5" - DstPort 1 - } - Branch { - DstBlock "Subsystem1" - DstPort 1 - } - } - Line { - SrcBlock "From4" - SrcPort 1 - DstBlock "Memory" - DstPort 1 - } - Line { - SrcBlock "From3" - SrcPort 1 - DstBlock "Memory1" - DstPort 1 - } - } - } - Block { - BlockType Reference - Name "Lb" - SID "530" - Ports [0, 0, 0, 0, 0, 1, 1] - Position [145, 171, 215, 199] - ZOrder -21 - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Elements/Series RLC Branch" - SourceType "Series RLC Branch" - LConnTagsString "__new0" - RConnTagsString "__new0" - BranchType "L" - Resistance "1" - Inductance "880e-6" - SetiL0 off - InitialCurrent "0" - Capacitance "1e-6" - Setx0 off - InitialVoltage "0" - Measurements "None" - } - Block { - BlockType SubSystem - Name "Subsystem1" - SID "738" - Ports [1] - Position [760, 161, 795, 199] - ZOrder -22 - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem1" - Location [-8, -8, 1608, 908] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "Ibus" - SID "739" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Goto - Name "Goto2" - SID "740" - Position [165, 31, 225, 59] - ZOrder -20 - NamePlacement "alternate" - ShowName off - GotoTag "Ibus" - TagVisibility "global" - } - Block { - BlockType Reference - Name "LPF vq11" - SID "1815" - Ports [1, 1] - Position [115, 139, 145, 171] - ZOrder -21 - ShowName off - LibraryVersion "1.664" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" - SourceType "Discrete 1st-Order Filter" - FilterType "Lowpass" - Tc "10e-3" - Ts "5e-6" - Initialize off - Vac_Init "[0.8 -25 60]" - Vdc_Init "0" - PlotResponse off - param1 "[1 100 0.1]" - } - Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "741" - Ports [1] - Position [165, 75, 225, 105] - ZOrder -22 - ShowName off - VariableName "Ibus" - MaxDataPoints "inf" - SampleTime "-1" - } - Block { - BlockType ToWorkspace - Name "To Workspace2" - SID "1814" - Ports [1] - Position [165, 140, 225, 170] - ZOrder -23 - ShowName off - VariableName "Ibus1" - MaxDataPoints "inf" - SampleTime "-1" - } - Line { - SrcBlock "Ibus" - SrcPort 1 - Points [40, 0] - Branch { - DstBlock "Goto2" - DstPort 1 - } - Branch { - Points [0, 45] - Branch { - DstBlock "To Workspace1" - DstPort 1 - } - Branch { - DstBlock "LPF vq11" - DstPort 1 - } - } - } - Line { - SrcBlock "LPF vq11" - SrcPort 1 - DstBlock "To Workspace2" - DstPort 1 - } - } - } - Block { - BlockType SubSystem - Name "Subsystem2" - SID "742" - Ports [1] - Position [760, 271, 795, 309] - ZOrder -23 - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem2" - Location [-8, -8, 1608, 908] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "Vbus" - SID "743" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Goto - Name "Goto2" - SID "744" - Position [185, 31, 245, 59] - ZOrder -20 - NamePlacement "alternate" - ShowName off - GotoTag "Vbus" - TagVisibility "global" - } - Block { - BlockType Reference - Name "LPF vq11" - SID "1817" - Ports [1, 1] - Position [130, 129, 160, 161] - ZOrder -21 - ShowName off - LibraryVersion "1.664" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" - SourceType "Discrete 1st-Order Filter" - FilterType "Lowpass" - Tc "10e-3" - Ts "5e-6" - Initialize off - Vac_Init "[0.8 -25 60]" - Vdc_Init "0" - PlotResponse off - param1 "[1 100 0.1]" - } - Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "745" - Ports [1] - Position [185, 75, 245, 105] - ZOrder -22 - ShowName off - VariableName "Vbus" - MaxDataPoints "inf" - SampleTime "-1" - } - Block { - BlockType ToWorkspace - Name "To Workspace2" - SID "1816" - Ports [1] - Position [185, 130, 245, 160] - ZOrder -23 - ShowName off - VariableName "Vbus1" - MaxDataPoints "inf" - SampleTime "-1" - } - Line { - SrcBlock "Vbus" - SrcPort 1 - Points [55, 0] - Branch { - DstBlock "Goto2" - DstPort 1 - } - Branch { - Points [0, 45] - Branch { - DstBlock "To Workspace1" - DstPort 1 - } - Branch { - DstBlock "LPF vq11" - DstPort 1 - } - } - } - Line { - SrcBlock "LPF vq11" - SrcPort 1 - DstBlock "To Workspace2" - DstPort 1 - } - } - } - Block { - BlockType Reference - Name "Va" - SID "531" - Ports [0, 1, 0, 0, 0, 2] - Position [130, 268, 155, 292] - ZOrder -35 - ShowName off - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Measurements/Voltage Measurement" - SourceType "Voltage Measurement" - PhasorSimulation off - OutputType "Complex" - PSBequivalent "0" - } - Block { - BlockType Reference - Name "Voltage Measurement" - SID "532" - Ports [0, 1, 0, 0, 0, 2] - Position [700, 278, 725, 302] - ZOrder -36 - NamePlacement "alternate" - ShowName off - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Measurements/Voltage Measurement" - SourceType "Voltage Measurement" - PhasorSimulation off - OutputType "Complex" - PSBequivalent "0" - } - Block { - BlockType PMIOPort - Name "+" - SID "533" - Position [35, 178, 65, 192] - ZOrder -37 - Port "1" - Side "Left" - } - Block { - BlockType PMIOPort - Name "-" - SID "534" - Position [35, 373, 65, 387] - ZOrder -38 - Port "2" - Side "Left" - } - Block { - BlockType PMIOPort - Name "+ " - SID "535" - Position [870, 198, 900, 212] - ZOrder -39 - BlockMirror on - NamePlacement "alternate" - Port "3" - Side "Right" - } - Block { - BlockType PMIOPort - Name "- " - SID "536" - Position [870, 373, 900, 387] - ZOrder -40 - BlockMirror on - NamePlacement "alternate" - Port "4" - Side "Right" - } - Line { - LineType "Connection" - Points [605, 200; -70, 0] - DstBlock "Diode" - DstPort RConn1 - Branch { - ConnectType "SRC_DEST" - Points [670, 200; -65, 0] - Branch { - ConnectType "SRC_DEST" - SrcBlock "Voltage Measurement" - SrcPort LConn1 - Points [-15, 0; 0, -85] - } - Branch { - ConnectType "SRC_SRC" - DstBlock "Current Measurement1" - DstPort LConn1 - } - } - Branch { - ConnectType "SRC_DEST" - SrcBlock "Cdc" - SrcPort LConn1 - Points [0, -40; -5, 0] - } - } - Line { - LineType "Connection" - Points [610, 380; 0, -40] - DstBlock "Cdc" - DstPort RConn1 - Branch { - ConnectType "SRC_DEST" - Points [670, 380; -60, 0] - Branch { - ConnectType "SRC_DEST" - SrcBlock "- " - SrcPort RConn1 - Points [-185, 0] - } - Branch { - ConnectType "SRC_SRC" - Points [0, -85] - DstBlock "Voltage Measurement" - DstPort LConn2 - } - } - Branch { - ConnectType "SRC_DEST" - Points [355, 380; 255, 0] - Branch { - ConnectType "SRC_DEST" - Points [90, 380; 265, 0] - Branch { - ConnectType "SRC_DEST" - SrcBlock "-" - SrcPort RConn1 - Points [10, 0] - } - Branch { - ConnectType "SRC_SRC" - Points [0, -95] - DstBlock "Va" - DstPort LConn2 - } - } - Branch { - ConnectType "SRC_DEST" - SrcBlock "IGBT/Diode" - SrcPort RConn1 - Points [0, 20] - } - } - } - Line { - LineType "Connection" - SrcBlock "Lb" - SrcPort RConn1 - DstBlock "Current Measurement" - DstPort LConn1 - } - Line { - LineType "Connection" - Points [365, 190; 0, 80] - DstBlock "IGBT/Diode" - DstPort LConn1 - Branch { - ConnectType "SRC_DEST" - SrcBlock "Current Measurement" - SrcPort RConn1 - Points [65, 0] - } - Branch { - ConnectType "SRC_SRC" - DstBlock "Diode" - DstPort LConn1 - } - } - Line { - SrcBlock "Current Measurement" - SrcPort 1 - Points [10, 0; 0, -15] - DstBlock "Goto1" - DstPort 1 - } - Line { - SrcBlock "From17" - SrcPort 1 - Points [15, 0] - DstBlock "IGBT/Diode" - DstPort 1 - } - Line { - LineType "Connection" - SrcBlock "+" - SrcPort RConn1 - Points [10, 0] - Branch { - ConnectType "DEST_SRC" - DstBlock "Lb" - DstPort LConn1 - } - Branch { - ConnectType "DEST_SRC" - Points [0, 90] - DstBlock "Va" - DstPort LConn1 - } - } - Line { - SrcBlock "Voltage Measurement" - SrcPort 1 - DstBlock "Subsystem2" - DstPort 1 - } - Line { - SrcBlock "Current Measurement1" - SrcPort 1 - Points [15, 0] - DstBlock "Subsystem1" - DstPort 1 - } - Line { - LineType "Connection" - SrcBlock "+ " - SrcPort RConn1 - DstBlock "Current Measurement1" - DstPort RConn1 - } - Line { - SrcBlock "Va" - SrcPort 1 - DstBlock "Goto6" - DstPort 1 - } - Line { - SrcBlock "Incremental Conductance MPPT" - SrcPort 1 - DstBlock "Goto7" - DstPort 1 - } - } - } - Block { - BlockType SubSystem - Name "Inverter" - SID "854" - Ports [0, 0, 0, 0, 0, 3, 2] - Position [1125, 434, 1275, 576] - ZOrder -6 - BlockMirror on - BackgroundColor "orange" - ShowName off - FontName "Arial Narrow" - FontSize 20 - FontWeight "bold" - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - Object { - $PropName "MaskObject" - $ObjectID 26 - $ClassName "Simulink.Mask" - Display "disp('DC/AC Inverter')" - } - System { - Name "Inverter" - Location [-8, -8, 1608, 908] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType SubSystem - Name "DC / AC Inverter" - SID "855" - Ports [1, 0, 0, 0, 0, 3, 2] - Position [265, 157, 425, 313] - ZOrder -1 - BlockMirror on - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "DC / AC Inverter" - Location [-8, -8, 1608, 908] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "S" - SID "856" - Position [345, 68, 375, 82] - ZOrder -1 - BlockMirror on - NamePlacement "alternate" - IconDisplay "Port number" - } - Block { - BlockType Reference - Name "2 Level Inverter" - SID "857" - Ports [1, 0, 0, 0, 0, 3, 2] - Position [165, 48, 315, 237] - ZOrder -2 - BlockMirror on - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Power\nElectronics/Universal Bridge" - SourceType "Universal Bridge" - Arms "3" - SnubberResistance "1e5" - SnubberCapacitance "inf" - Device "IGBT / Diodes" - Ron "1e-3" - Lon "0" - ForwardVoltages "[ 0 0 ]" - ForwardVoltage "0" - GTOparameters "[ 10e-6 , 20e-6 ]" - IGBTparameters "[ 1e-6 , 2e-6 ]" - Measurements "UAB UBC UCA UDC voltages" - Measurements_2 "None" - converterType "Rectifier" - } - Block { - BlockType SubSystem - Name "AC Load Measurements" - SID "859" - Ports [0, 0, 0, 0, 0, 3, 3] - Position [540, 95, 630, 235] - ZOrder -3 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "AC Load Measurements" - Location [-8, -8, 1608, 908] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Reference - Name "Current Measurement1" - SID "1701" - Ports [0, 1, 0, 0, 0, 1, 1] - Position [270, 63, 295, 87] - ZOrder -1 - ShowName off - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Measurements/Current Measurement" - SourceType "Current Measurement" - PhasorSimulation off - OutputType "Complex" - PSBequivalent "0" - } - Block { - BlockType Reference - Name "Current Measurement2" - SID "1702" - Ports [0, 1, 0, 0, 0, 1, 1] - Position [270, 93, 295, 117] - ZOrder -2 - ShowName off - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Measurements/Current Measurement" - SourceType "Current Measurement" - PhasorSimulation off - OutputType "Complex" - PSBequivalent "0" - } - Block { - BlockType Reference - Name "Current Measurement3" - SID "1703" - Ports [0, 1, 0, 0, 0, 1, 1] - Position [270, 123, 295, 147] - ZOrder -3 - ShowName off - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Measurements/Current Measurement" - SourceType "Current Measurement" - PhasorSimulation off - OutputType "Complex" - PSBequivalent "0" - } - Block { - BlockType Goto - Name "Goto1" - SID "860" - Position [880, 25, 940, 55] - ZOrder -10 - ShowName off - GotoTag "Vload_a" - TagVisibility "global" - } - Block { - BlockType Goto - Name "Goto5" - SID "863" - Position [795, 175, 855, 205] - ZOrder -10 - ShowName off - GotoTag "Vload_ab" - TagVisibility "global" - } - Block { - BlockType Goto - Name "Goto7" - SID "864" - Position [795, 225, 855, 255] - ZOrder -10 - ShowName off - GotoTag "Vload_bc" - TagVisibility "global" - } - Block { - BlockType Goto - Name "Goto8" - SID "865" - Position [795, 270, 855, 300] - ZOrder -10 - ShowName off - GotoTag "Vload_ca" - TagVisibility "global" - } - Block { - BlockType Goto - Name "Goto9" - SID "866" - Position [950, 250, 1010, 280] - ZOrder -10 - ShowName off - GotoTag "Vload_pp" - TagVisibility "global" - } - Block { - BlockType Reference - Name "Ground" - SID "867" - Ports [0, 0, 0, 0, 0, 1] - Position [779, 65, 801, 90] - ZOrder -15 - BlockRotation 270 - BlockMirror on - ShowName off - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Elements/Ground" - SourceType "Ground" - LConnTagsString "a" - } - Block { - BlockType Mux - Name "Mux2" - SID "868" - Ports [3, 1] - Position [910, 188, 915, 342] - ZOrder -16 - ShowName off - Inputs "3" - DisplayOption "bar" - } - Block { - BlockType SubSystem - Name "Subsystem1" - SID "1158" - Ports [1] - Position [570, 41, 605, 79] - ZOrder -17 - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem1" - Location [982, 630, 1310, 932] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "Vabc" - SID "1159" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Goto - Name "Goto2" - SID "1160" - Position [185, 31, 245, 59] - ZOrder -20 - NamePlacement "alternate" - ShowName off - GotoTag "Vabc" - TagVisibility "global" - } - Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1161" - Ports [1] - Position [185, 75, 245, 105] - ZOrder -21 - ShowName off - VariableName "Vabc" - MaxDataPoints "inf" - SampleTime "-1" - } - Line { - SrcBlock "Vabc" - SrcPort 1 - Points [55, 0] - Branch { - Points [0, 45] - DstBlock "To Workspace1" - DstPort 1 - } - Branch { - DstBlock "Goto2" - DstPort 1 - } - } - } - } - Block { - BlockType SubSystem - Name "Subsystem2" - SID "1154" - Ports [1] - Position [195, 26, 230, 64] - ZOrder -18 - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem2" - Location [982, 630, 1310, 932] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "Iabc" - SID "1155" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Goto - Name "Goto2" - SID "1156" - Position [185, 31, 245, 59] - ZOrder -20 - NamePlacement "alternate" - ShowName off - GotoTag "Iabc" - TagVisibility "global" - } - Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1157" - Ports [1] - Position [185, 75, 245, 105] - ZOrder -21 - ShowName off - VariableName "Iabc" - MaxDataPoints "inf" - SampleTime "-1" - } - Line { - SrcBlock "Iabc" - SrcPort 1 - Points [55, 0] - Branch { - DstBlock "Goto2" - DstPort 1 - } - Branch { - Points [0, 45] - DstBlock "To Workspace1" - DstPort 1 - } - } - } - } - Block { - BlockType SubSystem - Name "Subsystem3" - SID "1181" - Ports [1] - Position [810, 331, 845, 369] - ZOrder -19 - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem3" - Location [999, 430, 1323, 916] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "Vab" - SID "1182" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Goto - Name "Goto2" - SID "1183" - Position [185, 31, 245, 59] - ZOrder -20 - NamePlacement "alternate" - ShowName off - GotoTag "Vab" - TagVisibility "global" - } - Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1184" - Ports [1] - Position [185, 75, 245, 105] - ZOrder -21 - ShowName off - VariableName "Vab" - MaxDataPoints "inf" - SampleTime "-1" - } - Block { - BlockType ToWorkspace - Name "To Workspace2" - SID "1830" - Ports [1] - Position [185, 125, 245, 155] - ZOrder -22 - ShowName off - VariableName "Vab_s" - MaxDataPoints "inf" - SampleTime "-1" - SaveFormat "Structure" - } - Block { - BlockType ToWorkspace - Name "To Workspace3" - SID "1831" - Ports [1] - Position [185, 185, 245, 215] - ZOrder -23 - ShowName off - VariableName "Vab_st" - MaxDataPoints "inf" - SampleTime "-1" - SaveFormat "Structure With Time" - } - Line { - SrcBlock "Vab" - SrcPort 1 - Points [55, 0] - Branch { - DstBlock "Goto2" - DstPort 1 - } - Branch { - Points [0, 45] - Branch { - DstBlock "To Workspace1" - DstPort 1 - } - Branch { - Points [0, 50] - Branch { - DstBlock "To Workspace2" - DstPort 1 - } - Branch { - Points [0, 60] - DstBlock "To Workspace3" - DstPort 1 - } - } - } - } - } - } - Block { - BlockType SubSystem - Name "Subsystem4" - SID "1185" - Ports [1] - Position [810, 376, 845, 414] - ZOrder -20 - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem4" - Location [982, 630, 1310, 932] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "Vbc" - SID "1186" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Goto - Name "Goto2" - SID "1187" - Position [185, 31, 245, 59] - ZOrder -20 - NamePlacement "alternate" - ShowName off - GotoTag "Vbc" - TagVisibility "global" - } - Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1188" - Ports [1] - Position [185, 75, 245, 105] - ZOrder -21 - ShowName off - VariableName "Vbc" - MaxDataPoints "inf" - SampleTime "-1" - } - Line { - SrcBlock "Vbc" - SrcPort 1 - Points [55, 0] - Branch { - Points [0, 45] - DstBlock "To Workspace1" - DstPort 1 - } - Branch { - DstBlock "Goto2" - DstPort 1 - } - } - } - } - Block { - BlockType SubSystem - Name "Subsystem5" - SID "1189" - Ports [1] - Position [810, 421, 845, 459] - ZOrder -21 - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem5" - Location [982, 630, 1310, 932] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "Vca" - SID "1190" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Goto - Name "Goto2" - SID "1191" - Position [185, 31, 245, 59] - ZOrder -20 - NamePlacement "alternate" - ShowName off - GotoTag "Vca" - TagVisibility "global" - } - Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1192" - Ports [1] - Position [185, 75, 245, 105] - ZOrder -21 - ShowName off - VariableName "Vca" - MaxDataPoints "inf" - SampleTime "-1" - } - Line { - SrcBlock "Vca" - SrcPort 1 - Points [55, 0] - Branch { - DstBlock "Goto2" - DstPort 1 - } - Branch { - Points [0, 45] - DstBlock "To Workspace1" - DstPort 1 - } - } - } - } - Block { - BlockType SubSystem - Name "Subsystem6" - SID "1704" - Ports [1] - Position [365, 186, 400, 224] - ZOrder -22 - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem6" - Location [982, 630, 1310, 932] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "Ia" - SID "1705" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Goto - Name "Goto2" - SID "1706" - Position [185, 31, 245, 59] - ZOrder -20 - NamePlacement "alternate" - ShowName off - GotoTag "Ia" - TagVisibility "global" - } - Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1707" - Ports [1] - Position [185, 75, 245, 105] - ZOrder -21 - ShowName off - VariableName "Ia" - MaxDataPoints "inf" - SampleTime "-1" - } - Line { - SrcBlock "Ia" - SrcPort 1 - Points [55, 0] - Branch { - Points [0, 45] - DstBlock "To Workspace1" - DstPort 1 - } - Branch { - DstBlock "Goto2" - DstPort 1 - } - } - } - } - Block { - BlockType SubSystem - Name "Subsystem7" - SID "1708" - Ports [1] - Position [365, 226, 400, 264] - ZOrder -23 - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem7" - Location [982, 630, 1310, 932] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "Ib" - SID "1709" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Goto - Name "Goto2" - SID "1710" - Position [185, 31, 245, 59] - ZOrder -20 - NamePlacement "alternate" - ShowName off - GotoTag "Ib" - TagVisibility "global" - } - Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1711" - Ports [1] - Position [185, 75, 245, 105] - ZOrder -21 - ShowName off - VariableName "Ib" - MaxDataPoints "inf" - SampleTime "-1" - } - Line { - SrcBlock "Ib" - SrcPort 1 - Points [55, 0] - Branch { - DstBlock "Goto2" - DstPort 1 - } - Branch { - Points [0, 45] - DstBlock "To Workspace1" - DstPort 1 - } - } - } - } - Block { - BlockType SubSystem - Name "Subsystem8" - SID "1712" - Ports [1] - Position [365, 266, 400, 304] - ZOrder -24 - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem8" - Location [982, 630, 1310, 932] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "Ic" - SID "1713" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Goto - Name "Goto2" - SID "1714" - Position [185, 31, 245, 59] - ZOrder -20 - NamePlacement "alternate" - ShowName off - GotoTag "Ic" - TagVisibility "global" - } - Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1715" - Ports [1] - Position [185, 75, 245, 105] - ZOrder -21 - ShowName off - VariableName "Ic" - MaxDataPoints "inf" - SampleTime "-1" - } - Line { - SrcBlock "Ic" - SrcPort 1 - Points [55, 0] - Branch { - Points [0, 45] - DstBlock "To Workspace1" - DstPort 1 - } - Branch { - DstBlock "Goto2" - DstPort 1 - } - } - } - } - Block { - BlockType Reference - Name "Three-Phase\nV Measurement" - SID "869" - Ports [0, 1, 0, 0, 0, 3, 3] - Position [450, 40, 535, 170] - ZOrder -25 - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Measurements/Three-Phase\nV-I Measurement" - SourceType "Three-Phase VI Measurement" - VoltageMeasurement "phase-to-ground" - SetLabelV off - LabelV "Vabc" - Vpu off - VpuLL off - CurrentMeasurement "no" - SetLabelI off - LabelI "Iabc" - Ipu off - Pbase "100e6" - Vbase "500e3" - OutputType "Complex" - PhasorSimulation off - PSBequivalent "0" - } - Block { - BlockType Reference - Name "Three-Phase \nI Measurement" - SID "870" - Ports [0, 1, 0, 0, 0, 3, 3] - Position [80, 25, 165, 155] - ZOrder -26 - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Measurements/Three-Phase\nV-I Measurement" - SourceType "Three-Phase VI Measurement" - VoltageMeasurement "no" - SetLabelV off - LabelV "Vabc" - Vpu off - VpuLL off - CurrentMeasurement "yes" - SetLabelI off - LabelI "Iabc" - Ipu off - Pbase "100e6" - Vbase "500e3" - OutputType "Complex" - PhasorSimulation off - PSBequivalent "0" - } - Block { - BlockType Reference - Name "Voltage Measurement1" - SID "871" - Ports [0, 1, 0, 0, 0, 2] - Position [695, 178, 720, 202] - ZOrder -27 - ShowName off - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Measurements/Voltage Measurement" - SourceType "Voltage Measurement" - PhasorSimulation off - OutputType "Complex" - PSBequivalent "0" - } - Block { - BlockType Reference - Name "Voltage Measurement2" - SID "872" - Ports [0, 1, 0, 0, 0, 2] - Position [810, 28, 835, 52] - ZOrder -28 - ShowName off - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Measurements/Voltage Measurement" - SourceType "Voltage Measurement" - PhasorSimulation off - OutputType "Complex" - PSBequivalent "0" - } - Block { - BlockType Reference - Name "Voltage Measurement6" - SID "873" - Ports [0, 1, 0, 0, 0, 2] - Position [695, 228, 720, 252] - ZOrder -29 - ShowName off - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Measurements/Voltage Measurement" - SourceType "Voltage Measurement" - PhasorSimulation off - OutputType "Complex" - PSBequivalent "0" - } - Block { - BlockType Reference - Name "Voltage Measurement7" - SID "874" - Ports [0, 1, 0, 0, 0, 2] - Position [695, 273, 720, 297] - ZOrder -30 - ShowName off - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Measurements/Voltage Measurement" - SourceType "Voltage Measurement" - PhasorSimulation off - OutputType "Complex" - PSBequivalent "0" - } - Block { - BlockType PMIOPort - Name "A" - SID "875" - Position [25, 38, 55, 52] - ZOrder -31 - Port "1" - Side "Left" - } - Block { - BlockType PMIOPort - Name "A " - SID "876" - Position [1340, 83, 1370, 97] - ZOrder -32 - BlockMirror on - Port "2" - Side "Right" - } - Block { - BlockType PMIOPort - Name "B" - SID "877" - Position [25, 83, 55, 97] - ZOrder -33 - Port "3" - Side "Left" - } - Block { - BlockType PMIOPort - Name "B " - SID "878" - Position [1340, 113, 1370, 127] - ZOrder -34 - BlockMirror on - Port "4" - Side "Right" - } - Block { - BlockType PMIOPort - Name "C" - SID "879" - Position [25, 128, 55, 142] - ZOrder -35 - Port "5" - Side "Left" - } - Block { - BlockType PMIOPort - Name "C " - SID "880" - Position [1340, 143, 1370, 157] - ZOrder -36 - BlockMirror on - Port "6" - Side "Right" - } - Line { - SrcBlock "Three-Phase \nI Measurement" - SrcPort 1 - DstBlock "Subsystem2" - DstPort 1 - } - Line { - SrcBlock "Voltage Measurement1" - SrcPort 1 - Points [40, 0] - Branch { - DstBlock "Goto5" - DstPort 1 - } - Branch { - Points [0, 25] - Branch { - DstBlock "Mux2" - DstPort 1 - } - Branch { - Points [0, 135] - DstBlock "Subsystem3" - DstPort 1 - } - } - } - Line { - SrcBlock "Voltage Measurement6" - SrcPort 1 - Points [25, 0] - Branch { - DstBlock "Goto7" - DstPort 1 - } - Branch { - Points [0, 25] - Branch { - DstBlock "Mux2" - DstPort 2 - } - Branch { - Points [0, 130] - DstBlock "Subsystem4" - DstPort 1 - } - } - } - Line { - SrcBlock "Voltage Measurement7" - SrcPort 1 - Points [10, 0] - Branch { - DstBlock "Goto8" - DstPort 1 - } - Branch { - Points [0, 30] - Branch { - DstBlock "Mux2" - DstPort 3 - } - Branch { - Points [0, 125] - DstBlock "Subsystem5" - DstPort 1 - } - } - } - Line { - SrcBlock "Mux2" - SrcPort 1 - DstBlock "Goto9" - DstPort 1 - } - Line { - SrcBlock "Three-Phase\nV Measurement" - SrcPort 1 - DstBlock "Subsystem1" - DstPort 1 - } - Line { - LineType "Connection" - SrcBlock "A" - SrcPort RConn1 - DstBlock "Three-Phase \nI Measurement" - DstPort LConn1 - } - Line { - LineType "Connection" - Points [765, 90; 560, 0] - DstBlock "A " - DstPort RConn1 - Branch { - ConnectType "SRC_SRC" - Points [-85, 0] - Branch { - ConnectType "DEST_SRC" - DstBlock "Voltage Measurement1" - DstPort LConn1 - } - Branch { - ConnectType "DEST_SRC" - Points [-60, 0] - Branch { - ConnectType "DEST_SRC" - DstBlock "Three-Phase\nV Measurement" - DstPort RConn1 - } - Branch { - ConnectType "DEST_SRC" - Points [0, 200] - DstBlock "Voltage Measurement7" - DstPort LConn2 - } - } - } - Branch { - ConnectType "SRC_SRC" - Points [0, -55] - DstBlock "Voltage Measurement2" - DstPort LConn1 - } - } - Line { - LineType "Connection" - SrcBlock "B" - SrcPort RConn1 - DstBlock "Three-Phase \nI Measurement" - DstPort LConn2 - } - Line { - LineType "Connection" - SrcBlock "B " - SrcPort RConn1 - Points [-655, 0] - Branch { - ConnectType "DEST_SRC" - Points [0, 75] - DstBlock "Voltage Measurement1" - DstPort LConn2 - } - Branch { - ConnectType "DEST_SRC" - Points [-15, 0] - Branch { - ConnectType "DEST_SRC" - DstBlock "Three-Phase\nV Measurement" - DstPort RConn2 - } - Branch { - ConnectType "DEST_SRC" - Points [0, 115] - DstBlock "Voltage Measurement6" - DstPort LConn1 - } - } - } - Line { - LineType "Connection" - SrcBlock "C" - SrcPort RConn1 - DstBlock "Three-Phase \nI Measurement" - DstPort LConn3 - } - Line { - LineType "Connection" - SrcBlock "C " - SrcPort RConn1 - Points [-680, 0] - Branch { - ConnectType "DEST_SRC" - Points [0, 95] - DstBlock "Voltage Measurement6" - DstPort LConn2 - } - Branch { - ConnectType "DEST_SRC" - Points [-15, 0] - Branch { - ConnectType "DEST_SRC" - DstBlock "Three-Phase\nV Measurement" - DstPort RConn3 - } - Branch { - ConnectType "DEST_SRC" - Points [0, 130] - DstBlock "Voltage Measurement7" - DstPort LConn1 - } - } - } - Line { - SrcBlock "Voltage Measurement2" - SrcPort 1 - DstBlock "Goto1" - DstPort 1 - } - Line { - LineType "Connection" - SrcBlock "Ground" - SrcPort LConn1 - Points [0, -5] - DstBlock "Voltage Measurement2" - DstPort LConn2 - } - Line { - LineType "Connection" - SrcBlock "Current Measurement1" - SrcPort LConn1 - DstBlock "Three-Phase \nI Measurement" - DstPort RConn1 - } - Line { - LineType "Connection" - SrcBlock "Three-Phase \nI Measurement" - SrcPort RConn2 - DstBlock "Current Measurement2" - DstPort LConn1 - } - Line { - LineType "Connection" - SrcBlock "Three-Phase \nI Measurement" - SrcPort RConn3 - DstBlock "Current Measurement3" - DstPort LConn1 - } - Line { - LineType "Connection" - SrcBlock "Current Measurement3" - SrcPort RConn1 - Points [60, 0; 0, 10] - DstBlock "Three-Phase\nV Measurement" - DstPort LConn3 - } - Line { - LineType "Connection" - SrcBlock "Current Measurement2" - SrcPort RConn1 - Points [60, 0; 0, -5] - DstBlock "Three-Phase\nV Measurement" - DstPort LConn2 - } - Line { - LineType "Connection" - SrcBlock "Current Measurement1" - SrcPort RConn1 - Points [60, 0; 0, -20] - DstBlock "Three-Phase\nV Measurement" - DstPort LConn1 - } - Line { - SrcBlock "Current Measurement3" - SrcPort 1 - Points [15, 0; 0, 155] - DstBlock "Subsystem8" - DstPort 1 - } - Line { - SrcBlock "Current Measurement2" - SrcPort 1 - Points [30, 0; 0, 145] - DstBlock "Subsystem7" - DstPort 1 - } - Line { - SrcBlock "Current Measurement1" - SrcPort 1 - Points [45, 0; 0, 135] - DstBlock "Subsystem6" - DstPort 1 - } - } - } - Block { - BlockType Reference - Name "Series RLC Branch1" - SID "2463" - Ports [0, 0, 0, 0, 0, 1, 1] - Position [395, 151, 465, 179] - ZOrder -13 - ShowName off - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Elements/Series RLC Branch" - SourceType "Series RLC Branch" - LConnTagsString "__new0" - RConnTagsString "__new0" - BranchType "RL" - Resistance "0.1" - Inductance "30e-3" - SetiL0 off - InitialCurrent "0" - Capacitance "1e-6" - Setx0 off - InitialVoltage "0" - Measurements "Branch voltage" - } - Block { - BlockType Reference - Name "Series RLC Branch2" - SID "881" - Ports [0, 0, 0, 0, 0, 1, 1] - Position [395, 106, 465, 134] - ZOrder -13 - ShowName off - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Elements/Series RLC Branch" - SourceType "Series RLC Branch" - LConnTagsString "__new0" - RConnTagsString "__new0" - BranchType "RL" - Resistance "0.1" - Inductance "30e-3" - SetiL0 off - InitialCurrent "0" - Capacitance "1e-6" - Setx0 off - InitialVoltage "0" - Measurements "Branch voltage" - } - Block { - BlockType Reference - Name "Series RLC Branch3" - SID "2464" - Ports [0, 0, 0, 0, 0, 1, 1] - Position [395, 196, 465, 224] - ZOrder -13 - ShowName off - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Elements/Series RLC Branch" - SourceType "Series RLC Branch" - LConnTagsString "__new0" - RConnTagsString "__new0" - BranchType "RL" - Resistance "0.1" - Inductance "30e-3" - SetiL0 off - InitialCurrent "0" - Capacitance "1e-6" - Setx0 off - InitialVoltage "0" - Measurements "Branch voltage" - } - Block { - BlockType PMIOPort - Name "+" - SID "883" - Position [25, 88, 55, 102] - ZOrder -16 - Port "1" - Side "Right" - } - Block { - BlockType PMIOPort - Name "A" - SID "884" - Position [730, 113, 760, 127] - ZOrder -17 - BlockMirror on - Port "2" - Side "Left" - } - Block { - BlockType PMIOPort - Name "B" - SID "885" - Position [730, 158, 760, 172] - ZOrder -18 - BlockMirror on - Port "3" - Side "Left" - } - Block { - BlockType PMIOPort - Name "-" - SID "886" - Position [25, 183, 55, 197] - ZOrder -19 - Port "4" - Side "Right" - } - Block { - BlockType PMIOPort - Name "C" - SID "887" - Position [730, 203, 760, 217] - ZOrder -20 - BlockMirror on - Port "5" - Side "Left" - } - Line { - LineType "Connection" - SrcBlock "2 Level Inverter" - SrcPort RConn1 - DstBlock "+" - DstPort RConn1 - } - Line { - LineType "Connection" - SrcBlock "2 Level Inverter" - SrcPort RConn2 - DstBlock "-" - DstPort RConn1 - } - Line { - SrcBlock "S" - SrcPort 1 - DstBlock "2 Level Inverter" - DstPort 1 - } - Line { - LineType "Connection" - SrcBlock "Series RLC Branch2" - SrcPort LConn1 - DstBlock "2 Level Inverter" - DstPort LConn1 - } - Line { - LineType "Connection" - SrcBlock "2 Level Inverter" - SrcPort LConn2 - DstBlock "Series RLC Branch1" - DstPort LConn1 - } - Line { - LineType "Connection" - SrcBlock "2 Level Inverter" - SrcPort LConn3 - DstBlock "Series RLC Branch3" - DstPort LConn1 - } - Line { - LineType "Connection" - SrcBlock "Series RLC Branch2" - SrcPort RConn1 - DstBlock "AC Load Measurements" - DstPort LConn1 - } - Line { - LineType "Connection" - SrcBlock "Series RLC Branch1" - SrcPort RConn1 - DstBlock "AC Load Measurements" - DstPort LConn2 - } - Line { - LineType "Connection" - SrcBlock "Series RLC Branch3" - SrcPort RConn1 - DstBlock "AC Load Measurements" - DstPort LConn3 - } - Line { - LineType "Connection" - SrcBlock "AC Load Measurements" - SrcPort RConn1 - DstBlock "A" - DstPort RConn1 - } - Line { - LineType "Connection" - SrcBlock "AC Load Measurements" - SrcPort RConn2 - DstBlock "B" - DstPort RConn1 - } - Line { - LineType "Connection" - SrcBlock "AC Load Measurements" - SrcPort RConn3 - DstBlock "C" - DstPort RConn1 - } - } - } - Block { - BlockType SubSystem - Name "DC BUS " - SID "1269" - Ports [0, 0, 0, 0, 0, 2, 2] - Position [135, 155, 200, 315] - ZOrder -2 - BlockMirror on - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "DC BUS " - Location [-8, -8, 1608, 908] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Reference - Name "Current Measurement1" - SID "1270" - Ports [0, 1, 0, 0, 0, 1, 1] - Position [330, 53, 355, 77] - ZOrder -1 - ShowName off - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Measurements/Current Measurement" - SourceType "Current Measurement" - PhasorSimulation off - OutputType "Complex" - PSBequivalent "0" - } - Block { - BlockType Reference - Name "DC Bus" - SID "1271" - Ports [0, 0, 0, 0, 0, 1, 1] - Position [191, 140, 219, 180] - ZOrder -2 - BlockRotation 270 - BlockMirror on - NamePlacement "alternate" - AttributesFormatString "\\n" - LibraryVersion "1.2191" - SourceBlock "powerlib/Elements/Series RLC Branch" - SourceType "Series RLC Branch" - LConnTagsString "__new0" - RConnTagsString "__new0" - BranchType "C" - Resistance "1" - Inductance "5e-03" - SetiL0 off - InitialCurrent "0" - Capacitance "10e-3/2" - Setx0 off - InitialVoltage "1000/2" - Measurements "None" - } - Block { - BlockType Reference - Name "DC Bus " - SID "1272" - Ports [0, 0, 0, 0, 0, 1, 1] - Position [191, 225, 219, 265] - ZOrder -3 - BlockRotation 270 - BlockMirror on - NamePlacement "alternate" - AttributesFormatString "\\n" - LibraryVersion "1.2191" - SourceBlock "powerlib/Elements/Series RLC Branch" - SourceType "Series RLC Branch" - LConnTagsString "__new0" - RConnTagsString "__new0" - BranchType "C" - Resistance "1" - Inductance "5e-03" - SetiL0 off - InitialCurrent "0" - Capacitance "10e-3/2" - Setx0 off - InitialVoltage "1000/2" - Measurements "None" - } - Block { - BlockType Reference - Name "Ground" - SID "1273" - Ports [0, 0, 0, 0, 0, 1] - Position [254, 230, 276, 255] - ZOrder -4 - BlockRotation 270 - BlockMirror on - ShowName off - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Elements/Ground" - SourceType "Ground" - LConnTagsString "a" - } - Block { - BlockType SubSystem - Name "Subsystem1" - SID "1274" - Ports [1] - Position [390, 16, 425, 54] - ZOrder -5 - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem1" - Location [982, 630, 1289, 1003] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "Idcinv" - SID "1275" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Goto - Name "Goto2" - SID "1276" - Position [150, 31, 210, 59] - ZOrder -20 - NamePlacement "alternate" - ShowName off - GotoTag "Idcinv" - TagVisibility "global" - } - Block { - BlockType Reference - Name "LPF vq11" - SID "1823" - Ports [1, 1] - Position [110, 139, 130, 171] - ZOrder -21 - ShowName off - LibraryVersion "1.664" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" - SourceType "Discrete 1st-Order Filter" - FilterType "Lowpass" - Tc "10e-3" - Ts "5e-6" - Initialize off - Vac_Init "[0.8 -25 60]" - Vdc_Init "0" - PlotResponse off - param1 "[1 100 0.1]" - } - Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1277" - Ports [1] - Position [150, 75, 210, 105] - ZOrder -22 - ShowName off - VariableName "Idcinv" - MaxDataPoints "inf" - SampleTime "-1" - } - Block { - BlockType ToWorkspace - Name "To Workspace2" - SID "1822" - Ports [1] - Position [150, 140, 210, 170] - ZOrder -23 - ShowName off - VariableName "Idcinv1" - MaxDataPoints "inf" - SampleTime "-1" - } - Line { - SrcBlock "Idcinv" - SrcPort 1 - Points [35, 0] - Branch { - DstBlock "Goto2" - DstPort 1 - } - Branch { - Points [0, 45] - Branch { - DstBlock "To Workspace1" - DstPort 1 - } - Branch { - DstBlock "LPF vq11" - DstPort 1 - } - } - } - Line { - SrcBlock "LPF vq11" - SrcPort 1 - DstBlock "To Workspace2" - DstPort 1 - } - } - } - Block { - BlockType SubSystem - Name "Subsystem2" - SID "1278" - Ports [1] - Position [390, 186, 425, 224] - ZOrder -6 - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem2" - Location [982, 630, 1288, 1020] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "Vdcinv" - SID "1279" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Goto - Name "Goto2" - SID "1280" - Position [135, 31, 195, 59] - ZOrder -20 - NamePlacement "alternate" - ShowName off - GotoTag "Vdcinv" - TagVisibility "global" - } - Block { - BlockType Reference - Name "LPF vq11" - SID "1825" - Ports [1, 1] - Position [115, 139, 145, 171] - ZOrder -21 - ShowName off - LibraryVersion "1.664" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" - SourceType "Discrete 1st-Order Filter" - FilterType "Lowpass" - Tc "10e-3" - Ts "5e-6" - Initialize off - Vac_Init "[0.8 -25 60]" - Vdc_Init "0" - PlotResponse off - param1 "[1 100 0.1]" - } - Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1281" - Ports [1] - Position [135, 75, 195, 105] - ZOrder -22 - ShowName off - VariableName "Vdcinv" - MaxDataPoints "inf" - SampleTime "-1" - } - Block { - BlockType ToWorkspace - Name "To Workspace2" - SID "1824" - Ports [1] - Position [165, 140, 225, 170] - ZOrder -23 - ShowName off - VariableName "Vdcinv1" - MaxDataPoints "inf" - SampleTime "-1" - } - Line { - SrcBlock "Vdcinv" - SrcPort 1 - Points [40, 0] - Branch { - DstBlock "Goto2" - DstPort 1 - } - Branch { - Points [0, 45] - Branch { - DstBlock "To Workspace1" - DstPort 1 - } - Branch { - DstBlock "LPF vq11" - DstPort 1 - } - } - } - Line { - SrcBlock "LPF vq11" - SrcPort 1 - DstBlock "To Workspace2" - DstPort 1 - } - } - } - Block { - BlockType Reference - Name "Voltage Measurement1" - SID "1282" - Ports [0, 1, 0, 0, 0, 2] - Position [325, 193, 350, 217] - ZOrder -7 - ShowName off - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Measurements/Voltage Measurement" - SourceType "Voltage Measurement" - PhasorSimulation off - OutputType "Complex" - PSBequivalent "0" - } - Block { - BlockType PMIOPort - Name "+ " - SID "1283" - Position [445, 63, 475, 77] - ZOrder -8 - BlockMirror on - Port "1" - Side "Left" - } - Block { - BlockType PMIOPort - Name "- " - SID "1284" - Position [445, 323, 475, 337] - ZOrder -9 - BlockMirror on - Port "2" - Side "Left" - } - Block { - BlockType PMIOPort - Name "+ " - SID "1285" - Position [65, 58, 95, 72] - ZOrder -10 - NamePlacement "alternate" - Port "3" - Side "Right" - } - Block { - BlockType PMIOPort - Name "- " - SID "1286" - Position [85, 323, 115, 337] - ZOrder -11 - NamePlacement "alternate" - Port "4" - Side "Right" - } - Line { - LineType "Connection" - SrcBlock "DC Bus" - SrcPort LConn1 - Points [0, -55] - Branch { - ConnectType "DEST_DEST" - SrcBlock "+ " - SrcPort RConn1 - Points [0, 5; 95, 0] - } - Branch { - ConnectType "DEST_DEST" - Points [295, 70; -90, 0] - Branch { - ConnectType "SRC_DEST" - SrcBlock "Voltage Measurement1" - SrcPort LConn1 - Points [-15, 0; 0, -130] - } - Branch { - ConnectType "SRC_SRC" - Points [0, -5] - DstBlock "Current Measurement1" - DstPort LConn1 - } - } - } - Line { - LineType "Connection" - SrcBlock "DC Bus " - SrcPort LConn1 - Points [0, -10] - Branch { - ConnectType "DEST_SRC" - DstBlock "DC Bus" - DstPort RConn1 - } - Branch { - ConnectType "DEST_SRC" - Points [60, 0] - DstBlock "Ground" - DstPort LConn1 - } - } - Line { - LineType "Connection" - Points [205, 330; 0, -50] - DstBlock "DC Bus " - DstPort RConn1 - Branch { - ConnectType "SRC_DEST" - SrcBlock "- " - SrcPort RConn1 - Points [75, 0] - } - Branch { - ConnectType "SRC_DEST" - Points [295, 330; -90, 0] - Branch { - ConnectType "SRC_DEST" - SrcBlock "- " - SrcPort RConn1 - Points [-135, 0] - } - Branch { - ConnectType "SRC_SRC" - Points [0, -120] - DstBlock "Voltage Measurement1" - DstPort LConn2 - } - } - } - Line { - SrcBlock "Voltage Measurement1" - SrcPort 1 - DstBlock "Subsystem2" - DstPort 1 - } - Line { - SrcBlock "Current Measurement1" - SrcPort 1 - Points [15, 0] - DstBlock "Subsystem1" - DstPort 1 - } - Line { - LineType "Connection" - SrcBlock "Current Measurement1" - SrcPort RConn1 - DstBlock "+ " - DstPort RConn1 - } - } - } - Block { - BlockType SubSystem - Name "Inverter Control" - SID "888" - Ports [0, 1] - Position [265, 28, 425, 102] - ZOrder -3 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Inverter Control" - Location [-8, -8, 1608, 908] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType SubSystem - Name " Voltage Reference Generator" - SID "889" - Ports [0, 1] - Position [45, 73, 165, 117] - ZOrder -1 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name " Voltage Reference Generator" - Location [-8, -8, 1608, 908] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Goto - Name "Goto1" - SID "890" - Position [270, 160, 335, 190] - ZOrder -10 - ShowName off - GotoTag "Vabc_ref" - TagVisibility "global" - } - Block { - BlockType Mux - Name "Mux4" - SID "891" - Ports [3, 1] - Position [120, 17, 125, 193] - ZOrder -11 - ShowName off - Inputs "3" - DisplayOption "bar" - } - Block { - BlockType Sin - Name "Phase A\nreference" - SID "892" - Ports [0, 1] - Position [35, 30, 65, 60] - ZOrder -12 - Amplitude "400*sqrt(2)/sqrt(3)" - Frequency "2*pi*50" - SampleTime "0" - } - Block { - BlockType Sin - Name "Phase B\nreference" - SID "893" - Ports [0, 1] - Position [35, 90, 65, 120] - ZOrder -13 - Amplitude "400*sqrt(2)/sqrt(3)" - Frequency "2*pi*50" - Phase "-2*pi/3" - SampleTime "0" - } - Block { - BlockType Sin - Name "Phase C\nreference" - SID "894" - Ports [0, 1] - Position [35, 150, 65, 180] - ZOrder -14 - Amplitude "400*sqrt(2)/sqrt(3)" - Frequency "2*pi*50" - Phase "2*pi/3" - SampleTime "0" - } - Block { - BlockType Product - Name "Product" - SID "895" - Ports [2, 1] - Position [190, 97, 220, 128] - ZOrder -15 - ShowName off - InputSameDT off - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Reference - Name "Ramp" - SID "896" - Ports [0, 1] - Position [35, 225, 65, 255] - ZOrder -16 - LibraryVersion "1.274" - SourceBlock "simulink/Sources/Ramp" - SourceType "Ramp" - slope "1/0.3" - start "0" - X0 "0" - VectorParams1D on - } - Block { - BlockType Saturate - Name "Saturation" - SID "897" - Ports [1, 1] - Position [105, 225, 135, 255] - ZOrder -17 - InputPortMap "u0" - UpperLimit "1" - LowerLimit "0" - } - Block { - BlockType Outport - Name "Vabc*" - SID "898" - Position [285, 108, 315, 122] - ZOrder -18 - IconDisplay "Port number" - } - Line { - SrcBlock "Phase B\nreference" - SrcPort 1 - DstBlock "Mux4" - DstPort 2 - } - Line { - SrcBlock "Phase A\nreference" - SrcPort 1 - DstBlock "Mux4" - DstPort 1 - } - Line { - SrcBlock "Phase C\nreference" - SrcPort 1 - DstBlock "Mux4" - DstPort 3 - } - Line { - SrcBlock "Ramp" - SrcPort 1 - DstBlock "Saturation" - DstPort 1 - } - Line { - SrcBlock "Saturation" - SrcPort 1 - Points [15, 0; 0, -120] - DstBlock "Product" - DstPort 2 - } - Line { - SrcBlock "Mux4" - SrcPort 1 - Points [25, 0; 0, -20; 100, 0; 0, 30] - Branch { - DstBlock "Vabc*" - DstPort 1 - } - Branch { - DstBlock "Goto1" - DstPort 1 - } - } - } - } - Block { - BlockType SubSystem - Name "Cross Terms" - SID "899" - Ports [2, 2] - Position [975, 73, 1070, 182] - ZOrder -2 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Cross Terms" - Location [193, 129, 664, 515] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "id*" - SID "900" - Position [25, 60, 40, 90] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Inport - Name "iq*" - SID "901" - Position [25, 135, 40, 165] - ZOrder -2 - Port "2" - IconDisplay "Port number" - } - Block { - BlockType Gain - Name "Gain1" - SID "902" - Position [160, 48, 260, 102] - ZOrder -3 - ShowName off - Gain "-2*pi*50*3e-3" - ParamDataTypeStr "Inherit: Inherit via internal rule" - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Gain - Name "Gain2" - SID "903" - Position [160, 123, 260, 177] - ZOrder -4 - ShowName off - Gain "2*pi*50*3e-3" - ParamDataTypeStr "Inherit: Inherit via internal rule" - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Outport - Name " q" - SID "904" - Position [365, 135, 380, 165] - ZOrder -5 - IconDisplay "Port number" - } - Block { - BlockType Outport - Name " d" - SID "905" - Position [365, 60, 380, 90] - ZOrder -6 - Port "2" - IconDisplay "Port number" - } - Line { - SrcBlock "id*" - SrcPort 1 - DstBlock "Gain1" - DstPort 1 - } - Line { - SrcBlock "iq*" - SrcPort 1 - DstBlock "Gain2" - DstPort 1 - } - Line { - SrcBlock "Gain1" - SrcPort 1 - DstBlock " d" - DstPort 1 - } - Line { - SrcBlock "Gain2" - SrcPort 1 - DstBlock " q" - DstPort 1 - } - } - } - Block { - BlockType SubSystem - Name "Current Ref. Generator" - SID "906" - Ports [2, 2] - Position [630, 71, 725, 184] - ZOrder -3 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Current Ref. Generator" - Location [661, 369, 1264, 804] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "evd" - SID "907" - Position [25, 33, 55, 47] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Inport - Name "evq" - SID "908" - Position [25, 183, 55, 197] - ZOrder -2 - Port "2" - IconDisplay "Port number" - } - Block { - BlockType Product - Name "Divide" - SID "909" - Ports [2, 1] - Position [345, 32, 375, 63] - ZOrder -3 - ShowName off - Inputs "*/" - InputSameDT off - OutDataTypeStr "Inherit: Inherit via internal rule" - RndMeth "Floor" - SaturateOnIntegerOverflow off - } - Block { - BlockType Product - Name "Divide1" - SID "910" - Ports [2, 1] - Position [345, 167, 375, 198] - ZOrder -4 - ShowName off - Inputs "/*" - InputSameDT off - OutDataTypeStr "Inherit: Inherit via internal rule" - RndMeth "Floor" - SaturateOnIntegerOverflow off - } - Block { - BlockType Goto - Name "Goto1" - SID "911" - Position [465, 15, 520, 45] - ZOrder -10 - ShowName off - GotoTag "id_ref" - TagVisibility "global" - } - Block { - BlockType Goto - Name "Goto4" - SID "912" - Position [465, 200, 520, 230] - ZOrder -10 - ShowName off - GotoTag "iq_ref" - TagVisibility "global" - } - Block { - BlockType Scope - Name "Scope24" - SID "913" - Ports [1] - Position [385, 98, 415, 132] - ZOrder -19 - Floating off - Location [463, 149, 1247, 945] - Open off - NumInputPorts "1" - ZoomMode "yonly" - List { - ListType AxesTitles - axes1 "Icons / I inversor" - } - ShowLegends off - TimeRange "0.09" - YMin "0.699626" - YMax "0.699626" - SaveName "ScopeData53" - DataFormat "StructureWithTime" - LimitDataPoints off - SampleTime "0" - } - Block { - BlockType Sum - Name "Sum1" - SID "914" - Ports [2, 1] - Position [225, 180, 245, 200] - ZOrder -20 - ShowName off - IconShape "round" - Inputs "-+|" - InputSameDT off - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Sum - Name "Sum3" - SID "915" - Ports [2, 1] - Position [190, 30, 210, 50] - ZOrder -21 - ShowName off - IconShape "round" - Inputs "|++" - InputSameDT off - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Gain - Name "Zd" - SID "916" - Position [125, 25, 155, 55] - ZOrder -22 - Gain "0.4559" - ParamDataTypeStr "Inherit: Inherit via internal rule" - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Gain - Name "Zd1" - SID "917" - Position [120, 175, 150, 205] - ZOrder -23 - Gain "0.4559" - ParamDataTypeStr "Inherit: Inherit via internal rule" - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Constant - Name "Zd^2+Zq^2" - SID "918" - Position [265, 100, 295, 130] - ZOrder -24 - Value "0.4559^2+0.1824^2" - } - Block { - BlockType Gain - Name "Zq" - SID "919" - Position [125, 75, 155, 105] - ZOrder -25 - Gain "0.1824" - ParamDataTypeStr "Inherit: Inherit via internal rule" - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Gain - Name "Zq1" - SID "920" - Position [120, 125, 150, 155] - ZOrder -26 - Gain "0.1824" - ParamDataTypeStr "Inherit: Inherit via internal rule" - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Outport - Name "id*" - SID "921" - Position [420, 43, 450, 57] - ZOrder -27 - IconDisplay "Port number" - } - Block { - BlockType Outport - Name "iq*" - SID "922" - Position [420, 178, 450, 192] - ZOrder -28 - Port "2" - IconDisplay "Port number" - } - Line { - SrcBlock "Zd" - SrcPort 1 - DstBlock "Sum3" - DstPort 1 - } - Line { - SrcBlock "Zq1" - SrcPort 1 - Points [45, 0] - DstBlock "Sum3" - DstPort 2 - } - Line { - SrcBlock "Zd1" - SrcPort 1 - DstBlock "Sum1" - DstPort 2 - } - Line { - SrcBlock "Zq" - SrcPort 1 - Points [75, 0] - DstBlock "Sum1" - DstPort 1 - } - Line { - SrcBlock "Sum3" - SrcPort 1 - DstBlock "Divide" - DstPort 1 - } - Line { - SrcBlock "Zd^2+Zq^2" - SrcPort 1 - Points [25, 0] - Branch { - Points [0, -60] - DstBlock "Divide" - DstPort 2 - } - Branch { - Points [0, 60] - DstBlock "Divide1" - DstPort 1 - } - Branch { - DstBlock "Scope24" - DstPort 1 - } - } - Line { - SrcBlock "Sum1" - SrcPort 1 - DstBlock "Divide1" - DstPort 2 - } - Line { - SrcBlock "evd" - SrcPort 1 - Points [35, 0] - Branch { - DstBlock "Zd" - DstPort 1 - } - Branch { - Points [0, 50] - DstBlock "Zq" - DstPort 1 - } - } - Line { - SrcBlock "evq" - SrcPort 1 - Points [35, 0] - Branch { - DstBlock "Zd1" - DstPort 1 - } - Branch { - Points [0, -50] - DstBlock "Zq1" - DstPort 1 - } - } - Line { - SrcBlock "Divide1" - SrcPort 1 - Points [15, 0] - Branch { - DstBlock "iq*" - DstPort 1 - } - Branch { - Points [0, 30] - DstBlock "Goto4" - DstPort 1 - } - } - Line { - SrcBlock "Divide" - SrcPort 1 - Points [10, 0] - Branch { - DstBlock "id*" - DstPort 1 - } - Branch { - Points [0, -20] - DstBlock "Goto1" - DstPort 1 - } - } - Annotation { - SID "2552" - Name "evd" - Position [70, 28] - ZOrder -1 - } - Annotation { - SID "2553" - Name "evq" - Position [71, 180] - ZOrder -2 - } - } - } - Block { - BlockType SubSystem - Name "Frequency Reference Generator" - SID "923" - Ports [0, 1] - Position [45, 138, 165, 182] - ZOrder -4 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Frequency Reference Generator" - Location [16, 255, 435, 584] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Constant - Name "Constant" - SID "924" - Position [210, 99, 235, 121] - ZOrder -1 - BlockMirror on - NamePlacement "alternate" - ShowName off - Value "2*pi" - } - Block { - BlockType Goto - Name "Goto1" - SID "925" - Position [80, 90, 135, 120] - ZOrder -10 - ShowName off - GotoTag "f_ref" - TagVisibility "global" - } - Block { - BlockType Goto - Name "Goto3" - SID "926" - Position [290, 95, 345, 125] - ZOrder -10 - ShowName off - GotoTag "theta" - TagVisibility "global" - } - Block { - BlockType Integrator - Name "Integrator" - SID "927" - Ports [2, 1] - Position [180, 37, 210, 68] - ZOrder -12 - ShowName off - ExternalReset "rising" - } - Block { - BlockType RelationalOperator - Name "Relational\nOperator" - SID "928" - Ports [2, 1] - Position [155, 87, 185, 118] - ZOrder -13 - BlockMirror on - NamePlacement "alternate" - ShowName off - InputSameDT off - OutDataTypeStr "boolean" - } - Block { - BlockType Constant - Name "f* " - SID "929" - Position [15, 30, 45, 60] - ZOrder -14 - Value "50" - } - Block { - BlockType Gain - Name "w*" - SID "930" - Position [75, 25, 135, 65] - ZOrder -15 - Gain "2*pi" - ParamDataTypeStr "Inherit: Inherit via internal rule" - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Outport - Name "theta*" - SID "931" - Position [300, 48, 330, 62] - ZOrder -16 - IconDisplay "Port number" - } - Line { - SrcBlock "f* " - SrcPort 1 - Points [5, 0] - Branch { - DstBlock "w*" - DstPort 1 - } - Branch { - Points [0, 60] - DstBlock "Goto1" - DstPort 1 - } - } - Line { - SrcBlock "w*" - SrcPort 1 - DstBlock "Integrator" - DstPort 1 - } - Line { - SrcBlock "Relational\nOperator" - SrcPort 1 - Points [-5, 0; 0, -45] - DstBlock "Integrator" - DstPort 2 - } - Line { - SrcBlock "Constant" - SrcPort 1 - DstBlock "Relational\nOperator" - DstPort 2 - } - Line { - SrcBlock "Integrator" - SrcPort 1 - Points [10, 0] - Branch { - Points [0, 40] - DstBlock "Relational\nOperator" - DstPort 1 - } - Branch { - Points [35, 0] - Branch { - DstBlock "theta*" - DstPort 1 - } - Branch { - Points [0, 55] - DstBlock "Goto3" - DstPort 1 - } - } - } - Annotation { - SID "2554" - Name "theta" - Position [233, 45] - ZOrder -1 - } - } - } - Block { - BlockType From - Name "From" - SID "932" - Position [75, 341, 135, 369] - ZOrder -5 - ShowName off - GotoTag "Vabc" - TagVisibility "global" - } - Block { - BlockType From - Name "From1" - SID "933" - Position [75, 501, 135, 529] - ZOrder -6 - ShowName off - GotoTag "Iabc" - TagVisibility "global" - } - Block { - BlockType From - Name "From2" - SID "2264" - Position [1015, 566, 1075, 594] - ZOrder -7 - ShowName off - GotoTag "Vabc2" - TagVisibility "global" - } - Block { - BlockType From - Name "From3" - SID "2265" - Position [1015, 726, 1075, 754] - ZOrder -8 - ShowName off - GotoTag "Iabc2" - TagVisibility "global" - } - Block { - BlockType From - Name "From4" - SID "2266" - Position [1365, 571, 1425, 599] - ZOrder -9 - ShowName off - GotoTag "Vabc3" - TagVisibility "global" - } - Block { - BlockType From - Name "From5" - SID "2267" - Position [1365, 731, 1425, 759] - ZOrder -10 - ShowName off - GotoTag "Iabc3" - TagVisibility "global" - } - Block { - BlockType SubSystem - Name "Iabc - idq" - SID "934" - Ports [2, 2] - Position [225, 483, 350, 612] - ZOrder -11 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Iabc - idq" - Location [407, 631, 1054, 994] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "Iabc" - SID "935" - Position [25, 58, 55, 72] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Inport - Name "theta" - SID "936" - Position [195, 98, 225, 112] - ZOrder -2 - Port "2" - IconDisplay "Port number" - } - Block { - BlockType Demux - Name "Demux" - SID "937" - Ports [1, 2] - Position [425, 49, 430, 116] - ZOrder -3 - ShowName off - Outputs "2" - DisplayOption "bar" - } - Block { - BlockType Goto - Name "Goto6" - SID "938" - Position [465, 15, 520, 45] - ZOrder -10 - ShowName off - GotoTag "id" - TagVisibility "global" - } - Block { - BlockType Goto - Name "Goto7" - SID "939" - Position [465, 125, 520, 155] - ZOrder -10 - ShowName off - GotoTag "iq" - TagVisibility "global" - } - Block { - BlockType SubSystem - Name "abc - alfa/beta" - SID "940" - Ports [1, 1] - Position [80, 29, 185, 101] - ZOrder -12 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "abc - alfa/beta" - Location [349, 424, 780, 760] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "abc" - SID "941" - Position [25, 55, 40, 85] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Mux - Name "Mux" - SID "942" - Ports [2, 1] - Position [285, 25, 290, 125] - ZOrder -2 - ShowName off - Inputs "2" - DisplayOption "bar" - } - Block { - BlockType Fcn - Name "d_s" - SID "943" - Position [110, 33, 255, 67] - ZOrder -3 - Expr "(-1/sqrt(3)*u(2))+(1/sqrt(3)*u(3))" - } - Block { - BlockType Fcn - Name "q_s" - SID "944" - Position [110, 83, 255, 117] - ZOrder -4 - Expr "(2/3)*u(1)-(1/3)*u(2)-(1/3)*u(3)" - } - Block { - BlockType Outport - Name "alfa/beta" - SID "945" - Position [335, 60, 350, 90] - ZOrder -5 - IconDisplay "Port number" - } - Line { - SrcBlock "abc" - SrcPort 1 - Points [25, 0] - Branch { - Points [0, 30] - DstBlock "q_s" - DstPort 1 - } - Branch { - Points [0, -20] - DstBlock "d_s" - DstPort 1 - } - } - Line { - SrcBlock "d_s" - SrcPort 1 - DstBlock "Mux" - DstPort 1 - } - Line { - SrcBlock "q_s" - SrcPort 1 - DstBlock "Mux" - DstPort 2 - } - Line { - SrcBlock "Mux" - SrcPort 1 - DstBlock "alfa/beta" - DstPort 1 - } - } - } - Block { - BlockType SubSystem - Name "alfa/beta - dq" - SID "946" - Ports [2, 1] - Position [250, 45, 380, 125] - ZOrder -13 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "alfa/beta - dq" - Location [822, 775, 1323, 1160] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "alfa/beta" - SID "947" - Position [25, 50, 40, 80] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Inport - Name "theta" - SID "948" - Position [25, 125, 40, 155] - ZOrder -2 - Port "2" - IconDisplay "Port number" - } - Block { - BlockType Mux - Name "Mux" - SID "949" - Ports [2, 1] - Position [320, 28, 325, 177] - ZOrder -3 - ShowName off - Inputs "2" - DisplayOption "bar" - } - Block { - BlockType Mux - Name "Mux1" - SID "950" - Ports [2, 1] - Position [65, 28, 70, 177] - ZOrder -4 - ShowName off - Inputs "2" - DisplayOption "bar" - } - Block { - BlockType Fcn - Name "d" - SID "951" - Position [115, 47, 275, 83] - ZOrder -5 - Expr "u(2)*sin(u(3)) + u(1)*cos(u(3))" - } - Block { - BlockType Fcn - Name "q" - SID "952" - Position [115, 123, 280, 157] - ZOrder -6 - Expr "-u(1)*sin(u(3)) + u(2)*cos(u(3))" - } - Block { - BlockType Outport - Name "d/q" - SID "953" - Position [360, 90, 375, 120] - ZOrder -7 - IconDisplay "Port number" - } - Line { - SrcBlock "d" - SrcPort 1 - DstBlock "Mux" - DstPort 1 - } - Line { - SrcBlock "q" - SrcPort 1 - DstBlock "Mux" - DstPort 2 - } - Line { - SrcBlock "Mux" - SrcPort 1 - DstBlock "d/q" - DstPort 1 - } - Line { - SrcBlock "alfa/beta" - SrcPort 1 - DstBlock "Mux1" - DstPort 1 - } - Line { - SrcBlock "theta" - SrcPort 1 - DstBlock "Mux1" - DstPort 2 - } - Line { - SrcBlock "Mux1" - SrcPort 1 - Points [25, 0] - Branch { - DstBlock "d" - DstPort 1 - } - Branch { - DstBlock "q" - DstPort 1 - } - } - } - } - Block { - BlockType Outport - Name "iq" - SID "954" - Position [530, 103, 560, 117] - ZOrder -14 - IconDisplay "Port number" - } - Block { - BlockType Outport - Name "id" - SID "955" - Position [530, 48, 560, 62] - ZOrder -15 - Port "2" - IconDisplay "Port number" - } - Line { - SrcBlock "theta" - SrcPort 1 - DstBlock "alfa/beta - dq" - DstPort 2 - } - Line { - SrcBlock "Iabc" - SrcPort 1 - DstBlock "abc - alfa/beta" - DstPort 1 - } - Line { - SrcBlock "abc - alfa/beta" - SrcPort 1 - DstBlock "alfa/beta - dq" - DstPort 1 - } - Line { - SrcBlock "alfa/beta - dq" - SrcPort 1 - DstBlock "Demux" - DstPort 1 - } - Line { - SrcBlock "Demux" - SrcPort 1 - Points [10, 0; 0, -10] - Branch { - DstBlock "id" - DstPort 1 - } - Branch { - Points [0, -25] - DstBlock "Goto6" - DstPort 1 - } - } - Line { - SrcBlock "Demux" - SrcPort 2 - Points [10, 0; 0, 10] - Branch { - DstBlock "iq" - DstPort 1 - } - Branch { - Points [0, 30] - DstBlock "Goto7" - DstPort 1 - } - } - } - } - Block { - BlockType SubSystem - Name "Iabc - idq1" - SID "2268" - Ports [2, 2] - Position [1165, 708, 1290, 837] - ZOrder -12 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Iabc - idq1" - Location [407, 631, 1054, 994] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "Iabc" - SID "2269" - Position [25, 58, 55, 72] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Inport - Name "theta" - SID "2270" - Position [195, 98, 225, 112] - ZOrder -2 - Port "2" - IconDisplay "Port number" - } - Block { - BlockType Demux - Name "Demux" - SID "2271" - Ports [1, 2] - Position [425, 49, 430, 116] - ZOrder -3 - ShowName off - Outputs "2" - DisplayOption "bar" - } - Block { - BlockType Goto - Name "Goto6" - SID "2272" - Position [465, 15, 520, 45] - ZOrder -10 - ShowName off - GotoTag "id2" - TagVisibility "global" - } - Block { - BlockType Goto - Name "Goto7" - SID "2273" - Position [465, 125, 520, 155] - ZOrder -10 - ShowName off - GotoTag "iq2" - TagVisibility "global" - } - Block { - BlockType SubSystem - Name "abc - alfa/beta" - SID "2274" - Ports [1, 1] - Position [80, 29, 185, 101] - ZOrder -12 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "abc - alfa/beta" - Location [349, 424, 780, 760] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "abc" - SID "2275" - Position [25, 55, 40, 85] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Mux - Name "Mux" - SID "2276" - Ports [2, 1] - Position [285, 25, 290, 125] - ZOrder -2 - ShowName off - Inputs "2" - DisplayOption "bar" - } - Block { - BlockType Fcn - Name "d_s" - SID "2277" - Position [110, 33, 255, 67] - ZOrder -3 - Expr "(-1/sqrt(3)*u(2))+(1/sqrt(3)*u(3))" - } - Block { - BlockType Fcn - Name "q_s" - SID "2278" - Position [110, 83, 255, 117] - ZOrder -4 - Expr "(2/3)*u(1)-(1/3)*u(2)-(1/3)*u(3)" - } - Block { - BlockType Outport - Name "alfa/beta" - SID "2279" - Position [335, 60, 350, 90] - ZOrder -5 - IconDisplay "Port number" - } - Line { - SrcBlock "Mux" - SrcPort 1 - DstBlock "alfa/beta" - DstPort 1 - } - Line { - SrcBlock "q_s" - SrcPort 1 - DstBlock "Mux" - DstPort 2 - } - Line { - SrcBlock "d_s" - SrcPort 1 - DstBlock "Mux" - DstPort 1 - } - Line { - SrcBlock "abc" - SrcPort 1 - Points [25, 0] - Branch { - Points [0, -20] - DstBlock "d_s" - DstPort 1 - } - Branch { - Points [0, 30] - DstBlock "q_s" - DstPort 1 - } - } - } - } - Block { - BlockType SubSystem - Name "alfa/beta - dq" - SID "2280" - Ports [2, 1] - Position [250, 45, 380, 125] - ZOrder -13 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "alfa/beta - dq" - Location [822, 775, 1323, 1160] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "alfa/beta" - SID "2281" - Position [25, 50, 40, 80] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Inport - Name "theta" - SID "2282" - Position [25, 125, 40, 155] - ZOrder -2 - Port "2" - IconDisplay "Port number" - } - Block { - BlockType Mux - Name "Mux" - SID "2283" - Ports [2, 1] - Position [320, 28, 325, 177] - ZOrder -3 - ShowName off - Inputs "2" - DisplayOption "bar" - } - Block { - BlockType Mux - Name "Mux1" - SID "2284" - Ports [2, 1] - Position [65, 28, 70, 177] - ZOrder -4 - ShowName off - Inputs "2" - DisplayOption "bar" - } - Block { - BlockType Fcn - Name "d" - SID "2285" - Position [115, 47, 275, 83] - ZOrder -5 - Expr "u(2)*sin(u(3)) + u(1)*cos(u(3))" - } - Block { - BlockType Fcn - Name "q" - SID "2286" - Position [115, 123, 280, 157] - ZOrder -6 - Expr "-u(1)*sin(u(3)) + u(2)*cos(u(3))" - } - Block { - BlockType Outport - Name "d/q" - SID "2287" - Position [360, 90, 375, 120] - ZOrder -7 - IconDisplay "Port number" - } - Line { - SrcBlock "Mux1" - SrcPort 1 - Points [25, 0] - Branch { - DstBlock "q" - DstPort 1 - } - Branch { - DstBlock "d" - DstPort 1 - } - } - Line { - SrcBlock "theta" - SrcPort 1 - DstBlock "Mux1" - DstPort 2 - } - Line { - SrcBlock "alfa/beta" - SrcPort 1 - DstBlock "Mux1" - DstPort 1 - } - Line { - SrcBlock "Mux" - SrcPort 1 - DstBlock "d/q" - DstPort 1 - } - Line { - SrcBlock "q" - SrcPort 1 - DstBlock "Mux" - DstPort 2 - } - Line { - SrcBlock "d" - SrcPort 1 - DstBlock "Mux" - DstPort 1 - } - } - } - Block { - BlockType Outport - Name "iq" - SID "2288" - Position [530, 103, 560, 117] - ZOrder -14 - IconDisplay "Port number" - } - Block { - BlockType Outport - Name "id" - SID "2289" - Position [530, 48, 560, 62] - ZOrder -15 - Port "2" - IconDisplay "Port number" - } - Line { - SrcBlock "Demux" - SrcPort 2 - Points [10, 0; 0, 10] - Branch { - Points [0, 30] - DstBlock "Goto7" - DstPort 1 - } - Branch { - DstBlock "iq" - DstPort 1 - } - } - Line { - SrcBlock "Demux" - SrcPort 1 - Points [10, 0; 0, -10] - Branch { - Points [0, -25] - DstBlock "Goto6" - DstPort 1 - } - Branch { - DstBlock "id" - DstPort 1 - } - } - Line { - SrcBlock "alfa/beta - dq" - SrcPort 1 - DstBlock "Demux" - DstPort 1 - } - Line { - SrcBlock "abc - alfa/beta" - SrcPort 1 - DstBlock "alfa/beta - dq" - DstPort 1 - } - Line { - SrcBlock "Iabc" - SrcPort 1 - DstBlock "abc - alfa/beta" - DstPort 1 - } - Line { - SrcBlock "theta" - SrcPort 1 - DstBlock "alfa/beta - dq" - DstPort 2 - } - } - } - Block { - BlockType SubSystem - Name "Iabc - idq2" - SID "2290" - Ports [2, 2] - Position [1515, 713, 1640, 842] - ZOrder -13 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Iabc - idq2" - Location [407, 631, 1054, 994] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "Iabc" - SID "2291" - Position [25, 58, 55, 72] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Inport - Name "theta" - SID "2292" - Position [195, 98, 225, 112] - ZOrder -2 - Port "2" - IconDisplay "Port number" - } - Block { - BlockType Demux - Name "Demux" - SID "2293" - Ports [1, 2] - Position [425, 49, 430, 116] - ZOrder -3 - ShowName off - Outputs "2" - DisplayOption "bar" - } - Block { - BlockType Goto - Name "Goto6" - SID "2294" - Position [465, 15, 520, 45] - ZOrder -10 - ShowName off - GotoTag "id3" - TagVisibility "global" - } - Block { - BlockType Goto - Name "Goto7" - SID "2295" - Position [465, 125, 520, 155] - ZOrder -10 - ShowName off - GotoTag "iq3" - TagVisibility "global" - } - Block { - BlockType SubSystem - Name "abc - alfa/beta" - SID "2296" - Ports [1, 1] - Position [80, 29, 185, 101] - ZOrder -12 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "abc - alfa/beta" - Location [349, 424, 780, 760] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "abc" - SID "2297" - Position [25, 55, 40, 85] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Mux - Name "Mux" - SID "2298" - Ports [2, 1] - Position [285, 25, 290, 125] - ZOrder -2 - ShowName off - Inputs "2" - DisplayOption "bar" - } - Block { - BlockType Fcn - Name "d_s" - SID "2299" - Position [110, 33, 255, 67] - ZOrder -3 - Expr "(-1/sqrt(3)*u(2))+(1/sqrt(3)*u(3))" - } - Block { - BlockType Fcn - Name "q_s" - SID "2300" - Position [110, 83, 255, 117] - ZOrder -4 - Expr "(2/3)*u(1)-(1/3)*u(2)-(1/3)*u(3)" - } - Block { - BlockType Outport - Name "alfa/beta" - SID "2301" - Position [335, 60, 350, 90] - ZOrder -5 - IconDisplay "Port number" - } - Line { - SrcBlock "abc" - SrcPort 1 - Points [25, 0] - Branch { - Points [0, 30] - DstBlock "q_s" - DstPort 1 - } - Branch { - Points [0, -20] - DstBlock "d_s" - DstPort 1 - } - } - Line { - SrcBlock "d_s" - SrcPort 1 - DstBlock "Mux" - DstPort 1 - } - Line { - SrcBlock "q_s" - SrcPort 1 - DstBlock "Mux" - DstPort 2 - } - Line { - SrcBlock "Mux" - SrcPort 1 - DstBlock "alfa/beta" - DstPort 1 - } - } - } - Block { - BlockType SubSystem - Name "alfa/beta - dq" - SID "2302" - Ports [2, 1] - Position [250, 45, 380, 125] - ZOrder -13 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "alfa/beta - dq" - Location [822, 775, 1323, 1160] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "alfa/beta" - SID "2303" - Position [25, 50, 40, 80] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Inport - Name "theta" - SID "2304" - Position [25, 125, 40, 155] - ZOrder -2 - Port "2" - IconDisplay "Port number" - } - Block { - BlockType Mux - Name "Mux" - SID "2305" - Ports [2, 1] - Position [320, 28, 325, 177] - ZOrder -3 - ShowName off - Inputs "2" - DisplayOption "bar" - } - Block { - BlockType Mux - Name "Mux1" - SID "2306" - Ports [2, 1] - Position [65, 28, 70, 177] - ZOrder -4 - ShowName off - Inputs "2" - DisplayOption "bar" - } - Block { - BlockType Fcn - Name "d" - SID "2307" - Position [115, 47, 275, 83] - ZOrder -5 - Expr "u(2)*sin(u(3)) + u(1)*cos(u(3))" - } - Block { - BlockType Fcn - Name "q" - SID "2308" - Position [115, 123, 280, 157] - ZOrder -6 - Expr "-u(1)*sin(u(3)) + u(2)*cos(u(3))" - } - Block { - BlockType Outport - Name "d/q" - SID "2309" - Position [360, 90, 375, 120] - ZOrder -7 - IconDisplay "Port number" - } - Line { - SrcBlock "d" - SrcPort 1 - DstBlock "Mux" - DstPort 1 - } - Line { - SrcBlock "q" - SrcPort 1 - DstBlock "Mux" - DstPort 2 - } - Line { - SrcBlock "Mux" - SrcPort 1 - DstBlock "d/q" - DstPort 1 - } - Line { - SrcBlock "alfa/beta" - SrcPort 1 - DstBlock "Mux1" - DstPort 1 - } - Line { - SrcBlock "theta" - SrcPort 1 - DstBlock "Mux1" - DstPort 2 - } - Line { - SrcBlock "Mux1" - SrcPort 1 - Points [25, 0] - Branch { - DstBlock "d" - DstPort 1 - } - Branch { - DstBlock "q" - DstPort 1 - } - } - } - } - Block { - BlockType Outport - Name "iq" - SID "2310" - Position [530, 103, 560, 117] - ZOrder -14 - IconDisplay "Port number" - } - Block { - BlockType Outport - Name "id" - SID "2311" - Position [530, 48, 560, 62] - ZOrder -15 - Port "2" - IconDisplay "Port number" - } - Line { - SrcBlock "theta" - SrcPort 1 - DstBlock "alfa/beta - dq" - DstPort 2 - } - Line { - SrcBlock "Iabc" - SrcPort 1 - DstBlock "abc - alfa/beta" - DstPort 1 - } - Line { - SrcBlock "abc - alfa/beta" - SrcPort 1 - DstBlock "alfa/beta - dq" - DstPort 1 - } - Line { - SrcBlock "alfa/beta - dq" - SrcPort 1 - DstBlock "Demux" - DstPort 1 - } - Line { - SrcBlock "Demux" - SrcPort 1 - Points [10, 0; 0, -10] - Branch { - DstBlock "id" - DstPort 1 - } - Branch { - Points [0, -25] - DstBlock "Goto6" - DstPort 1 - } - } - Line { - SrcBlock "Demux" - SrcPort 2 - Points [10, 0; 0, 10] - Branch { - DstBlock "iq" - DstPort 1 - } - Branch { - Points [0, 30] - DstBlock "Goto7" - DstPort 1 - } - } - } - } - Block { - BlockType Reference - Name "LPF id" - SID "956" - Ports [1, 1] - Position [385, 564, 425, 596] - ZOrder -14 - LibraryVersion "1.664" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" - SourceType "Discrete 1st-Order Filter" - FilterType "Lowpass" - Tc "1e-3" - Ts "5e-6" - Initialize off - Vac_Init "[0.8 -25 60]" - Vdc_Init "0" - PlotResponse off - param1 "[1 100 0.1]" - } - Block { - BlockType Reference - Name "LPF iq" - SID "957" - Ports [1, 1] - Position [385, 499, 425, 531] - ZOrder -15 - LibraryVersion "1.664" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" - SourceType "Discrete 1st-Order Filter" - FilterType "Lowpass" - Tc "1e-3" - Ts "5e-6" - Initialize off - Vac_Init "[0.8 -25 60]" - Vdc_Init "0" - PlotResponse off - param1 "[1 100 0.1]" - } - Block { - BlockType Reference - Name "LPF vd" - SID "958" - Ports [1, 1] - Position [385, 404, 425, 436] - ZOrder -16 - LibraryVersion "1.664" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" - SourceType "Discrete 1st-Order Filter" - FilterType "Lowpass" - Tc "10e-3" - Ts "5e-6" - Initialize off - Vac_Init "[0.8 -25 60]" - Vdc_Init "-0.4" - PlotResponse off - param1 "[1 100 0.1]" - } - Block { - BlockType Reference - Name "LPF vq" - SID "959" - Ports [1, 1] - Position [385, 339, 425, 371] - ZOrder -17 - LibraryVersion "1.664" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" - SourceType "Discrete 1st-Order Filter" - FilterType "Lowpass" - Tc "10e-3" - Ts "5e-6" - Initialize off - Vac_Init "[0.8 -25 60]" - Vdc_Init "0" - PlotResponse off - param1 "[1 100 0.1]" - } - Block { - BlockType Mux - Name "Mux1" - SID "960" - Ports [2, 1] - Position [1225, 49, 1230, 251] - ZOrder -18 - ShowName off - Inputs "2" - DisplayOption "bar" - } - Block { - BlockType SubSystem - Name "PI id" - SID "961" - Ports [1, 1] - Position [845, 39, 940, 81] - ZOrder -19 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "PI id" - Location [193, 129, 795, 508] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "e" - SID "962" - Position [30, 65, 45, 95] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Gain - Name "Gain1" - SID "963" - Position [160, 61, 215, 99] - ZOrder -2 - ShowName off - Gain "50" - ParamDataTypeStr "Inherit: Inherit via internal rule" - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Gain - Name "Gain2" - SID "964" - Position [160, 136, 215, 174] - ZOrder -3 - ShowName off - Gain "500" - ParamDataTypeStr "Inherit: Inherit via internal rule" - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Integrator - Name "Integrator" - SID "965" - Ports [1, 1] - Position [280, 140, 310, 170] - ZOrder -4 - ShowName off - } - Block { - BlockType Saturate - Name "Saturation" - SID "966" - Ports [1, 1] - Position [430, 65, 460, 95] - ZOrder -5 - ShowName off - InputPortMap "u0" - UpperLimit "inf" - LowerLimit "-inf" - } - Block { - BlockType Sum - Name "Sum1" - SID "967" - Ports [2, 1] - Position [335, 70, 355, 90] - ZOrder -6 - ShowName off - IconShape "round" - Inputs "|++" - InputSameDT off - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Outport - Name " " - SID "968" - Position [505, 65, 520, 95] - ZOrder -7 - IconDisplay "Port number" - } - Line { - SrcBlock "Sum1" - SrcPort 1 - DstBlock "Saturation" - DstPort 1 - } - Line { - SrcBlock "Integrator" - SrcPort 1 - Points [30, 0] - DstBlock "Sum1" - DstPort 2 - } - Line { - SrcBlock "Gain1" - SrcPort 1 - DstBlock "Sum1" - DstPort 1 - } - Line { - SrcBlock "e" - SrcPort 1 - Points [50, 0] - Branch { - Points [0, 75] - DstBlock "Gain2" - DstPort 1 - } - Branch { - DstBlock "Gain1" - DstPort 1 - } - } - Line { - SrcBlock "Gain2" - SrcPort 1 - DstBlock "Integrator" - DstPort 1 - } - Line { - SrcBlock "Saturation" - SrcPort 1 - DstBlock " " - DstPort 1 - } - } - } - Block { - BlockType SubSystem - Name "PI iq" - SID "969" - Ports [1, 1] - Position [845, 179, 940, 221] - ZOrder -20 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "PI iq" - Location [193, 129, 795, 508] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "e" - SID "970" - Position [30, 65, 45, 95] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Gain - Name "Gain1" - SID "971" - Position [160, 61, 215, 99] - ZOrder -2 - ShowName off - Gain "50" - ParamDataTypeStr "Inherit: Inherit via internal rule" - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Gain - Name "Gain2" - SID "972" - Position [160, 136, 215, 174] - ZOrder -3 - ShowName off - Gain "500" - ParamDataTypeStr "Inherit: Inherit via internal rule" - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Integrator - Name "Integrator" - SID "973" - Ports [1, 1] - Position [280, 140, 310, 170] - ZOrder -4 - ShowName off - } - Block { - BlockType Saturate - Name "Saturation" - SID "974" - Ports [1, 1] - Position [430, 65, 460, 95] - ZOrder -5 - ShowName off - InputPortMap "u0" - UpperLimit "inf" - LowerLimit "-inf" - } - Block { - BlockType Sum - Name "Sum1" - SID "975" - Ports [2, 1] - Position [335, 70, 355, 90] - ZOrder -6 - ShowName off - IconShape "round" - Inputs "|++" - InputSameDT off - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Outport - Name " " - SID "976" - Position [505, 65, 520, 95] - ZOrder -7 - IconDisplay "Port number" - } - Line { - SrcBlock "Saturation" - SrcPort 1 - DstBlock " " - DstPort 1 - } - Line { - SrcBlock "Gain2" - SrcPort 1 - DstBlock "Integrator" - DstPort 1 - } - Line { - SrcBlock "e" - SrcPort 1 - Points [50, 0] - Branch { - DstBlock "Gain1" - DstPort 1 - } - Branch { - Points [0, 75] - DstBlock "Gain2" - DstPort 1 - } - } - Line { - SrcBlock "Gain1" - SrcPort 1 - DstBlock "Sum1" - DstPort 1 - } - Line { - SrcBlock "Integrator" - SrcPort 1 - Points [30, 0] - DstBlock "Sum1" - DstPort 2 - } - Line { - SrcBlock "Sum1" - SrcPort 1 - DstBlock "Saturation" - DstPort 1 - } - } - } - Block { - BlockType SubSystem - Name "PI vd" - SID "977" - Ports [1, 1] - Position [500, 39, 595, 81] - ZOrder -21 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "PI vd" - Location [193, 129, 795, 508] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "e" - SID "978" - Position [30, 65, 45, 95] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Gain - Name "Gain1" - SID "979" - Position [160, 61, 215, 99] - ZOrder -2 - ShowName off - Gain "2" - ParamDataTypeStr "Inherit: Inherit via internal rule" - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Gain - Name "Gain2" - SID "980" - Position [160, 136, 215, 174] - ZOrder -3 - ShowName off - Gain "20" - ParamDataTypeStr "Inherit: Inherit via internal rule" - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Integrator - Name "Integrator" - SID "981" - Ports [1, 1] - Position [280, 140, 310, 170] - ZOrder -4 - ShowName off - } - Block { - BlockType Saturate - Name "Saturation" - SID "982" - Ports [1, 1] - Position [410, 65, 440, 95] - ZOrder -5 - ShowName off - InputPortMap "u0" - UpperLimit "inf" - LowerLimit "-inf" - } - Block { - BlockType Sum - Name "Sum1" - SID "983" - Ports [2, 1] - Position [335, 70, 355, 90] - ZOrder -6 - ShowName off - IconShape "round" - Inputs "|++" - InputSameDT off - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Outport - Name " " - SID "984" - Position [505, 65, 520, 95] - ZOrder -7 - IconDisplay "Port number" - } - Line { - SrcBlock "Saturation" - SrcPort 1 - DstBlock " " - DstPort 1 - } - Line { - SrcBlock "Gain2" - SrcPort 1 - DstBlock "Integrator" - DstPort 1 - } - Line { - SrcBlock "e" - SrcPort 1 - Points [50, 0] - Branch { - DstBlock "Gain1" - DstPort 1 - } - Branch { - Points [0, 75] - DstBlock "Gain2" - DstPort 1 - } - } - Line { - SrcBlock "Gain1" - SrcPort 1 - DstBlock "Sum1" - DstPort 1 - } - Line { - SrcBlock "Integrator" - SrcPort 1 - Points [30, 0] - DstBlock "Sum1" - DstPort 2 - } - Line { - SrcBlock "Sum1" - SrcPort 1 - DstBlock "Saturation" - DstPort 1 - } - } - } - Block { - BlockType SubSystem - Name "PI vq" - SID "985" - Ports [1, 1] - Position [500, 174, 595, 216] - ZOrder -22 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "PI vq" - Location [193, 129, 795, 508] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "e" - SID "986" - Position [30, 65, 45, 95] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Gain - Name "Gain1" - SID "987" - Position [160, 61, 215, 99] - ZOrder -2 - ShowName off - Gain "2" - ParamDataTypeStr "Inherit: Inherit via internal rule" - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Gain - Name "Gain2" - SID "988" - Position [160, 136, 215, 174] - ZOrder -3 - ShowName off - Gain "2" - ParamDataTypeStr "Inherit: Inherit via internal rule" - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Integrator - Name "Integrator" - SID "989" - Ports [1, 1] - Position [280, 140, 310, 170] - ZOrder -4 - ShowName off - } - Block { - BlockType Saturate - Name "Saturation" - SID "990" - Ports [1, 1] - Position [405, 65, 435, 95] - ZOrder -5 - ShowName off - InputPortMap "u0" - UpperLimit "inf" - LowerLimit "-inf" - } - Block { - BlockType Sum - Name "Sum1" - SID "991" - Ports [2, 1] - Position [335, 70, 355, 90] - ZOrder -6 - ShowName off - IconShape "round" - Inputs "|++" - InputSameDT off - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Outport - Name " " - SID "992" - Position [505, 65, 520, 95] - ZOrder -7 - IconDisplay "Port number" - } - Line { - SrcBlock "Sum1" - SrcPort 1 - DstBlock "Saturation" - DstPort 1 - } - Line { - SrcBlock "Integrator" - SrcPort 1 - Points [30, 0] - DstBlock "Sum1" - DstPort 2 - } - Line { - SrcBlock "Gain1" - SrcPort 1 - DstBlock "Sum1" - DstPort 1 - } - Line { - SrcBlock "e" - SrcPort 1 - Points [50, 0] - Branch { - Points [0, 75] - DstBlock "Gain2" - DstPort 1 - } - Branch { - DstBlock "Gain1" - DstPort 1 - } - } - Line { - SrcBlock "Gain2" - SrcPort 1 - DstBlock "Integrator" - DstPort 1 - } - Line { - SrcBlock "Saturation" - SrcPort 1 - DstBlock " " - DstPort 1 - } - } - } - Block { - BlockType SubSystem - Name "PWM" - SID "993" - Ports [1, 1] - Position [1450, 147, 1580, 223] - ZOrder -23 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "PWM" - Location [232, 283, 749, 637] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "Uabc_ref" - SID "994" - Position [25, 43, 55, 57] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Gain - Name "Gain2" - SID "995" - Position [80, 33, 150, 67] - ZOrder -2 - ShowName off - Gain "2/1000" - ParamDataTypeStr "Inherit: Inherit via internal rule" - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Goto - Name "Goto1" - SID "996" - Position [210, 115, 265, 145] - ZOrder -10 - ShowName off - GotoTag "m_index" - TagVisibility "global" - } - Block { - BlockType Goto - Name "Goto2" - SID "997" - Position [365, 115, 420, 145] - ZOrder -10 - ShowName off - GotoTag "pulses" - TagVisibility "global" - } - Block { - BlockType Reference - Name "PWM Generator" - SID "998" - Ports [1, 1] - Position [180, 26, 290, 74] - ZOrder -12 - LibraryVersion "1.664" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib_extras/Control \nBlocks/PWM Generator" - SourceType "PWM Generator" - GeneratorMode "3-arm bridge (6 pulses)" - Fc "10000" - Internal off - mIndex "0.4" - Freq "60" - Phase "0" - } - Block { - BlockType Outport - Name "S" - SID "999" - Position [390, 43, 420, 57] - ZOrder -13 - IconDisplay "Port number" - } - Line { - SrcBlock "PWM Generator" - SrcPort 1 - Points [35, 0] - Branch { - DstBlock "S" - DstPort 1 - } - Branch { - Points [0, 80] - DstBlock "Goto2" - DstPort 1 - } - } - Line { - SrcBlock "Uabc_ref" - SrcPort 1 - DstBlock "Gain2" - DstPort 1 - } - Line { - SrcBlock "Gain2" - SrcPort 1 - Points [5, 0] - Branch { - DstBlock "PWM Generator" - DstPort 1 - } - Branch { - Points [0, 80] - DstBlock "Goto1" - DstPort 1 - } - } - } - } - Block { - BlockType Sum - Name "Sum" - SID "1000" - Ports [2, 1] - Position [460, 50, 480, 70] - ZOrder -24 - ShowName off - IconShape "round" - Inputs "|+-" - InputSameDT off - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Sum - Name "Sum1" - SID "1001" - Ports [2, 1] - Position [445, 185, 465, 205] - ZOrder -25 - ShowName off - IconShape "round" - Inputs "|+-" - InputSameDT off - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Sum - Name "Sum2" - SID "1002" - Ports [2, 1] - Position [795, 50, 815, 70] - ZOrder -26 - ShowName off - IconShape "round" - Inputs "|+-" - InputSameDT off - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Sum - Name "Sum3" - SID "1003" - Ports [2, 1] - Position [770, 190, 790, 210] - ZOrder -27 - ShowName off - IconShape "round" - Inputs "|+-" - InputSameDT off - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Sum - Name "Sum4" - SID "1004" - Ports [3, 1] - Position [1135, 85, 1165, 115] - ZOrder -28 - ShowName off - IconShape "round" - Inputs "+|+|+" - InputSameDT off - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Sum - Name "Sum5" - SID "1005" - Ports [3, 1] - Position [1110, 185, 1140, 215] - ZOrder -29 - ShowName off - IconShape "round" - Inputs "+|+|+" - InputSameDT off - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType SubSystem - Name "Vabc - vdq" - SID "1006" - Ports [2, 2] - Position [225, 323, 350, 452] - ZOrder -30 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Vabc - vdq" - Location [407, 631, 1102, 980] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "Vabc" - SID "1007" - Position [25, 58, 55, 72] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Inport - Name "theta" - SID "1008" - Position [195, 98, 225, 112] - ZOrder -2 - Port "2" - IconDisplay "Port number" - } - Block { - BlockType Demux - Name "Demux" - SID "1009" - Ports [1, 2] - Position [425, 49, 430, 116] - ZOrder -3 - ShowName off - Outputs "2" - DisplayOption "bar" - } - Block { - BlockType Goto - Name "Goto1" - SID "1010" - Position [480, 125, 535, 155] - ZOrder -10 - ShowName off - GotoTag "vq" - TagVisibility "global" - } - Block { - BlockType Goto - Name "Goto3" - SID "1011" - Position [480, 15, 535, 45] - ZOrder -10 - ShowName off - GotoTag "vd" - TagVisibility "global" - } - Block { - BlockType SubSystem - Name "abc - alfa/beta" - SID "1012" - Ports [1, 1] - Position [80, 29, 185, 101] - ZOrder -12 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "abc - alfa/beta" - Location [349, 424, 780, 760] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "abc" - SID "1013" - Position [25, 55, 40, 85] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Mux - Name "Mux" - SID "1014" - Ports [2, 1] - Position [285, 25, 290, 125] - ZOrder -2 - ShowName off - Inputs "2" - DisplayOption "bar" - } - Block { - BlockType Fcn - Name "d_s" - SID "1015" - Position [110, 33, 255, 67] - ZOrder -3 - Expr "(-1/sqrt(3)*u(2))+(1/sqrt(3)*u(3))" - } - Block { - BlockType Fcn - Name "q_s" - SID "1016" - Position [110, 83, 255, 117] - ZOrder -4 - Expr "(2/3)*u(1)-(1/3)*u(2)-(1/3)*u(3)" - } - Block { - BlockType Outport - Name "alfa/beta" - SID "1017" - Position [335, 60, 350, 90] - ZOrder -5 - IconDisplay "Port number" - } - Line { - SrcBlock "Mux" - SrcPort 1 - DstBlock "alfa/beta" - DstPort 1 - } - Line { - SrcBlock "q_s" - SrcPort 1 - DstBlock "Mux" - DstPort 2 - } - Line { - SrcBlock "d_s" - SrcPort 1 - DstBlock "Mux" - DstPort 1 - } - Line { - SrcBlock "abc" - SrcPort 1 - Points [25, 0] - Branch { - Points [0, -20] - DstBlock "d_s" - DstPort 1 - } - Branch { - Points [0, 30] - DstBlock "q_s" - DstPort 1 - } - } - } - } - Block { - BlockType SubSystem - Name "alfa/beta - dq" - SID "1018" - Ports [2, 1] - Position [250, 45, 380, 125] - ZOrder -13 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "alfa/beta - dq" - Location [822, 775, 1323, 1160] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "alfa/beta" - SID "1019" - Position [25, 50, 40, 80] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Inport - Name "theta" - SID "1020" - Position [25, 125, 40, 155] - ZOrder -2 - Port "2" - IconDisplay "Port number" - } - Block { - BlockType Mux - Name "Mux" - SID "1021" - Ports [2, 1] - Position [320, 28, 325, 177] - ZOrder -3 - ShowName off - Inputs "2" - DisplayOption "bar" - } - Block { - BlockType Mux - Name "Mux1" - SID "1022" - Ports [2, 1] - Position [65, 28, 70, 177] - ZOrder -4 - ShowName off - Inputs "2" - DisplayOption "bar" - } - Block { - BlockType Fcn - Name "d" - SID "1023" - Position [115, 47, 275, 83] - ZOrder -5 - Expr "u(2)*sin(u(3)) + u(1)*cos(u(3))" - } - Block { - BlockType Fcn - Name "q" - SID "1024" - Position [115, 123, 280, 157] - ZOrder -6 - Expr "-u(1)*sin(u(3)) + u(2)*cos(u(3))" - } - Block { - BlockType Outport - Name "d/q" - SID "1025" - Position [360, 90, 375, 120] - ZOrder -7 - IconDisplay "Port number" - } - Line { - SrcBlock "Mux1" - SrcPort 1 - Points [25, 0] - Branch { - DstBlock "q" - DstPort 1 - } - Branch { - DstBlock "d" - DstPort 1 - } - } - Line { - SrcBlock "theta" - SrcPort 1 - DstBlock "Mux1" - DstPort 2 - } - Line { - SrcBlock "alfa/beta" - SrcPort 1 - DstBlock "Mux1" - DstPort 1 - } - Line { - SrcBlock "Mux" - SrcPort 1 - DstBlock "d/q" - DstPort 1 - } - Line { - SrcBlock "q" - SrcPort 1 - DstBlock "Mux" - DstPort 2 - } - Line { - SrcBlock "d" - SrcPort 1 - DstBlock "Mux" - DstPort 1 - } - } - } - Block { - BlockType Outport - Name "vq" - SID "1026" - Position [540, 103, 570, 117] - ZOrder -14 - IconDisplay "Port number" - } - Block { - BlockType Outport - Name "vd" - SID "1027" - Position [540, 48, 570, 62] - ZOrder -15 - Port "2" - IconDisplay "Port number" - } - Line { - SrcBlock "Demux" - SrcPort 2 - Points [10, 0; 0, 10] - Branch { - DstBlock "vq" - DstPort 1 - } - Branch { - Points [0, 30] - DstBlock "Goto1" - DstPort 1 - } - } - Line { - SrcBlock "Demux" - SrcPort 1 - Points [10, 0; 0, -10] - Branch { - DstBlock "vd" - DstPort 1 - } - Branch { - Points [0, -25] - DstBlock "Goto3" - DstPort 1 - } - } - Line { - SrcBlock "alfa/beta - dq" - SrcPort 1 - DstBlock "Demux" - DstPort 1 - } - Line { - SrcBlock "abc - alfa/beta" - SrcPort 1 - DstBlock "alfa/beta - dq" - DstPort 1 - } - Line { - SrcBlock "Vabc" - SrcPort 1 - DstBlock "abc - alfa/beta" - DstPort 1 - } - Line { - SrcBlock "theta" - SrcPort 1 - DstBlock "alfa/beta - dq" - DstPort 2 - } - } - } - Block { - BlockType SubSystem - Name "Vabc - vdq1" - SID "2312" - Ports [2, 2] - Position [1165, 548, 1290, 677] - ZOrder -31 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Vabc - vdq1" - Location [407, 631, 1102, 980] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "Vabc" - SID "2313" - Position [25, 58, 55, 72] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Inport - Name "theta" - SID "2314" - Position [195, 98, 225, 112] - ZOrder -2 - Port "2" - IconDisplay "Port number" - } - Block { - BlockType Demux - Name "Demux" - SID "2315" - Ports [1, 2] - Position [425, 49, 430, 116] - ZOrder -3 - ShowName off - Outputs "2" - DisplayOption "bar" - } - Block { - BlockType Goto - Name "Goto1" - SID "2316" - Position [480, 125, 535, 155] - ZOrder -10 - ShowName off - GotoTag "vq2" - TagVisibility "global" - } - Block { - BlockType Goto - Name "Goto3" - SID "2317" - Position [480, 15, 535, 45] - ZOrder -10 - ShowName off - GotoTag "vd2" - TagVisibility "global" - } - Block { - BlockType SubSystem - Name "abc - alfa/beta" - SID "2318" - Ports [1, 1] - Position [80, 29, 185, 101] - ZOrder -12 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "abc - alfa/beta" - Location [349, 424, 780, 760] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "abc" - SID "2319" - Position [25, 55, 40, 85] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Mux - Name "Mux" - SID "2320" - Ports [2, 1] - Position [285, 25, 290, 125] - ZOrder -2 - ShowName off - Inputs "2" - DisplayOption "bar" - } - Block { - BlockType Fcn - Name "d_s" - SID "2321" - Position [110, 33, 255, 67] - ZOrder -3 - Expr "(-1/sqrt(3)*u(2))+(1/sqrt(3)*u(3))" - } - Block { - BlockType Fcn - Name "q_s" - SID "2322" - Position [110, 83, 255, 117] - ZOrder -4 - Expr "(2/3)*u(1)-(1/3)*u(2)-(1/3)*u(3)" - } - Block { - BlockType Outport - Name "alfa/beta" - SID "2323" - Position [335, 60, 350, 90] - ZOrder -5 - IconDisplay "Port number" - } - Line { - SrcBlock "abc" - SrcPort 1 - Points [25, 0] - Branch { - Points [0, 30] - DstBlock "q_s" - DstPort 1 - } - Branch { - Points [0, -20] - DstBlock "d_s" - DstPort 1 - } - } - Line { - SrcBlock "d_s" - SrcPort 1 - DstBlock "Mux" - DstPort 1 - } - Line { - SrcBlock "q_s" - SrcPort 1 - DstBlock "Mux" - DstPort 2 - } - Line { - SrcBlock "Mux" - SrcPort 1 - DstBlock "alfa/beta" - DstPort 1 - } - } - } - Block { - BlockType SubSystem - Name "alfa/beta - dq" - SID "2324" - Ports [2, 1] - Position [250, 45, 380, 125] - ZOrder -13 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "alfa/beta - dq" - Location [822, 775, 1323, 1160] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "alfa/beta" - SID "2325" - Position [25, 50, 40, 80] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Inport - Name "theta" - SID "2326" - Position [25, 125, 40, 155] - ZOrder -2 - Port "2" - IconDisplay "Port number" - } - Block { - BlockType Mux - Name "Mux" - SID "2327" - Ports [2, 1] - Position [320, 28, 325, 177] - ZOrder -3 - ShowName off - Inputs "2" - DisplayOption "bar" - } - Block { - BlockType Mux - Name "Mux1" - SID "2328" - Ports [2, 1] - Position [65, 28, 70, 177] - ZOrder -4 - ShowName off - Inputs "2" - DisplayOption "bar" - } - Block { - BlockType Fcn - Name "d" - SID "2329" - Position [115, 47, 275, 83] - ZOrder -5 - Expr "u(2)*sin(u(3)) + u(1)*cos(u(3))" - } - Block { - BlockType Fcn - Name "q" - SID "2330" - Position [115, 123, 280, 157] - ZOrder -6 - Expr "-u(1)*sin(u(3)) + u(2)*cos(u(3))" - } - Block { - BlockType Outport - Name "d/q" - SID "2331" - Position [360, 90, 375, 120] - ZOrder -7 - IconDisplay "Port number" - } - Line { - SrcBlock "d" - SrcPort 1 - DstBlock "Mux" - DstPort 1 - } - Line { - SrcBlock "q" - SrcPort 1 - DstBlock "Mux" - DstPort 2 - } - Line { - SrcBlock "Mux" - SrcPort 1 - DstBlock "d/q" - DstPort 1 - } - Line { - SrcBlock "alfa/beta" - SrcPort 1 - DstBlock "Mux1" - DstPort 1 - } - Line { - SrcBlock "theta" - SrcPort 1 - DstBlock "Mux1" - DstPort 2 - } - Line { - SrcBlock "Mux1" - SrcPort 1 - Points [25, 0] - Branch { - DstBlock "d" - DstPort 1 - } - Branch { - DstBlock "q" - DstPort 1 - } - } - } - } - Block { - BlockType Outport - Name "vq" - SID "2332" - Position [540, 103, 570, 117] - ZOrder -14 - IconDisplay "Port number" - } - Block { - BlockType Outport - Name "vd" - SID "2333" - Position [540, 48, 570, 62] - ZOrder -15 - Port "2" - IconDisplay "Port number" - } - Line { - SrcBlock "theta" - SrcPort 1 - DstBlock "alfa/beta - dq" - DstPort 2 - } - Line { - SrcBlock "Vabc" - SrcPort 1 - DstBlock "abc - alfa/beta" - DstPort 1 - } - Line { - SrcBlock "abc - alfa/beta" - SrcPort 1 - DstBlock "alfa/beta - dq" - DstPort 1 - } - Line { - SrcBlock "alfa/beta - dq" - SrcPort 1 - DstBlock "Demux" - DstPort 1 - } - Line { - SrcBlock "Demux" - SrcPort 1 - Points [10, 0; 0, -10] - Branch { - Points [0, -25] - DstBlock "Goto3" - DstPort 1 - } - Branch { - DstBlock "vd" - DstPort 1 - } - } - Line { - SrcBlock "Demux" - SrcPort 2 - Points [10, 0; 0, 10] - Branch { - Points [0, 30] - DstBlock "Goto1" - DstPort 1 - } - Branch { - DstBlock "vq" - DstPort 1 - } - } - } - } - Block { - BlockType SubSystem - Name "Vabc - vdq2" - SID "2334" - Ports [2, 2] - Position [1515, 553, 1640, 682] - ZOrder -32 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Vabc - vdq2" - Location [407, 631, 1102, 980] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "Vabc" - SID "2335" - Position [25, 58, 55, 72] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Inport - Name "theta" - SID "2336" - Position [195, 98, 225, 112] - ZOrder -2 - Port "2" - IconDisplay "Port number" - } - Block { - BlockType Demux - Name "Demux" - SID "2337" - Ports [1, 2] - Position [425, 49, 430, 116] - ZOrder -3 - ShowName off - Outputs "2" - DisplayOption "bar" - } - Block { - BlockType Goto - Name "Goto1" - SID "2338" - Position [480, 125, 535, 155] - ZOrder -10 - ShowName off - GotoTag "vq3" - TagVisibility "global" - } - Block { - BlockType Goto - Name "Goto3" - SID "2339" - Position [480, 15, 535, 45] - ZOrder -10 - ShowName off - GotoTag "vd3" - TagVisibility "global" - } - Block { - BlockType SubSystem - Name "abc - alfa/beta" - SID "2340" - Ports [1, 1] - Position [80, 29, 185, 101] - ZOrder -12 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "abc - alfa/beta" - Location [349, 424, 780, 760] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "abc" - SID "2341" - Position [25, 55, 40, 85] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Mux - Name "Mux" - SID "2342" - Ports [2, 1] - Position [285, 25, 290, 125] - ZOrder -2 - ShowName off - Inputs "2" - DisplayOption "bar" - } - Block { - BlockType Fcn - Name "d_s" - SID "2343" - Position [110, 33, 255, 67] - ZOrder -3 - Expr "(-1/sqrt(3)*u(2))+(1/sqrt(3)*u(3))" - } - Block { - BlockType Fcn - Name "q_s" - SID "2344" - Position [110, 83, 255, 117] - ZOrder -4 - Expr "(2/3)*u(1)-(1/3)*u(2)-(1/3)*u(3)" - } - Block { - BlockType Outport - Name "alfa/beta" - SID "2345" - Position [335, 60, 350, 90] - ZOrder -5 - IconDisplay "Port number" - } - Line { - SrcBlock "Mux" - SrcPort 1 - DstBlock "alfa/beta" - DstPort 1 - } - Line { - SrcBlock "q_s" - SrcPort 1 - DstBlock "Mux" - DstPort 2 - } - Line { - SrcBlock "d_s" - SrcPort 1 - DstBlock "Mux" - DstPort 1 - } - Line { - SrcBlock "abc" - SrcPort 1 - Points [25, 0] - Branch { - Points [0, -20] - DstBlock "d_s" - DstPort 1 - } - Branch { - Points [0, 30] - DstBlock "q_s" - DstPort 1 - } - } - } - } - Block { - BlockType SubSystem - Name "alfa/beta - dq" - SID "2346" - Ports [2, 1] - Position [250, 45, 380, 125] - ZOrder -13 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "alfa/beta - dq" - Location [822, 775, 1323, 1160] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "alfa/beta" - SID "2347" - Position [25, 50, 40, 80] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Inport - Name "theta" - SID "2348" - Position [25, 125, 40, 155] - ZOrder -2 - Port "2" - IconDisplay "Port number" - } - Block { - BlockType Mux - Name "Mux" - SID "2349" - Ports [2, 1] - Position [320, 28, 325, 177] - ZOrder -3 - ShowName off - Inputs "2" - DisplayOption "bar" - } - Block { - BlockType Mux - Name "Mux1" - SID "2350" - Ports [2, 1] - Position [65, 28, 70, 177] - ZOrder -4 - ShowName off - Inputs "2" - DisplayOption "bar" - } - Block { - BlockType Fcn - Name "d" - SID "2351" - Position [115, 47, 275, 83] - ZOrder -5 - Expr "u(2)*sin(u(3)) + u(1)*cos(u(3))" - } - Block { - BlockType Fcn - Name "q" - SID "2352" - Position [115, 123, 280, 157] - ZOrder -6 - Expr "-u(1)*sin(u(3)) + u(2)*cos(u(3))" - } - Block { - BlockType Outport - Name "d/q" - SID "2353" - Position [360, 90, 375, 120] - ZOrder -7 - IconDisplay "Port number" - } - Line { - SrcBlock "Mux1" - SrcPort 1 - Points [25, 0] - Branch { - DstBlock "q" - DstPort 1 - } - Branch { - DstBlock "d" - DstPort 1 - } - } - Line { - SrcBlock "theta" - SrcPort 1 - DstBlock "Mux1" - DstPort 2 - } - Line { - SrcBlock "alfa/beta" - SrcPort 1 - DstBlock "Mux1" - DstPort 1 - } - Line { - SrcBlock "Mux" - SrcPort 1 - DstBlock "d/q" - DstPort 1 - } - Line { - SrcBlock "q" - SrcPort 1 - DstBlock "Mux" - DstPort 2 - } - Line { - SrcBlock "d" - SrcPort 1 - DstBlock "Mux" - DstPort 1 - } - } - } - Block { - BlockType Outport - Name "vq" - SID "2354" - Position [540, 103, 570, 117] - ZOrder -14 - IconDisplay "Port number" - } - Block { - BlockType Outport - Name "vd" - SID "2355" - Position [540, 48, 570, 62] - ZOrder -15 - Port "2" - IconDisplay "Port number" - } - Line { - SrcBlock "Demux" - SrcPort 2 - Points [10, 0; 0, 10] - Branch { - DstBlock "vq" - DstPort 1 - } - Branch { - Points [0, 30] - DstBlock "Goto1" - DstPort 1 - } - } - Line { - SrcBlock "Demux" - SrcPort 1 - Points [10, 0; 0, -10] - Branch { - DstBlock "vd" - DstPort 1 - } - Branch { - Points [0, -25] - DstBlock "Goto3" - DstPort 1 - } - } - Line { - SrcBlock "alfa/beta - dq" - SrcPort 1 - DstBlock "Demux" - DstPort 1 - } - Line { - SrcBlock "abc - alfa/beta" - SrcPort 1 - DstBlock "alfa/beta - dq" - DstPort 1 - } - Line { - SrcBlock "Vabc" - SrcPort 1 - DstBlock "abc - alfa/beta" - DstPort 1 - } - Line { - SrcBlock "theta" - SrcPort 1 - DstBlock "alfa/beta - dq" - DstPort 2 - } - } - } - Block { - BlockType SubSystem - Name "Vabc* - vdq*" - SID "1028" - Ports [2, 2] - Position [225, 63, 350, 192] - ZOrder -33 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Vabc* - vdq*" - Location [407, 631, 1103, 988] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "Vabc*" - SID "1029" - Position [25, 58, 55, 72] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Inport - Name "theta" - SID "1030" - Position [195, 98, 225, 112] - ZOrder -2 - Port "2" - IconDisplay "Port number" - } - Block { - BlockType Demux - Name "Demux" - SID "1031" - Ports [1, 2] - Position [425, 49, 430, 116] - ZOrder -3 - ShowName off - Outputs "2" - DisplayOption "bar" - } - Block { - BlockType Goto - Name "Goto1" - SID "1032" - Position [465, 125, 520, 155] - ZOrder -10 - ShowName off - GotoTag "vq_ref" - TagVisibility "global" - } - Block { - BlockType Goto - Name "Goto3" - SID "1033" - Position [465, 15, 520, 45] - ZOrder -10 - ShowName off - GotoTag "vd_ref" - TagVisibility "global" - } - Block { - BlockType SubSystem - Name "abc - alfa/beta" - SID "1034" - Ports [1, 1] - Position [80, 29, 185, 101] - ZOrder -12 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "abc - alfa/beta" - Location [349, 424, 780, 760] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "abc" - SID "1035" - Position [25, 55, 40, 85] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Mux - Name "Mux" - SID "1036" - Ports [2, 1] - Position [285, 25, 290, 125] - ZOrder -2 - ShowName off - Inputs "2" - DisplayOption "bar" - } - Block { - BlockType Fcn - Name "d_s" - SID "1037" - Position [110, 33, 255, 67] - ZOrder -3 - Expr "(-1/sqrt(3)*u(2))+(1/sqrt(3)*u(3))" - } - Block { - BlockType Fcn - Name "q_s" - SID "1038" - Position [110, 83, 255, 117] - ZOrder -4 - Expr "(2/3)*u(1)-(1/3)*u(2)-(1/3)*u(3)" - } - Block { - BlockType Outport - Name "alfa/beta" - SID "1039" - Position [335, 60, 350, 90] - ZOrder -5 - IconDisplay "Port number" - } - Line { - SrcBlock "abc" - SrcPort 1 - Points [25, 0] - Branch { - Points [0, 30] - DstBlock "q_s" - DstPort 1 - } - Branch { - Points [0, -20] - DstBlock "d_s" - DstPort 1 - } - } - Line { - SrcBlock "d_s" - SrcPort 1 - DstBlock "Mux" - DstPort 1 - } - Line { - SrcBlock "q_s" - SrcPort 1 - DstBlock "Mux" - DstPort 2 - } - Line { - SrcBlock "Mux" - SrcPort 1 - DstBlock "alfa/beta" - DstPort 1 - } - } - } - Block { - BlockType SubSystem - Name "alfa/beta - dq" - SID "1040" - Ports [2, 1] - Position [250, 45, 380, 125] - ZOrder -13 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "alfa/beta - dq" - Location [822, 775, 1323, 1160] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "alfa/beta" - SID "1041" - Position [25, 50, 40, 80] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Inport - Name "theta" - SID "1042" - Position [25, 125, 40, 155] - ZOrder -2 - Port "2" - IconDisplay "Port number" - } - Block { - BlockType Mux - Name "Mux" - SID "1043" - Ports [2, 1] - Position [320, 28, 325, 177] - ZOrder -3 - ShowName off - Inputs "2" - DisplayOption "bar" - } - Block { - BlockType Mux - Name "Mux1" - SID "1044" - Ports [2, 1] - Position [65, 28, 70, 177] - ZOrder -4 - ShowName off - Inputs "2" - DisplayOption "bar" - } - Block { - BlockType Fcn - Name "d" - SID "1045" - Position [115, 47, 275, 83] - ZOrder -5 - Expr "u(2)*sin(u(3)) + u(1)*cos(u(3))" - } - Block { - BlockType Fcn - Name "q" - SID "1046" - Position [115, 123, 280, 157] - ZOrder -6 - Expr "-u(1)*sin(u(3)) + u(2)*cos(u(3))" - } - Block { - BlockType Outport - Name "d/q" - SID "1047" - Position [360, 90, 375, 120] - ZOrder -7 - IconDisplay "Port number" - } - Line { - SrcBlock "d" - SrcPort 1 - DstBlock "Mux" - DstPort 1 - } - Line { - SrcBlock "q" - SrcPort 1 - DstBlock "Mux" - DstPort 2 - } - Line { - SrcBlock "Mux" - SrcPort 1 - DstBlock "d/q" - DstPort 1 - } - Line { - SrcBlock "alfa/beta" - SrcPort 1 - DstBlock "Mux1" - DstPort 1 - } - Line { - SrcBlock "theta" - SrcPort 1 - DstBlock "Mux1" - DstPort 2 - } - Line { - SrcBlock "Mux1" - SrcPort 1 - Points [25, 0] - Branch { - DstBlock "d" - DstPort 1 - } - Branch { - DstBlock "q" - DstPort 1 - } - } - } - } - Block { - BlockType Outport - Name "vd*" - SID "1048" - Position [535, 48, 565, 62] - ZOrder -14 - IconDisplay "Port number" - } - Block { - BlockType Outport - Name "vq*" - SID "1049" - Position [535, 103, 565, 117] - ZOrder -15 - Port "2" - IconDisplay "Port number" - } - Line { - SrcBlock "theta" - SrcPort 1 - DstBlock "alfa/beta - dq" - DstPort 2 - } - Line { - SrcBlock "Vabc*" - SrcPort 1 - DstBlock "abc - alfa/beta" - DstPort 1 - } - Line { - SrcBlock "abc - alfa/beta" - SrcPort 1 - DstBlock "alfa/beta - dq" - DstPort 1 - } - Line { - SrcBlock "alfa/beta - dq" - SrcPort 1 - DstBlock "Demux" - DstPort 1 - } - Line { - SrcBlock "Demux" - SrcPort 1 - Points [10, 0; 0, -10] - Branch { - DstBlock "vd*" - DstPort 1 - } - Branch { - Points [0, -25] - DstBlock "Goto3" - DstPort 1 - } - } - Line { - SrcBlock "Demux" - SrcPort 2 - Points [10, 0; 0, 10] - Branch { - DstBlock "vq*" - DstPort 1 - } - Branch { - Points [0, 30] - DstBlock "Goto1" - DstPort 1 - } - } - } - } - Block { - BlockType SubSystem - Name "vdq - Vabc" - SID "1050" - Ports [2, 1] - Position [1290, 117, 1415, 248] - ZOrder -34 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "vdq - Vabc" - Location [943, 571, 1464, 876] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "Ud/Uq" - SID "1051" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Inport - Name "theta" - SID "1052" - Position [25, 73, 55, 87] - ZOrder -2 - Port "2" - IconDisplay "Port number" - } - Block { - BlockType SubSystem - Name "alfa/beta - abc" - SID "1053" - Ports [1, 1] - Position [260, 32, 385, 98] - ZOrder -3 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "alfa/beta - abc" - Location [393, 140, 988, 633] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "alfa/beta" - SID "1054" - Position [15, 195, 30, 225] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Goto - Name "Goto1" - SID "1055" - Position [390, 85, 450, 115] - ZOrder -2 - ShowName off - GotoTag "Vcc_ref" - TagVisibility "global" - } - Block { - BlockType Goto - Name "Goto2" - SID "1056" - Position [390, 50, 450, 80] - ZOrder -3 - ShowName off - GotoTag "Vcb_ref" - TagVisibility "global" - } - Block { - BlockType Goto - Name "Goto3" - SID "1057" - Position [390, 15, 450, 45] - ZOrder -4 - ShowName off - GotoTag "Vca_ref" - TagVisibility "global" - } - Block { - BlockType Mux - Name "Mux" - SID "1058" - Ports [3, 1] - Position [360, 136, 365, 284] - ZOrder -5 - ShowName off - Inputs "3" - DisplayOption "bar" - } - Block { - BlockType Fcn - Name "a" - SID "1059" - Position [155, 145, 215, 175] - ZOrder -6 - Expr "u[2]" - } - Block { - BlockType Fcn - Name "b" - SID "1060" - Position [115, 193, 255, 227] - ZOrder -7 - Expr "-sqrt(3)/2*u[1]-0.5*u[2]" - } - Block { - BlockType Fcn - Name "c" - SID "1061" - Position [115, 244, 255, 276] - ZOrder -8 - Expr "sqrt(3)/2*u[1]-0.5*u[2]" - } - Block { - BlockType Outport - Name "abc" - SID "1062" - Position [410, 195, 425, 225] - ZOrder -9 - IconDisplay "Port number" - } - Line { - SrcBlock "alfa/beta" - SrcPort 1 - Points [60, 0] - Branch { - Points [0, 50] - DstBlock "c" - DstPort 1 - } - Branch { - Points [0, -50] - DstBlock "a" - DstPort 1 - } - Branch { - DstBlock "b" - DstPort 1 - } - } - Line { - SrcBlock "Mux" - SrcPort 1 - DstBlock "abc" - DstPort 1 - } - Line { - SrcBlock "c" - SrcPort 1 - Points [50, 0] - Branch { - DstBlock "Mux" - DstPort 3 - } - Branch { - Points [0, -160] - DstBlock "Goto1" - DstPort 1 - } - } - Line { - SrcBlock "b" - SrcPort 1 - Points [25, 0] - Branch { - DstBlock "Mux" - DstPort 2 - } - Branch { - Points [0, -145] - DstBlock "Goto2" - DstPort 1 - } - } - Line { - SrcBlock "a" - SrcPort 1 - Points [40, 0] - Branch { - DstBlock "Mux" - DstPort 1 - } - Branch { - Points [0, -130] - DstBlock "Goto3" - DstPort 1 - } - } - } - } - Block { - BlockType SubSystem - Name "d/q - alfa/beta" - SID "1063" - Ports [2, 1] - Position [80, 29, 205, 96] - ZOrder -4 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "d/q - alfa/beta" - Location [499, 264, 961, 647] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "d/q" - SID "1064" - Position [40, 50, 55, 80] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Inport - Name "tita" - SID "1065" - Position [40, 125, 55, 155] - ZOrder -2 - Port "2" - IconDisplay "Port number" - } - Block { - BlockType Mux - Name "Mux" - SID "1066" - Ports [2, 1] - Position [320, 28, 325, 177] - ZOrder -3 - ShowName off - Inputs "2" - DisplayOption "bar" - } - Block { - BlockType Mux - Name "Mux1" - SID "1067" - Ports [2, 1] - Position [80, 28, 85, 177] - ZOrder -4 - ShowName off - Inputs "2" - DisplayOption "bar" - } - Block { - BlockType Fcn - Name "a" - SID "1068" - Position [130, 48, 295, 82] - ZOrder -5 - ShowName off - Expr "-u[2]*sin(u[3]) + u[1]*cos(u[3])" - } - Block { - BlockType Fcn - Name "b" - SID "1069" - Position [135, 122, 295, 158] - ZOrder -6 - ShowName off - Expr "u[1]*sin(u[3]) + u[2]*cos(u[3])" - } - Block { - BlockType Outport - Name "alfa/beta" - SID "1070" - Position [355, 90, 370, 120] - ZOrder -7 - IconDisplay "Port number" - } - Line { - SrcBlock "Mux1" - SrcPort 1 - Points [25, 0] - Branch { - Points [0, 35] - DstBlock "b" - DstPort 1 - } - Branch { - DstBlock "a" - DstPort 1 - } - } - Line { - SrcBlock "tita" - SrcPort 1 - DstBlock "Mux1" - DstPort 2 - } - Line { - SrcBlock "d/q" - SrcPort 1 - DstBlock "Mux1" - DstPort 1 - } - Line { - SrcBlock "a" - SrcPort 1 - DstBlock "Mux" - DstPort 1 - } - Line { - SrcBlock "b" - SrcPort 1 - DstBlock "Mux" - DstPort 2 - } - Line { - SrcBlock "Mux" - SrcPort 1 - DstBlock "alfa/beta" - DstPort 1 - } - } - } - Block { - BlockType Outport - Name "Uabc_ref" - SID "1071" - Position [410, 58, 440, 72] - ZOrder -5 - IconDisplay "Port number" - } - Line { - SrcBlock "d/q - alfa/beta" - SrcPort 1 - DstBlock "alfa/beta - abc" - DstPort 1 - } - Line { - SrcBlock "Ud/Uq" - SrcPort 1 - DstBlock "d/q - alfa/beta" - DstPort 1 - } - Line { - SrcBlock "alfa/beta - abc" - SrcPort 1 - DstBlock "Uabc_ref" - DstPort 1 - } - Line { - SrcBlock "theta" - SrcPort 1 - DstBlock "d/q - alfa/beta" - DstPort 2 - } - } - } - Block { - BlockType Outport - Name "S" - SID "1072" - Position [1615, 178, 1645, 192] - ZOrder -35 - IconDisplay "Port number" - } - Line { - SrcBlock "From" - SrcPort 1 - DstBlock "Vabc - vdq" - DstPort 1 - } - Line { - SrcBlock "From1" - SrcPort 1 - DstBlock "Iabc - idq" - DstPort 1 - } - Line { - SrcBlock "Sum2" - SrcPort 1 - DstBlock "PI id" - DstPort 1 - } - Line { - SrcBlock "Sum3" - SrcPort 1 - DstBlock "PI iq" - DstPort 1 - } - Line { - SrcBlock "Mux1" - SrcPort 1 - DstBlock "vdq - Vabc" - DstPort 1 - } - Line { - SrcBlock "vdq - Vabc" - SrcPort 1 - DstBlock "PWM" - DstPort 1 - } - Line { - SrcBlock "PWM" - SrcPort 1 - DstBlock "S" - DstPort 1 - } - Line { - SrcBlock "Vabc - vdq" - SrcPort 2 - DstBlock "LPF vd" - DstPort 1 - } - Line { - SrcBlock "Iabc - idq" - SrcPort 1 - DstBlock "LPF iq" - DstPort 1 - } - Line { - SrcBlock "Iabc - idq" - SrcPort 2 - DstBlock "LPF id" - DstPort 1 - } - Line { - SrcBlock "LPF vd" - SrcPort 1 - Points [40, 0] - Branch { - DstBlock "Sum" - DstPort 2 - } - Branch { - Points [680, 0] - DstBlock "Sum4" - DstPort 3 - } - } - Line { - SrcBlock "LPF vq" - SrcPort 1 - Points [25, 0] - Branch { - DstBlock "Sum1" - DstPort 2 - } - Branch { - Points [670, 0] - DstBlock "Sum5" - DstPort 3 - } - } - Line { - SrcBlock "LPF iq" - SrcPort 1 - Points [350, 0] - DstBlock "Sum3" - DstPort 2 - } - Line { - SrcBlock "LPF id" - SrcPort 1 - Points [375, 0] - DstBlock "Sum2" - DstPort 2 - } - Line { - SrcBlock "Sum" - SrcPort 1 - DstBlock "PI vd" - DstPort 1 - } - Line { - SrcBlock "Sum1" - SrcPort 1 - DstBlock "PI vq" - DstPort 1 - } - Line { - SrcBlock "Vabc - vdq" - SrcPort 1 - DstBlock "LPF vq" - DstPort 1 - } - Line { - SrcBlock "Vabc* - vdq*" - SrcPort 1 - Points [25, 0; 0, -35] - DstBlock "Sum" - DstPort 1 - } - Line { - SrcBlock "Vabc* - vdq*" - SrcPort 2 - Points [25, 0; 0, 35] - DstBlock "Sum1" - DstPort 1 - } - Line { - SrcBlock " Voltage Reference Generator" - SrcPort 1 - DstBlock "Vabc* - vdq*" - DstPort 1 - } - Line { - SrcBlock "Frequency Reference Generator" - SrcPort 1 - Points [20, 0] - Branch { - DstBlock "Vabc* - vdq*" - DstPort 2 - } - Branch { - Points [0, 120] - Branch { - Points [0, 140] - Branch { - DstBlock "Vabc - vdq" - DstPort 2 - } - Branch { - Points [0, 160] - DstBlock "Iabc - idq" - DstPort 2 - } - } - Branch { - Points [1075, 0] - Branch { - Points [0, -65] - DstBlock "vdq - Vabc" - DstPort 2 - } - Branch { - Points [0, 195] - Branch { - Points [70, 0; 0, 175] - Branch { - DstBlock "Vabc - vdq2" - DstPort 2 - } - Branch { - Points [0, 160] - DstBlock "Iabc - idq2" - DstPort 2 - } - } - Branch { - Points [-150, 0; 0, 170] - Branch { - Points [0, 160] - DstBlock "Iabc - idq1" - DstPort 2 - } - Branch { - DstBlock "Vabc - vdq1" - DstPort 2 - } - } - } - } - } - } - Line { - SrcBlock "PI vd" - SrcPort 1 - Points [15, 0] - DstBlock "Current Ref. Generator" - DstPort 1 - } - Line { - SrcBlock "PI vq" - SrcPort 1 - Points [15, 0] - DstBlock "Current Ref. Generator" - DstPort 2 - } - Line { - SrcBlock "Current Ref. Generator" - SrcPort 2 - Points [10, 0] - Branch { - Points [0, 45] - DstBlock "Sum3" - DstPort 1 - } - Branch { - DstBlock "Cross Terms" - DstPort 2 - } - } - Line { - SrcBlock "Current Ref. Generator" - SrcPort 1 - Points [10, 0] - Branch { - Points [0, -40] - DstBlock "Sum2" - DstPort 1 - } - Branch { - DstBlock "Cross Terms" - DstPort 1 - } - } - Line { - SrcBlock "PI iq" - SrcPort 1 - DstBlock "Sum5" - DstPort 2 - } - Line { - SrcBlock "PI id" - SrcPort 1 - Points [205, 0] - DstBlock "Sum4" - DstPort 1 - } - Line { - SrcBlock "Cross Terms" - SrcPort 1 - DstBlock "Sum4" - DstPort 2 - } - Line { - SrcBlock "Cross Terms" - SrcPort 2 - Points [50, 0] - DstBlock "Sum5" - DstPort 1 - } - Line { - SrcBlock "Sum5" - SrcPort 1 - DstBlock "Mux1" - DstPort 2 - } - Line { - SrcBlock "Sum4" - SrcPort 1 - DstBlock "Mux1" - DstPort 1 - } - Line { - SrcBlock "From2" - SrcPort 1 - DstBlock "Vabc - vdq1" - DstPort 1 - } - Line { - SrcBlock "From3" - SrcPort 1 - DstBlock "Iabc - idq1" - DstPort 1 - } - Line { - SrcBlock "From4" - SrcPort 1 - DstBlock "Vabc - vdq2" - DstPort 1 - } - Line { - SrcBlock "From5" - SrcPort 1 - DstBlock "Iabc - idq2" - DstPort 1 - } - Annotation { - SID "2555" - Name "Ud" - Position [1189, 93] - ZOrder -1 - } - Annotation { - SID "2556" - Name "Uq" - Position [1194, 188] - ZOrder -2 - } - } - } - Block { - BlockType PMIOPort - Name "+" - SID "1073" - Position [25, 188, 55, 202] - ZOrder -4 - Port "1" - Side "Right" - } - Block { - BlockType PMIOPort - Name "A" - SID "1074" - Position [450, 208, 480, 222] - ZOrder -5 - BlockMirror on - Port "2" - Side "Left" - } - Block { - BlockType PMIOPort - Name "B" - SID "1075" - Position [450, 248, 480, 262] - ZOrder -6 - BlockMirror on - Port "3" - Side "Left" - } - Block { - BlockType PMIOPort - Name "-" - SID "1076" - Position [25, 268, 55, 282] - ZOrder -7 - Port "4" - Side "Right" - } - Block { - BlockType PMIOPort - Name "C" - SID "1077" - Position [450, 288, 480, 302] - ZOrder -8 - BlockMirror on - Port "5" - Side "Left" - } - Line { - SrcBlock "Inverter Control" - SrcPort 1 - Points [20, 0; 0, 110] - DstBlock "DC / AC Inverter" - DstPort 1 - } - Line { - LineType "Connection" - SrcBlock "A" - SrcPort RConn1 - DstBlock "DC / AC Inverter" - DstPort LConn1 - } - Line { - LineType "Connection" - SrcBlock "B" - SrcPort RConn1 - DstBlock "DC / AC Inverter" - DstPort LConn2 - } - Line { - LineType "Connection" - SrcBlock "C" - SrcPort RConn1 - DstBlock "DC / AC Inverter" - DstPort LConn3 - } - Line { - LineType "Connection" - SrcBlock "DC BUS " - SrcPort LConn2 - DstBlock "DC / AC Inverter" - DstPort RConn2 - } - Line { - LineType "Connection" - SrcBlock "DC BUS " - SrcPort LConn1 - DstBlock "DC / AC Inverter" - DstPort RConn1 - } - Line { - LineType "Connection" - SrcBlock "+" - SrcPort RConn1 - DstBlock "DC BUS " - DstPort RConn1 - } - Line { - LineType "Connection" - SrcBlock "-" - SrcPort RConn1 - DstBlock "DC BUS " - DstPort RConn2 - } - } - } - Block { - BlockType SubSystem - Name "PV Array" - SID "802" - Ports [0, 0, 0, 0, 0, 0, 2] - Position [295, 433, 445, 577] - ZOrder -7 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - Object { - $PropName "MaskObject" - $ObjectID 27 - $ClassName "Simulink.Mask" - Display "image(imread('photo.bmp'))" - } - System { - Name "PV Array" - Location [-8, 0, 1604, 876] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Reference - Name "Cdc1" - SID "803" - Ports [0, 0, 0, 0, 0, 1, 1] - Position [1636, 590, 1664, 660] - ZOrder -1 - BlockRotation 270 - BlockMirror on - NamePlacement "alternate" - ShowName off - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Elements/Series RLC Branch" - SourceType "Series RLC Branch" - LConnTagsString "__new0" - RConnTagsString "__new0" - BranchType "C" - Resistance "1" - Inductance "1e-3" - SetiL0 off - InitialCurrent "0" - Capacitance "5e-3" - Setx0 off - InitialVoltage "192" - Measurements "None" - } - Block { - BlockType Reference - Name "Current Measurement2" - SID "804" - Ports [0, 1, 0, 0, 0, 1, 1] - Position [1430, 528, 1455, 552] - ZOrder -2 - ShowName off - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Measurements/Current Measurement" - SourceType "Current Measurement" - PhasorSimulation off - OutputType "Complex" - PSBequivalent "0" - } - Block { - BlockType FromWorkspace - Name "From\nWorkspace1" - SID "2592" - Position [20, 648, 85, 672] - ZOrder 26 - VariableName "VARins'" - SampleTime "0" - ZeroCross on - } - Block { - BlockType FromWorkspace - Name "From\nWorkspace3" - SID "2600" - Position [215, 688, 280, 712] - ZOrder 33 - VariableName "VARTemp'" - SampleTime "0" - ZeroCross on - } - Block { - BlockType From - Name "From2" - SID "805" - Position [265, 576, 320, 604] - ZOrder -9 - ShowName off - GotoTag "Vpv" - TagVisibility "global" - } - Block { - BlockType Goto - Name "Goto5" - SID "808" - Position [500, 665, 540, 695] - ZOrder -18 - BlockMirror on - ShowName off - GotoTag "Ipv" - TagVisibility "global" - } - Block { - BlockType Reference - Name "Ia" - SID "810" - Ports [1, 0, 0, 0, 0, 1, 1] - Position [562, 575, 598, 620] - ZOrder -24 - BlockRotation 270 - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" - SourceType "Controlled Current Source" - Initialize on - Source_Type "DC" - Amplitude "0" - Phase "0" - Frequency "0" - Measurements "None" - } - Block { - BlockType Reference - Name "Ia1" - SID "811" - Ports [1, 0, 0, 0, 0, 1, 1] - Position [622, 575, 658, 620] - ZOrder -24 - BlockRotation 270 - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" - SourceType "Controlled Current Source" - Initialize on - Source_Type "DC" - Amplitude "0" - Phase "0" - Frequency "0" - Measurements "None" - } - Block { - BlockType Reference - Name "Ia10" - SID "2410" - Ports [1, 0, 0, 0, 0, 1, 1] - Position [1187, 575, 1223, 620] - ZOrder -24 - BlockRotation 270 - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" - SourceType "Controlled Current Source" - Initialize on - Source_Type "DC" - Amplitude "0" - Phase "0" - Frequency "0" - Measurements "None" - } - Block { - BlockType Reference - Name "Ia11" - SID "2465" - Ports [1, 0, 0, 0, 0, 1, 1] - Position [1252, 575, 1288, 620] - ZOrder -24 - BlockRotation 270 - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" - SourceType "Controlled Current Source" - Initialize on - Source_Type "DC" - Amplitude "0" - Phase "0" - Frequency "0" - Measurements "None" - } - Block { - BlockType Reference - Name "Ia12" - SID "2466" - Ports [1, 0, 0, 0, 0, 1, 1] - Position [1317, 575, 1353, 620] - ZOrder -24 - BlockRotation 270 - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" - SourceType "Controlled Current Source" - Initialize on - Source_Type "DC" - Amplitude "0" - Phase "0" - Frequency "0" - Measurements "None" - } - Block { - BlockType Reference - Name "Ia13" - SID "2467" - Ports [1, 0, 0, 0, 0, 1, 1] - Position [1387, 575, 1423, 620] - ZOrder -24 - BlockRotation 270 - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" - SourceType "Controlled Current Source" - Initialize on - Source_Type "DC" - Amplitude "0" - Phase "0" - Frequency "0" - Measurements "None" - } - Block { - BlockType Reference - Name "Ia2" - SID "2402" - Ports [1, 0, 0, 0, 0, 1, 1] - Position [687, 575, 723, 620] - ZOrder -24 - BlockRotation 270 - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" - SourceType "Controlled Current Source" - Initialize on - Source_Type "DC" - Amplitude "0" - Phase "0" - Frequency "0" - Measurements "None" - } - Block { - BlockType Reference - Name "Ia3" - SID "2403" - Ports [1, 0, 0, 0, 0, 1, 1] - Position [747, 575, 783, 620] - ZOrder -24 - BlockRotation 270 - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" - SourceType "Controlled Current Source" - Initialize on - Source_Type "DC" - Amplitude "0" - Phase "0" - Frequency "0" - Measurements "None" - } - Block { - BlockType Reference - Name "Ia4" - SID "2404" - Ports [1, 0, 0, 0, 0, 1, 1] - Position [807, 575, 843, 620] - ZOrder -24 - BlockRotation 270 - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" - SourceType "Controlled Current Source" - Initialize on - Source_Type "DC" - Amplitude "0" - Phase "0" - Frequency "0" - Measurements "None" - } - Block { - BlockType Reference - Name "Ia5" - SID "2405" - Ports [1, 0, 0, 0, 0, 1, 1] - Position [867, 575, 903, 620] - ZOrder -24 - BlockRotation 270 - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" - SourceType "Controlled Current Source" - Initialize on - Source_Type "DC" - Amplitude "0" - Phase "0" - Frequency "0" - Measurements "None" - } - Block { - BlockType Reference - Name "Ia6" - SID "2406" - Ports [1, 0, 0, 0, 0, 1, 1] - Position [927, 575, 963, 620] - ZOrder -24 - BlockRotation 270 - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" - SourceType "Controlled Current Source" - Initialize on - Source_Type "DC" - Amplitude "0" - Phase "0" - Frequency "0" - Measurements "None" - } - Block { - BlockType Reference - Name "Ia7" - SID "2407" - Ports [1, 0, 0, 0, 0, 1, 1] - Position [992, 575, 1028, 620] - ZOrder -24 - BlockRotation 270 - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" - SourceType "Controlled Current Source" - Initialize on - Source_Type "DC" - Amplitude "0" - Phase "0" - Frequency "0" - Measurements "None" - } - Block { - BlockType Reference - Name "Ia8" - SID "2408" - Ports [1, 0, 0, 0, 0, 1, 1] - Position [1052, 575, 1088, 620] - ZOrder -24 - BlockRotation 270 - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" - SourceType "Controlled Current Source" - Initialize on - Source_Type "DC" - Amplitude "0" - Phase "0" - Frequency "0" - Measurements "None" - } - Block { - BlockType Reference - Name "Ia9" - SID "2409" - Ports [1, 0, 0, 0, 0, 1, 1] - Position [1117, 575, 1153, 620] - ZOrder -24 - BlockRotation 270 - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" - SourceType "Controlled Current Source" - Initialize on - Source_Type "DC" - Amplitude "0" - Phase "0" - Frequency "0" - Measurements "None" - } - Block { - BlockType SubSystem - Name "PV" - SID "2112" - Ports [3, 1] - Position [340, 563, 470, 727] - ZOrder -64 - LibraryVersion "1.32" - ErrorFcn "Stateflow.Translate.translate" - PermitHierarchicalResolution "ExplicitOnly" - TreatAsAtomicUnit on - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - SFBlockType "MATLAB Function" - System { - Name "PV" - Location [227, 345, 838, 789] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - SIDHighWatermark "22" - Block { - BlockType Inport - Name "Vpv" - SID "2112::1" - Position [20, 101, 40, 119] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Inport - Name "Irr" - SID "2112::18" - Position [20, 136, 40, 154] - ZOrder -2 - Port "2" - IconDisplay "Port number" - } - Block { - BlockType Inport - Name "TaC" - SID "2112::19" - Position [20, 171, 40, 189] - ZOrder -3 - Port "3" - IconDisplay "Port number" - } - Block { - BlockType Demux - Name " Demux " - SID "2112::21" - Ports [1, 1] - Position [270, 230, 320, 270] - ZOrder 2 - Outputs "1" - } - Block { - BlockType S-Function - Name " SFunction " - SID "2112::20" - Tag "Stateflow S-Function Microgrid_24h_Simulation 1" - Ports [3, 2] - Position [180, 100, 230, 180] - ZOrder 1 - FunctionName "sf_sfun" - PortCounts "[3 2]" - EnableBusSupport on - Port { - PortNumber 2 - Name "Ipv" - RTWStorageClass "Auto" - DataLoggingNameMode "SignalName" - } - } - Block { - BlockType Terminator - Name " Terminator " - SID "2112::22" - Position [460, 241, 480, 259] - ZOrder 3 - } - Block { - BlockType Outport - Name "Ipv" - SID "2112::5" - Position [460, 101, 480, 119] - ZOrder -7 - IconDisplay "Port number" - } - Line { - SrcBlock "Vpv" - SrcPort 1 - DstBlock " SFunction " - DstPort 1 - } - Line { - SrcBlock "Irr" - SrcPort 1 - DstBlock " SFunction " - DstPort 2 - } - Line { - SrcBlock "TaC" - SrcPort 1 - DstBlock " SFunction " - DstPort 3 - } - Line { - Name "Ipv" - Labels [0, 0] - SrcBlock " SFunction " - SrcPort 2 - DstBlock "Ipv" - DstPort 1 - } - Line { - SrcBlock " Demux " - SrcPort 1 - DstBlock " Terminator " - DstPort 1 - } - Line { - SrcBlock " SFunction " - SrcPort 1 - Points [20, 0] - DstBlock " Demux " - DstPort 1 - } - } - } - Block { - BlockType RateLimiter - Name "Rate Limiter" - SID "816" - Position [235, 645, 265, 675] - ZOrder -29 - ShowName off - RisingSlewLimit "5" - FallingSlewLimit "-5" - } - Block { - BlockType SubSystem - Name "Subsystem1" - SID "1143" - Ports [1] - Position [1550, 606, 1585, 644] - ZOrder -66 - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem1" - Location [982, 611, 1366, 928] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "Vpv" - SID "1144" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Goto - Name "Goto2" - SID "1145" - Position [235, 31, 295, 59] - ZOrder -20 - NamePlacement "alternate" - ShowName off - GotoTag "Vpv" - TagVisibility "global" - } - Block { - BlockType Reference - Name "LPF vq2" - SID "1779" - Ports [1, 1] - Position [140, 74, 165, 106] - ZOrder -21 - ShowName off - LibraryVersion "1.664" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" - SourceType "Discrete 1st-Order Filter" - FilterType "Lowpass" - Tc "10e-3" - Ts "5e-6" - Initialize off - Vac_Init "[0.8 -25 60]" - Vdc_Init "0" - PlotResponse off - param1 "[1 100 0.1]" - } - Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1146" - Ports [1] - Position [235, 75, 295, 105] - ZOrder -22 - ShowName off - VariableName "Vpv" - MaxDataPoints "inf" - SampleTime "-1" - } - Line { - SrcBlock "Vpv" - SrcPort 1 - Points [25, 0] - Branch { - DstBlock "Goto2" - DstPort 1 - } - Branch { - Points [0, 45] - DstBlock "LPF vq2" - DstPort 1 - } - } - Line { - SrcBlock "LPF vq2" - SrcPort 1 - DstBlock "To Workspace1" - DstPort 1 - } - } - } - Block { - BlockType SubSystem - Name "Subsystem2" - SID "1147" - Ports [1] - Position [160, 571, 195, 609] - ZOrder -67 - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem2" - Location [-8, 0, 1608, 876] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "Irr" - SID "1148" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Goto - Name "Goto2" - SID "1149" - Position [200, 31, 260, 59] - ZOrder -20 - NamePlacement "alternate" - ShowName off - GotoTag "Irr" - TagVisibility "global" - } - Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1150" - Ports [1] - Position [200, 75, 260, 105] - ZOrder -21 - ShowName off - VariableName "Irr" - MaxDataPoints "inf" - SampleTime "-1" - } - Block { - BlockType ZeroOrderHold - Name "Zero-Order\nHold" - SID "1170" - Position [95, 30, 130, 60] - ZOrder -22 - SampleTime "5e-6" - } - Line { - SrcBlock "Irr" - SrcPort 1 - DstBlock "Zero-Order\nHold" - DstPort 1 - } - Line { - SrcBlock "Zero-Order\nHold" - SrcPort 1 - Points [30, 0] - Branch { - Points [0, 45] - DstBlock "To Workspace1" - DstPort 1 - } - Branch { - DstBlock "Goto2" - DstPort 1 - } - } - } - } - Block { - BlockType SubSystem - Name "Subsystem4" - SID "1139" - Ports [1] - Position [1490, 481, 1525, 519] - ZOrder -68 - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem4" - Location [982, 630, 1231, 931] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "Ipv" - SID "1140" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Goto - Name "Goto2" - SID "1141" - Position [120, 31, 180, 59] - ZOrder -20 - NamePlacement "alternate" - ShowName off - GotoTag "Ipv_array" - TagVisibility "global" - } - Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1142" - Ports [1] - Position [120, 75, 180, 105] - ZOrder -21 - ShowName off - VariableName "Ipv_array" - MaxDataPoints "inf" - SampleTime "-1" - } - Line { - SrcBlock "Ipv" - SrcPort 1 - Points [25, 0] - Branch { - DstBlock "Goto2" - DstPort 1 - } - Branch { - Points [0, 0; 0, 45] - DstBlock "To Workspace1" - DstPort 1 - } - } - } - } - Block { - BlockType Reference - Name "Va" - SID "818" - Ports [0, 1, 0, 0, 0, 2] - Position [1495, 613, 1520, 637] - ZOrder -35 - ShowName off - LibraryVersion "1.2191" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib/Measurements/Voltage Measurement" - SourceType "Voltage Measurement" - PhasorSimulation off - OutputType "Complex" - PSBequivalent "0" - } - Block { - BlockType PMIOPort - Name "+" - SID "819" - Position [1695, 530, 1710, 560] - ZOrder -71 - BlockMirror on - Port "1" - Side "Right" - } - Block { - BlockType PMIOPort - Name "-" - SID "820" - Position [1695, 700, 1710, 730] - ZOrder -72 - BlockMirror on - NamePlacement "alternate" - Port "2" - Side "Right" - } - Line { - SrcBlock "From2" - SrcPort 1 - DstBlock "PV" - DstPort 1 - } - Line { - SrcBlock "PV" - SrcPort 1 - Points [95, 0] - Branch { - DstBlock "Ia" - DstPort 1 - } - Branch { - Points [0, 35] - DstBlock "Goto5" - DstPort 1 - } - Branch { - Points [60, 0] - Branch { - DstBlock "Ia1" - DstPort 1 - } - Branch { - Points [65, 0] - Branch { - DstBlock "Ia2" - DstPort 1 - } - Branch { - Points [60, 0] - Branch { - DstBlock "Ia3" - DstPort 1 - } - Branch { - Points [60, 0] - Branch { - DstBlock "Ia4" - DstPort 1 - } - Branch { - Points [60, 0] - Branch { - DstBlock "Ia5" - DstPort 1 - } - Branch { - Points [60, 0] - Branch { - DstBlock "Ia6" - DstPort 1 - } - Branch { - Points [65, 0] - Branch { - DstBlock "Ia7" - DstPort 1 - } - Branch { - Points [60, 0] - Branch { - DstBlock "Ia8" - DstPort 1 - } - Branch { - Points [65, 0] - Branch { - DstBlock "Ia9" - DstPort 1 - } - Branch { - Points [70, 0] - Branch { - DstBlock "Ia10" - DstPort 1 - } - Branch { - Points [65, 0] - Branch { - DstBlock "Ia11" - DstPort 1 - } - Branch { - Points [65, 0] - Branch { - Points [70, 0] - DstBlock "Ia13" - DstPort 1 - } - Branch { - DstBlock "Ia12" - DstPort 1 - } - } - } - } - } - } - } - } - } - } - } - } - } - } - Line { - SrcBlock "Va" - SrcPort 1 - DstBlock "Subsystem1" - DstPort 1 - } - Line { - LineType "Connection" - Points [1345, 720; 70, 0] - Branch { - ConnectType "SRC_DEST" - Points [1280, 720; 65, 0] - Branch { - ConnectType "SRC_DEST" - Points [1215, 720; 65, 0] - Branch { - ConnectType "SRC_DEST" - Points [1145, 720; 70, 0] - Branch { - ConnectType "SRC_DEST" - Points [1080, 720; 65, 0] - Branch { - ConnectType "SRC_DEST" - Points [1020, 720; 60, 0] - Branch { - ConnectType "SRC_DEST" - Points [955, 720; 65, 0] - Branch { - ConnectType "SRC_DEST" - Points [895, 720; 60, 0] - Branch { - ConnectType "SRC_DEST" - Points [835, 720; 60, 0] - Branch { - ConnectType "SRC_DEST" - Points [775, 720; 60, 0] - Branch { - ConnectType "SRC_DEST" - Points [715, 720; 60, 0] - Branch { - ConnectType "SRC_DEST" - Points [650, 720; 65, 0] - Branch { - ConnectType "SRC_DEST" - SrcBlock "Ia" - SrcPort LConn1 - Points [0, 85; 60, 0] - } - Branch { - ConnectType "SRC_SRC" - DstBlock "Ia1" - DstPort LConn1 - } - } - Branch { - ConnectType "SRC_SRC" - DstBlock "Ia2" - DstPort LConn1 - } - } - Branch { - ConnectType "SRC_SRC" - DstBlock "Ia3" - DstPort LConn1 - } - } - Branch { - ConnectType "SRC_SRC" - DstBlock "Ia4" - DstPort LConn1 - } - } - Branch { - ConnectType "SRC_SRC" - DstBlock "Ia5" - DstPort LConn1 - } - } - Branch { - ConnectType "SRC_SRC" - DstBlock "Ia6" - DstPort LConn1 - } - } - Branch { - ConnectType "SRC_SRC" - DstBlock "Ia7" - DstPort LConn1 - } - } - Branch { - ConnectType "SRC_SRC" - DstBlock "Ia8" - DstPort LConn1 - } - } - Branch { - ConnectType "SRC_SRC" - DstBlock "Ia9" - DstPort LConn1 - } - } - Branch { - ConnectType "SRC_SRC" - DstBlock "Ia10" - DstPort LConn1 - } - } - Branch { - ConnectType "SRC_SRC" - DstBlock "Ia11" - DstPort LConn1 - } - } - Branch { - ConnectType "SRC_SRC" - DstBlock "Ia12" - DstPort LConn1 - } - Branch { - ConnectType "DEST_SRC" - Points [65, 0] - Branch { - ConnectType "DEST_SRC" - DstBlock "Va" - DstPort LConn2 - } - Branch { - ConnectType "DEST_DEST" - Points [1650, 720; -170, 0] - Branch { - ConnectType "SRC_DEST" - SrcBlock "Cdc1" - SrcPort RConn1 - Points [0, 45] - } - Branch { - ConnectType "SRC_SRC" - Points [30, 0] - DstBlock "-" - DstPort RConn1 - } - } - } - Branch { - ConnectType "DEST_SRC" - DstBlock "Ia13" - DstPort LConn1 - } - } - Line { - LineType "Connection" - SrcBlock "Current Measurement2" - SrcPort LConn1 - Points [-10, 0] - Branch { - ConnectType "DEST_SRC" - Points [-70, 0] - Branch { - ConnectType "DEST_SRC" - Points [-65, 0] - Branch { - ConnectType "DEST_SRC" - Points [-65, 0] - Branch { - ConnectType "DEST_SRC" - Points [-70, 0] - Branch { - ConnectType "DEST_SRC" - Points [-65, 0] - Branch { - ConnectType "DEST_SRC" - Points [-60, 0] - Branch { - ConnectType "DEST_SRC" - Points [-65, 0] - Branch { - ConnectType "DEST_SRC" - Points [-60, 0] - Branch { - ConnectType "DEST_SRC" - Points [-60, 0] - Branch { - ConnectType "DEST_SRC" - Points [-60, 0] - Branch { - ConnectType "DEST_SRC" - Points [-60, 0] - Branch { - ConnectType "DEST_SRC" - Points [-65, 0] - Branch { - ConnectType "DEST_DEST" - SrcBlock "Ia" - SrcPort RConn1 - Points [0, -20; 60, 0] - } - Branch { - ConnectType "DEST_DEST" - SrcBlock "Ia1" - SrcPort RConn1 - Points [0, -20] - } - } - Branch { - ConnectType "DEST_DEST" - SrcBlock "Ia2" - SrcPort RConn1 - Points [0, -20] - } - } - Branch { - ConnectType "DEST_DEST" - SrcBlock "Ia3" - SrcPort RConn1 - Points [0, -20] - } - } - Branch { - ConnectType "DEST_DEST" - SrcBlock "Ia4" - SrcPort RConn1 - Points [0, -20] - } - } - Branch { - ConnectType "DEST_DEST" - SrcBlock "Ia5" - SrcPort RConn1 - Points [0, -20] - } - } - Branch { - ConnectType "DEST_DEST" - SrcBlock "Ia6" - SrcPort RConn1 - Points [0, -20] - } - } - Branch { - ConnectType "DEST_DEST" - SrcBlock "Ia7" - SrcPort RConn1 - Points [0, -20] - } - } - Branch { - ConnectType "DEST_DEST" - SrcBlock "Ia8" - SrcPort RConn1 - Points [0, -20] - } - } - Branch { - ConnectType "DEST_DEST" - SrcBlock "Ia9" - SrcPort RConn1 - Points [0, -20] - } - } - Branch { - ConnectType "DEST_DEST" - SrcBlock "Ia10" - SrcPort RConn1 - Points [0, -20] - } - } - Branch { - ConnectType "DEST_DEST" - SrcBlock "Ia11" - SrcPort RConn1 - Points [0, -20] - } - } - Branch { - ConnectType "DEST_DEST" - SrcBlock "Ia12" - SrcPort RConn1 - Points [0, -20] - } - } - Branch { - ConnectType "DEST_DEST" - SrcBlock "Ia13" - SrcPort RConn1 - Points [0, -20] - } - } - Line { - SrcBlock "Rate Limiter" - SrcPort 1 - Points [32, 0; 0, -15] - DstBlock "PV" - DstPort 2 - } - Line { - LineType "Connection" - SrcBlock "Va" - SrcPort LConn1 - Points [0, -75] - Branch { - ConnectType "DEST_DEST" - SrcBlock "Current Measurement2" - SrcPort RConn1 - Points [10, 0] - } - Branch { - ConnectType "DEST_SRC" - Points [170, 0] - Branch { - ConnectType "DEST_SRC" - DstBlock "+" - DstPort RConn1 - } - Branch { - ConnectType "DEST_SRC" - DstBlock "Cdc1" - DstPort LConn1 - } - } - } - Line { - SrcBlock "Current Measurement2" - SrcPort 1 - Points [5, 0; 0, -35] - DstBlock "Subsystem4" - DstPort 1 - } - Line { - SrcBlock "From\nWorkspace3" - SrcPort 1 - DstBlock "PV" - DstPort 3 - } - Line { - SrcBlock "From\nWorkspace1" - SrcPort 1 - Points [46, 0] - Branch { - Points [0, -70] - DstBlock "Subsystem2" - DstPort 1 - } - Branch { - DstBlock "Rate Limiter" - DstPort 1 - } - } - } - } - Block { - BlockType SubSystem - Name "Subsystem" - SID "1362" - Ports [] - Position [1315, 700, 1532, 900] - ZOrder -8 - BackgroundColor "green" - ShowName off - FontName "Arial Narrow" - FontSize 24 - FontWeight "bold" - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - Object { - $PropName "MaskObject" - $ObjectID 28 - $ClassName "Simulink.Mask" - Display "disp('Measurements')" - } - System { - Name "Subsystem" - Location [0, 0, 1600, 876] - Open on - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "80" - Block { - BlockType Scope - Name "AC Load Measurements" - SID "1494" - Ports [2] - Position [1310, 99, 1370, 181] - ZOrder -19 - Floating off - Location [5, 47, 1601, 894] - Open off - NumInputPorts "2" - ZoomMode "xonly" - List { - ListType AxesTitles - axes1 "AC Load Voltages Phase to Ground, Vabc (V)" - axes2 "AC Load Currents, Iabc (A)" - } - List { - ListType ScopeGraphics - FigureColor "[0.5 0.5 0.5]" - AxesColor "[0 0 0]" - AxesTickColor "[1 1 1]" - LineColors "[1 1 0;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" - LineStyles "-|-|-|-|-|-" - LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" - MarkerStyles "none|none|none|none|none|none" - } - ShowLegends off - TimeRange "1" - YMin "-1100~-30" - YMax "1100~30" - SaveName "ScopeData11" - LimitDataPoints off - SampleTime "0" - } - Block { - BlockType Scope - Name "Battery Measurements" - SID "1363" - Ports [4] - Position [295, 481, 385, 599] - ZOrder -20 - Floating off - Location [5, 48, 1605, 859] - Open off - NumInputPorts "4" - ZoomMode "yonly" - List { - ListType AxesTitles - axes1 "Battery State Of Charge, SOC (%)" - axes2 "Battery Current, Ibat (A)" - axes3 "Battery Voltage, Vbat (V)" - axes4 "Battery Power, (W)" - } - List { - ListType ScopeGraphics - FigureColor "[0.5 0.5 0.5]" - AxesColor "[0 0 0]" - AxesTickColor "[1 1 1]" - LineColors "[1 1 0;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" - LineStyles "-|-|-|-|-|-" - LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" - MarkerStyles "none|none|none|none|none|none" - } - ShowLegends off - TimeRange "10" - YMin "0~-600~0~-130000" - YMax "35~600~400~130000" - SaveName "ScopeData5" - DataFormat "StructureWithTime" - LimitDataPoints off - SampleTime "0" - } - Block { - BlockType Clock - Name "Clock" - SID "1539" - Position [55, 895, 75, 915] - ZOrder -4 - } - Block { - BlockType Scope - Name "DC Bus Measurements\nBATTERY SIDE" - SID "1382" - Ports [3] - Position [825, 561, 900, 659] - ZOrder -19 - Floating off - Location [1, 485, 905, 899] - Open off - NumInputPorts "3" - ZoomMode "yonly" - List { - ListType AxesTitles - axes1 "DC Bus Voltage Battery Side, Vdc (V)" - axes2 "DC Bus Current Battery Side, Idc (A)" - axes3 "DC Bus Power Battery Side, Pdc (W)" - } - List { - ListType ScopeGraphics - FigureColor "[0.5 0.5 0.5]" - AxesColor "[0 0 0]" - AxesTickColor "[1 1 1]" - LineColors "[1 1 0;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" - LineStyles "-|-|-|-|-|-" - LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" - MarkerStyles "none|none|none|none|none|none" - } - ShowLegends off - TimeRange "1 " - YMin "1129.2~-19.63~-22180" - YMax "1130.8~-19.5775~-22130" - SaveName "ScopeData14" - DataFormat "StructureWithTime" - LimitDataPoints off - SampleTime "0" - } - Block { - BlockType Scope - Name "DC Bus Measurements\nINVERTER SIDE" - SID "1542" - Ports [3] - Position [825, 756, 900, 854] - ZOrder -19 - Floating off - Location [5, 150, 1609, 1005] - Open off - NumInputPorts "3" - ZoomMode "yonly" - List { - ListType AxesTitles - axes1 "DC Bus Voltage Inverter Side, Vdcinv (V)" - axes2 "DC Bus Current Inverter Side, Idcinv (A)" - axes3 "DC Bus Power Inverter Side, Pdcinv (W)" - } - List { - ListType ScopeGraphics - FigureColor "[0.5 0.5 0.5]" - AxesColor "[0 0 0]" - AxesTickColor "[1 1 1]" - LineColors "[1 1 0;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" - LineStyles "-|-|-|-|-|-" - LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" - MarkerStyles "none|none|none|none|none|none" - } - ShowLegends off - TimeRange "5" - YMin "300~-4.195073366439502~-5627.098354983158" - YMax "1300~0.1451897988383877~791.6467936668632" - SaveName "ScopeData8" - DataFormat "StructureWithTime" - LimitDataPoints off - SampleTime "0" - } - Block { - BlockType Scope - Name "DC Bus Measurements\nPV SIDE" - SID "1395" - Ports [3] - Position [825, 366, 900, 464] - ZOrder -19 - Floating off - Location [-70, 81, 1534, 936] - Open off - NumInputPorts "3" - ZoomMode "yonly" - List { - ListType AxesTitles - axes1 "DC Bus Voltage PV Side, Vbus (V)" - axes2 "DC Bus Current PV Side, Ibus (A)" - axes3 "DC Bus Power PV Side, Pbus (W)" - } - List { - ListType ScopeGraphics - FigureColor "[0.5 0.5 0.5]" - AxesColor "[0 0 0]" - AxesTickColor "[1 1 1]" - LineColors "[1 1 0;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" - LineStyles "-|-|-|-|-|-" - LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" - MarkerStyles "none|none|none|none|none|none" - } - ShowLegends off - TimeRange "9" - YMin "0~-150~-60000" - YMax "1600~150~80000" - SaveName "ScopeData15" - DataFormat "StructureWithTime" - LimitDataPoints off - SampleTime "0" - } - Block { - BlockType Scope - Name "Frequency" - SID "2109" - Ports [2] - Position [1390, 699, 1450, 781] - ZOrder -19 - Floating off - Location [266, 98, 1050, 894] - Open off - NumInputPorts "2" - ZoomMode "yonly" - List { - ListType AxesTitles - axes1 "Frequency (Hz)" - axes2 "Frequency Filtered (Hz)" - } - List { - ListType ScopeGraphics - FigureColor "[0.5 0.5 0.5]" - AxesColor "[0 0 0]" - AxesTickColor "[1 1 1]" - LineColors "[1 1 0;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" - LineStyles "-|-|-|-|-|-" - LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" - MarkerStyles "none|none|none|none|none|none" - } - ShowLegends off - TimeRange "1 " - YMin "0~0" - YMax "100~60" - SaveName "ScopeData17" - DataFormat "StructureWithTime" - LimitDataPoints off - SampleTime "0" - } - Block { - BlockType From - Name "From1" - SID "1383" - Position [565, 566, 630, 594] - ZOrder -8 - ShowName off - GotoTag "Vdc" - TagVisibility "global" - } - Block { - BlockType From - Name "From10" - SID "1367" - Position [55, 541, 120, 569] - ZOrder -28 - NamePlacement "alternate" - ShowName off - GotoTag "Vbat" - TagVisibility "global" - } - Block { - BlockType From - Name "From11" - SID "1544" - Position [565, 791, 630, 819] - ZOrder -8 - ShowName off - GotoTag "Idcinv" - TagVisibility "global" - } - Block { - BlockType From - Name "From12" - SID "1385" - Position [565, 596, 630, 624] - ZOrder -8 - ShowName off - GotoTag "Idc" - TagVisibility "global" - } - Block { - BlockType From - Name "From15" - SID "2100" - Position [1095, 706, 1160, 734] - ZOrder -33 - ShowName off - GotoTag "w_abc" - TagVisibility "global" - } - Block { - BlockType From - Name "From2" - SID "1396" - Position [565, 371, 630, 399] - ZOrder -8 - ShowName off - GotoTag "Vbus" - TagVisibility "global" - } - Block { - BlockType From - Name "From20" - SID "1414" - Position [1090, 391, 1155, 419] - ZOrder -8 - ShowName off - GotoTag "Vload_ab" - TagVisibility "global" - } - Block { - BlockType From - Name "From21" - SID "1415" - Position [1095, 546, 1160, 574] - ZOrder -8 - ShowName off - GotoTag "Vload_a" - TagVisibility "global" - } - Block { - BlockType From - Name "From3" - SID "1397" - Position [565, 401, 630, 429] - ZOrder -8 - ShowName off - GotoTag "Ibus" - TagVisibility "global" - } - Block { - BlockType From - Name "From4" - SID "241" - Position [50, 111, 115, 139] - ZOrder -38 - NamePlacement "alternate" - ShowName off - GotoTag "Vpv" - TagVisibility "global" - Port { - PortNumber 1 - ShowPropagatedSignals "on" - RTWStorageClass "Auto" - DataLoggingNameMode "SignalName" - } - } - Block { - BlockType From - Name "From5" - SID "242" - Position [50, 136, 115, 164] - ZOrder -39 - NamePlacement "alternate" - ShowName off - GotoTag "Ipv_array" - TagVisibility "global" - Port { - PortNumber 1 - ShowPropagatedSignals "on" - RTWStorageClass "Auto" - DataLoggingNameMode "SignalName" - } - } - Block { - BlockType From - Name "From6" - SID "1372" - Position [55, 481, 120, 509] - ZOrder -40 - NamePlacement "alternate" - ShowName off - GotoTag "SOC" - TagVisibility "global" - } - Block { - BlockType From - Name "From7" - SID "1373" - Position [55, 511, 120, 539] - ZOrder -41 - NamePlacement "alternate" - ShowName off - GotoTag "Ibat" - TagVisibility "global" - } - Block { - BlockType From - Name "From8" - SID "1543" - Position [565, 761, 630, 789] - ZOrder -8 - ShowName off - GotoTag "Vdcinv" - TagVisibility "global" - } - Block { - BlockType From - Name "From9" - SID "243" - Position [50, 186, 115, 214] - ZOrder -43 - NamePlacement "alternate" - ShowName off - GotoTag "Irr" - TagVisibility "global" - Port { - PortNumber 1 - ShowPropagatedSignals "on" - RTWStorageClass "Auto" - DataLoggingNameMode "SignalName" - } - } - Block { - BlockType Gain - Name "Gain" - SID "2101" - Position [1200, 699, 1270, 741] - ZOrder -44 - ShowName off - Gain "1/(2*pi)" - ParamDataTypeStr "Inherit: Inherit via internal rule" - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Gain - Name "Gain1" - SID "2620" - Position [200, 480, 230, 510] - ZOrder 3 - ParamDataTypeStr "Inherit: Inherit via internal rule" - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Gain - Name "Gain2" - SID "2621" - Position [1345, 805, 1375, 835] - ZOrder 4 - ParamDataTypeStr "Inherit: Inherit via internal rule" - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off + Block { + BlockType SubSystem + Name "Subsystem2" + SID "2826" + Ports [1] + Position [445, 16, 480, 54] + ZOrder -17 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem2" + Location [982, 630, 1295, 932] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "delta" + SID "2827" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "2828" + Position [175, 31, 235, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "delta" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "2829" + Ports [1] + Position [175, 75, 235, 105] + ZOrder -21 + ShowName off + VariableName "delta" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ZeroOrderHold + Name "Zero-Order\nHold" + SID "2830" + Position [85, 30, 120, 60] + ZOrder -22 + SampleTime "5e-6" + } + Line { + SrcBlock "delta" + SrcPort 1 + DstBlock "Zero-Order\nHold" + DstPort 1 + } + Line { + SrcBlock "Zero-Order\nHold" + SrcPort 1 + Points [15, 0] + Branch { + Points [0, 45] + DstBlock "To Workspace1" + DstPort 1 + } + Branch { + DstBlock "Goto2" + DstPort 1 + } + } + } + } + Block { + BlockType SubSystem + Name "Subsystem3" + SID "2831" + Ports [1] + Position [740, 26, 775, 64] + ZOrder -18 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem3" + Location [982, 630, 1295, 932] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "pulsos" + SID "2832" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "2833" + Position [175, 31, 235, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "pulsos" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "2834" + Ports [1] + Position [175, 75, 235, 105] + ZOrder -21 + ShowName off + VariableName "pulsos" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ZeroOrderHold + Name "Zero-Order\nHold" + SID "2835" + Position [85, 30, 120, 60] + ZOrder -22 + SampleTime "5e-6" + } + Line { + SrcBlock "pulsos" + SrcPort 1 + DstBlock "Zero-Order\nHold" + DstPort 1 + } + Line { + SrcBlock "Zero-Order\nHold" + SrcPort 1 + Points [15, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + DstBlock "To Workspace1" + DstPort 1 + } + } + } + } + Block { + BlockType Outport + Name "Pulsos" + SID "2836" + Position [745, 83, 775, 97] + ZOrder -19 + IconDisplay "Port number" + } + Line { + SrcBlock "Memory2" + SrcPort 1 + Points [-50, 0; 0, -135] + DstBlock "MPPT IC" + DstPort 4 + } + Line { + SrcBlock "Memory5" + SrcPort 1 + Points [-36, 0; 0, -45] + DstBlock "MPPT IC" + DstPort 5 + } + Line { + SrcBlock "Memory4" + SrcPort 1 + Points [-85, 0; 0, -265] + DstBlock "MPPT IC" + DstPort 2 + } + Line { + SrcBlock "Memory1" + SrcPort 1 + DstBlock "MPPT IC" + DstPort 3 + } + Line { + SrcBlock "Memory" + SrcPort 1 + DstBlock "MPPT IC" + DstPort 1 + } + Line { + SrcBlock "PWM Generator" + SrcPort 1 + DstBlock "Demux" + DstPort 1 + } + Line { + SrcBlock "Demux" + SrcPort 2 + Points [35, 0] + Branch { + DstBlock "Pulsos" + DstPort 1 + } + Branch { + Points [0, -45] + DstBlock "Subsystem3" + DstPort 1 + } + } + Line { + SrcBlock "MPPT IC" + SrcPort 1 + Points [85, 0] + Branch { + Points [0, -45] + DstBlock "Subsystem2" + DstPort 1 + } + Branch { + DstBlock "PWM Generator" + DstPort 1 + } + } + Line { + SrcBlock "MPPT IC" + SrcPort 3 + Points [65, 0; 0, 200] + DstBlock "Memory4" + DstPort 1 + } + Line { + SrcBlock "MPPT IC" + SrcPort 4 + Points [40, 0; 0, 100] + DstBlock "Memory2" + DstPort 1 + } + Line { + SrcBlock "MPPT IC" + SrcPort 2 + Points [80, 0] + Branch { + Points [0, 150] + DstBlock "Memory5" + DstPort 1 + } + Branch { + DstBlock "Subsystem1" + DstPort 1 + } + } + Line { + SrcBlock "From4" + SrcPort 1 + DstBlock "Memory" + DstPort 1 + } + Line { + SrcBlock "From3" + SrcPort 1 + DstBlock "Memory1" + DstPort 1 + } + } } Block { - BlockType Gain - Name "Gain3" - SID "2622" - Position [1125, 105, 1155, 135] - ZOrder 5 - ParamDataTypeStr "Inherit: Inherit via internal rule" - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off + BlockType Reference + Name "Lb" + SID "2837" + Ports [0, 0, 0, 0, 0, 1, 1] + Position [145, 171, 215, 199] + ZOrder -21 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Elements/Series RLC Branch" + SourceType "Series RLC Branch" + LConnTagsString "__new0" + RConnTagsString "__new0" + BranchType "L" + Resistance "1" + Inductance "880e-6" + SetiL0 off + InitialCurrent "0" + Capacitance "1e-6" + Setx0 off + InitialVoltage "0" + Measurements "None" } Block { BlockType SubSystem - Name "Inverter Control \nMeasurements" - SID "1417" - Ports [] - Position [1300, 865, 1463, 963] - ZOrder -45 - NamePlacement "alternate" + Name "Subsystem1" + SID "2838" + Ports [1] + Position [760, 161, 795, 199] + ZOrder -22 ShowName off MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off @@ -15438,15 +4595,9 @@ Model { Opaque off RequestExecContextInheritance off MaskHideContents off - Object { - $PropName "MaskObject" - $ObjectID 29 - $ClassName "Simulink.Mask" - Display "disp('Inverter Control')" - } System { - Name "Inverter Control \nMeasurements" - Location [427, 66, 1548, 635] + Name "Subsystem1" + Location [-8, -8, 1608, 908] Open off ModelBrowserVisibility off ModelBrowserWidth 200 @@ -15460,410 +4611,563 @@ Model { ShowPageBoundaries off ZoomFactor "100" Block { - BlockType Scope - Name "Current Control Loop" - SID "1418" - Ports [2] - Position [745, 118, 850, 267] - ZOrder -19 - Floating off - Location [729, 165, 1513, 961] - Open off - NumInputPorts "2" - ZoomMode "yonly" - List { - ListType AxesTitles - axes1 "d Reference Frame Current Controller, id / id* (A)" - axes2 "q Reference Frame Current Controller, iq / iq* (A)" - } - ShowLegends off - TimeRange "1 " - YMin "167.5~-97.5" - YMax "195~-40" - DataFormat "StructureWithTime" - LimitDataPoints off - SampleTime "0" - } - Block { - BlockType Scope - Name "Frequency Reference" - SID "1419" - Ports [2] - Position [175, 179, 235, 261] - ZOrder -19 - Floating off - Location [5, 48, 1921, 1169] - Open off - NumInputPorts "2" - ZoomMode "xonly" - List { - ListType AxesTitles - axes1 "Frequency Reference, f* (Hz)" - axes2 "Angle Reference, theta (rad)" - } - ShowLegends off - TimeRange "4" - YMin "-100~-5" - YMax "80~5" - SaveName "ScopeData1" - DataFormat "StructureWithTime" - LimitDataPoints off - SampleTime "0" - } - Block { - BlockType From - Name "From11" - SID "1420" - Position [25, 186, 90, 214] - ZOrder -8 - ShowName off - GotoTag "f_ref" - TagVisibility "global" - } - Block { - BlockType From - Name "From12" - SID "1421" - Position [585, 236, 625, 264] - ZOrder -8 - ShowName off - GotoTag "iq_ref" - TagVisibility "global" - } - Block { - BlockType From - Name "From13" - SID "1422" - Position [25, 226, 90, 254] - ZOrder -8 - ShowName off - GotoTag "theta" - TagVisibility "global" - } - Block { - BlockType From - Name "From15" - SID "1423" - Position [875, 161, 940, 189] - ZOrder -8 - ShowName off - GotoTag "m_index" - TagVisibility "global" - } - Block { - BlockType From - Name "From16" - SID "1424" - Position [875, 201, 940, 229] - ZOrder -8 - ShowName off - GotoTag "pulses" - TagVisibility "global" - } - Block { - BlockType From - Name "From2" - SID "1425" - Position [275, 121, 315, 149] - ZOrder -8 - ShowName off - GotoTag "vd" - TagVisibility "global" - } - Block { - BlockType From - Name "From20" - SID "1426" - Position [25, 96, 90, 124] - ZOrder -8 - ShowName off - GotoTag "Vabc_ref" - TagVisibility "global" + BlockType Inport + Name "Ibus" + SID "2839" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" } Block { - BlockType From - Name "From3" - SID "1427" - Position [275, 161, 315, 189] - ZOrder -8 + BlockType Goto + Name "Goto2" + SID "2840" + Position [165, 31, 225, 59] + ZOrder -20 + NamePlacement "alternate" ShowName off - GotoTag "vd_ref" + GotoTag "Ibus" TagVisibility "global" } Block { - BlockType From - Name "From4" - SID "1428" - Position [275, 196, 315, 224] - ZOrder -8 + BlockType Reference + Name "LPF vq11" + SID "2841" + Ports [1, 1] + Position [115, 139, 145, 171] + ZOrder -21 ShowName off - GotoTag "vq" - TagVisibility "global" + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" } Block { - BlockType From - Name "From5" - SID "1429" - Position [275, 236, 315, 264] - ZOrder -8 + BlockType ToWorkspace + Name "To Workspace1" + SID "2842" + Ports [1] + Position [165, 75, 225, 105] + ZOrder -22 ShowName off - GotoTag "vq_ref" - TagVisibility "global" + VariableName "Ibus" + MaxDataPoints "inf" + SampleTime "-1" } Block { - BlockType From - Name "From6" - SID "1430" - Position [585, 121, 625, 149] - ZOrder -8 + BlockType ToWorkspace + Name "To Workspace2" + SID "2843" + Ports [1] + Position [165, 140, 225, 170] + ZOrder -23 ShowName off - GotoTag "id" - TagVisibility "global" + VariableName "Ibus1" + MaxDataPoints "inf" + SampleTime "-1" } - Block { - BlockType From - Name "From8" - SID "1431" - Position [585, 161, 625, 189] - ZOrder -8 - ShowName off - GotoTag "id_ref" - TagVisibility "global" + Line { + SrcBlock "Ibus" + SrcPort 1 + Points [40, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + Branch { + DstBlock "To Workspace1" + DstPort 1 + } + Branch { + DstBlock "LPF vq11" + DstPort 1 + } + } } - Block { - BlockType From - Name "From9" - SID "1432" - Position [585, 196, 625, 224] - ZOrder -8 - ShowName off - GotoTag "iq" - TagVisibility "global" + Line { + SrcBlock "LPF vq11" + SrcPort 1 + DstBlock "To Workspace2" + DstPort 1 } + } + } + Block { + BlockType SubSystem + Name "Subsystem2" + SID "2844" + Ports [1] + Position [760, 256, 795, 294] + ZOrder -23 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem2" + Location [-8, -8, 1608, 908] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" Block { - BlockType Mux - Name "Mux" - SID "1433" - Ports [2, 1] - Position [410, 115, 415, 195] - ZOrder -34 - ShowName off - Inputs "2" - DisplayOption "bar" + BlockType Inport + Name "Vbus" + SID "2845" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" } Block { - BlockType Mux - Name "Mux2" - SID "1434" - Ports [2, 1] - Position [410, 190, 415, 270] - ZOrder -35 + BlockType Goto + Name "Goto2" + SID "2846" + Position [185, 31, 245, 59] + ZOrder -20 + NamePlacement "alternate" ShowName off - Inputs "2" - DisplayOption "bar" + GotoTag "Vbus" + TagVisibility "global" } Block { - BlockType Mux - Name "Mux3" - SID "1435" - Ports [2, 1] - Position [715, 115, 720, 195] - ZOrder -36 + BlockType Reference + Name "LPF vq11" + SID "2847" + Ports [1, 1] + Position [130, 129, 160, 161] + ZOrder -21 ShowName off - Inputs "2" - DisplayOption "bar" + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" } Block { - BlockType Mux - Name "Mux4" - SID "1436" - Ports [2, 1] - Position [715, 190, 720, 270] - ZOrder -37 + BlockType ToWorkspace + Name "To Workspace1" + SID "2848" + Ports [1] + Position [185, 75, 245, 105] + ZOrder -22 ShowName off - Inputs "2" - DisplayOption "bar" - } - Block { - BlockType Scope - Name "PWM" - SID "1437" - Ports [2] - Position [980, 154, 1040, 236] - ZOrder -19 - Floating off - Location [495, 254, 1279, 1050] - Open off - NumInputPorts "2" - ZoomMode "xonly" - List { - ListType AxesTitles - axes1 "Modulation Index" - axes2 "Pulses" - } - ShowLegends off - TimeRange "4" - YMin "-100~-5" - YMax "80~5" - SaveName "ScopeData2" - DataFormat "StructureWithTime" - LimitDataPoints off - SampleTime "0" + VariableName "Vbus" + MaxDataPoints "inf" + SampleTime "-1" } Block { - BlockType SubSystem - Name "Subsystem1" - SID "1438" + BlockType ToWorkspace + Name "To Workspace2" + SID "2849" Ports [1] - Position [395, 66, 430, 104] - ZOrder -39 + Position [185, 130, 245, 160] + ZOrder -23 ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem1" - Location [982, 630, 1260, 946] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "vd_ref" - SID "1439" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1440" - Ports [1] - Position [135, 30, 195, 60] - ZOrder -2 - ShowName off - VariableName "vd_ref" - MaxDataPoints "inf" - SampleTime "-1" - } - Block { - BlockType ZeroOrderHold - Name "Zero-Order\nHold1" - SID "1441" - Position [75, 30, 110, 60] - ZOrder -3 - ShowName off - SampleTime "5e-6" - } - Line { - SrcBlock "vd_ref" - SrcPort 1 - DstBlock "Zero-Order\nHold1" + VariableName "Vbus1" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Vbus" + SrcPort 1 + Points [55, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + Branch { + DstBlock "To Workspace1" DstPort 1 } - Line { - SrcBlock "Zero-Order\nHold1" - SrcPort 1 - DstBlock "To Workspace1" + Branch { + DstBlock "LPF vq11" DstPort 1 } } } + Line { + SrcBlock "LPF vq11" + SrcPort 1 + DstBlock "To Workspace2" + DstPort 1 + } + } + } + Block { + BlockType Reference + Name "Va" + SID "2850" + Ports [0, 1, 0, 0, 0, 2] + Position [130, 268, 155, 292] + ZOrder -35 + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Voltage Measurement" + SourceType "Voltage Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" + } + Block { + BlockType Reference + Name "Voltage Measurement" + SID "2851" + Ports [0, 1, 0, 0, 0, 2] + Position [700, 278, 725, 302] + ZOrder -36 + NamePlacement "alternate" + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Voltage Measurement" + SourceType "Voltage Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" + } + Block { + BlockType PMIOPort + Name "+" + SID "2852" + Position [35, 178, 65, 192] + ZOrder -37 + Port "1" + Side "Left" + } + Block { + BlockType PMIOPort + Name "-" + SID "2853" + Position [35, 373, 65, 387] + ZOrder -38 + Port "2" + Side "Left" + } + Block { + BlockType PMIOPort + Name "+ " + SID "2854" + Position [870, 198, 900, 212] + ZOrder -39 + BlockMirror on + NamePlacement "alternate" + Port "3" + Side "Right" + } + Block { + BlockType PMIOPort + Name "- " + SID "2855" + Position [870, 373, 900, 387] + ZOrder -40 + BlockMirror on + NamePlacement "alternate" + Port "4" + Side "Right" + } + Line { + LineType "Connection" + Points [670, 200; -60, 0] + Branch { + ConnectType "SRC_DEST" + SrcBlock "Voltage Measurement" + SrcPort LConn1 + Points [-15, 0; 0, -85] + } + Branch { + ConnectType "SRC_SRC" + DstBlock "Current Measurement1" + DstPort LConn1 + } + Branch { + ConnectType "DEST_SRC" + DstBlock "Diode" + DstPort RConn1 + } + Branch { + ConnectType "DEST_DEST" + SrcBlock "Cdc" + SrcPort LConn1 + Points [0, -40] + } + } + Line { + LineType "Connection" + Points [610, 380; 0, -40] + DstBlock "Cdc" + DstPort RConn1 + Branch { + ConnectType "SRC_DEST" + Points [670, 380; -60, 0] + Branch { + ConnectType "SRC_DEST" + SrcBlock "- " + SrcPort RConn1 + Points [-185, 0] + } + Branch { + ConnectType "SRC_SRC" + Points [0, -85] + DstBlock "Voltage Measurement" + DstPort LConn2 + } + } + Branch { + ConnectType "SRC_DEST" + Points [355, 380; 255, 0] + Branch { + ConnectType "SRC_DEST" + Points [90, 380; 265, 0] + Branch { + ConnectType "SRC_DEST" + SrcBlock "-" + SrcPort RConn1 + Points [10, 0] + } + Branch { + ConnectType "SRC_SRC" + Points [0, -95] + DstBlock "Va" + DstPort LConn2 + } + } + Branch { + ConnectType "SRC_DEST" + SrcBlock "IGBT/Diode" + SrcPort RConn1 + Points [0, 20] + } + } + } + Line { + LineType "Connection" + SrcBlock "Lb" + SrcPort RConn1 + DstBlock "Current Measurement" + DstPort LConn1 + } + Line { + LineType "Connection" + Points [365, 190; 0, 80] + DstBlock "IGBT/Diode" + DstPort LConn1 + Branch { + ConnectType "SRC_DEST" + SrcBlock "Current Measurement" + SrcPort RConn1 + Points [65, 0] + } + Branch { + ConnectType "SRC_SRC" + DstBlock "Diode" + DstPort LConn1 + } + } + Line { + SrcBlock "Current Measurement" + SrcPort 1 + Points [10, 0; 0, -15] + DstBlock "Goto1" + DstPort 1 + } + Line { + SrcBlock "From17" + SrcPort 1 + Points [15, 0] + DstBlock "IGBT/Diode" + DstPort 1 + } + Line { + LineType "Connection" + SrcBlock "+" + SrcPort RConn1 + Points [10, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Lb" + DstPort LConn1 + } + Branch { + ConnectType "DEST_SRC" + Points [0, 90] + DstBlock "Va" + DstPort LConn1 + } + } + Line { + SrcBlock "Voltage Measurement" + SrcPort 1 + Points [8, 0] + Branch { + Points [0, 45] + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [4, 0; 0, -15] + DstBlock "Subsystem2" + DstPort 1 + } + } + Line { + SrcBlock "Current Measurement1" + SrcPort 1 + Points [15, 0; 0, -15] + Branch { + Points [0, -55] + DstBlock "Goto3" + DstPort 1 + } + Branch { + DstBlock "Subsystem1" + DstPort 1 + } + } + Line { + LineType "Connection" + SrcBlock "+ " + SrcPort RConn1 + DstBlock "Current Measurement1" + DstPort RConn1 + } + Line { + SrcBlock "Va" + SrcPort 1 + DstBlock "Goto6" + DstPort 1 + } + Line { + SrcBlock "Incremental Conductance MPPT" + SrcPort 1 + DstBlock "Goto7" + DstPort 1 + } + } + } + Block { + BlockType SubSystem + Name "Inverter" + SID "854" + Ports [0, 0, 0, 0, 0, 3, 2] + Position [1125, 434, 1275, 576] + ZOrder -6 + BlockMirror on + BackgroundColor "orange" + ShowName off + FontName "Arial Narrow" + FontSize 20 + FontWeight "bold" + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + Object { + $PropName "MaskObject" + $ObjectID 28 + $ClassName "Simulink.Mask" + Display "disp('DC/AC Inverter')" + } + System { + Name "Inverter" + Location [-8, 0, 1608, 916] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType SubSystem + Name "DC / AC Inverter" + SID "855" + Ports [1, 0, 0, 0, 0, 3, 2] + Position [265, 157, 425, 313] + ZOrder -1 + BlockMirror on + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "DC / AC Inverter" + Location [-8, 0, 1608, 916] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" Block { - BlockType SubSystem - Name "Subsystem10" - SID "1442" - Ports [1] - Position [190, 281, 225, 319] - ZOrder -40 - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem10" - Location [982, 630, 1260, 946] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "f_ref" - SID "1443" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1444" - Ports [1] - Position [135, 30, 195, 60] - ZOrder -2 - ShowName off - VariableName "f_ref" - MaxDataPoints "inf" - SampleTime "-1" - } - Block { - BlockType ZeroOrderHold - Name "Zero-Order\nHold1" - SID "1445" - Position [80, 30, 115, 60] - ZOrder -3 - ShowName off - SampleTime "5e-6" - } - Line { - SrcBlock "f_ref" - SrcPort 1 - DstBlock "Zero-Order\nHold1" - DstPort 1 - } - Line { - SrcBlock "Zero-Order\nHold1" - SrcPort 1 - DstBlock "To Workspace1" - DstPort 1 - } - } + BlockType Inport + Name "S" + SID "856" + Position [345, 68, 375, 82] + ZOrder -1 + BlockMirror on + NamePlacement "alternate" + IconDisplay "Port number" } Block { BlockType SubSystem - Name "Subsystem11" - SID "1446" - Ports [1] - Position [190, 326, 225, 364] - ZOrder -41 - ShowName off + Name "AC Load Measurements" + SID "859" + Ports [0, 0, 0, 0, 0, 3, 3] + Position [540, 95, 630, 235] + ZOrder -3 MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" @@ -15872,8 +5176,8 @@ Model { RequestExecContextInheritance off MaskHideContents off System { - Name "Subsystem11" - Location [982, 630, 1260, 946] + Name "AC Load Measurements" + Location [-8, 0, 1608, 916] Open off ModelBrowserVisibility off ModelBrowserWidth 200 @@ -15887,1160 +5191,1512 @@ Model { ShowPageBoundaries off ZoomFactor "100" Block { - BlockType Inport - Name "theta" - SID "1447" - Position [25, 38, 55, 52] + BlockType Reference + Name "Current Measurement1" + SID "1701" + Ports [0, 1, 0, 0, 0, 1, 1] + Position [270, 93, 295, 117] ZOrder -1 - IconDisplay "Port number" + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Current Measurement" + SourceType "Current Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" } Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1448" - Ports [1] - Position [135, 30, 195, 60] + BlockType Reference + Name "Current Measurement2" + SID "1702" + Ports [0, 1, 0, 0, 0, 1, 1] + Position [270, 123, 295, 147] ZOrder -2 ShowName off - VariableName "theta" - MaxDataPoints "inf" - SampleTime "-1" + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Current Measurement" + SourceType "Current Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" } Block { - BlockType ZeroOrderHold - Name "Zero-Order\nHold1" - SID "1449" - Position [75, 30, 110, 60] + BlockType Reference + Name "Current Measurement3" + SID "1703" + Ports [0, 1, 0, 0, 0, 1, 1] + Position [270, 153, 295, 177] ZOrder -3 ShowName off - SampleTime "5e-6" + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Current Measurement" + SourceType "Current Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" } - Line { - SrcBlock "theta" - SrcPort 1 - DstBlock "Zero-Order\nHold1" - DstPort 1 + Block { + BlockType Goto + Name "Goto1" + SID "860" + Position [880, 55, 940, 85] + ZOrder -10 + ShowName off + GotoTag "Vload_a" + TagVisibility "global" } - Line { - SrcBlock "Zero-Order\nHold1" - SrcPort 1 - DstBlock "To Workspace1" - DstPort 1 + Block { + BlockType Goto + Name "Goto5" + SID "863" + Position [975, 210, 1035, 240] + ZOrder -10 + ShowName off + GotoTag "Vload_ab" + TagVisibility "global" } - } - } - Block { - BlockType SubSystem - Name "Subsystem12" - SID "1450" - Ports [1] - Position [990, 101, 1025, 139] - ZOrder -42 - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem12" - Location [982, 630, 1260, 946] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" Block { - BlockType Inport - Name "m_index" - SID "1451" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" + BlockType Goto + Name "Goto7" + SID "864" + Position [975, 260, 1035, 290] + ZOrder -10 + ShowName off + GotoTag "Vload_bc" + TagVisibility "global" } Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1452" - Ports [1] - Position [140, 30, 200, 60] - ZOrder -2 + BlockType Goto + Name "Goto8" + SID "865" + Position [975, 305, 1035, 335] + ZOrder -10 ShowName off - VariableName "m_index" - MaxDataPoints "inf" - SampleTime "-1" + GotoTag "Vload_ca" + TagVisibility "global" } Block { - BlockType ZeroOrderHold - Name "Zero-Order\nHold1" - SID "1453" - Position [80, 30, 115, 60] - ZOrder -3 + BlockType Goto + Name "Goto9" + SID "866" + Position [1130, 285, 1190, 315] + ZOrder -10 ShowName off - SampleTime "5e-6" + GotoTag "Vload_pp" + TagVisibility "global" } - Line { - SrcBlock "m_index" - SrcPort 1 - DstBlock "Zero-Order\nHold1" - DstPort 1 + Block { + BlockType Reference + Name "Ground" + SID "867" + Ports [0, 0, 0, 0, 0, 1] + Position [779, 95, 801, 120] + ZOrder -15 + BlockRotation 270 + BlockMirror on + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Elements/Ground" + SourceType "Ground" + LConnTagsString "a" } - Line { - SrcBlock "Zero-Order\nHold1" - SrcPort 1 - DstBlock "To Workspace1" - DstPort 1 + Block { + BlockType Mux + Name "Mux2" + SID "868" + Ports [3, 1] + Position [1090, 223, 1095, 377] + ZOrder -16 + ShowName off + Inputs "3" + DisplayOption "bar" } - } - } - Block { - BlockType SubSystem - Name "Subsystem13" - SID "1454" - Ports [1] - Position [990, 256, 1025, 294] - ZOrder -43 - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem13" - Location [982, 630, 1260, 946] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" Block { - BlockType Inport - Name "pulses" - SID "1455" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" + BlockType SubSystem + Name "Subsystem1" + SID "1158" + Ports [1] + Position [570, 16, 605, 54] + ZOrder -17 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem1" + Location [982, 630, 1310, 932] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Vabc" + SID "1159" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "1160" + Position [185, 31, 245, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Vabc" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "1161" + Ports [1] + Position [185, 75, 245, 105] + ZOrder -21 + ShowName off + VariableName "Vabc" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Vabc" + SrcPort 1 + Points [55, 0] + Branch { + Points [0, 45] + DstBlock "To Workspace1" + DstPort 1 + } + Branch { + DstBlock "Goto2" + DstPort 1 + } + } + } } Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1456" + BlockType SubSystem + Name "Subsystem2" + SID "1154" Ports [1] - Position [155, 30, 215, 60] - ZOrder -2 + Position [195, 56, 230, 94] + ZOrder -18 ShowName off - VariableName "pulses" - MaxDataPoints "inf" - SampleTime "-1" + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem2" + Location [982, 630, 1310, 932] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Iabc" + SID "1155" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "1156" + Position [185, 31, 245, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Iabc" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "1157" + Ports [1] + Position [185, 75, 245, 105] + ZOrder -21 + ShowName off + VariableName "Iabc" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Iabc" + SrcPort 1 + Points [55, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + DstBlock "To Workspace1" + DstPort 1 + } + } + } } Block { - BlockType ZeroOrderHold - Name "Zero-Order\nHold1" - SID "1457" - Position [85, 30, 120, 60] - ZOrder -3 + BlockType SubSystem + Name "Subsystem3" + SID "1181" + Ports [1] + Position [990, 366, 1025, 404] + ZOrder -19 ShowName off - SampleTime "5e-6" - } - Line { - SrcBlock "pulses" - SrcPort 1 - DstBlock "Zero-Order\nHold1" - DstPort 1 - } - Line { - SrcBlock "Zero-Order\nHold1" - SrcPort 1 - DstBlock "To Workspace1" - DstPort 1 - } - } - } - Block { - BlockType SubSystem - Name "Subsystem2" - SID "1458" - Ports [1] - Position [395, 326, 430, 364] - ZOrder -44 - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem2" - Location [982, 630, 1260, 946] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "vq_ref" - SID "1459" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem3" + Location [999, 430, 1323, 916] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Vab" + SID "1182" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "1183" + Position [185, 31, 245, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Vab" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "1184" + Ports [1] + Position [185, 75, 245, 105] + ZOrder -21 + ShowName off + VariableName "Vab" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ToWorkspace + Name "To Workspace2" + SID "1830" + Ports [1] + Position [185, 125, 245, 155] + ZOrder -22 + ShowName off + VariableName "Vab_s" + MaxDataPoints "inf" + SampleTime "-1" + SaveFormat "Structure" + } + Block { + BlockType ToWorkspace + Name "To Workspace3" + SID "1831" + Ports [1] + Position [185, 185, 245, 215] + ZOrder -23 + ShowName off + VariableName "Vab_st" + MaxDataPoints "inf" + SampleTime "-1" + SaveFormat "Structure With Time" + } + Line { + SrcBlock "Vab" + SrcPort 1 + Points [55, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + Branch { + DstBlock "To Workspace1" + DstPort 1 + } + Branch { + Points [0, 50] + Branch { + DstBlock "To Workspace2" + DstPort 1 + } + Branch { + Points [0, 60] + DstBlock "To Workspace3" + DstPort 1 + } + } + } + } + } } Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1460" + BlockType SubSystem + Name "Subsystem4" + SID "1185" Ports [1] - Position [145, 30, 205, 60] - ZOrder -2 + Position [990, 411, 1025, 449] + ZOrder -20 ShowName off - VariableName "vq_ref" - MaxDataPoints "inf" - SampleTime "-1" + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem4" + Location [982, 630, 1310, 932] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Vbc" + SID "1186" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "1187" + Position [185, 31, 245, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Vbc" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "1188" + Ports [1] + Position [185, 75, 245, 105] + ZOrder -21 + ShowName off + VariableName "Vbc" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Vbc" + SrcPort 1 + Points [55, 0] + Branch { + Points [0, 45] + DstBlock "To Workspace1" + DstPort 1 + } + Branch { + DstBlock "Goto2" + DstPort 1 + } + } + } } Block { - BlockType ZeroOrderHold - Name "Zero-Order\nHold1" - SID "1461" - Position [80, 30, 115, 60] - ZOrder -3 + BlockType SubSystem + Name "Subsystem5" + SID "1189" + Ports [1] + Position [990, 456, 1025, 494] + ZOrder -21 ShowName off - SampleTime "5e-6" - } - Line { - SrcBlock "vq_ref" - SrcPort 1 - DstBlock "Zero-Order\nHold1" - DstPort 1 - } - Line { - SrcBlock "Zero-Order\nHold1" - SrcPort 1 - DstBlock "To Workspace1" - DstPort 1 + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem5" + Location [982, 630, 1310, 932] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Vca" + SID "1190" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "1191" + Position [185, 31, 245, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Vca" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "1192" + Ports [1] + Position [185, 75, 245, 105] + ZOrder -21 + ShowName off + VariableName "Vca" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Vca" + SrcPort 1 + Points [55, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + DstBlock "To Workspace1" + DstPort 1 + } + } + } } - } - } - Block { - BlockType SubSystem - Name "Subsystem3" - SID "1462" - Ports [1] - Position [395, 21, 430, 59] - ZOrder -45 - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem3" - Location [982, 630, 1269, 917] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" Block { - BlockType Inport - Name "vd" - SID "1463" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" + BlockType SubSystem + Name "Subsystem6" + SID "1704" + Ports [1] + Position [365, 216, 400, 254] + ZOrder -22 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem6" + Location [982, 630, 1310, 932] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Ia" + SID "1705" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "1706" + Position [185, 31, 245, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Ia" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "1707" + Ports [1] + Position [185, 75, 245, 105] + ZOrder -21 + ShowName off + VariableName "Ia" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Ia" + SrcPort 1 + Points [55, 0] + Branch { + Points [0, 45] + DstBlock "To Workspace1" + DstPort 1 + } + Branch { + DstBlock "Goto2" + DstPort 1 + } + } + } } Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1464" + BlockType SubSystem + Name "Subsystem7" + SID "1708" Ports [1] - Position [145, 30, 205, 60] - ZOrder -2 + Position [365, 256, 400, 294] + ZOrder -23 ShowName off - VariableName "vd" - MaxDataPoints "inf" - SampleTime "-1" + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem7" + Location [982, 630, 1310, 932] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Ib" + SID "1709" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "1710" + Position [185, 31, 245, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Ib" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "1711" + Ports [1] + Position [185, 75, 245, 105] + ZOrder -21 + ShowName off + VariableName "Ib" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Ib" + SrcPort 1 + Points [55, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + DstBlock "To Workspace1" + DstPort 1 + } + } + } } Block { - BlockType ZeroOrderHold - Name "Zero-Order\nHold1" - SID "1465" - Position [85, 30, 120, 60] - ZOrder -3 + BlockType SubSystem + Name "Subsystem8" + SID "1712" + Ports [1] + Position [365, 296, 400, 334] + ZOrder -24 ShowName off - SampleTime "5e-6" + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem8" + Location [982, 630, 1310, 932] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Ic" + SID "1713" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "1714" + Position [185, 31, 245, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Ic" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "1715" + Ports [1] + Position [185, 75, 245, 105] + ZOrder -21 + ShowName off + VariableName "Ic" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Ic" + SrcPort 1 + Points [55, 0] + Branch { + Points [0, 45] + DstBlock "To Workspace1" + DstPort 1 + } + Branch { + DstBlock "Goto2" + DstPort 1 + } + } + } } - Line { - SrcBlock "vd" - SrcPort 1 - DstBlock "Zero-Order\nHold1" - DstPort 1 + Block { + BlockType Reference + Name "Three-Phase\nV Measurement" + SID "869" + Ports [0, 1, 0, 0, 0, 3, 3] + Position [450, 70, 535, 200] + ZOrder -25 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Three-Phase\nV-I Measurement" + SourceType "Three-Phase VI Measurement" + VoltageMeasurement "phase-to-ground" + SetLabelV off + LabelV "Vabc" + Vpu off + VpuLL off + CurrentMeasurement "no" + SetLabelI off + LabelI "Iabc" + Ipu off + Pbase "100e6" + Vbase "500e3" + OutputType "Complex" + PhasorSimulation off + PSBequivalent "0" } - Line { - SrcBlock "Zero-Order\nHold1" - SrcPort 1 - DstBlock "To Workspace1" - DstPort 1 + Block { + BlockType Reference + Name "Three-Phase \nI Measurement" + SID "870" + Ports [0, 1, 0, 0, 0, 3, 3] + Position [80, 55, 165, 185] + ZOrder -26 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Three-Phase\nV-I Measurement" + SourceType "Three-Phase VI Measurement" + VoltageMeasurement "no" + SetLabelV off + LabelV "Vabc" + Vpu off + VpuLL off + CurrentMeasurement "yes" + SetLabelI off + LabelI "Iabc" + Ipu off + Pbase "100e6" + Vbase "500e3" + OutputType "Complex" + PhasorSimulation off + PSBequivalent "0" + } + Block { + BlockType Reference + Name "Voltage Measurement1" + SID "871" + Ports [0, 1, 0, 0, 0, 2] + Position [875, 213, 900, 237] + ZOrder -27 + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Voltage Measurement" + SourceType "Voltage Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" } - } - } - Block { - BlockType SubSystem - Name "Subsystem4" - SID "1466" - Ports [1] - Position [395, 281, 430, 319] - ZOrder -46 - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem4" - Location [982, 630, 1260, 946] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" Block { - BlockType Inport - Name "vq" - SID "1467" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" + BlockType Reference + Name "Voltage Measurement2" + SID "872" + Ports [0, 1, 0, 0, 0, 2] + Position [810, 58, 835, 82] + ZOrder -28 + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Voltage Measurement" + SourceType "Voltage Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" } Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1468" - Ports [1] - Position [150, 30, 210, 60] - ZOrder -2 + BlockType Reference + Name "Voltage Measurement6" + SID "873" + Ports [0, 1, 0, 0, 0, 2] + Position [875, 263, 900, 287] + ZOrder -29 ShowName off - VariableName "vq" - MaxDataPoints "inf" - SampleTime "-1" + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Voltage Measurement" + SourceType "Voltage Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" } Block { - BlockType ZeroOrderHold - Name "Zero-Order\nHold1" - SID "1469" - Position [80, 30, 115, 60] - ZOrder -3 + BlockType Reference + Name "Voltage Measurement7" + SID "874" + Ports [0, 1, 0, 0, 0, 2] + Position [875, 308, 900, 332] + ZOrder -30 ShowName off - SampleTime "5e-6" + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Voltage Measurement" + SourceType "Voltage Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" } - Line { - SrcBlock "vq" - SrcPort 1 - DstBlock "Zero-Order\nHold1" - DstPort 1 + Block { + BlockType PMIOPort + Name "A" + SID "875" + Position [25, 68, 55, 82] + ZOrder -31 + Port "1" + Side "Left" } - Line { - SrcBlock "Zero-Order\nHold1" - SrcPort 1 - DstBlock "To Workspace1" - DstPort 1 + Block { + BlockType PMIOPort + Name "A " + SID "876" + Position [1340, 113, 1370, 127] + ZOrder -32 + BlockMirror on + Port "2" + Side "Right" } - } - } - Block { - BlockType SubSystem - Name "Subsystem5" - SID "1470" - Ports [1] - Position [700, 66, 735, 104] - ZOrder -47 - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem5" - Location [982, 630, 1260, 946] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" Block { - BlockType Inport - Name "id_ref" - SID "1471" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" + BlockType PMIOPort + Name "B" + SID "877" + Position [25, 113, 55, 127] + ZOrder -33 + Port "3" + Side "Left" } Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1472" - Ports [1] - Position [145, 30, 205, 60] - ZOrder -2 - ShowName off - VariableName "id_ref" - MaxDataPoints "inf" - SampleTime "-1" + BlockType PMIOPort + Name "B " + SID "878" + Position [1340, 143, 1370, 157] + ZOrder -34 + BlockMirror on + Port "4" + Side "Right" } Block { - BlockType ZeroOrderHold - Name "Zero-Order\nHold1" - SID "1473" - Position [80, 30, 115, 60] - ZOrder -3 - ShowName off - SampleTime "5e-6" + BlockType PMIOPort + Name "C" + SID "879" + Position [25, 158, 55, 172] + ZOrder -35 + Port "5" + Side "Left" + } + Block { + BlockType PMIOPort + Name "C " + SID "880" + Position [1340, 173, 1370, 187] + ZOrder -36 + BlockMirror on + Port "6" + Side "Right" } Line { - SrcBlock "id_ref" + SrcBlock "Three-Phase \nI Measurement" SrcPort 1 - DstBlock "Zero-Order\nHold1" + DstBlock "Subsystem2" DstPort 1 } Line { - SrcBlock "Zero-Order\nHold1" + SrcBlock "Voltage Measurement1" SrcPort 1 - DstBlock "To Workspace1" - DstPort 1 - } - } - } - Block { - BlockType SubSystem - Name "Subsystem6" - SID "1474" - Ports [1] - Position [700, 21, 735, 59] - ZOrder -48 - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem6" - Location [982, 630, 1260, 946] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "id" - SID "1475" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" + Points [40, 0] + Branch { + DstBlock "Goto5" + DstPort 1 + } + Branch { + Points [0, 25] + Branch { + DstBlock "Mux2" + DstPort 1 + } + Branch { + Points [0, 135] + DstBlock "Subsystem3" + DstPort 1 + } + } } - Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1476" - Ports [1] - Position [145, 30, 205, 60] - ZOrder -2 - ShowName off - VariableName "id" - MaxDataPoints "inf" - SampleTime "-1" + Line { + SrcBlock "Voltage Measurement6" + SrcPort 1 + Points [25, 0] + Branch { + DstBlock "Goto7" + DstPort 1 + } + Branch { + Points [0, 25] + Branch { + DstBlock "Mux2" + DstPort 2 + } + Branch { + Points [0, 130] + DstBlock "Subsystem4" + DstPort 1 + } + } } - Block { - BlockType ZeroOrderHold - Name "Zero-Order\nHold1" - SID "1477" - Position [80, 30, 115, 60] - ZOrder -3 - ShowName off - SampleTime "5e-6" + Line { + SrcBlock "Voltage Measurement7" + SrcPort 1 + Points [10, 0] + Branch { + DstBlock "Goto8" + DstPort 1 + } + Branch { + Points [0, 30] + Branch { + DstBlock "Mux2" + DstPort 3 + } + Branch { + Points [0, 125] + DstBlock "Subsystem5" + DstPort 1 + } + } } Line { - SrcBlock "id" + SrcBlock "Mux2" SrcPort 1 - DstBlock "Zero-Order\nHold1" + DstBlock "Goto9" DstPort 1 } Line { - SrcBlock "Zero-Order\nHold1" + SrcBlock "Three-Phase\nV Measurement" SrcPort 1 - DstBlock "To Workspace1" + Points [12, 0; 0, -55] + DstBlock "Subsystem1" DstPort 1 } - } - } - Block { - BlockType SubSystem - Name "Subsystem7" - SID "1478" - Ports [1] - Position [700, 326, 735, 364] - ZOrder -49 - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem7" - Location [982, 630, 1260, 946] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "iq_ref" - SID "1479" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" + Line { + LineType "Connection" + SrcBlock "A" + SrcPort RConn1 + DstBlock "Three-Phase \nI Measurement" + DstPort LConn1 } - Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1480" - Ports [1] - Position [145, 30, 205, 60] - ZOrder -2 - ShowName off - VariableName "iq_ref" - MaxDataPoints "inf" - SampleTime "-1" + Line { + LineType "Connection" + Points [765, 120; 560, 0] + DstBlock "A " + DstPort RConn1 + Branch { + ConnectType "SRC_SRC" + Points [-33, 0] + Branch { + ConnectType "DEST_SRC" + Points [-52, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Three-Phase\nV Measurement" + DstPort RConn1 + } + Branch { + ConnectType "DEST_SRC" + Points [0, 205] + DstBlock "Voltage Measurement7" + DstPort LConn2 + } + } + Branch { + ConnectType "DEST_SRC" + Points [0, 100] + DstBlock "Voltage Measurement1" + DstPort LConn1 + } + } + Branch { + ConnectType "SRC_SRC" + Points [0, -55] + DstBlock "Voltage Measurement2" + DstPort LConn1 + } } - Block { - BlockType ZeroOrderHold - Name "Zero-Order\nHold1" - SID "1481" - Position [85, 30, 120, 60] - ZOrder -3 - ShowName off - SampleTime "5e-6" + Line { + LineType "Connection" + SrcBlock "B" + SrcPort RConn1 + DstBlock "Three-Phase \nI Measurement" + DstPort LConn2 } Line { - SrcBlock "iq_ref" - SrcPort 1 - DstBlock "Zero-Order\nHold1" - DstPort 1 + LineType "Connection" + SrcBlock "B " + SrcPort RConn1 + Points [-605, 0] + Branch { + ConnectType "DEST_SRC" + Points [-12, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Three-Phase\nV Measurement" + DstPort RConn2 + } + Branch { + ConnectType "DEST_SRC" + Points [0, 120] + DstBlock "Voltage Measurement6" + DstPort LConn1 + } + } + Branch { + ConnectType "DEST_SRC" + Points [0, 80] + DstBlock "Voltage Measurement1" + DstPort LConn2 + } + } + Line { + LineType "Connection" + SrcBlock "C" + SrcPort RConn1 + DstBlock "Three-Phase \nI Measurement" + DstPort LConn3 + } + Line { + LineType "Connection" + SrcBlock "C " + SrcPort RConn1 + Points [-627, 0] + Branch { + ConnectType "DEST_SRC" + Points [-9, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Three-Phase\nV Measurement" + DstPort RConn3 + } + Branch { + ConnectType "DEST_SRC" + Points [0, 135] + DstBlock "Voltage Measurement7" + DstPort LConn1 + } + } + Branch { + ConnectType "DEST_SRC" + Points [0, 100] + DstBlock "Voltage Measurement6" + DstPort LConn2 + } } Line { - SrcBlock "Zero-Order\nHold1" + SrcBlock "Voltage Measurement2" SrcPort 1 - DstBlock "To Workspace1" + DstBlock "Goto1" DstPort 1 } - } - } - Block { - BlockType SubSystem - Name "Subsystem8" - SID "1482" - Ports [1] - Position [700, 281, 735, 319] - ZOrder -50 - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem8" - Location [982, 630, 1260, 946] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "iq" - SID "1483" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" + Line { + LineType "Connection" + SrcBlock "Ground" + SrcPort LConn1 + Points [0, -5] + DstBlock "Voltage Measurement2" + DstPort LConn2 } - Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1484" - Ports [1] - Position [140, 30, 200, 60] - ZOrder -2 - ShowName off - VariableName "iq" - MaxDataPoints "inf" - SampleTime "-1" + Line { + LineType "Connection" + SrcBlock "Current Measurement1" + SrcPort LConn1 + DstBlock "Three-Phase \nI Measurement" + DstPort RConn1 } - Block { - BlockType ZeroOrderHold - Name "Zero-Order\nHold1" - SID "1485" - Position [80, 30, 115, 60] - ZOrder -3 - ShowName off - SampleTime "5e-6" + Line { + LineType "Connection" + SrcBlock "Three-Phase \nI Measurement" + SrcPort RConn2 + DstBlock "Current Measurement2" + DstPort LConn1 } Line { - SrcBlock "iq" - SrcPort 1 - DstBlock "Zero-Order\nHold1" - DstPort 1 + LineType "Connection" + SrcBlock "Three-Phase \nI Measurement" + SrcPort RConn3 + DstBlock "Current Measurement3" + DstPort LConn1 + } + Line { + LineType "Connection" + SrcBlock "Current Measurement3" + SrcPort RConn1 + Points [60, 0; 0, 10] + DstBlock "Three-Phase\nV Measurement" + DstPort LConn3 + } + Line { + LineType "Connection" + SrcBlock "Current Measurement2" + SrcPort RConn1 + Points [60, 0; 0, -5] + DstBlock "Three-Phase\nV Measurement" + DstPort LConn2 + } + Line { + LineType "Connection" + SrcBlock "Current Measurement1" + SrcPort RConn1 + Points [60, 0; 0, -20] + DstBlock "Three-Phase\nV Measurement" + DstPort LConn1 } Line { - SrcBlock "Zero-Order\nHold1" + SrcBlock "Current Measurement3" SrcPort 1 - DstBlock "To Workspace1" + Points [15, 0; 0, 155] + DstBlock "Subsystem8" DstPort 1 } - } - } - Block { - BlockType SubSystem - Name "Subsystem9" - SID "1486" - Ports [1] - Position [185, 21, 220, 59] - ZOrder -51 - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem9" - Location [982, 630, 1260, 946] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "Vabc_ref" - SID "1487" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1488" - Ports [1] - Position [135, 30, 195, 60] - ZOrder -2 - ShowName off - VariableName "Vabc_ref" - MaxDataPoints "inf" - SampleTime "-1" - } - Block { - BlockType ZeroOrderHold - Name "Zero-Order\nHold1" - SID "1489" - Position [80, 30, 115, 60] - ZOrder -3 - ShowName off - SampleTime "5e-6" - } Line { - SrcBlock "Vabc_ref" + SrcBlock "Current Measurement2" SrcPort 1 - DstBlock "Zero-Order\nHold1" + Points [30, 0; 0, 145] + DstBlock "Subsystem7" DstPort 1 } Line { - SrcBlock "Zero-Order\nHold1" + SrcBlock "Current Measurement1" SrcPort 1 - DstBlock "To Workspace1" + Points [45, 0; 0, 135] + DstBlock "Subsystem6" DstPort 1 } } } Block { - BlockType Scope - Name "Voltage Control Loop" - SID "1490" - Ports [2] - Position [455, 118, 560, 267] - ZOrder -19 - Floating off - Location [729, 166, 1513, 962] - Open off - NumInputPorts "2" - ZoomMode "yonly" - List { - ListType AxesTitles - axes1 "d Reference Frame Voltage Controller, vd / vd* (V)" - axes2 "q Reference Frame Voltage Controller, vq / vq* (V)" - } - ShowLegends off - TimeRange "1" - YMin "162.5~-100" - YMax "207.5~100" - SaveName "ScopeData3" - DataFormat "StructureWithTime" - LimitDataPoints off - SampleTime "0" + BlockType Reference + Name "Neutral" + SID "2901" + Ports [0, 0, 0, 0, 0, 1] + Position [155, 255, 175, 275] + ZOrder 2 + BlockRotation 270 + BlockMirror on + ShowName off + AttributesFormatString "node %" + LibraryVersion "1.2191" + SourceBlock "powerlib/Elements/Neutral" + SourceType "Neutral" + LConnTagsString "a" + NodeNumber "10" } Block { - BlockType Scope - Name "Voltage References" - SID "1491" - Ports [1] - Position [175, 69, 235, 151] - ZOrder -19 - Floating off - Location [712, 253, 1496, 1049] - Open off - NumInputPorts "1" - ZoomMode "xonly" - List { - ListType AxesTitles - axes1 "Voltage References, Vabc* (V)" - } - ShowLegends off - TimeRange "4" - YMin "-100" - YMax "80" - SaveName "ScopeData4" - DataFormat "StructureWithTime" - LimitDataPoints off - SampleTime "0" + BlockType Reference + Name "Series RLC Branch1" + SID "2463" + Ports [0, 0, 0, 0, 0, 1, 1] + Position [395, 151, 465, 179] + ZOrder -13 + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Elements/Series RLC Branch" + SourceType "Series RLC Branch" + LConnTagsString "__new0" + RConnTagsString "__new0" + BranchType "RL" + Resistance "0.1" + Inductance "30e-3" + SetiL0 off + InitialCurrent "0" + Capacitance "1e-6" + Setx0 off + InitialVoltage "0" + Measurements "Branch voltage" } - Line { - SrcBlock "From2" - SrcPort 1 - Points [15, 0] - Branch { - DstBlock "Mux" - DstPort 1 - } - Branch { - Points [0, -95] - DstBlock "Subsystem3" - DstPort 1 - } + Block { + BlockType Reference + Name "Series RLC Branch2" + SID "881" + Ports [0, 0, 0, 0, 0, 1, 1] + Position [395, 106, 465, 134] + ZOrder -13 + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Elements/Series RLC Branch" + SourceType "Series RLC Branch" + LConnTagsString "__new0" + RConnTagsString "__new0" + BranchType "RL" + Resistance "0.1" + Inductance "30e-3" + SetiL0 off + InitialCurrent "0" + Capacitance "1e-6" + Setx0 off + InitialVoltage "0" + Measurements "Branch voltage" } - Line { - SrcBlock "From3" - SrcPort 1 - Points [35, 0] - Branch { - DstBlock "Mux" - DstPort 2 - } - Branch { - Points [0, -90] - DstBlock "Subsystem1" - DstPort 1 - } + Block { + BlockType Reference + Name "Series RLC Branch3" + SID "2464" + Ports [0, 0, 0, 0, 0, 1, 1] + Position [395, 196, 465, 224] + ZOrder -13 + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Elements/Series RLC Branch" + SourceType "Series RLC Branch" + LConnTagsString "__new0" + RConnTagsString "__new0" + BranchType "RL" + Resistance "0.1" + Inductance "30e-3" + SetiL0 off + InitialCurrent "0" + Capacitance "1e-6" + Setx0 off + InitialVoltage "0" + Measurements "Branch voltage" } - Line { - SrcBlock "From4" - SrcPort 1 - Points [35, 0] - Branch { - DstBlock "Mux2" - DstPort 1 - } - Branch { - Points [0, 90] - DstBlock "Subsystem4" - DstPort 1 - } + Block { + BlockType Reference + Name "Three-Level Bridge" + SID "2900" + Ports [1, 0, 0, 0, 0, 3, 3] + Position [210, 100, 265, 180] + ZOrder 1 + BlockMirror on + NamePlacement "alternate" + LibraryVersion "1.2191" + SourceBlock "powerlib/Power\nElectronics/Three-Level Bridge" + SourceType "Three-Level Bridge" + Arms "3" + SnubberResistance "1e5" + SbubberCapacitance "inf" + Device "GTO / Diodes" + Ron "1e-3" + ForwardVoltages "[ 0 0 ]" + Measurements "None" } - Line { - SrcBlock "From5" - SrcPort 1 - Points [15, 0] - Branch { - DstBlock "Mux2" - DstPort 2 - } - Branch { - Points [0, 95] - DstBlock "Subsystem2" - DstPort 1 - } + Block { + BlockType PMIOPort + Name "+" + SID "883" + Position [25, 88, 55, 102] + ZOrder -16 + Port "1" + Side "Right" } - Line { - SrcBlock "Mux" - SrcPort 1 - DstBlock "Voltage Control Loop" - DstPort 1 + Block { + BlockType PMIOPort + Name "A" + SID "884" + Position [730, 113, 760, 127] + ZOrder -17 + BlockMirror on + Port "2" + Side "Left" } - Line { - SrcBlock "Mux2" - SrcPort 1 - DstBlock "Voltage Control Loop" - DstPort 2 + Block { + BlockType PMIOPort + Name "B" + SID "885" + Position [730, 158, 760, 172] + ZOrder -18 + BlockMirror on + Port "3" + Side "Left" } - Line { - SrcBlock "From6" - SrcPort 1 - Points [15, 0] - Branch { - DstBlock "Mux3" - DstPort 1 - } - Branch { - Points [0, -95] - DstBlock "Subsystem6" - DstPort 1 - } + Block { + BlockType PMIOPort + Name "-" + SID "886" + Position [25, 183, 55, 197] + ZOrder -19 + Port "4" + Side "Right" } - Line { - SrcBlock "From8" - SrcPort 1 - Points [35, 0] - Branch { - DstBlock "Mux3" - DstPort 2 - } - Branch { - Points [0, -90] - DstBlock "Subsystem5" - DstPort 1 - } + Block { + BlockType PMIOPort + Name "C" + SID "887" + Position [730, 203, 760, 217] + ZOrder -20 + BlockMirror on + Port "5" + Side "Left" } Line { - SrcBlock "From9" - SrcPort 1 - Points [35, 0] - Branch { - DstBlock "Mux4" - DstPort 1 - } - Branch { - Points [0, 90] - DstBlock "Subsystem8" - DstPort 1 - } + LineType "Connection" + SrcBlock "Series RLC Branch2" + SrcPort RConn1 + DstBlock "AC Load Measurements" + DstPort LConn1 } Line { - SrcBlock "From12" - SrcPort 1 - Points [15, 0] - Branch { - DstBlock "Mux4" - DstPort 2 - } - Branch { - Points [0, 95] - DstBlock "Subsystem7" - DstPort 1 - } + LineType "Connection" + SrcBlock "Series RLC Branch1" + SrcPort RConn1 + DstBlock "AC Load Measurements" + DstPort LConn2 } Line { - SrcBlock "From20" - SrcPort 1 - Points [15, 0] - Branch { - DstBlock "Voltage References" - DstPort 1 - } - Branch { - Points [0, -70] - DstBlock "Subsystem9" - DstPort 1 - } + LineType "Connection" + SrcBlock "Series RLC Branch3" + SrcPort RConn1 + DstBlock "AC Load Measurements" + DstPort LConn3 } Line { - SrcBlock "Mux3" - SrcPort 1 - DstBlock "Current Control Loop" - DstPort 1 + LineType "Connection" + SrcBlock "AC Load Measurements" + SrcPort RConn1 + DstBlock "A" + DstPort RConn1 } Line { - SrcBlock "Mux4" - SrcPort 1 - DstBlock "Current Control Loop" - DstPort 2 + LineType "Connection" + SrcBlock "AC Load Measurements" + SrcPort RConn2 + DstBlock "B" + DstPort RConn1 } Line { - SrcBlock "From13" - SrcPort 1 - Points [15, 0] - Branch { - DstBlock "Frequency Reference" - DstPort 2 - } - Branch { - Points [0, 105] - DstBlock "Subsystem11" - DstPort 1 - } + LineType "Connection" + SrcBlock "AC Load Measurements" + SrcPort RConn3 + DstBlock "C" + DstPort RConn1 } Line { - SrcBlock "From11" - SrcPort 1 - Points [35, 0] - Branch { - DstBlock "Frequency Reference" - DstPort 1 - } - Branch { - Points [0, 100] - DstBlock "Subsystem10" - DstPort 1 - } + LineType "Connection" + SrcBlock "-" + SrcPort RConn1 + Points [63, 0; 0, -25] + DstBlock "Three-Level Bridge" + DstPort RConn3 } Line { - SrcBlock "From16" - SrcPort 1 - Points [10, 0] - Branch { - DstBlock "PWM" - DstPort 2 - } - Branch { - Points [0, 60] - DstBlock "Subsystem13" - DstPort 1 - } + LineType "Connection" + SrcBlock "+" + SrcPort RConn1 + Points [63, 0; 0, 20] + DstBlock "Three-Level Bridge" + DstPort RConn1 } Line { - SrcBlock "From15" + SrcBlock "S" SrcPort 1 - Points [10, 0] - Branch { - DstBlock "PWM" - DstPort 1 - } - Branch { - Points [0, -55] - DstBlock "Subsystem12" - DstPort 1 - } - } - } - } - Block { - BlockType SubSystem - Name "Inverter Control \nMeasurements1" - SID "1551" - Ports [] - Position [145, 285, 308, 383] - ZOrder -46 - NamePlacement "alternate" - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - Object { - $PropName "MaskObject" - $ObjectID 30 - $ClassName "Simulink.Mask" - Display "disp('Boost Converter Control')" - } - System { - Name "Inverter Control \nMeasurements1" - Location [427, 66, 837, 558] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Scope - Name "Boost Converter Control\nMPPT" - SID "1769" - Ports [3] - Position [190, 65, 295, 215] - ZOrder -19 - Floating off - Location [729, 166, 1513, 962] - Open off - NumInputPorts "3" - ZoomMode "yonly" - List { - ListType AxesTitles - axes1 "Reference Voltage of the PV Array, Vref (V)" - axes2 "Modulation Index" - axes3 "Switch pulses" - } - ShowLegends off - TimeRange "1" - YMin "162.5~-100~-5" - YMax "207.5~100~5" - SaveName "ScopeData16" - DataFormat "StructureWithTime" - LimitDataPoints off - SampleTime "0" - } - Block { - BlockType From - Name "From5" - SID "1766" - Position [55, 76, 120, 104] - ZOrder -8 - ShowName off - GotoTag "Vref" - TagVisibility "global" - } - Block { - BlockType From - Name "From6" - SID "1767" - Position [55, 126, 120, 154] - ZOrder -8 - ShowName off - GotoTag "delta" - TagVisibility "global" - } - Block { - BlockType From - Name "From7" - SID "1768" - Position [55, 176, 120, 204] - ZOrder -8 - ShowName off - GotoTag "pulsos" - TagVisibility "global" + Points [-29, 0; 0, 35] + DstBlock "Three-Level Bridge" + DstPort 1 } Line { - SrcBlock "From5" - SrcPort 1 - DstBlock "Boost Converter Control\nMPPT" - DstPort 1 + LineType "Connection" + SrcBlock "Series RLC Branch2" + SrcPort LConn1 + Points [-50, 0; 0, 10] + DstBlock "Three-Level Bridge" + DstPort LConn1 } Line { - SrcBlock "From6" - SrcPort 1 - DstBlock "Boost Converter Control\nMPPT" - DstPort 2 + LineType "Connection" + SrcBlock "Series RLC Branch1" + SrcPort LConn1 + Points [-100, 0] + DstBlock "Three-Level Bridge" + DstPort LConn2 } Line { - SrcBlock "From7" - SrcPort 1 - DstBlock "Boost Converter Control\nMPPT" - DstPort 3 + LineType "Connection" + SrcBlock "Three-Level Bridge" + SrcPort RConn2 + Points [-30, 0] + DstBlock "Neutral" + DstPort LConn1 + } + Line { + LineType "Connection" + SrcBlock "Three-Level Bridge" + SrcPort LConn3 + Points [57, 0; 0, 40] + DstBlock "Series RLC Branch3" + DstPort LConn1 } } } Block { BlockType SubSystem - Name "Inverter Control \nMeasurements2" - SID "1626" - Ports [] - Position [145, 685, 308, 783] - ZOrder -47 - NamePlacement "alternate" - ShowName off + Name "DC BUS " + SID "1269" + Ports [0, 0, 0, 0, 0, 2, 2] + Position [135, 155, 200, 315] + ZOrder -2 + BlockMirror on MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" @@ -17048,14 +6704,8 @@ Model { Opaque off RequestExecContextInheritance off MaskHideContents off - Object { - $PropName "MaskObject" - $ObjectID 31 - $ClassName "Simulink.Mask" - Display "disp('Bidirectional Converter Control')" - } System { - Name "Inverter Control \nMeasurements2" + Name "DC BUS " Location [-8, -8, 1608, 908] Open off ModelBrowserVisibility off @@ -17070,250 +6720,99 @@ Model { ShowPageBoundaries off ZoomFactor "100" Block { - BlockType Scope - Name "Control Loops" - SID "1699" - Ports [2] - Position [230, 38, 335, 187] - ZOrder -19 - Floating off - Location [729, 166, 1513, 962] - Open off - NumInputPorts "2" - ZoomMode "yonly" - List { - ListType AxesTitles - axes1 "DC Bus Voltage Controller, Vdc / Vdc* (V)" - axes2 "Battery Current Controller, Ibat / Ibat* (A)" - } - ShowLegends off - TimeRange "1" - YMin "162.5~-100" - YMax "207.5~100" - SaveName "ScopeData3" - DataFormat "StructureWithTime" - LimitDataPoints off - SampleTime "0" - } - Block { - BlockType From - Name "From1" - SID "1728" - Position [25, 41, 90, 69] - ZOrder -8 - ShowName off - GotoTag "Vdc" - TagVisibility "global" - } - Block { - BlockType From - Name "From2" - SID "1729" - Position [25, 81, 90, 109] - ZOrder -8 - ShowName off - GotoTag "Vdc_ref" - TagVisibility "global" - } - Block { - BlockType From - Name "From3" - SID "1730" - Position [25, 116, 90, 144] - ZOrder -8 - ShowName off - GotoTag "Ibat" - TagVisibility "global" - } - Block { - BlockType From - Name "From4" - SID "1731" - Position [25, 156, 90, 184] - ZOrder -8 - ShowName off - GotoTag "Ibat_ref" - TagVisibility "global" - } - Block { - BlockType From - Name "From5" - SID "1750" - Position [400, 46, 465, 74] - ZOrder -8 - ShowName off - GotoTag "Sign" - TagVisibility "global" - } - Block { - BlockType From - Name "From6" - SID "1751" - Position [400, 96, 465, 124] - ZOrder -8 - ShowName off - GotoTag "S1" - TagVisibility "global" - } - Block { - BlockType From - Name "From7" - SID "1752" - Position [400, 146, 465, 174] - ZOrder -8 - ShowName off - GotoTag "S2" - TagVisibility "global" - } - Block { - BlockType Mux - Name "Mux" - SID "1642" - Ports [2, 1] - Position [185, 35, 190, 115] - ZOrder -27 + BlockType Reference + Name "Current Measurement1" + SID "1270" + Ports [0, 1, 0, 0, 0, 1, 1] + Position [330, 53, 355, 77] + ZOrder -1 ShowName off - Inputs "2" - DisplayOption "bar" + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Current Measurement" + SourceType "Current Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" } Block { - BlockType Mux - Name "Mux2" - SID "1643" - Ports [2, 1] - Position [185, 110, 190, 190] - ZOrder -28 - ShowName off - Inputs "2" - DisplayOption "bar" + BlockType Reference + Name "DC Bus" + SID "2794" + Ports [0, 0, 0, 0, 0, 1, 1] + Position [166, 130, 194, 170] + ZOrder 15 + BlockRotation 270 + BlockMirror on + NamePlacement "alternate" + AttributesFormatString "\\n" + LibraryVersion "1.2191" + SourceBlock "powerlib/Elements/Series RLC Branch" + SourceType "Series RLC Branch" + LConnTagsString "__new0" + RConnTagsString "__new0" + BranchType "C" + Resistance "1" + Inductance "5e-03" + SetiL0 off + InitialCurrent "0" + Capacitance "10e-3/2" + Setx0 off + InitialVoltage "1000/2" + Measurements "None" } Block { - BlockType Scope - Name "Switch Control" - SID "1749" - Ports [3] - Position [535, 35, 640, 185] - ZOrder -19 - Floating off - Location [729, 166, 1513, 962] - Open off - NumInputPorts "3" - ZoomMode "yonly" - List { - ListType AxesTitles - axes1 "Current Direction, Sign" - axes2 "Switch S1 pulses, Buck Mode Charging" - axes3 "Switch S2 pulses, Boost Mode Charging" - } - ShowLegends off - TimeRange "1" - YMin "162.5~-100~-5" - YMax "207.5~100~5" - SaveName "ScopeData10" - DataFormat "StructureWithTime" - LimitDataPoints off - SampleTime "0" - } - Line { - SrcBlock "From1" - SrcPort 1 - DstBlock "Mux" - DstPort 1 - } - Line { - SrcBlock "From2" - SrcPort 1 - DstBlock "Mux" - DstPort 2 - } - Line { - SrcBlock "From3" - SrcPort 1 - DstBlock "Mux2" - DstPort 1 - } - Line { - SrcBlock "From4" - SrcPort 1 - DstBlock "Mux2" - DstPort 2 - } - Line { - SrcBlock "Mux" - SrcPort 1 - DstBlock "Control Loops" - DstPort 1 - } - Line { - SrcBlock "Mux2" - SrcPort 1 - DstBlock "Control Loops" - DstPort 2 - } - Line { - SrcBlock "From5" - SrcPort 1 - DstBlock "Switch Control" - DstPort 1 - } - Line { - SrcBlock "From6" - SrcPort 1 - DstBlock "Switch Control" - DstPort 2 + BlockType Reference + Name "DC Bus " + SID "2795" + Ports [0, 0, 0, 0, 0, 1, 1] + Position [166, 215, 194, 255] + ZOrder 14 + BlockRotation 270 + BlockMirror on + NamePlacement "alternate" + AttributesFormatString "\\n" + LibraryVersion "1.2191" + SourceBlock "powerlib/Elements/Series RLC Branch" + SourceType "Series RLC Branch" + LConnTagsString "__new0" + RConnTagsString "__new0" + BranchType "C" + Resistance "1" + Inductance "5e-03" + SetiL0 off + InitialCurrent "0" + Capacitance "10e-3/2" + Setx0 off + InitialVoltage "1000/2" + Measurements "None" } - Line { - SrcBlock "From7" - SrcPort 1 - DstBlock "Switch Control" - DstPort 3 + Block { + BlockType Reference + Name "Ground" + SID "2796" + Ports [0, 0, 0, 0, 0, 1] + Position [229, 220, 251, 245] + ZOrder 13 + BlockRotation 270 + BlockMirror on + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Elements/Ground" + SourceType "Ground" + LConnTagsString "a" } - } - } - Block { - BlockType SubSystem - Name "Inverter Control \nMeasurements3" - SID "1974" - Ports [] - Position [1085, 855, 1248, 953] - ZOrder -48 - NamePlacement "alternate" - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - Object { - $PropName "MaskObject" - $ObjectID 32 - $ClassName "Simulink.Mask" - Display "disp('Frequency Measurement')" - } - System { - Name "Inverter Control \nMeasurements3" - Location [0, 0, 1600, 876] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" Block { BlockType SubSystem - Name "PLL" - SID "2056" + Name "Subsystem1" + SID "1274" Ports [1] - Position [195, 34, 340, 136] - ZOrder -1 + Position [390, 16, 425, 54] + ZOrder -5 + ShowName off MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" @@ -17322,8 +6821,8 @@ Model { RequestExecContextInheritance off MaskHideContents off System { - Name "PLL" - Location [252, 257, 1032, 637] + Name "Subsystem1" + Location [982, 630, 1289, 1003] Open off ModelBrowserVisibility off ModelBrowserWidth 200 @@ -17338,1124 +6837,2430 @@ Model { ZoomFactor "100" Block { BlockType Inport - Name "Vabc" - SID "2057" - Position [45, 53, 75, 67] + Name "Idcinv" + SID "1275" + Position [25, 38, 55, 52] ZOrder -1 IconDisplay "Port number" } Block { - BlockType Demux - Name "Demux" - SID "2058" - Ports [1, 2] - Position [340, 29, 345, 136] - ZOrder -2 + BlockType Goto + Name "Goto2" + SID "1276" + Position [150, 31, 210, 59] + ZOrder -20 + NamePlacement "alternate" ShowName off - Outputs "2" - DisplayOption "bar" + GotoTag "Idcinv" + TagVisibility "global" } Block { - BlockType Integrator - Name "Integrator" - SID "2062" + BlockType Reference + Name "LPF vq11" + SID "1823" Ports [1, 1] - Position [625, 95, 655, 125] - ZOrder -3 + Position [110, 139, 130, 171] + ZOrder -21 ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" } Block { - BlockType SubSystem - Name "PI" - SID "2063" - Ports [1, 1] - Position [475, 89, 570, 131] - ZOrder -4 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "PI" - Location [193, 129, 783, 507] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "e" - SID "2064" - Position [30, 65, 45, 95] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Gain - Name "Gain1" - SID "2065" - Position [160, 61, 215, 99] - ZOrder -2 - ShowName off - Gain "10" - ParamDataTypeStr "Inherit: Inherit via internal rule" - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Gain - Name "Gain2" - SID "2066" - Position [160, 136, 215, 174] - ZOrder -3 - ShowName off - Gain "100" - ParamDataTypeStr "Inherit: Inherit via internal rule" - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Integrator - Name "Integrator" - SID "2067" - Ports [1, 1] - Position [280, 140, 310, 170] - ZOrder -4 - ShowName off - } - Block { - BlockType Saturate - Name "Saturation" - SID "2068" - Ports [1, 1] - Position [430, 65, 460, 95] - ZOrder -5 - ShowName off - InputPortMap "u0" - UpperLimit "inf" - LowerLimit "-inf" - } - Block { - BlockType Sum - Name "Sum1" - SID "2069" - Ports [2, 1] - Position [335, 70, 355, 90] - ZOrder -6 - ShowName off - IconShape "round" - Inputs "|++" - InputSameDT off - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Outport - Name "w" - SID "2070" - Position [505, 65, 520, 95] - ZOrder -7 - IconDisplay "Port number" - } - Line { - SrcBlock "Integrator" - SrcPort 1 - Points [30, 0] - DstBlock "Sum1" - DstPort 2 - } - Line { - SrcBlock "Gain1" - SrcPort 1 - DstBlock "Sum1" + BlockType ToWorkspace + Name "To Workspace1" + SID "1277" + Ports [1] + Position [150, 75, 210, 105] + ZOrder -22 + ShowName off + VariableName "Idcinv" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ToWorkspace + Name "To Workspace2" + SID "1822" + Ports [1] + Position [150, 140, 210, 170] + ZOrder -23 + ShowName off + VariableName "Idcinv1" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Idcinv" + SrcPort 1 + Points [35, 0] + Branch { + DstBlock "Goto2" DstPort 1 - } - Line { - SrcBlock "e" - SrcPort 1 - Points [50, 0] + } + Branch { + Points [0, 45] Branch { - Points [0, 75] - DstBlock "Gain2" + DstBlock "To Workspace1" DstPort 1 } Branch { - DstBlock "Gain1" - DstPort 1 - } - } - Line { - SrcBlock "Gain2" - SrcPort 1 - DstBlock "Integrator" - DstPort 1 - } - Line { - SrcBlock "Saturation" - SrcPort 1 - DstBlock "w" - DstPort 1 - } - Line { - SrcBlock "Sum1" - SrcPort 1 - DstBlock "Saturation" + DstBlock "LPF vq11" DstPort 1 } } } + Line { + SrcBlock "LPF vq11" + SrcPort 1 + DstBlock "To Workspace2" + DstPort 1 + } + } + } + Block { + BlockType SubSystem + Name "Subsystem2" + SID "1278" + Ports [1] + Position [390, 186, 425, 224] + ZOrder -6 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem2" + Location [982, 630, 1288, 1020] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Vdcinv" + SID "1279" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } Block { - BlockType SubSystem - Name "Subsystem3" - SID "2092" + BlockType Goto + Name "Goto2" + SID "1280" + Position [135, 31, 195, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Vdcinv" + TagVisibility "global" + } + Block { + BlockType Reference + Name "LPF vq11" + SID "1825" + Ports [1, 1] + Position [115, 139, 145, 171] + ZOrder -21 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "1281" Ports [1] - Position [625, 31, 675, 69] - ZOrder -5 + Position [135, 75, 195, 105] + ZOrder -22 ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem3" - Location [982, 630, 1261, 993] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "wabc" - SID "2093" - Position [15, 38, 45, 52] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Goto - Name "Goto2" - SID "2098" - Position [140, 30, 200, 60] - ZOrder -2 - ShowName off - GotoTag "w_abc" - TagVisibility "global" - } - Block { - BlockType Reference - Name "LPF vq7" - SID "2094" - Ports [1, 1] - Position [100, 137, 120, 163] - ZOrder -3 - ShowName off - LibraryVersion "1.664" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" - SourceType "Discrete 1st-Order Filter" - FilterType "Lowpass" - Tc "10e-3" - Ts "5e-6" - Initialize off - Vac_Init "[0.8 -25 60]" - Vdc_Init "0" - PlotResponse off - param1 "[1 100 0.1]" - } - Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "2095" - Ports [1] - Position [120, 75, 180, 105] - ZOrder -4 - ShowName off - VariableName "wabc_real" - MaxDataPoints "inf" - SampleTime "-1" - } - Block { - BlockType ToWorkspace - Name "To Workspace2" - SID "2096" - Ports [1] - Position [140, 135, 200, 165] - ZOrder -5 - ShowName off - VariableName "wabc_real_fil" - MaxDataPoints "inf" - SampleTime "-1" - } - Block { - BlockType ZeroOrderHold - Name "Zero-Order\nHold" - SID "2097" - Position [65, 30, 80, 60] - ZOrder -6 - ShowName off - SampleTime "5e-6" - } - Line { - SrcBlock "LPF vq7" - SrcPort 1 - DstBlock "To Workspace2" - DstPort 1 - } - Line { - SrcBlock "wabc" - SrcPort 1 - DstBlock "Zero-Order\nHold" - DstPort 1 - } - Line { - SrcBlock "Zero-Order\nHold" - SrcPort 1 - Points [0, 0] - Branch { - Points [0, 40] - Branch { - DstBlock "LPF vq7" + VariableName "Vdcinv" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ToWorkspace + Name "To Workspace2" + SID "1824" + Ports [1] + Position [165, 140, 225, 170] + ZOrder -23 + ShowName off + VariableName "Vdcinv1" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Vdcinv" + SrcPort 1 + Points [40, 0] + Branch { + DstBlock "Goto2" DstPort 1 - } + } + Branch { + Points [0, 45] Branch { - Points [0, 5] DstBlock "To Workspace1" DstPort 1 } - } Branch { - DstBlock "Goto2" + DstBlock "LPF vq11" DstPort 1 } - } } } - Block { - BlockType Terminator - Name "Terminator" - SID "2091" - Position [400, 45, 420, 65] - ZOrder -6 - ShowName off + Line { + SrcBlock "LPF vq11" + SrcPort 1 + DstBlock "To Workspace2" + DstPort 1 } - Block { - BlockType SubSystem - Name "abc - d/q" - SID "2071" - Ports [2, 1] - Position [150, 39, 275, 126] - ZOrder -7 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "abc - d/q" - Location [407, 631, 923, 963] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "abc" - SID "2072" - Position [25, 58, 55, 72] - ZOrder -1 - IconDisplay "Port number" - } - Block { - BlockType Inport - Name "tita" - SID "2073" - Position [195, 98, 225, 112] - ZOrder -2 - Port "2" - IconDisplay "Port number" - } - Block { - BlockType SubSystem - Name "abc - alfa/beta" - SID "2074" - Ports [1, 1] - Position [80, 29, 185, 101] - ZOrder -3 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "abc - alfa/beta" - Location [332, 617, 833, 1023] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "abc" - SID "2075" - Position [25, 95, 40, 125] - ZOrder -1 - IconDisplay "Port number" + } + } + Block { + BlockType Reference + Name "Voltage Measurement1" + SID "1282" + Ports [0, 1, 0, 0, 0, 2] + Position [325, 193, 350, 217] + ZOrder -7 + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Voltage Measurement" + SourceType "Voltage Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" + } + Block { + BlockType PMIOPort + Name "+ " + SID "1283" + Position [445, 63, 475, 77] + ZOrder -8 + BlockMirror on + Port "1" + Side "Left" + } + Block { + BlockType PMIOPort + Name "- " + SID "1284" + Position [445, 323, 475, 337] + ZOrder -9 + BlockMirror on + Port "2" + Side "Left" + } + Block { + BlockType PMIOPort + Name "+ " + SID "1285" + Position [65, 58, 95, 72] + ZOrder -10 + NamePlacement "alternate" + Port "3" + Side "Right" + } + Block { + BlockType PMIOPort + Name "- " + SID "1286" + Position [85, 323, 115, 337] + ZOrder -11 + NamePlacement "alternate" + Port "4" + Side "Right" + } + Line { + LineType "Connection" + Points [295, 70; -115, 0] + Branch { + ConnectType "SRC_DEST" + SrcBlock "Voltage Measurement1" + SrcPort LConn1 + Points [-15, 0; 0, -130] + } + Branch { + ConnectType "SRC_SRC" + Points [0, -5] + DstBlock "Current Measurement1" + DstPort LConn1 + } + Branch { + ConnectType "DEST_SRC" + Points [-70, 0] + DstBlock "+ " + DstPort RConn1 + } + Branch { + ConnectType "DEST_DEST" + SrcBlock "DC Bus" + SrcPort LConn1 + Points [0, -45] + } + } + Line { + LineType "Connection" + Points [295, 330; -115, 0] + Branch { + ConnectType "SRC_DEST" + SrcBlock "- " + SrcPort RConn1 + Points [-135, 0] + } + Branch { + ConnectType "SRC_SRC" + Points [0, -120] + DstBlock "Voltage Measurement1" + DstPort LConn2 + } + Branch { + ConnectType "DEST_DEST" + SrcBlock "DC Bus " + SrcPort RConn1 + Points [0, 60] + } + Branch { + ConnectType "DEST_SRC" + DstBlock "- " + DstPort RConn1 + } + } + Line { + SrcBlock "Voltage Measurement1" + SrcPort 1 + DstBlock "Subsystem2" + DstPort 1 + } + Line { + SrcBlock "Current Measurement1" + SrcPort 1 + Points [15, 0] + DstBlock "Subsystem1" + DstPort 1 + } + Line { + LineType "Connection" + SrcBlock "Current Measurement1" + SrcPort RConn1 + DstBlock "+ " + DstPort RConn1 + } + Line { + LineType "Connection" + SrcBlock "DC Bus " + SrcPort LConn1 + Points [0, -10] + Branch { + ConnectType "DEST_SRC" + DstBlock "DC Bus" + DstPort RConn1 + } + Branch { + ConnectType "DEST_SRC" + Points [60, 0] + DstBlock "Ground" + DstPort LConn1 + } + } + } + } + Block { + BlockType Reference + Name "PWM Generator\n(3-Level)" + SID "2899" + Ports [0, 1] + Position [575, 156, 625, 194] + ZOrder 2 + BlockMirror on + NamePlacement "alternate" + LibraryVersion "1.31" + FontName "Arial" + SourceBlock "powerlib_meascontrol/Pulse & Signal\nGenerators/PWM Generator\n(3-Level)" + SourceType "PWM Generator (3-Level)" + ModulatorType "Three-phase bridge (12 pulses)" + ModulatorMode "Unsynchronized" + nF "27*50" + Fc "27*50" + ModulatingSignals on + m "0.8" + Freq "50" + Phase "0" + Ts "0" + } + Block { + BlockType PMIOPort + Name "+" + SID "1073" + Position [25, 188, 55, 202] + ZOrder -4 + Port "1" + Side "Right" + } + Block { + BlockType PMIOPort + Name "A" + SID "1074" + Position [450, 208, 480, 222] + ZOrder -5 + BlockMirror on + Port "2" + Side "Left" + } + Block { + BlockType PMIOPort + Name "B" + SID "1075" + Position [450, 248, 480, 262] + ZOrder -6 + BlockMirror on + Port "3" + Side "Left" + } + Block { + BlockType PMIOPort + Name "-" + SID "1076" + Position [25, 268, 55, 282] + ZOrder -7 + Port "4" + Side "Right" + } + Block { + BlockType PMIOPort + Name "C" + SID "1077" + Position [450, 288, 480, 302] + ZOrder -8 + BlockMirror on + Port "5" + Side "Left" + } + Line { + LineType "Connection" + SrcBlock "A" + SrcPort RConn1 + DstBlock "DC / AC Inverter" + DstPort LConn1 + } + Line { + LineType "Connection" + SrcBlock "B" + SrcPort RConn1 + DstBlock "DC / AC Inverter" + DstPort LConn2 + } + Line { + LineType "Connection" + SrcBlock "C" + SrcPort RConn1 + DstBlock "DC / AC Inverter" + DstPort LConn3 + } + Line { + LineType "Connection" + SrcBlock "DC BUS " + SrcPort LConn2 + DstBlock "DC / AC Inverter" + DstPort RConn2 + } + Line { + LineType "Connection" + SrcBlock "DC BUS " + SrcPort LConn1 + DstBlock "DC / AC Inverter" + DstPort RConn1 + } + Line { + LineType "Connection" + SrcBlock "+" + SrcPort RConn1 + DstBlock "DC BUS " + DstPort RConn1 + } + Line { + LineType "Connection" + SrcBlock "-" + SrcPort RConn1 + DstBlock "DC BUS " + DstPort RConn2 + } + Line { + SrcBlock "PWM Generator\n(3-Level)" + SrcPort 1 + DstBlock "DC / AC Inverter" + DstPort 1 + } + } + } + Block { + BlockType SubSystem + Name "PV Array" + SID "2981" + Ports [0, 0, 0, 0, 0, 0, 2] + Position [60, 433, 210, 577] + ZOrder 4 + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + Object { + $PropName "MaskObject" + $ObjectID 29 + $ClassName "Simulink.Mask" + Display "image(imread('img/photo.bmp'))" + } + System { + Name "PV Array" + Location [-8, -8, 1608, 908] + Open on + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "80" + Block { + BlockType FromWorkspace + Name "Ambient Temperature [C] from workspace" + SID "3060" + Position [20, 753, 85, 777] + ZOrder 44 + VariableName "VARTemp'" + OutDataTypeStr "double" + SampleTime "[0.1,0]" + Interpolate off + OutputAfterFinalValue "Setting to zero" + } + Block { + BlockType Reference + Name "Cdc1" + SID "2982" + Ports [0, 0, 0, 0, 0, 1, 1] + Position [1716, 590, 1744, 660] + ZOrder -1 + BlockRotation 270 + BlockMirror on + NamePlacement "alternate" + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Elements/Series RLC Branch" + SourceType "Series RLC Branch" + LConnTagsString "__new0" + RConnTagsString "__new0" + BranchType "C" + Resistance "1" + Inductance "1e-3" + SetiL0 off + InitialCurrent "0" + Capacitance "5e-3" + Setx0 off + InitialVoltage "192" + Measurements "None" + } + Block { + BlockType Reference + Name "Current Measurement2" + SID "2983" + Ports [0, 1, 0, 0, 0, 1, 1] + Position [1510, 528, 1535, 552] + ZOrder -2 + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Current Measurement" + SourceType "Current Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" + } + Block { + BlockType From + Name "From2" + SID "3061" + Position [20, 651, 75, 679] + ZOrder 45 + ShowName off + GotoTag "Vpv" + TagVisibility "global" + } + Block { + BlockType Goto + Name "Goto1" + SID "3068" + Position [155, 485, 195, 515] + ZOrder 50 + BlockMirror on + ShowName off + GotoTag "Irr" + TagVisibility "global" + } + Block { + BlockType Goto + Name "Goto5" + SID "2987" + Position [580, 665, 620, 695] + ZOrder -18 + BlockMirror on + ShowName off + GotoTag "Ipv" + TagVisibility "global" + } + Block { + BlockType Reference + Name "Ia" + SID "2988" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [642, 575, 678, 620] + ZOrder -24 + BlockRotation 270 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" + SourceType "Controlled Current Source" + Initialize on + Source_Type "DC" + Amplitude "0" + Phase "0" + Frequency "0" + Measurements "None" + } + Block { + BlockType Reference + Name "Ia1" + SID "2989" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [702, 575, 738, 620] + ZOrder -24 + BlockRotation 270 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" + SourceType "Controlled Current Source" + Initialize on + Source_Type "DC" + Amplitude "0" + Phase "0" + Frequency "0" + Measurements "None" + } + Block { + BlockType Reference + Name "Ia10" + SID "2990" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [1267, 575, 1303, 620] + ZOrder -24 + BlockRotation 270 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" + SourceType "Controlled Current Source" + Initialize on + Source_Type "DC" + Amplitude "0" + Phase "0" + Frequency "0" + Measurements "None" + } + Block { + BlockType Reference + Name "Ia11" + SID "2991" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [1332, 575, 1368, 620] + ZOrder -24 + BlockRotation 270 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" + SourceType "Controlled Current Source" + Initialize on + Source_Type "DC" + Amplitude "0" + Phase "0" + Frequency "0" + Measurements "None" + } + Block { + BlockType Reference + Name "Ia12" + SID "2992" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [1397, 575, 1433, 620] + ZOrder -24 + BlockRotation 270 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" + SourceType "Controlled Current Source" + Initialize on + Source_Type "DC" + Amplitude "0" + Phase "0" + Frequency "0" + Measurements "None" + } + Block { + BlockType Reference + Name "Ia13" + SID "2993" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [1467, 575, 1503, 620] + ZOrder -24 + BlockRotation 270 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" + SourceType "Controlled Current Source" + Initialize on + Source_Type "DC" + Amplitude "0" + Phase "0" + Frequency "0" + Measurements "None" + } + Block { + BlockType Reference + Name "Ia2" + SID "2994" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [767, 575, 803, 620] + ZOrder -24 + BlockRotation 270 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" + SourceType "Controlled Current Source" + Initialize on + Source_Type "DC" + Amplitude "0" + Phase "0" + Frequency "0" + Measurements "None" + } + Block { + BlockType Reference + Name "Ia3" + SID "2995" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [827, 575, 863, 620] + ZOrder -24 + BlockRotation 270 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" + SourceType "Controlled Current Source" + Initialize on + Source_Type "DC" + Amplitude "0" + Phase "0" + Frequency "0" + Measurements "None" + } + Block { + BlockType Reference + Name "Ia4" + SID "2996" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [887, 575, 923, 620] + ZOrder -24 + BlockRotation 270 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" + SourceType "Controlled Current Source" + Initialize on + Source_Type "DC" + Amplitude "0" + Phase "0" + Frequency "0" + Measurements "None" + } + Block { + BlockType Reference + Name "Ia5" + SID "2997" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [947, 575, 983, 620] + ZOrder -24 + BlockRotation 270 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" + SourceType "Controlled Current Source" + Initialize on + Source_Type "DC" + Amplitude "0" + Phase "0" + Frequency "0" + Measurements "None" + } + Block { + BlockType Reference + Name "Ia6" + SID "2998" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [1007, 575, 1043, 620] + ZOrder -24 + BlockRotation 270 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" + SourceType "Controlled Current Source" + Initialize on + Source_Type "DC" + Amplitude "0" + Phase "0" + Frequency "0" + Measurements "None" + } + Block { + BlockType Reference + Name "Ia7" + SID "2999" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [1072, 575, 1108, 620] + ZOrder -24 + BlockRotation 270 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" + SourceType "Controlled Current Source" + Initialize on + Source_Type "DC" + Amplitude "0" + Phase "0" + Frequency "0" + Measurements "None" + } + Block { + BlockType Reference + Name "Ia8" + SID "3000" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [1132, 575, 1168, 620] + ZOrder -24 + BlockRotation 270 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" + SourceType "Controlled Current Source" + Initialize on + Source_Type "DC" + Amplitude "0" + Phase "0" + Frequency "0" + Measurements "None" + } + Block { + BlockType Reference + Name "Ia9" + SID "3001" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [1197, 575, 1233, 620] + ZOrder -24 + BlockRotation 270 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" + SourceType "Controlled Current Source" + Initialize on + Source_Type "DC" + Amplitude "0" + Phase "0" + Frequency "0" + Measurements "None" + } + Block { + BlockType SubSystem + Name "MATLAB Function1" + SID "3062" + Ports [3, 1] + Position [370, 564, 505, 716] + ZOrder 42 + LibraryVersion "1.32" + ErrorFcn "Stateflow.Translate.translate" + PermitHierarchicalResolution "ExplicitOnly" + TreatAsAtomicUnit on + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + SFBlockType "MATLAB Function" + System { + Name "MATLAB Function1" + Location [223, 338, 826, 833] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + SIDHighWatermark "23" + Block { + BlockType Inport + Name "Vpv" + SID "3062::1" + Position [20, 101, 40, 119] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Inport + Name "Irr" + SID "3062::21" + Position [20, 136, 40, 154] + ZOrder 7 + Port "2" + IconDisplay "Port number" + } + Block { + BlockType Inport + Name "T_amb" + SID "3062::22" + Position [20, 171, 40, 189] + ZOrder 8 + Port "3" + IconDisplay "Port number" + } + Block { + BlockType Demux + Name " Demux " + SID "3062::19" + Ports [1, 1] + Position [270, 230, 320, 270] + ZOrder 5 + Outputs "1" + } + Block { + BlockType S-Function + Name " SFunction " + SID "3062::18" + Tag "Stateflow S-Function Microgrid_24h_Simulation 1" + Ports [3, 2] + Position [180, 105, 230, 185] + ZOrder 4 + FunctionName "sf_sfun" + PortCounts "[3 2]" + EnableBusSupport on + Port { + PortNumber 2 + Name "Ipv" + RTWStorageClass "Auto" + DataLoggingNameMode "SignalName" + } + } + Block { + BlockType Terminator + Name " Terminator " + SID "3062::20" + Position [460, 241, 480, 259] + ZOrder 6 + } + Block { + BlockType Outport + Name "Ipv" + SID "3062::5" + Position [460, 101, 480, 119] + ZOrder -5 + IconDisplay "Port number" + } + Line { + SrcBlock "Vpv" + SrcPort 1 + DstBlock " SFunction " + DstPort 1 + } + Line { + SrcBlock "Irr" + SrcPort 1 + DstBlock " SFunction " + DstPort 2 + } + Line { + SrcBlock "T_amb" + SrcPort 1 + DstBlock " SFunction " + DstPort 3 + } + Line { + Name "Ipv" + Labels [0, 0] + SrcBlock " SFunction " + SrcPort 2 + DstBlock "Ipv" + DstPort 1 + } + Line { + SrcBlock " Demux " + SrcPort 1 + DstBlock " Terminator " + DstPort 1 + } + Line { + SrcBlock " SFunction " + SrcPort 1 + DstBlock " Demux " + DstPort 1 + } + } + } + Block { + BlockType RateLimiter + Name "Rate Limiter" + SID "3076" + Position [210, 670, 240, 700] + ZOrder 52 + BlockRotation 270 + RisingSlewLimit "2.5" + FallingSlewLimit "-2.5" + } + Block { + BlockType FromWorkspace + Name "Solar Irradiance [kW] from workspace" + SID "3063" + Position [20, 703, 85, 727] + ZOrder 43 + VariableName "VARins'" + SampleTime "[0.1,0]" + Interpolate off + OutputAfterFinalValue "Setting to zero" + } + Block { + BlockType SubSystem + Name "Subsystem1" + SID "3004" + Ports [1] + Position [1630, 606, 1665, 644] + ZOrder -66 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem1" + Location [982, 611, 1366, 928] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Vpv" + SID "3005" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "3006" + Position [235, 31, 295, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Vpv" + TagVisibility "global" + } + Block { + BlockType Reference + Name "LPF vq2" + SID "3007" + Ports [1, 1] + Position [140, 74, 165, 106] + ZOrder -21 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "3008" + Ports [1] + Position [235, 75, 295, 105] + ZOrder -22 + ShowName off + VariableName "Vpv" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Vpv" + SrcPort 1 + Points [25, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + DstBlock "LPF vq2" + DstPort 1 + } + } + Line { + SrcBlock "LPF vq2" + SrcPort 1 + DstBlock "To Workspace1" + DstPort 1 + } + } + } + Block { + BlockType SubSystem + Name "Subsystem4" + SID "3014" + Ports [1] + Position [1570, 481, 1605, 519] + ZOrder -68 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem4" + Location [982, 630, 1231, 931] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Ipv" + SID "3015" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "3016" + Position [120, 31, 180, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Ipv_array" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "3017" + Ports [1] + Position [120, 75, 180, 105] + ZOrder -21 + ShowName off + VariableName "Ipv_array" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Ipv" + SrcPort 1 + Points [25, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 0; 0, 45] + DstBlock "To Workspace1" + DstPort 1 + } + } + } + } + Block { + BlockType Reference + Name "Va" + SID "3018" + Ports [0, 1, 0, 0, 0, 2] + Position [1575, 613, 1600, 637] + ZOrder -35 + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Voltage Measurement" + SourceType "Voltage Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" + } + Block { + BlockType PMIOPort + Name "+" + SID "3019" + Position [1775, 530, 1790, 560] + ZOrder -71 + BlockMirror on + Port "1" + Side "Right" + } + Block { + BlockType PMIOPort + Name "-" + SID "3020" + Position [1775, 700, 1790, 730] + ZOrder -72 + BlockMirror on + NamePlacement "alternate" + Port "2" + Side "Right" + } + Line { + SrcBlock "Va" + SrcPort 1 + DstBlock "Subsystem1" + DstPort 1 + } + Line { + LineType "Connection" + SrcBlock "Ia" + SrcPort LConn1 + Points [0, 85; 60, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Ia1" + DstPort LConn1 + } + Branch { + ConnectType "DEST_SRC" + Points [65, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Ia2" + DstPort LConn1 + } + Branch { + ConnectType "DEST_SRC" + Points [60, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Ia3" + DstPort LConn1 + } + Branch { + ConnectType "DEST_SRC" + Points [60, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Ia4" + DstPort LConn1 + } + Branch { + ConnectType "DEST_SRC" + Points [60, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Ia5" + DstPort LConn1 + } + Branch { + ConnectType "DEST_SRC" + Points [60, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Ia6" + DstPort LConn1 } - Block { - BlockType Mux - Name "Mux" - SID "2076" - Ports [2, 1] - Position [315, 65, 320, 165] - ZOrder -2 - ShowName off - Inputs "2" - DisplayOption "bar" + Branch { + ConnectType "DEST_SRC" + Points [65, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Ia7" + DstPort LConn1 } - Block { - BlockType Fcn - Name "d_s" - SID "2077" - Position [110, 73, 255, 107] - ZOrder -3 - Expr "(-1/sqrt(3)*u[2])+(1/sqrt(3)*u[3])" + Branch { + ConnectType "DEST_SRC" + Points [60, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Ia8" + DstPort LConn1 } - Block { - BlockType Fcn - Name "q_s" - SID "2078" - Position [110, 123, 255, 157] - ZOrder -4 - Expr "(2/3)*u[1]-(1/3)*u[2]-(1/3)*u[3]" + Branch { + ConnectType "DEST_SRC" + Points [65, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Ia9" + DstPort LConn1 } - Block { - BlockType Outport - Name "alfa/beta" - SID "2079" - Position [365, 100, 380, 130] - ZOrder -5 - IconDisplay "Port number" + Branch { + ConnectType "DEST_SRC" + Points [70, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Ia10" + DstPort LConn1 } - Line { - SrcBlock "abc" - SrcPort 1 - Points [25, 0] Branch { - Points [0, 30] - DstBlock "q_s" - DstPort 1 + ConnectType "DEST_SRC" + Points [65, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Ia11" + DstPort LConn1 } Branch { - Points [0, -20] - DstBlock "d_s" - DstPort 1 + ConnectType "DEST_SRC" + Points [65, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Ia12" + DstPort LConn1 } + Branch { + ConnectType "DEST_SRC" + Points [70, 0] + Branch { + ConnectType "DEST_SRC" + Points [65, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Va" + DstPort LConn2 } - Line { - SrcBlock "d_s" - SrcPort 1 - DstBlock "Mux" - DstPort 1 + Branch { + ConnectType "DEST_DEST" + Points [1730, 720; -170, 0] + Branch { + ConnectType "SRC_DEST" + SrcBlock "Cdc1" + SrcPort RConn1 + Points [0, 45] } - Line { - SrcBlock "q_s" - SrcPort 1 - DstBlock "Mux" - DstPort 2 + Branch { + ConnectType "SRC_SRC" + Points [30, 0] + DstBlock "-" + DstPort RConn1 } - Line { - SrcBlock "Mux" - SrcPort 1 - DstBlock "alfa/beta" - DstPort 1 } } + Branch { + ConnectType "DEST_SRC" + DstBlock "Ia13" + DstPort LConn1 } - Block { - BlockType SubSystem - Name "alfa/beta - dq" - SID "2080" - Ports [2, 1] - Position [250, 45, 380, 125] - ZOrder -4 - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "alfa/beta - dq" - Location [822, 775, 1323, 1160] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType Inport - Name "alfa/beta" - SID "2081" - Position [25, 50, 40, 80] - ZOrder -1 - IconDisplay "Port number" } - Block { - BlockType Inport - Name "tita" - SID "2082" - Position [25, 125, 40, 155] - ZOrder -2 - Port "2" - IconDisplay "Port number" } - Block { - BlockType Mux - Name "Mux" - SID "2083" - Ports [2, 1] - Position [320, 28, 325, 177] - ZOrder -3 - ShowName off - Inputs "2" - DisplayOption "bar" } - Block { - BlockType Mux - Name "Mux1" - SID "2084" - Ports [2, 1] - Position [65, 28, 70, 177] - ZOrder -4 - ShowName off - Inputs "2" - DisplayOption "bar" } - Block { - BlockType Fcn - Name "d" - SID "2085" - Position [115, 47, 275, 83] - ZOrder -5 - Expr "u[2]*sin(u[3]) + u[1]*cos(u[3])" } - Block { - BlockType Fcn - Name "q" - SID "2086" - Position [115, 123, 280, 157] - ZOrder -6 - Expr "-u[1]*sin(u[3]) + u[2]*cos(u[3])" } - Block { - BlockType Outport - Name "d/q" - SID "2087" - Position [360, 90, 375, 120] - ZOrder -7 - IconDisplay "Port number" } - Line { - SrcBlock "d" - SrcPort 1 - DstBlock "Mux" - DstPort 1 + } + } + } + } + } + } + Line { + LineType "Connection" + SrcBlock "Current Measurement2" + SrcPort LConn1 + Points [-10, 0] + Branch { + ConnectType "DEST_SRC" + Points [-70, 0] + Branch { + ConnectType "DEST_SRC" + Points [-65, 0] + Branch { + ConnectType "DEST_SRC" + Points [-65, 0] + Branch { + ConnectType "DEST_SRC" + Points [-70, 0] + Branch { + ConnectType "DEST_SRC" + Points [-65, 0] + Branch { + ConnectType "DEST_SRC" + Points [-60, 0] + Branch { + ConnectType "DEST_SRC" + Points [-65, 0] + Branch { + ConnectType "DEST_SRC" + Points [-60, 0] + Branch { + ConnectType "DEST_SRC" + Points [-60, 0] + Branch { + ConnectType "DEST_SRC" + Points [-60, 0] + Branch { + ConnectType "DEST_SRC" + Points [-60, 0] + Branch { + ConnectType "DEST_SRC" + Points [-65, 0] + Branch { + ConnectType "DEST_DEST" + SrcBlock "Ia" + SrcPort RConn1 + Points [0, -20; 60, 0] } - Line { - SrcBlock "q" - SrcPort 1 - DstBlock "Mux" - DstPort 2 + Branch { + ConnectType "DEST_DEST" + SrcBlock "Ia1" + SrcPort RConn1 + Points [0, -20] } - Line { - SrcBlock "Mux" - SrcPort 1 - DstBlock "d/q" - DstPort 1 } - Line { - SrcBlock "alfa/beta" - SrcPort 1 - DstBlock "Mux1" - DstPort 1 + Branch { + ConnectType "DEST_DEST" + SrcBlock "Ia2" + SrcPort RConn1 + Points [0, -20] } - Line { - SrcBlock "tita" - SrcPort 1 - DstBlock "Mux1" - DstPort 2 } - Line { - SrcBlock "Mux1" - SrcPort 1 - Points [25, 0] Branch { - DstBlock "d" - DstPort 1 + ConnectType "DEST_DEST" + SrcBlock "Ia3" + SrcPort RConn1 + Points [0, -20] + } } Branch { - DstBlock "q" - DstPort 1 + ConnectType "DEST_DEST" + SrcBlock "Ia4" + SrcPort RConn1 + Points [0, -20] } } + Branch { + ConnectType "DEST_DEST" + SrcBlock "Ia5" + SrcPort RConn1 + Points [0, -20] } } - Block { - BlockType Outport - Name "d/q" - SID "2088" - Position [405, 78, 435, 92] - ZOrder -5 - IconDisplay "Port number" + Branch { + ConnectType "DEST_DEST" + SrcBlock "Ia6" + SrcPort RConn1 + Points [0, -20] } - Line { - SrcBlock "tita" - SrcPort 1 - DstBlock "alfa/beta - dq" - DstPort 2 } - Line { - SrcBlock "alfa/beta - dq" - SrcPort 1 - DstBlock "d/q" - DstPort 1 + Branch { + ConnectType "DEST_DEST" + SrcBlock "Ia7" + SrcPort RConn1 + Points [0, -20] } - Line { - SrcBlock "abc" - SrcPort 1 - DstBlock "abc - alfa/beta" - DstPort 1 } - Line { - SrcBlock "abc - alfa/beta" - SrcPort 1 - DstBlock "alfa/beta - dq" - DstPort 1 + Branch { + ConnectType "DEST_DEST" + SrcBlock "Ia8" + SrcPort RConn1 + Points [0, -20] } } + Branch { + ConnectType "DEST_DEST" + SrcBlock "Ia9" + SrcPort RConn1 + Points [0, -20] + } } - Line { - SrcBlock "Vabc" - SrcPort 1 - DstBlock "abc - d/q" + Branch { + ConnectType "DEST_DEST" + SrcBlock "Ia10" + SrcPort RConn1 + Points [0, -20] + } + } + Branch { + ConnectType "DEST_DEST" + SrcBlock "Ia11" + SrcPort RConn1 + Points [0, -20] + } + } + Branch { + ConnectType "DEST_DEST" + SrcBlock "Ia12" + SrcPort RConn1 + Points [0, -20] + } + } + Branch { + ConnectType "DEST_DEST" + SrcBlock "Ia13" + SrcPort RConn1 + Points [0, -20] + } + } + Line { + LineType "Connection" + SrcBlock "Va" + SrcPort LConn1 + Points [0, -75] + Branch { + ConnectType "DEST_DEST" + SrcBlock "Current Measurement2" + SrcPort RConn1 + Points [10, 0] + } + Branch { + ConnectType "DEST_SRC" + Points [170, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "+" + DstPort RConn1 + } + Branch { + ConnectType "DEST_SRC" + DstBlock "Cdc1" + DstPort LConn1 + } + } + } + Line { + SrcBlock "Current Measurement2" + SrcPort 1 + Points [5, 0; 0, -35] + DstBlock "Subsystem4" + DstPort 1 + } + Line { + SrcBlock "From2" + SrcPort 1 + Points [71, 0; 0, -75] + DstBlock "MATLAB Function1" + DstPort 1 + } + Line { + SrcBlock "MATLAB Function1" + SrcPort 1 + Points [140, 0] + Branch { + Points [0, 40] + DstBlock "Goto5" + DstPort 1 + } + Branch { + DstBlock "Ia" + DstPort 1 + } + Branch { + Points [60, 0] + Branch { + DstBlock "Ia1" + DstPort 1 + } + Branch { + Points [65, 0] + Branch { + DstBlock "Ia2" + DstPort 1 + } + Branch { + Points [60, 0] + Branch { + DstBlock "Ia3" DstPort 1 } - Line { - SrcBlock "Integrator" - SrcPort 1 - Points [35, 0; 0, 60; -600, 0; 0, -65] - DstBlock "abc - d/q" - DstPort 2 - } - Line { - SrcBlock "PI" - SrcPort 1 - Points [20, 0] + Branch { + Points [60, 0] Branch { - DstBlock "Integrator" + DstBlock "Ia4" DstPort 1 } Branch { - Points [0, -60] - DstBlock "Subsystem3" + Points [60, 0] + Branch { + DstBlock "Ia5" DstPort 1 - } - } - Line { - SrcBlock "Demux" - SrcPort 2 - DstBlock "PI" - DstPort 1 - } - Line { - SrcBlock "abc - d/q" - SrcPort 1 - DstBlock "Demux" - DstPort 1 - } - Line { - SrcBlock "Demux" - SrcPort 1 - DstBlock "Terminator" - DstPort 1 - } - } - } - Block { - BlockType SubSystem - Name "Subsystem" - SID "2089" - Ports [0, 1] - Position [50, 54, 120, 116] - ZOrder -2 - ShowName off - MinAlgLoopOccurrences off - PropExecContextOutsideSubsystem off - RTWSystemCode "Auto" - FunctionWithSeparateData off - Opaque off - RequestExecContextInheritance off - MaskHideContents off - System { - Name "Subsystem" - Location [537, 176, 853, 492] - Open off - ModelBrowserVisibility off - ModelBrowserWidth 200 - ScreenColor "white" - PaperOrientation "landscape" - PaperPositionMode "auto" - PaperType "A4" - PaperUnits "centimeters" - TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] - TiledPageScale 1 - ShowPageBoundaries off - ZoomFactor "100" - Block { - BlockType From - Name "From15" - SID "2049" - Position [25, 26, 90, 54] - ZOrder -8 - ShowName off - GotoTag "Vab" - TagVisibility "global" - } - Block { - BlockType From - Name "From16" - SID "2050" - Position [25, 51, 90, 79] - ZOrder -8 - ShowName off - GotoTag "Vbc" - TagVisibility "global" - } - Block { - BlockType From - Name "From17" - SID "2051" - Position [25, 76, 90, 104] - ZOrder -8 - ShowName off - GotoTag "Vca" - TagVisibility "global" - } - Block { - BlockType Reference - Name "LPF vq2" - SID "2052" - Ports [1, 1] - Position [125, 27, 145, 53] - ZOrder -11 - ShowName off - LibraryVersion "1.664" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" - SourceType "Discrete 1st-Order Filter" - FilterType "Lowpass" - Tc "10e-3" - Ts "5e-6" - Initialize off - Vac_Init "[0.8 -25 60]" - Vdc_Init "0" - PlotResponse off - param1 "[1 100 0.1]" - } - Block { - BlockType Reference - Name "LPF vq3" - SID "2053" - Ports [1, 1] - Position [125, 52, 145, 78] - ZOrder -12 - ShowName off - LibraryVersion "1.664" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" - SourceType "Discrete 1st-Order Filter" - FilterType "Lowpass" - Tc "10e-3" - Ts "5e-6" - Initialize off - Vac_Init "[0.8 -25 60]" - Vdc_Init "0" - PlotResponse off - param1 "[1 100 0.1]" - } - Block { - BlockType Reference - Name "LPF vq4" - SID "2054" - Ports [1, 1] - Position [125, 77, 145, 103] - ZOrder -13 - ShowName off - LibraryVersion "1.664" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" - SourceType "Discrete 1st-Order Filter" - FilterType "Lowpass" - Tc "10e-3" - Ts "5e-6" - Initialize off - Vac_Init "[0.8 -25 60]" - Vdc_Init "0" - PlotResponse off - param1 "[1 100 0.1]" - } - Block { - BlockType Mux - Name "Mux" - SID "2055" - Ports [3, 1] - Position [175, 25, 180, 105] - ZOrder -14 - ShowName off - Inputs "3" - DisplayOption "bar" - } - Block { - BlockType Outport - Name "Vabc" - SID "2090" - Position [205, 58, 235, 72] - ZOrder -15 - IconDisplay "Port number" - } - Line { - SrcBlock "From15" - SrcPort 1 - DstBlock "LPF vq2" - DstPort 1 - } - Line { - SrcBlock "From16" - SrcPort 1 - DstBlock "LPF vq3" - DstPort 1 - } - Line { - SrcBlock "From17" - SrcPort 1 - DstBlock "LPF vq4" - DstPort 1 - } - Line { - SrcBlock "LPF vq2" - SrcPort 1 - DstBlock "Mux" - DstPort 1 - } - Line { - SrcBlock "LPF vq3" - SrcPort 1 - DstBlock "Mux" - DstPort 2 - } - Line { - SrcBlock "LPF vq4" - SrcPort 1 - DstBlock "Mux" - DstPort 3 - } - Line { - SrcBlock "Mux" - SrcPort 1 - DstBlock "Vabc" - DstPort 1 + } + Branch { + Points [60, 0] + Branch { + DstBlock "Ia6" + DstPort 1 + } + Branch { + Points [65, 0] + Branch { + DstBlock "Ia7" + DstPort 1 + } + Branch { + Points [60, 0] + Branch { + DstBlock "Ia8" + DstPort 1 + } + Branch { + Points [65, 0] + Branch { + DstBlock "Ia9" + DstPort 1 + } + Branch { + Points [70, 0] + Branch { + DstBlock "Ia10" + DstPort 1 + } + Branch { + Points [65, 0] + Branch { + DstBlock "Ia11" + DstPort 1 + } + Branch { + Points [65, 0] + Branch { + Points [70, 0] + DstBlock "Ia13" + DstPort 1 + } + Branch { + DstBlock "Ia12" + DstPort 1 + } + } + } + } + } + } + } + } + } } } } - Line { - SrcBlock "Subsystem" - SrcPort 1 - DstBlock "PLL" - DstPort 1 - } } } + Line { + SrcBlock "Ambient Temperature [C] from workspace" + SrcPort 1 + Points [208, 0; 0, -75] + DstBlock "MATLAB Function1" + DstPort 3 + } + Line { + SrcBlock "Solar Irradiance [kW] from workspace" + SrcPort 1 + DstBlock "Rate Limiter" + DstPort 1 + } + Line { + SrcBlock "Rate Limiter" + SrcPort 1 + Points [0, -25; 13, 0] + Branch { + Points [0, -140] + DstBlock "Goto1" + DstPort 1 + } + Branch { + DstBlock "MATLAB Function1" + DstPort 2 + } + } + } + } + Block { + BlockType SubSystem + Name "Subsystem" + SID "1362" + Ports [] + Position [1315, 700, 1532, 900] + ZOrder -8 + BackgroundColor "green" + ShowName off + FontName "Arial Narrow" + FontSize 24 + FontWeight "bold" + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + Object { + $PropName "MaskObject" + $ObjectID 30 + $ClassName "Simulink.Mask" + Display "disp('Measurements')" + } + System { + Name "Subsystem" + Location [-8, -8, 1608, 908] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "60" + Block { + BlockType Scope + Name "AC Load Measurements" + SID "1494" + Ports [2] + Position [1465, 64, 1525, 146] + ZOrder -19 + Floating off + Location [5, 44, 1601, 891] + Open off + NumInputPorts "2" + ZoomMode "xonly" + List { + ListType AxesTitles + axes1 "AC Load Voltages Phase to Ground, Vabc (V)" + axes2 "AC Load Currents, Iabc (A)" + } + List { + ListType ScopeGraphics + FigureColor "[1 1 1]" + AxesColor "[1 1 1]" + AxesTickColor "[0 0 0]" + LineColors "[1 1 0;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" + LineStyles "-|-|-|-|-|-" + LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" + MarkerStyles "none|none|none|none|none|none" + } + ShowLegends off + TimeRange "1" + YMin "-1500~-15" + YMax "1500~15" + SaveToWorkspace on + SaveName "ScopeVoltageCurrentAC" + DataFormat "StructureWithTime" + LimitDataPoints off + SampleTime "0" + } + Block { + BlockType Scope + Name "Battery Measurements" + SID "1363" + Ports [4] + Position [295, 481, 385, 599] + ZOrder -20 + Floating off + Location [5, 43, 1601, 890] + Open off + NumInputPorts "4" + ZoomMode "yonly" + List { + ListType AxesTitles + axes1 "Battery State Of Charge, SOC (%)" + axes2 "Battery Current, Ibat (A)" + axes3 "Battery Voltage, Vbat (V)" + axes4 "Battery Power, (W)" + } + List { + ListType ScopeGraphics + FigureColor "[1 1 1]" + AxesColor "[1 1 1]" + AxesTickColor "[0 0 0]" + LineColors "[0.0431372549019608 0.517647058823529 0.780392156862745;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" + LineStyles "-|-|-|-|-|-" + LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" + MarkerStyles "none|none|none|none|none|none" + } + ShowLegends off + TimeRange "2.4" + YMin "47.5003~-157~995.056~-156500" + YMax "52.5003~-152.5~995.07~-151500" + SaveToWorkspace on + SaveName "ScopeBattery" + DataFormat "StructureWithTime" + LimitDataPoints off + SampleTime "0" + } + Block { + BlockType Clock + Name "Clock" + SID "1539" + Position [55, 895, 75, 915] + ZOrder -4 + } + Block { + BlockType Scope + Name "DC Bus Measurements\nBATTERY SIDE" + SID "2902" + Ports [3] + Position [705, 521, 780, 619] + ZOrder 28 + Floating off + Location [5, 43, 1601, 890] + Open off + NumInputPorts "3" + ZoomMode "yonly" + List { + ListType AxesTitles + axes1 "DC Bus Voltage Battery Side, Vdc (V)" + axes2 "DC Bus Current Battery Side, Idc (A)" + axes3 "DC Bus Power Battery Side, Pdc (W)" + } + List { + ListType ScopeGraphics + FigureColor "[1 1 1]" + AxesColor "[1 1 1]" + AxesTickColor "[0 0 0]" + LineColors "[0.0431372549019608 0.517647058823529 0.780392156862745;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" + LineStyles "-|-|-|-|-|-" + LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" + MarkerStyles "none|none|none|none|none|none" + } + ShowLegends off + TimeRange "5" + YMin "300~-4.195073366439502~-5627.098354983158" + YMax "1300~0.1451897988383877~791.6467936668632" + SaveToWorkspace on + SaveName "ScopeDC_Batteryside" + DataFormat "StructureWithTime" + LimitDataPoints off + SampleTime "0" + } + Block { + BlockType Scope + Name "DC Bus Measurements\nINVERTER SIDE" + SID "2903" + Ports [3] + Position [695, 716, 770, 814] + ZOrder 29 + Floating off + Location [5, 43, 1601, 890] + Open off + NumInputPorts "3" + ZoomMode "yonly" + List { + ListType AxesTitles + axes1 "DC Bus Voltage Inverter Side, Vdcinv (V)" + axes2 "DC Bus Current Inverter Side, Idcinv (A)" + axes3 "DC Bus Power Inverter Side, Pdcinv (W)" + } + List { + ListType ScopeGraphics + FigureColor "[1 1 1]" + AxesColor "[1 1 1]" + AxesTickColor "[0 0 0]" + LineColors "[0.0431372549019608 0.517647058823529 0.780392156862745;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" + LineStyles "-|-|-|-|-|-" + LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" + MarkerStyles "none|none|none|none|none|none" + } + ShowLegends off + TimeRange "5" + YMin "300~-4.195073366439502~-5627.098354983158" + YMax "1300~0.1451897988383877~791.6467936668632" + SaveToWorkspace on + SaveName "ScopeDC_Inverter" + DataFormat "StructureWithTime" + LimitDataPoints off + SampleTime "0" + } + Block { + BlockType Scope + Name "DC Bus Measurements\nPV SIDE" + SID "2904" + Ports [3] + Position [700, 326, 775, 424] + ZOrder 30 + Floating off + Location [5, 43, 1601, 890] + Open off + NumInputPorts "3" + ZoomMode "yonly" + List { + ListType AxesTitles + axes1 "DC Bus Voltage PV Side, Vbus (V)" + axes2 "DC Bus Current PV Side, Ibus (A)" + axes3 "DC Bus Power PV Side, Pbus (W)" + } + List { + ListType ScopeGraphics + FigureColor "[1 1 1]" + AxesColor "[1 1 1]" + AxesTickColor "[0 0 0]" + LineColors "[0.0431372549019608 0.517647058823529 0.780392156862745;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" + LineStyles "-|-|-|-|-|-" + LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" + MarkerStyles "none|none|none|none|none|none" + } + ShowLegends off + TimeRange "9" + YMin "0~-150~-60000" + YMax "1600~150~80000" + SaveToWorkspace on + SaveName "ScopeDC_PVside" + DataFormat "StructureWithTime" + LimitDataPoints off + SampleTime "0" + } + Block { + BlockType Scope + Name "Frequency" + SID "2109" + Ports [2] + Position [1545, 664, 1605, 746] + ZOrder -19 + Floating off + Location [5, 43, 1601, 890] + Open off + NumInputPorts "2" + ZoomMode "yonly" + List { + ListType AxesTitles + axes1 "Frequency (Hz)" + axes2 "Frequency Filtered (Hz)" + } + List { + ListType ScopeGraphics + FigureColor "[1 1 1]" + AxesColor "[1 1 1]" + AxesTickColor "[0 0 0]" + LineColors "[0.0431372549019608 0.517647058823529 0.780392156862745;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" + LineStyles "-|-|-|-|-|-" + LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" + MarkerStyles "none|none|none|none|none|none" + } + ShowLegends off + TimeRange "1" + YMin "-150~12.5" + YMax "375~18.5" + SaveToWorkspace on + SaveName "ScopeFrequency" + DataFormat "StructureWithTime" + LimitDataPoints off + SampleTime "0" + } Block { - BlockType Reference - Name "LPF" - SID "1492" - Ports [1, 1] - Position [1255, 429, 1295, 461] - ZOrder -49 + BlockType From + Name "From1" + SID "2906" + Position [435, 526, 500, 554] + ZOrder 32 ShowName off - LibraryVersion "1.664" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" - SourceType "Discrete 1st-Order Filter" - FilterType "Lowpass" - Tc "10e-3" - Ts "5e-6" - Initialize off - Vac_Init "[0.8 -25 60]" - Vdc_Init "0" - PlotResponse off - param1 "[1 100 0.1]" + GotoTag "Vdc" + TagVisibility "global" } Block { - BlockType Reference - Name "LPF vq1" - SID "1790" - Ports [1, 1] - Position [655, 792, 685, 818] - ZOrder -50 + BlockType From + Name "From10" + SID "1367" + Position [55, 541, 120, 569] + ZOrder -28 + NamePlacement "alternate" ShowName off - LibraryVersion "1.664" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" - SourceType "Discrete 1st-Order Filter" - FilterType "Lowpass" - Tc "10e-3" - Ts "5e-6" - Initialize off - Vac_Init "[0.8 -25 60]" - Vdc_Init "0" - PlotResponse off - param1 "[1 100 0.1]" + GotoTag "Vbat" + TagVisibility "global" } Block { - BlockType Reference - Name "LPF vq10" - SID "2102" - Ports [1, 1] - Position [1350, 747, 1370, 773] - ZOrder -51 + BlockType From + Name "From11" + SID "2907" + Position [435, 751, 500, 779] + ZOrder 33 ShowName off - LibraryVersion "1.664" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" - SourceType "Discrete 1st-Order Filter" - FilterType "Lowpass" - Tc "10e-3" - Ts "5e-6" - Initialize off - Vac_Init "[0.8 -25 60]" - Vdc_Init "0" - PlotResponse off - param1 "[1 100 0.1]" + GotoTag "Idcinv" + TagVisibility "global" + } + Block { + BlockType From + Name "From12" + SID "2908" + Position [435, 556, 500, 584] + ZOrder 34 + ShowName off + GotoTag "Idc" + TagVisibility "global" + } + Block { + BlockType From + Name "From13" + SID "3030" + Position [1265, 931, 1365, 959] + ZOrder 42 + ShowName off + GotoTag "ChargeControl" + TagVisibility "global" + } + Block { + BlockType From + Name "From14" + SID "3037" + Position [1065, 211, 1130, 239] + ZOrder 45 + ShowName off + GotoTag "APower" + TagVisibility "global" + } + Block { + BlockType From + Name "From15" + SID "2100" + Position [1250, 671, 1315, 699] + ZOrder -33 + ShowName off + GotoTag "w_abc" + TagVisibility "global" + } + Block { + BlockType From + Name "From16" + SID "3038" + Position [1065, 256, 1130, 284] + ZOrder 46 + ShowName off + GotoTag "RPower" + TagVisibility "global" + } + Block { + BlockType From + Name "From2" + SID "2911" + Position [435, 331, 500, 359] + ZOrder 37 + ShowName off + GotoTag "Vbus" + TagVisibility "global" + } + Block { + BlockType From + Name "From20" + SID "1414" + Position [1245, 356, 1310, 384] + ZOrder -8 + ShowName off + GotoTag "Vload_ab" + TagVisibility "global" + } + Block { + BlockType From + Name "From21" + SID "1415" + Position [1250, 511, 1315, 539] + ZOrder -8 + ShowName off + GotoTag "Vload_a" + TagVisibility "global" + } + Block { + BlockType From + Name "From3" + SID "2912" + Position [435, 361, 500, 389] + ZOrder 38 + ShowName off + GotoTag "Ibus" + TagVisibility "global" + } + Block { + BlockType From + Name "From4" + SID "241" + Position [50, 111, 115, 139] + ZOrder -38 + NamePlacement "alternate" + ShowName off + GotoTag "Vpv" + TagVisibility "global" + Port { + PortNumber 1 + ShowPropagatedSignals "on" + RTWStorageClass "Auto" + DataLoggingNameMode "SignalName" + } + } + Block { + BlockType From + Name "From5" + SID "242" + Position [50, 136, 115, 164] + ZOrder -39 + NamePlacement "alternate" + ShowName off + GotoTag "Ipv_array" + TagVisibility "global" + Port { + PortNumber 1 + ShowPropagatedSignals "on" + RTWStorageClass "Auto" + DataLoggingNameMode "SignalName" + } + } + Block { + BlockType From + Name "From6" + SID "1372" + Position [55, 481, 120, 509] + ZOrder -40 + NamePlacement "alternate" + ShowName off + GotoTag "SOC" + TagVisibility "global" + } + Block { + BlockType From + Name "From7" + SID "1373" + Position [55, 511, 120, 539] + ZOrder -41 + NamePlacement "alternate" + ShowName off + GotoTag "Ibat" + TagVisibility "global" + } + Block { + BlockType From + Name "From8" + SID "2913" + Position [435, 721, 500, 749] + ZOrder 39 + ShowName off + GotoTag "Vdcinv" + TagVisibility "global" + } + Block { + BlockType From + Name "From9" + SID "243" + Position [50, 186, 115, 214] + ZOrder -43 + NamePlacement "alternate" + ShowName off + GotoTag "Irr" + TagVisibility "global" + Port { + PortNumber 1 + ShowPropagatedSignals "on" + RTWStorageClass "Auto" + DataLoggingNameMode "SignalName" + } + } + Block { + BlockType Gain + Name "Gain" + SID "2101" + Position [1355, 664, 1425, 706] + ZOrder -44 + ShowName off + Gain "1/(2*pi)" + ParamDataTypeStr "Inherit: Inherit via internal rule" + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Gain + Name "Gain1" + SID "2620" + Position [1300, 70, 1330, 100] + ZOrder 3 + ParamDataTypeStr "Inherit: Inherit via internal rule" + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off } Block { - BlockType Reference - Name "LPF vq2" - SID "1778" - Ports [1, 1] - Position [145, 109, 170, 141] - ZOrder -52 - ShowName off - LibraryVersion "1.664" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" - SourceType "Discrete 1st-Order Filter" - FilterType "Lowpass" - Tc "10e-3" - Ts "5e-6" - Initialize off - Vac_Init "[0.8 -25 60]" - Vdc_Init "0" - PlotResponse off - param1 "[1 100 0.1]" + BlockType Gain + Name "Gain2" + SID "2621" + Position [1500, 770, 1530, 800] + ZOrder 4 + ParamDataTypeStr "Inherit: Inherit via internal rule" + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off } Block { - BlockType Reference - Name "LPF vq3" - SID "1791" - Ports [1, 1] - Position [655, 762, 685, 788] - ZOrder -53 - ShowName off - LibraryVersion "1.664" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" - SourceType "Discrete 1st-Order Filter" - FilterType "Lowpass" - Tc "10e-3" - Ts "5e-6" - Initialize off - Vac_Init "[0.8 -25 60]" - Vdc_Init "0" - PlotResponse off - param1 "[1 100 0.1]" + BlockType Gain + Name "Gain3" + SID "2622" + Position [190, 480, 220, 510] + ZOrder 5 + ParamDataTypeStr "Inherit: Inherit via internal rule" + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off } Block { - BlockType Reference - Name "LPF vq4" - SID "1792" - Ports [1, 1] - Position [655, 597, 685, 623] - ZOrder -54 - ShowName off - LibraryVersion "1.664" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" - SourceType "Discrete 1st-Order Filter" - FilterType "Lowpass" - Tc "10e-3" - Ts "5e-6" - Initialize off - Vac_Init "[0.8 -25 60]" - Vdc_Init "0" - PlotResponse off - param1 "[1 100 0.1]" + BlockType Gain + Name "Gain4" + SID "2628" + Position [1235, 110, 1265, 140] + ZOrder 9 + ParamDataTypeStr "Inherit: Inherit via internal rule" + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off } Block { - BlockType Reference - Name "LPF vq5" - SID "1793" - Ports [1, 1] - Position [655, 567, 685, 593] - ZOrder -55 - ShowName off - LibraryVersion "1.664" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" - SourceType "Discrete 1st-Order Filter" - FilterType "Lowpass" - Tc "10e-3" - Ts "5e-6" - Initialize off - Vac_Init "[0.8 -25 60]" - Vdc_Init "0" - PlotResponse off - param1 "[1 100 0.1]" + BlockType Gain + Name "Gain5" + SID "2629" + Position [1235, 170, 1265, 200] + ZOrder 10 + ParamDataTypeStr "Inherit: Inherit via internal rule" + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off } Block { - BlockType Reference - Name "LPF vq6" - SID "1794" - Ports [1, 1] - Position [655, 402, 685, 428] - ZOrder -56 - ShowName off - LibraryVersion "1.664" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" - SourceType "Discrete 1st-Order Filter" - FilterType "Lowpass" - Tc "10e-3" - Ts "5e-6" - Initialize off - Vac_Init "[0.8 -25 60]" - Vdc_Init "0" - PlotResponse off - param1 "[1 100 0.1]" + BlockType Gain + Name "Gain6" + SID "2630" + Position [1235, 300, 1265, 330] + ZOrder 11 + ParamDataTypeStr "Inherit: Inherit via internal rule" + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off } Block { - BlockType Reference - Name "LPF vq7" - SID "1795" - Ports [1, 1] - Position [655, 372, 685, 398] - ZOrder -57 - ShowName off - LibraryVersion "1.664" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" - SourceType "Discrete 1st-Order Filter" - FilterType "Lowpass" - Tc "10e-3" - Ts "5e-6" - Initialize off - Vac_Init "[0.8 -25 60]" - Vdc_Init "0" - PlotResponse off - param1 "[1 100 0.1]" + BlockType Gain + Name "Gain7" + SID "3031" + Position [1420, 930, 1450, 960] + ZOrder 43 + ParamDataTypeStr "Inherit: Inherit via internal rule" + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off } Block { - BlockType Reference - Name "LPF1" - SID "1493" - Ports [1, 1] - Position [1255, 584, 1295, 616] - ZOrder -60 + BlockType SubSystem + Name "Inverter Control \nMeasurements1" + SID "1551" + Ports [] + Position [145, 285, 308, 383] + ZOrder -46 + NamePlacement "alternate" ShowName off - LibraryVersion "1.664" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" - SourceType "Discrete 1st-Order Filter" - FilterType "Lowpass" - Tc "10e-3" - Ts "5e-6" - Initialize off - Vac_Init "[0.8 -25 60]" - Vdc_Init "0" - PlotResponse off - param1 "[1 100 0.1]" + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + Object { + $PropName "MaskObject" + $ObjectID 31 + $ClassName "Simulink.Mask" + Display "disp('Boost Converter Control')" + } + System { + Name "Inverter Control \nMeasurements1" + Location [0, 0, 1600, 876] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Scope + Name "Boost Converter Control\nMPPT" + SID "1769" + Ports [3] + Position [190, 65, 295, 215] + ZOrder -19 + Floating off + Location [729, 166, 1513, 962] + Open off + NumInputPorts "3" + ZoomMode "yonly" + List { + ListType AxesTitles + axes1 "Reference Voltage of the PV Array, Vref (V)" + axes2 "Modulation Index" + axes3 "Switch pulses" + } + ShowLegends off + TimeRange "1" + YMin "162.5~-100~-5" + YMax "207.5~100~5" + SaveName "ScopeData16" + DataFormat "StructureWithTime" + LimitDataPoints off + SampleTime "0" + } + Block { + BlockType From + Name "From5" + SID "1766" + Position [55, 76, 120, 104] + ZOrder -8 + ShowName off + GotoTag "Vref" + TagVisibility "global" + } + Block { + BlockType From + Name "From6" + SID "1767" + Position [55, 126, 120, 154] + ZOrder -8 + ShowName off + GotoTag "delta" + TagVisibility "global" + } + Block { + BlockType From + Name "From7" + SID "1768" + Position [55, 176, 120, 204] + ZOrder -8 + ShowName off + GotoTag "pulsos" + TagVisibility "global" + } + Line { + SrcBlock "From5" + SrcPort 1 + DstBlock "Boost Converter Control\nMPPT" + DstPort 1 + } + Line { + SrcBlock "From6" + SrcPort 1 + DstBlock "Boost Converter Control\nMPPT" + DstPort 2 + } + Line { + SrcBlock "From7" + SrcPort 1 + DstBlock "Boost Converter Control\nMPPT" + DstPort 3 + } + } } Block { BlockType SubSystem - Name "Load Power Calculation" - SID "1495" - Ports [0, 2] - Position [1035, 239, 1155, 326] - ZOrder -61 + Name "Inverter Control \nMeasurements2" + SID "1626" + Ports [] + Position [145, 685, 308, 783] + ZOrder -47 + NamePlacement "alternate" + ShowName off MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" @@ -18463,9 +9268,15 @@ Model { Opaque off RequestExecContextInheritance off MaskHideContents off + Object { + $PropName "MaskObject" + $ObjectID 32 + $ClassName "Simulink.Mask" + Display "disp('Bidirectional Converter Control')" + } System { - Name "Load Power Calculation" - Location [496, 316, 1144, 918] + Name "Inverter Control \nMeasurements2" + Location [-8, -8, 1608, 908] Open off ModelBrowserVisibility off ModelBrowserWidth 200 @@ -18479,183 +9290,245 @@ Model { ShowPageBoundaries off ZoomFactor "100" Block { - BlockType Constant - Name "Constant" - SID "1496" - Position [355, 60, 385, 90] - ZOrder -1 - ShowName off - Value "3/2" - } - Block { - BlockType Constant - Name "Constant1" - SID "1497" - Position [355, 235, 385, 265] - ZOrder -2 - ShowName off - Value "3/2" + BlockType Scope + Name "Control Loops" + SID "1699" + Ports [2] + Position [230, 38, 335, 187] + ZOrder -19 + Floating off + Location [729, 166, 1513, 962] + Open off + NumInputPorts "2" + ZoomMode "yonly" + List { + ListType AxesTitles + axes1 "DC Bus Voltage Controller, Vdc / Vdc* (V)" + axes2 "Battery Current Controller, Ibat / Ibat* (A)" + } + ShowLegends off + TimeRange "1" + YMin "162.5~-100" + YMax "207.5~100" + SaveName "ScopeData3" + DataFormat "StructureWithTime" + LimitDataPoints off + SampleTime "0" } Block { BlockType From Name "From1" - SID "1498" - Position [50, 71, 115, 99] - ZOrder -8 - ShowName off - GotoTag "id" - TagVisibility "global" - } - Block { - BlockType From - Name "From11" - SID "1499" - Position [50, 36, 115, 64] + SID "1728" + Position [25, 41, 90, 69] ZOrder -8 ShowName off - GotoTag "vd" + GotoTag "Vdc" TagVisibility "global" } Block { BlockType From Name "From2" - SID "1500" - Position [50, 121, 115, 149] + SID "1729" + Position [25, 81, 90, 109] ZOrder -8 ShowName off - GotoTag "vq" - TagVisibility "global" + GotoTag "Vdc_ref" } Block { BlockType From Name "From3" - SID "1501" - Position [50, 156, 115, 184] + SID "1730" + Position [25, 116, 90, 144] ZOrder -8 ShowName off - GotoTag "iq" + GotoTag "Ibat" TagVisibility "global" } Block { BlockType From Name "From4" - SID "1502" - Position [50, 246, 115, 274] + SID "1731" + Position [25, 156, 90, 184] ZOrder -8 ShowName off - GotoTag "id" - TagVisibility "global" + GotoTag "Ibat_ref" } Block { BlockType From Name "From5" - SID "1503" - Position [50, 211, 115, 239] + SID "1750" + Position [400, 46, 465, 74] ZOrder -8 ShowName off - GotoTag "vq" - TagVisibility "global" + GotoTag "Sign" } Block { BlockType From Name "From6" - SID "1504" - Position [50, 296, 115, 324] + SID "1751" + Position [400, 96, 465, 124] ZOrder -8 ShowName off - GotoTag "vd" - TagVisibility "global" + GotoTag "S1" } Block { BlockType From Name "From7" - SID "1505" - Position [50, 331, 115, 359] + SID "1752" + Position [400, 146, 465, 174] ZOrder -8 ShowName off - GotoTag "iq" - TagVisibility "global" - } - Block { - BlockType Product - Name "Product1" - SID "1506" - Ports [2, 1] - Position [205, 31, 235, 104] - ZOrder -16 - ShowName off - InputSameDT off - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off + GotoTag "S2" } Block { - BlockType Product - Name "Product2" - SID "1507" + BlockType Mux + Name "Mux" + SID "1642" Ports [2, 1] - Position [205, 116, 235, 189] - ZOrder -17 + Position [185, 35, 190, 115] + ZOrder -27 ShowName off - InputSameDT off - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off + Inputs "2" + DisplayOption "bar" } Block { - BlockType Product - Name "Product3" - SID "1508" + BlockType Mux + Name "Mux2" + SID "1643" Ports [2, 1] - Position [430, 56, 460, 129] - ZOrder -18 + Position [185, 110, 190, 190] + ZOrder -28 ShowName off - InputSameDT off - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off + Inputs "2" + DisplayOption "bar" } Block { - BlockType Product - Name "Product4" - SID "1509" - Ports [2, 1] - Position [205, 206, 235, 279] + BlockType Scope + Name "Switch Control" + SID "1749" + Ports [3] + Position [535, 35, 640, 185] ZOrder -19 - ShowName off - InputSameDT off - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off + Floating off + Location [729, 166, 1513, 962] + Open off + NumInputPorts "3" + ZoomMode "yonly" + List { + ListType AxesTitles + axes1 "Current Direction, Sign" + axes2 "Switch S1 pulses, Buck Mode Charging" + axes3 "Switch S2 pulses, Boost Mode Charging" + } + ShowLegends off + TimeRange "1" + YMin "162.5~-100~-5" + YMax "207.5~100~5" + SaveName "ScopeData10" + DataFormat "StructureWithTime" + LimitDataPoints off + SampleTime "0" } - Block { - BlockType Product - Name "Product5" - SID "1510" - Ports [2, 1] - Position [205, 291, 235, 364] - ZOrder -20 - ShowName off - InputSameDT off - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off + Line { + SrcBlock "From1" + SrcPort 1 + DstBlock "Mux" + DstPort 1 } - Block { - BlockType Product - Name "Product6" - SID "1511" - Ports [2, 1] - Position [430, 231, 460, 304] - ZOrder -21 - ShowName off - InputSameDT off - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off + Line { + SrcBlock "From2" + SrcPort 1 + DstBlock "Mux" + DstPort 2 + } + Line { + SrcBlock "From3" + SrcPort 1 + DstBlock "Mux2" + DstPort 1 + } + Line { + SrcBlock "From4" + SrcPort 1 + DstBlock "Mux2" + DstPort 2 + } + Line { + SrcBlock "Mux" + SrcPort 1 + DstBlock "Control Loops" + DstPort 1 + } + Line { + SrcBlock "Mux2" + SrcPort 1 + DstBlock "Control Loops" + DstPort 2 + } + Line { + SrcBlock "From5" + SrcPort 1 + DstBlock "Switch Control" + DstPort 1 + } + Line { + SrcBlock "From6" + SrcPort 1 + DstBlock "Switch Control" + DstPort 2 + } + Line { + SrcBlock "From7" + SrcPort 1 + DstBlock "Switch Control" + DstPort 3 } + } + } + Block { + BlockType SubSystem + Name "Inverter Control \nMeasurements3" + SID "1974" + Ports [] + Position [970, 795, 1133, 893] + ZOrder -48 + NamePlacement "alternate" + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + Object { + $PropName "MaskObject" + $ObjectID 33 + $ClassName "Simulink.Mask" + Display "disp('Frequency Measurement')" + } + System { + Name "Inverter Control \nMeasurements3" + Location [-8, -8, 1608, 908] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" Block { BlockType SubSystem - Name "Subsystem1" - SID "1512" + Name "PLL" + SID "2056" Ports [1] - Position [520, 326, 555, 364] - ZOrder -22 - ShowName off + Position [195, 34, 340, 136] + ZOrder -1 MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" @@ -18664,8 +9537,8 @@ Model { RequestExecContextInheritance off MaskHideContents off System { - Name "Subsystem1" - Location [982, 611, 1438, 973] + Name "PLL" + Location [-8, -8, 1608, 908] Open off ModelBrowserVisibility off ModelBrowserWidth 200 @@ -18680,119 +9553,707 @@ Model { ZoomFactor "100" Block { BlockType Inport - Name "Qacload" - SID "1513" - Position [25, 38, 55, 52] + Name "Vabc" + SID "2057" + Position [45, 53, 75, 67] ZOrder -1 IconDisplay "Port number" } Block { - BlockType Goto - Name "Goto2" - SID "1514" - Position [290, 31, 350, 59] - ZOrder -20 - NamePlacement "alternate" + BlockType Demux + Name "Demux" + SID "2058" + Ports [1, 2] + Position [340, 29, 345, 136] + ZOrder -2 ShowName off - GotoTag "Qacload" - TagVisibility "global" + Outputs "2" + DisplayOption "bar" } Block { - BlockType Reference - Name "LPF vq7" - SID "1813" + BlockType Integrator + Name "Integrator" + SID "2062" Ports [1, 1] - Position [235, 77, 265, 103] - ZOrder -21 + Position [625, 95, 655, 125] + ZOrder -3 ShowName off - LibraryVersion "1.664" - FontName "Verdana" - FontSize 11 - SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" - SourceType "Discrete 1st-Order Filter" - FilterType "Lowpass" - Tc "10e-3" - Ts "5e-6" - Initialize off - Vac_Init "[0.8 -25 60]" - Vdc_Init "0" - PlotResponse off - param1 "[1 100 0.1]" } Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1515" + BlockType SubSystem + Name "PI" + SID "2063" + Ports [1, 1] + Position [475, 89, 570, 131] + ZOrder -4 + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "PI" + Location [193, 129, 783, 507] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "e" + SID "2064" + Position [30, 65, 45, 95] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Gain + Name "Gain1" + SID "2065" + Position [160, 61, 215, 99] + ZOrder -2 + ShowName off + Gain "10" + ParamDataTypeStr "Inherit: Inherit via internal rule" + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Gain + Name "Gain2" + SID "2066" + Position [160, 136, 215, 174] + ZOrder -3 + ShowName off + Gain "100" + ParamDataTypeStr "Inherit: Inherit via internal rule" + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Integrator + Name "Integrator" + SID "2067" + Ports [1, 1] + Position [280, 140, 310, 170] + ZOrder -4 + ShowName off + } + Block { + BlockType Saturate + Name "Saturation" + SID "2068" + Ports [1, 1] + Position [430, 65, 460, 95] + ZOrder -5 + ShowName off + InputPortMap "u0" + UpperLimit "inf" + LowerLimit "-inf" + } + Block { + BlockType Sum + Name "Sum1" + SID "2069" + Ports [2, 1] + Position [335, 70, 355, 90] + ZOrder -6 + ShowName off + IconShape "round" + Inputs "|++" + InputSameDT off + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Outport + Name "w" + SID "2070" + Position [505, 65, 520, 95] + ZOrder -7 + IconDisplay "Port number" + } + Line { + SrcBlock "Integrator" + SrcPort 1 + Points [30, 0] + DstBlock "Sum1" + DstPort 2 + } + Line { + SrcBlock "Gain1" + SrcPort 1 + DstBlock "Sum1" + DstPort 1 + } + Line { + SrcBlock "e" + SrcPort 1 + Points [50, 0] + Branch { + Points [0, 75] + DstBlock "Gain2" + DstPort 1 + } + Branch { + DstBlock "Gain1" + DstPort 1 + } + } + Line { + SrcBlock "Gain2" + SrcPort 1 + DstBlock "Integrator" + DstPort 1 + } + Line { + SrcBlock "Saturation" + SrcPort 1 + DstBlock "w" + DstPort 1 + } + Line { + SrcBlock "Sum1" + SrcPort 1 + DstBlock "Saturation" + DstPort 1 + } + } + } + Block { + BlockType SubSystem + Name "Subsystem3" + SID "2092" Ports [1] - Position [290, 75, 350, 105] - ZOrder -22 + Position [625, 31, 675, 69] + ZOrder -5 ShowName off - VariableName "Qacload" - MaxDataPoints "inf" - SampleTime "-1" + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem3" + Location [982, 630, 1261, 993] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "wabc" + SID "2093" + Position [15, 38, 45, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "2098" + Position [140, 30, 200, 60] + ZOrder -2 + ShowName off + GotoTag "w_abc" + TagVisibility "global" + } + Block { + BlockType Reference + Name "LPF vq7" + SID "2094" + Ports [1, 1] + Position [100, 137, 120, 163] + ZOrder -3 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "2095" + Ports [1] + Position [120, 75, 180, 105] + ZOrder -4 + ShowName off + VariableName "wabc_real" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ToWorkspace + Name "To Workspace2" + SID "2096" + Ports [1] + Position [140, 135, 200, 165] + ZOrder -5 + ShowName off + VariableName "wabc_real_fil" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ZeroOrderHold + Name "Zero-Order\nHold" + SID "2097" + Position [65, 30, 80, 60] + ZOrder -6 + ShowName off + SampleTime "5e-6" + } + Line { + SrcBlock "LPF vq7" + SrcPort 1 + DstBlock "To Workspace2" + DstPort 1 + } + Line { + SrcBlock "wabc" + SrcPort 1 + DstBlock "Zero-Order\nHold" + DstPort 1 + } + Line { + SrcBlock "Zero-Order\nHold" + SrcPort 1 + Points [0, 0] + Branch { + Points [0, 40] + Branch { + DstBlock "LPF vq7" + DstPort 1 + } + Branch { + Points [0, 5] + DstBlock "To Workspace1" + DstPort 1 + } + } + Branch { + DstBlock "Goto2" + DstPort 1 + } + } + } } Block { - BlockType ToWorkspace - Name "To Workspace2" - SID "1812" - Ports [1] - Position [290, 130, 350, 160] - ZOrder -23 + BlockType Terminator + Name "Terminator" + SID "2091" + Position [400, 45, 420, 65] + ZOrder -6 ShowName off - VariableName "Qacload1" - MaxDataPoints "inf" - SampleTime "-1" } Block { - BlockType ZeroOrderHold - Name "Zero-Order\nHold" - SID "1516" - Position [125, 30, 160, 60] - ZOrder -24 - SampleTime "5e-6" + BlockType SubSystem + Name "abc - d/q" + SID "2071" + Ports [2, 1] + Position [150, 39, 275, 126] + ZOrder -7 + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "abc - d/q" + Location [407, 631, 923, 963] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "abc" + SID "2072" + Position [25, 58, 55, 72] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Inport + Name "tita" + SID "2073" + Position [195, 98, 225, 112] + ZOrder -2 + Port "2" + IconDisplay "Port number" + } + Block { + BlockType SubSystem + Name "abc - alfa/beta" + SID "2074" + Ports [1, 1] + Position [80, 29, 185, 101] + ZOrder -3 + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "abc - alfa/beta" + Location [332, 617, 833, 1023] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "abc" + SID "2075" + Position [25, 95, 40, 125] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Mux + Name "Mux" + SID "2076" + Ports [2, 1] + Position [315, 65, 320, 165] + ZOrder -2 + ShowName off + Inputs "2" + DisplayOption "bar" + } + Block { + BlockType Fcn + Name "d_s" + SID "2077" + Position [110, 73, 255, 107] + ZOrder -3 + Expr "(-1/sqrt(3)*u[2])+(1/sqrt(3)*u[3])" + } + Block { + BlockType Fcn + Name "q_s" + SID "2078" + Position [110, 123, 255, 157] + ZOrder -4 + Expr "(2/3)*u[1]-(1/3)*u[2]-(1/3)*u[3]" + } + Block { + BlockType Outport + Name "alfa/beta" + SID "2079" + Position [365, 100, 380, 130] + ZOrder -5 + IconDisplay "Port number" + } + Line { + SrcBlock "abc" + SrcPort 1 + Points [25, 0] + Branch { + Points [0, 30] + DstBlock "q_s" + DstPort 1 + } + Branch { + Points [0, -20] + DstBlock "d_s" + DstPort 1 + } + } + Line { + SrcBlock "d_s" + SrcPort 1 + DstBlock "Mux" + DstPort 1 + } + Line { + SrcBlock "q_s" + SrcPort 1 + DstBlock "Mux" + DstPort 2 + } + Line { + SrcBlock "Mux" + SrcPort 1 + DstBlock "alfa/beta" + DstPort 1 + } + } + } + Block { + BlockType SubSystem + Name "alfa/beta - dq" + SID "2080" + Ports [2, 1] + Position [250, 45, 380, 125] + ZOrder -4 + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "alfa/beta - dq" + Location [822, 775, 1323, 1160] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "alfa/beta" + SID "2081" + Position [25, 50, 40, 80] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Inport + Name "tita" + SID "2082" + Position [25, 125, 40, 155] + ZOrder -2 + Port "2" + IconDisplay "Port number" + } + Block { + BlockType Mux + Name "Mux" + SID "2083" + Ports [2, 1] + Position [320, 28, 325, 177] + ZOrder -3 + ShowName off + Inputs "2" + DisplayOption "bar" + } + Block { + BlockType Mux + Name "Mux1" + SID "2084" + Ports [2, 1] + Position [65, 28, 70, 177] + ZOrder -4 + ShowName off + Inputs "2" + DisplayOption "bar" + } + Block { + BlockType Fcn + Name "d" + SID "2085" + Position [115, 47, 275, 83] + ZOrder -5 + Expr "u[2]*sin(u[3]) + u[1]*cos(u[3])" + } + Block { + BlockType Fcn + Name "q" + SID "2086" + Position [115, 123, 280, 157] + ZOrder -6 + Expr "-u[1]*sin(u[3]) + u[2]*cos(u[3])" + } + Block { + BlockType Outport + Name "d/q" + SID "2087" + Position [360, 90, 375, 120] + ZOrder -7 + IconDisplay "Port number" + } + Line { + SrcBlock "d" + SrcPort 1 + DstBlock "Mux" + DstPort 1 + } + Line { + SrcBlock "q" + SrcPort 1 + DstBlock "Mux" + DstPort 2 + } + Line { + SrcBlock "Mux" + SrcPort 1 + DstBlock "d/q" + DstPort 1 + } + Line { + SrcBlock "alfa/beta" + SrcPort 1 + DstBlock "Mux1" + DstPort 1 + } + Line { + SrcBlock "tita" + SrcPort 1 + DstBlock "Mux1" + DstPort 2 + } + Line { + SrcBlock "Mux1" + SrcPort 1 + Points [25, 0] + Branch { + DstBlock "d" + DstPort 1 + } + Branch { + DstBlock "q" + DstPort 1 + } + } + } + } + Block { + BlockType Outport + Name "d/q" + SID "2088" + Position [405, 78, 435, 92] + ZOrder -5 + IconDisplay "Port number" + } + Line { + SrcBlock "tita" + SrcPort 1 + DstBlock "alfa/beta - dq" + DstPort 2 + } + Line { + SrcBlock "alfa/beta - dq" + SrcPort 1 + DstBlock "d/q" + DstPort 1 + } + Line { + SrcBlock "abc" + SrcPort 1 + DstBlock "abc - alfa/beta" + DstPort 1 + } + Line { + SrcBlock "abc - alfa/beta" + SrcPort 1 + DstBlock "alfa/beta - dq" + DstPort 1 + } + } } Line { - SrcBlock "Qacload" + SrcBlock "Vabc" SrcPort 1 - DstBlock "Zero-Order\nHold" + DstBlock "abc - d/q" DstPort 1 } Line { - SrcBlock "Zero-Order\nHold" + SrcBlock "Integrator" SrcPort 1 - Points [55, 0] + Points [35, 0; 0, 60; -600, 0; 0, -65] + DstBlock "abc - d/q" + DstPort 2 + } + Line { + SrcBlock "PI" + SrcPort 1 + Points [20, 0] Branch { - DstBlock "Goto2" + DstBlock "Integrator" DstPort 1 } Branch { - Points [0, 45] - Branch { - Points [0, 55] - DstBlock "To Workspace2" - DstPort 1 - } - Branch { - DstBlock "LPF vq7" + Points [0, -60] + DstBlock "Subsystem3" DstPort 1 - } } } Line { - SrcBlock "LPF vq7" + SrcBlock "Demux" + SrcPort 2 + DstBlock "PI" + DstPort 1 + } + Line { + SrcBlock "abc - d/q" SrcPort 1 - DstBlock "To Workspace1" + DstBlock "Demux" + DstPort 1 + } + Line { + SrcBlock "Demux" + SrcPort 1 + DstBlock "Terminator" DstPort 1 } } } Block { BlockType SubSystem - Name "Subsystem2" - SID "1517" - Ports [1] - Position [520, 151, 555, 189] - ZOrder -23 + Name "Subsystem" + SID "2089" + Ports [0, 1] + Position [50, 54, 120, 116] + ZOrder -2 ShowName off MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off @@ -18802,8 +10263,8 @@ Model { RequestExecContextInheritance off MaskHideContents off System { - Name "Subsystem2" - Location [982, 611, 1407, 980] + Name "Subsystem" + Location [2, 0, 1614, 912] Open off ModelBrowserVisibility off ModelBrowserWidth 200 @@ -18817,31 +10278,64 @@ Model { ShowPageBoundaries off ZoomFactor "100" Block { - BlockType Inport - Name "Pload" - SID "1518" - Position [25, 38, 55, 52] - ZOrder -1 - IconDisplay "Port number" + BlockType From + Name "From15" + SID "2049" + Position [25, 26, 90, 54] + ZOrder -8 + ShowName off + GotoTag "Vab" + TagVisibility "global" } Block { - BlockType Goto - Name "Goto2" - SID "1519" - Position [265, 31, 325, 59] - ZOrder -20 - NamePlacement "alternate" + BlockType From + Name "From16" + SID "2050" + Position [25, 51, 90, 79] + ZOrder -8 + ShowName off + GotoTag "Vbc" + TagVisibility "global" + } + Block { + BlockType From + Name "From17" + SID "2051" + Position [25, 76, 90, 104] + ZOrder -8 ShowName off - GotoTag "Pacload" + GotoTag "Vca" TagVisibility "global" } Block { BlockType Reference - Name "LPF vq7" - SID "1811" + Name "LPF vq2" + SID "2052" + Ports [1, 1] + Position [125, 27, 145, 53] + ZOrder -11 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType Reference + Name "LPF vq3" + SID "2053" Ports [1, 1] - Position [215, 77, 245, 103] - ZOrder -21 + Position [125, 52, 145, 78] + ZOrder -12 ShowName off LibraryVersion "1.664" FontName "Verdana" @@ -18858,256 +10352,327 @@ Model { param1 "[1 100 0.1]" } Block { - BlockType ToWorkspace - Name "To Workspace1" - SID "1520" - Ports [1] - Position [265, 75, 325, 105] - ZOrder -22 + BlockType Reference + Name "LPF vq4" + SID "2054" + Ports [1, 1] + Position [125, 77, 145, 103] + ZOrder -13 ShowName off - VariableName "Pacload" - MaxDataPoints "inf" - SampleTime "-1" + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" } Block { - BlockType ToWorkspace - Name "To Workspace2" - SID "1810" - Ports [1] - Position [265, 130, 325, 160] - ZOrder -23 + BlockType Mux + Name "Mux" + SID "2055" + Ports [3, 1] + Position [175, 25, 180, 105] + ZOrder -14 ShowName off - VariableName "Pacload1" - MaxDataPoints "inf" - SampleTime "-1" + Inputs "3" + DisplayOption "bar" } Block { - BlockType ZeroOrderHold - Name "Zero-Order\nHold" - SID "1521" - Position [110, 30, 145, 60] - ZOrder -24 - SampleTime "5e-6" + BlockType Outport + Name "Vabc" + SID "2090" + Position [205, 58, 235, 72] + ZOrder -15 + IconDisplay "Port number" } Line { - SrcBlock "Pload" + SrcBlock "From15" SrcPort 1 - DstBlock "Zero-Order\nHold" + DstBlock "LPF vq2" DstPort 1 } Line { - SrcBlock "Zero-Order\nHold" + SrcBlock "From16" SrcPort 1 - Points [45, 0] - Branch { - DstBlock "Goto2" - DstPort 1 - } - Branch { - Points [0, 45] - Branch { - Points [0, 55] - DstBlock "To Workspace2" - DstPort 1 - } - Branch { - DstBlock "LPF vq7" - DstPort 1 - } - } + DstBlock "LPF vq3" + DstPort 1 } Line { - SrcBlock "LPF vq7" + SrcBlock "From17" SrcPort 1 - DstBlock "To Workspace1" + DstBlock "LPF vq4" + DstPort 1 + } + Line { + SrcBlock "LPF vq2" + SrcPort 1 + DstBlock "Mux" + DstPort 1 + } + Line { + SrcBlock "LPF vq3" + SrcPort 1 + DstBlock "Mux" + DstPort 2 + } + Line { + SrcBlock "LPF vq4" + SrcPort 1 + DstBlock "Mux" + DstPort 3 + } + Line { + SrcBlock "Mux" + SrcPort 1 + DstBlock "Vabc" DstPort 1 } } } - Block { - BlockType Sum - Name "Sum" - SID "1522" - Ports [2, 1] - Position [295, 100, 315, 120] - ZOrder -24 - ShowName off - IconShape "round" - Inputs "+|+" - InputSameDT off - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Sum - Name "Sum1" - SID "1523" - Ports [2, 1] - Position [295, 275, 315, 295] - ZOrder -25 - ShowName off - IconShape "round" - Inputs "+|-" - InputSameDT off - OutDataTypeStr "Inherit: Inherit via internal rule" - SaturateOnIntegerOverflow off - } - Block { - BlockType Outport - Name "Pload" - SID "1524" - Position [520, 88, 550, 102] - ZOrder -26 - IconDisplay "Port number" - } - Block { - BlockType Outport - Name "Qload" - SID "1525" - Position [520, 263, 550, 277] - ZOrder -27 - Port "2" - IconDisplay "Port number" - } - Line { - SrcBlock "From11" - SrcPort 1 - DstBlock "Product1" - DstPort 1 - } - Line { - SrcBlock "From1" - SrcPort 1 - DstBlock "Product1" - DstPort 2 - } - Line { - SrcBlock "From2" - SrcPort 1 - DstBlock "Product2" - DstPort 1 - } - Line { - SrcBlock "From3" - SrcPort 1 - DstBlock "Product2" - DstPort 2 - } - Line { - SrcBlock "Product1" - SrcPort 1 - Points [65, 0] - DstBlock "Sum" - DstPort 1 - } - Line { - SrcBlock "Product2" - SrcPort 1 - Points [65, 0] - DstBlock "Sum" - DstPort 2 - } - Line { - SrcBlock "Sum" - SrcPort 1 - DstBlock "Product3" - DstPort 2 - } - Line { - SrcBlock "Constant" - SrcPort 1 - DstBlock "Product3" - DstPort 1 - } - Line { - SrcBlock "Product3" - SrcPort 1 - Points [20, 0] - Branch { - DstBlock "Pload" - DstPort 1 - } - Branch { - Points [0, 75] - DstBlock "Subsystem2" - DstPort 1 - } - } - Line { - SrcBlock "From5" - SrcPort 1 - DstBlock "Product4" - DstPort 1 - } - Line { - SrcBlock "From4" - SrcPort 1 - DstBlock "Product4" - DstPort 2 - } - Line { - SrcBlock "From6" - SrcPort 1 - DstBlock "Product5" - DstPort 1 - } - Line { - SrcBlock "From7" - SrcPort 1 - DstBlock "Product5" - DstPort 2 - } - Line { - SrcBlock "Product4" - SrcPort 1 - Points [65, 0] - DstBlock "Sum1" - DstPort 1 - } - Line { - SrcBlock "Product5" - SrcPort 1 - Points [65, 0] - DstBlock "Sum1" - DstPort 2 - } Line { - SrcBlock "Sum1" - SrcPort 1 - DstBlock "Product6" - DstPort 2 - } - Line { - SrcBlock "Constant1" + SrcBlock "Subsystem" SrcPort 1 - DstBlock "Product6" + DstBlock "PLL" DstPort 1 } - Line { - SrcBlock "Product6" - SrcPort 1 - Points [25, 0] - Branch { - DstBlock "Qload" - DstPort 1 - } - Branch { - Points [0, 75] - DstBlock "Subsystem1" - DstPort 1 - } - } } } + Block { + BlockType Reference + Name "LPF" + SID "1492" + Ports [1, 1] + Position [1410, 394, 1450, 426] + ZOrder -49 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType Reference + Name "LPF vq1" + SID "2914" + Ports [1, 1] + Position [525, 752, 555, 778] + ZOrder 27 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType Reference + Name "LPF vq10" + SID "2102" + Ports [1, 1] + Position [1505, 712, 1525, 738] + ZOrder -51 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType Reference + Name "LPF vq2" + SID "1778" + Ports [1, 1] + Position [145, 109, 170, 141] + ZOrder -52 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType Reference + Name "LPF vq3" + SID "2915" + Ports [1, 1] + Position [525, 722, 555, 748] + ZOrder 26 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType Reference + Name "LPF vq4" + SID "2916" + Ports [1, 1] + Position [525, 557, 555, 583] + ZOrder 25 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType Reference + Name "LPF vq5" + SID "2917" + Ports [1, 1] + Position [525, 527, 555, 553] + ZOrder 24 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType Reference + Name "LPF vq6" + SID "2918" + Ports [1, 1] + Position [525, 362, 555, 388] + ZOrder 23 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType Reference + Name "LPF vq7" + SID "2919" + Ports [1, 1] + Position [525, 332, 555, 358] + ZOrder 22 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType Reference + Name "LPF1" + SID "1493" + Ports [1, 1] + Position [1410, 549, 1450, 581] + ZOrder -60 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } Block { BlockType Scope Name "Load Powers" SID "1526" Ports [2] - Position [1195, 239, 1255, 326] + Position [1365, 204, 1425, 291] ZOrder -19 Floating off - Location [-21, 92, 1583, 947] + Location [10, 57, 1592, 890] Open off NumInputPorts "2" ZoomMode "yonly" @@ -19118,19 +10683,20 @@ Model { } List { ListType ScopeGraphics - FigureColor "[0.5 0.5 0.5]" - AxesColor "[0 0 0]" - AxesTickColor "[1 1 1]" - LineColors "[1 1 0;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" + FigureColor "[1 1 1]" + AxesColor "[1 1 1]" + AxesTickColor "[0 0 0]" + LineColors "[0.0431372549019608 0.517647058823529 0.780392156862745;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" LineStyles "-|-|-|-|-|-" LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" MarkerStyles "none|none|none|none|none|none" } ShowLegends off - TimeRange "1 " - YMin "-9800~-1500" - YMax "-8400~1000" - SaveName "ScopeData6" + TimeRange "1" + YMin "4~0" + YMax "13~6.5" + SaveToWorkspace on + SaveName "ScopeLoadPower" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" @@ -19143,7 +10709,7 @@ Model { Position [295, 112, 375, 213] ZOrder -63 Floating off - Location [5, 48, 1605, 859] + Location [5, 43, 1601, 890] Open off NumInputPorts "4" ZoomMode "xonly" @@ -19156,18 +10722,19 @@ Model { } List { ListType ScopeGraphics - FigureColor "[0.5 0.5 0.5]" - AxesColor "[0 0 0]" - AxesTickColor "[1 1 1]" - LineColors "[1 1 0;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" + FigureColor "[1 1 1]" + AxesColor "[1 1 1]" + AxesTickColor "[0 0 0]" + LineColors "[0.0431372549019608 0.517647058823529 0.780392156862745;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" LineStyles "-|-|-|-|-|-" LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" MarkerStyles "none|none|none|none|none|none" } ShowLegends off - YMin "0.19~-6~-2~-9.823e-07" - YMax "0.2125~0~2~-9.814e-07" - SaveName "ScopeData13" + YMin "383.094~109.35~41890~17.5473" + YMax "383.096~109.7~42020~19.3943" + SaveToWorkspace on + SaveName "ScopePV" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" @@ -19187,10 +10754,10 @@ Model { Block { BlockType Product Name "Product1" - SID "1399" + SID "2922" Ports [2, 1] - Position [750, 427, 780, 458] - ZOrder -65 + Position [620, 387, 650, 418] + ZOrder 19 ShowName off InputSameDT off OutDataTypeStr "Inherit: Inherit via internal rule" @@ -19199,10 +10766,10 @@ Model { Block { BlockType Product Name "Product2" - SID "1390" + SID "2923" Ports [2, 1] - Position [750, 622, 780, 653] - ZOrder -66 + Position [620, 582, 650, 613] + ZOrder 18 ShowName off InputSameDT off OutDataTypeStr "Inherit: Inherit via internal rule" @@ -19223,10 +10790,10 @@ Model { Block { BlockType Product Name "Product5" - SID "1546" + SID "2925" Ports [2, 1] - Position [750, 817, 780, 848] - ZOrder -69 + Position [620, 777, 650, 808] + ZOrder 16 ShowName off InputSameDT off OutDataTypeStr "Inherit: Inherit via internal rule" @@ -19237,7 +10804,7 @@ Model { Name "RMS1" SID "1527" Ports [1, 1] - Position [1190, 587, 1235, 613] + Position [1345, 552, 1390, 578] ZOrder -70 ShowName off LibraryVersion "1.664" @@ -19252,7 +10819,7 @@ Model { Name "RMS3" SID "1528" Ports [1, 1] - Position [1190, 432, 1235, 458] + Position [1345, 397, 1390, 423] ZOrder -71 ShowName off LibraryVersion "1.664" @@ -19262,16 +10829,66 @@ Model { SourceType "RMS" f1 "60" } + Block { + BlockType Scope + Name "Scope" + SID "3023" + Ports [1] + Position [1310, 169, 1340, 201] + ZOrder 40 + Floating off + Location [1, 48, 1601, 899] + Open off + NumInputPorts "1" + List { + ListType AxesTitles + axes1 "%" + } + List { + ListType ScopeGraphics + FigureColor "[0.5 0.5 0.5]" + AxesColor "[0 0 0]" + AxesTickColor "[1 1 1]" + LineColors "[1 1 0;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" + LineStyles "-|-|-|-|-|-" + LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" + MarkerStyles "none|none|none|none|none|none" + } + ShowLegends off + SaveName "ScopeData9" + DataFormat "StructureWithTime" + SampleTime "0" + } + Block { + BlockType Scope + Name "Scope1" + SID "3024" + Ports [1] + Position [1310, 299, 1340, 331] + ZOrder 41 + Floating off + Location [188, 390, 512, 629] + Open off + NumInputPorts "1" + List { + ListType AxesTitles + axes1 "%" + } + ShowLegends off + SaveName "ScopeData24" + DataFormat "StructureWithTime" + SampleTime "0" + } Block { BlockType Scope Name "Scope11" SID "1529" Ports [2] - Position [1385, 539, 1445, 621] + Position [1540, 504, 1600, 586] ZOrder -19 ShowName off Floating off - Location [266, 98, 1050, 894] + Location [5, 43, 1601, 890] Open off NumInputPorts "2" ZoomMode "yonly" @@ -19282,10 +10899,10 @@ Model { } List { ListType ScopeGraphics - FigureColor "[0.5 0.5 0.5]" - AxesColor "[0 0 0]" - AxesTickColor "[1 1 1]" - LineColors "[1 1 0;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" + FigureColor "[1 1 1]" + AxesColor "[1 1 1]" + AxesTickColor "[0 0 0]" + LineColors "[0.0431372549019608 0.517647058823529 0.780392156862745;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" LineStyles "-|-|-|-|-|-" LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" MarkerStyles "none|none|none|none|none|none" @@ -19299,16 +10916,48 @@ Model { LimitDataPoints off SampleTime "0" } + Block { + BlockType Scope + Name "Scope2" + SID "3032" + Ports [1] + Position [1525, 929, 1555, 961] + ZOrder 44 + Floating off + Location [5, 41, 1601, 888] + Open off + NumInputPorts "1" + List { + ListType AxesTitles + axes1 "Charge Control" + } + List { + ListType ScopeGraphics + FigureColor "[1 1 1]" + AxesColor "[1 1 1]" + AxesTickColor "[0 0 0]" + LineColors "[0.0431372549019608 0.517647058823529 0.780392156862745;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" + LineStyles "-|-|-|-|-|-" + LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" + MarkerStyles "none|none|none|none|none|none" + } + ShowLegends on + LegendLocations "0.92721 0.93211 0.053885 0.024006" + YMin "1" + YMax "1" + DataFormat "StructureWithTime" + SampleTime "0" + } Block { BlockType Scope Name "Scope4" SID "1530" Ports [2] - Position [1390, 384, 1450, 466] + Position [1545, 349, 1605, 431] ZOrder -19 ShowName off Floating off - Location [478, 98, 1262, 894] + Location [5, 43, 1601, 890] Open off NumInputPorts "2" ZoomMode "yonly" @@ -19319,10 +10968,10 @@ Model { } List { ListType ScopeGraphics - FigureColor "[0.5 0.5 0.5]" - AxesColor "[0 0 0]" - AxesTickColor "[1 1 1]" - LineColors "[1 1 0;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" + FigureColor "[1 1 1]" + AxesColor "[1 1 1]" + AxesTickColor "[0 0 0]" + LineColors "[0.0431372549019608 0.517647058823529 0.780392156862745;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" LineStyles "-|-|-|-|-|-" LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" MarkerStyles "none|none|none|none|none|none" @@ -19341,7 +10990,7 @@ Model { Name "Subsystem" SID "1724" Ports [0, 1] - Position [980, 103, 1035, 137] + Position [1135, 68, 1190, 102] ZOrder -74 ShowName off MinAlgLoopOccurrences off @@ -19444,10 +11093,10 @@ Model { Block { BlockType SubSystem Name "Subsystem1" - SID "1400" + SID "2926" Ports [1] - Position [845, 501, 880, 539] - ZOrder -75 + Position [715, 461, 750, 499] + ZOrder 15 ShowName off MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off @@ -19474,7 +11123,7 @@ Model { Block { BlockType Inport Name "Pbus" - SID "1401" + SID "2927" Position [25, 38, 55, 52] ZOrder -1 IconDisplay "Port number" @@ -19482,7 +11131,7 @@ Model { Block { BlockType Goto Name "Goto2" - SID "1402" + SID "2928" Position [120, 31, 180, 59] ZOrder -20 NamePlacement "alternate" @@ -19493,7 +11142,7 @@ Model { Block { BlockType Reference Name "LPF vq11" - SID "1787" + SID "2929" Ports [1, 1] Position [100, 134, 130, 166] ZOrder -21 @@ -19515,7 +11164,7 @@ Model { Block { BlockType ToWorkspace Name "To Workspace1" - SID "1403" + SID "2930" Ports [1] Position [155, 75, 215, 105] ZOrder -22 @@ -19527,7 +11176,7 @@ Model { Block { BlockType ToWorkspace Name "To Workspace2" - SID "1786" + SID "2931" Ports [1] Position [155, 135, 215, 165] ZOrder -23 @@ -19569,7 +11218,7 @@ Model { Name "Subsystem10" SID "2103" Ports [1] - Position [1405, 800, 1440, 840] + Position [1560, 765, 1595, 805] ZOrder -76 ShowName off MinAlgLoopOccurrences off @@ -19581,7 +11230,7 @@ Model { MaskHideContents off System { Name "Subsystem10" - Location [982, 630, 1261, 993] + Location [-8, -8, 1608, 908] Open off ModelBrowserVisibility off ModelBrowserWidth 200 @@ -19689,7 +11338,7 @@ Model { Name "Subsystem11" SID "2469" Ports [] - Position [1325, 240, 1451, 325] + Position [1480, 205, 1606, 290] ZOrder -77 NamePlacement "alternate" ShowName off @@ -19702,7 +11351,7 @@ Model { MaskHideContents off Object { $PropName "MaskObject" - $ObjectID 33 + $ObjectID 34 $ClassName "Simulink.Mask" Display "disp('Additional Load Meas.')" } @@ -19956,7 +11605,6 @@ Model { ZOrder -8 ShowName off GotoTag "id2" - TagVisibility "global" } Block { BlockType From @@ -19966,7 +11614,6 @@ Model { ZOrder -8 ShowName off GotoTag "vd2" - TagVisibility "global" } Block { BlockType From @@ -19976,7 +11623,6 @@ Model { ZOrder -8 ShowName off GotoTag "vq2" - TagVisibility "global" } Block { BlockType From @@ -19986,7 +11632,6 @@ Model { ZOrder -8 ShowName off GotoTag "iq2" - TagVisibility "global" } Block { BlockType From @@ -19996,7 +11641,6 @@ Model { ZOrder -8 ShowName off GotoTag "id2" - TagVisibility "global" } Block { BlockType From @@ -20006,7 +11650,6 @@ Model { ZOrder -8 ShowName off GotoTag "vq2" - TagVisibility "global" } Block { BlockType From @@ -20016,7 +11659,6 @@ Model { ZOrder -8 ShowName off GotoTag "vd2" - TagVisibility "global" } Block { BlockType From @@ -20026,7 +11668,6 @@ Model { ZOrder -8 ShowName off GotoTag "iq2" - TagVisibility "global" } Block { BlockType Product @@ -20606,7 +12247,6 @@ Model { ZOrder -8 ShowName off GotoTag "id3" - TagVisibility "global" } Block { BlockType From @@ -20616,7 +12256,6 @@ Model { ZOrder -8 ShowName off GotoTag "vd3" - TagVisibility "global" } Block { BlockType From @@ -20626,7 +12265,6 @@ Model { ZOrder -8 ShowName off GotoTag "vq3" - TagVisibility "global" } Block { BlockType From @@ -20636,7 +12274,6 @@ Model { ZOrder -8 ShowName off GotoTag "iq3" - TagVisibility "global" } Block { BlockType From @@ -20646,7 +12283,6 @@ Model { ZOrder -8 ShowName off GotoTag "id3" - TagVisibility "global" } Block { BlockType From @@ -20656,7 +12292,6 @@ Model { ZOrder -8 ShowName off GotoTag "vq3" - TagVisibility "global" } Block { BlockType From @@ -20666,7 +12301,6 @@ Model { ZOrder -8 ShowName off GotoTag "vd3" - TagVisibility "global" } Block { BlockType From @@ -20676,7 +12310,6 @@ Model { ZOrder -8 ShowName off GotoTag "iq3" - TagVisibility "global" } Block { BlockType Product @@ -21330,10 +12963,10 @@ Model { Block { BlockType SubSystem Name "Subsystem3" - SID "1391" + SID "2938" Ports [1] - Position [845, 686, 880, 724] - ZOrder -79 + Position [715, 646, 750, 684] + ZOrder 13 ShowName off MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off @@ -21360,7 +12993,7 @@ Model { Block { BlockType Inport Name "Pdc" - SID "1392" + SID "2939" Position [25, 38, 55, 52] ZOrder -1 IconDisplay "Port number" @@ -21368,7 +13001,7 @@ Model { Block { BlockType Goto Name "Goto2" - SID "1393" + SID "2940" Position [120, 31, 180, 59] ZOrder -20 NamePlacement "alternate" @@ -21379,7 +13012,7 @@ Model { Block { BlockType Reference Name "LPF vq7" - SID "1803" + SID "2941" Ports [1, 1] Position [100, 137, 120, 163] ZOrder -21 @@ -21401,7 +13034,7 @@ Model { Block { BlockType ToWorkspace Name "To Workspace1" - SID "1394" + SID "2942" Ports [1] Position [120, 75, 180, 105] ZOrder -22 @@ -21413,7 +13046,7 @@ Model { Block { BlockType ToWorkspace Name "To Workspace2" - SID "1802" + SID "2943" Ports [1] Position [140, 135, 200, 165] ZOrder -23 @@ -21591,7 +13224,7 @@ Model { MaskHideContents off System { Name "Subsystem5" - Location [0, 0, 1600, 876] + Location [-8, -8, 1608, 908] Open off ModelBrowserVisibility off ModelBrowserWidth 200 @@ -21702,7 +13335,7 @@ Model { Name "Subsystem6" SID "1531" Ports [1] - Position [1400, 476, 1435, 514] + Position [1555, 441, 1590, 479] ZOrder -82 ShowName off MinAlgLoopOccurrences off @@ -21779,7 +13412,7 @@ Model { Name "Subsystem7" SID "1535" Ports [1] - Position [1400, 631, 1435, 669] + Position [1555, 596, 1590, 634] ZOrder -83 ShowName off MinAlgLoopOccurrences off @@ -21854,10 +13487,10 @@ Model { Block { BlockType SubSystem Name "Subsystem8" - SID "1547" + SID "2944" Ports [1] - Position [845, 886, 880, 924] - ZOrder -84 + Position [715, 846, 750, 884] + ZOrder 12 ShowName off MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off @@ -21884,7 +13517,7 @@ Model { Block { BlockType Inport Name "Pdcinv" - SID "1548" + SID "2945" Position [25, 38, 55, 52] ZOrder -1 IconDisplay "Port number" @@ -21892,7 +13525,7 @@ Model { Block { BlockType Goto Name "Goto2" - SID "1549" + SID "2946" Position [120, 31, 180, 59] ZOrder -20 NamePlacement "alternate" @@ -21903,7 +13536,7 @@ Model { Block { BlockType Reference Name "LPF vq7" - SID "1805" + SID "2947" Ports [1, 1] Position [100, 137, 125, 163] ZOrder -21 @@ -21925,7 +13558,7 @@ Model { Block { BlockType ToWorkspace Name "To Workspace1" - SID "1550" + SID "2948" Ports [1] Position [120, 75, 180, 105] ZOrder -22 @@ -21937,7 +13570,7 @@ Model { Block { BlockType ToWorkspace Name "To Workspace2" - SID "1804" + SID "2949" Ports [1] Position [145, 135, 205, 165] ZOrder -23 @@ -21979,7 +13612,7 @@ Model { Name "Subsystem9" SID "1726" Ports [0, 1] - Position [980, 143, 1035, 177] + Position [1135, 108, 1190, 142] ZOrder -85 ShowName off MinAlgLoopOccurrences off @@ -21991,8 +13624,8 @@ Model { MaskHideContents off System { Name "Subsystem9" - Location [0, 0, 1600, 876] - Open on + Location [-8, 0, 1608, 916] + Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" @@ -22134,12 +13767,6 @@ Model { DstBlock "PV Array Measurements" DstPort 4 } - Line { - SrcBlock "From6" - SrcPort 1 - DstBlock "Gain1" - DstPort 1 - } Line { SrcBlock "From7" SrcPort 1 @@ -22183,141 +13810,219 @@ Model { } } Line { - SrcBlock "From1" + SrcBlock "From21" SrcPort 1 - DstBlock "LPF vq5" - DstPort 1 + Points [5, 0] + Branch { + DstBlock "Scope11" + DstPort 1 + } + Branch { + Points [0, 40] + DstBlock "RMS1" + DstPort 1 + } } Line { - SrcBlock "From12" + SrcBlock "RMS1" SrcPort 1 - DstBlock "LPF vq4" + DstBlock "LPF1" DstPort 1 } Line { - SrcBlock "Product2" + SrcBlock "From20" SrcPort 1 - Points [15, 0] + Points [10, 0] Branch { - DstBlock "DC Bus Measurements\nBATTERY SIDE" - DstPort 3 + DstBlock "Scope4" + DstPort 1 } Branch { - Points [0, 65] - DstBlock "Subsystem3" + Points [0, 40] + DstBlock "RMS3" DstPort 1 } } Line { - SrcBlock "Product1" + SrcBlock "RMS3" SrcPort 1 - Points [10, 0] + DstBlock "LPF" + DstPort 1 + } + Line { + SrcBlock "LPF" + SrcPort 1 + Points [35, 0] Branch { - DstBlock "DC Bus Measurements\nPV SIDE" - DstPort 3 + DstBlock "Scope4" + DstPort 2 } Branch { - Points [0, 75] - DstBlock "Subsystem1" + Points [0, 50] + DstBlock "Subsystem6" DstPort 1 } } Line { - SrcBlock "From2" - SrcPort 1 - DstBlock "LPF vq7" - DstPort 1 - } - Line { - SrcBlock "From3" + SrcBlock "LPF1" SrcPort 1 - DstBlock "LPF vq6" - DstPort 1 + Points [35, 0] + Branch { + DstBlock "Scope11" + DstPort 2 + } + Branch { + Points [0, 50] + DstBlock "Subsystem7" + DstPort 1 + } } Line { - SrcBlock "Load Power Calculation" + SrcBlock "Clock" SrcPort 1 - DstBlock "Load Powers" + DstBlock "To Workspace" DstPort 1 } Line { - SrcBlock "Load Power Calculation" - SrcPort 2 - DstBlock "Load Powers" - DstPort 2 - } - Line { - SrcBlock "From21" + Labels [0, 0] + SrcBlock "LPF vq2" SrcPort 1 - Points [5, 0] + Points [15, 0] Branch { - DstBlock "Scope11" + DstBlock "PV Array Measurements" DstPort 1 } Branch { Points [0, 40] - DstBlock "RMS1" + DstBlock "Product" DstPort 1 } } Line { - SrcBlock "RMS1" + SrcBlock "From15" SrcPort 1 - DstBlock "LPF1" + DstBlock "Gain" DstPort 1 } Line { - SrcBlock "From20" + SrcBlock "Gain" SrcPort 1 - Points [10, 0] + Points [50, 0] Branch { - DstBlock "Scope4" + DstBlock "Frequency" DstPort 1 } Branch { Points [0, 40] - DstBlock "RMS3" - DstPort 1 + Branch { + DstBlock "LPF vq10" + DstPort 1 + } + Branch { + Points [0, 60] + DstBlock "Gain2" + DstPort 1 + } } } Line { - SrcBlock "RMS3" + SrcBlock "LPF vq10" SrcPort 1 - DstBlock "LPF" + DstBlock "Frequency" + DstPort 2 + } + Line { + SrcBlock "Subsystem9" + SrcPort 1 + DstBlock "Gain4" DstPort 1 } Line { - SrcBlock "LPF" + SrcBlock "Gain2" SrcPort 1 - Points [35, 0] + DstBlock "Subsystem10" + DstPort 1 + } + Line { + SrcBlock "Gain4" + SrcPort 1 + DstBlock "AC Load Measurements" + DstPort 2 + } + Line { + SrcBlock "Gain3" + SrcPort 1 + DstBlock "Battery Measurements" + DstPort 1 + } + Line { + SrcBlock "From6" + SrcPort 1 + DstBlock "Gain3" + DstPort 1 + } + Line { + SrcBlock "Subsystem" + SrcPort 1 + DstBlock "Gain1" + DstPort 1 + } + Line { + SrcBlock "Gain1" + SrcPort 1 + DstBlock "AC Load Measurements" + DstPort 1 + } + Line { + SrcBlock "From1" + SrcPort 1 + DstBlock "LPF vq5" + DstPort 1 + } + Line { + SrcBlock "From12" + SrcPort 1 + DstBlock "LPF vq4" + DstPort 1 + } + Line { + SrcBlock "Product2" + SrcPort 1 + Points [15, 0] Branch { - DstBlock "Scope4" - DstPort 2 + DstBlock "DC Bus Measurements\nBATTERY SIDE" + DstPort 3 } Branch { - Points [0, 50] - DstBlock "Subsystem6" + Points [0, 65] + DstBlock "Subsystem3" DstPort 1 } } Line { - SrcBlock "LPF1" + SrcBlock "Product1" SrcPort 1 - Points [35, 0] + Points [10, 0] Branch { - DstBlock "Scope11" - DstPort 2 + DstBlock "DC Bus Measurements\nPV SIDE" + DstPort 3 } Branch { - Points [0, 50] - DstBlock "Subsystem7" + Points [0, 75] + DstBlock "Subsystem1" DstPort 1 } } Line { - SrcBlock "Clock" + SrcBlock "From2" SrcPort 1 - DstBlock "To Workspace" + DstBlock "LPF vq7" + DstPort 1 + } + Line { + SrcBlock "From3" + SrcPort 1 + DstBlock "LPF vq6" DstPort 1 } Line { @@ -22346,21 +14051,6 @@ Model { DstBlock "LPF vq1" DstPort 1 } - Line { - Labels [0, 0] - SrcBlock "LPF vq2" - SrcPort 1 - Points [15, 0] - Branch { - DstBlock "PV Array Measurements" - DstPort 1 - } - Branch { - Points [0, 40] - DstBlock "Product" - DstPort 1 - } - } Line { SrcBlock "LPF vq1" SrcPort 1 @@ -22446,67 +14136,56 @@ Model { } } Line { - SrcBlock "From15" - SrcPort 1 - DstBlock "Gain" - DstPort 1 - } - Line { - SrcBlock "Gain" - SrcPort 1 - Points [50, 0] - Branch { - DstBlock "Frequency" - DstPort 1 - } - Branch { - Points [0, 40] - Branch { - DstBlock "LPF vq10" - DstPort 1 - } - Branch { - Points [0, 60] - DstBlock "Gain2" - DstPort 1 - } - } - } - Line { - SrcBlock "LPF vq10" - SrcPort 1 - DstBlock "Frequency" - DstPort 2 - } - Line { - SrcBlock "Subsystem9" + SrcBlock "Gain5" SrcPort 1 - DstBlock "AC Load Measurements" - DstPort 2 + DstBlock "Scope" + DstPort 1 } Line { - SrcBlock "Subsystem" + SrcBlock "Gain6" SrcPort 1 - DstBlock "Gain3" + DstBlock "Scope1" DstPort 1 } Line { - SrcBlock "Gain1" + SrcBlock "From13" SrcPort 1 - DstBlock "Battery Measurements" + DstBlock "Gain7" DstPort 1 } Line { - SrcBlock "Gain2" + SrcBlock "Gain7" SrcPort 1 - DstBlock "Subsystem10" + DstBlock "Scope2" DstPort 1 } Line { - SrcBlock "Gain3" + SrcBlock "From14" SrcPort 1 - DstBlock "AC Load Measurements" - DstPort 1 + Points [58, 0] + Branch { + Points [0, -40] + DstBlock "Gain5" + DstPort 1 + } + Branch { + DstBlock "Load Powers" + DstPort 1 + } + } + Line { + SrcBlock "From16" + SrcPort 1 + Points [57, 0] + Branch { + Points [0, 45] + DstBlock "Gain6" + DstPort 1 + } + Branch { + DstBlock "Load Powers" + DstPort 2 + } } Annotation { SID "2557" @@ -22532,19 +14211,19 @@ Model { FontWeight "bold" } Annotation { - SID "2561" - Name "DC Bus Measurements" - Position [742, 313] - ZOrder -5 + SID "2562" + Name "AC Load Measurements" + Position [1417, 13] + ZOrder -6 FontName "Arial Narrow" FontSize 24 FontWeight "bold" } Annotation { - SID "2562" - Name "AC Load Measurements" - Position [1262, 48] - ZOrder -6 + SID "2951" + Name "DC Bus Measurements" + Position [745, 306] + ZOrder -2 FontName "Arial Narrow" FontSize 24 FontWeight "bold" @@ -22559,14 +14238,14 @@ Model { Position [45, 30, 136, 81] ZOrder -38 Priority "1" - LibraryVersion "*1.2191" + LibraryVersion "1.2191" UserDataPersistent on UserData "DataTag0" FontName "Verdana" SourceBlock "powerlib/powergui" SourceType "PSB option menu block" SimulationMode "Discrete" - SolverType "Tustin" + SolverType "Backward Euler" SampleTime "5e-6" frequency "60" SPID off @@ -22597,8 +14276,8 @@ Model { variable "ZData" structure "Vab_st" ZoomFFT off - StartTime "7.5" - cycles "4" + StartTime "0" + cycles "15" DisplayStyle "1" fundamental "50" FreqAxis off @@ -22625,74 +14304,73 @@ Model { } Line { LineType "Connection" - SrcBlock "PV Array" - SrcPort RConn2 - DstBlock "Boost" + SrcBlock "AC Load" + SrcPort LConn3 + DstBlock "Inverter" + DstPort LConn3 + } + Line { + LineType "Connection" + SrcBlock "AC Load" + SrcPort LConn2 + DstBlock "Inverter" DstPort LConn2 } Line { LineType "Connection" - SrcBlock "PV Array" - SrcPort RConn1 - DstBlock "Boost" + SrcBlock "AC Load" + SrcPort LConn1 + DstBlock "Inverter" DstPort LConn1 } Line { LineType "Connection" - Points [865, 470; 245, 0] - DstBlock "Inverter" - DstPort RConn1 + SrcBlock "Inverter" + SrcPort RConn1 + Points [-214, 0] Branch { - ConnectType "SRC_DEST" + ConnectType "DEST_DEST" SrcBlock "Boost" SrcPort RConn1 - Points [140, 0] + Points [416, 0] } Branch { - ConnectType "SRC_DEST" - SrcBlock "Bidirectional DC/DC\n Converter" - SrcPort RConn1 - Points [140, 0; 0, -265] + ConnectType "DEST_SRC" + Points [0, 265] + DstBlock "Bidirectional DC/DC\n Converter" + DstPort RConn1 } } Line { LineType "Connection" - Points [935, 540; 175, 0] - DstBlock "Inverter" - DstPort RConn2 + SrcBlock "Bidirectional DC/DC\n Converter" + SrcPort RConn2 + Points [253, 0; 0, -265] Branch { - ConnectType "SRC_DEST" + ConnectType "DEST_DEST" SrcBlock "Boost" SrcPort RConn2 - Points [210, 0] + Points [498, 0] } Branch { - ConnectType "SRC_DEST" - SrcBlock "Bidirectional DC/DC\n Converter" - SrcPort RConn2 - Points [210, 0; 0, -265] + ConnectType "DEST_SRC" + DstBlock "Inverter" + DstPort RConn2 } } Line { LineType "Connection" - SrcBlock "AC Load" - SrcPort LConn3 - DstBlock "Inverter" - DstPort LConn3 - } - Line { - LineType "Connection" - SrcBlock "AC Load" + SrcBlock "Boost" SrcPort LConn2 - DstBlock "Inverter" - DstPort LConn2 + DstBlock "PV Array" + DstPort RConn2 } Line { LineType "Connection" - SrcBlock "AC Load" + SrcBlock "Boost" SrcPort LConn1 - DstBlock "Inverter" - DstPort LConn1 + DstBlock "PV Array" + DstPort RConn1 } Annotation { SID "2563" @@ -22706,7 +14384,7 @@ Model { } Annotation { SID "2564" - Name "Author: Eleder Araneta Estala" + Name "Author: Eleder Araneta Estala\nRevision: Hĺkon Duus /Honorat Quinard" Position [864, 156] ZOrder -2 FontName "Arial Narrow" @@ -22726,7 +14404,7 @@ MatData { " $ \"0 . , 8 ( !@ % \" 0 ) X " " P !@ @ & 4 ( ! D #@ # & \" 8 !0 @ " " $ \"0 . . 8 ( !@ % \" $ ! 0 ) \" " - " .@J^Y #@ # & \" 8 !0 @ $ \"0 . , 8 ( !@ " + "$K ,]M #@ # & \" 8 !0 @ $ \"0 . , 8 ( !@ " " % \" 0 ) X P !@ @ & 4 ( ! D " " #@ # & \" 8 !0 @ $ \"0 " } @@ -22743,21 +14421,24 @@ Stateflow { name "Microgrid_24h_Simulation" created "24-Apr-2013 13:11:36" isLibrary 0 - firstTarget 25 + firstTarget 34 sfVersion 76014001.0015 } chart { id 2 - name "PV Array/PV" - windowPosition [450.833 233.75 213 385] + name "PV Array/MATLAB Function1" + windowPosition [357.331 483.407 167 391] viewLimits [0 156.75 0 153.75] - screen [1 1 1600 900 1.333333333333333] + screen [1 1 1280 1024 1.041050272174191] treeNode [0 3 0 0] firstTransition 9 firstJunction 8 viewObj 2 + visible 1 machine 1 - ssIdHighWaterMark 7 + subviewS { + } + ssIdHighWaterMark 8 decomposition CLUSTER_CHART type EML_CHART firstData 4 @@ -22781,31 +14462,44 @@ Stateflow { decomposition CLUSTER_STATE eml { isEML 1 - script "function Ipv = Photovoltaic(Vpv,Irr,TaC)\n\n%% REFERENCE PAPER:\n% Francisco M. González-Longatt," - " \"Model of Photovoltaic Module inMatlabTM\",\n% II CIBELEC 2005.\n\n%% Solar panel: Suntech STP-280S\n% photovo" - "ltaic.m function calculates solar array current with a \n% given voltage, irradiance and temperature\n% Ipv = ph" - "otovoltaic array current (function output)\n% Vpv = photovoltaic array voltage\n% Irr = irradiance (1 Irr = 1000" - " W/m^2)\n% TaC = temperature (in celsius degrees)\n\n%% Constants\n\nk = 1.38e-23; % Boltzman’s const\nq " - "= 1.60e-19; % charge on an electron\nNp = 10; % Number of solar panels\nn = 2; " - "% Diode quality factor (=2 for crystaline, <2 for amorphous)\nVg = 1.12; % Band gap voltage, 1.12V for" - " xtal Si, 1.75 for amorphous Si\nNs = 72*Np; % Number of cells conected in series (96 cells each panel)" - " 96\nT1 = 273 + 25; % 25C degrees in Kelvin's\nVoc_T1 = 44.8*Np/Ns; % Open circuit voltage per cell at T1 " - "temperature 64.2\nIsc_T1 = 8.33; % Short circuit current at temperature T1 5.96\n\nT2 = 273 + 75;\nVoc_T2 " - "= Voc_T1*(-0.34/100*(T2-T1)) /Ns; % Open circuit voltage per cell at temperature T2\nIsc_T2 = Isc_T1*(0.05/100*(" - "T2-T1)); % Short circuit current per cell at temperature T2\n\nTaK = 273 + TaC; % Photovoltaic array workin" - "g temperature\nTrK = 273 + 25; % Reference temperature\n\n%% Calculation of the photocurrent Iph\nK0 = (Isc_T2 " - "- Isc_T1)/(T2-T1); % K0 constant is determined from Isc vs T (ECUATION 4)\nIph_T1 = Isc_T1 * Irr; " - " % (ECUATION 3)\nIph = Iph_T1 + K0*(TaK-T1); % Photocurrent (ECUATION 2)\n\n%% Calculat" - "ion of saturation current of the diode I0\nI0_T1 = Isc_T1/(exp(q*Voc_T1/(n*k*T1))-1); % (E" - "CUATION 6)\nI0 = I0_T1*(TaK/T1).^(3/n).*exp(-q*Vg/(n*k).*((1./TaK)-(1/T1))); % Diode sat. current\n\n%% Calculat" - "ion of the series resistance Rs, represents the resistance inside\n% its cell in the connection between cells\n" - "Xv = I0_T1*q/(n*k*T1)*exp(q*Voc_T1/(n*k*T1)); % (ECUATION 8)\ndVdI_Voc = -1.15/Ns /2; % dV" - "/dI at Vco per cell, from manufacturers graph\nRs = -dVdI_Voc - 1/Xv; % Resistance per ce" - "ll (ECUATION 7)\n\n%% Calculation of the PV array current, Ipv\nVt_Ta = n*k*TaK/q; % " - "= nkT/q\nVc = Vpv/Ns;\nIpv = zeros(size(Vc));\n% Ipv = Iph - I0.*( exp((Vc+Ipv.*Rs)./Vt_Ta) -1) (ECUATION 1);\n%" - " Solve for Ipv: f(Ipv) = Iph - Ipv - I0.*( exp((Vc+Ia.*Rs)./Vt_Ta) -1) = 0;\n% Newton-Raphson method: Ipv2 = Ipv" - "1 - f(Ipv1)/f’(Ipv1)\nfor j=1:5;\n Ipv = Ipv - ...\n (Iph - Ipv - I0.*( exp((Vc+Ipv.*Rs)./Vt_Ta) -1))...\n ./" - " (-1 - (I0.*( exp((Vc+Ipv.*Rs)./Vt_Ta) -1)).*Rs./Vt_Ta);\nend" + script "\nfunction Ipv = Photovoltaic(Vpv,Irr,T_amb)\n\n% Made by Hakon and Honorat\n% To do:\n% -choice " + "of the power in the system\n% -battery management\n% -\n\n%% Constants\n\nk = 1.38e-23; % Boltzman?s cons" + "t\nq = 1.60e-19; % charge on an electron\nn = 2; % Diode quality factor (=2 for crystaline," + " <2 for amorphous)\nVg = 1.12; % Band gap voltage, 1.12V for xtal Si, 1.75 for amorphous Si\nT_ref_C=2" + "5; % Nominal ambient test-temperature of the panels Standard Operating Temperature [C]\nT_ref=T_ref_C" + "+273; % Nominal temp in Kelvin\nT_nom_C=47; % Nominal operation temperature in [C]\nT_nom=T_nom_" + "C+273; % Nominal operation temperatire in Kelvin\nirr_nom=0.8; % Irradiation at nominal operation [" + "kW/m^2]\n\nnum_it=5; % Number of iterations done with Newton-Raphson's method\n\n%% Module specificati" + "ons: THIS IS WHERE TO CHANGE INPUT VALUES\n\nV_oc= 63.2; % Open circuit voltage per module at Standard opera" + "ting Contidiont (STC)[V]\nI_sc=7.0; % Short circuit current per module at STC [A]\nV_MPP=50; % Volta" + "ge at MPPT\nI_MPP=6.4; % Current at MPPT\nP_mod=320; % Maximum module power (equals V_mpp*I_mpp) [W]\n" + "\na_V=-0.004; % Decrease in voltage per degree C increased from STC (source: fig 5.22 in Design of Smart prower" + " grid, A.Keyhani)in p.u.\na_I=0.0004; % Increase in current per degree C increased from STC (in p.u.)\n\n% P_sy" + "st=1000e3; % System power [W]\nV_string_des=400; % Desired string voltage (inout value)\n\nn_s=" + "36; % Number of cells in a module (needed for voltage-calculation) typically 36, accordi" + "ng to www.pveducation.org/pvcdrom/modules/module-circuit-design\n\n\n\n%% Cell specifications \n\nNM=round(V_str" + "ing_des/V_oc); % Number of modules in a string\n\nV_string=NM*V_oc; % Real string voltage, will" + " be used for furhter calculations [V]\nP_string=P_mod*NM; % Power in a string equals number of modu" + "les times rated module power [W]\nP_array=P_syst; % Assuming that we only have one array, thus a" + "rray power and system power is the same [W]\nNS=round(P_array/P_string); % Find number of strings in an arra" + "y\nP_array=NS*P_string; % Find real value of array power, as a multiplier of P_string [W]\n\n\n%% Cal" + "culation of the photocurrent Iph\n\nT_cell=T_amb + Irr*(T_nom-T_ref)/irr_nom; % Cell temperature as function o" + "f ambient temperature\n\nK0 = a_I*I_sc; % Temperature koefficient for I_sc (EQ 5, Eleder)\nIph_stc =" + " I_sc * Irr; % (ECUATION 4) photon current Iph at standard conditions with given irraidiance\nIph = Iph_" + "stc + K0*(T_cell-T_ref); % Photocurrent at current cell operating temperature (ECUATION 3)\n\n%% Calculation " + "of saturation current of the diode I0\n\n\nI0_stc = I_sc/(exp(q*V_oc/(n*k*T_ref))-1); % Saturation current of" + " the diode at STC(ECUATION 7)\n\n% \n% I0 = I0_stc*(T_cell/T_ref).^(3/n).*exp(-q*Vg/(n*k).*((1./T_cell)-(1/T_ref" + "))); % Diode sat. current\nI0=Iph*exp(((-q*V_oc)/n_s)/((n*k*T_ref)));\n\n%% Fit parameter for temperature-depend" + "ence of saturation current C_0\n\n\n%% Calculation of the series resistance Rs, represents the resistance inside" + "\n% its cell in the connection between cells\nbeta=q/n_s*n*k*T_cell;\n\nXv = I0_stc*q/(n*k*T_ref)*exp(q*V_oc/(n" + "*k*T_ref)); % (ECUATION 8)\ndVdI_Voc = -1.15/NS /2; % dV/dI at Vco per cell, from manufact" + "urers graph\n\n\n% Rs = (beta*(log(1-(I_MPP/Iph))+(V_oc-V_MPP))/I_MPP); % Resistance per cell (eq 5.19)\nRs=n_s*" + "(((((n*k*T_ref)/q)*log(complex((1-(I_MPP/Iph))+(V_oc-V_MPP)/n_s)))/I_MPP));\n\n%% Calculation of the PV array cu" + "rrent, Ipv\nVt_Ta = n*k*T_cell/q; % = nkT/q\nVc = Vpv/NS;\nIpv = zeros(size(Vc));\n\n" + "% Ipv = Iph - I0*( exp(q*((Vc+Ipv*Rs)/ns)/nkT) -1) (ECUATION 5.15, Eicker 2001);\n\n% setting beta=q/ns*nkT\n% S" + "olve for Ipv: f(Ipv) = Iph - Ipv - I_0*(exp((Vc+Ipv*Rs)*beta) -1) = 0;\n% f'(Ipv)=0-1-I_0*beta*Rs(exp((Vc+Ipv*Rs" + ")*beta)\n% Newton-Raphson method: Ipv2 = Ipv1 - f(Ipv1)/f?(Ipv1)\n\nfor j=1:num_it;\n Ipv = abs(Ipv - ...\n (I" + "ph - Ipv - I0* (exp((Vc+Ipv*Rs)*beta) -1))...\n / (-1 -(I0* (exp((Vc+Ipv*Rs)*beta))*Rs*beta)));\nend" editorLayout "100 M4x1[10 5 700 500]" } } @@ -22873,7 +14567,7 @@ Stateflow { data { id 7 ssIdNumber 7 - name "TaC" + name "T_amb" linkNode [2 6 0] scope INPUT_DATA machine 1 @@ -22927,29 +14621,29 @@ Stateflow { } instance { id 10 - name "PV Array/PV" + name "PV Array/MATLAB Function1" machine 1 chart 2 } chart { id 11 - name "Boost/Incremental Conductance MPPT/MPPT IC" - windowPosition [530.833 18.75 171 600] + name "Bidirectional DC//DC\n Converter/MATLAB Function" + windowPosition [357.331 483.407 167 391] viewLimits [0 156.75 0 153.75] - screen [1 1 1600 900 1.333333333333333] + screen [1 1 1280 1024 1.041050272174191] treeNode [0 12 0 0] - firstTransition 23 - firstJunction 22 + firstTransition 18 + firstJunction 17 viewObj 11 machine 1 - ssIdHighWaterMark 12 + ssIdHighWaterMark 8 decomposition CLUSTER_CHART type EML_CHART firstData 13 - chartFileNumber 3 + chartFileNumber 2 disableImplicitCasting 1 eml { - name "IncCond" + name "fcn" } } state { @@ -22964,6 +14658,169 @@ Stateflow { ssIdNumber 1 type FUNC_STATE decomposition CLUSTER_STATE + eml { + isEML 1 + script "function ChargeControl = fcn(SOC,Vbus,Ibus)\n\n if SOC<20 && Vbus>0 && Ibus>0\nChargeControl=" + "1;\n elseif SOC<20 && Vbus==0 && Ibus==0\nChargeControl=0;\n elseif SOC>=95 && Vbus>0 && Ibus>0\nChargeCon" + "trol=0;\n else \nChargeControl=1;\n end\n\n\n\n\n\n" + editorLayout "100 M4x1[10 5 700 500]" + } + } + data { + id 13 + ssIdNumber 4 + name "SOC" + linkNode [11 0 14] + scope INPUT_DATA + machine 1 + props { + array { + size "-1" + } + type { + method SF_INHERITED_TYPE + primitive SF_DOUBLE_TYPE + } + complexity SF_COMPLEX_INHERITED + } + dataType "Inherit: Same as Simulink" + } + data { + id 14 + ssIdNumber 5 + name "ChargeControl" + linkNode [11 13 15] + scope OUTPUT_DATA + machine 1 + props { + array { + size "-1" + } + type { + method SF_INHERITED_TYPE + primitive SF_DOUBLE_TYPE + } + complexity SF_COMPLEX_INHERITED + frame SF_FRAME_NO + } + dataType "Inherit: Same as Simulink" + } + data { + id 15 + ssIdNumber 7 + name "Vbus" + linkNode [11 14 16] + scope INPUT_DATA + machine 1 + props { + array { + size "-1" + } + type { + method SF_INHERITED_TYPE + primitive SF_DOUBLE_TYPE + isSigned 1 + wordLength "16" + } + complexity SF_COMPLEX_INHERITED + frame SF_FRAME_INHERITED + } + dataType "Inherit: Same as Simulink" + } + data { + id 16 + ssIdNumber 8 + name "Ibus" + linkNode [11 15 0] + scope INPUT_DATA + machine 1 + props { + array { + size "-1" + } + type { + method SF_INHERITED_TYPE + primitive SF_DOUBLE_TYPE + isSigned 1 + wordLength "16" + } + complexity SF_COMPLEX_INHERITED + frame SF_FRAME_INHERITED + } + dataType "Inherit: Same as Simulink" + } + junction { + id 17 + position [23.5747 49.5747 7] + chart 11 + linkNode [11 0 0] + subviewer 11 + ssIdNumber 3 + type CONNECTIVE_JUNCTION + } + transition { + id 18 + labelString "{eML_blk_kernel();}" + labelPosition [32.125 19.875 102.544 14.964] + fontSize 12 + src { + intersection [0 0 1 0 23.5747 14.625 0 0] + } + dst { + id 17 + intersection [1 0 -1 0 23.5747 42.5747 0 0] + } + midPoint [23.5747 24.9468] + chart 11 + linkNode [11 0 0] + dataLimits [21.175 25.975 14.625 42.575] + subviewer 11 + drawStyle SMART + slide { + sticky BOTH_STICK + } + executionOrder 1 + ssIdNumber 2 + } + instance { + id 19 + name "Bidirectional DC//DC\n Converter/MATLAB Function" + machine 1 + chart 11 + } + chart { + id 20 + name "Boost/Incremental Conductance MPPT/MPPT IC" + windowPosition [530.833 18.75 171 600] + viewLimits [0 156.75 0 153.75] + screen [1 1 1600 900 1.333333333333333] + treeNode [0 21 0 0] + firstTransition 32 + firstJunction 31 + viewObj 20 + machine 1 + ssIdHighWaterMark 12 + decomposition CLUSTER_CHART + type EML_CHART + firstData 22 + chartFileNumber 3 + disableImplicitCasting 1 + eml { + name "IncCond" + } + } + state { + id 21 + labelString "eML_blk_kernel()" + position [18 64.5 118 66] + fontSize 12 + chart 20 + treeNode [20 0 0 0] + superState SUBCHART + subviewer 20 + ssIdNumber 1 + type FUNC_STATE + decomposition CLUSTER_STATE eml { isEML 1 script "function [delta,Vref,Ipv_prev_out,Vpv_prev_out] = IncCond(Ipv,Iprevious,Vpv,Vprevious,Vref_previo" @@ -22972,19 +14829,19 @@ Stateflow { "anadham, K. Vijaya Bhaskar, \"Incremental Conductance Based Maximum\n% Power Point Tracking (MPPT) for Photovolt" "aic System\" International\n% Journal of Engineering Research and Applications (IJERA), vol. 2, issue\n% 2, Marc" "h-April 2012.\n\n\n% The followoing code is an algorithm for a Maximum Power Point Tracking\n% (MPPT) technique " - "Incremental COnductance\n\nVbus = 600;\n\ndI=Ipv-Iprevious;\ndV=Vpv-Vprevious;\n\nif (dV==0)\n if (dI==0)\n " - " Vref=Vref_previous;\n else\n if (Ipv>0)\n Vref= Vpv+dV;\n else\n Vr" - "ef= Vpv-dV;\n end\n end\nelse\n if ((dI/dV)==(-Ipv/Vpv))\n Vref=Vref_previous;\n else\n " - " if ((dI/dV)>(-Ipv/Vpv))\n Vref= Vpv+dV;\n else\n Vref= Vpv-dV;\n end\n" + "Incremental COnductance\n\nVbus = 1000;\n\ndI=Ipv-Iprevious;\ndV=Vpv-Vprevious;\n\nif (dV==0)\n if (dI==0)\n " + " Vref=Vref_previous;\n else\n if (Ipv>0)\n Vref= Vpv+dV;\n else\n V" + "ref= Vpv-dV;\n end\n end\nelse\n if ((dI/dV)==(-Ipv/Vpv))\n Vref=Vref_previous;\n else\n " + " if ((dI/dV)>(-Ipv/Vpv))\n Vref= Vpv+dV;\n else\n Vref= Vpv-dV;\n end\n" " end\nend\nIpv_prev_out=Ipv;\nVpv_prev_out=Vpv;\n\ndelta=1-Vref/Vbus;\n\nend\n\n" editorLayout "100 M4x1[10 5 700 500]" } } data { - id 13 + id 22 ssIdNumber 12 name "delta" - linkNode [11 0 14] + linkNode [20 0 23] scope OUTPUT_DATA machine 1 props { @@ -23003,10 +14860,10 @@ Stateflow { dataType "Inherit: Same as Simulink" } data { - id 14 + id 23 ssIdNumber 4 name "Ipv" - linkNode [11 13 15] + linkNode [20 22 24] scope INPUT_DATA machine 1 props { @@ -23022,10 +14879,10 @@ Stateflow { dataType "Inherit: Same as Simulink" } data { - id 15 + id 24 ssIdNumber 7 name "Iprevious" - linkNode [11 14 16] + linkNode [20 23 25] scope INPUT_DATA machine 1 props { @@ -23044,10 +14901,10 @@ Stateflow { dataType "Inherit: Same as Simulink" } data { - id 16 + id 25 ssIdNumber 5 name "Vref" - linkNode [11 15 17] + linkNode [20 24 26] scope OUTPUT_DATA machine 1 props { @@ -23064,10 +14921,10 @@ Stateflow { dataType "Inherit: Same as Simulink" } data { - id 17 + id 26 ssIdNumber 6 name "Vpv" - linkNode [11 16 18] + linkNode [20 25 27] scope INPUT_DATA machine 1 props { @@ -23086,10 +14943,10 @@ Stateflow { dataType "Inherit: Same as Simulink" } data { - id 18 + id 27 ssIdNumber 8 name "Vprevious" - linkNode [11 17 19] + linkNode [20 26 28] scope INPUT_DATA machine 1 props { @@ -23108,10 +14965,10 @@ Stateflow { dataType "Inherit: Same as Simulink" } data { - id 19 + id 28 ssIdNumber 9 name "Vref_previous" - linkNode [11 18 20] + linkNode [20 27 29] scope INPUT_DATA machine 1 props { @@ -23130,10 +14987,10 @@ Stateflow { dataType "Inherit: Same as Simulink" } data { - id 20 + id 29 ssIdNumber 10 name "Ipv_prev_out" - linkNode [11 19 21] + linkNode [20 28 30] scope OUTPUT_DATA machine 1 props { @@ -23152,10 +15009,10 @@ Stateflow { dataType "Inherit: Same as Simulink" } data { - id 21 + id 30 ssIdNumber 11 name "Vpv_prev_out" - linkNode [11 20 0] + linkNode [20 29 0] scope OUTPUT_DATA machine 1 props { @@ -23174,16 +15031,16 @@ Stateflow { dataType "Inherit: Same as Simulink" } junction { - id 22 + id 31 position [23.5747 49.5747 7] - chart 11 - linkNode [11 0 0] - subviewer 11 + chart 20 + linkNode [20 0 0] + subviewer 20 ssIdNumber 3 type CONNECTIVE_JUNCTION } transition { - id 23 + id 32 labelString "{eML_blk_kernel();}" labelPosition [32.125 19.875 102.544 14.964] fontSize 12 @@ -23191,14 +15048,14 @@ Stateflow { intersection [0 0 1 0 23.5747 14.625 0 0] } dst { - id 22 + id 31 intersection [1 0 -1 0 23.5747 42.5747 0 0] } midPoint [23.5747 24.9468] - chart 11 - linkNode [11 0 0] + chart 20 + linkNode [20 0 0] dataLimits [21.175 25.975 14.625 42.575] - subviewer 11 + subviewer 20 drawStyle SMART slide { sticky BOTH_STICK @@ -23207,13 +15064,13 @@ Stateflow { ssIdNumber 2 } instance { - id 24 + id 33 name "Boost/Incremental Conductance MPPT/MPPT IC" machine 1 - chart 11 + chart 20 } target { - id 25 + id 34 name "sfun" description "Default Simulink S-Function Target." machine 1 diff --git a/Microgrid_24h_Simulation.mdl.original b/Microgrid_24h_Simulation.mdl.original new file mode 100644 index 0000000..199f571 --- /dev/null +++ b/Microgrid_24h_Simulation.mdl.original @@ -0,0 +1,14971 @@ +Model { + Name "Microgrid_24h_Simulation" + Version 8.1 + MdlSubVersion 0 + GraphicalInterface { + NumRootInports 0 + NumRootOutports 0 + ParameterArgumentNames "" + ComputedModelVersion "1.233" + NumModelReferences 0 + NumTestPointedSignals 0 + } + SavedCharacterEncoding "windows-1252" + SaveDefaultBlockParams on + ScopeRefreshTime 0.035000 + OverrideScopeRefreshTime on + DisableAllScopes off + DataTypeOverride "UseLocalSettings" + DataTypeOverrideAppliesTo "AllNumericTypes" + MinMaxOverflowLogging "UseLocalSettings" + MinMaxOverflowArchiveMode "Overwrite" + FPTRunName "Run 1" + MaxMDLFileLineLength 120 + StartFcn "%The GUI handles are by default hidden, turn them on\nset(0,'ShowHiddenHandles','on');\n\n%Set up the a" + "rguments that will go into the gain block event callback listener\nblk = 'Microgrid_24h_Simulation/Subsystem/Clock';" + "\nevent = 'PostOutputs';\nlistener = @updategui;\n\n%Create the listener\nh = add_exec_event_listener(blk, event, li" + "stener);\n\n" + UserBdParams "PhysicalModelingChecksum;PhysicalModelingParameterChecksum;PhysicalModelingProducts" + Object { + $PropName "BdWindowsInfo" + $ObjectID 1 + $ClassName "Simulink.BDWindowsInfo" + Object { + $PropName "WindowsInfo" + $ObjectID 2 + $ClassName "Simulink.WindowInfo" + IsActive [1] + Location [-8.0, -8.0, 1616.0, 916.0] + Object { + $PropName "ModelBrowserInfo" + $ObjectID 3 + $ClassName "Simulink.ModelBrowserInfo" + Visible [0] + DockPosition "Left" + Width [50] + Height [50] + Filter [9] + } + Object { + $PropName "ExplorerBarInfo" + $ObjectID 4 + $ClassName "Simulink.ExplorerBarInfo" + Visible [0] + } + Array { + Type "Simulink.EditorInfo" + Dimension 2 + Object { + $ObjectID 5 + IsActive [1] + ViewObjType "SimulinkSubsys" + LoadSaveID "2981" + Extents [1566.0, 769.0] + ZoomFactor [0.8] + Offset [-75.333333333333485, -120.16666666666634] + } + Object { + $ObjectID 6 + IsActive [0] + ViewObjType "SimulinkTopLevel" + LoadSaveID "0" + Extents [1566.0, 769.0] + ZoomFactor [0.6] + Offset [0.0, 0.0] + } + PropName "EditorsInfo" + } + } + } + PhysicalModelingChecksum "3851408854" + PhysicalModelingParameterChecksum "1991397807" + PhysicalModelingProducts "Power_System_Blocks" + Created "Sat Apr 20 11:36:48 2013" + Creator "Student" + UpdateHistory "UpdateHistoryNever" + ModifiedByFormat "%" + LastModifiedBy "Honorat" + ModifiedDateFormat "%" + LastModifiedDate "Sat Aug 22 18:25:58 2015" + RTWModifiedTimeStamp 362168733 + ModelVersionFormat "1.%" + ConfigurationManager "None" + SampleTimeColors off + SampleTimeAnnotations off + LibraryLinkDisplay "none" + WideLines off + ShowLineDimensions off + ShowPortDataTypes off + ShowDesignRanges off + ShowLoopsOnError on + IgnoreBidirectionalLines off + ShowStorageClass off + ShowTestPointIcons on + ShowSignalResolutionIcons on + ShowViewerIcons on + SortedOrder off + ExecutionContextIcon off + ShowLinearizationAnnotations on + BlockNameDataTip off + BlockParametersDataTip off + BlockDescriptionStringDataTip off + ToolBar on + StatusBar on + BrowserShowLibraryLinks off + BrowserLookUnderMasks off + SimulationMode "normal" + LinearizationMsg "none" + Profile off + ParamWorkspaceSource "MATLABWorkspace" + AccelSystemTargetFile "accel.tlc" + AccelTemplateMakefile "accel_default_tmf" + AccelMakeCommand "make_rtw" + TryForcingSFcnDF off + Object { + $PropName "DataLoggingOverride" + $ObjectID 7 + $ClassName "Simulink.SimulationData.ModelLoggingInfo" + model_ "Dena_batea" + signals_ [] + overrideMode_ [0.0] + Array { + Type "Cell" + Dimension 1 + Cell "Dena_batea" + PropName "logAsSpecifiedByModels_" + } + Array { + Type "Cell" + Dimension 1 + Cell [] + PropName "logAsSpecifiedByModelsSSIDs_" + } + } + RecordCoverage off + CovPath "/" + CovSaveName "covdata" + CovMetricSettings "dw" + CovHTMLOptions " -sRT=1 -aTS=1 -bRG=1 -bTC=1 -hTR=0 -nFC=0 -scm=1 -bcm=1 -xEv=0" + CovNameIncrementing off + CovHtmlReporting on + CovForceBlockReductionOff on + covSaveCumulativeToWorkspaceVar on + CovSaveSingleToWorkspaceVar on + CovCumulativeVarName "covCumulativeData" + CovCumulativeReport off + CovReportOnPause on + CovModelRefEnable "Off" + CovExternalEMLEnable off + ExtModeBatchMode off + ExtModeEnableFloating on + ExtModeTrigType "manual" + ExtModeTrigMode "normal" + ExtModeTrigPort "1" + ExtModeTrigElement "any" + ExtModeTrigDuration 1000 + ExtModeTrigDurationFloating "auto" + ExtModeTrigHoldOff 0 + ExtModeTrigDelay 0 + ExtModeTrigDirection "rising" + ExtModeTrigLevel 0 + ExtModeArchiveMode "off" + ExtModeAutoIncOneShot off + ExtModeIncDirWhenArm off + ExtModeAddSuffixToVar off + ExtModeWriteAllDataToWs off + ExtModeArmWhenConnect on + ExtModeSkipDownloadWhenConnect off + ExtModeLogAll on + ExtModeAutoUpdateStatusClock on + BufferReuse on + ShowModelReferenceBlockVersion off + ShowModelReferenceBlockIO off + Array { + Type "Handle" + Dimension 1 + Simulink.ConfigSet { + $ObjectID 8 + Version "1.13.0" + Array { + Type "Handle" + Dimension 9 + Simulink.SolverCC { + $ObjectID 9 + Version "1.13.0" + StartTime "0.0" + StopTime "2.4" + AbsTol "auto" + FixedStep "auto" + InitialStep "auto" + MaxNumMinSteps "-1" + MaxOrder 5 + ZcThreshold "auto" + ConsecutiveZCsStepRelTol "10*128*eps" + MaxConsecutiveZCs "1000" + ExtrapolationOrder 4 + NumberNewtonIterations 1 + MaxStep "auto" + MinStep "auto" + MaxConsecutiveMinStep "1" + RelTol "1e-3" + SolverMode "Auto" + EnableConcurrentExecution off + ConcurrentTasks off + Solver "ode45" + SolverName "ode45" + SolverJacobianMethodControl "auto" + ShapePreserveControl "DisableAll" + ZeroCrossControl "UseLocalSettings" + ZeroCrossAlgorithm "Nonadaptive" + AlgebraicLoopSolver "TrustRegion" + SolverResetMethod "Fast" + PositivePriorityOrder off + AutoInsertRateTranBlk off + SampleTimeConstraint "Unconstrained" + InsertRTBMode "Whenever possible" + } + Simulink.DataIOCC { + $ObjectID 10 + Version "1.13.0" + Decimation "1" + ExternalInput "[t, u]" + FinalStateName "xFinal" + InitialState "xInitial" + LimitDataPoints on + MaxDataPoints "1000" + LoadExternalInput off + LoadInitialState off + SaveFinalState off + SaveCompleteFinalSimState off + SaveFormat "Array" + SignalLoggingSaveFormat "ModelDataLogs" + SaveOutput on + SaveState off + SignalLogging on + DSMLogging on + InspectSignalLogs off + SaveTime on + ReturnWorkspaceOutputs off + StateSaveName "xout" + TimeSaveName "tout" + OutputSaveName "yout" + SignalLoggingName "logsout" + DSMLoggingName "dsmout" + OutputOption "RefineOutputTimes" + OutputTimes "[]" + ReturnWorkspaceOutputsName "out" + Refine "1" + } + Simulink.OptimizationCC { + $ObjectID 11 + Version "1.13.0" + Array { + Type "Cell" + Dimension 8 + Cell "BooleansAsBitfields" + Cell "PassReuseOutputArgsAs" + Cell "PassReuseOutputArgsThreshold" + Cell "ZeroExternalMemoryAtStartup" + Cell "ZeroInternalMemoryAtStartup" + Cell "OptimizeModelRefInitCode" + Cell "NoFixptDivByZeroProtection" + Cell "UseSpecifiedMinMax" + PropName "DisabledProps" + } + BlockReduction on + BooleanDataType on + ConditionallyExecuteInputs on + InlineParams off + UseIntDivNetSlope off + UseFloatMulNetSlope off + UseSpecifiedMinMax off + InlineInvariantSignals off + OptimizeBlockIOStorage on + BufferReuse on + EnhancedBackFolding off + StrengthReduction off + ExpressionFolding on + BooleansAsBitfields off + BitfieldContainerType "uint_T" + EnableMemcpy on + MemcpyThreshold 64 + PassReuseOutputArgsAs "Structure reference" + ExpressionDepthLimit 2147483647 + FoldNonRolledExpr on + LocalBlockOutputs on + RollThreshold 5 + SystemCodeInlineAuto off + StateBitsets off + DataBitsets off + UseTempVars off + ZeroExternalMemoryAtStartup on + ZeroInternalMemoryAtStartup on + InitFltsAndDblsToZero off + NoFixptDivByZeroProtection off + EfficientFloat2IntCast off + EfficientMapNaN2IntZero on + OptimizeModelRefInitCode off + LifeSpan "inf" + MaxStackSize "Inherit from target" + BufferReusableBoundary on + SimCompilerOptimization "Off" + AccelVerboseBuild off + ParallelExecutionInRapidAccelerator on + } + Simulink.DebuggingCC { + $ObjectID 12 + Version "1.13.0" + RTPrefix "error" + ConsistencyChecking "none" + ArrayBoundsChecking "none" + SignalInfNanChecking "none" + SignalRangeChecking "none" + ReadBeforeWriteMsg "UseLocalSettings" + WriteAfterWriteMsg "UseLocalSettings" + WriteAfterReadMsg "UseLocalSettings" + AlgebraicLoopMsg "warning" + ArtificialAlgebraicLoopMsg "warning" + SaveWithDisabledLinksMsg "warning" + SaveWithParameterizedLinksMsg "warning" + CheckSSInitialOutputMsg on + UnderspecifiedInitializationDetection "Classic" + MergeDetectMultiDrivingBlocksExec "none" + CheckExecutionContextPreStartOutputMsg off + CheckExecutionContextRuntimeOutputMsg off + SignalResolutionControl "UseLocalSettings" + BlockPriorityViolationMsg "warning" + MinStepSizeMsg "warning" + TimeAdjustmentMsg "none" + MaxConsecutiveZCsMsg "error" + MaskedZcDiagnostic "warning" + IgnoredZcDiagnostic "warning" + SolverPrmCheckMsg "warning" + InheritedTsInSrcMsg "warning" + DiscreteInheritContinuousMsg "warning" + MultiTaskDSMMsg "error" + MultiTaskCondExecSysMsg "error" + MultiTaskRateTransMsg "error" + SingleTaskRateTransMsg "none" + TasksWithSamePriorityMsg "warning" + SigSpecEnsureSampleTimeMsg "warning" + CheckMatrixSingularityMsg "none" + IntegerOverflowMsg "warning" + Int32ToFloatConvMsg "warning" + ParameterDowncastMsg "error" + ParameterOverflowMsg "error" + ParameterUnderflowMsg "none" + ParameterPrecisionLossMsg "warning" + ParameterTunabilityLossMsg "warning" + FixptConstUnderflowMsg "none" + FixptConstOverflowMsg "none" + FixptConstPrecisionLossMsg "none" + UnderSpecifiedDataTypeMsg "none" + UnnecessaryDatatypeConvMsg "none" + VectorMatrixConversionMsg "none" + InvalidFcnCallConnMsg "error" + FcnCallInpInsideContextMsg "UseLocalSettings" + SignalLabelMismatchMsg "none" + UnconnectedInputMsg "none" + UnconnectedOutputMsg "none" + UnconnectedLineMsg "none" + SFcnCompatibilityMsg "none" + FrameProcessingCompatibilityMsg "warning" + UniqueDataStoreMsg "none" + BusObjectLabelMismatch "warning" + RootOutportRequireBusObject "warning" + AssertControl "UseLocalSettings" + EnableOverflowDetection off + ModelReferenceIOMsg "none" + ModelReferenceMultiInstanceNormalModeStructChecksumCheck "error" + ModelReferenceVersionMismatchMessage "none" + ModelReferenceIOMismatchMessage "none" + ModelReferenceCSMismatchMessage "none" + UnknownTsInhSupMsg "warning" + ModelReferenceDataLoggingMessage "warning" + ModelReferenceSymbolNameMessage "warning" + ModelReferenceExtraNoncontSigs "error" + StateNameClashWarn "warning" + SimStateInterfaceChecksumMismatchMsg "warning" + SimStateOlderReleaseMsg "error" + InitInArrayFormatMsg "warning" + StrictBusMsg "ErrorLevel1" + BusNameAdapt "WarnAndRepair" + NonBusSignalsTreatedAsBus "none" + LoggingUnavailableSignals "error" + BlockIODiagnostic "none" + SFUnusedDataAndEventsDiag "warning" + SFUnexpectedBacktrackingDiag "warning" + SFInvalidInputDataAccessInChartInitDiag "warning" + SFNoUnconditionalDefaultTransitionDiag "warning" + SFTransitionOutsideNaturalParentDiag "warning" + SFUnconditionalTransitionShadowingDiag "warning" + SFUndirectedBroadcastEventsDiag "warning" + SFTransitionActionBeforeConditionDiag "warning" + } + Simulink.HardwareCC { + $ObjectID 13 + Version "1.13.0" + ProdBitPerChar 8 + ProdBitPerShort 16 + ProdBitPerInt 32 + ProdBitPerLong 32 + ProdBitPerLongLong 64 + ProdBitPerFloat 32 + ProdBitPerDouble 64 + ProdBitPerPointer 32 + ProdLargestAtomicInteger "Char" + ProdLargestAtomicFloat "None" + ProdIntDivRoundTo "Undefined" + ProdEndianess "Unspecified" + ProdWordSize 32 + ProdShiftRightIntArith on + ProdLongLongMode off + ProdHWDeviceType "32-bit Generic" + TargetBitPerChar 8 + TargetBitPerShort 16 + TargetBitPerInt 32 + TargetBitPerLong 32 + TargetBitPerLongLong 64 + TargetBitPerFloat 32 + TargetBitPerDouble 64 + TargetBitPerPointer 32 + TargetLargestAtomicInteger "Char" + TargetLargestAtomicFloat "None" + TargetShiftRightIntArith on + TargetLongLongMode off + TargetIntDivRoundTo "Undefined" + TargetEndianess "Unspecified" + TargetWordSize 32 + TargetTypeEmulationWarnSuppressLevel 0 + TargetPreprocMaxBitsSint 32 + TargetPreprocMaxBitsUint 32 + TargetHWDeviceType "Specified" + TargetUnknown off + ProdEqTarget on + } + Simulink.ModelReferenceCC { + $ObjectID 14 + Version "1.13.0" + UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange" + CheckModelReferenceTargetMessage "error" + EnableParallelModelReferenceBuilds off + ParallelModelReferenceErrorOnInvalidPool on + ParallelModelReferenceMATLABWorkerInit "None" + ModelReferenceNumInstancesAllowed "Multi" + PropagateVarSize "Infer from blocks in model" + ModelReferencePassRootInputsByReference on + ModelReferenceMinAlgLoopOccurrences off + PropagateSignalLabelsOutOfModel off + SupportModelReferenceSimTargetCustomCode off + } + Simulink.SFSimCC { + $ObjectID 15 + Version "1.13.0" + SFSimEnableDebug on + SFSimOverflowDetection on + SFSimEcho on + SimBlas on + SimCtrlC on + SimExtrinsic on + SimIntegrity on + SimUseLocalCustomCode off + SimParseCustomCode on + SimBuildMode "sf_incremental_build" + } + Simulink.RTWCC { + $BackupClass "Simulink.RTWCC" + $ObjectID 16 + Version "1.13.0" + Array { + Type "Cell" + Dimension 8 + Cell "IncludeHyperlinkInReport" + Cell "GenerateTraceInfo" + Cell "GenerateTraceReport" + Cell "GenerateTraceReportSl" + Cell "GenerateTraceReportSf" + Cell "GenerateTraceReportEml" + Cell "GenerateSLWebview" + Cell "GenerateCodeMetricsReport" + PropName "DisabledProps" + } + SystemTargetFile "grt.tlc" + GenCodeOnly off + MakeCommand "make_rtw" + GenerateMakefile on + PackageGeneratedCodeAndArtifacts off + TemplateMakefile "grt_default_tmf" + GenerateReport off + SaveLog off + RTWVerbose on + RetainRTWFile off + ProfileTLC off + TLCDebug off + TLCCoverage off + TLCAssert off + ProcessScriptMode "Default" + ConfigurationMode "Optimized" + ConfigAtBuild off + RTWUseLocalCustomCode off + RTWUseSimCustomCode off + IncludeHyperlinkInReport off + LaunchReport off + PortableWordSizes off + GenerateErtSFunction off + CreateSILPILBlock "None" + CodeExecutionProfiling off + CodeExecutionProfileVariable "executionProfile" + CodeProfilingSaveOptions "SummaryOnly" + CodeProfilingInstrumentation off + SILDebugging off + TargetLang "C" + IncludeBusHierarchyInRTWFileBlockHierarchyMap off + IncludeERTFirstTime off + GenerateTraceInfo off + GenerateTraceReport off + GenerateTraceReportSl off + GenerateTraceReportSf off + GenerateTraceReportEml off + GenerateCodeInfo off + GenerateWebview off + GenerateCodeMetricsReport off + GenerateCodeReplacementReport off + RTWCompilerOptimization "Off" + CheckMdlBeforeBuild "Off" + CustomRebuildMode "OnUpdate" + Array { + Type "Handle" + Dimension 2 + Simulink.CodeAppCC { + $ObjectID 17 + Version "1.13.0" + Array { + Type "Cell" + Dimension 21 + Cell "IgnoreCustomStorageClasses" + Cell "IgnoreTestpoints" + Cell "InsertBlockDesc" + Cell "InsertPolySpaceComments" + Cell "SFDataObjDesc" + Cell "MATLABFcnDesc" + Cell "SimulinkDataObjDesc" + Cell "DefineNamingRule" + Cell "SignalNamingRule" + Cell "ParamNamingRule" + Cell "InlinedPrmAccess" + Cell "CustomSymbolStr" + Cell "CustomSymbolStrGlobalVar" + Cell "CustomSymbolStrType" + Cell "CustomSymbolStrField" + Cell "CustomSymbolStrFcn" + Cell "CustomSymbolStrFcnArg" + Cell "CustomSymbolStrBlkIO" + Cell "CustomSymbolStrTmpVar" + Cell "CustomSymbolStrMacro" + Cell "ReqsInCode" + PropName "DisabledProps" + } + ForceParamTrailComments off + GenerateComments on + IgnoreCustomStorageClasses on + IgnoreTestpoints off + IncHierarchyInIds off + MaxIdLength 31 + PreserveName off + PreserveNameWithParent off + ShowEliminatedStatement off + OperatorAnnotations off + IncAutoGenComments off + SimulinkDataObjDesc off + SFDataObjDesc off + MATLABFcnDesc off + IncDataTypeInIds off + MangleLength 1 + CustomSymbolStrGlobalVar "$R$N$M" + CustomSymbolStrType "$N$R$M_T" + CustomSymbolStrField "$N$M" + CustomSymbolStrFcn "$R$N$M$F" + CustomSymbolStrFcnArg "rt$I$N$M" + CustomSymbolStrBlkIO "rtb_$N$M" + CustomSymbolStrTmpVar "$N$M" + CustomSymbolStrMacro "$R$N$M" + DefineNamingRule "None" + ParamNamingRule "None" + SignalNamingRule "None" + InsertBlockDesc off + InsertPolySpaceComments off + SimulinkBlockComments on + MATLABSourceComments off + EnableCustomComments off + InternalIdentifier "Shortened" + InlinedPrmAccess "Literals" + ReqsInCode off + UseSimReservedNames off + } + Simulink.GRTTargetCC { + $BackupClass "Simulink.TargetCC" + $ObjectID 18 + Version "1.13.0" + Array { + Type "Cell" + Dimension 16 + Cell "GeneratePreprocessorConditionals" + Cell "IncludeMdlTerminateFcn" + Cell "CombineOutputUpdateFcns" + Cell "SuppressErrorStatus" + Cell "ERTCustomFileBanners" + Cell "GenerateSampleERTMain" + Cell "GenerateTestInterfaces" + Cell "ModelStepFunctionPrototypeControlCompliant" + Cell "CPPClassGenCompliant" + Cell "PortableWordSizes" + Cell "PurelyIntegerCode" + Cell "SupportComplex" + Cell "SupportAbsoluteTime" + Cell "SupportContinuousTime" + Cell "SupportNonInlinedSFcns" + Cell "GenerateAllocFcn" + PropName "DisabledProps" + } + TargetFcnLib "ansi_tfl_table_tmw.mat" + TargetLibSuffix "" + TargetPreCompLibLocation "" + CodeReplacementLibrary "ANSI_C" + UtilityFuncGeneration "Auto" + ERTMultiwordTypeDef "System defined" + ERTMultiwordLength 256 + MultiwordLength 2048 + GenerateFullHeader on + GenerateSampleERTMain off + GenerateTestInterfaces off + IsPILTarget off + ModelReferenceCompliant on + ParMdlRefBuildCompliant on + CompOptLevelCompliant on + ConcurrentExecutionCompliant on + IncludeMdlTerminateFcn on + GeneratePreprocessorConditionals "Disable all" + CombineOutputUpdateFcns off + CombineSignalStateStructs off + SuppressErrorStatus off + ERTFirstTimeCompliant off + IncludeFileDelimiter "Auto" + ERTCustomFileBanners off + SupportAbsoluteTime on + LogVarNameModifier "rt_" + MatFileLogging on + MultiInstanceERTCode off + SupportNonFinite on + SupportComplex on + PurelyIntegerCode off + SupportContinuousTime on + SupportNonInlinedSFcns on + SupportVariableSizeSignals off + EnableShiftOperators on + ParenthesesLevel "Nominal" + MATLABClassNameForMDSCustomization "Simulink.SoftwareTarget.GRTCustomization" + ModelStepFunctionPrototypeControlCompliant off + CPPClassGenCompliant off + AutosarCompliant off + GRTInterface on + GenerateAllocFcn off + UseMalloc off + ExtMode off + ExtModeStaticAlloc off + ExtModeTesting off + ExtModeStaticAllocSize 1000000 + ExtModeTransport 0 + ExtModeMexFile "ext_comm" + ExtModeIntrfLevel "Level1" + RTWCAPISignals off + RTWCAPIParams off + RTWCAPIStates off + RTWCAPIRootIO off + GenerateASAP2 off + } + PropName "Components" + } + } + SSC.SimscapeCC { + $ObjectID 19 + Version "1.0" + Array { + Type "Cell" + Dimension 1 + Cell "Name" + PropName "DisabledProps" + } + Name "Simscape" + EditingMode "Full" + ExplicitSolverDiagnosticOptions "warning" + GlobalZcOffDiagnosticOptions "warning" + SimscapeLogType "none" + SimscapeLogSimulationStatistics off + SimscapeLogName "simlog" + SimscapeLogDecimation 1 + SimscapeLogLimitData on + SimscapeLogDataHistory 5000 + } + PropName "Components" + } + Name "Configuration" + CurrentDlgPage "Solver" + ConfigPrmDlgPosition [ 520, 285, 1400, 915 ] + } + PropName "ConfigurationSets" + } + Simulink.ConfigSet { + $PropName "ActiveConfigurationSet" + $ObjectID 8 + } + Object { + $PropName "DataTransfer" + $ObjectID 20 + $ClassName "Simulink.GlobalDataTransfer" + DefaultTransitionBetweenSyncTasks "Ensure deterministic transfer (maximum delay)" + DefaultTransitionBetweenAsyncTasks "Ensure data integrity only" + DefaultTransitionBetweenContTasks "Ensure deterministic transfer (minimum delay)" + DefaultExtrapolationMethodBetweenContTasks "None" + AutoInsertRateTranBlk [0] + } + ExplicitPartitioning off + BlockDefaults { + ForegroundColor "black" + BackgroundColor "white" + DropShadow off + NamePlacement "normal" + FontName "Helvetica" + FontSize 10 + FontWeight "normal" + FontAngle "normal" + ShowName on + BlockRotation 0 + BlockMirror off + } + AnnotationDefaults { + HorizontalAlignment "center" + VerticalAlignment "middle" + ForegroundColor "black" + BackgroundColor "white" + DropShadow off + FontName "Helvetica" + FontSize 10 + FontWeight "normal" + FontAngle "normal" + UseDisplayTextAsClickCallback off + } + LineDefaults { + FontName "Helvetica" + FontSize 9 + FontWeight "normal" + FontAngle "normal" + } + MaskDefaults { + SelfModifiable "off" + IconFrame "on" + IconOpaque "on" + RunInitForIconRedraw "off" + IconRotate "none" + PortRotate "default" + IconUnits "autoscale" + } + MaskParameterDefaults { + Evaluate "on" + Tunable "on" + NeverSave "off" + Internal "off" + ReadOnly "off" + Enabled "on" + Visible "on" + ToolTip "on" + } + BlockParameterDefaults { + Block { + BlockType BusSelector + OutputSignals "signal1,signal2,signal3" + OutputAsBus off + } + Block { + BlockType Clock + DisplayTime off + Decimation "10" + } + Block { + BlockType Concatenate + NumInputs "2" + Mode "Vector" + ConcatenateDimension "1" + } + Block { + BlockType Constant + Value "1" + VectorParams1D on + SamplingMode "Sample based" + OutMin "[]" + OutMax "[]" + OutDataTypeStr "Inherit: Inherit from 'Constant value'" + LockScale off + SampleTime "inf" + FramePeriod "inf" + PreserveConstantTs off + } + Block { + BlockType Demux + Outputs "4" + DisplayOption "none" + BusSelectionMode off + } + Block { + BlockType Fcn + Expr "sin(u[1])" + SampleTime "-1" + } + Block { + BlockType From + GotoTag "A" + IconDisplay "Tag" + TagVisibility "local" + } + Block { + BlockType FromWorkspace + VariableName "simulink_input" + OutDataTypeStr "Inherit: auto" + SampleTime "-1" + Interpolate on + ZeroCross off + OutputAfterFinalValue "Extrapolation" + } + Block { + BlockType Gain + Gain "1" + Multiplication "Element-wise(K.*u)" + ParamMin "[]" + ParamMax "[]" + ParamDataTypeStr "Inherit: Same as input" + OutMin "[]" + OutMax "[]" + OutDataTypeStr "Inherit: Same as input" + LockScale off + RndMeth "Floor" + SaturateOnIntegerOverflow on + SampleTime "-1" + } + Block { + BlockType Goto + GotoTag "A" + IconDisplay "Tag" + TagVisibility "local" + } + Block { + BlockType Inport + Port "1" + OutputFunctionCall off + OutMin "[]" + OutMax "[]" + OutDataTypeStr "Inherit: auto" + LockScale off + BusOutputAsStruct off + PortDimensions "-1" + VarSizeSig "Inherit" + SampleTime "-1" + SignalType "auto" + SamplingMode "auto" + LatchByDelayingOutsideSignal off + LatchInputForFeedbackSignals off + Interpolate on + } + Block { + BlockType Integrator + ExternalReset "none" + InitialConditionSource "internal" + InitialCondition "0" + LimitOutput off + UpperSaturationLimit "inf" + LowerSaturationLimit "-inf" + ShowSaturationPort off + ShowStatePort off + AbsoluteTolerance "auto" + IgnoreLimit off + ZeroCross on + ContinuousStateAttributes "''" + } + Block { + BlockType Memory + X0 "0" + InheritSampleTime off + LinearizeMemory off + LinearizeAsDelay off + StateMustResolveToSignalObject off + RTWStateStorageClass "Auto" + } + Block { + BlockType Mux + Inputs "4" + DisplayOption "none" + UseBusObject off + BusObject "BusObject" + NonVirtualBus off + } + Block { + BlockType Outport + Port "1" + OutMin "[]" + OutMax "[]" + OutDataTypeStr "Inherit: auto" + LockScale off + BusOutputAsStruct off + PortDimensions "-1" + VarSizeSig "Inherit" + SampleTime "-1" + SignalType "auto" + SamplingMode "auto" + SourceOfInitialOutputValue "Dialog" + OutputWhenDisabled "held" + InitialOutput "[]" + } + Block { + BlockType PMIOPort + } + Block { + BlockType Product + Inputs "2" + Multiplication "Element-wise(.*)" + CollapseMode "All dimensions" + CollapseDim "1" + InputSameDT on + OutMin "[]" + OutMax "[]" + OutDataTypeStr "Inherit: Same as first input" + LockScale off + RndMeth "Zero" + SaturateOnIntegerOverflow on + SampleTime "-1" + } + Block { + BlockType S-Function + FunctionName "system" + SFunctionModules "''" + PortCounts "[]" + SFunctionDeploymentMode off + } + Block { + BlockType Saturate + UpperLimitSource "Dialog" + UpperLimit "0.5" + LowerLimitSource "Dialog" + LowerLimit "-0.5" + LinearizeAsGain on + ZeroCross on + SampleTime "-1" + OutMin "[]" + OutMax "[]" + OutDataTypeStr "Inherit: Same as input" + LockScale off + RndMeth "Floor" + } + Block { + BlockType Scope + ModelBased off + TickLabels "OneTimeTick" + ZoomMode "on" + Grid "on" + TimeRange "auto" + YMin "-5" + YMax "5" + SaveToWorkspace off + SaveName "ScopeData" + DataFormat "Array" + LimitDataPoints on + MaxDataPoints "5000" + Decimation "1" + SampleInput off + SampleTime "-1" + } + Block { + BlockType SubSystem + ShowPortLabels "FromPortIcon" + Permissions "ReadWrite" + PermitHierarchicalResolution "All" + TreatAsAtomicUnit off + CheckFcnCallInpInsideContextMsg off + SystemSampleTime "-1" + RTWFcnNameOpts "Auto" + RTWFileNameOpts "Auto" + FunctionInterfaceSpec "void_void" + RTWMemSecFuncInitTerm "Inherit from model" + RTWMemSecFuncExecute "Inherit from model" + RTWMemSecDataConstants "Inherit from model" + RTWMemSecDataInternal "Inherit from model" + RTWMemSecDataParameters "Inherit from model" + SimViewingDevice off + DataTypeOverride "UseLocalSettings" + DataTypeOverrideAppliesTo "AllNumericTypes" + MinMaxOverflowLogging "UseLocalSettings" + SFBlockType "NONE" + Variant off + GeneratePreprocessorConditionals off + } + Block { + BlockType Sum + IconShape "rectangular" + Inputs "++" + CollapseMode "All dimensions" + CollapseDim "1" + InputSameDT on + AccumDataTypeStr "Inherit: Inherit via internal rule" + OutMin "[]" + OutMax "[]" + OutDataTypeStr "Inherit: Same as first input" + LockScale off + RndMeth "Floor" + SaturateOnIntegerOverflow on + SampleTime "-1" + } + Block { + BlockType Terminator + } + Block { + BlockType ToWorkspace + VariableName "simulink_output" + MaxDataPoints "1000" + Decimation "1" + SampleTime "0" + SaveFormat "Array" + FixptAsFi off + NumInputs "1" + } + Block { + BlockType ZeroOrderHold + SampleTime "1" + } + } + System { + Name "Microgrid_24h_Simulation" + Location [-8, -8, 1608, 908] + Open on + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "60" + ReportName "simulink-default.rpt" + SIDHighWatermark "3068" + Block { + BlockType SubSystem + Name "AC Load" + SID "2165" + Ports [0, 0, 0, 0, 0, 3] + Position [1580, 438, 1720, 572] + ZOrder -1 + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + Object { + $PropName "MaskObject" + $ObjectID 21 + $ClassName "Simulink.Mask" + Display "image(imread('img/Plug.bmp'))" + } + System { + Name "AC Load" + Location [-8, -8, 1608, 908] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Reference + Name "3-Phase\nDynamic Load" + SID "2166" + Ports [1, 1, 0, 0, 0, 3] + Position [800, 44, 915, 206] + ZOrder -1 + LibraryVersion "1.2191" + SourceBlock "powerlib/Elements/Three-Phase\nDynamic Load" + SourceType "Three-Phase Dynamic Load" + NominalVoltage "[ 400 50 ]" + ActiveReactivePowers "[0 0]" + PositiveSequence "[1 0]" + ExternalControl on + NpNq "[1 1]" + TimeConstants "[0 0 0 0]" + MinimumVoltage "0.7" + LoadFlowParameters "[4 50000000 0 0 25000000]" + } + Block { + BlockType BusSelector + Name "Bus\nSelector1" + SID "2167" + Ports [1, 1] + Position [950, 106, 955, 144] + ZOrder -2 + ShowName off + OutputSignals "Active power P (W),Reactive power Q (var)" + OutputAsBus on + } + Block { + BlockType SubSystem + Name "Load Measurements" + SID "2168" + Ports [0, 0, 0, 0, 0, 3, 3] + Position [400, 81, 490, 209] + ZOrder -3 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Load Measurements" + Location [-8, 0, 1608, 916] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Goto + Name "Goto" + SID "3035" + Position [900, 355, 960, 385] + ZOrder 30 + ShowName off + GotoTag "RPower" + TagVisibility "global" + } + Block { + BlockType Goto + Name "Goto1" + SID "3041" + Position [900, 280, 960, 310] + ZOrder 29 + ShowName off + GotoTag "APower" + TagVisibility "global" + } + Block { + BlockType Reference + Name "Power\n(3ph, Instantaneous)" + SID "3040" + Ports [2, 2] + Position [725, 315, 775, 355] + ZOrder 2 + LibraryVersion "1.31" + FontName "Arial" + SourceBlock "powerlib_meascontrol/Measurements/Power\n(3ph, Instantaneous)" + SourceType "Power (3ph, Instantaneous)" + } + Block { + BlockType SubSystem + Name "Subsystem1" + SID "2364" + Ports [1] + Position [640, 41, 675, 79] + ZOrder -1 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem1" + Location [982, 630, 1310, 932] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Vabc" + SID "2365" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "2366" + Position [185, 31, 245, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Vabc2" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "2367" + Ports [1] + Position [185, 75, 245, 105] + ZOrder -21 + ShowName off + VariableName "Vabc2" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Vabc" + SrcPort 1 + Points [55, 0] + Branch { + Points [0, 45] + DstBlock "To Workspace1" + DstPort 1 + } + Branch { + DstBlock "Goto2" + DstPort 1 + } + } + } + } + Block { + BlockType SubSystem + Name "Subsystem2" + SID "2368" + Ports [1] + Position [195, 26, 230, 64] + ZOrder -2 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem2" + Location [982, 630, 1310, 932] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Iabc" + SID "2369" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "2370" + Position [185, 31, 245, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Iabc2" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "2371" + Ports [1] + Position [185, 75, 245, 105] + ZOrder -21 + ShowName off + VariableName "Iabc2" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Iabc" + SrcPort 1 + Points [55, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + DstBlock "To Workspace1" + DstPort 1 + } + } + } + } + Block { + BlockType Reference + Name "Three-Phase\nV Measurement" + SID "2171" + Ports [0, 1, 0, 0, 0, 3, 3] + Position [525, 40, 610, 170] + ZOrder -3 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Three-Phase\nV-I Measurement" + SourceType "Three-Phase VI Measurement" + VoltageMeasurement "phase-to-ground" + SetLabelV off + LabelV "Vabc" + Vpu off + VpuLL off + CurrentMeasurement "no" + SetLabelI off + LabelI "Iabc" + Ipu off + Pbase "100e6" + Vbase "500e3" + OutputType "Complex" + PhasorSimulation off + PSBequivalent "0" + } + Block { + BlockType Reference + Name "Three-Phase \nI Measurement" + SID "2172" + Ports [0, 1, 0, 0, 0, 3, 3] + Position [80, 25, 165, 155] + ZOrder -4 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Three-Phase\nV-I Measurement" + SourceType "Three-Phase VI Measurement" + VoltageMeasurement "no" + SetLabelV off + LabelV "Vabc" + Vpu off + VpuLL off + CurrentMeasurement "yes" + SetLabelI off + LabelI "Iabc" + Ipu off + Pbase "100e6" + Vbase "500e3" + OutputType "Complex" + PhasorSimulation off + PSBequivalent "0" + } + Block { + BlockType PMIOPort + Name "A" + SID "2173" + Position [25, 38, 55, 52] + ZOrder -5 + Port "1" + Side "Left" + } + Block { + BlockType PMIOPort + Name "A " + SID "2174" + Position [835, 83, 865, 97] + ZOrder -6 + BlockMirror on + Port "2" + Side "Right" + } + Block { + BlockType PMIOPort + Name "B" + SID "2175" + Position [25, 83, 55, 97] + ZOrder -7 + Port "3" + Side "Left" + } + Block { + BlockType PMIOPort + Name "B " + SID "2176" + Position [835, 113, 865, 127] + ZOrder -8 + BlockMirror on + Port "4" + Side "Right" + } + Block { + BlockType PMIOPort + Name "C" + SID "2177" + Position [25, 128, 55, 142] + ZOrder -9 + Port "5" + Side "Left" + } + Block { + BlockType PMIOPort + Name "C " + SID "2178" + Position [835, 143, 865, 157] + ZOrder -10 + BlockMirror on + Port "6" + Side "Right" + } + Line { + LineType "Connection" + SrcBlock "Three-Phase\nV Measurement" + SrcPort LConn1 + Points [-260, 0; 0, 15] + DstBlock "Three-Phase \nI Measurement" + DstPort RConn1 + } + Line { + LineType "Connection" + SrcBlock "Three-Phase\nV Measurement" + SrcPort LConn2 + DstBlock "Three-Phase \nI Measurement" + DstPort RConn2 + } + Line { + LineType "Connection" + SrcBlock "Three-Phase \nI Measurement" + SrcPort RConn3 + Points [70, 0; 0, 15] + DstBlock "Three-Phase\nV Measurement" + DstPort LConn3 + } + Line { + SrcBlock "Three-Phase \nI Measurement" + SrcPort 1 + Points [7, 0] + Branch { + Points [0, 300] + DstBlock "Power\n(3ph, Instantaneous)" + DstPort 2 + } + Branch { + DstBlock "Subsystem2" + DstPort 1 + } + } + Line { + SrcBlock "Three-Phase\nV Measurement" + SrcPort 1 + Points [9, 0] + Branch { + Points [0, 265] + DstBlock "Power\n(3ph, Instantaneous)" + DstPort 1 + } + Branch { + DstBlock "Subsystem1" + DstPort 1 + } + } + Line { + LineType "Connection" + SrcBlock "A" + SrcPort RConn1 + DstBlock "Three-Phase \nI Measurement" + DstPort LConn1 + } + Line { + LineType "Connection" + SrcBlock "Three-Phase\nV Measurement" + SrcPort RConn1 + DstBlock "A " + DstPort RConn1 + } + Line { + LineType "Connection" + SrcBlock "B" + SrcPort RConn1 + DstBlock "Three-Phase \nI Measurement" + DstPort LConn2 + } + Line { + LineType "Connection" + SrcBlock "Three-Phase\nV Measurement" + SrcPort RConn2 + DstBlock "B " + DstPort RConn1 + } + Line { + LineType "Connection" + SrcBlock "C" + SrcPort RConn1 + DstBlock "Three-Phase \nI Measurement" + DstPort LConn3 + } + Line { + LineType "Connection" + SrcBlock "Three-Phase\nV Measurement" + SrcPort RConn3 + DstBlock "C " + DstPort RConn1 + } + Line { + SrcBlock "Power\n(3ph, Instantaneous)" + SrcPort 1 + Points [57, 0; 0, -30] + DstBlock "Goto1" + DstPort 1 + } + Line { + SrcBlock "Power\n(3ph, Instantaneous)" + SrcPort 2 + Points [57, 0; 0, 25] + DstBlock "Goto" + DstPort 1 + } + } + } + Block { + BlockType SubSystem + Name "Load Measurements1" + SID "3042" + Ports [0, 0, 0, 0, 0, 3, 3] + Position [145, 270, 285, 360] + ZOrder 2 + BlockRotation 270 + BlockMirror on + NamePlacement "alternate" + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Load Measurements1" + Location [-8, 0, 1608, 916] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType SubSystem + Name "Subsystem1" + SID "3043" + Ports [1] + Position [640, 41, 675, 79] + ZOrder -1 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem1" + Location [982, 630, 1310, 932] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Vabc" + SID "3044" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "3045" + Position [185, 31, 245, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Vabc3" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "3046" + Ports [1] + Position [185, 75, 245, 105] + ZOrder -21 + ShowName off + VariableName "Vabc3" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Vabc" + SrcPort 1 + Points [55, 0] + Branch { + Points [0, 45] + DstBlock "To Workspace1" + DstPort 1 + } + Branch { + DstBlock "Goto2" + DstPort 1 + } + } + } + } + Block { + BlockType SubSystem + Name "Subsystem2" + SID "3047" + Ports [1] + Position [190, 26, 225, 64] + ZOrder -2 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem2" + Location [982, 630, 1310, 932] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Iabc3" + SID "3048" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "3049" + Position [185, 31, 245, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Iabc3" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "3050" + Ports [1] + Position [185, 75, 245, 105] + ZOrder -21 + ShowName off + VariableName "Iabc3" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Iabc3" + SrcPort 1 + Points [55, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + DstBlock "To Workspace1" + DstPort 1 + } + } + } + } + Block { + BlockType Reference + Name "Three-Phase\nV Measurement" + SID "3051" + Ports [0, 1, 0, 0, 0, 3, 3] + Position [525, 40, 610, 170] + ZOrder -3 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Three-Phase\nV-I Measurement" + SourceType "Three-Phase VI Measurement" + VoltageMeasurement "phase-to-ground" + SetLabelV off + LabelV "Vabc" + Vpu off + VpuLL off + CurrentMeasurement "no" + SetLabelI off + LabelI "Iabc" + Ipu off + Pbase "100e6" + Vbase "500e3" + OutputType "Complex" + PhasorSimulation off + PSBequivalent "0" + } + Block { + BlockType Reference + Name "Three-Phase \nI Measurement" + SID "3052" + Ports [0, 1, 0, 0, 0, 3, 3] + Position [80, 25, 165, 155] + ZOrder -4 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Three-Phase\nV-I Measurement" + SourceType "Three-Phase VI Measurement" + VoltageMeasurement "no" + SetLabelV off + LabelV "Vabc" + Vpu off + VpuLL off + CurrentMeasurement "yes" + SetLabelI off + LabelI "Iabc" + Ipu off + Pbase "100e6" + Vbase "500e3" + OutputType "Complex" + PhasorSimulation off + PSBequivalent "0" + } + Block { + BlockType PMIOPort + Name "a" + SID "3053" + Position [25, 38, 55, 52] + ZOrder -5 + Port "1" + Side "Left" + } + Block { + BlockType PMIOPort + Name "A " + SID "3054" + Position [835, 83, 865, 97] + ZOrder -6 + BlockMirror on + Port "2" + Side "Right" + } + Block { + BlockType PMIOPort + Name "B" + SID "3055" + Position [25, 83, 55, 97] + ZOrder -7 + Port "3" + Side "Left" + } + Block { + BlockType PMIOPort + Name "B " + SID "3056" + Position [835, 113, 865, 127] + ZOrder -8 + BlockMirror on + Port "4" + Side "Right" + } + Block { + BlockType PMIOPort + Name "C" + SID "3057" + Position [25, 128, 55, 142] + ZOrder -9 + Port "5" + Side "Left" + } + Block { + BlockType PMIOPort + Name "C " + SID "3058" + Position [835, 143, 865, 157] + ZOrder -10 + BlockMirror on + Port "6" + Side "Right" + } + Line { + LineType "Connection" + SrcBlock "Three-Phase\nV Measurement" + SrcPort RConn3 + DstBlock "C " + DstPort RConn1 + } + Line { + LineType "Connection" + SrcBlock "C" + SrcPort RConn1 + DstBlock "Three-Phase \nI Measurement" + DstPort LConn3 + } + Line { + LineType "Connection" + SrcBlock "Three-Phase\nV Measurement" + SrcPort RConn2 + DstBlock "B " + DstPort RConn1 + } + Line { + LineType "Connection" + SrcBlock "B" + SrcPort RConn1 + DstBlock "Three-Phase \nI Measurement" + DstPort LConn2 + } + Line { + LineType "Connection" + SrcBlock "Three-Phase\nV Measurement" + SrcPort RConn1 + DstBlock "A " + DstPort RConn1 + } + Line { + LineType "Connection" + SrcBlock "a" + SrcPort RConn1 + DstBlock "Three-Phase \nI Measurement" + DstPort LConn1 + } + Line { + SrcBlock "Three-Phase\nV Measurement" + SrcPort 1 + DstBlock "Subsystem1" + DstPort 1 + } + Line { + SrcBlock "Three-Phase \nI Measurement" + SrcPort 1 + DstBlock "Subsystem2" + DstPort 1 + } + Line { + LineType "Connection" + SrcBlock "Three-Phase \nI Measurement" + SrcPort RConn3 + Points [70, 0; 0, 15] + DstBlock "Three-Phase\nV Measurement" + DstPort LConn3 + } + Line { + LineType "Connection" + SrcBlock "Three-Phase\nV Measurement" + SrcPort LConn2 + DstBlock "Three-Phase \nI Measurement" + DstPort RConn2 + } + Line { + LineType "Connection" + SrcBlock "Three-Phase\nV Measurement" + SrcPort LConn1 + Points [-260, 0; 0, 15] + DstBlock "Three-Phase \nI Measurement" + DstPort RConn1 + } + } + } + Block { + BlockType Scope + Name "Load Measurements2" + SID "2190" + Ports [1] + Position [995, 84, 1055, 166] + ZOrder -19 + Floating off + Location [534, 98, 1318, 894] + Open off + NumInputPorts "1" + ZoomMode "xonly" + List { + ListType AxesTitles + axes1 "Phase to Ground Load Voltages, Vabc (V)" + } + List { + ListType ScopeGraphics + FigureColor "[0.5 0.5 0.5]" + AxesColor "[0 0 0]" + AxesTickColor "[1 1 1]" + LineColors "[1 1 0;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" + LineStyles "-|-|-|-|-|-" + LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" + MarkerStyles "none|none|none|none|none|none" + } + ShowLegends off + TimeRange "1" + YMin "50" + YMax "475" + SaveName "ScopeData1" + DataFormat "StructureWithTime" + LimitDataPoints off + SampleTime "0" + } + Block { + BlockType SubSystem + Name "Power Demand 24h" + SID "2191" + Ports [0, 1] + Position [600, 35, 690, 95] + ZOrder -20 + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Power Demand 24h" + Location [-8, -8, 1608, 908] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType FromWorkspace + Name "From\nWorkspace" + SID "2589" + Position [20, 58, 85, 82] + ZOrder 23 + VariableName "VARPA'" + OutDataTypeStr "double" + SampleTime "[0.1,0]" + Interpolate off + OutputAfterFinalValue "Setting to zero" + } + Block { + BlockType FromWorkspace + Name "From\nWorkspace1" + SID "2590" + Position [20, 148, 85, 172] + ZOrder 24 + VariableName "VARPQ'" + OutDataTypeStr "double" + SampleTime "[0.1,0]" + Interpolate off + OutputAfterFinalValue "Setting to zero" + } + Block { + BlockType Concatenate + Name "Vector\nConcatenate" + SID "2585" + Ports [2, 1] + Position [255, 61, 260, 99] + ZOrder 19 + ShowName off + } + Block { + BlockType Outport + Name "PQ" + SID "2205" + Position [290, 63, 320, 77] + ZOrder -4 + IconDisplay "Port number" + } + Line { + SrcBlock "Vector\nConcatenate" + SrcPort 1 + Points [10, 0] + DstBlock "PQ" + DstPort 1 + } + Line { + SrcBlock "From\nWorkspace" + SrcPort 1 + DstBlock "Vector\nConcatenate" + DstPort 1 + } + Line { + SrcBlock "From\nWorkspace1" + SrcPort 1 + Points [85, 0; 0, -70] + DstBlock "Vector\nConcatenate" + DstPort 2 + } + } + } + Block { + BlockType Reference + Name "Three-Phase\nParallel RLC Load1" + SID "3059" + Ports [0, 0, 0, 0, 0, 3] + Position [145, 440, 285, 605] + ZOrder 1 + BlockRotation 270 + BlockMirror on + ShowName off + AttributesFormatString "\\n" + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Elements/Three-Phase\nParallel RLC Load" + SourceType "Three-Phase Parallel RLC Load" + LConnTagsString "A|B|C" + Configuration "Y (grounded)" + NominalVoltage "400" + NominalFrequency "50" + ActivePower "10" + InductivePower "0" + CapacitivePower "0" + Measurements "Branch voltages and currents" + LoadType "constant Z" + } + Block { + BlockType PMIOPort + Name "A" + SID "2207" + Position [40, 98, 70, 112] + ZOrder -22 + Port "1" + Side "Left" + } + Block { + BlockType PMIOPort + Name "B" + SID "2208" + Position [40, 138, 70, 152] + ZOrder -23 + Port "2" + Side "Left" + } + Block { + BlockType PMIOPort + Name "C" + SID "2209" + Position [40, 178, 70, 192] + ZOrder -24 + Port "3" + Side "Left" + } + Line { + SrcBlock "Power Demand 24h" + SrcPort 1 + DstBlock "3-Phase\nDynamic Load" + DstPort 1 + } + Line { + SrcBlock "3-Phase\nDynamic Load" + SrcPort 1 + DstBlock "Bus\nSelector1" + DstPort 1 + } + Line { + SrcBlock "Bus\nSelector1" + SrcPort 1 + DstBlock "Load Measurements2" + DstPort 1 + } + Line { + LineType "Connection" + SrcBlock "A" + SrcPort RConn1 + Points [85, 0] + Branch { + ConnectType "DEST_DEST" + SrcBlock "Load Measurements1" + SrcPort LConn1 + Points [0, -150] + } + Branch { + ConnectType "DEST_SRC" + DstBlock "Load Measurements" + DstPort LConn1 + } + } + Line { + LineType "Connection" + SrcBlock "Load Measurements" + SrcPort LConn2 + Points [-170, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "B" + DstPort RConn1 + } + Branch { + ConnectType "DEST_DEST" + SrcBlock "Load Measurements1" + SrcPort LConn2 + Points [0, -110] + } + } + Line { + LineType "Connection" + SrcBlock "Load Measurements" + SrcPort LConn3 + Points [-125, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "C" + DstPort RConn1 + } + Branch { + ConnectType "DEST_DEST" + SrcBlock "Load Measurements1" + SrcPort LConn3 + Points [0, -70] + } + } + Line { + LineType "Connection" + SrcBlock "Load Measurements" + SrcPort RConn1 + Points [35, 0; 0, 20; 210, 0; 0, -20] + DstBlock "3-Phase\nDynamic Load" + DstPort LConn1 + } + Line { + LineType "Connection" + SrcBlock "Load Measurements" + SrcPort RConn2 + DstBlock "3-Phase\nDynamic Load" + DstPort LConn2 + } + Line { + LineType "Connection" + SrcBlock "Load Measurements" + SrcPort RConn3 + DstBlock "3-Phase\nDynamic Load" + DstPort LConn3 + } + Line { + LineType "Connection" + SrcBlock "Load Measurements1" + SrcPort RConn3 + DstBlock "Three-Phase\nParallel RLC Load1" + DstPort LConn3 + } + Line { + LineType "Connection" + SrcBlock "Load Measurements1" + SrcPort RConn1 + DstBlock "Three-Phase\nParallel RLC Load1" + DstPort LConn1 + } + Line { + LineType "Connection" + SrcBlock "Load Measurements1" + SrcPort RConn2 + DstBlock "Three-Phase\nParallel RLC Load1" + DstPort LConn2 + } + } + } + Block { + BlockType SubSystem + Name "Battery" + SID "421" + Ports [0, 0, 0, 0, 0, 2] + Position [295, 699, 445, 841] + ZOrder -2 + BlockMirror on + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + Object { + $PropName "MaskObject" + $ObjectID 22 + $ClassName "Simulink.Mask" + Display "image(imread('img/Battery.bmp'))" + } + System { + Name "Battery" + Location [-8, -8, 1608, 908] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Reference + Name "Battery" + SID "422" + Ports [0, 1, 0, 0, 0, 2] + Position [270, 66, 370, 184] + ZOrder -1 + BlockMirror on + LibraryVersion "1.996" + FontName "Verdana" + FontSize 11 + SourceBlock "electricdrivelib/Extra Sources/Battery" + SourceType "Battery" + BatType "Lead-Acid" + ShowDetailedParameters off + NomV "1000" + NomQ "100" + SOC "50" + PresetModel on + MaxQ "1.0417" + FullV "1088.8158" + Dis_rate "0.2" + R "10" + Normal_OP "0.31028" + expZone "[1018.0921 0.0033333333]" + Dis_Char off + current "[20 50 100]" + Units "Time" + Batt_Tr "2.7e-5" + } + Block { + BlockType BusSelector + Name "Bus\nSelector" + SID "423" + Ports [1, 3] + Position [215, 69, 220, 181] + ZOrder -2 + BlockMirror on + NamePlacement "alternate" + ShowName off + OutputSignals "SOC (%),Current (A),Voltage (V)" + Port { + PortNumber 1 + Name "" + RTWStorageClass "Auto" + DataLoggingNameMode "SignalName" + } + Port { + PortNumber 2 + Name "" + RTWStorageClass "Auto" + DataLoggingNameMode "SignalName" + } + Port { + PortNumber 3 + Name "" + RTWStorageClass "Auto" + DataLoggingNameMode "SignalName" + } + } + Block { + BlockType Reference + Name "LPF vq1" + SID "832" + Ports [1, 1] + Position [95, 109, 130, 141] + ZOrder -3 + BlockMirror on + NamePlacement "alternate" + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType Reference + Name "LPF vq2" + SID "1541" + Ports [1, 1] + Position [95, 144, 130, 176] + ZOrder -4 + BlockMirror on + NamePlacement "alternate" + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType SubSystem + Name "Subsystem1" + SID "714" + Ports [1] + Position [20, 106, 55, 144] + ZOrder -5 + BlockMirror on + NamePlacement "alternate" + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem1" + Location [982, 630, 1231, 931] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Ibat" + SID "715" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto1" + SID "1151" + Position [120, 31, 180, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Ibat" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "717" + Ports [1] + Position [120, 75, 180, 105] + ZOrder -21 + ShowName off + VariableName "Ibat" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Ibat" + SrcPort 1 + Points [25, 0] + Branch { + Points [0, 0; 0, 45] + DstBlock "To Workspace1" + DstPort 1 + } + Branch { + DstBlock "Goto1" + DstPort 1 + } + } + } + } + Block { + BlockType SubSystem + Name "Subsystem2" + SID "718" + Ports [1] + Position [20, 141, 55, 179] + ZOrder -6 + BlockMirror on + NamePlacement "alternate" + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem2" + Location [982, 630, 1231, 931] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Vbat" + SID "719" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto3" + SID "1153" + Position [120, 31, 180, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Vbat" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "721" + Ports [1] + Position [120, 75, 180, 105] + ZOrder -21 + ShowName off + VariableName "Vbat" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Vbat" + SrcPort 1 + Points [25, 0] + Branch { + Points [0, 0; 0, 45] + DstBlock "To Workspace1" + DstPort 1 + } + Branch { + DstBlock "Goto3" + DstPort 1 + } + } + } + } + Block { + BlockType SubSystem + Name "Subsystem5" + SID "710" + Ports [1] + Position [20, 71, 55, 109] + ZOrder -7 + BlockMirror on + NamePlacement "alternate" + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem5" + Location [-8, 0, 1604, 876] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "SOC" + SID "711" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "1152" + Position [120, 31, 180, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "SOC" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "713" + Ports [1] + Position [120, 75, 180, 105] + ZOrder -21 + ShowName off + VariableName "SOC" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "SOC" + SrcPort 1 + Points [25, 0] + Branch { + Points [0, 45] + DstBlock "To Workspace1" + DstPort 1 + } + Branch { + DstBlock "Goto2" + DstPort 1 + } + } + } + } + Block { + BlockType PMIOPort + Name "+" + SID "427" + Position [520, 88, 550, 102] + ZOrder -8 + BlockMirror on + Port "1" + Side "Left" + } + Block { + BlockType PMIOPort + Name "-" + SID "428" + Position [520, 148, 550, 162] + ZOrder -9 + BlockMirror on + Port "2" + Side "Left" + } + Line { + SrcBlock "Battery" + SrcPort 1 + DstBlock "Bus\nSelector" + DstPort 1 + } + Line { + Name "" + Labels [0, 0] + SrcBlock "Bus\nSelector" + SrcPort 2 + DstBlock "LPF vq1" + DstPort 1 + } + Line { + SrcBlock "LPF vq1" + SrcPort 1 + DstBlock "Subsystem1" + DstPort 1 + } + Line { + Name "" + Labels [0, 0] + SrcBlock "Bus\nSelector" + SrcPort 1 + DstBlock "Subsystem5" + DstPort 1 + } + Line { + Name "" + Labels [0, 0] + SrcBlock "Bus\nSelector" + SrcPort 3 + DstBlock "LPF vq2" + DstPort 1 + } + Line { + SrcBlock "LPF vq2" + SrcPort 1 + DstBlock "Subsystem2" + DstPort 1 + } + Line { + LineType "Connection" + SrcBlock "Battery" + SrcPort LConn1 + DstBlock "+" + DstPort RConn1 + } + Line { + LineType "Connection" + SrcBlock "Battery" + SrcPort LConn2 + DstBlock "-" + DstPort RConn1 + } + } + } + Block { + BlockType SubSystem + Name "Bidirectional DC/DC\n Converter" + SID "429" + Tag "Bidirectional" + Ports [0, 0, 0, 0, 0, 2, 2] + Position [555, 700, 710, 840] + ZOrder -3 + BackgroundColor "[0.380392, 0.741176, 0.988235]" + ShowName off + FontName "Arial Narrow" + FontSize 16 + FontWeight "bold" + MinAlgLoopOccurrences on + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + Object { + $PropName "MaskObject" + $ObjectID 23 + $ClassName "Simulink.Mask" + Display "disp('Bidirectional Converter') \n" + } + System { + Name "Bidirectional DC/DC\n Converter" + Location [-8, -8, 1608, 908] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Reference + Name "Breaker" + SID "2684" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [495, 250, 550, 290] + ZOrder 5 + LibraryVersion "1.2191" + SourceBlock "powerlib/Elements/Breaker" + SourceType "Breaker" + BreakerResistance "0.01" + InitialState "1" + SnubberResistance "1e6" + SnubberCapacitance "inf" + SwitchingTimes "[ 1/60 5/60 ]" + External on + Measurements "None" + MoreParameters off + NoBreakLoop off + } + Block { + BlockType Reference + Name "Breaker1" + SID "2685" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [485, 445, 540, 485] + ZOrder 6 + LibraryVersion "1.2191" + SourceBlock "powerlib/Elements/Breaker" + SourceType "Breaker" + BreakerResistance "0.01" + InitialState "1" + SnubberResistance "1e6" + SnubberCapacitance "inf" + SwitchingTimes "[ 1/60 5/60 ]" + External on + Measurements "None" + MoreParameters off + NoBreakLoop off + } + Block { + BlockType Reference + Name "Current Measurement1" + SID "677" + Ports [0, 1, 0, 0, 0, 1, 1] + Position [770, 88, 795, 112] + ZOrder -4 + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Current Measurement" + SourceType "Current Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" + } + Block { + BlockType Reference + Name "Current Measurement2" + SID "435" + Ports [0, 1, 0, 0, 0, 1, 1] + Position [245, 263, 270, 287] + ZOrder -5 + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Current Measurement" + SourceType "Current Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" + } + Block { + BlockType From + Name "From1" + SID "2690" + Position [365, 106, 450, 134] + ZOrder 11 + NamePlacement "alternate" + ShowName off + GotoTag "ChargeControl" + TagVisibility "global" + } + Block { + BlockType From + Name "From2" + SID "3025" + Position [980, 261, 1055, 289] + ZOrder 13 + NamePlacement "alternate" + ShowName off + GotoTag "Vbus_solar" + TagVisibility "global" + } + Block { + BlockType From + Name "From3" + SID "3034" + Position [980, 301, 1055, 329] + ZOrder 14 + NamePlacement "alternate" + ShowName off + GotoTag "Ibus_solar" + TagVisibility "global" + } + Block { + BlockType From + Name "From4" + SID "2660" + Position [980, 221, 1055, 249] + ZOrder 1 + NamePlacement "alternate" + ShowName off + GotoTag "SOC" + TagVisibility "global" + } + Block { + BlockType Goto + Name "Goto" + SID "436" + Position [170, 350, 230, 380] + ZOrder -10 + ShowName off + GotoTag "V_bat" + TagVisibility "global" + } + Block { + BlockType Goto + Name "Goto3" + SID "439" + Position [300, 190, 355, 220] + ZOrder -10 + ShowName off + GotoTag "ILbat" + TagVisibility "global" + } + Block { + BlockType Goto + Name "Goto5" + SID "2682" + Position [1325, 260, 1400, 290] + ZOrder 3 + NamePlacement "alternate" + ShowName off + GotoTag "ChargeControl" + TagVisibility "global" + } + Block { + BlockType SubSystem + Name "MATLAB Function" + SID "2681" + Ports [3, 1] + Position [1115, 234, 1270, 316] + ZOrder 2 + LibraryVersion "1.32" + ErrorFcn "Stateflow.Translate.translate" + PermitHierarchicalResolution "ExplicitOnly" + TreatAsAtomicUnit on + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + SFBlockType "MATLAB Function" + System { + Name "MATLAB Function" + Location [223, 338, 826, 833] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + SIDHighWatermark "23" + Block { + BlockType Inport + Name "SOC" + SID "2681::1" + Position [20, 101, 40, 119] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Inport + Name "Vbus" + SID "2681::22" + Position [20, 136, 40, 154] + ZOrder 8 + Port "2" + IconDisplay "Port number" + } + Block { + BlockType Inport + Name "Ibus" + SID "2681::23" + Position [20, 171, 40, 189] + ZOrder 9 + Port "3" + IconDisplay "Port number" + } + Block { + BlockType Demux + Name " Demux " + SID "2681::19" + Ports [1, 1] + Position [270, 230, 320, 270] + ZOrder 5 + Outputs "1" + } + Block { + BlockType S-Function + Name " SFunction " + SID "2681::18" + Tag "Stateflow S-Function Microgrid_24h_Simulation 2" + Ports [3, 2] + Position [180, 100, 230, 180] + ZOrder 4 + FunctionName "sf_sfun" + PortCounts "[3 2]" + EnableBusSupport on + Port { + PortNumber 2 + Name "ChargeControl" + RTWStorageClass "Auto" + DataLoggingNameMode "SignalName" + } + } + Block { + BlockType Terminator + Name " Terminator " + SID "2681::20" + Position [460, 241, 480, 259] + ZOrder 6 + } + Block { + BlockType Outport + Name "ChargeControl" + SID "2681::5" + Position [460, 101, 480, 119] + ZOrder -5 + IconDisplay "Port number" + } + Line { + SrcBlock "SOC" + SrcPort 1 + Points [120, 0] + DstBlock " SFunction " + DstPort 1 + } + Line { + SrcBlock "Vbus" + SrcPort 1 + DstBlock " SFunction " + DstPort 2 + } + Line { + SrcBlock "Ibus" + SrcPort 1 + DstBlock " SFunction " + DstPort 3 + } + Line { + Name "ChargeControl" + Labels [0, 0] + SrcBlock " SFunction " + SrcPort 2 + DstBlock "ChargeControl" + DstPort 1 + } + Line { + SrcBlock " Demux " + SrcPort 1 + DstBlock " Terminator " + DstPort 1 + } + Line { + SrcBlock " SFunction " + SrcPort 1 + DstBlock " Demux " + DstPort 1 + } + } + } + Block { + BlockType SubSystem + Name "Subsystem1" + SID "726" + Ports [1] + Position [815, 16, 850, 54] + ZOrder -17 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem1" + Location [-8, 0, 1608, 916] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Idc" + SID "727" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "728" + Position [175, 31, 235, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Idc" + TagVisibility "global" + } + Block { + BlockType Reference + Name "LPF vq11" + SID "1819" + Ports [1, 1] + Position [120, 134, 150, 166] + ZOrder -21 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "729" + Ports [1] + Position [175, 75, 235, 105] + ZOrder -22 + ShowName off + VariableName "Idc" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ToWorkspace + Name "To Workspace2" + SID "1818" + Ports [1] + Position [175, 135, 235, 165] + ZOrder -23 + ShowName off + VariableName "Idc1" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Idc" + SrcPort 1 + Points [45, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + Branch { + DstBlock "To Workspace1" + DstPort 1 + } + Branch { + DstBlock "LPF vq11" + DstPort 1 + } + } + } + Line { + SrcBlock "LPF vq11" + SrcPort 1 + DstBlock "To Workspace2" + DstPort 1 + } + } + } + Block { + BlockType SubSystem + Name "Subsystem2" + SID "730" + Ports [1] + Position [685, 251, 720, 289] + ZOrder -18 + BlockMirror on + NamePlacement "alternate" + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem2" + Location [-8, -8, 1608, 908] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Vdc" + SID "731" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "732" + Position [190, 31, 250, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Vdc" + TagVisibility "global" + } + Block { + BlockType Reference + Name "LPF vq11" + SID "1821" + Ports [1, 1] + Position [135, 159, 165, 191] + ZOrder -21 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "733" + Ports [1] + Position [190, 75, 250, 105] + ZOrder -22 + ShowName off + VariableName "Vdc" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ToWorkspace + Name "To Workspace2" + SID "1820" + Ports [1] + Position [190, 160, 250, 190] + ZOrder -23 + ShowName off + VariableName "Vdc1" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Vdc" + SrcPort 1 + Points [60, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + Branch { + DstBlock "To Workspace1" + DstPort 1 + } + Branch { + DstBlock "LPF vq11" + DstPort 1 + } + } + } + Line { + SrcBlock "LPF vq11" + SrcPort 1 + DstBlock "To Workspace2" + DstPort 1 + } + } + } + Block { + BlockType Reference + Name "Voltage Measurement1" + SID "445" + Ports [0, 1, 0, 0, 0, 2] + Position [120, 353, 145, 377] + ZOrder -19 + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Voltage Measurement" + SourceType "Voltage Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" + } + Block { + BlockType Reference + Name "Voltage Measurement2" + SID "680" + Ports [0, 1, 0, 0, 0, 2] + Position [780, 258, 805, 282] + ZOrder -20 + BlockMirror on + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Voltage Measurement" + SourceType "Voltage Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" + } + Block { + BlockType PMIOPort + Name "+ " + SID "449" + Position [25, 268, 55, 282] + ZOrder -21 + Port "1" + Side "Left" + } + Block { + BlockType PMIOPort + Name "- " + SID "450" + Position [25, 468, 55, 482] + ZOrder -22 + Port "2" + Side "Left" + } + Block { + BlockType PMIOPort + Name "+" + SID "451" + Position [1025, 98, 1055, 112] + ZOrder -23 + BlockMirror on + Port "3" + Side "Right" + } + Block { + BlockType PMIOPort + Name "-" + SID "452" + Position [910, 458, 940, 472] + ZOrder -24 + BlockMirror on + Port "4" + Side "Right" + } + Line { + LineType "Connection" + SrcBlock "-" + SrcPort RConn1 + Points [-55, 0] + Branch { + ConnectType "DEST_DEST" + SrcBlock "Breaker1" + SrcPort RConn1 + Points [285, 0] + } + Branch { + ConnectType "DEST_SRC" + Points [0, -190] + DstBlock "Voltage Measurement2" + DstPort LConn2 + } + } + Line { + SrcBlock "Voltage Measurement1" + SrcPort 1 + DstBlock "Goto" + DstPort 1 + } + Line { + SrcBlock "Current Measurement2" + SrcPort 1 + Points [10, 0] + DstBlock "Goto3" + DstPort 1 + } + Line { + LineType "Connection" + SrcBlock "Current Measurement1" + SrcPort RConn1 + Points [30, 0] + Branch { + ConnectType "DEST_SRC" + Points [0, 160] + DstBlock "Voltage Measurement2" + DstPort LConn1 + } + Branch { + ConnectType "DEST_DEST" + SrcBlock "+" + SrcPort RConn1 + Points [-170, 0] + } + } + Line { + SrcBlock "Voltage Measurement2" + SrcPort 1 + DstBlock "Subsystem2" + DstPort 1 + } + Line { + SrcBlock "Current Measurement1" + SrcPort 1 + Points [5, 0; 0, -60] + DstBlock "Subsystem1" + DstPort 1 + } + Line { + SrcBlock "From4" + SrcPort 1 + Points [40, 0] + DstBlock "MATLAB Function" + DstPort 1 + } + Line { + SrcBlock "MATLAB Function" + SrcPort 1 + DstBlock "Goto5" + DstPort 1 + } + Line { + LineType "Connection" + SrcBlock "- " + SrcPort RConn1 + Points [20, 0] + Branch { + ConnectType "DEST_DEST" + SrcBlock "Breaker1" + SrcPort LConn1 + Points [-380, 0] + } + Branch { + ConnectType "DEST_SRC" + Points [0, -105] + DstBlock "Voltage Measurement1" + DstPort LConn2 + } + } + Line { + LineType "Connection" + SrcBlock "+ " + SrcPort RConn1 + Points [20, 0] + Branch { + ConnectType "DEST_DEST" + SrcBlock "Voltage Measurement1" + SrcPort LConn1 + Points [-15, 0; 0, -85] + } + Branch { + ConnectType "DEST_SRC" + DstBlock "Current Measurement2" + DstPort LConn1 + } + } + Line { + LineType "Connection" + SrcBlock "Current Measurement2" + SrcPort RConn1 + DstBlock "Breaker" + DstPort LConn1 + } + Line { + LineType "Connection" + SrcBlock "Breaker" + SrcPort RConn1 + Points [93, 0; 0, -170] + DstBlock "Current Measurement1" + DstPort LConn1 + } + Line { + SrcBlock "From1" + SrcPort 1 + Points [10, 0; 0, 140] + Branch { + Points [0, 195] + DstBlock "Breaker1" + DstPort 1 + } + Branch { + DstBlock "Breaker" + DstPort 1 + } + } + Line { + SrcBlock "From2" + SrcPort 1 + DstBlock "MATLAB Function" + DstPort 2 + } + Line { + SrcBlock "From3" + SrcPort 1 + Points [25, 0; 0, -15] + DstBlock "MATLAB Function" + DstPort 3 + } + } + } + Block { + BlockType SubSystem + Name "Boost" + SID "2800" + Ports [0, 0, 0, 0, 0, 2, 2] + Position [310, 435, 465, 575] + ZOrder 3 + BackgroundColor "lightBlue" + NamePlacement "alternate" + ShowName off + FontName "Arial Narrow" + FontSize 20 + FontWeight "bold" + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + Object { + $PropName "MaskObject" + $ObjectID 24 + $ClassName "Simulink.Mask" + Display "disp('Boost Converter')" + } + System { + Name "Boost" + Location [-8, -8, 1608, 908] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Reference + Name "Cdc" + SID "2801" + Ports [0, 0, 0, 0, 0, 1, 1] + Position [596, 255, 624, 325] + ZOrder -1 + BlockRotation 270 + BlockMirror on + NamePlacement "alternate" + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Elements/Series RLC Branch" + SourceType "Series RLC Branch" + LConnTagsString "__new0" + RConnTagsString "__new0" + BranchType "C" + Resistance "1" + Inductance "1e-3" + SetiL0 off + InitialCurrent "0" + Capacitance "1200e-6" + Setx0 off + InitialVoltage "400" + Measurements "None" + } + Block { + BlockType Reference + Name "Current Measurement" + SID "2802" + Ports [0, 1, 0, 0, 0, 1, 1] + Position [260, 173, 285, 197] + ZOrder -2 + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Current Measurement" + SourceType "Current Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" + } + Block { + BlockType Reference + Name "Current Measurement1" + SID "2803" + Ports [0, 1, 0, 0, 0, 1, 1] + Position [700, 188, 725, 212] + ZOrder -3 + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Current Measurement" + SourceType "Current Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" + } + Block { + BlockType Reference + Name "Diode" + SID "2804" + Ports [0, 1, 0, 0, 0, 1, 1] + Position [465, 170, 520, 210] + ZOrder -4 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Power\nElectronics/Diode" + SourceType "Diode" + Ron "0.001 " + Lon "0" + Vf "0.8" + IC "0" + UseSnubber off + Rs "500" + Cs "250e-9" + Measurements on + } + Block { + BlockType From + Name "From17" + SID "2805" + Position [260, 251, 325, 279] + ZOrder -8 + ShowName off + GotoTag "S" + TagVisibility "global" + } + Block { + BlockType Goto + Name "Goto1" + SID "2806" + Position [320, 150, 375, 180] + ZOrder -10 + ShowName off + GotoTag "IL" + TagVisibility "global" + } + Block { + BlockType Goto + Name "Goto2" + SID "3026" + Position [760, 321, 835, 349] + ZOrder 1 + NamePlacement "alternate" + ShowName off + GotoTag "Vbus_solar" + TagVisibility "global" + } + Block { + BlockType Goto + Name "Goto3" + SID "3033" + Position [770, 111, 845, 139] + ZOrder 2 + NamePlacement "alternate" + ShowName off + GotoTag "Ibus_solar" + TagVisibility "global" + } + Block { + BlockType Goto + Name "Goto6" + SID "2807" + Position [175, 269, 220, 291] + ZOrder -17 + NamePlacement "alternate" + ShowName off + GotoTag "Vin" + TagVisibility "global" + } + Block { + BlockType Goto + Name "Goto7" + SID "2808" + Position [525, 45, 580, 75] + ZOrder -10 + ShowName off + GotoTag "S" + TagVisibility "global" + } + Block { + BlockType Reference + Name "IGBT/Diode" + SID "2809" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [333, 285, 377, 345] + ZOrder -19 + BlockRotation 270 + BlockMirror on + NamePlacement "alternate" + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Power\nElectronics/IGBT//Diode" + SourceType "IGBT/Diode" + Ron "1e-3" + Rs "1e5" + Cs "inf" + Measurements off + } + Block { + BlockType SubSystem + Name "Incremental Conductance MPPT" + SID "2810" + Ports [0, 1] + Position [290, 28, 445, 92] + ZOrder -20 + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Incremental Conductance MPPT" + Location [-8, -8, 1608, 908] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Demux + Name "Demux" + SID "2811" + Ports [1, 2] + Position [650, 61, 655, 99] + ZOrder -6 + ShowName off + Outputs "2" + DisplayOption "bar" + } + Block { + BlockType From + Name "From3" + SID "2812" + Position [45, 141, 85, 169] + ZOrder 33 + ShowName off + GotoTag "Vpv" + TagVisibility "global" + } + Block { + BlockType From + Name "From4" + SID "2813" + Position [45, 61, 85, 89] + ZOrder 34 + ShowName off + GotoTag "Ipv" + TagVisibility "global" + } + Block { + BlockType SubSystem + Name "MPPT IC" + SID "2814" + Ports [5, 4] + Position [195, 53, 320, 257] + ZOrder 35 + NamePlacement "alternate" + LibraryVersion "1.32" + ErrorFcn "Stateflow.Translate.translate" + PermitHierarchicalResolution "ExplicitOnly" + TreatAsAtomicUnit on + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + SFBlockType "MATLAB Function" + System { + Name "MPPT IC" + Location [163, 114, 878, 977] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + SIDHighWatermark "36" + Block { + BlockType Inport + Name "Ipv" + SID "2814::1" + Position [20, 101, 40, 119] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Inport + Name "Iprevious" + SID "2814::24" + Position [20, 136, 40, 154] + ZOrder 10 + Port "2" + IconDisplay "Port number" + } + Block { + BlockType Inport + Name "Vpv" + SID "2814::23" + Position [20, 171, 40, 189] + ZOrder 9 + Port "3" + IconDisplay "Port number" + } + Block { + BlockType Inport + Name "Vprevious" + SID "2814::25" + Position [20, 206, 40, 224] + ZOrder 11 + Port "4" + IconDisplay "Port number" + } + Block { + BlockType Inport + Name "Vref_previous" + SID "2814::26" + Position [20, 246, 40, 264] + ZOrder 12 + Port "5" + IconDisplay "Port number" + } + Block { + BlockType Demux + Name " Demux " + SID "2814::35" + Ports [1, 1] + Position [270, 280, 320, 320] + ZOrder 21 + Outputs "1" + } + Block { + BlockType S-Function + Name " SFunction " + SID "2814::34" + Tag "Stateflow S-Function Microgrid_24h_Simulation 3" + Ports [5, 5] + Position [180, 100, 230, 220] + ZOrder 20 + FunctionName "sf_sfun" + PortCounts "[5 5]" + EnableBusSupport on + Port { + PortNumber 2 + Name "delta" + RTWStorageClass "Auto" + DataLoggingNameMode "SignalName" + } + Port { + PortNumber 3 + Name "Vref" + RTWStorageClass "Auto" + DataLoggingNameMode "SignalName" + } + Port { + PortNumber 4 + Name "Ipv_prev_out" + RTWStorageClass "Auto" + DataLoggingNameMode "SignalName" + } + Port { + PortNumber 5 + Name "Vpv_prev_out" + RTWStorageClass "Auto" + DataLoggingNameMode "SignalName" + } + } + Block { + BlockType Terminator + Name " Terminator " + SID "2814::36" + Position [460, 291, 480, 309] + ZOrder 22 + } + Block { + BlockType Outport + Name "delta" + SID "2814::29" + Position [460, 101, 480, 119] + ZOrder 15 + IconDisplay "Port number" + } + Block { + BlockType Outport + Name "Vref" + SID "2814::5" + Position [460, 136, 480, 154] + ZOrder -5 + Port "2" + IconDisplay "Port number" + } + Block { + BlockType Outport + Name "Ipv_prev_out" + SID "2814::27" + Position [460, 171, 480, 189] + ZOrder 13 + Port "3" + IconDisplay "Port number" + } + Block { + BlockType Outport + Name "Vpv_prev_out" + SID "2814::28" + Position [460, 206, 480, 224] + ZOrder 14 + Port "4" + IconDisplay "Port number" + } + Line { + SrcBlock "Ipv" + SrcPort 1 + DstBlock " SFunction " + DstPort 1 + } + Line { + SrcBlock "Iprevious" + SrcPort 1 + DstBlock " SFunction " + DstPort 2 + } + Line { + SrcBlock "Vpv" + SrcPort 1 + DstBlock " SFunction " + DstPort 3 + } + Line { + SrcBlock "Vprevious" + SrcPort 1 + DstBlock " SFunction " + DstPort 4 + } + Line { + SrcBlock "Vref_previous" + SrcPort 1 + DstBlock " SFunction " + DstPort 5 + } + Line { + Name "delta" + Labels [0, 0] + SrcBlock " SFunction " + SrcPort 2 + Points [0, -25] + DstBlock "delta" + DstPort 1 + } + Line { + Name "Vref" + Labels [0, 0] + SrcBlock " SFunction " + SrcPort 3 + DstBlock "Vref" + DstPort 1 + } + Line { + Name "Ipv_prev_out" + Labels [0, 0] + SrcBlock " SFunction " + SrcPort 4 + DstBlock "Ipv_prev_out" + DstPort 1 + } + Line { + Name "Vpv_prev_out" + Labels [0, 0] + SrcBlock " SFunction " + SrcPort 5 + DstBlock "Vpv_prev_out" + DstPort 1 + } + Line { + SrcBlock " Demux " + SrcPort 1 + DstBlock " Terminator " + DstPort 1 + } + Line { + SrcBlock " SFunction " + SrcPort 1 + DstBlock " Demux " + DstPort 1 + } + } + } + Block { + BlockType Memory + Name "Memory" + SID "2815" + Position [120, 60, 150, 90] + ZOrder -10 + ShowName off + } + Block { + BlockType Memory + Name "Memory1" + SID "2816" + Position [120, 140, 150, 170] + ZOrder -11 + ShowName off + } + Block { + BlockType Memory + Name "Memory2" + SID "2817" + Position [120, 315, 150, 345] + ZOrder -12 + BlockMirror on + ShowName off + } + Block { + BlockType Memory + Name "Memory4" + SID "2818" + Position [120, 365, 150, 395] + ZOrder -13 + BlockMirror on + ShowName off + } + Block { + BlockType Memory + Name "Memory5" + SID "2819" + Position [120, 265, 150, 295] + ZOrder -14 + BlockMirror on + ShowName off + } + Block { + BlockType Reference + Name "PWM Generator" + SID "2820" + Ports [1, 1] + Position [505, 56, 615, 104] + ZOrder -11 + LibraryVersion "1.664" + LinkData { + BlockName "Triangle" + DialogParameters { + rep_seq_t "[0 1/Fc/2 1/Fc]" + rep_seq_y "[0 1 0]" + } + } + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Control \nBlocks/PWM Generator" + SourceType "PWM Generator" + GeneratorMode "1-arm bridge (2 pulses)" + Fc "10e3" + Internal off + mIndex "0.4" + Freq "60" + Phase "0" + } + Block { + BlockType SubSystem + Name "Subsystem1" + SID "2821" + Ports [1] + Position [445, 111, 480, 149] + ZOrder -16 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem1" + Location [982, 630, 1295, 932] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Vref" + SID "2822" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "2823" + Position [175, 31, 235, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Vref" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "2824" + Ports [1] + Position [175, 75, 235, 105] + ZOrder -21 + ShowName off + VariableName "Vref" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ZeroOrderHold + Name "Zero-Order\nHold" + SID "2825" + Position [80, 30, 115, 60] + ZOrder -22 + SampleTime "5e-6" + } + Line { + SrcBlock "Vref" + SrcPort 1 + DstBlock "Zero-Order\nHold" + DstPort 1 + } + Line { + SrcBlock "Zero-Order\nHold" + SrcPort 1 + Points [20, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + DstBlock "To Workspace1" + DstPort 1 + } + } + } + } + Block { + BlockType SubSystem + Name "Subsystem2" + SID "2826" + Ports [1] + Position [445, 16, 480, 54] + ZOrder -17 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem2" + Location [982, 630, 1295, 932] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "delta" + SID "2827" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "2828" + Position [175, 31, 235, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "delta" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "2829" + Ports [1] + Position [175, 75, 235, 105] + ZOrder -21 + ShowName off + VariableName "delta" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ZeroOrderHold + Name "Zero-Order\nHold" + SID "2830" + Position [85, 30, 120, 60] + ZOrder -22 + SampleTime "5e-6" + } + Line { + SrcBlock "delta" + SrcPort 1 + DstBlock "Zero-Order\nHold" + DstPort 1 + } + Line { + SrcBlock "Zero-Order\nHold" + SrcPort 1 + Points [15, 0] + Branch { + Points [0, 45] + DstBlock "To Workspace1" + DstPort 1 + } + Branch { + DstBlock "Goto2" + DstPort 1 + } + } + } + } + Block { + BlockType SubSystem + Name "Subsystem3" + SID "2831" + Ports [1] + Position [740, 26, 775, 64] + ZOrder -18 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem3" + Location [982, 630, 1295, 932] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "pulsos" + SID "2832" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "2833" + Position [175, 31, 235, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "pulsos" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "2834" + Ports [1] + Position [175, 75, 235, 105] + ZOrder -21 + ShowName off + VariableName "pulsos" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ZeroOrderHold + Name "Zero-Order\nHold" + SID "2835" + Position [85, 30, 120, 60] + ZOrder -22 + SampleTime "5e-6" + } + Line { + SrcBlock "pulsos" + SrcPort 1 + DstBlock "Zero-Order\nHold" + DstPort 1 + } + Line { + SrcBlock "Zero-Order\nHold" + SrcPort 1 + Points [15, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + DstBlock "To Workspace1" + DstPort 1 + } + } + } + } + Block { + BlockType Outport + Name "Pulsos" + SID "2836" + Position [745, 83, 775, 97] + ZOrder -19 + IconDisplay "Port number" + } + Line { + SrcBlock "Memory2" + SrcPort 1 + Points [-50, 0; 0, -135] + DstBlock "MPPT IC" + DstPort 4 + } + Line { + SrcBlock "Memory5" + SrcPort 1 + Points [-36, 0; 0, -45] + DstBlock "MPPT IC" + DstPort 5 + } + Line { + SrcBlock "Memory4" + SrcPort 1 + Points [-85, 0; 0, -265] + DstBlock "MPPT IC" + DstPort 2 + } + Line { + SrcBlock "Memory1" + SrcPort 1 + DstBlock "MPPT IC" + DstPort 3 + } + Line { + SrcBlock "Memory" + SrcPort 1 + DstBlock "MPPT IC" + DstPort 1 + } + Line { + SrcBlock "PWM Generator" + SrcPort 1 + DstBlock "Demux" + DstPort 1 + } + Line { + SrcBlock "Demux" + SrcPort 2 + Points [35, 0] + Branch { + DstBlock "Pulsos" + DstPort 1 + } + Branch { + Points [0, -45] + DstBlock "Subsystem3" + DstPort 1 + } + } + Line { + SrcBlock "MPPT IC" + SrcPort 1 + Points [85, 0] + Branch { + Points [0, -45] + DstBlock "Subsystem2" + DstPort 1 + } + Branch { + DstBlock "PWM Generator" + DstPort 1 + } + } + Line { + SrcBlock "MPPT IC" + SrcPort 3 + Points [65, 0; 0, 200] + DstBlock "Memory4" + DstPort 1 + } + Line { + SrcBlock "MPPT IC" + SrcPort 4 + Points [40, 0; 0, 100] + DstBlock "Memory2" + DstPort 1 + } + Line { + SrcBlock "MPPT IC" + SrcPort 2 + Points [80, 0] + Branch { + Points [0, 150] + DstBlock "Memory5" + DstPort 1 + } + Branch { + DstBlock "Subsystem1" + DstPort 1 + } + } + Line { + SrcBlock "From4" + SrcPort 1 + DstBlock "Memory" + DstPort 1 + } + Line { + SrcBlock "From3" + SrcPort 1 + DstBlock "Memory1" + DstPort 1 + } + } + } + Block { + BlockType Reference + Name "Lb" + SID "2837" + Ports [0, 0, 0, 0, 0, 1, 1] + Position [145, 171, 215, 199] + ZOrder -21 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Elements/Series RLC Branch" + SourceType "Series RLC Branch" + LConnTagsString "__new0" + RConnTagsString "__new0" + BranchType "L" + Resistance "1" + Inductance "880e-6" + SetiL0 off + InitialCurrent "0" + Capacitance "1e-6" + Setx0 off + InitialVoltage "0" + Measurements "None" + } + Block { + BlockType SubSystem + Name "Subsystem1" + SID "2838" + Ports [1] + Position [760, 161, 795, 199] + ZOrder -22 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem1" + Location [-8, -8, 1608, 908] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Ibus" + SID "2839" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "2840" + Position [165, 31, 225, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Ibus" + TagVisibility "global" + } + Block { + BlockType Reference + Name "LPF vq11" + SID "2841" + Ports [1, 1] + Position [115, 139, 145, 171] + ZOrder -21 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "2842" + Ports [1] + Position [165, 75, 225, 105] + ZOrder -22 + ShowName off + VariableName "Ibus" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ToWorkspace + Name "To Workspace2" + SID "2843" + Ports [1] + Position [165, 140, 225, 170] + ZOrder -23 + ShowName off + VariableName "Ibus1" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Ibus" + SrcPort 1 + Points [40, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + Branch { + DstBlock "To Workspace1" + DstPort 1 + } + Branch { + DstBlock "LPF vq11" + DstPort 1 + } + } + } + Line { + SrcBlock "LPF vq11" + SrcPort 1 + DstBlock "To Workspace2" + DstPort 1 + } + } + } + Block { + BlockType SubSystem + Name "Subsystem2" + SID "2844" + Ports [1] + Position [760, 256, 795, 294] + ZOrder -23 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem2" + Location [-8, -8, 1608, 908] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Vbus" + SID "2845" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "2846" + Position [185, 31, 245, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Vbus" + TagVisibility "global" + } + Block { + BlockType Reference + Name "LPF vq11" + SID "2847" + Ports [1, 1] + Position [130, 129, 160, 161] + ZOrder -21 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "2848" + Ports [1] + Position [185, 75, 245, 105] + ZOrder -22 + ShowName off + VariableName "Vbus" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ToWorkspace + Name "To Workspace2" + SID "2849" + Ports [1] + Position [185, 130, 245, 160] + ZOrder -23 + ShowName off + VariableName "Vbus1" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Vbus" + SrcPort 1 + Points [55, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + Branch { + DstBlock "To Workspace1" + DstPort 1 + } + Branch { + DstBlock "LPF vq11" + DstPort 1 + } + } + } + Line { + SrcBlock "LPF vq11" + SrcPort 1 + DstBlock "To Workspace2" + DstPort 1 + } + } + } + Block { + BlockType Reference + Name "Va" + SID "2850" + Ports [0, 1, 0, 0, 0, 2] + Position [130, 268, 155, 292] + ZOrder -35 + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Voltage Measurement" + SourceType "Voltage Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" + } + Block { + BlockType Reference + Name "Voltage Measurement" + SID "2851" + Ports [0, 1, 0, 0, 0, 2] + Position [700, 278, 725, 302] + ZOrder -36 + NamePlacement "alternate" + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Voltage Measurement" + SourceType "Voltage Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" + } + Block { + BlockType PMIOPort + Name "+" + SID "2852" + Position [35, 178, 65, 192] + ZOrder -37 + Port "1" + Side "Left" + } + Block { + BlockType PMIOPort + Name "-" + SID "2853" + Position [35, 373, 65, 387] + ZOrder -38 + Port "2" + Side "Left" + } + Block { + BlockType PMIOPort + Name "+ " + SID "2854" + Position [870, 198, 900, 212] + ZOrder -39 + BlockMirror on + NamePlacement "alternate" + Port "3" + Side "Right" + } + Block { + BlockType PMIOPort + Name "- " + SID "2855" + Position [870, 373, 900, 387] + ZOrder -40 + BlockMirror on + NamePlacement "alternate" + Port "4" + Side "Right" + } + Line { + LineType "Connection" + Points [605, 200; -70, 0] + DstBlock "Diode" + DstPort RConn1 + Branch { + ConnectType "SRC_DEST" + Points [670, 200; -65, 0] + Branch { + ConnectType "SRC_DEST" + SrcBlock "Voltage Measurement" + SrcPort LConn1 + Points [-15, 0; 0, -85] + } + Branch { + ConnectType "SRC_SRC" + DstBlock "Current Measurement1" + DstPort LConn1 + } + } + Branch { + ConnectType "SRC_DEST" + SrcBlock "Cdc" + SrcPort LConn1 + Points [0, -40; -5, 0] + } + } + Line { + LineType "Connection" + Points [610, 380; 0, -40] + DstBlock "Cdc" + DstPort RConn1 + Branch { + ConnectType "SRC_DEST" + Points [670, 380; -60, 0] + Branch { + ConnectType "SRC_DEST" + SrcBlock "- " + SrcPort RConn1 + Points [-185, 0] + } + Branch { + ConnectType "SRC_SRC" + Points [0, -85] + DstBlock "Voltage Measurement" + DstPort LConn2 + } + } + Branch { + ConnectType "SRC_DEST" + Points [355, 380; 255, 0] + Branch { + ConnectType "SRC_DEST" + Points [90, 380; 265, 0] + Branch { + ConnectType "SRC_DEST" + SrcBlock "-" + SrcPort RConn1 + Points [10, 0] + } + Branch { + ConnectType "SRC_SRC" + Points [0, -95] + DstBlock "Va" + DstPort LConn2 + } + } + Branch { + ConnectType "SRC_DEST" + SrcBlock "IGBT/Diode" + SrcPort RConn1 + Points [0, 20] + } + } + } + Line { + LineType "Connection" + SrcBlock "Lb" + SrcPort RConn1 + DstBlock "Current Measurement" + DstPort LConn1 + } + Line { + LineType "Connection" + Points [365, 190; 0, 80] + DstBlock "IGBT/Diode" + DstPort LConn1 + Branch { + ConnectType "SRC_DEST" + SrcBlock "Current Measurement" + SrcPort RConn1 + Points [65, 0] + } + Branch { + ConnectType "SRC_SRC" + DstBlock "Diode" + DstPort LConn1 + } + } + Line { + SrcBlock "Current Measurement" + SrcPort 1 + Points [10, 0; 0, -15] + DstBlock "Goto1" + DstPort 1 + } + Line { + SrcBlock "From17" + SrcPort 1 + Points [15, 0] + DstBlock "IGBT/Diode" + DstPort 1 + } + Line { + LineType "Connection" + SrcBlock "+" + SrcPort RConn1 + Points [10, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Lb" + DstPort LConn1 + } + Branch { + ConnectType "DEST_SRC" + Points [0, 90] + DstBlock "Va" + DstPort LConn1 + } + } + Line { + SrcBlock "Voltage Measurement" + SrcPort 1 + Points [8, 0] + Branch { + Points [0, 45] + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [4, 0; 0, -15] + DstBlock "Subsystem2" + DstPort 1 + } + } + Line { + SrcBlock "Current Measurement1" + SrcPort 1 + Points [15, 0; 0, -15] + Branch { + Points [0, -55] + DstBlock "Goto3" + DstPort 1 + } + Branch { + DstBlock "Subsystem1" + DstPort 1 + } + } + Line { + LineType "Connection" + SrcBlock "+ " + SrcPort RConn1 + DstBlock "Current Measurement1" + DstPort RConn1 + } + Line { + SrcBlock "Va" + SrcPort 1 + DstBlock "Goto6" + DstPort 1 + } + Line { + SrcBlock "Incremental Conductance MPPT" + SrcPort 1 + DstBlock "Goto7" + DstPort 1 + } + } + } + Block { + BlockType SubSystem + Name "Inverter" + SID "854" + Ports [0, 0, 0, 0, 0, 3, 2] + Position [1125, 434, 1275, 576] + ZOrder -6 + BlockMirror on + BackgroundColor "orange" + ShowName off + FontName "Arial Narrow" + FontSize 20 + FontWeight "bold" + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + Object { + $PropName "MaskObject" + $ObjectID 25 + $ClassName "Simulink.Mask" + Display "disp('DC/AC Inverter')" + } + System { + Name "Inverter" + Location [-8, -8, 1608, 908] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType SubSystem + Name "DC / AC Inverter" + SID "855" + Ports [1, 0, 0, 0, 0, 3, 2] + Position [265, 157, 425, 313] + ZOrder -1 + BlockMirror on + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "DC / AC Inverter" + Location [-8, -8, 1608, 908] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "S" + SID "856" + Position [345, 68, 375, 82] + ZOrder -1 + BlockMirror on + NamePlacement "alternate" + IconDisplay "Port number" + } + Block { + BlockType SubSystem + Name "AC Load Measurements" + SID "859" + Ports [0, 0, 0, 0, 0, 3, 3] + Position [540, 95, 630, 235] + ZOrder -3 + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "AC Load Measurements" + Location [0, 0, 1600, 876] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Reference + Name "Current Measurement1" + SID "1701" + Ports [0, 1, 0, 0, 0, 1, 1] + Position [270, 63, 295, 87] + ZOrder -1 + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Current Measurement" + SourceType "Current Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" + } + Block { + BlockType Reference + Name "Current Measurement2" + SID "1702" + Ports [0, 1, 0, 0, 0, 1, 1] + Position [270, 93, 295, 117] + ZOrder -2 + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Current Measurement" + SourceType "Current Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" + } + Block { + BlockType Reference + Name "Current Measurement3" + SID "1703" + Ports [0, 1, 0, 0, 0, 1, 1] + Position [270, 123, 295, 147] + ZOrder -3 + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Current Measurement" + SourceType "Current Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" + } + Block { + BlockType Goto + Name "Goto1" + SID "860" + Position [880, 25, 940, 55] + ZOrder -10 + ShowName off + GotoTag "Vload_a" + TagVisibility "global" + } + Block { + BlockType Goto + Name "Goto5" + SID "863" + Position [795, 175, 855, 205] + ZOrder -10 + ShowName off + GotoTag "Vload_ab" + TagVisibility "global" + } + Block { + BlockType Goto + Name "Goto7" + SID "864" + Position [795, 225, 855, 255] + ZOrder -10 + ShowName off + GotoTag "Vload_bc" + TagVisibility "global" + } + Block { + BlockType Goto + Name "Goto8" + SID "865" + Position [795, 270, 855, 300] + ZOrder -10 + ShowName off + GotoTag "Vload_ca" + TagVisibility "global" + } + Block { + BlockType Goto + Name "Goto9" + SID "866" + Position [950, 250, 1010, 280] + ZOrder -10 + ShowName off + GotoTag "Vload_pp" + TagVisibility "global" + } + Block { + BlockType Reference + Name "Ground" + SID "867" + Ports [0, 0, 0, 0, 0, 1] + Position [779, 65, 801, 90] + ZOrder -15 + BlockRotation 270 + BlockMirror on + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Elements/Ground" + SourceType "Ground" + LConnTagsString "a" + } + Block { + BlockType Mux + Name "Mux2" + SID "868" + Ports [3, 1] + Position [910, 188, 915, 342] + ZOrder -16 + ShowName off + Inputs "3" + DisplayOption "bar" + } + Block { + BlockType SubSystem + Name "Subsystem1" + SID "1158" + Ports [1] + Position [570, 41, 605, 79] + ZOrder -17 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem1" + Location [982, 630, 1310, 932] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Vabc" + SID "1159" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "1160" + Position [185, 31, 245, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Vabc" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "1161" + Ports [1] + Position [185, 75, 245, 105] + ZOrder -21 + ShowName off + VariableName "Vabc" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Vabc" + SrcPort 1 + Points [55, 0] + Branch { + Points [0, 45] + DstBlock "To Workspace1" + DstPort 1 + } + Branch { + DstBlock "Goto2" + DstPort 1 + } + } + } + } + Block { + BlockType SubSystem + Name "Subsystem2" + SID "1154" + Ports [1] + Position [195, 26, 230, 64] + ZOrder -18 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem2" + Location [982, 630, 1310, 932] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Iabc" + SID "1155" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "1156" + Position [185, 31, 245, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Iabc" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "1157" + Ports [1] + Position [185, 75, 245, 105] + ZOrder -21 + ShowName off + VariableName "Iabc" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Iabc" + SrcPort 1 + Points [55, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + DstBlock "To Workspace1" + DstPort 1 + } + } + } + } + Block { + BlockType SubSystem + Name "Subsystem3" + SID "1181" + Ports [1] + Position [810, 331, 845, 369] + ZOrder -19 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem3" + Location [999, 430, 1323, 916] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Vab" + SID "1182" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "1183" + Position [185, 31, 245, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Vab" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "1184" + Ports [1] + Position [185, 75, 245, 105] + ZOrder -21 + ShowName off + VariableName "Vab" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ToWorkspace + Name "To Workspace2" + SID "1830" + Ports [1] + Position [185, 125, 245, 155] + ZOrder -22 + ShowName off + VariableName "Vab_s" + MaxDataPoints "inf" + SampleTime "-1" + SaveFormat "Structure" + } + Block { + BlockType ToWorkspace + Name "To Workspace3" + SID "1831" + Ports [1] + Position [185, 185, 245, 215] + ZOrder -23 + ShowName off + VariableName "Vab_st" + MaxDataPoints "inf" + SampleTime "-1" + SaveFormat "Structure With Time" + } + Line { + SrcBlock "Vab" + SrcPort 1 + Points [55, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + Branch { + DstBlock "To Workspace1" + DstPort 1 + } + Branch { + Points [0, 50] + Branch { + DstBlock "To Workspace2" + DstPort 1 + } + Branch { + Points [0, 60] + DstBlock "To Workspace3" + DstPort 1 + } + } + } + } + } + } + Block { + BlockType SubSystem + Name "Subsystem4" + SID "1185" + Ports [1] + Position [810, 376, 845, 414] + ZOrder -20 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem4" + Location [982, 630, 1310, 932] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Vbc" + SID "1186" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "1187" + Position [185, 31, 245, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Vbc" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "1188" + Ports [1] + Position [185, 75, 245, 105] + ZOrder -21 + ShowName off + VariableName "Vbc" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Vbc" + SrcPort 1 + Points [55, 0] + Branch { + Points [0, 45] + DstBlock "To Workspace1" + DstPort 1 + } + Branch { + DstBlock "Goto2" + DstPort 1 + } + } + } + } + Block { + BlockType SubSystem + Name "Subsystem5" + SID "1189" + Ports [1] + Position [810, 421, 845, 459] + ZOrder -21 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem5" + Location [982, 630, 1310, 932] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Vca" + SID "1190" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "1191" + Position [185, 31, 245, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Vca" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "1192" + Ports [1] + Position [185, 75, 245, 105] + ZOrder -21 + ShowName off + VariableName "Vca" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Vca" + SrcPort 1 + Points [55, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + DstBlock "To Workspace1" + DstPort 1 + } + } + } + } + Block { + BlockType SubSystem + Name "Subsystem6" + SID "1704" + Ports [1] + Position [365, 186, 400, 224] + ZOrder -22 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem6" + Location [982, 630, 1310, 932] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Ia" + SID "1705" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "1706" + Position [185, 31, 245, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Ia" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "1707" + Ports [1] + Position [185, 75, 245, 105] + ZOrder -21 + ShowName off + VariableName "Ia" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Ia" + SrcPort 1 + Points [55, 0] + Branch { + Points [0, 45] + DstBlock "To Workspace1" + DstPort 1 + } + Branch { + DstBlock "Goto2" + DstPort 1 + } + } + } + } + Block { + BlockType SubSystem + Name "Subsystem7" + SID "1708" + Ports [1] + Position [365, 226, 400, 264] + ZOrder -23 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem7" + Location [982, 630, 1310, 932] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Ib" + SID "1709" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "1710" + Position [185, 31, 245, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Ib" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "1711" + Ports [1] + Position [185, 75, 245, 105] + ZOrder -21 + ShowName off + VariableName "Ib" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Ib" + SrcPort 1 + Points [55, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + DstBlock "To Workspace1" + DstPort 1 + } + } + } + } + Block { + BlockType SubSystem + Name "Subsystem8" + SID "1712" + Ports [1] + Position [365, 266, 400, 304] + ZOrder -24 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem8" + Location [982, 630, 1310, 932] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Ic" + SID "1713" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "1714" + Position [185, 31, 245, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Ic" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "1715" + Ports [1] + Position [185, 75, 245, 105] + ZOrder -21 + ShowName off + VariableName "Ic" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Ic" + SrcPort 1 + Points [55, 0] + Branch { + Points [0, 45] + DstBlock "To Workspace1" + DstPort 1 + } + Branch { + DstBlock "Goto2" + DstPort 1 + } + } + } + } + Block { + BlockType Reference + Name "Three-Phase\nV Measurement" + SID "869" + Ports [0, 1, 0, 0, 0, 3, 3] + Position [450, 40, 535, 170] + ZOrder -25 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Three-Phase\nV-I Measurement" + SourceType "Three-Phase VI Measurement" + VoltageMeasurement "phase-to-ground" + SetLabelV off + LabelV "Vabc" + Vpu off + VpuLL off + CurrentMeasurement "no" + SetLabelI off + LabelI "Iabc" + Ipu off + Pbase "100e6" + Vbase "500e3" + OutputType "Complex" + PhasorSimulation off + PSBequivalent "0" + } + Block { + BlockType Reference + Name "Three-Phase \nI Measurement" + SID "870" + Ports [0, 1, 0, 0, 0, 3, 3] + Position [80, 25, 165, 155] + ZOrder -26 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Three-Phase\nV-I Measurement" + SourceType "Three-Phase VI Measurement" + VoltageMeasurement "no" + SetLabelV off + LabelV "Vabc" + Vpu off + VpuLL off + CurrentMeasurement "yes" + SetLabelI off + LabelI "Iabc" + Ipu off + Pbase "100e6" + Vbase "500e3" + OutputType "Complex" + PhasorSimulation off + PSBequivalent "0" + } + Block { + BlockType Reference + Name "Voltage Measurement1" + SID "871" + Ports [0, 1, 0, 0, 0, 2] + Position [695, 178, 720, 202] + ZOrder -27 + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Voltage Measurement" + SourceType "Voltage Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" + } + Block { + BlockType Reference + Name "Voltage Measurement2" + SID "872" + Ports [0, 1, 0, 0, 0, 2] + Position [810, 28, 835, 52] + ZOrder -28 + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Voltage Measurement" + SourceType "Voltage Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" + } + Block { + BlockType Reference + Name "Voltage Measurement6" + SID "873" + Ports [0, 1, 0, 0, 0, 2] + Position [695, 228, 720, 252] + ZOrder -29 + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Voltage Measurement" + SourceType "Voltage Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" + } + Block { + BlockType Reference + Name "Voltage Measurement7" + SID "874" + Ports [0, 1, 0, 0, 0, 2] + Position [695, 273, 720, 297] + ZOrder -30 + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Voltage Measurement" + SourceType "Voltage Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" + } + Block { + BlockType PMIOPort + Name "A" + SID "875" + Position [25, 38, 55, 52] + ZOrder -31 + Port "1" + Side "Left" + } + Block { + BlockType PMIOPort + Name "A " + SID "876" + Position [1340, 83, 1370, 97] + ZOrder -32 + BlockMirror on + Port "2" + Side "Right" + } + Block { + BlockType PMIOPort + Name "B" + SID "877" + Position [25, 83, 55, 97] + ZOrder -33 + Port "3" + Side "Left" + } + Block { + BlockType PMIOPort + Name "B " + SID "878" + Position [1340, 113, 1370, 127] + ZOrder -34 + BlockMirror on + Port "4" + Side "Right" + } + Block { + BlockType PMIOPort + Name "C" + SID "879" + Position [25, 128, 55, 142] + ZOrder -35 + Port "5" + Side "Left" + } + Block { + BlockType PMIOPort + Name "C " + SID "880" + Position [1340, 143, 1370, 157] + ZOrder -36 + BlockMirror on + Port "6" + Side "Right" + } + Line { + SrcBlock "Three-Phase \nI Measurement" + SrcPort 1 + DstBlock "Subsystem2" + DstPort 1 + } + Line { + SrcBlock "Voltage Measurement1" + SrcPort 1 + Points [40, 0] + Branch { + DstBlock "Goto5" + DstPort 1 + } + Branch { + Points [0, 25] + Branch { + DstBlock "Mux2" + DstPort 1 + } + Branch { + Points [0, 135] + DstBlock "Subsystem3" + DstPort 1 + } + } + } + Line { + SrcBlock "Voltage Measurement6" + SrcPort 1 + Points [25, 0] + Branch { + DstBlock "Goto7" + DstPort 1 + } + Branch { + Points [0, 25] + Branch { + DstBlock "Mux2" + DstPort 2 + } + Branch { + Points [0, 130] + DstBlock "Subsystem4" + DstPort 1 + } + } + } + Line { + SrcBlock "Voltage Measurement7" + SrcPort 1 + Points [10, 0] + Branch { + DstBlock "Goto8" + DstPort 1 + } + Branch { + Points [0, 30] + Branch { + DstBlock "Mux2" + DstPort 3 + } + Branch { + Points [0, 125] + DstBlock "Subsystem5" + DstPort 1 + } + } + } + Line { + SrcBlock "Mux2" + SrcPort 1 + DstBlock "Goto9" + DstPort 1 + } + Line { + SrcBlock "Three-Phase\nV Measurement" + SrcPort 1 + DstBlock "Subsystem1" + DstPort 1 + } + Line { + LineType "Connection" + SrcBlock "A" + SrcPort RConn1 + DstBlock "Three-Phase \nI Measurement" + DstPort LConn1 + } + Line { + LineType "Connection" + Points [765, 90; 560, 0] + DstBlock "A " + DstPort RConn1 + Branch { + ConnectType "SRC_SRC" + Points [-85, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Voltage Measurement1" + DstPort LConn1 + } + Branch { + ConnectType "DEST_SRC" + Points [-60, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Three-Phase\nV Measurement" + DstPort RConn1 + } + Branch { + ConnectType "DEST_SRC" + Points [0, 200] + DstBlock "Voltage Measurement7" + DstPort LConn2 + } + } + } + Branch { + ConnectType "SRC_SRC" + Points [0, -55] + DstBlock "Voltage Measurement2" + DstPort LConn1 + } + } + Line { + LineType "Connection" + SrcBlock "B" + SrcPort RConn1 + DstBlock "Three-Phase \nI Measurement" + DstPort LConn2 + } + Line { + LineType "Connection" + SrcBlock "B " + SrcPort RConn1 + Points [-655, 0] + Branch { + ConnectType "DEST_SRC" + Points [0, 75] + DstBlock "Voltage Measurement1" + DstPort LConn2 + } + Branch { + ConnectType "DEST_SRC" + Points [-15, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Three-Phase\nV Measurement" + DstPort RConn2 + } + Branch { + ConnectType "DEST_SRC" + Points [0, 115] + DstBlock "Voltage Measurement6" + DstPort LConn1 + } + } + } + Line { + LineType "Connection" + SrcBlock "C" + SrcPort RConn1 + DstBlock "Three-Phase \nI Measurement" + DstPort LConn3 + } + Line { + LineType "Connection" + SrcBlock "C " + SrcPort RConn1 + Points [-680, 0] + Branch { + ConnectType "DEST_SRC" + Points [0, 95] + DstBlock "Voltage Measurement6" + DstPort LConn2 + } + Branch { + ConnectType "DEST_SRC" + Points [-15, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Three-Phase\nV Measurement" + DstPort RConn3 + } + Branch { + ConnectType "DEST_SRC" + Points [0, 130] + DstBlock "Voltage Measurement7" + DstPort LConn1 + } + } + } + Line { + SrcBlock "Voltage Measurement2" + SrcPort 1 + DstBlock "Goto1" + DstPort 1 + } + Line { + LineType "Connection" + SrcBlock "Ground" + SrcPort LConn1 + Points [0, -5] + DstBlock "Voltage Measurement2" + DstPort LConn2 + } + Line { + LineType "Connection" + SrcBlock "Current Measurement1" + SrcPort LConn1 + DstBlock "Three-Phase \nI Measurement" + DstPort RConn1 + } + Line { + LineType "Connection" + SrcBlock "Three-Phase \nI Measurement" + SrcPort RConn2 + DstBlock "Current Measurement2" + DstPort LConn1 + } + Line { + LineType "Connection" + SrcBlock "Three-Phase \nI Measurement" + SrcPort RConn3 + DstBlock "Current Measurement3" + DstPort LConn1 + } + Line { + LineType "Connection" + SrcBlock "Current Measurement3" + SrcPort RConn1 + Points [60, 0; 0, 10] + DstBlock "Three-Phase\nV Measurement" + DstPort LConn3 + } + Line { + LineType "Connection" + SrcBlock "Current Measurement2" + SrcPort RConn1 + Points [60, 0; 0, -5] + DstBlock "Three-Phase\nV Measurement" + DstPort LConn2 + } + Line { + LineType "Connection" + SrcBlock "Current Measurement1" + SrcPort RConn1 + Points [60, 0; 0, -20] + DstBlock "Three-Phase\nV Measurement" + DstPort LConn1 + } + Line { + SrcBlock "Current Measurement3" + SrcPort 1 + Points [15, 0; 0, 155] + DstBlock "Subsystem8" + DstPort 1 + } + Line { + SrcBlock "Current Measurement2" + SrcPort 1 + Points [30, 0; 0, 145] + DstBlock "Subsystem7" + DstPort 1 + } + Line { + SrcBlock "Current Measurement1" + SrcPort 1 + Points [45, 0; 0, 135] + DstBlock "Subsystem6" + DstPort 1 + } + } + } + Block { + BlockType Reference + Name "Neutral" + SID "2901" + Ports [0, 0, 0, 0, 0, 1] + Position [155, 255, 175, 275] + ZOrder 2 + BlockRotation 270 + BlockMirror on + ShowName off + AttributesFormatString "node %" + LibraryVersion "1.2191" + SourceBlock "powerlib/Elements/Neutral" + SourceType "Neutral" + LConnTagsString "a" + NodeNumber "10" + } + Block { + BlockType Reference + Name "Series RLC Branch1" + SID "2463" + Ports [0, 0, 0, 0, 0, 1, 1] + Position [395, 151, 465, 179] + ZOrder -13 + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Elements/Series RLC Branch" + SourceType "Series RLC Branch" + LConnTagsString "__new0" + RConnTagsString "__new0" + BranchType "RL" + Resistance "0.1" + Inductance "30e-3" + SetiL0 off + InitialCurrent "0" + Capacitance "1e-6" + Setx0 off + InitialVoltage "0" + Measurements "Branch voltage" + } + Block { + BlockType Reference + Name "Series RLC Branch2" + SID "881" + Ports [0, 0, 0, 0, 0, 1, 1] + Position [395, 106, 465, 134] + ZOrder -13 + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Elements/Series RLC Branch" + SourceType "Series RLC Branch" + LConnTagsString "__new0" + RConnTagsString "__new0" + BranchType "RL" + Resistance "0.1" + Inductance "30e-3" + SetiL0 off + InitialCurrent "0" + Capacitance "1e-6" + Setx0 off + InitialVoltage "0" + Measurements "Branch voltage" + } + Block { + BlockType Reference + Name "Series RLC Branch3" + SID "2464" + Ports [0, 0, 0, 0, 0, 1, 1] + Position [395, 196, 465, 224] + ZOrder -13 + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Elements/Series RLC Branch" + SourceType "Series RLC Branch" + LConnTagsString "__new0" + RConnTagsString "__new0" + BranchType "RL" + Resistance "0.1" + Inductance "30e-3" + SetiL0 off + InitialCurrent "0" + Capacitance "1e-6" + Setx0 off + InitialVoltage "0" + Measurements "Branch voltage" + } + Block { + BlockType Reference + Name "Three-Level Bridge" + SID "2900" + Ports [1, 0, 0, 0, 0, 3, 3] + Position [210, 100, 265, 180] + ZOrder 1 + BlockMirror on + NamePlacement "alternate" + LibraryVersion "1.2191" + SourceBlock "powerlib/Power\nElectronics/Three-Level Bridge" + SourceType "Three-Level Bridge" + Arms "3" + SnubberResistance "1e5" + SbubberCapacitance "inf" + Device "GTO / Diodes" + Ron "1e-3" + ForwardVoltages "[ 0 0 ]" + Measurements "None" + } + Block { + BlockType PMIOPort + Name "+" + SID "883" + Position [25, 88, 55, 102] + ZOrder -16 + Port "1" + Side "Right" + } + Block { + BlockType PMIOPort + Name "A" + SID "884" + Position [730, 113, 760, 127] + ZOrder -17 + BlockMirror on + Port "2" + Side "Left" + } + Block { + BlockType PMIOPort + Name "B" + SID "885" + Position [730, 158, 760, 172] + ZOrder -18 + BlockMirror on + Port "3" + Side "Left" + } + Block { + BlockType PMIOPort + Name "-" + SID "886" + Position [25, 183, 55, 197] + ZOrder -19 + Port "4" + Side "Right" + } + Block { + BlockType PMIOPort + Name "C" + SID "887" + Position [730, 203, 760, 217] + ZOrder -20 + BlockMirror on + Port "5" + Side "Left" + } + Line { + LineType "Connection" + SrcBlock "Series RLC Branch2" + SrcPort RConn1 + DstBlock "AC Load Measurements" + DstPort LConn1 + } + Line { + LineType "Connection" + SrcBlock "Series RLC Branch1" + SrcPort RConn1 + DstBlock "AC Load Measurements" + DstPort LConn2 + } + Line { + LineType "Connection" + SrcBlock "Series RLC Branch3" + SrcPort RConn1 + DstBlock "AC Load Measurements" + DstPort LConn3 + } + Line { + LineType "Connection" + SrcBlock "AC Load Measurements" + SrcPort RConn1 + DstBlock "A" + DstPort RConn1 + } + Line { + LineType "Connection" + SrcBlock "AC Load Measurements" + SrcPort RConn2 + DstBlock "B" + DstPort RConn1 + } + Line { + LineType "Connection" + SrcBlock "AC Load Measurements" + SrcPort RConn3 + DstBlock "C" + DstPort RConn1 + } + Line { + LineType "Connection" + SrcBlock "-" + SrcPort RConn1 + Points [63, 0; 0, -25] + DstBlock "Three-Level Bridge" + DstPort RConn3 + } + Line { + LineType "Connection" + SrcBlock "+" + SrcPort RConn1 + Points [63, 0; 0, 20] + DstBlock "Three-Level Bridge" + DstPort RConn1 + } + Line { + SrcBlock "S" + SrcPort 1 + Points [-29, 0; 0, 35] + DstBlock "Three-Level Bridge" + DstPort 1 + } + Line { + LineType "Connection" + SrcBlock "Series RLC Branch2" + SrcPort LConn1 + Points [-50, 0; 0, 10] + DstBlock "Three-Level Bridge" + DstPort LConn1 + } + Line { + LineType "Connection" + SrcBlock "Series RLC Branch1" + SrcPort LConn1 + Points [-50, 0; 0, -15] + DstBlock "Three-Level Bridge" + DstPort LConn2 + } + Line { + LineType "Connection" + SrcBlock "Series RLC Branch3" + SrcPort LConn1 + Points [-18, 0; 0, -40] + DstBlock "Three-Level Bridge" + DstPort LConn3 + } + Line { + LineType "Connection" + SrcBlock "Three-Level Bridge" + SrcPort RConn2 + Points [-30, 0] + DstBlock "Neutral" + DstPort LConn1 + } + } + } + Block { + BlockType SubSystem + Name "DC BUS " + SID "1269" + Ports [0, 0, 0, 0, 0, 2, 2] + Position [135, 155, 200, 315] + ZOrder -2 + BlockMirror on + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "DC BUS " + Location [-8, -8, 1608, 908] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Reference + Name "Current Measurement1" + SID "1270" + Ports [0, 1, 0, 0, 0, 1, 1] + Position [330, 53, 355, 77] + ZOrder -1 + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Current Measurement" + SourceType "Current Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" + } + Block { + BlockType Reference + Name "DC Bus" + SID "2794" + Ports [0, 0, 0, 0, 0, 1, 1] + Position [166, 130, 194, 170] + ZOrder 15 + BlockRotation 270 + BlockMirror on + NamePlacement "alternate" + AttributesFormatString "\\n" + LibraryVersion "1.2191" + SourceBlock "powerlib/Elements/Series RLC Branch" + SourceType "Series RLC Branch" + LConnTagsString "__new0" + RConnTagsString "__new0" + BranchType "C" + Resistance "1" + Inductance "5e-03" + SetiL0 off + InitialCurrent "0" + Capacitance "10e-3/2" + Setx0 off + InitialVoltage "1000/2" + Measurements "None" + } + Block { + BlockType Reference + Name "DC Bus " + SID "2795" + Ports [0, 0, 0, 0, 0, 1, 1] + Position [166, 215, 194, 255] + ZOrder 14 + BlockRotation 270 + BlockMirror on + NamePlacement "alternate" + AttributesFormatString "\\n" + LibraryVersion "1.2191" + SourceBlock "powerlib/Elements/Series RLC Branch" + SourceType "Series RLC Branch" + LConnTagsString "__new0" + RConnTagsString "__new0" + BranchType "C" + Resistance "1" + Inductance "5e-03" + SetiL0 off + InitialCurrent "0" + Capacitance "10e-3/2" + Setx0 off + InitialVoltage "1000/2" + Measurements "None" + } + Block { + BlockType Reference + Name "Ground" + SID "2796" + Ports [0, 0, 0, 0, 0, 1] + Position [229, 220, 251, 245] + ZOrder 13 + BlockRotation 270 + BlockMirror on + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Elements/Ground" + SourceType "Ground" + LConnTagsString "a" + } + Block { + BlockType SubSystem + Name "Subsystem1" + SID "1274" + Ports [1] + Position [390, 16, 425, 54] + ZOrder -5 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem1" + Location [982, 630, 1289, 1003] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Idcinv" + SID "1275" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "1276" + Position [150, 31, 210, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Idcinv" + TagVisibility "global" + } + Block { + BlockType Reference + Name "LPF vq11" + SID "1823" + Ports [1, 1] + Position [110, 139, 130, 171] + ZOrder -21 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "1277" + Ports [1] + Position [150, 75, 210, 105] + ZOrder -22 + ShowName off + VariableName "Idcinv" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ToWorkspace + Name "To Workspace2" + SID "1822" + Ports [1] + Position [150, 140, 210, 170] + ZOrder -23 + ShowName off + VariableName "Idcinv1" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Idcinv" + SrcPort 1 + Points [35, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + Branch { + DstBlock "To Workspace1" + DstPort 1 + } + Branch { + DstBlock "LPF vq11" + DstPort 1 + } + } + } + Line { + SrcBlock "LPF vq11" + SrcPort 1 + DstBlock "To Workspace2" + DstPort 1 + } + } + } + Block { + BlockType SubSystem + Name "Subsystem2" + SID "1278" + Ports [1] + Position [390, 186, 425, 224] + ZOrder -6 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem2" + Location [982, 630, 1288, 1020] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Vdcinv" + SID "1279" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "1280" + Position [135, 31, 195, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Vdcinv" + TagVisibility "global" + } + Block { + BlockType Reference + Name "LPF vq11" + SID "1825" + Ports [1, 1] + Position [115, 139, 145, 171] + ZOrder -21 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "1281" + Ports [1] + Position [135, 75, 195, 105] + ZOrder -22 + ShowName off + VariableName "Vdcinv" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ToWorkspace + Name "To Workspace2" + SID "1824" + Ports [1] + Position [165, 140, 225, 170] + ZOrder -23 + ShowName off + VariableName "Vdcinv1" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Vdcinv" + SrcPort 1 + Points [40, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + Branch { + DstBlock "To Workspace1" + DstPort 1 + } + Branch { + DstBlock "LPF vq11" + DstPort 1 + } + } + } + Line { + SrcBlock "LPF vq11" + SrcPort 1 + DstBlock "To Workspace2" + DstPort 1 + } + } + } + Block { + BlockType Reference + Name "Voltage Measurement1" + SID "1282" + Ports [0, 1, 0, 0, 0, 2] + Position [325, 193, 350, 217] + ZOrder -7 + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Voltage Measurement" + SourceType "Voltage Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" + } + Block { + BlockType PMIOPort + Name "+ " + SID "1283" + Position [445, 63, 475, 77] + ZOrder -8 + BlockMirror on + Port "1" + Side "Left" + } + Block { + BlockType PMIOPort + Name "- " + SID "1284" + Position [445, 323, 475, 337] + ZOrder -9 + BlockMirror on + Port "2" + Side "Left" + } + Block { + BlockType PMIOPort + Name "+ " + SID "1285" + Position [65, 58, 95, 72] + ZOrder -10 + NamePlacement "alternate" + Port "3" + Side "Right" + } + Block { + BlockType PMIOPort + Name "- " + SID "1286" + Position [85, 323, 115, 337] + ZOrder -11 + NamePlacement "alternate" + Port "4" + Side "Right" + } + Line { + LineType "Connection" + Points [295, 70; -115, 0] + Branch { + ConnectType "SRC_DEST" + SrcBlock "Voltage Measurement1" + SrcPort LConn1 + Points [-15, 0; 0, -130] + } + Branch { + ConnectType "SRC_SRC" + Points [0, -5] + DstBlock "Current Measurement1" + DstPort LConn1 + } + Branch { + ConnectType "DEST_SRC" + Points [-70, 0] + DstBlock "+ " + DstPort RConn1 + } + Branch { + ConnectType "DEST_DEST" + SrcBlock "DC Bus" + SrcPort LConn1 + Points [0, -45] + } + } + Line { + LineType "Connection" + Points [295, 330; -115, 0] + Branch { + ConnectType "SRC_DEST" + SrcBlock "- " + SrcPort RConn1 + Points [-135, 0] + } + Branch { + ConnectType "SRC_SRC" + Points [0, -120] + DstBlock "Voltage Measurement1" + DstPort LConn2 + } + Branch { + ConnectType "DEST_DEST" + SrcBlock "DC Bus " + SrcPort RConn1 + Points [0, 60] + } + Branch { + ConnectType "DEST_SRC" + DstBlock "- " + DstPort RConn1 + } + } + Line { + SrcBlock "Voltage Measurement1" + SrcPort 1 + DstBlock "Subsystem2" + DstPort 1 + } + Line { + SrcBlock "Current Measurement1" + SrcPort 1 + Points [15, 0] + DstBlock "Subsystem1" + DstPort 1 + } + Line { + LineType "Connection" + SrcBlock "Current Measurement1" + SrcPort RConn1 + DstBlock "+ " + DstPort RConn1 + } + Line { + LineType "Connection" + SrcBlock "DC Bus " + SrcPort LConn1 + Points [0, -10] + Branch { + ConnectType "DEST_SRC" + DstBlock "DC Bus" + DstPort RConn1 + } + Branch { + ConnectType "DEST_SRC" + Points [60, 0] + DstBlock "Ground" + DstPort LConn1 + } + } + } + } + Block { + BlockType Reference + Name "PWM Generator\n(3-Level)" + SID "2899" + Ports [0, 1] + Position [575, 156, 625, 194] + ZOrder 2 + BlockMirror on + NamePlacement "alternate" + LibraryVersion "1.31" + FontName "Arial" + SourceBlock "powerlib_meascontrol/Pulse & Signal\nGenerators/PWM Generator\n(3-Level)" + SourceType "PWM Generator (3-Level)" + ModulatorType "Three-phase bridge (12 pulses)" + ModulatorMode "Unsynchronized" + nF "27*50" + Fc "27*50" + ModulatingSignals on + m "0.8" + Freq "50" + Phase "0" + Ts "0" + } + Block { + BlockType PMIOPort + Name "+" + SID "1073" + Position [25, 188, 55, 202] + ZOrder -4 + Port "1" + Side "Right" + } + Block { + BlockType PMIOPort + Name "A" + SID "1074" + Position [450, 208, 480, 222] + ZOrder -5 + BlockMirror on + Port "2" + Side "Left" + } + Block { + BlockType PMIOPort + Name "B" + SID "1075" + Position [450, 248, 480, 262] + ZOrder -6 + BlockMirror on + Port "3" + Side "Left" + } + Block { + BlockType PMIOPort + Name "-" + SID "1076" + Position [25, 268, 55, 282] + ZOrder -7 + Port "4" + Side "Right" + } + Block { + BlockType PMIOPort + Name "C" + SID "1077" + Position [450, 288, 480, 302] + ZOrder -8 + BlockMirror on + Port "5" + Side "Left" + } + Line { + LineType "Connection" + SrcBlock "A" + SrcPort RConn1 + DstBlock "DC / AC Inverter" + DstPort LConn1 + } + Line { + LineType "Connection" + SrcBlock "B" + SrcPort RConn1 + DstBlock "DC / AC Inverter" + DstPort LConn2 + } + Line { + LineType "Connection" + SrcBlock "C" + SrcPort RConn1 + DstBlock "DC / AC Inverter" + DstPort LConn3 + } + Line { + LineType "Connection" + SrcBlock "DC BUS " + SrcPort LConn2 + DstBlock "DC / AC Inverter" + DstPort RConn2 + } + Line { + LineType "Connection" + SrcBlock "DC BUS " + SrcPort LConn1 + DstBlock "DC / AC Inverter" + DstPort RConn1 + } + Line { + LineType "Connection" + SrcBlock "+" + SrcPort RConn1 + DstBlock "DC BUS " + DstPort RConn1 + } + Line { + LineType "Connection" + SrcBlock "-" + SrcPort RConn1 + DstBlock "DC BUS " + DstPort RConn2 + } + Line { + SrcBlock "PWM Generator\n(3-Level)" + SrcPort 1 + DstBlock "DC / AC Inverter" + DstPort 1 + } + } + } + Block { + BlockType SubSystem + Name "PV Array" + SID "2981" + Ports [0, 0, 0, 0, 0, 0, 2] + Position [60, 433, 210, 577] + ZOrder 4 + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + Object { + $PropName "MaskObject" + $ObjectID 26 + $ClassName "Simulink.Mask" + Display "image(imread('img/photo.bmp'))" + } + System { + Name "PV Array" + Location [-8, -8, 1608, 908] + Open on + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "80" + Block { + BlockType FromWorkspace + Name "Ambient Temperature [C] from workspace" + SID "3060" + Position [20, 753, 85, 777] + ZOrder 44 + VariableName "VARTemp'" + OutDataTypeStr "double" + SampleTime "[0.1,0]" + Interpolate off + OutputAfterFinalValue "Setting to zero" + } + Block { + BlockType Reference + Name "Cdc1" + SID "2982" + Ports [0, 0, 0, 0, 0, 1, 1] + Position [1716, 590, 1744, 660] + ZOrder -1 + BlockRotation 270 + BlockMirror on + NamePlacement "alternate" + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Elements/Series RLC Branch" + SourceType "Series RLC Branch" + LConnTagsString "__new0" + RConnTagsString "__new0" + BranchType "C" + Resistance "1" + Inductance "1e-3" + SetiL0 off + InitialCurrent "0" + Capacitance "5e-3" + Setx0 off + InitialVoltage "192" + Measurements "None" + } + Block { + BlockType Reference + Name "Current Measurement2" + SID "2983" + Ports [0, 1, 0, 0, 0, 1, 1] + Position [1510, 528, 1535, 552] + ZOrder -2 + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Current Measurement" + SourceType "Current Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" + } + Block { + BlockType From + Name "From2" + SID "3061" + Position [20, 651, 75, 679] + ZOrder 45 + ShowName off + GotoTag "Vpv" + TagVisibility "global" + } + Block { + BlockType Goto + Name "Goto1" + SID "3068" + Position [155, 485, 195, 515] + ZOrder 50 + BlockMirror on + ShowName off + GotoTag "Irr" + TagVisibility "global" + } + Block { + BlockType Goto + Name "Goto5" + SID "2987" + Position [580, 665, 620, 695] + ZOrder -18 + BlockMirror on + ShowName off + GotoTag "Ipv" + TagVisibility "global" + } + Block { + BlockType Reference + Name "Ia" + SID "2988" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [642, 575, 678, 620] + ZOrder -24 + BlockRotation 270 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" + SourceType "Controlled Current Source" + Initialize on + Source_Type "DC" + Amplitude "0" + Phase "0" + Frequency "0" + Measurements "None" + } + Block { + BlockType Reference + Name "Ia1" + SID "2989" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [702, 575, 738, 620] + ZOrder -24 + BlockRotation 270 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" + SourceType "Controlled Current Source" + Initialize on + Source_Type "DC" + Amplitude "0" + Phase "0" + Frequency "0" + Measurements "None" + } + Block { + BlockType Reference + Name "Ia10" + SID "2990" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [1267, 575, 1303, 620] + ZOrder -24 + BlockRotation 270 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" + SourceType "Controlled Current Source" + Initialize on + Source_Type "DC" + Amplitude "0" + Phase "0" + Frequency "0" + Measurements "None" + } + Block { + BlockType Reference + Name "Ia11" + SID "2991" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [1332, 575, 1368, 620] + ZOrder -24 + BlockRotation 270 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" + SourceType "Controlled Current Source" + Initialize on + Source_Type "DC" + Amplitude "0" + Phase "0" + Frequency "0" + Measurements "None" + } + Block { + BlockType Reference + Name "Ia12" + SID "2992" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [1397, 575, 1433, 620] + ZOrder -24 + BlockRotation 270 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" + SourceType "Controlled Current Source" + Initialize on + Source_Type "DC" + Amplitude "0" + Phase "0" + Frequency "0" + Measurements "None" + } + Block { + BlockType Reference + Name "Ia13" + SID "2993" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [1467, 575, 1503, 620] + ZOrder -24 + BlockRotation 270 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" + SourceType "Controlled Current Source" + Initialize on + Source_Type "DC" + Amplitude "0" + Phase "0" + Frequency "0" + Measurements "None" + } + Block { + BlockType Reference + Name "Ia2" + SID "2994" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [767, 575, 803, 620] + ZOrder -24 + BlockRotation 270 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" + SourceType "Controlled Current Source" + Initialize on + Source_Type "DC" + Amplitude "0" + Phase "0" + Frequency "0" + Measurements "None" + } + Block { + BlockType Reference + Name "Ia3" + SID "2995" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [827, 575, 863, 620] + ZOrder -24 + BlockRotation 270 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" + SourceType "Controlled Current Source" + Initialize on + Source_Type "DC" + Amplitude "0" + Phase "0" + Frequency "0" + Measurements "None" + } + Block { + BlockType Reference + Name "Ia4" + SID "2996" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [887, 575, 923, 620] + ZOrder -24 + BlockRotation 270 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" + SourceType "Controlled Current Source" + Initialize on + Source_Type "DC" + Amplitude "0" + Phase "0" + Frequency "0" + Measurements "None" + } + Block { + BlockType Reference + Name "Ia5" + SID "2997" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [947, 575, 983, 620] + ZOrder -24 + BlockRotation 270 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" + SourceType "Controlled Current Source" + Initialize on + Source_Type "DC" + Amplitude "0" + Phase "0" + Frequency "0" + Measurements "None" + } + Block { + BlockType Reference + Name "Ia6" + SID "2998" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [1007, 575, 1043, 620] + ZOrder -24 + BlockRotation 270 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" + SourceType "Controlled Current Source" + Initialize on + Source_Type "DC" + Amplitude "0" + Phase "0" + Frequency "0" + Measurements "None" + } + Block { + BlockType Reference + Name "Ia7" + SID "2999" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [1072, 575, 1108, 620] + ZOrder -24 + BlockRotation 270 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" + SourceType "Controlled Current Source" + Initialize on + Source_Type "DC" + Amplitude "0" + Phase "0" + Frequency "0" + Measurements "None" + } + Block { + BlockType Reference + Name "Ia8" + SID "3000" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [1132, 575, 1168, 620] + ZOrder -24 + BlockRotation 270 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" + SourceType "Controlled Current Source" + Initialize on + Source_Type "DC" + Amplitude "0" + Phase "0" + Frequency "0" + Measurements "None" + } + Block { + BlockType Reference + Name "Ia9" + SID "3001" + Ports [1, 0, 0, 0, 0, 1, 1] + Position [1197, 575, 1233, 620] + ZOrder -24 + BlockRotation 270 + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Electrical\nSources/Controlled Current Source" + SourceType "Controlled Current Source" + Initialize on + Source_Type "DC" + Amplitude "0" + Phase "0" + Frequency "0" + Measurements "None" + } + Block { + BlockType SubSystem + Name "MATLAB Function1" + SID "3062" + Ports [3, 1] + Position [370, 564, 505, 716] + ZOrder 42 + LibraryVersion "1.32" + ErrorFcn "Stateflow.Translate.translate" + PermitHierarchicalResolution "ExplicitOnly" + TreatAsAtomicUnit on + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + SFBlockType "MATLAB Function" + System { + Name "MATLAB Function1" + Location [223, 338, 826, 833] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + SIDHighWatermark "23" + Block { + BlockType Inport + Name "Vpv" + SID "3062::1" + Position [20, 101, 40, 119] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Inport + Name "Irr" + SID "3062::21" + Position [20, 136, 40, 154] + ZOrder 7 + Port "2" + IconDisplay "Port number" + } + Block { + BlockType Inport + Name "T_amb" + SID "3062::22" + Position [20, 171, 40, 189] + ZOrder 8 + Port "3" + IconDisplay "Port number" + } + Block { + BlockType Demux + Name " Demux " + SID "3062::19" + Ports [1, 1] + Position [270, 230, 320, 270] + ZOrder 5 + Outputs "1" + } + Block { + BlockType S-Function + Name " SFunction " + SID "3062::18" + Tag "Stateflow S-Function Microgrid_24h_Simulation 1" + Ports [3, 2] + Position [180, 105, 230, 185] + ZOrder 4 + FunctionName "sf_sfun" + PortCounts "[3 2]" + EnableBusSupport on + Port { + PortNumber 2 + Name "Ipv" + RTWStorageClass "Auto" + DataLoggingNameMode "SignalName" + } + } + Block { + BlockType Terminator + Name " Terminator " + SID "3062::20" + Position [460, 241, 480, 259] + ZOrder 6 + } + Block { + BlockType Outport + Name "Ipv" + SID "3062::5" + Position [460, 101, 480, 119] + ZOrder -5 + IconDisplay "Port number" + } + Line { + SrcBlock "Vpv" + SrcPort 1 + DstBlock " SFunction " + DstPort 1 + } + Line { + SrcBlock "Irr" + SrcPort 1 + DstBlock " SFunction " + DstPort 2 + } + Line { + SrcBlock "T_amb" + SrcPort 1 + DstBlock " SFunction " + DstPort 3 + } + Line { + Name "Ipv" + Labels [0, 0] + SrcBlock " SFunction " + SrcPort 2 + DstBlock "Ipv" + DstPort 1 + } + Line { + SrcBlock " Demux " + SrcPort 1 + DstBlock " Terminator " + DstPort 1 + } + Line { + SrcBlock " SFunction " + SrcPort 1 + DstBlock " Demux " + DstPort 1 + } + } + } + Block { + BlockType FromWorkspace + Name "Solar Irradiance [kW] from workspace" + SID "3063" + Position [20, 703, 85, 727] + ZOrder 43 + VariableName "VARins'" + SampleTime "[0.1,0]" + Interpolate off + OutputAfterFinalValue "Setting to zero" + } + Block { + BlockType SubSystem + Name "Subsystem1" + SID "3004" + Ports [1] + Position [1630, 606, 1665, 644] + ZOrder -66 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem1" + Location [982, 611, 1366, 928] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Vpv" + SID "3005" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "3006" + Position [235, 31, 295, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Vpv" + TagVisibility "global" + } + Block { + BlockType Reference + Name "LPF vq2" + SID "3007" + Ports [1, 1] + Position [140, 74, 165, 106] + ZOrder -21 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "3008" + Ports [1] + Position [235, 75, 295, 105] + ZOrder -22 + ShowName off + VariableName "Vpv" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Vpv" + SrcPort 1 + Points [25, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + DstBlock "LPF vq2" + DstPort 1 + } + } + Line { + SrcBlock "LPF vq2" + SrcPort 1 + DstBlock "To Workspace1" + DstPort 1 + } + } + } + Block { + BlockType SubSystem + Name "Subsystem4" + SID "3014" + Ports [1] + Position [1570, 481, 1605, 519] + ZOrder -68 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem4" + Location [982, 630, 1231, 931] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Ipv" + SID "3015" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "3016" + Position [120, 31, 180, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Ipv_array" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "3017" + Ports [1] + Position [120, 75, 180, 105] + ZOrder -21 + ShowName off + VariableName "Ipv_array" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Ipv" + SrcPort 1 + Points [25, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 0; 0, 45] + DstBlock "To Workspace1" + DstPort 1 + } + } + } + } + Block { + BlockType Reference + Name "Va" + SID "3018" + Ports [0, 1, 0, 0, 0, 2] + Position [1575, 613, 1600, 637] + ZOrder -35 + ShowName off + LibraryVersion "1.2191" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib/Measurements/Voltage Measurement" + SourceType "Voltage Measurement" + PhasorSimulation off + OutputType "Complex" + PSBequivalent "0" + } + Block { + BlockType PMIOPort + Name "+" + SID "3019" + Position [1775, 530, 1790, 560] + ZOrder -71 + BlockMirror on + Port "1" + Side "Right" + } + Block { + BlockType PMIOPort + Name "-" + SID "3020" + Position [1775, 700, 1790, 730] + ZOrder -72 + BlockMirror on + NamePlacement "alternate" + Port "2" + Side "Right" + } + Line { + SrcBlock "Va" + SrcPort 1 + DstBlock "Subsystem1" + DstPort 1 + } + Line { + LineType "Connection" + SrcBlock "Ia" + SrcPort LConn1 + Points [0, 85; 60, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Ia1" + DstPort LConn1 + } + Branch { + ConnectType "DEST_SRC" + Points [65, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Ia2" + DstPort LConn1 + } + Branch { + ConnectType "DEST_SRC" + Points [60, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Ia3" + DstPort LConn1 + } + Branch { + ConnectType "DEST_SRC" + Points [60, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Ia4" + DstPort LConn1 + } + Branch { + ConnectType "DEST_SRC" + Points [60, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Ia5" + DstPort LConn1 + } + Branch { + ConnectType "DEST_SRC" + Points [60, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Ia6" + DstPort LConn1 + } + Branch { + ConnectType "DEST_SRC" + Points [65, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Ia7" + DstPort LConn1 + } + Branch { + ConnectType "DEST_SRC" + Points [60, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Ia8" + DstPort LConn1 + } + Branch { + ConnectType "DEST_SRC" + Points [65, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Ia9" + DstPort LConn1 + } + Branch { + ConnectType "DEST_SRC" + Points [70, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Ia10" + DstPort LConn1 + } + Branch { + ConnectType "DEST_SRC" + Points [65, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Ia11" + DstPort LConn1 + } + Branch { + ConnectType "DEST_SRC" + Points [65, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Ia12" + DstPort LConn1 + } + Branch { + ConnectType "DEST_SRC" + Points [70, 0] + Branch { + ConnectType "DEST_SRC" + Points [65, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "Va" + DstPort LConn2 + } + Branch { + ConnectType "DEST_DEST" + Points [1730, 720; -170, 0] + Branch { + ConnectType "SRC_DEST" + SrcBlock "Cdc1" + SrcPort RConn1 + Points [0, 45] + } + Branch { + ConnectType "SRC_SRC" + Points [30, 0] + DstBlock "-" + DstPort RConn1 + } + } + } + Branch { + ConnectType "DEST_SRC" + DstBlock "Ia13" + DstPort LConn1 + } + } + } + } + } + } + } + } + } + } + } + } + } + } + Line { + LineType "Connection" + SrcBlock "Current Measurement2" + SrcPort LConn1 + Points [-10, 0] + Branch { + ConnectType "DEST_SRC" + Points [-70, 0] + Branch { + ConnectType "DEST_SRC" + Points [-65, 0] + Branch { + ConnectType "DEST_SRC" + Points [-65, 0] + Branch { + ConnectType "DEST_SRC" + Points [-70, 0] + Branch { + ConnectType "DEST_SRC" + Points [-65, 0] + Branch { + ConnectType "DEST_SRC" + Points [-60, 0] + Branch { + ConnectType "DEST_SRC" + Points [-65, 0] + Branch { + ConnectType "DEST_SRC" + Points [-60, 0] + Branch { + ConnectType "DEST_SRC" + Points [-60, 0] + Branch { + ConnectType "DEST_SRC" + Points [-60, 0] + Branch { + ConnectType "DEST_SRC" + Points [-60, 0] + Branch { + ConnectType "DEST_SRC" + Points [-65, 0] + Branch { + ConnectType "DEST_DEST" + SrcBlock "Ia" + SrcPort RConn1 + Points [0, -20; 60, 0] + } + Branch { + ConnectType "DEST_DEST" + SrcBlock "Ia1" + SrcPort RConn1 + Points [0, -20] + } + } + Branch { + ConnectType "DEST_DEST" + SrcBlock "Ia2" + SrcPort RConn1 + Points [0, -20] + } + } + Branch { + ConnectType "DEST_DEST" + SrcBlock "Ia3" + SrcPort RConn1 + Points [0, -20] + } + } + Branch { + ConnectType "DEST_DEST" + SrcBlock "Ia4" + SrcPort RConn1 + Points [0, -20] + } + } + Branch { + ConnectType "DEST_DEST" + SrcBlock "Ia5" + SrcPort RConn1 + Points [0, -20] + } + } + Branch { + ConnectType "DEST_DEST" + SrcBlock "Ia6" + SrcPort RConn1 + Points [0, -20] + } + } + Branch { + ConnectType "DEST_DEST" + SrcBlock "Ia7" + SrcPort RConn1 + Points [0, -20] + } + } + Branch { + ConnectType "DEST_DEST" + SrcBlock "Ia8" + SrcPort RConn1 + Points [0, -20] + } + } + Branch { + ConnectType "DEST_DEST" + SrcBlock "Ia9" + SrcPort RConn1 + Points [0, -20] + } + } + Branch { + ConnectType "DEST_DEST" + SrcBlock "Ia10" + SrcPort RConn1 + Points [0, -20] + } + } + Branch { + ConnectType "DEST_DEST" + SrcBlock "Ia11" + SrcPort RConn1 + Points [0, -20] + } + } + Branch { + ConnectType "DEST_DEST" + SrcBlock "Ia12" + SrcPort RConn1 + Points [0, -20] + } + } + Branch { + ConnectType "DEST_DEST" + SrcBlock "Ia13" + SrcPort RConn1 + Points [0, -20] + } + } + Line { + LineType "Connection" + SrcBlock "Va" + SrcPort LConn1 + Points [0, -75] + Branch { + ConnectType "DEST_DEST" + SrcBlock "Current Measurement2" + SrcPort RConn1 + Points [10, 0] + } + Branch { + ConnectType "DEST_SRC" + Points [170, 0] + Branch { + ConnectType "DEST_SRC" + DstBlock "+" + DstPort RConn1 + } + Branch { + ConnectType "DEST_SRC" + DstBlock "Cdc1" + DstPort LConn1 + } + } + } + Line { + SrcBlock "Current Measurement2" + SrcPort 1 + Points [5, 0; 0, -35] + DstBlock "Subsystem4" + DstPort 1 + } + Line { + SrcBlock "From2" + SrcPort 1 + Points [71, 0; 0, -75] + DstBlock "MATLAB Function1" + DstPort 1 + } + Line { + SrcBlock "MATLAB Function1" + SrcPort 1 + Points [140, 0] + Branch { + Points [0, 40] + DstBlock "Goto5" + DstPort 1 + } + Branch { + DstBlock "Ia" + DstPort 1 + } + Branch { + Points [60, 0] + Branch { + DstBlock "Ia1" + DstPort 1 + } + Branch { + Points [65, 0] + Branch { + DstBlock "Ia2" + DstPort 1 + } + Branch { + Points [60, 0] + Branch { + DstBlock "Ia3" + DstPort 1 + } + Branch { + Points [60, 0] + Branch { + DstBlock "Ia4" + DstPort 1 + } + Branch { + Points [60, 0] + Branch { + DstBlock "Ia5" + DstPort 1 + } + Branch { + Points [60, 0] + Branch { + DstBlock "Ia6" + DstPort 1 + } + Branch { + Points [65, 0] + Branch { + DstBlock "Ia7" + DstPort 1 + } + Branch { + Points [60, 0] + Branch { + DstBlock "Ia8" + DstPort 1 + } + Branch { + Points [65, 0] + Branch { + DstBlock "Ia9" + DstPort 1 + } + Branch { + Points [70, 0] + Branch { + DstBlock "Ia10" + DstPort 1 + } + Branch { + Points [65, 0] + Branch { + DstBlock "Ia11" + DstPort 1 + } + Branch { + Points [65, 0] + Branch { + Points [70, 0] + DstBlock "Ia13" + DstPort 1 + } + Branch { + DstBlock "Ia12" + DstPort 1 + } + } + } + } + } + } + } + } + } + } + } + } + } + } + Line { + SrcBlock "Solar Irradiance [kW] from workspace" + SrcPort 1 + Points [137, 0; 0, -75; 37, 0] + Branch { + Points [0, -140] + DstBlock "Goto1" + DstPort 1 + } + Branch { + DstBlock "MATLAB Function1" + DstPort 2 + } + } + Line { + SrcBlock "Ambient Temperature [C] from workspace" + SrcPort 1 + Points [208, 0; 0, -75] + DstBlock "MATLAB Function1" + DstPort 3 + } + } + } + Block { + BlockType SubSystem + Name "Subsystem" + SID "1362" + Ports [] + Position [1315, 700, 1532, 900] + ZOrder -8 + BackgroundColor "green" + ShowName off + FontName "Arial Narrow" + FontSize 24 + FontWeight "bold" + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + Object { + $PropName "MaskObject" + $ObjectID 27 + $ClassName "Simulink.Mask" + Display "disp('Measurements')" + } + System { + Name "Subsystem" + Location [-8, -8, 1608, 908] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "50" + Block { + BlockType Scope + Name "AC Load Measurements" + SID "1494" + Ports [2] + Position [1465, 64, 1525, 146] + ZOrder -19 + Floating off + Location [5, 44, 1601, 891] + Open off + NumInputPorts "2" + ZoomMode "xonly" + List { + ListType AxesTitles + axes1 "AC Load Voltages Phase to Ground, Vabc (V)" + axes2 "AC Load Currents, Iabc (A)" + } + List { + ListType ScopeGraphics + FigureColor "[1 1 1]" + AxesColor "[1 1 1]" + AxesTickColor "[0 0 0]" + LineColors "[1 1 0;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" + LineStyles "-|-|-|-|-|-" + LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" + MarkerStyles "none|none|none|none|none|none" + } + ShowLegends off + TimeRange "1" + YMin "-1500~-15" + YMax "1500~15" + SaveToWorkspace on + SaveName "ScopeVoltageCurrentAC" + DataFormat "StructureWithTime" + LimitDataPoints off + SampleTime "0" + } + Block { + BlockType Scope + Name "Battery Measurements" + SID "1363" + Ports [4] + Position [295, 481, 385, 599] + ZOrder -20 + Floating off + Location [5, 43, 1601, 890] + Open off + NumInputPorts "4" + ZoomMode "yonly" + List { + ListType AxesTitles + axes1 "Battery State Of Charge, SOC (%)" + axes2 "Battery Current, Ibat (A)" + axes3 "Battery Voltage, Vbat (V)" + axes4 "Battery Power, (W)" + } + List { + ListType ScopeGraphics + FigureColor "[1 1 1]" + AxesColor "[1 1 1]" + AxesTickColor "[0 0 0]" + LineColors "[0.0431372549019608 0.517647058823529 0.780392156862745;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" + LineStyles "-|-|-|-|-|-" + LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" + MarkerStyles "none|none|none|none|none|none" + } + ShowLegends off + TimeRange "2.4" + YMin "47.5003~-157~995.056~-156500" + YMax "52.5003~-152.5~995.07~-151500" + SaveToWorkspace on + SaveName "ScopeBattery" + DataFormat "StructureWithTime" + LimitDataPoints off + SampleTime "0" + } + Block { + BlockType Clock + Name "Clock" + SID "1539" + Position [55, 895, 75, 915] + ZOrder -4 + } + Block { + BlockType Scope + Name "DC Bus Measurements\nBATTERY SIDE" + SID "2902" + Ports [3] + Position [705, 521, 780, 619] + ZOrder 28 + Floating off + Location [5, 43, 1601, 890] + Open off + NumInputPorts "3" + ZoomMode "yonly" + List { + ListType AxesTitles + axes1 "DC Bus Voltage Battery Side, Vdc (V)" + axes2 "DC Bus Current Battery Side, Idc (A)" + axes3 "DC Bus Power Battery Side, Pdc (W)" + } + List { + ListType ScopeGraphics + FigureColor "[1 1 1]" + AxesColor "[1 1 1]" + AxesTickColor "[0 0 0]" + LineColors "[0.0431372549019608 0.517647058823529 0.780392156862745;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" + LineStyles "-|-|-|-|-|-" + LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" + MarkerStyles "none|none|none|none|none|none" + } + ShowLegends off + TimeRange "5" + YMin "300~-4.195073366439502~-5627.098354983158" + YMax "1300~0.1451897988383877~791.6467936668632" + SaveToWorkspace on + SaveName "ScopeDC_Batteryside" + DataFormat "StructureWithTime" + LimitDataPoints off + SampleTime "0" + } + Block { + BlockType Scope + Name "DC Bus Measurements\nINVERTER SIDE" + SID "2903" + Ports [3] + Position [695, 716, 770, 814] + ZOrder 29 + Floating off + Location [5, 43, 1601, 890] + Open off + NumInputPorts "3" + ZoomMode "yonly" + List { + ListType AxesTitles + axes1 "DC Bus Voltage Inverter Side, Vdcinv (V)" + axes2 "DC Bus Current Inverter Side, Idcinv (A)" + axes3 "DC Bus Power Inverter Side, Pdcinv (W)" + } + List { + ListType ScopeGraphics + FigureColor "[1 1 1]" + AxesColor "[1 1 1]" + AxesTickColor "[0 0 0]" + LineColors "[0.0431372549019608 0.517647058823529 0.780392156862745;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" + LineStyles "-|-|-|-|-|-" + LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" + MarkerStyles "none|none|none|none|none|none" + } + ShowLegends off + TimeRange "5" + YMin "300~-4.195073366439502~-5627.098354983158" + YMax "1300~0.1451897988383877~791.6467936668632" + SaveToWorkspace on + SaveName "ScopeDC_Inverter" + DataFormat "StructureWithTime" + LimitDataPoints off + SampleTime "0" + } + Block { + BlockType Scope + Name "DC Bus Measurements\nPV SIDE" + SID "2904" + Ports [3] + Position [700, 326, 775, 424] + ZOrder 30 + Floating off + Location [5, 43, 1601, 890] + Open off + NumInputPorts "3" + ZoomMode "yonly" + List { + ListType AxesTitles + axes1 "DC Bus Voltage PV Side, Vbus (V)" + axes2 "DC Bus Current PV Side, Ibus (A)" + axes3 "DC Bus Power PV Side, Pbus (W)" + } + List { + ListType ScopeGraphics + FigureColor "[1 1 1]" + AxesColor "[1 1 1]" + AxesTickColor "[0 0 0]" + LineColors "[0.0431372549019608 0.517647058823529 0.780392156862745;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" + LineStyles "-|-|-|-|-|-" + LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" + MarkerStyles "none|none|none|none|none|none" + } + ShowLegends off + TimeRange "9" + YMin "0~-150~-60000" + YMax "1600~150~80000" + SaveToWorkspace on + SaveName "ScopeDC_PVside" + DataFormat "StructureWithTime" + LimitDataPoints off + SampleTime "0" + } + Block { + BlockType Scope + Name "Frequency" + SID "2109" + Ports [2] + Position [1545, 664, 1605, 746] + ZOrder -19 + Floating off + Location [5, 43, 1601, 890] + Open off + NumInputPorts "2" + ZoomMode "yonly" + List { + ListType AxesTitles + axes1 "Frequency (Hz)" + axes2 "Frequency Filtered (Hz)" + } + List { + ListType ScopeGraphics + FigureColor "[1 1 1]" + AxesColor "[1 1 1]" + AxesTickColor "[0 0 0]" + LineColors "[0.0431372549019608 0.517647058823529 0.780392156862745;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" + LineStyles "-|-|-|-|-|-" + LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" + MarkerStyles "none|none|none|none|none|none" + } + ShowLegends off + TimeRange "1" + YMin "-150~12.5" + YMax "375~18.5" + SaveToWorkspace on + SaveName "ScopeFrequency" + DataFormat "StructureWithTime" + LimitDataPoints off + SampleTime "0" + } + Block { + BlockType From + Name "From1" + SID "2906" + Position [435, 526, 500, 554] + ZOrder 32 + ShowName off + GotoTag "Vdc" + TagVisibility "global" + } + Block { + BlockType From + Name "From10" + SID "1367" + Position [55, 541, 120, 569] + ZOrder -28 + NamePlacement "alternate" + ShowName off + GotoTag "Vbat" + TagVisibility "global" + } + Block { + BlockType From + Name "From11" + SID "2907" + Position [435, 751, 500, 779] + ZOrder 33 + ShowName off + GotoTag "Idcinv" + TagVisibility "global" + } + Block { + BlockType From + Name "From12" + SID "2908" + Position [435, 556, 500, 584] + ZOrder 34 + ShowName off + GotoTag "Idc" + TagVisibility "global" + } + Block { + BlockType From + Name "From13" + SID "3030" + Position [1265, 931, 1365, 959] + ZOrder 42 + ShowName off + GotoTag "ChargeControl" + TagVisibility "global" + } + Block { + BlockType From + Name "From14" + SID "3037" + Position [1065, 211, 1130, 239] + ZOrder 45 + ShowName off + GotoTag "APower" + TagVisibility "global" + } + Block { + BlockType From + Name "From15" + SID "2100" + Position [1250, 671, 1315, 699] + ZOrder -33 + ShowName off + GotoTag "w_abc" + TagVisibility "global" + } + Block { + BlockType From + Name "From16" + SID "3038" + Position [1065, 256, 1130, 284] + ZOrder 46 + ShowName off + GotoTag "RPower" + TagVisibility "global" + } + Block { + BlockType From + Name "From2" + SID "2911" + Position [435, 331, 500, 359] + ZOrder 37 + ShowName off + GotoTag "Vbus" + TagVisibility "global" + } + Block { + BlockType From + Name "From20" + SID "1414" + Position [1245, 356, 1310, 384] + ZOrder -8 + ShowName off + GotoTag "Vload_ab" + TagVisibility "global" + } + Block { + BlockType From + Name "From21" + SID "1415" + Position [1250, 511, 1315, 539] + ZOrder -8 + ShowName off + GotoTag "Vload_a" + TagVisibility "global" + } + Block { + BlockType From + Name "From3" + SID "2912" + Position [435, 361, 500, 389] + ZOrder 38 + ShowName off + GotoTag "Ibus" + TagVisibility "global" + } + Block { + BlockType From + Name "From4" + SID "241" + Position [50, 111, 115, 139] + ZOrder -38 + NamePlacement "alternate" + ShowName off + GotoTag "Vpv" + TagVisibility "global" + Port { + PortNumber 1 + ShowPropagatedSignals "on" + RTWStorageClass "Auto" + DataLoggingNameMode "SignalName" + } + } + Block { + BlockType From + Name "From5" + SID "242" + Position [50, 136, 115, 164] + ZOrder -39 + NamePlacement "alternate" + ShowName off + GotoTag "Ipv_array" + TagVisibility "global" + Port { + PortNumber 1 + ShowPropagatedSignals "on" + RTWStorageClass "Auto" + DataLoggingNameMode "SignalName" + } + } + Block { + BlockType From + Name "From6" + SID "1372" + Position [55, 481, 120, 509] + ZOrder -40 + NamePlacement "alternate" + ShowName off + GotoTag "SOC" + TagVisibility "global" + } + Block { + BlockType From + Name "From7" + SID "1373" + Position [55, 511, 120, 539] + ZOrder -41 + NamePlacement "alternate" + ShowName off + GotoTag "Ibat" + TagVisibility "global" + } + Block { + BlockType From + Name "From8" + SID "2913" + Position [435, 721, 500, 749] + ZOrder 39 + ShowName off + GotoTag "Vdcinv" + TagVisibility "global" + } + Block { + BlockType From + Name "From9" + SID "243" + Position [50, 186, 115, 214] + ZOrder -43 + NamePlacement "alternate" + ShowName off + GotoTag "Irr" + TagVisibility "global" + Port { + PortNumber 1 + ShowPropagatedSignals "on" + RTWStorageClass "Auto" + DataLoggingNameMode "SignalName" + } + } + Block { + BlockType Gain + Name "Gain" + SID "2101" + Position [1355, 664, 1425, 706] + ZOrder -44 + ShowName off + Gain "1/(2*pi)" + ParamDataTypeStr "Inherit: Inherit via internal rule" + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Gain + Name "Gain1" + SID "2620" + Position [1300, 70, 1330, 100] + ZOrder 3 + ParamDataTypeStr "Inherit: Inherit via internal rule" + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Gain + Name "Gain2" + SID "2621" + Position [1500, 770, 1530, 800] + ZOrder 4 + ParamDataTypeStr "Inherit: Inherit via internal rule" + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Gain + Name "Gain3" + SID "2622" + Position [190, 480, 220, 510] + ZOrder 5 + ParamDataTypeStr "Inherit: Inherit via internal rule" + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Gain + Name "Gain4" + SID "2628" + Position [1235, 110, 1265, 140] + ZOrder 9 + ParamDataTypeStr "Inherit: Inherit via internal rule" + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Gain + Name "Gain5" + SID "2629" + Position [1235, 170, 1265, 200] + ZOrder 10 + ParamDataTypeStr "Inherit: Inherit via internal rule" + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Gain + Name "Gain6" + SID "2630" + Position [1235, 300, 1265, 330] + ZOrder 11 + ParamDataTypeStr "Inherit: Inherit via internal rule" + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Gain + Name "Gain7" + SID "3031" + Position [1420, 930, 1450, 960] + ZOrder 43 + ParamDataTypeStr "Inherit: Inherit via internal rule" + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType SubSystem + Name "Inverter Control \nMeasurements1" + SID "1551" + Ports [] + Position [145, 285, 308, 383] + ZOrder -46 + NamePlacement "alternate" + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + Object { + $PropName "MaskObject" + $ObjectID 28 + $ClassName "Simulink.Mask" + Display "disp('Boost Converter Control')" + } + System { + Name "Inverter Control \nMeasurements1" + Location [0, 0, 1600, 876] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Scope + Name "Boost Converter Control\nMPPT" + SID "1769" + Ports [3] + Position [190, 65, 295, 215] + ZOrder -19 + Floating off + Location [729, 166, 1513, 962] + Open off + NumInputPorts "3" + ZoomMode "yonly" + List { + ListType AxesTitles + axes1 "Reference Voltage of the PV Array, Vref (V)" + axes2 "Modulation Index" + axes3 "Switch pulses" + } + ShowLegends off + TimeRange "1" + YMin "162.5~-100~-5" + YMax "207.5~100~5" + SaveName "ScopeData16" + DataFormat "StructureWithTime" + LimitDataPoints off + SampleTime "0" + } + Block { + BlockType From + Name "From5" + SID "1766" + Position [55, 76, 120, 104] + ZOrder -8 + ShowName off + GotoTag "Vref" + TagVisibility "global" + } + Block { + BlockType From + Name "From6" + SID "1767" + Position [55, 126, 120, 154] + ZOrder -8 + ShowName off + GotoTag "delta" + TagVisibility "global" + } + Block { + BlockType From + Name "From7" + SID "1768" + Position [55, 176, 120, 204] + ZOrder -8 + ShowName off + GotoTag "pulsos" + TagVisibility "global" + } + Line { + SrcBlock "From5" + SrcPort 1 + DstBlock "Boost Converter Control\nMPPT" + DstPort 1 + } + Line { + SrcBlock "From6" + SrcPort 1 + DstBlock "Boost Converter Control\nMPPT" + DstPort 2 + } + Line { + SrcBlock "From7" + SrcPort 1 + DstBlock "Boost Converter Control\nMPPT" + DstPort 3 + } + } + } + Block { + BlockType SubSystem + Name "Inverter Control \nMeasurements2" + SID "1626" + Ports [] + Position [145, 685, 308, 783] + ZOrder -47 + NamePlacement "alternate" + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + Object { + $PropName "MaskObject" + $ObjectID 29 + $ClassName "Simulink.Mask" + Display "disp('Bidirectional Converter Control')" + } + System { + Name "Inverter Control \nMeasurements2" + Location [-8, -8, 1608, 908] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Scope + Name "Control Loops" + SID "1699" + Ports [2] + Position [230, 38, 335, 187] + ZOrder -19 + Floating off + Location [729, 166, 1513, 962] + Open off + NumInputPorts "2" + ZoomMode "yonly" + List { + ListType AxesTitles + axes1 "DC Bus Voltage Controller, Vdc / Vdc* (V)" + axes2 "Battery Current Controller, Ibat / Ibat* (A)" + } + ShowLegends off + TimeRange "1" + YMin "162.5~-100" + YMax "207.5~100" + SaveName "ScopeData3" + DataFormat "StructureWithTime" + LimitDataPoints off + SampleTime "0" + } + Block { + BlockType From + Name "From1" + SID "1728" + Position [25, 41, 90, 69] + ZOrder -8 + ShowName off + GotoTag "Vdc" + TagVisibility "global" + } + Block { + BlockType From + Name "From2" + SID "1729" + Position [25, 81, 90, 109] + ZOrder -8 + ShowName off + GotoTag "Vdc_ref" + } + Block { + BlockType From + Name "From3" + SID "1730" + Position [25, 116, 90, 144] + ZOrder -8 + ShowName off + GotoTag "Ibat" + TagVisibility "global" + } + Block { + BlockType From + Name "From4" + SID "1731" + Position [25, 156, 90, 184] + ZOrder -8 + ShowName off + GotoTag "Ibat_ref" + } + Block { + BlockType From + Name "From5" + SID "1750" + Position [400, 46, 465, 74] + ZOrder -8 + ShowName off + GotoTag "Sign" + } + Block { + BlockType From + Name "From6" + SID "1751" + Position [400, 96, 465, 124] + ZOrder -8 + ShowName off + GotoTag "S1" + } + Block { + BlockType From + Name "From7" + SID "1752" + Position [400, 146, 465, 174] + ZOrder -8 + ShowName off + GotoTag "S2" + } + Block { + BlockType Mux + Name "Mux" + SID "1642" + Ports [2, 1] + Position [185, 35, 190, 115] + ZOrder -27 + ShowName off + Inputs "2" + DisplayOption "bar" + } + Block { + BlockType Mux + Name "Mux2" + SID "1643" + Ports [2, 1] + Position [185, 110, 190, 190] + ZOrder -28 + ShowName off + Inputs "2" + DisplayOption "bar" + } + Block { + BlockType Scope + Name "Switch Control" + SID "1749" + Ports [3] + Position [535, 35, 640, 185] + ZOrder -19 + Floating off + Location [729, 166, 1513, 962] + Open off + NumInputPorts "3" + ZoomMode "yonly" + List { + ListType AxesTitles + axes1 "Current Direction, Sign" + axes2 "Switch S1 pulses, Buck Mode Charging" + axes3 "Switch S2 pulses, Boost Mode Charging" + } + ShowLegends off + TimeRange "1" + YMin "162.5~-100~-5" + YMax "207.5~100~5" + SaveName "ScopeData10" + DataFormat "StructureWithTime" + LimitDataPoints off + SampleTime "0" + } + Line { + SrcBlock "From1" + SrcPort 1 + DstBlock "Mux" + DstPort 1 + } + Line { + SrcBlock "From2" + SrcPort 1 + DstBlock "Mux" + DstPort 2 + } + Line { + SrcBlock "From3" + SrcPort 1 + DstBlock "Mux2" + DstPort 1 + } + Line { + SrcBlock "From4" + SrcPort 1 + DstBlock "Mux2" + DstPort 2 + } + Line { + SrcBlock "Mux" + SrcPort 1 + DstBlock "Control Loops" + DstPort 1 + } + Line { + SrcBlock "Mux2" + SrcPort 1 + DstBlock "Control Loops" + DstPort 2 + } + Line { + SrcBlock "From5" + SrcPort 1 + DstBlock "Switch Control" + DstPort 1 + } + Line { + SrcBlock "From6" + SrcPort 1 + DstBlock "Switch Control" + DstPort 2 + } + Line { + SrcBlock "From7" + SrcPort 1 + DstBlock "Switch Control" + DstPort 3 + } + } + } + Block { + BlockType SubSystem + Name "Inverter Control \nMeasurements3" + SID "1974" + Ports [] + Position [970, 795, 1133, 893] + ZOrder -48 + NamePlacement "alternate" + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + Object { + $PropName "MaskObject" + $ObjectID 30 + $ClassName "Simulink.Mask" + Display "disp('Frequency Measurement')" + } + System { + Name "Inverter Control \nMeasurements3" + Location [-8, -8, 1608, 908] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType SubSystem + Name "PLL" + SID "2056" + Ports [1] + Position [195, 34, 340, 136] + ZOrder -1 + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "PLL" + Location [-8, -8, 1608, 908] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Vabc" + SID "2057" + Position [45, 53, 75, 67] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Demux + Name "Demux" + SID "2058" + Ports [1, 2] + Position [340, 29, 345, 136] + ZOrder -2 + ShowName off + Outputs "2" + DisplayOption "bar" + } + Block { + BlockType Integrator + Name "Integrator" + SID "2062" + Ports [1, 1] + Position [625, 95, 655, 125] + ZOrder -3 + ShowName off + } + Block { + BlockType SubSystem + Name "PI" + SID "2063" + Ports [1, 1] + Position [475, 89, 570, 131] + ZOrder -4 + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "PI" + Location [193, 129, 783, 507] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "e" + SID "2064" + Position [30, 65, 45, 95] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Gain + Name "Gain1" + SID "2065" + Position [160, 61, 215, 99] + ZOrder -2 + ShowName off + Gain "10" + ParamDataTypeStr "Inherit: Inherit via internal rule" + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Gain + Name "Gain2" + SID "2066" + Position [160, 136, 215, 174] + ZOrder -3 + ShowName off + Gain "100" + ParamDataTypeStr "Inherit: Inherit via internal rule" + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Integrator + Name "Integrator" + SID "2067" + Ports [1, 1] + Position [280, 140, 310, 170] + ZOrder -4 + ShowName off + } + Block { + BlockType Saturate + Name "Saturation" + SID "2068" + Ports [1, 1] + Position [430, 65, 460, 95] + ZOrder -5 + ShowName off + InputPortMap "u0" + UpperLimit "inf" + LowerLimit "-inf" + } + Block { + BlockType Sum + Name "Sum1" + SID "2069" + Ports [2, 1] + Position [335, 70, 355, 90] + ZOrder -6 + ShowName off + IconShape "round" + Inputs "|++" + InputSameDT off + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Outport + Name "w" + SID "2070" + Position [505, 65, 520, 95] + ZOrder -7 + IconDisplay "Port number" + } + Line { + SrcBlock "Integrator" + SrcPort 1 + Points [30, 0] + DstBlock "Sum1" + DstPort 2 + } + Line { + SrcBlock "Gain1" + SrcPort 1 + DstBlock "Sum1" + DstPort 1 + } + Line { + SrcBlock "e" + SrcPort 1 + Points [50, 0] + Branch { + Points [0, 75] + DstBlock "Gain2" + DstPort 1 + } + Branch { + DstBlock "Gain1" + DstPort 1 + } + } + Line { + SrcBlock "Gain2" + SrcPort 1 + DstBlock "Integrator" + DstPort 1 + } + Line { + SrcBlock "Saturation" + SrcPort 1 + DstBlock "w" + DstPort 1 + } + Line { + SrcBlock "Sum1" + SrcPort 1 + DstBlock "Saturation" + DstPort 1 + } + } + } + Block { + BlockType SubSystem + Name "Subsystem3" + SID "2092" + Ports [1] + Position [625, 31, 675, 69] + ZOrder -5 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem3" + Location [982, 630, 1261, 993] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "wabc" + SID "2093" + Position [15, 38, 45, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "2098" + Position [140, 30, 200, 60] + ZOrder -2 + ShowName off + GotoTag "w_abc" + TagVisibility "global" + } + Block { + BlockType Reference + Name "LPF vq7" + SID "2094" + Ports [1, 1] + Position [100, 137, 120, 163] + ZOrder -3 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "2095" + Ports [1] + Position [120, 75, 180, 105] + ZOrder -4 + ShowName off + VariableName "wabc_real" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ToWorkspace + Name "To Workspace2" + SID "2096" + Ports [1] + Position [140, 135, 200, 165] + ZOrder -5 + ShowName off + VariableName "wabc_real_fil" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ZeroOrderHold + Name "Zero-Order\nHold" + SID "2097" + Position [65, 30, 80, 60] + ZOrder -6 + ShowName off + SampleTime "5e-6" + } + Line { + SrcBlock "LPF vq7" + SrcPort 1 + DstBlock "To Workspace2" + DstPort 1 + } + Line { + SrcBlock "wabc" + SrcPort 1 + DstBlock "Zero-Order\nHold" + DstPort 1 + } + Line { + SrcBlock "Zero-Order\nHold" + SrcPort 1 + Points [0, 0] + Branch { + Points [0, 40] + Branch { + DstBlock "LPF vq7" + DstPort 1 + } + Branch { + Points [0, 5] + DstBlock "To Workspace1" + DstPort 1 + } + } + Branch { + DstBlock "Goto2" + DstPort 1 + } + } + } + } + Block { + BlockType Terminator + Name "Terminator" + SID "2091" + Position [400, 45, 420, 65] + ZOrder -6 + ShowName off + } + Block { + BlockType SubSystem + Name "abc - d/q" + SID "2071" + Ports [2, 1] + Position [150, 39, 275, 126] + ZOrder -7 + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "abc - d/q" + Location [407, 631, 923, 963] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "abc" + SID "2072" + Position [25, 58, 55, 72] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Inport + Name "tita" + SID "2073" + Position [195, 98, 225, 112] + ZOrder -2 + Port "2" + IconDisplay "Port number" + } + Block { + BlockType SubSystem + Name "abc - alfa/beta" + SID "2074" + Ports [1, 1] + Position [80, 29, 185, 101] + ZOrder -3 + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "abc - alfa/beta" + Location [332, 617, 833, 1023] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "abc" + SID "2075" + Position [25, 95, 40, 125] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Mux + Name "Mux" + SID "2076" + Ports [2, 1] + Position [315, 65, 320, 165] + ZOrder -2 + ShowName off + Inputs "2" + DisplayOption "bar" + } + Block { + BlockType Fcn + Name "d_s" + SID "2077" + Position [110, 73, 255, 107] + ZOrder -3 + Expr "(-1/sqrt(3)*u[2])+(1/sqrt(3)*u[3])" + } + Block { + BlockType Fcn + Name "q_s" + SID "2078" + Position [110, 123, 255, 157] + ZOrder -4 + Expr "(2/3)*u[1]-(1/3)*u[2]-(1/3)*u[3]" + } + Block { + BlockType Outport + Name "alfa/beta" + SID "2079" + Position [365, 100, 380, 130] + ZOrder -5 + IconDisplay "Port number" + } + Line { + SrcBlock "abc" + SrcPort 1 + Points [25, 0] + Branch { + Points [0, 30] + DstBlock "q_s" + DstPort 1 + } + Branch { + Points [0, -20] + DstBlock "d_s" + DstPort 1 + } + } + Line { + SrcBlock "d_s" + SrcPort 1 + DstBlock "Mux" + DstPort 1 + } + Line { + SrcBlock "q_s" + SrcPort 1 + DstBlock "Mux" + DstPort 2 + } + Line { + SrcBlock "Mux" + SrcPort 1 + DstBlock "alfa/beta" + DstPort 1 + } + } + } + Block { + BlockType SubSystem + Name "alfa/beta - dq" + SID "2080" + Ports [2, 1] + Position [250, 45, 380, 125] + ZOrder -4 + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "alfa/beta - dq" + Location [822, 775, 1323, 1160] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "alfa/beta" + SID "2081" + Position [25, 50, 40, 80] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Inport + Name "tita" + SID "2082" + Position [25, 125, 40, 155] + ZOrder -2 + Port "2" + IconDisplay "Port number" + } + Block { + BlockType Mux + Name "Mux" + SID "2083" + Ports [2, 1] + Position [320, 28, 325, 177] + ZOrder -3 + ShowName off + Inputs "2" + DisplayOption "bar" + } + Block { + BlockType Mux + Name "Mux1" + SID "2084" + Ports [2, 1] + Position [65, 28, 70, 177] + ZOrder -4 + ShowName off + Inputs "2" + DisplayOption "bar" + } + Block { + BlockType Fcn + Name "d" + SID "2085" + Position [115, 47, 275, 83] + ZOrder -5 + Expr "u[2]*sin(u[3]) + u[1]*cos(u[3])" + } + Block { + BlockType Fcn + Name "q" + SID "2086" + Position [115, 123, 280, 157] + ZOrder -6 + Expr "-u[1]*sin(u[3]) + u[2]*cos(u[3])" + } + Block { + BlockType Outport + Name "d/q" + SID "2087" + Position [360, 90, 375, 120] + ZOrder -7 + IconDisplay "Port number" + } + Line { + SrcBlock "d" + SrcPort 1 + DstBlock "Mux" + DstPort 1 + } + Line { + SrcBlock "q" + SrcPort 1 + DstBlock "Mux" + DstPort 2 + } + Line { + SrcBlock "Mux" + SrcPort 1 + DstBlock "d/q" + DstPort 1 + } + Line { + SrcBlock "alfa/beta" + SrcPort 1 + DstBlock "Mux1" + DstPort 1 + } + Line { + SrcBlock "tita" + SrcPort 1 + DstBlock "Mux1" + DstPort 2 + } + Line { + SrcBlock "Mux1" + SrcPort 1 + Points [25, 0] + Branch { + DstBlock "d" + DstPort 1 + } + Branch { + DstBlock "q" + DstPort 1 + } + } + } + } + Block { + BlockType Outport + Name "d/q" + SID "2088" + Position [405, 78, 435, 92] + ZOrder -5 + IconDisplay "Port number" + } + Line { + SrcBlock "tita" + SrcPort 1 + DstBlock "alfa/beta - dq" + DstPort 2 + } + Line { + SrcBlock "alfa/beta - dq" + SrcPort 1 + DstBlock "d/q" + DstPort 1 + } + Line { + SrcBlock "abc" + SrcPort 1 + DstBlock "abc - alfa/beta" + DstPort 1 + } + Line { + SrcBlock "abc - alfa/beta" + SrcPort 1 + DstBlock "alfa/beta - dq" + DstPort 1 + } + } + } + Line { + SrcBlock "Vabc" + SrcPort 1 + DstBlock "abc - d/q" + DstPort 1 + } + Line { + SrcBlock "Integrator" + SrcPort 1 + Points [35, 0; 0, 60; -600, 0; 0, -65] + DstBlock "abc - d/q" + DstPort 2 + } + Line { + SrcBlock "PI" + SrcPort 1 + Points [20, 0] + Branch { + DstBlock "Integrator" + DstPort 1 + } + Branch { + Points [0, -60] + DstBlock "Subsystem3" + DstPort 1 + } + } + Line { + SrcBlock "Demux" + SrcPort 2 + DstBlock "PI" + DstPort 1 + } + Line { + SrcBlock "abc - d/q" + SrcPort 1 + DstBlock "Demux" + DstPort 1 + } + Line { + SrcBlock "Demux" + SrcPort 1 + DstBlock "Terminator" + DstPort 1 + } + } + } + Block { + BlockType SubSystem + Name "Subsystem" + SID "2089" + Ports [0, 1] + Position [50, 54, 120, 116] + ZOrder -2 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem" + Location [2, 0, 1614, 912] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType From + Name "From15" + SID "2049" + Position [25, 26, 90, 54] + ZOrder -8 + ShowName off + GotoTag "Vab" + TagVisibility "global" + } + Block { + BlockType From + Name "From16" + SID "2050" + Position [25, 51, 90, 79] + ZOrder -8 + ShowName off + GotoTag "Vbc" + TagVisibility "global" + } + Block { + BlockType From + Name "From17" + SID "2051" + Position [25, 76, 90, 104] + ZOrder -8 + ShowName off + GotoTag "Vca" + TagVisibility "global" + } + Block { + BlockType Reference + Name "LPF vq2" + SID "2052" + Ports [1, 1] + Position [125, 27, 145, 53] + ZOrder -11 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType Reference + Name "LPF vq3" + SID "2053" + Ports [1, 1] + Position [125, 52, 145, 78] + ZOrder -12 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType Reference + Name "LPF vq4" + SID "2054" + Ports [1, 1] + Position [125, 77, 145, 103] + ZOrder -13 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType Mux + Name "Mux" + SID "2055" + Ports [3, 1] + Position [175, 25, 180, 105] + ZOrder -14 + ShowName off + Inputs "3" + DisplayOption "bar" + } + Block { + BlockType Outport + Name "Vabc" + SID "2090" + Position [205, 58, 235, 72] + ZOrder -15 + IconDisplay "Port number" + } + Line { + SrcBlock "From15" + SrcPort 1 + DstBlock "LPF vq2" + DstPort 1 + } + Line { + SrcBlock "From16" + SrcPort 1 + DstBlock "LPF vq3" + DstPort 1 + } + Line { + SrcBlock "From17" + SrcPort 1 + DstBlock "LPF vq4" + DstPort 1 + } + Line { + SrcBlock "LPF vq2" + SrcPort 1 + DstBlock "Mux" + DstPort 1 + } + Line { + SrcBlock "LPF vq3" + SrcPort 1 + DstBlock "Mux" + DstPort 2 + } + Line { + SrcBlock "LPF vq4" + SrcPort 1 + DstBlock "Mux" + DstPort 3 + } + Line { + SrcBlock "Mux" + SrcPort 1 + DstBlock "Vabc" + DstPort 1 + } + } + } + Line { + SrcBlock "Subsystem" + SrcPort 1 + DstBlock "PLL" + DstPort 1 + } + } + } + Block { + BlockType Reference + Name "LPF" + SID "1492" + Ports [1, 1] + Position [1410, 394, 1450, 426] + ZOrder -49 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType Reference + Name "LPF vq1" + SID "2914" + Ports [1, 1] + Position [525, 752, 555, 778] + ZOrder 27 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType Reference + Name "LPF vq10" + SID "2102" + Ports [1, 1] + Position [1505, 712, 1525, 738] + ZOrder -51 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType Reference + Name "LPF vq2" + SID "1778" + Ports [1, 1] + Position [145, 109, 170, 141] + ZOrder -52 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType Reference + Name "LPF vq3" + SID "2915" + Ports [1, 1] + Position [525, 722, 555, 748] + ZOrder 26 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType Reference + Name "LPF vq4" + SID "2916" + Ports [1, 1] + Position [525, 557, 555, 583] + ZOrder 25 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType Reference + Name "LPF vq5" + SID "2917" + Ports [1, 1] + Position [525, 527, 555, 553] + ZOrder 24 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType Reference + Name "LPF vq6" + SID "2918" + Ports [1, 1] + Position [525, 362, 555, 388] + ZOrder 23 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType Reference + Name "LPF vq7" + SID "2919" + Ports [1, 1] + Position [525, 332, 555, 358] + ZOrder 22 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType Reference + Name "LPF1" + SID "1493" + Ports [1, 1] + Position [1410, 549, 1450, 581] + ZOrder -60 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType Scope + Name "Load Powers" + SID "1526" + Ports [2] + Position [1365, 204, 1425, 291] + ZOrder -19 + Floating off + Location [10, 57, 1592, 890] + Open off + NumInputPorts "2" + ZoomMode "yonly" + List { + ListType AxesTitles + axes1 "AC Load Active Power, Pacload (W)" + axes2 "AC Load Reactive power, Qacload (VAr)" + } + List { + ListType ScopeGraphics + FigureColor "[1 1 1]" + AxesColor "[1 1 1]" + AxesTickColor "[0 0 0]" + LineColors "[0.0431372549019608 0.517647058823529 0.780392156862745;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" + LineStyles "-|-|-|-|-|-" + LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" + MarkerStyles "none|none|none|none|none|none" + } + ShowLegends off + TimeRange "1" + YMin "-2000~-1500" + YMax "10000~1000" + SaveToWorkspace on + SaveName "ScopeLoadPower" + DataFormat "StructureWithTime" + LimitDataPoints off + SampleTime "0" + } + Block { + BlockType Scope + Name "PV Array Measurements" + SID "1361" + Ports [4] + Position [295, 112, 375, 213] + ZOrder -63 + Floating off + Location [5, 43, 1601, 890] + Open off + NumInputPorts "4" + ZoomMode "xonly" + List { + ListType AxesTitles + axes1 "PV Voltage, Vpv (V)" + axes2 "PV Current, Ipv (A)" + axes3 "PV Power, Ppv (W)" + axes4 "Irradiance, Irr (KW/m^2)" + } + List { + ListType ScopeGraphics + FigureColor "[1 1 1]" + AxesColor "[1 1 1]" + AxesTickColor "[0 0 0]" + LineColors "[0.0431372549019608 0.517647058823529 0.780392156862745;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" + LineStyles "-|-|-|-|-|-" + LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" + MarkerStyles "none|none|none|none|none|none" + } + ShowLegends off + YMin "383.094~109.35~41890~17.5473" + YMax "383.096~109.7~42020~19.3943" + SaveToWorkspace on + SaveName "ScopePV" + DataFormat "StructureWithTime" + LimitDataPoints off + SampleTime "0" + } + Block { + BlockType Product + Name "Product" + SID "245" + Ports [2, 1] + Position [210, 157, 240, 188] + ZOrder -64 + ShowName off + InputSameDT off + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Product + Name "Product1" + SID "2922" + Ports [2, 1] + Position [620, 387, 650, 418] + ZOrder 19 + ShowName off + InputSameDT off + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Product + Name "Product2" + SID "2923" + Ports [2, 1] + Position [620, 582, 650, 613] + ZOrder 18 + ShowName off + InputSameDT off + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Product + Name "Product4" + SID "1376" + Ports [2, 1] + Position [190, 567, 220, 598] + ZOrder -68 + ShowName off + InputSameDT off + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Product + Name "Product5" + SID "2925" + Ports [2, 1] + Position [620, 777, 650, 808] + ZOrder 16 + ShowName off + InputSameDT off + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Reference + Name "RMS1" + SID "1527" + Ports [1, 1] + Position [1345, 552, 1390, 578] + ZOrder -70 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Measurements/RMS" + SourceType "RMS" + f1 "60" + } + Block { + BlockType Reference + Name "RMS3" + SID "1528" + Ports [1, 1] + Position [1345, 397, 1390, 423] + ZOrder -71 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Measurements/RMS" + SourceType "RMS" + f1 "60" + } + Block { + BlockType Scope + Name "Scope" + SID "3023" + Ports [1] + Position [1310, 169, 1340, 201] + ZOrder 40 + Floating off + Location [1, 48, 1601, 899] + Open off + NumInputPorts "1" + List { + ListType AxesTitles + axes1 "%" + } + List { + ListType ScopeGraphics + FigureColor "[0.5 0.5 0.5]" + AxesColor "[0 0 0]" + AxesTickColor "[1 1 1]" + LineColors "[1 1 0;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" + LineStyles "-|-|-|-|-|-" + LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" + MarkerStyles "none|none|none|none|none|none" + } + ShowLegends off + SaveName "ScopeData9" + DataFormat "StructureWithTime" + SampleTime "0" + } + Block { + BlockType Scope + Name "Scope1" + SID "3024" + Ports [1] + Position [1310, 299, 1340, 331] + ZOrder 41 + Floating off + Location [188, 390, 512, 629] + Open off + NumInputPorts "1" + List { + ListType AxesTitles + axes1 "%" + } + ShowLegends off + SaveName "ScopeData24" + DataFormat "StructureWithTime" + SampleTime "0" + } + Block { + BlockType Scope + Name "Scope11" + SID "1529" + Ports [2] + Position [1540, 504, 1600, 586] + ZOrder -19 + ShowName off + Floating off + Location [5, 43, 1601, 890] + Open off + NumInputPorts "2" + ZoomMode "yonly" + List { + ListType AxesTitles + axes1 "AC Load Voltage Phase A, Vload_a (V)" + axes2 "RMS" + } + List { + ListType ScopeGraphics + FigureColor "[1 1 1]" + AxesColor "[1 1 1]" + AxesTickColor "[0 0 0]" + LineColors "[0.0431372549019608 0.517647058823529 0.780392156862745;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" + LineStyles "-|-|-|-|-|-" + LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" + MarkerStyles "none|none|none|none|none|none" + } + ShowLegends off + TimeRange "4" + YMin "-600~0" + YMax "600~100" + SaveName "ScopeData7" + DataFormat "StructureWithTime" + LimitDataPoints off + SampleTime "0" + } + Block { + BlockType Scope + Name "Scope2" + SID "3032" + Ports [1] + Position [1525, 929, 1555, 961] + ZOrder 44 + Floating off + Location [5, 41, 1601, 888] + Open off + NumInputPorts "1" + List { + ListType AxesTitles + axes1 "Charge Control" + } + List { + ListType ScopeGraphics + FigureColor "[1 1 1]" + AxesColor "[1 1 1]" + AxesTickColor "[0 0 0]" + LineColors "[0.0431372549019608 0.517647058823529 0.780392156862745;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" + LineStyles "-|-|-|-|-|-" + LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" + MarkerStyles "none|none|none|none|none|none" + } + ShowLegends on + LegendLocations "0.92721 0.93211 0.053885 0.024006" + YMin "1" + YMax "1" + DataFormat "StructureWithTime" + SampleTime "0" + } + Block { + BlockType Scope + Name "Scope4" + SID "1530" + Ports [2] + Position [1545, 349, 1605, 431] + ZOrder -19 + ShowName off + Floating off + Location [5, 43, 1601, 890] + Open off + NumInputPorts "2" + ZoomMode "yonly" + List { + ListType AxesTitles + axes1 "AC Load Voltage Phase to Phase, Vab (V)" + axes2 "RMS" + } + List { + ListType ScopeGraphics + FigureColor "[1 1 1]" + AxesColor "[1 1 1]" + AxesTickColor "[0 0 0]" + LineColors "[0.0431372549019608 0.517647058823529 0.780392156862745;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" + LineStyles "-|-|-|-|-|-" + LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" + MarkerStyles "none|none|none|none|none|none" + } + ShowLegends off + TimeRange "4" + YMin "-100~-5" + YMax "80~5" + SaveName "ScopeData12" + DataFormat "StructureWithTime" + LimitDataPoints off + SampleTime "0" + } + Block { + BlockType SubSystem + Name "Subsystem" + SID "1724" + Ports [0, 1] + Position [1135, 68, 1190, 102] + ZOrder -74 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem" + Location [0, 0, 1600, 876] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType From + Name "From15" + SID "1717" + Position [25, 26, 90, 54] + ZOrder -8 + ShowName off + GotoTag "Vab" + TagVisibility "global" + } + Block { + BlockType From + Name "From16" + SID "1718" + Position [25, 51, 90, 79] + ZOrder -8 + ShowName off + GotoTag "Vbc" + TagVisibility "global" + } + Block { + BlockType From + Name "From17" + SID "1719" + Position [25, 76, 90, 104] + ZOrder -8 + ShowName off + GotoTag "Vca" + TagVisibility "global" + } + Block { + BlockType Mux + Name "Mux" + SID "1716" + Ports [3, 1] + Position [270, 25, 275, 105] + ZOrder -11 + ShowName off + Inputs "3" + DisplayOption "bar" + } + Block { + BlockType Outport + Name "Vabc" + SID "1725" + Position [380, 58, 410, 72] + ZOrder -12 + IconDisplay "Port number" + } + Line { + SrcBlock "Mux" + SrcPort 1 + DstBlock "Vabc" + DstPort 1 + } + Line { + SrcBlock "From15" + SrcPort 1 + DstBlock "Mux" + DstPort 1 + } + Line { + SrcBlock "From16" + SrcPort 1 + DstBlock "Mux" + DstPort 2 + } + Line { + SrcBlock "From17" + SrcPort 1 + DstBlock "Mux" + DstPort 3 + } + } + } + Block { + BlockType SubSystem + Name "Subsystem1" + SID "2926" + Ports [1] + Position [715, 461, 750, 499] + ZOrder 15 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem1" + Location [982, 630, 1259, 1002] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Pbus" + SID "2927" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "2928" + Position [120, 31, 180, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Pbus" + TagVisibility "global" + } + Block { + BlockType Reference + Name "LPF vq11" + SID "2929" + Ports [1, 1] + Position [100, 134, 130, 166] + ZOrder -21 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "2930" + Ports [1] + Position [155, 75, 215, 105] + ZOrder -22 + ShowName off + VariableName "Pbus" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ToWorkspace + Name "To Workspace2" + SID "2931" + Ports [1] + Position [155, 135, 215, 165] + ZOrder -23 + ShowName off + VariableName "Pbus1" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Pbus" + SrcPort 1 + Points [25, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + Branch { + DstBlock "To Workspace1" + DstPort 1 + } + Branch { + DstBlock "LPF vq11" + DstPort 1 + } + } + } + Line { + SrcBlock "LPF vq11" + SrcPort 1 + DstBlock "To Workspace2" + DstPort 1 + } + } + } + Block { + BlockType SubSystem + Name "Subsystem10" + SID "2103" + Ports [1] + Position [1560, 765, 1595, 805] + ZOrder -76 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem10" + Location [-8, -8, 1608, 908] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "f" + SID "2104" + Position [15, 43, 45, 57] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Reference + Name "LPF vq7" + SID "2105" + Ports [1, 1] + Position [100, 137, 120, 163] + ZOrder -2 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "2106" + Ports [1] + Position [120, 70, 180, 100] + ZOrder -3 + ShowName off + VariableName "fabc_real" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ToWorkspace + Name "To Workspace2" + SID "2107" + Ports [1] + Position [140, 135, 200, 165] + ZOrder -4 + ShowName off + VariableName "fabc_real_fil" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ZeroOrderHold + Name "Zero-Order\nHold" + SID "2108" + Position [65, 35, 80, 65] + ZOrder -5 + ShowName off + SampleTime "5e-6" + } + Line { + SrcBlock "f" + SrcPort 1 + DstBlock "Zero-Order\nHold" + DstPort 1 + } + Line { + SrcBlock "LPF vq7" + SrcPort 1 + DstBlock "To Workspace2" + DstPort 1 + } + Line { + SrcBlock "Zero-Order\nHold" + SrcPort 1 + Points [0, 35] + Branch { + DstBlock "To Workspace1" + DstPort 1 + } + Branch { + DstBlock "LPF vq7" + DstPort 1 + } + } + } + } + Block { + BlockType SubSystem + Name "Subsystem11" + SID "2469" + Ports [] + Position [1480, 205, 1606, 290] + ZOrder -77 + NamePlacement "alternate" + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + Object { + $PropName "MaskObject" + $ObjectID 31 + $ClassName "Simulink.Mask" + Display "disp('Additional Load Meas.')" + } + System { + Name "Subsystem11" + Location [1157, 724, 1908, 1157] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType From + Name "From14" + SID "2470" + Position [110, 36, 175, 64] + ZOrder -8 + ShowName off + GotoTag "Vabc3" + TagVisibility "global" + } + Block { + BlockType From + Name "From17" + SID "2471" + Position [450, 36, 515, 64] + ZOrder -8 + ShowName off + GotoTag "Vabc2" + TagVisibility "global" + } + Block { + BlockType From + Name "From18" + SID "2472" + Position [110, 76, 175, 104] + ZOrder -8 + ShowName off + GotoTag "Iabc3" + TagVisibility "global" + } + Block { + BlockType From + Name "From19" + SID "2473" + Position [450, 76, 515, 104] + ZOrder -8 + ShowName off + GotoTag "Iabc2" + TagVisibility "global" + } + Block { + BlockType Reference + Name "LPF vq2" + SID "2474" + Ports [1, 1] + Position [525, 147, 555, 173] + ZOrder -12 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType Reference + Name "LPF vq3" + SID "2475" + Ports [1, 1] + Position [525, 192, 555, 218] + ZOrder -13 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType Reference + Name "LPF vq8" + SID "2476" + Ports [1, 1] + Position [190, 147, 220, 173] + ZOrder -14 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType Reference + Name "LPF vq9" + SID "2477" + Ports [1, 1] + Position [190, 192, 220, 218] + ZOrder -15 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType Scope + Name "Load Measurements1" + SID "2478" + Ports [2] + Position [605, 29, 665, 111] + ZOrder -19 + Floating off + Location [534, 255, 1318, 1051] + Open off + NumInputPorts "2" + ZoomMode "yonly" + List { + ListType AxesTitles + axes1 "Phase to Ground Load Voltages, Vabc (V)" + axes2 "Load Currents, Iabc (A)" + } + ShowLegends off + TimeRange "1" + YMin "-450~-25" + YMax "450~25" + SaveName "ScopeData18" + DataFormat "StructureWithTime" + LimitDataPoints off + SampleTime "0" + } + Block { + BlockType Scope + Name "Load Measurements3" + SID "2479" + Ports [2] + Position [270, 29, 330, 111] + ZOrder -19 + Floating off + Location [534, 255, 1318, 1051] + Open off + NumInputPorts "2" + ZoomMode "yonly" + List { + ListType AxesTitles + axes1 "Phase to Ground Load Voltages, Vabc (V)" + axes2 "Load Currents, Iabc (A)" + } + ShowLegends off + TimeRange "1" + YMin "-200~-12.5" + YMax "200~15" + SaveName "ScopeData19" + DataFormat "StructureWithTime" + LimitDataPoints off + SampleTime "0" + } + Block { + BlockType SubSystem + Name "Load Power Calculation1" + SID "2480" + Ports [0, 2] + Position [360, 139, 480, 226] + ZOrder -21 + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Load Power Calculation1" + Location [504, 262, 1168, 890] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Constant + Name "Constant" + SID "2481" + Position [355, 60, 385, 90] + ZOrder -1 + ShowName off + Value "3/2" + } + Block { + BlockType Constant + Name "Constant1" + SID "2482" + Position [355, 235, 385, 265] + ZOrder -2 + ShowName off + Value "3/2" + } + Block { + BlockType From + Name "From1" + SID "2483" + Position [50, 71, 115, 99] + ZOrder -8 + ShowName off + GotoTag "id2" + } + Block { + BlockType From + Name "From11" + SID "2484" + Position [50, 36, 115, 64] + ZOrder -8 + ShowName off + GotoTag "vd2" + } + Block { + BlockType From + Name "From2" + SID "2485" + Position [50, 121, 115, 149] + ZOrder -8 + ShowName off + GotoTag "vq2" + } + Block { + BlockType From + Name "From3" + SID "2486" + Position [50, 156, 115, 184] + ZOrder -8 + ShowName off + GotoTag "iq2" + } + Block { + BlockType From + Name "From4" + SID "2487" + Position [50, 246, 115, 274] + ZOrder -8 + ShowName off + GotoTag "id2" + } + Block { + BlockType From + Name "From5" + SID "2488" + Position [50, 211, 115, 239] + ZOrder -8 + ShowName off + GotoTag "vq2" + } + Block { + BlockType From + Name "From6" + SID "2489" + Position [50, 296, 115, 324] + ZOrder -8 + ShowName off + GotoTag "vd2" + } + Block { + BlockType From + Name "From7" + SID "2490" + Position [50, 331, 115, 359] + ZOrder -8 + ShowName off + GotoTag "iq2" + } + Block { + BlockType Product + Name "Product1" + SID "2491" + Ports [2, 1] + Position [205, 31, 235, 104] + ZOrder -16 + ShowName off + InputSameDT off + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Product + Name "Product2" + SID "2492" + Ports [2, 1] + Position [205, 116, 235, 189] + ZOrder -17 + ShowName off + InputSameDT off + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Product + Name "Product3" + SID "2493" + Ports [2, 1] + Position [430, 56, 460, 129] + ZOrder -18 + ShowName off + InputSameDT off + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Product + Name "Product4" + SID "2494" + Ports [2, 1] + Position [205, 206, 235, 279] + ZOrder -19 + ShowName off + InputSameDT off + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Product + Name "Product5" + SID "2495" + Ports [2, 1] + Position [205, 291, 235, 364] + ZOrder -20 + ShowName off + InputSameDT off + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Product + Name "Product6" + SID "2496" + Ports [2, 1] + Position [430, 231, 460, 304] + ZOrder -21 + ShowName off + InputSameDT off + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType SubSystem + Name "Subsystem1" + SID "2497" + Ports [1] + Position [515, 326, 550, 364] + ZOrder -22 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem1" + Location [982, 611, 1438, 973] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Qacload" + SID "2498" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "2499" + Position [290, 31, 350, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Qacload3" + TagVisibility "global" + } + Block { + BlockType Reference + Name "LPF vq7" + SID "2500" + Ports [1, 1] + Position [235, 77, 265, 103] + ZOrder -21 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "2501" + Ports [1] + Position [290, 75, 350, 105] + ZOrder -22 + ShowName off + VariableName "Qacload3" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ToWorkspace + Name "To Workspace2" + SID "2502" + Ports [1] + Position [290, 130, 350, 160] + ZOrder -23 + ShowName off + VariableName "Qacload_3" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ZeroOrderHold + Name "Zero-Order\nHold" + SID "2503" + Position [125, 30, 160, 60] + ZOrder -24 + SampleTime "5e-6" + } + Line { + SrcBlock "Qacload" + SrcPort 1 + DstBlock "Zero-Order\nHold" + DstPort 1 + } + Line { + SrcBlock "Zero-Order\nHold" + SrcPort 1 + Points [55, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + Branch { + Points [0, 55] + DstBlock "To Workspace2" + DstPort 1 + } + Branch { + DstBlock "LPF vq7" + DstPort 1 + } + } + } + Line { + SrcBlock "LPF vq7" + SrcPort 1 + DstBlock "To Workspace1" + DstPort 1 + } + } + } + Block { + BlockType SubSystem + Name "Subsystem2" + SID "2504" + Ports [1] + Position [515, 151, 550, 189] + ZOrder -23 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem2" + Location [982, 611, 1407, 980] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Pload" + SID "2505" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "2506" + Position [265, 31, 325, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Pacload3" + TagVisibility "global" + } + Block { + BlockType Reference + Name "LPF vq7" + SID "2507" + Ports [1, 1] + Position [215, 77, 245, 103] + ZOrder -21 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "2508" + Ports [1] + Position [265, 75, 325, 105] + ZOrder -22 + ShowName off + VariableName "Pacload3" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ToWorkspace + Name "To Workspace2" + SID "2509" + Ports [1] + Position [265, 130, 325, 160] + ZOrder -23 + ShowName off + VariableName "Pacload_3" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ZeroOrderHold + Name "Zero-Order\nHold" + SID "2510" + Position [110, 30, 145, 60] + ZOrder -24 + SampleTime "5e-6" + } + Line { + SrcBlock "Pload" + SrcPort 1 + DstBlock "Zero-Order\nHold" + DstPort 1 + } + Line { + SrcBlock "Zero-Order\nHold" + SrcPort 1 + Points [45, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + Branch { + Points [0, 55] + DstBlock "To Workspace2" + DstPort 1 + } + Branch { + DstBlock "LPF vq7" + DstPort 1 + } + } + } + Line { + SrcBlock "LPF vq7" + SrcPort 1 + DstBlock "To Workspace1" + DstPort 1 + } + } + } + Block { + BlockType Sum + Name "Sum" + SID "2511" + Ports [2, 1] + Position [295, 100, 315, 120] + ZOrder -24 + ShowName off + IconShape "round" + Inputs "+|+" + InputSameDT off + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Sum + Name "Sum1" + SID "2512" + Ports [2, 1] + Position [295, 275, 315, 295] + ZOrder -25 + ShowName off + IconShape "round" + Inputs "+|-" + InputSameDT off + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Outport + Name "Pload" + SID "2513" + Position [520, 88, 550, 102] + ZOrder -26 + IconDisplay "Port number" + } + Block { + BlockType Outport + Name "Qload" + SID "2514" + Position [520, 263, 550, 277] + ZOrder -27 + Port "2" + IconDisplay "Port number" + } + Line { + SrcBlock "Product6" + SrcPort 1 + Points [20, 0] + Branch { + DstBlock "Qload" + DstPort 1 + } + Branch { + Points [0, 75] + DstBlock "Subsystem1" + DstPort 1 + } + } + Line { + SrcBlock "Constant1" + SrcPort 1 + DstBlock "Product6" + DstPort 1 + } + Line { + SrcBlock "Sum1" + SrcPort 1 + DstBlock "Product6" + DstPort 2 + } + Line { + SrcBlock "Product5" + SrcPort 1 + Points [65, 0] + DstBlock "Sum1" + DstPort 2 + } + Line { + SrcBlock "Product4" + SrcPort 1 + Points [65, 0] + DstBlock "Sum1" + DstPort 1 + } + Line { + SrcBlock "From7" + SrcPort 1 + DstBlock "Product5" + DstPort 2 + } + Line { + SrcBlock "From6" + SrcPort 1 + DstBlock "Product5" + DstPort 1 + } + Line { + SrcBlock "From4" + SrcPort 1 + DstBlock "Product4" + DstPort 2 + } + Line { + SrcBlock "From5" + SrcPort 1 + DstBlock "Product4" + DstPort 1 + } + Line { + SrcBlock "Product3" + SrcPort 1 + Points [20, 0] + Branch { + DstBlock "Pload" + DstPort 1 + } + Branch { + Points [0, 75] + DstBlock "Subsystem2" + DstPort 1 + } + } + Line { + SrcBlock "Constant" + SrcPort 1 + DstBlock "Product3" + DstPort 1 + } + Line { + SrcBlock "Sum" + SrcPort 1 + DstBlock "Product3" + DstPort 2 + } + Line { + SrcBlock "Product2" + SrcPort 1 + Points [65, 0] + DstBlock "Sum" + DstPort 2 + } + Line { + SrcBlock "Product1" + SrcPort 1 + Points [65, 0] + DstBlock "Sum" + DstPort 1 + } + Line { + SrcBlock "From3" + SrcPort 1 + DstBlock "Product2" + DstPort 2 + } + Line { + SrcBlock "From2" + SrcPort 1 + DstBlock "Product2" + DstPort 1 + } + Line { + SrcBlock "From1" + SrcPort 1 + DstBlock "Product1" + DstPort 2 + } + Line { + SrcBlock "From11" + SrcPort 1 + DstBlock "Product1" + DstPort 1 + } + } + } + Block { + BlockType SubSystem + Name "Load Power Calculation2" + SID "2515" + Ports [0, 2] + Position [25, 139, 145, 226] + ZOrder -22 + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Load Power Calculation2" + Location [501, 315, 1149, 917] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Constant + Name "Constant" + SID "2516" + Position [355, 60, 385, 90] + ZOrder -1 + ShowName off + Value "3/2" + } + Block { + BlockType Constant + Name "Constant1" + SID "2517" + Position [355, 235, 385, 265] + ZOrder -2 + ShowName off + Value "3/2" + } + Block { + BlockType From + Name "From1" + SID "2518" + Position [50, 71, 115, 99] + ZOrder -8 + ShowName off + GotoTag "id3" + } + Block { + BlockType From + Name "From11" + SID "2519" + Position [50, 36, 115, 64] + ZOrder -8 + ShowName off + GotoTag "vd3" + } + Block { + BlockType From + Name "From2" + SID "2520" + Position [50, 121, 115, 149] + ZOrder -8 + ShowName off + GotoTag "vq3" + } + Block { + BlockType From + Name "From3" + SID "2521" + Position [50, 156, 115, 184] + ZOrder -8 + ShowName off + GotoTag "iq3" + } + Block { + BlockType From + Name "From4" + SID "2522" + Position [50, 246, 115, 274] + ZOrder -8 + ShowName off + GotoTag "id3" + } + Block { + BlockType From + Name "From5" + SID "2523" + Position [50, 211, 115, 239] + ZOrder -8 + ShowName off + GotoTag "vq3" + } + Block { + BlockType From + Name "From6" + SID "2524" + Position [50, 296, 115, 324] + ZOrder -8 + ShowName off + GotoTag "vd3" + } + Block { + BlockType From + Name "From7" + SID "2525" + Position [50, 331, 115, 359] + ZOrder -8 + ShowName off + GotoTag "iq3" + } + Block { + BlockType Product + Name "Product1" + SID "2526" + Ports [2, 1] + Position [205, 31, 235, 104] + ZOrder -16 + ShowName off + InputSameDT off + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Product + Name "Product2" + SID "2527" + Ports [2, 1] + Position [205, 116, 235, 189] + ZOrder -17 + ShowName off + InputSameDT off + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Product + Name "Product3" + SID "2528" + Ports [2, 1] + Position [430, 56, 460, 129] + ZOrder -18 + ShowName off + InputSameDT off + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Product + Name "Product4" + SID "2529" + Ports [2, 1] + Position [205, 206, 235, 279] + ZOrder -19 + ShowName off + InputSameDT off + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Product + Name "Product5" + SID "2530" + Ports [2, 1] + Position [205, 291, 235, 364] + ZOrder -20 + ShowName off + InputSameDT off + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Product + Name "Product6" + SID "2531" + Ports [2, 1] + Position [430, 231, 460, 304] + ZOrder -21 + ShowName off + InputSameDT off + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType SubSystem + Name "Subsystem1" + SID "2532" + Ports [1] + Position [515, 341, 550, 379] + ZOrder -22 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem1" + Location [982, 611, 1438, 973] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Qacload" + SID "2533" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "2534" + Position [290, 31, 350, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Qacload2" + TagVisibility "global" + } + Block { + BlockType Reference + Name "LPF vq7" + SID "2535" + Ports [1, 1] + Position [235, 77, 265, 103] + ZOrder -21 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "2536" + Ports [1] + Position [290, 75, 350, 105] + ZOrder -22 + ShowName off + VariableName "Qacload2" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ToWorkspace + Name "To Workspace2" + SID "2537" + Ports [1] + Position [290, 130, 350, 160] + ZOrder -23 + ShowName off + VariableName "Qacload_2" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ZeroOrderHold + Name "Zero-Order\nHold" + SID "2538" + Position [125, 30, 160, 60] + ZOrder -24 + SampleTime "5e-6" + } + Line { + SrcBlock "Qacload" + SrcPort 1 + DstBlock "Zero-Order\nHold" + DstPort 1 + } + Line { + SrcBlock "Zero-Order\nHold" + SrcPort 1 + Points [55, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + Branch { + Points [0, 55] + DstBlock "To Workspace2" + DstPort 1 + } + Branch { + DstBlock "LPF vq7" + DstPort 1 + } + } + } + Line { + SrcBlock "LPF vq7" + SrcPort 1 + DstBlock "To Workspace1" + DstPort 1 + } + } + } + Block { + BlockType SubSystem + Name "Subsystem2" + SID "2539" + Ports [1] + Position [515, 166, 550, 204] + ZOrder -23 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem2" + Location [982, 611, 1407, 980] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Pload" + SID "2540" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "2541" + Position [265, 31, 325, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Pacload2" + TagVisibility "global" + } + Block { + BlockType Reference + Name "LPF vq7" + SID "2542" + Ports [1, 1] + Position [215, 77, 245, 103] + ZOrder -21 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "2543" + Ports [1] + Position [265, 75, 325, 105] + ZOrder -22 + ShowName off + VariableName "Pacload2" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ToWorkspace + Name "To Workspace2" + SID "2544" + Ports [1] + Position [265, 130, 325, 160] + ZOrder -23 + ShowName off + VariableName "Pacload_2" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ZeroOrderHold + Name "Zero-Order\nHold" + SID "2545" + Position [110, 30, 145, 60] + ZOrder -24 + SampleTime "5e-6" + } + Line { + SrcBlock "Pload" + SrcPort 1 + DstBlock "Zero-Order\nHold" + DstPort 1 + } + Line { + SrcBlock "Zero-Order\nHold" + SrcPort 1 + Points [45, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + Branch { + Points [0, 55] + DstBlock "To Workspace2" + DstPort 1 + } + Branch { + DstBlock "LPF vq7" + DstPort 1 + } + } + } + Line { + SrcBlock "LPF vq7" + SrcPort 1 + DstBlock "To Workspace1" + DstPort 1 + } + } + } + Block { + BlockType Sum + Name "Sum" + SID "2546" + Ports [2, 1] + Position [295, 100, 315, 120] + ZOrder -24 + ShowName off + IconShape "round" + Inputs "+|+" + InputSameDT off + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Sum + Name "Sum1" + SID "2547" + Ports [2, 1] + Position [295, 275, 315, 295] + ZOrder -25 + ShowName off + IconShape "round" + Inputs "+|-" + InputSameDT off + OutDataTypeStr "Inherit: Inherit via internal rule" + SaturateOnIntegerOverflow off + } + Block { + BlockType Outport + Name "Pload" + SID "2548" + Position [520, 88, 550, 102] + ZOrder -26 + IconDisplay "Port number" + } + Block { + BlockType Outport + Name "Qload" + SID "2549" + Position [520, 263, 550, 277] + ZOrder -27 + Port "2" + IconDisplay "Port number" + } + Line { + SrcBlock "From11" + SrcPort 1 + DstBlock "Product1" + DstPort 1 + } + Line { + SrcBlock "From1" + SrcPort 1 + DstBlock "Product1" + DstPort 2 + } + Line { + SrcBlock "From2" + SrcPort 1 + DstBlock "Product2" + DstPort 1 + } + Line { + SrcBlock "From3" + SrcPort 1 + DstBlock "Product2" + DstPort 2 + } + Line { + SrcBlock "Product1" + SrcPort 1 + Points [65, 0] + DstBlock "Sum" + DstPort 1 + } + Line { + SrcBlock "Product2" + SrcPort 1 + Points [65, 0] + DstBlock "Sum" + DstPort 2 + } + Line { + SrcBlock "Sum" + SrcPort 1 + DstBlock "Product3" + DstPort 2 + } + Line { + SrcBlock "Constant" + SrcPort 1 + DstBlock "Product3" + DstPort 1 + } + Line { + SrcBlock "Product3" + SrcPort 1 + Points [15, 0] + Branch { + DstBlock "Pload" + DstPort 1 + } + Branch { + Points [0, 90] + DstBlock "Subsystem2" + DstPort 1 + } + } + Line { + SrcBlock "From5" + SrcPort 1 + DstBlock "Product4" + DstPort 1 + } + Line { + SrcBlock "From4" + SrcPort 1 + DstBlock "Product4" + DstPort 2 + } + Line { + SrcBlock "From6" + SrcPort 1 + DstBlock "Product5" + DstPort 1 + } + Line { + SrcBlock "From7" + SrcPort 1 + DstBlock "Product5" + DstPort 2 + } + Line { + SrcBlock "Product4" + SrcPort 1 + Points [65, 0] + DstBlock "Sum1" + DstPort 1 + } + Line { + SrcBlock "Product5" + SrcPort 1 + Points [65, 0] + DstBlock "Sum1" + DstPort 2 + } + Line { + SrcBlock "Sum1" + SrcPort 1 + DstBlock "Product6" + DstPort 2 + } + Line { + SrcBlock "Constant1" + SrcPort 1 + DstBlock "Product6" + DstPort 1 + } + Line { + SrcBlock "Product6" + SrcPort 1 + Points [15, 0] + Branch { + DstBlock "Qload" + DstPort 1 + } + Branch { + Points [0, 90] + DstBlock "Subsystem1" + DstPort 1 + } + } + } + } + Block { + BlockType Scope + Name "Load Powers1" + SID "2550" + Ports [2] + Position [605, 139, 670, 226] + ZOrder -19 + Floating off + Location [958, 288, 1742, 1084] + Open off + NumInputPorts "2" + ZoomMode "yonly" + List { + ListType AxesTitles + axes1 "Load Active Power, Pload (W)" + axes2 "Load Reactive power, Qload (VAr)" + } + ShowLegends off + TimeRange "1" + YMin "9320~3722.5" + YMax "9362.5~3750" + SaveName "ScopeData20" + DataFormat "StructureWithTime" + LimitDataPoints off + SampleTime "0" + } + Block { + BlockType Scope + Name "Load Powers2" + SID "2551" + Ports [2] + Position [280, 139, 345, 226] + ZOrder -19 + Floating off + Location [469, 210, 1253, 1006] + Open off + NumInputPorts "2" + ZoomMode "yonly" + List { + ListType AxesTitles + axes1 "Load Active Power, Pload (W)" + axes2 "Load Reactive power, Qload (VAr)" + } + ShowLegends off + TimeRange "1 " + YMin "3330~9.6e-007" + YMax "3339.5~1.06e-006" + SaveName "ScopeData21" + DataFormat "StructureWithTime" + LimitDataPoints off + SampleTime "0" + } + Line { + SrcBlock "From17" + SrcPort 1 + DstBlock "Load Measurements1" + DstPort 1 + } + Line { + SrcBlock "From19" + SrcPort 1 + DstBlock "Load Measurements1" + DstPort 2 + } + Line { + SrcBlock "Load Power Calculation1" + SrcPort 1 + DstBlock "LPF vq2" + DstPort 1 + } + Line { + SrcBlock "Load Power Calculation1" + SrcPort 2 + DstBlock "LPF vq3" + DstPort 1 + } + Line { + SrcBlock "LPF vq2" + SrcPort 1 + DstBlock "Load Powers1" + DstPort 1 + } + Line { + SrcBlock "LPF vq3" + SrcPort 1 + DstBlock "Load Powers1" + DstPort 2 + } + Line { + SrcBlock "From14" + SrcPort 1 + DstBlock "Load Measurements3" + DstPort 1 + } + Line { + SrcBlock "From18" + SrcPort 1 + DstBlock "Load Measurements3" + DstPort 2 + } + Line { + SrcBlock "Load Power Calculation2" + SrcPort 1 + DstBlock "LPF vq8" + DstPort 1 + } + Line { + SrcBlock "Load Power Calculation2" + SrcPort 2 + DstBlock "LPF vq9" + DstPort 1 + } + Line { + SrcBlock "LPF vq8" + SrcPort 1 + DstBlock "Load Powers2" + DstPort 1 + } + Line { + SrcBlock "LPF vq9" + SrcPort 1 + DstBlock "Load Powers2" + DstPort 2 + } + } + } + Block { + BlockType SubSystem + Name "Subsystem3" + SID "2938" + Ports [1] + Position [715, 646, 750, 684] + ZOrder 13 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem3" + Location [982, 630, 1261, 993] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Pdc" + SID "2939" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "2940" + Position [120, 31, 180, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Pdc" + TagVisibility "global" + } + Block { + BlockType Reference + Name "LPF vq7" + SID "2941" + Ports [1, 1] + Position [100, 137, 120, 163] + ZOrder -21 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "2942" + Ports [1] + Position [120, 75, 180, 105] + ZOrder -22 + ShowName off + VariableName "Pdc" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ToWorkspace + Name "To Workspace2" + SID "2943" + Ports [1] + Position [140, 135, 200, 165] + ZOrder -23 + ShowName off + VariableName "Pdc1" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Pdc" + SrcPort 1 + Points [25, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 0; 0, 40] + Branch { + Points [0, 5] + DstBlock "To Workspace1" + DstPort 1 + } + Branch { + DstBlock "LPF vq7" + DstPort 1 + } + } + } + Line { + SrcBlock "LPF vq7" + SrcPort 1 + DstBlock "To Workspace2" + DstPort 1 + } + } + } + Block { + BlockType SubSystem + Name "Subsystem4" + SID "700" + Ports [1] + Position [315, 231, 350, 269] + ZOrder -80 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem4" + Location [982, 630, 1273, 997] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Ppv" + SID "701" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "702" + Position [120, 31, 180, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Ppv" + TagVisibility "global" + } + Block { + BlockType Reference + Name "LPF vq7" + SID "1807" + Ports [1, 1] + Position [100, 132, 130, 158] + ZOrder -21 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "703" + Ports [1] + Position [120, 75, 180, 105] + ZOrder -22 + ShowName off + VariableName "Ppv" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ToWorkspace + Name "To Workspace2" + SID "1806" + Ports [1] + Position [150, 130, 210, 160] + ZOrder -23 + ShowName off + VariableName "Ppv1" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Ppv" + SrcPort 1 + Points [25, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 0; 0, 45] + Branch { + DstBlock "To Workspace1" + DstPort 1 + } + Branch { + DstBlock "LPF vq7" + DstPort 1 + } + } + } + Line { + SrcBlock "LPF vq7" + SrcPort 1 + DstBlock "To Workspace2" + DstPort 1 + } + } + } + Block { + BlockType SubSystem + Name "Subsystem5" + SID "1377" + Ports [1] + Position [320, 621, 355, 659] + ZOrder -81 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem5" + Location [-8, -8, 1608, 908] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Pbat" + SID "1378" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "1379" + Position [120, 31, 180, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Pbat" + TagVisibility "global" + } + Block { + BlockType Reference + Name "LPF vq7" + SID "1809" + Ports [1, 1] + Position [95, 137, 125, 163] + ZOrder -21 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "1380" + Ports [1] + Position [120, 75, 180, 105] + ZOrder -22 + ShowName off + VariableName "Pbat" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ToWorkspace + Name "To Workspace2" + SID "1808" + Ports [1] + Position [150, 135, 210, 165] + ZOrder -23 + ShowName off + VariableName "Pbat1" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Pbat" + SrcPort 1 + Points [20, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + Branch { + DstBlock "To Workspace1" + DstPort 1 + } + Branch { + DstBlock "LPF vq7" + DstPort 1 + } + } + } + Line { + SrcBlock "LPF vq7" + SrcPort 1 + DstBlock "To Workspace2" + DstPort 1 + } + } + } + Block { + BlockType SubSystem + Name "Subsystem6" + SID "1531" + Ports [1] + Position [1555, 441, 1590, 479] + ZOrder -82 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem6" + Location [982, 630, 1260, 946] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Vab_rms" + SID "1532" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "1533" + Position [120, 31, 180, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Vab_rms" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "1534" + Ports [1] + Position [120, 75, 180, 105] + ZOrder -21 + ShowName off + VariableName "Vab_rms" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Vab_rms" + SrcPort 1 + Points [25, 0] + Branch { + Points [0, 0; 0, 45] + DstBlock "To Workspace1" + DstPort 1 + } + Branch { + DstBlock "Goto2" + DstPort 1 + } + } + } + } + Block { + BlockType SubSystem + Name "Subsystem7" + SID "1535" + Ports [1] + Position [1555, 596, 1590, 634] + ZOrder -83 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem7" + Location [-8, 0, 1604, 876] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Va_rms" + SID "1536" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "1537" + Position [120, 31, 180, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Va_rms" + TagVisibility "global" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "1538" + Ports [1] + Position [120, 75, 180, 105] + ZOrder -21 + ShowName off + VariableName "Va_rms" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Va_rms" + SrcPort 1 + Points [25, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 45] + DstBlock "To Workspace1" + DstPort 1 + } + } + } + } + Block { + BlockType SubSystem + Name "Subsystem8" + SID "2944" + Ports [1] + Position [715, 846, 750, 884] + ZOrder 12 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem8" + Location [982, 630, 1258, 991] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType Inport + Name "Pdcinv" + SID "2945" + Position [25, 38, 55, 52] + ZOrder -1 + IconDisplay "Port number" + } + Block { + BlockType Goto + Name "Goto2" + SID "2946" + Position [120, 31, 180, 59] + ZOrder -20 + NamePlacement "alternate" + ShowName off + GotoTag "Pdcinv" + TagVisibility "global" + } + Block { + BlockType Reference + Name "LPF vq7" + SID "2947" + Ports [1, 1] + Position [100, 137, 125, 163] + ZOrder -21 + ShowName off + LibraryVersion "1.664" + FontName "Verdana" + FontSize 11 + SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\n1st-Order\nFilter" + SourceType "Discrete 1st-Order Filter" + FilterType "Lowpass" + Tc "10e-3" + Ts "5e-6" + Initialize off + Vac_Init "[0.8 -25 60]" + Vdc_Init "0" + PlotResponse off + param1 "[1 100 0.1]" + } + Block { + BlockType ToWorkspace + Name "To Workspace1" + SID "2948" + Ports [1] + Position [120, 75, 180, 105] + ZOrder -22 + ShowName off + VariableName "Pdcinv" + MaxDataPoints "inf" + SampleTime "-1" + } + Block { + BlockType ToWorkspace + Name "To Workspace2" + SID "2949" + Ports [1] + Position [145, 135, 205, 165] + ZOrder -23 + ShowName off + VariableName "Pdcinv1" + MaxDataPoints "inf" + SampleTime "-1" + } + Line { + SrcBlock "Pdcinv" + SrcPort 1 + Points [25, 0] + Branch { + DstBlock "Goto2" + DstPort 1 + } + Branch { + Points [0, 0; 0, 45] + Branch { + DstBlock "To Workspace1" + DstPort 1 + } + Branch { + DstBlock "LPF vq7" + DstPort 1 + } + } + } + Line { + SrcBlock "LPF vq7" + SrcPort 1 + DstBlock "To Workspace2" + DstPort 1 + } + } + } + Block { + BlockType SubSystem + Name "Subsystem9" + SID "1726" + Ports [0, 1] + Position [1135, 108, 1190, 142] + ZOrder -85 + ShowName off + MinAlgLoopOccurrences off + PropExecContextOutsideSubsystem off + RTWSystemCode "Auto" + FunctionWithSeparateData off + Opaque off + RequestExecContextInheritance off + MaskHideContents off + System { + Name "Subsystem9" + Location [-8, 0, 1608, 916] + Open off + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + Block { + BlockType From + Name "From18" + SID "1720" + Position [25, 26, 90, 54] + ZOrder -8 + ShowName off + GotoTag "Ia" + TagVisibility "global" + } + Block { + BlockType From + Name "From23" + SID "1721" + Position [25, 51, 90, 79] + ZOrder -8 + ShowName off + GotoTag "Ib" + TagVisibility "global" + } + Block { + BlockType From + Name "From24" + SID "1722" + Position [25, 76, 90, 104] + ZOrder -8 + ShowName off + GotoTag "Ic" + TagVisibility "global" + } + Block { + BlockType Mux + Name "Mux1" + SID "1723" + Ports [3, 1] + Position [120, 25, 125, 105] + ZOrder -11 + ShowName off + Inputs "3" + DisplayOption "bar" + } + Block { + BlockType Outport + Name "Iabc" + SID "1727" + Position [150, 58, 180, 72] + ZOrder -12 + IconDisplay "Port number" + } + Line { + SrcBlock "From18" + SrcPort 1 + DstBlock "Mux1" + DstPort 1 + } + Line { + SrcBlock "From23" + SrcPort 1 + DstBlock "Mux1" + DstPort 2 + } + Line { + SrcBlock "From24" + SrcPort 1 + DstBlock "Mux1" + DstPort 3 + } + Line { + SrcBlock "Mux1" + SrcPort 1 + DstBlock "Iabc" + DstPort 1 + } + } + } + Block { + BlockType ToWorkspace + Name "To Workspace" + SID "1540" + Ports [1] + Position [115, 894, 160, 916] + ZOrder -7 + ShowName off + VariableName "t" + MaxDataPoints "inf" + SampleTime "5e-6" + } + Line { + SrcBlock "Product" + SrcPort 1 + Points [15, 0] + Branch { + DstBlock "PV Array Measurements" + DstPort 3 + } + Branch { + Points [0, 75] + DstBlock "Subsystem4" + DstPort 1 + } + } + Line { + Labels [0, 0] + SrcBlock "From4" + SrcPort 1 + DstBlock "LPF vq2" + DstPort 1 + } + Line { + Labels [0, 0] + SrcBlock "From5" + SrcPort 1 + Points [60, 0] + Branch { + DstBlock "PV Array Measurements" + DstPort 2 + } + Branch { + Points [0, 30] + DstBlock "Product" + DstPort 2 + } + } + Line { + Labels [0, 0] + SrcBlock "From9" + SrcPort 1 + DstBlock "PV Array Measurements" + DstPort 4 + } + Line { + SrcBlock "From7" + SrcPort 1 + Points [30, 0] + Branch { + DstBlock "Battery Measurements" + DstPort 2 + } + Branch { + Points [0, 50] + DstBlock "Product4" + DstPort 1 + } + } + Line { + SrcBlock "From10" + SrcPort 1 + Points [15, 0] + Branch { + DstBlock "Battery Measurements" + DstPort 3 + } + Branch { + Points [0, 35] + DstBlock "Product4" + DstPort 2 + } + } + Line { + SrcBlock "Product4" + SrcPort 1 + Points [20, 0] + Branch { + DstBlock "Battery Measurements" + DstPort 4 + } + Branch { + Points [0, 55] + DstBlock "Subsystem5" + DstPort 1 + } + } + Line { + SrcBlock "From21" + SrcPort 1 + Points [5, 0] + Branch { + DstBlock "Scope11" + DstPort 1 + } + Branch { + Points [0, 40] + DstBlock "RMS1" + DstPort 1 + } + } + Line { + SrcBlock "RMS1" + SrcPort 1 + DstBlock "LPF1" + DstPort 1 + } + Line { + SrcBlock "From20" + SrcPort 1 + Points [10, 0] + Branch { + DstBlock "Scope4" + DstPort 1 + } + Branch { + Points [0, 40] + DstBlock "RMS3" + DstPort 1 + } + } + Line { + SrcBlock "RMS3" + SrcPort 1 + DstBlock "LPF" + DstPort 1 + } + Line { + SrcBlock "LPF" + SrcPort 1 + Points [35, 0] + Branch { + DstBlock "Scope4" + DstPort 2 + } + Branch { + Points [0, 50] + DstBlock "Subsystem6" + DstPort 1 + } + } + Line { + SrcBlock "LPF1" + SrcPort 1 + Points [35, 0] + Branch { + DstBlock "Scope11" + DstPort 2 + } + Branch { + Points [0, 50] + DstBlock "Subsystem7" + DstPort 1 + } + } + Line { + SrcBlock "Clock" + SrcPort 1 + DstBlock "To Workspace" + DstPort 1 + } + Line { + Labels [0, 0] + SrcBlock "LPF vq2" + SrcPort 1 + Points [15, 0] + Branch { + DstBlock "PV Array Measurements" + DstPort 1 + } + Branch { + Points [0, 40] + DstBlock "Product" + DstPort 1 + } + } + Line { + SrcBlock "From15" + SrcPort 1 + DstBlock "Gain" + DstPort 1 + } + Line { + SrcBlock "Gain" + SrcPort 1 + Points [50, 0] + Branch { + DstBlock "Frequency" + DstPort 1 + } + Branch { + Points [0, 40] + Branch { + DstBlock "LPF vq10" + DstPort 1 + } + Branch { + Points [0, 60] + DstBlock "Gain2" + DstPort 1 + } + } + } + Line { + SrcBlock "LPF vq10" + SrcPort 1 + DstBlock "Frequency" + DstPort 2 + } + Line { + SrcBlock "Subsystem9" + SrcPort 1 + DstBlock "Gain4" + DstPort 1 + } + Line { + SrcBlock "Gain2" + SrcPort 1 + DstBlock "Subsystem10" + DstPort 1 + } + Line { + SrcBlock "Gain4" + SrcPort 1 + DstBlock "AC Load Measurements" + DstPort 2 + } + Line { + SrcBlock "Gain3" + SrcPort 1 + DstBlock "Battery Measurements" + DstPort 1 + } + Line { + SrcBlock "From6" + SrcPort 1 + DstBlock "Gain3" + DstPort 1 + } + Line { + SrcBlock "Subsystem" + SrcPort 1 + DstBlock "Gain1" + DstPort 1 + } + Line { + SrcBlock "Gain1" + SrcPort 1 + DstBlock "AC Load Measurements" + DstPort 1 + } + Line { + SrcBlock "From1" + SrcPort 1 + DstBlock "LPF vq5" + DstPort 1 + } + Line { + SrcBlock "From12" + SrcPort 1 + DstBlock "LPF vq4" + DstPort 1 + } + Line { + SrcBlock "Product2" + SrcPort 1 + Points [15, 0] + Branch { + DstBlock "DC Bus Measurements\nBATTERY SIDE" + DstPort 3 + } + Branch { + Points [0, 65] + DstBlock "Subsystem3" + DstPort 1 + } + } + Line { + SrcBlock "Product1" + SrcPort 1 + Points [10, 0] + Branch { + DstBlock "DC Bus Measurements\nPV SIDE" + DstPort 3 + } + Branch { + Points [0, 75] + DstBlock "Subsystem1" + DstPort 1 + } + } + Line { + SrcBlock "From2" + SrcPort 1 + DstBlock "LPF vq7" + DstPort 1 + } + Line { + SrcBlock "From3" + SrcPort 1 + DstBlock "LPF vq6" + DstPort 1 + } + Line { + SrcBlock "Product5" + SrcPort 1 + Points [10, 0] + Branch { + Points [0, 70] + DstBlock "Subsystem8" + DstPort 1 + } + Branch { + DstBlock "DC Bus Measurements\nINVERTER SIDE" + DstPort 3 + } + } + Line { + SrcBlock "From8" + SrcPort 1 + DstBlock "LPF vq3" + DstPort 1 + } + Line { + SrcBlock "From11" + SrcPort 1 + DstBlock "LPF vq1" + DstPort 1 + } + Line { + SrcBlock "LPF vq1" + SrcPort 1 + Points [25, 0] + Branch { + DstBlock "DC Bus Measurements\nINVERTER SIDE" + DstPort 2 + } + Branch { + Points [0, 35] + DstBlock "Product5" + DstPort 2 + } + } + Line { + SrcBlock "LPF vq3" + SrcPort 1 + Points [40, 0] + Branch { + DstBlock "DC Bus Measurements\nINVERTER SIDE" + DstPort 1 + } + Branch { + Points [0, 50] + DstBlock "Product5" + DstPort 1 + } + } + Line { + SrcBlock "LPF vq4" + SrcPort 1 + Points [20, 0] + Branch { + Points [0, 35] + DstBlock "Product2" + DstPort 2 + } + Branch { + DstBlock "DC Bus Measurements\nBATTERY SIDE" + DstPort 2 + } + } + Line { + SrcBlock "LPF vq5" + SrcPort 1 + Points [35, 0] + Branch { + Points [0, 50] + DstBlock "Product2" + DstPort 1 + } + Branch { + DstBlock "DC Bus Measurements\nBATTERY SIDE" + DstPort 1 + } + } + Line { + SrcBlock "LPF vq6" + SrcPort 1 + Points [20, 0] + Branch { + DstBlock "DC Bus Measurements\nPV SIDE" + DstPort 2 + } + Branch { + Points [0, 35] + DstBlock "Product1" + DstPort 2 + } + } + Line { + SrcBlock "LPF vq7" + SrcPort 1 + Points [35, 0] + Branch { + DstBlock "DC Bus Measurements\nPV SIDE" + DstPort 1 + } + Branch { + Points [0, 50] + DstBlock "Product1" + DstPort 1 + } + } + Line { + SrcBlock "Gain5" + SrcPort 1 + DstBlock "Scope" + DstPort 1 + } + Line { + SrcBlock "Gain6" + SrcPort 1 + DstBlock "Scope1" + DstPort 1 + } + Line { + SrcBlock "From13" + SrcPort 1 + DstBlock "Gain7" + DstPort 1 + } + Line { + SrcBlock "Gain7" + SrcPort 1 + DstBlock "Scope2" + DstPort 1 + } + Line { + SrcBlock "From14" + SrcPort 1 + Points [58, 0] + Branch { + Points [0, -40] + DstBlock "Gain5" + DstPort 1 + } + Branch { + DstBlock "Load Powers" + DstPort 1 + } + } + Line { + SrcBlock "From16" + SrcPort 1 + Points [57, 0] + Branch { + Points [0, 45] + DstBlock "Gain6" + DstPort 1 + } + Branch { + DstBlock "Load Powers" + DstPort 2 + } + } + Annotation { + SID "2557" + Position [210, 601] + ZOrder -1 + } + Annotation { + SID "2558" + Name "PV Array Measurements" + Position [212, 48] + ZOrder -2 + FontName "Arial Narrow" + FontSize 24 + FontWeight "bold" + } + Annotation { + SID "2559" + Name "Battery Measurements" + Position [222, 433] + ZOrder -3 + FontName "Arial Narrow" + FontSize 24 + FontWeight "bold" + } + Annotation { + SID "2562" + Name "AC Load Measurements" + Position [1417, 13] + ZOrder -6 + FontName "Arial Narrow" + FontSize 24 + FontWeight "bold" + } + Annotation { + SID "2951" + Name "DC Bus Measurements" + Position [745, 306] + ZOrder -2 + FontName "Arial Narrow" + FontSize 24 + FontWeight "bold" + } + } + } + Block { + BlockType Reference + Name "powergui" + SID "13" + Ports [] + Position [45, 30, 136, 81] + ZOrder -38 + Priority "1" + LibraryVersion "*1.2191" + UserDataPersistent on + UserData "DataTag0" + FontName "Verdana" + SourceBlock "powerlib/powergui" + SourceType "PSB option menu block" + SimulationMode "Discrete" + SolverType "Backward Euler" + SampleTime "5e-6" + frequency "60" + SPID off + DisableSnubberDevices off + DisableRonSwitches off + DisableVfSwitches off + SwTol "0" + Interpol off + DisplayEquations off + frequencyindice "0" + Pbase "100e6" + ErrMax "1e-4" + Iterations "50" + UnitsV "kV" + UnitsW "MW" + FunctionMessages off + echomessages off + HookPort off + EnableUseOfTLC off + x0status "blocks" + RestoreLinks "warning" + ResistiveCurrentMeasurement off + Frange "[0:2:500]" + Ylog off + Xlog on + ShowGrid off + save off + variable "ZData" + structure "Vab_st" + ZoomFFT off + StartTime "7.5" + cycles "4" + DisplayStyle "1" + fundamental "50" + FreqAxis off + MaxFrequency "50000" + frequencyindicesteady "1" + RmsSteady "1" + display off + Ts "0" + methode off + } + Line { + LineType "Connection" + SrcBlock "Battery" + SrcPort LConn1 + DstBlock "Bidirectional DC/DC\n Converter" + DstPort LConn1 + } + Line { + LineType "Connection" + SrcBlock "Battery" + SrcPort LConn2 + DstBlock "Bidirectional DC/DC\n Converter" + DstPort LConn2 + } + Line { + LineType "Connection" + SrcBlock "AC Load" + SrcPort LConn3 + DstBlock "Inverter" + DstPort LConn3 + } + Line { + LineType "Connection" + SrcBlock "AC Load" + SrcPort LConn2 + DstBlock "Inverter" + DstPort LConn2 + } + Line { + LineType "Connection" + SrcBlock "AC Load" + SrcPort LConn1 + DstBlock "Inverter" + DstPort LConn1 + } + Line { + LineType "Connection" + SrcBlock "Inverter" + SrcPort RConn1 + Points [-214, 0] + Branch { + ConnectType "DEST_DEST" + SrcBlock "Boost" + SrcPort RConn1 + Points [416, 0] + } + Branch { + ConnectType "DEST_SRC" + Points [0, 265] + DstBlock "Bidirectional DC/DC\n Converter" + DstPort RConn1 + } + } + Line { + LineType "Connection" + SrcBlock "Bidirectional DC/DC\n Converter" + SrcPort RConn2 + Points [253, 0; 0, -265] + Branch { + ConnectType "DEST_DEST" + SrcBlock "Boost" + SrcPort RConn2 + Points [498, 0] + } + Branch { + ConnectType "DEST_SRC" + DstBlock "Inverter" + DstPort RConn2 + } + } + Line { + LineType "Connection" + SrcBlock "Boost" + SrcPort LConn2 + DstBlock "PV Array" + DstPort RConn2 + } + Line { + LineType "Connection" + SrcBlock "Boost" + SrcPort LConn1 + DstBlock "PV Array" + DstPort RConn1 + } + Annotation { + SID "2563" + Name "DC/AC HYBRID MICROGRID (24h)" + Position [881, 109] + ZOrder -1 + FontName "Bookman Old Style" + FontSize 48 + FontWeight "bold" + FontAngle "italic" + } + Annotation { + SID "2564" + Name "Author: Eleder Araneta Estala\nRevision: Honorat Quinard" + Position [864, 156] + ZOrder -2 + FontName "Arial Narrow" + FontSize 16 + } + } +} +MatData { + NumRecords 1 + DataRecord { + Tag DataTag0 + Data " %)30 . : , 8 ( @ % \" $ ! 0 % 0 # $ \"0 <&]W9" + "7)G=6D FUE=&5R 9F9T=&]" + "O; 0 && Ibus>0\nChargeControl=" + "1;\n elseif SOC<20 && Vbus==0 && Ibus==0\nChargeControl=0;\n elseif SOC>=95 && Vbus>0 && Ibus>0\nChargeCon" + "trol=0;\n else \nChargeControl=1;\n end\n\n\n\n\n\n" + editorLayout "100 M4x1[10 5 700 500]" + } + } + data { + id 13 + ssIdNumber 4 + name "SOC" + linkNode [11 0 14] + scope INPUT_DATA + machine 1 + props { + array { + size "-1" + } + type { + method SF_INHERITED_TYPE + primitive SF_DOUBLE_TYPE + } + complexity SF_COMPLEX_INHERITED + } + dataType "Inherit: Same as Simulink" + } + data { + id 14 + ssIdNumber 5 + name "ChargeControl" + linkNode [11 13 15] + scope OUTPUT_DATA + machine 1 + props { + array { + size "-1" + } + type { + method SF_INHERITED_TYPE + primitive SF_DOUBLE_TYPE + } + complexity SF_COMPLEX_INHERITED + frame SF_FRAME_NO + } + dataType "Inherit: Same as Simulink" + } + data { + id 15 + ssIdNumber 7 + name "Vbus" + linkNode [11 14 16] + scope INPUT_DATA + machine 1 + props { + array { + size "-1" + } + type { + method SF_INHERITED_TYPE + primitive SF_DOUBLE_TYPE + isSigned 1 + wordLength "16" + } + complexity SF_COMPLEX_INHERITED + frame SF_FRAME_INHERITED + } + dataType "Inherit: Same as Simulink" + } + data { + id 16 + ssIdNumber 8 + name "Ibus" + linkNode [11 15 0] + scope INPUT_DATA + machine 1 + props { + array { + size "-1" + } + type { + method SF_INHERITED_TYPE + primitive SF_DOUBLE_TYPE + isSigned 1 + wordLength "16" + } + complexity SF_COMPLEX_INHERITED + frame SF_FRAME_INHERITED + } + dataType "Inherit: Same as Simulink" + } + junction { + id 17 + position [23.5747 49.5747 7] + chart 11 + linkNode [11 0 0] + subviewer 11 + ssIdNumber 3 + type CONNECTIVE_JUNCTION + } + transition { + id 18 + labelString "{eML_blk_kernel();}" + labelPosition [32.125 19.875 102.544 14.964] + fontSize 12 + src { + intersection [0 0 1 0 23.5747 14.625 0 0] + } + dst { + id 17 + intersection [1 0 -1 0 23.5747 42.5747 0 0] + } + midPoint [23.5747 24.9468] + chart 11 + linkNode [11 0 0] + dataLimits [21.175 25.975 14.625 42.575] + subviewer 11 + drawStyle SMART + slide { + sticky BOTH_STICK + } + executionOrder 1 + ssIdNumber 2 + } + instance { + id 19 + name "Bidirectional DC//DC\n Converter/MATLAB Function" + machine 1 + chart 11 + } + chart { + id 20 + name "Boost/Incremental Conductance MPPT/MPPT IC" + windowPosition [530.833 18.75 171 600] + viewLimits [0 156.75 0 153.75] + screen [1 1 1600 900 1.333333333333333] + treeNode [0 21 0 0] + firstTransition 32 + firstJunction 31 + viewObj 20 + machine 1 + ssIdHighWaterMark 12 + decomposition CLUSTER_CHART + type EML_CHART + firstData 22 + chartFileNumber 3 + disableImplicitCasting 1 + eml { + name "IncCond" + } + } + state { + id 21 + labelString "eML_blk_kernel()" + position [18 64.5 118 66] + fontSize 12 + chart 20 + treeNode [20 0 0 0] + superState SUBCHART + subviewer 20 + ssIdNumber 1 + type FUNC_STATE + decomposition CLUSTER_STATE + eml { + isEML 1 + script "function [delta,Vref,Ipv_prev_out,Vpv_prev_out] = IncCond(Ipv,Iprevious,Vpv,Vprevious,Vref_previo" + "us)\n\n% REFERENCE PAPERS:\n% Trishan Esram, Patrick L. Chapman, \"Comparison of Photovoltaic Array\n% Maximum P" + "ower Tracking Techniques\", IEEE Transactions on Energy\n% COnversion, vol. 22, issue 2, June 2007.\n%\n% M. Lok" + "anadham, K. Vijaya Bhaskar, \"Incremental Conductance Based Maximum\n% Power Point Tracking (MPPT) for Photovolt" + "aic System\" International\n% Journal of Engineering Research and Applications (IJERA), vol. 2, issue\n% 2, Marc" + "h-April 2012.\n\n\n% The followoing code is an algorithm for a Maximum Power Point Tracking\n% (MPPT) technique " + "Incremental COnductance\n\nVbus = 600;\n\ndI=Ipv-Iprevious;\ndV=Vpv-Vprevious;\n\nif (dV==0)\n if (dI==0)\n " + " Vref=Vref_previous;\n else\n if (Ipv>0)\n Vref= Vpv+dV;\n else\n Vr" + "ef= Vpv-dV;\n end\n end\nelse\n if ((dI/dV)==(-Ipv/Vpv))\n Vref=Vref_previous;\n else\n " + " if ((dI/dV)>(-Ipv/Vpv))\n Vref= Vpv+dV;\n else\n Vref= Vpv-dV;\n end\n" + " end\nend\nIpv_prev_out=Ipv;\nVpv_prev_out=Vpv;\n\ndelta=1-Vref/Vbus;\n\nend\n\n" + editorLayout "100 M4x1[10 5 700 500]" + } + } + data { + id 22 + ssIdNumber 12 + name "delta" + linkNode [20 0 23] + scope OUTPUT_DATA + machine 1 + props { + array { + size "-1" + } + type { + method SF_INHERITED_TYPE + primitive SF_DOUBLE_TYPE + isSigned 1 + wordLength "16" + } + complexity SF_COMPLEX_INHERITED + frame SF_FRAME_NO + } + dataType "Inherit: Same as Simulink" + } + data { + id 23 + ssIdNumber 4 + name "Ipv" + linkNode [20 22 24] + scope INPUT_DATA + machine 1 + props { + array { + size "-1" + } + type { + method SF_INHERITED_TYPE + primitive SF_DOUBLE_TYPE + } + complexity SF_COMPLEX_INHERITED + } + dataType "Inherit: Same as Simulink" + } + data { + id 24 + ssIdNumber 7 + name "Iprevious" + linkNode [20 23 25] + scope INPUT_DATA + machine 1 + props { + array { + size "-1" + } + type { + method SF_INHERITED_TYPE + primitive SF_DOUBLE_TYPE + isSigned 1 + wordLength "16" + } + complexity SF_COMPLEX_INHERITED + frame SF_FRAME_INHERITED + } + dataType "Inherit: Same as Simulink" + } + data { + id 25 + ssIdNumber 5 + name "Vref" + linkNode [20 24 26] + scope OUTPUT_DATA + machine 1 + props { + array { + size "-1" + } + type { + method SF_INHERITED_TYPE + primitive SF_DOUBLE_TYPE + } + complexity SF_COMPLEX_INHERITED + frame SF_FRAME_NO + } + dataType "Inherit: Same as Simulink" + } + data { + id 26 + ssIdNumber 6 + name "Vpv" + linkNode [20 25 27] + scope INPUT_DATA + machine 1 + props { + array { + size "-1" + } + type { + method SF_INHERITED_TYPE + primitive SF_DOUBLE_TYPE + isSigned 1 + wordLength "16" + } + complexity SF_COMPLEX_INHERITED + frame SF_FRAME_INHERITED + } + dataType "Inherit: Same as Simulink" + } + data { + id 27 + ssIdNumber 8 + name "Vprevious" + linkNode [20 26 28] + scope INPUT_DATA + machine 1 + props { + array { + size "-1" + } + type { + method SF_INHERITED_TYPE + primitive SF_DOUBLE_TYPE + isSigned 1 + wordLength "16" + } + complexity SF_COMPLEX_INHERITED + frame SF_FRAME_INHERITED + } + dataType "Inherit: Same as Simulink" + } + data { + id 28 + ssIdNumber 9 + name "Vref_previous" + linkNode [20 27 29] + scope INPUT_DATA + machine 1 + props { + array { + size "-1" + } + type { + method SF_INHERITED_TYPE + primitive SF_DOUBLE_TYPE + isSigned 1 + wordLength "16" + } + complexity SF_COMPLEX_INHERITED + frame SF_FRAME_INHERITED + } + dataType "Inherit: Same as Simulink" + } + data { + id 29 + ssIdNumber 10 + name "Ipv_prev_out" + linkNode [20 28 30] + scope OUTPUT_DATA + machine 1 + props { + array { + size "-1" + } + type { + method SF_INHERITED_TYPE + primitive SF_DOUBLE_TYPE + isSigned 1 + wordLength "16" + } + complexity SF_COMPLEX_INHERITED + frame SF_FRAME_NO + } + dataType "Inherit: Same as Simulink" + } + data { + id 30 + ssIdNumber 11 + name "Vpv_prev_out" + linkNode [20 29 0] + scope OUTPUT_DATA + machine 1 + props { + array { + size "-1" + } + type { + method SF_INHERITED_TYPE + primitive SF_DOUBLE_TYPE + isSigned 1 + wordLength "16" + } + complexity SF_COMPLEX_INHERITED + frame SF_FRAME_NO + } + dataType "Inherit: Same as Simulink" + } + junction { + id 31 + position [23.5747 49.5747 7] + chart 20 + linkNode [20 0 0] + subviewer 20 + ssIdNumber 3 + type CONNECTIVE_JUNCTION + } + transition { + id 32 + labelString "{eML_blk_kernel();}" + labelPosition [32.125 19.875 102.544 14.964] + fontSize 12 + src { + intersection [0 0 1 0 23.5747 14.625 0 0] + } + dst { + id 31 + intersection [1 0 -1 0 23.5747 42.5747 0 0] + } + midPoint [23.5747 24.9468] + chart 20 + linkNode [20 0 0] + dataLimits [21.175 25.975 14.625 42.575] + subviewer 20 + drawStyle SMART + slide { + sticky BOTH_STICK + } + executionOrder 1 + ssIdNumber 2 + } + instance { + id 33 + name "Boost/Incremental Conductance MPPT/MPPT IC" + machine 1 + chart 20 + } + target { + id 34 + name "sfun" + description "Default Simulink S-Function Target." + machine 1 + linkNode [1 0 0] + } +} diff --git a/README.md b/README.md index a72c606..ddd2c73 100644 --- a/README.md +++ b/README.md @@ -10,16 +10,34 @@ Design tools are needed to build the prototype PV-microgrid at the College of Sc * Give a full year simulation of the system, with measurements on load, production, voltage and frequency. * Give methods for simplifying the planning and resource-assessment phase. +## How to run +Open the folder simulink-microgrid then open the simulink file 'Microgrid_24h_Simulation.mdl' and in the subfolder src open the file 'main.mat'. You can now, run the 'main.mat' file and follow the instructions (Be careful, you have to open the simulink before you can run the main file). + +## Compiling +The time of the compilation is greatly impacted by the performance of your computer. + +## Supported operating systems +Windows, Linux and Mac are supported by this simulation. When you run the 'main.mat' file, a popup box let you choose between different OS. + +## Input Data of the simulink +The different inputs data are located in the file simulink-microgrid/database. + ## To Do +- [x] The simulation crashes. - [ ] Enhance the readme * Explain how to run the simulation * Write about compiling * write about supported operating systems * Add usefull links to prior knowledge for this simulation, such as using excel and matlab together. -- [x] Create a GUI in order to control and cisualize the simulation -- [ ] Make the GUI dynamic +- [x] Create a GUI in order to control and visualize the simulation +- [x] Make the GUI dynamic - [ ] Implement the integration of a backup in the simulink - [ ] Create a wiki -- [ ] Testing +- [x] Testing * Run a complete simulation and analyse the results. +- [x] Simulation crashed - find error +- [ ] Add support for multi-core. +- [x] Add OS X support +- [ ] Run simulation on OS X +- [ ] Check the name of the previous master thesis diff --git a/dataBase/activepowertxt.txt b/dataBase/activepowertxt.txt new file mode 100644 index 0000000..2142470 --- /dev/null +++ b/dataBase/activepowertxt.txt @@ -0,0 +1 @@ + 0 diff --git a/dataBase/chargecontroltxt.txt b/dataBase/chargecontroltxt.txt new file mode 100644 index 0000000..2142470 --- /dev/null +++ b/dataBase/chargecontroltxt.txt @@ -0,0 +1 @@ + 0 diff --git a/dataBase/clocktxt.txt b/dataBase/clocktxt.txt new file mode 100644 index 0000000..2142470 --- /dev/null +++ b/dataBase/clocktxt.txt @@ -0,0 +1 @@ + 0 diff --git a/dataBase/clocktxtap.txt b/dataBase/clocktxtap.txt new file mode 100644 index 0000000..2142470 --- /dev/null +++ b/dataBase/clocktxtap.txt @@ -0,0 +1 @@ + 0 diff --git a/dataBase/clocktxtc.txt b/dataBase/clocktxtc.txt new file mode 100644 index 0000000..79a6dbc --- /dev/null +++ b/dataBase/clocktxtc.txt @@ -0,0 +1,3 @@ + 0 + 0 + 0 diff --git a/dataBase/clocktxtrap.txt b/dataBase/clocktxtrap.txt new file mode 100644 index 0000000..2142470 --- /dev/null +++ b/dataBase/clocktxtrap.txt @@ -0,0 +1 @@ + 0 diff --git a/dataBase/clocktxtsoc.txt b/dataBase/clocktxtsoc.txt new file mode 100644 index 0000000..2142470 --- /dev/null +++ b/dataBase/clocktxtsoc.txt @@ -0,0 +1 @@ + 0 diff --git a/dataBase/clocktxtvoltage.txt b/dataBase/clocktxtvoltage.txt new file mode 100644 index 0000000..79a6dbc --- /dev/null +++ b/dataBase/clocktxtvoltage.txt @@ -0,0 +1,3 @@ + 0 + 0 + 0 diff --git a/dataBase/currenttxt.txt b/dataBase/currenttxt.txt new file mode 100644 index 0000000..79a6dbc --- /dev/null +++ b/dataBase/currenttxt.txt @@ -0,0 +1,3 @@ + 0 + 0 + 0 diff --git a/dataBase/energy bloc D.xlsx b/dataBase/energy bloc D.xlsx new file mode 100644 index 0000000..4c87201 Binary files /dev/null and b/dataBase/energy bloc D.xlsx differ diff --git a/dataBase/frequencytxt.txt b/dataBase/frequencytxt.txt new file mode 100644 index 0000000..2142470 --- /dev/null +++ b/dataBase/frequencytxt.txt @@ -0,0 +1 @@ + 0 diff --git a/dataBase/reactivepowertxt.txt b/dataBase/reactivepowertxt.txt new file mode 100644 index 0000000..2142470 --- /dev/null +++ b/dataBase/reactivepowertxt.txt @@ -0,0 +1 @@ + 0 diff --git a/dataBase/soctxt.txt b/dataBase/soctxt.txt new file mode 100644 index 0000000..2142470 --- /dev/null +++ b/dataBase/soctxt.txt @@ -0,0 +1 @@ + 0 diff --git a/dataBase/voltagetxt.txt b/dataBase/voltagetxt.txt new file mode 100644 index 0000000..79a6dbc --- /dev/null +++ b/dataBase/voltagetxt.txt @@ -0,0 +1,3 @@ + 0 + 0 + 0 diff --git a/pow.mat b/pow.mat new file mode 100644 index 0000000..f74a2ff Binary files /dev/null and b/pow.mat differ diff --git a/src/Main.m b/src/Main.m index 2e4b0da..814f377 100644 --- a/src/Main.m +++ b/src/Main.m @@ -3,6 +3,7 @@ % Main program %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%% + % Construct a questdlg with two options choice = questdlg('Hello, please choose your Operating System?', ... 'Operating System', ... @@ -21,11 +22,11 @@ % Create the data insolation to plot from excel SampleTime=0.1; -xdiscretized=1:SampleTime:24; -Insolation_data = normpdf(xdiscretized,12,1.7); % Normal law -Ins_Monsoon=Insolation_data*3990; -Ins_Intermediate=Insolation_data*4583; -Ins_Winter=Insolation_data*4888; +xdiscretized=0.1:SampleTime:2.4; +% Insolation_data = normpdf(xdiscretized,1.2,0.17); % Normal law +% Ins_Monsoon=Insolation_data*3990; +% Ins_Intermediate=Insolation_data*4583; +% Ins_Winter=Insolation_data*4888; % Path choise according the OS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -65,9 +66,14 @@ customerRHIntermediate=importdata('dataBase/PowerRHIntermediate.mat'); % Data from excel Block RH customerRHWinter=importdata('dataBase/PowerRHWinter.mat'); % Data from excel Block RH -Time=importdata('dataBase/SampleT.mat'); % SampleT.mat Data from excel +Time1=importdata('dataBase/SampleT.mat'); % SampleT.mat Data from excel jpg=imread('img/bhutan.jpg'); +Ins_Monsoon=importdata('dataBase/Insolation1.mat'); +Ins_Intermediate=importdata('dataBase/Insolation2.mat'); +Ins_Winter=importdata('dataBase/Insolation3.mat'); +pow=importdata('pow.mat'); + elseif os==2 % Import data from the files for Window % @@ -104,11 +110,18 @@ customerRHIntermediate=importdata('dataBase\PowerRHIntermediate.mat'); % Data from excel Block RH customerRHWinter=importdata('dataBase\PowerRHWinter.mat'); % Data from excel Block RH -Time=importdata('dataBase\SampleT.mat'); % SampleT.mat Data from excel +Time1=importdata('dataBase\SampleT.mat'); % SampleT.mat Data from excel jpg=imread('img\bhutan.jpg'); + +Ins_Monsoon=importdata('dataBase/Insolation1.mat'); +Ins_Intermediate=importdata('dataBase/Insolation2.mat'); +Ins_Winter=importdata('dataBase/Insolation3.mat'); +pow=importdata('pow.mat'); end +Time=Time1/10; + % linear regression with a polynomial approach for the Active power of the load % Block All (Monsoon)%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -119,7 +132,7 @@ % Delete values below zero for the final curve for the Active power of the load nrows = 1; -ncols = (23/SampleTime)+1; +ncols = (2.3/SampleTime)+1; newyfitdiscretized1=yfitdiscretized1; r=1; for c = 1:ncols @@ -137,6 +150,8 @@ yfitdiscretized2=polyval(p,xdiscretized); % Delete values below zero for the final curve for the Active power of the load +nrows = 1; +ncols = (2.3/SampleTime)+1; newyfitdiscretized2=yfitdiscretized2; r=1; for c = 1:ncols @@ -156,7 +171,7 @@ % Delete values below zero for the final curve for the Active power of the load nrows = 1; -ncols = (23/SampleTime)+1; +ncols = (2.3/SampleTime)+1; newyfitdiscretized3=yfitdiscretized3; r=1; for c = 1:ncols @@ -176,7 +191,7 @@ % Delete values below zero for the final curve for the Active power of the load nrows = 1; -ncols = (23/SampleTime)+1; +ncols = (2.3/SampleTime)+1; newyfitdiscretized4=yfitdiscretized4; r=1; for c = 1:ncols @@ -195,6 +210,8 @@ yfitdiscretized5=polyval(p,xdiscretized); % Delete values below zero for the final curve for the Active power of the load +nrows = 1; +ncols = (2.3/SampleTime)+1; newyfitdiscretized5=yfitdiscretized5; r=1; for c = 1:ncols @@ -214,7 +231,7 @@ % Delete values below zero for the final curve for the Active power of the load nrows = 1; -ncols = (23/SampleTime)+1; +ncols = (2.3/SampleTime)+1; newyfitdiscretized6=yfitdiscretized6; r=1; for c = 1:ncols @@ -234,7 +251,7 @@ % Delete values below zero for the final curve for the Active power of the load nrows = 1; -ncols = (23/SampleTime)+1; +ncols = (2.3/SampleTime)+1; newyfitdiscretized7=yfitdiscretized7; r=1; for c = 1:ncols @@ -253,6 +270,8 @@ yfitdiscretized8=polyval(p,xdiscretized); % Delete values below zero for the final curve for the Active power of the load +nrows = 1; +ncols = (2.3/SampleTime)+1; newyfitdiscretized8=yfitdiscretized8; r=1; for c = 1:ncols @@ -272,7 +291,7 @@ % Delete values below zero for the final curve for the Active power of the load nrows = 1; -ncols = (23/SampleTime)+1; +ncols = (2.3/SampleTime)+1; newyfitdiscretized9=yfitdiscretized9; r=1; for c = 1:ncols @@ -292,7 +311,7 @@ % Delete values below zero for the final curve for the Active power of the load nrows = 1; -ncols = (23/SampleTime)+1; +ncols =(2.3/SampleTime)+1; newyfitdiscretized10=yfitdiscretized10; r=1; for c = 1:ncols @@ -330,7 +349,7 @@ % Delete values below zero for the final curve for the Active power of the load nrows = 1; -ncols = (23/SampleTime)+1; +ncols =(2.3/SampleTime)+1; newyfitdiscretized12=yfitdiscretized12; r=1; for c = 1:ncols @@ -351,7 +370,7 @@ % Delete values below zero for the final curve for the Active power of the load nrows = 1; -ncols = (23/SampleTime)+1; +ncols =(2.3/SampleTime)+1; newyfitdiscretized13=yfitdiscretized13; r=1; for c = 1:ncols @@ -370,6 +389,8 @@ yfitdiscretized14=polyval(p,xdiscretized); % Delete values below zero for the final curve for the Active power of the load +nrows = 1; +ncols = (2.3/SampleTime)+1; newyfitdiscretized14=yfitdiscretized14; r=1; for c = 1:ncols @@ -389,7 +410,7 @@ % Delete values below zero for the final curve for the Active power of the load nrows = 1; -ncols = (23/SampleTime)+1; +ncols =(2.3/SampleTime)+1; newyfitdiscretized15=yfitdiscretized15; r=1; for c = 1:ncols @@ -409,7 +430,7 @@ % Delete values below zero for the final curve for the Active power of the load nrows = 1; -ncols = (23/SampleTime)+1; +ncols =(2.3/SampleTime)+1; newyfitdiscretized16=yfitdiscretized16; r=1; for c = 1:ncols @@ -428,6 +449,8 @@ yfitdiscretized17=polyval(p,xdiscretized); % Delete values below zero for the final curve for the Active power of the load +nrows = 1; +ncols = (2.3/SampleTime)+1; newyfitdiscretized17=yfitdiscretized17; r=1; for c = 1:ncols @@ -447,7 +470,7 @@ % Delete values below zero for the final curve for the Active power of the load nrows = 1; -ncols = (23/SampleTime)+1; +ncols =(2.3/SampleTime)+1; newyfitdiscretized18=yfitdiscretized18; r=1; for c = 1:ncols @@ -467,7 +490,7 @@ % Delete values below zero for the final curve for the Active power of the load nrows = 1; -ncols = (23/SampleTime)+1; +ncols =(2.3/SampleTime)+1; newyfitdiscretized19=yfitdiscretized19; r=1; for c = 1:ncols @@ -486,6 +509,8 @@ yfitdiscretized20=polyval(p,xdiscretized); % Delete values below zero for the final curve for the Active power of the load +nrows = 1; +ncols = (2.3/SampleTime)+1; newyfitdiscretized20=yfitdiscretized20; r=1; for c = 1:ncols @@ -505,7 +530,7 @@ % Delete values below zero for the final curve for the Active power of the load nrows = 1; -ncols = (23/SampleTime)+1; +ncols =(2.3/SampleTime)+1; newyfitdiscretized21=yfitdiscretized21; r=1; for c = 1:ncols @@ -525,7 +550,7 @@ % Delete values below zero for the final curve for the Active power of the load nrows = 1; -ncols = (23/SampleTime)+1; +ncols =(2.3/SampleTime)+1; newyfitdiscretized22=yfitdiscretized22; r=1; for c = 1:ncols @@ -544,7 +569,8 @@ yfitdiscretized23=polyval(p,xdiscretized); % Delete values below zero for the final curve for the Active power of the load -newyfitdiscretized23=yfitdiscretized23; +nrows = 1; +ncols = (2.3/SampleTime)+1; r=1; for c = 1:ncols @@ -563,7 +589,7 @@ % Delete values below zero for the final curve for the Active power of the load nrows = 1; -ncols = (23/SampleTime)+1; +ncols =(2.3/SampleTime)+1; newyfitdiscretized24=yfitdiscretized24; r=1; for c = 1:ncols @@ -577,14 +603,100 @@ % Temperature for each seasons from the edit box -Temp1=zeros(1,(23/SampleTime)+1);% Creation matrix Temp1 +Temp1=zeros(1,(round(2.3/SampleTime)+1));% Creation matrix Temp1 Temp1(:,:)=26.8; % Set value into the matrix -Temp2=zeros(1,(23/SampleTime)+1);% Creation matrix Temp2 +Temp2=zeros(1,(round(2.3/SampleTime)+1));% Creation matrix Temp2 Temp2(:,:)=17.4; % Set value into the matrix -Temp3=zeros(1,(23/SampleTime)+1);% Creation matrix Temp3 +Temp3=zeros(1,(round(2.3/SampleTime)+1));% Creation matrix Temp3 Temp3(:,:)=23.4; % Set value into the matrix -% Run the GUI -run('Supervision'); +% Intit clock and superclock +clock=0; +superclock=[0;0;0]; + +% Intit file clocktxt +fid = fopen('dataBase/clocktxt.txt','w'); +fprintf(fid,' %i\n',clock); +fclose(fid) + +% Intit file clocktxt +fidsoc = fopen('dataBase/clocktxtsoc.txt','w'); +fprintf(fidsoc,' %i\n',clock); +fclose(fidsoc) + +% Intit file clocktxtvoltage +fidv = fopen('dataBase/clocktxtvoltage.txt','w'); +fprintf(fidv,' %i\n',superclock); +fclose(fidv) + +% Intit file clocktxtap +fidap = fopen('dataBase/clocktxtap.txt','w'); +fprintf(fidap,' %i\n',clock); +fclose(fidap) + +% Intit file clocktxtrap +fidrap = fopen('dataBase/clocktxtrap.txt','w'); +fprintf(fidrap,' %i\n',clock); +fclose(fidrap) + +% Intit file clocktxtc +fidc = fopen('dataBase/clocktxtc.txt','w'); +fprintf(fidc,' %i\n',superclock); +fclose(fidc) + +% Intit file txtvoltage +voltage=[0;0;0]; +fid1 = fopen('dataBase/voltagetxt.txt','w'); +fprintf(fid1,' %i\n',voltage); +fclose(fid1) + +% Intit file txtfrequency +frequency=0; +fid2 = fopen('dataBase/frequencytxt.txt','w'); +fprintf(fid2,' %i\n',frequency); +fclose(fid2) + +% Intit file txtsoc +SOC=0; +fid3 = fopen('dataBase/soctxt.txt','w'); +fprintf(fid3,' %i\n',SOC); +fclose(fid3) + +% Intit file txtcurrent +current=[0;0;0]; +fid4 = fopen('dataBase/currenttxt.txt','w'); +fprintf(fid4,' %i\n',current); +fclose(fid4) + +% Intit file txtactivepower +activepower=0; +fid5 = fopen('dataBase/activepowertxt.txt','w'); +fprintf(fid5,' %i\n',activepower); +fclose(fid5) + +% Intit file txtreactivepower +reactivepower=0; +fid6 = fopen('dataBase/reactivepowertxt.txt','w'); +fprintf(fid6,' %i\n',reactivepower); +fclose(fid6) + +% Intit file txtchargecontrol +chargecontrol=0; +fid7 = fopen('dataBase/chargecontroltxt.txt','w'); +fprintf(fid7,' %i\n',chargecontrol); +fclose(fid7) + +% % Run the simulation through the GUI% +% run('Supervision'); + +% Run the simulation without the GUI +Ins_Monsoon1=Ins_Monsoon'/1000; % Irradiation [kW/m^2] +VARins = [xdiscretized;Ins_Monsoon1]; % Time and Irradiation input [kW/m^2] +VARTemp = [xdiscretized;Temp1]; % Time and Temperature input [°C] +VARPA= [xdiscretized;pow]; % Active power input [W] +VARPQ= [xdiscretized;pow/10]; % Reactive power input [W] + + + diff --git a/src/PhotovoltaicSim.m b/src/PhotovoltaicSim.m deleted file mode 100644 index 2188322..0000000 --- a/src/PhotovoltaicSim.m +++ /dev/null @@ -1,60 +0,0 @@ -function Ipv = Photovoltaic(Vpv,Irr,TaC) - -%% REFERENCE PAPER: -% Francisco M. González-Longatt, "Model of Photovoltaic Module in -% MatlabTM", II CIBELEC 2005. - -%% Solar panel: Suntech STP-280S -% photovoltaic.m function calculates solar array current with a -% given voltage, irradiance and temperature -% Ipv = photovoltaic array current (function output) -% Vpv = photovoltaic array voltage -% Irr = irradiance (1 Irr = 1000 W/m^2) -% TaC = temperature (in celsius degrees) - -%% Constants - -k = 1.38e-23; % Boltzman’s const -q = 1.60e-19; % charge on an electron -Np = 10; % Number of solar panels -n = 2; % Diode quality factor (=2 for crystaline, <2 for amorphous) -Vg = 1.12; % Band gap voltage, 1.12V for xtal Si, 1.75 for amorphous Si -Ns = 96*Np; % Number of cells conected in series (96 cells each panel) -T1 = 273 + 25; % 25C degrees in Kelvin's -Voc_T1 = 44.8*Np/Ns; % Open circuit voltage per cell at T1 temperature -Isc_T1 = 8.33; % Short circuit current at temperature T1 - -T2 = 273 + 75; -Voc_T2 = Voc_T1*(-0.34/100*(T2-T1)) /Ns; % Open circuit voltage per cell at temperature T2 -Isc_T2 = Isc_T1*(0.05/100*(T2-T1)); % Short circuit current per cell at temperature T2 - -TaK = 273 + TaC; % Photovoltaic array working temperature -TrK = 273 + 25; % Reference temperature - -%% Calculation of the photocurrent Iph -K0 = (Isc_T2 - Isc_T1)/(T2-T1); % K0 constant is determined from Isc vs T (ECUATION 4) -Iph_T1 = Isc_T1 * Irr; % (ECUATION 3) -Iph = Iph_T1 + K0*(TaK-T1); % Photocurrent (ECUATION 2) - -%% Calculation of saturation current of the diode I0 -I0_T1 = Isc_T1/(exp(q*Voc_T1/(n*k*T1))-1); % (ECUATION 6) -I0 = I0_T1*(TaK/T1).^(3/n).*exp(-q*Vg/(n*k).*((1./TaK)-(1/T1))); % Diode sat. current - -%% Calculation of the series resistance Rs, represents the resistance inside -% its cell in the connection between cells -Xv = I0_T1*q/(n*k*T1)*exp(q*Voc_T1/(n*k*T1)); % (ECUATION 8) -dVdI_Voc = -1.15/Ns /2; % dV/dI at Vco per cell, from manufacturers graph -Rs = -dVdI_Voc - 1/Xv; % Resistance per cell (ECUATION 7) - -%% Calculation of the PV array current, Ipv -Vt_Ta = n*k*TaK/q; % = nkT/q -Vc = Vpv/Ns; -Ipv = zeros(size(Vc)); -% Ipv = Iph - I0.*( exp((Vc+Ipv.*Rs)./Vt_Ta) -1) (ECUATION 1); -% Solve for Ipv: f(Ipv) = Iph - Ipv - I0.*( exp((Vc+Ia.*Rs)./Vt_Ta) -1) = 0; -% Newton-Raphson method: Ipv2 = Ipv1 - f(Ipv1)/f’(Ipv1) -for j=1:5; - Ipv = Ipv - ... - (Iph - Ipv - I0.*( exp((Vc+Ipv.*Rs)./Vt_Ta) -1))... - ./ (-1 - (I0.*( exp((Vc+Ipv.*Rs)./Vt_Ta) -1)).*Rs./Vt_Ta); -end \ No newline at end of file diff --git a/src/Plot.m b/src/Plot.m new file mode 100644 index 0000000..a62f8fe --- /dev/null +++ b/src/Plot.m @@ -0,0 +1,6 @@ +figure +plot(xdiscretized*10,Ins_Monsoon1); +xlabel('Time (Hours)'); +ylabel('Insolation (kW)'); +title('Insolation Monsoon'); +grid('on'); \ No newline at end of file diff --git a/src/Supervision.m b/src/Supervision.m index d9e5f51..4fc7eb4 100644 --- a/src/Supervision.m +++ b/src/Supervision.m @@ -3,7 +3,7 @@ % The GUI %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -function varargout= Supervision (varargin) +function varargout =Supervision(varargin) % Simulink model modelName = 'Microgrid_24h_Simulation'; @@ -95,14 +95,6 @@ 'Enable','off',... 'Callback',{@stopbutton_Callback}); -% Add "Update" button to window -hupdate = uicontrol('Style','pushbutton',... - 'Parent', f, ... - 'String','Update',... - 'Tag','update',... - 'Position',[15,115,30,8],... - 'Enable','off',... - 'Callback',{@updatebutton_Callback}); % Add "Temperature outside = °C" text to window htext1 = uicontrol('Style','text','String','Temperature outside = °C',... @@ -168,32 +160,44 @@ h3 = axes('Units','Pixels','Position',[107.5,20,95,60]); % Add "h4" axe to window (Voltage) -h4 = axes('Units','Pixels','Position',[227.5,200,95,60]); +h4 = axes('Parent', f, ... + 'Tag','h4',... + 'Units','Pixels','Position',[227.5,200,95,60],'Tag','newdata4'); % Add "h5" axe to window (Frequency) -h5 = axes('Units','Pixels','Position',[227.5,110,95,60]); +h5 = axes('Parent', f, ... + 'Tag','h5',... + 'Units','Pixels','Position',[227.5,110,95,60],'Tag','newdata5'); % Add "h6" axe to window (State of charge SOC) -h6 = axes('Units','Pixels','Position',[227.5,20,95,60]); +h6 = axes('Parent', f, ... + 'Tag','h6',... + 'Units','Pixels','Position',[227.5,20,95,60],'Tag','newdata6'); % Add "h8" axe to window (State of charge SOC) -h8 = axes('Units','Pixels','Position',[350,200,95,60]); +h8 = axes('Parent', f, ... + 'Tag','h8',... + 'Units','Pixels','Position',[350,200,95,60],'Tag','newdata8'); % Add "h9" axe to window (State of charge SOC) -h9 = axes('Units','Pixels','Position',[350,110,95,60]); +h9 = axes('Parent', f, ... + 'Tag','h9',... + 'Units','Pixels','Position',[350,110,95,60],'Tag','newdata9'); % Add "h10" axe to window (State of charge SOC) -h10 = axes('Units','Pixels','Position',[350,20,95,60]); +h10 = axes('Parent', f, ... + 'Tag','h10',... + 'Units','Pixels','Position',[350,20,95,60],'Tag','newdata10'); % Add text to window -htexttxtbox1 = uicontrol('Style','text','String','Enter the number of pannel',... +htexttxtbox1 = uicontrol('Style','text','String','Enter the number of solar pannels',... 'Position',[15,165,50,5]); % Add Text box to window txtbox1 = uicontrol(f,'Style','edit',... 'String','',... 'Position',[15 160 15 5]); % Add text to window -htexttxtbox2 = uicontrol('Style','text','String','Enter the number of battery',... +htexttxtbox2 = uicontrol('Style','text','String','Enter the power of your battery (W)',... 'Position',[15,150,50,5]); % Add Text box to window txtbox2 = uicontrol(f,'Style','edit',... @@ -209,15 +213,16 @@ imshow(jpg); title('Bhutan Project'); + % Align elements in parameters -align([hmonsoon,hintermediate,hwinter,hstop,htextboxpopup,hrun,htexttxtbox1,htexttxtbox2,htext1,hupdate,htext3,txtbox1,txtbox2,htextparameters,h7,hpopup],'Center','None'); +align([hmonsoon,hintermediate,hwinter,hstop,htextboxpopup,hrun,htexttxtbox1,htexttxtbox2,htext1,htext3,txtbox1,txtbox2,htextparameters,h7,hpopup],'Center','None'); % Color set(hrun,'BackgroundColor', [0.396 1 0.558]); set(hstop,'BackgroundColor', [1 0.286 0.145]); % Change units to normalized so components resize automatically. -set([f,h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,hmonsoon,hintermediate,htextboxpopup,htexttxtbox1,htexttxtbox2,hwinter,hstop,hrun,txtbox1,txtbox2,hupdate,htext1,htext8,htext2,htext3,htext7,htext4,htext5,htextparameters,htextstability,htextpower,hpopup],... +set([f,h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,hmonsoon,hintermediate,htextboxpopup,htexttxtbox1,htexttxtbox2,hwinter,hstop,hrun,txtbox1,txtbox2,htext1,htext8,htext2,htext3,htext7,htext4,htext5,htextparameters,htextstability,htextpower,hpopup],... 'Units','normalized'); % Full screen @@ -225,10 +230,10 @@ % Initialize a plot in the axes SampleTime=0.1; -xdiscretized=1:SampleTime:24; +xdiscretized=0.1:SampleTime:2.4; % Initialize the plot h1 with Ins_Monsoon from DataBase.m -plot(h1,xdiscretized,Ins_M,'m'); +plot(h1,xdiscretized*10,Ins_M,'m'); xlabel(h1,'Time (Hours)'); ylabel(h1,'Insolation (W/m˛)'); title(h1,'Insolation during the Monsoon'); @@ -236,7 +241,7 @@ set(htext1, 'String', 'Temperature outside = 26.8°C'); set(htext3, 'String', 'Temperature pannel = 46°C'); % Vector Data for the Simulink (Insolation) -VARins = [xdiscretized;Ins_M]; +VARins = [xdiscretized;Ins_M'/1000]; % Vector Data for the Simulink (Temperature) VARTemp = [xdiscretized;Temp1]; % Vector Data for the Simulink (Power) @@ -248,50 +253,114 @@ assignin('base', 'VARPA', VARPA); assignin('base', 'VARPQ', VARPQ); -% Initialize axes h4,h5,h6,h8,h9,h10 +% Initialize variable clock generate by the simulink mandatory for the use of linkdata +clock=0; +assignin('base','clock', clock); +superclock=[clock;clock;clock]; +assignin('base', 'superclock', superclock); + +Achargecontrol=0; +assignin('base', 'Achargecontrol', Achargecontrol); + +% Initialize axes h4 voltage +Av =[0;0;0] +assignin('base','Av', Av); +Bv =[0;0;0]; +assignin('base','Bv', Bv); +H4=plot(h4,Av,Bv); +% xlim(h4,[0 25]); +ylim(h4,[-1000 1000]); +set(H4,'XDataSource','Av') +set(H4,'YDataSource','Bv') xlabel(h4,'Time (Hours)'); ylabel(h4,'Load Voltage (V)'); title(h4,'Voltage Grid'); grid(h4,'on'); +%Initialize axes h5 frequency +Af = 0; +assignin('base','Af', Af); +Bf = 0; +assignin('base','Bf', Bf); +H5=plot(h5,Af,Bf); +% xlim(h5,[0 25]); +ylim(h5,[-100 100]); +set(H5,'XDataSource','Af') +set(H5,'YDataSource','Bf') xlabel(h5,'Time (Hours)'); ylabel(h5,'f (Hz)'); title(h5,'Frequency'); grid(h5,'on'); +% Initialize axes h6 state of charge SOC +Asoc = 0; +assignin('base','Asoc', Asoc); +Bsoc = 0; +assignin('base','Bsoc', Bsoc); +H6=plot(h6,Asoc,Bsoc,'m'); +% xlim(h6,[0 25]); +ylim(h6,[0 100]); +set(H6,'XDataSource','Asoc') +set(H6,'YDataSource','Bsoc') xlabel(h6,'Time (Hours)'); ylabel(h6,'SOC (%)'); title(h6,'State of charge'); grid(h6,'on'); +% Initialize axes h8 Load current +Acurrent = [0;0;0]; +assignin('base','Acurrent', Acurrent); +Bcurrent = [0;0;0]; +assignin('base','Bcurrent', Bcurrent); +H8=plot(h8,Acurrent,Bcurrent); +% xlim(h8,[0 25]); +set(H8,'XDataSource','Acurrent') +set(H8,'YDataSource','Bcurrent') xlabel(h8,'Time (Hours)'); ylabel(h8,'Current (A)'); title(h8,'Load Current'); grid(h8,'on'); +% Initialize axes h9 Load active power +Aactivepower = 0; +assignin('base','Aactivepower', Aactivepower); +Bactivepower = 0; +assignin('base','Bactivepower', Bactivepower); +H9=plot(h9,Aactivepower,Bactivepower,'g'); +% xlim(h9,[0 25]); +set(H9,'XDataSource','Aactivepower') +set(H9,'YDataSource','Bactivepower') xlabel(h9,'Time (Hours)'); ylabel(h9,'Active Power (W)'); title(h9,'Load Active Power'); grid(h9,'on'); +% Initialize axes h10 Load reactive power +Areactivepower = 0; +assignin('base','Areactivepower', Areactivepower); +Breactivepower = 0; +assignin('base','Breactivepower', Breactivepower); +H10=plot(h10,Aactivepower,Bactivepower,'r'); +% xlim(h10,[0 25]); +set(H10,'XDataSource','Areactivepower') +set(H10,'YDataSource','Breactivepower') xlabel(h10,'Time (Hours)'); ylabel(h10,'Reactive Power (kVAR)'); title(h10,'Load Reactive Power'); grid(h10,'on'); % Initialize plot h2 for the Active power with dataBase/PowerAllMonsoon.mat -plot(h2,xdiscretized,ActivePower_dataALLMonsoon); +plot(h2,xdiscretized*10,ActivePower_dataALLMonsoon*10); xlabel(h2,'Time (Hours)'); ylabel(h2,'Active Power (kW)'); title(h2,'Active Power All Blocks during Monsoon'); % Initialize plote h3 for the Reactive power (In our case we make an assumption, it is just the Active power divided by 10). -plot(h3,xdiscretized,ActivePower_dataALLMonsoon/10,'r'); +plot(h3,xdiscretized*10,ActivePower_dataALLMonsoon,'r'); xlabel(h3,'Time (Hours)'); ylabel(h3,'Reactive Power (kVAR)'); title(h3,'Reactive Power All Blocks during Monsoon') - % Initialize grid grid(h2,'on'); grid(h3,'on'); @@ -305,6 +374,7 @@ % Make the GUI visible. set(f,'Visible','on'); + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Callback Function for the popup menu %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -321,23 +391,23 @@ function popup_menu_Callback(source, eventdata, handles) % User selects All Blocks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% case 'All Blocks Monsoon' - plot(h2,xdiscretized,ActivePower_dataALLMonsoon); + plot(h2,xdiscretized*10,ActivePower_dataALLMonsoon*10); title(h2,'Active Power All Blocks during the Monsoon'); xlabel(h2,'Time (Hours)'); ylabel(h2,'Active Power (kW)'); grid(h2,'on'); - plot(h3,xdiscretized,ActivePower_dataALLMonsoon/10,'r'); + plot(h3,xdiscretized*10,ActivePower_dataALLMonsoon,'r'); xlabel(h3,'Time (Hours)'); ylabel(h3,'Reactive Power (kVAR)'); title(h3,'Reactive Power All Blocks during the Monsoon') grid(h3,'on'); % Vector Data for the Simulink (Insolation) - VARins = [xdiscretized;Ins_M]; + VARins = [xdiscretized;Ins_M'/1000]; % Vector Data for the Simulink (Temperature) VARTemp = [xdiscretized;Temp1]; % Vector Data for the Simulink (Power) - VARPA= [xdiscretized;ActivePower_dataALLMonsoon]; - VARPQ= [xdiscretized;ActivePower_dataALLMonsoon/10]; + VARPA= [xdiscretized;ActivePower_dataALLMonsoon*10]; + VARPQ= [xdiscretized;ActivePower_dataALLMonsoon]; % Write Data vectors in the workspace for the Simulink assignin('base', 'VARins', VARins); assignin('base', 'VARTemp', VARTemp); @@ -345,23 +415,23 @@ function popup_menu_Callback(source, eventdata, handles) assignin('base', 'VARPQ', VARPQ); case 'All Blocks Intermediate' - plot(h2,xdiscretized,ActivePower_dataALLIntermediate); + plot(h2,xdiscretized*10,ActivePower_dataALLIntermediate*10); title(h2,'Active Power All Blocks during the Intermediate Season'); xlabel(h2,'Time (Hours)'); ylabel(h2,'Active Power (kW)'); grid(h2,'on'); - plot(h3,xdiscretized,ActivePower_dataALLIntermediate/10,'r'); + plot(h3,xdiscretized*10,ActivePower_dataALLIntermediate,'r'); xlabel(h3,'Time (Hours)'); ylabel(h3,'Reactive Power (kVAR)'); title(h3,'Reactive Power All Blocks during the Intermediate Season') grid(h3,'on'); % Vector Data for the Simulink (Insolation) - VARins = [xdiscretized;Ins_I]; + VARins = [xdiscretized;Ins_I'/1000]; % Vector Data for the Simulink (Temperature) VARTemp = [xdiscretized;Temp2]; % Vector Data for the Simulink (Power) - VARPA= [xdiscretized;ActivePower_dataALLIntermediate]; - VARPQ= [xdiscretized;ActivePower_dataALLIntermediate/10]; + VARPA= [xdiscretized;ActivePower_dataALLIntermediate*10]; + VARPQ= [xdiscretized;ActivePower_dataALLIntermediate]; % Write Data vectors in the workspace for the Simulink assignin('base', 'VARins', VARins); assignin('base', 'VARTemp', VARTemp); @@ -369,23 +439,23 @@ function popup_menu_Callback(source, eventdata, handles) assignin('base', 'VARPQ', VARPQ); case 'All Blocks Winter' - plot(h2,xdiscretized,ActivePower_dataALLWinter); + plot(h2,xdiscretized*10,ActivePower_dataALLWinter*10); title(h2,'Active Power All Blocks during the Winter'); xlabel(h2,'Time (Hours)'); ylabel(h2,'Active Power (kW)'); grid(h2,'on'); - plot(h3,xdiscretized,ActivePower_dataALLWinter/10,'r'); + plot(h3,xdiscretized*10,ActivePower_dataALLWinter,'r'); xlabel(h3,'Time (Hours)'); ylabel(h3,'Reactive Power (kVAR)'); title(h3,'Reactive Power All Blocks during the Winter') grid(h3,'on'); % Vector Data for the Simulink (Insolation) - VARins = [xdiscretized;Ins_W]; + VARins = [xdiscretized;Ins_W'/1000]; % Vector Data for the Simulink (Temperature) VARTemp = [xdiscretized;Temp3]; % Vector Data for the Simulink (Power) - VARPA= [xdiscretized;ActivePower_dataALLWinter]; - VARPQ= [xdiscretized;ActivePower_dataALLWinter/10]; + VARPA= [xdiscretized;ActivePower_dataALLWinter*10]; + VARPQ= [xdiscretized;ActivePower_dataALLWinter]; % Write Data vectors in the workspace for the Simulink assignin('base', 'VARins', VARins); assignin('base', 'VARTemp', VARTemp); @@ -395,22 +465,22 @@ function popup_menu_Callback(source, eventdata, handles) % User selects Block D %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% case 'Block D Monsoon' - plot(h2,xdiscretized,ActivePower_dataDMonsoon); + plot(h2,xdiscretized*10,ActivePower_dataDMonsoon*10); title(h2,'Active Power Block D during the Monsoon'); ylabel(h2,'Active Power (kW)'); grid(h2,'on'); - plot(h3,xdiscretized,ActivePower_dataDMonsoon/10,'r'); + plot(h3,xdiscretized*10,ActivePower_dataDMonsoon,'r'); xlabel(h3,'Time (Hours)'); ylabel(h3,'Reactive Power (kVAR)'); title(h3,'Reactive Power Block D during the Monsoon'); grid(h3,'on'); % Vector Data for the Simulink (Insolation) - VARins = [xdiscretized;Ins_M]; + VARins = [xdiscretized;Ins_M'/1000]; % Vector Data for the Simulink (Temperature) VARTemp = [xdiscretized;Temp1]; % Vector Data for the Simulink (Power) - VARPA= [xdiscretized;ActivePower_dataDMonsoon]; - VARPQ= [xdiscretized;ActivePower_dataDMonsoon/10]; + VARPA= [xdiscretized;ActivePower_dataDMonsoon*10]; + VARPQ= [xdiscretized;ActivePower_dataDMonsoon]; % Write Data vectors in the workspace for the Simulink assignin('base', 'VARins', VARins); assignin('base', 'VARTemp', VARTemp); @@ -418,22 +488,22 @@ function popup_menu_Callback(source, eventdata, handles) assignin('base', 'VARPQ', VARPQ); case 'Block D Intermediate' - plot(h2,xdiscretized,ActivePower_dataDIntermediate); + plot(h2,xdiscretized*10,ActivePower_dataDIntermediate*10); title(h2,'Active Power Block D during the Intermediate Season'); ylabel(h2,'Active Power (kW)'); grid(h2,'on'); - plot(h3,xdiscretized,ActivePower_dataDIntermediate/10,'r'); + plot(h3,xdiscretized*10,ActivePower_dataDIntermediate,'r'); xlabel(h3,'Time (Hours)'); ylabel(h3,'Reactive Power (kVAR)'); title(h3,'Reactive Power Block D during the Intermediate Season'); grid(h3,'on'); % Vector Data for the Simulink (Insolation) - VARins = [xdiscretized;Ins_I]; + VARins = [xdiscretized;Ins_I'/1000]; % Vector Data for the Simulink (Temperature) VARTemp = [xdiscretized;Temp2]; % Vector Data for the Simulink (Power) - VARPA= [xdiscretized;ActivePower_dataDIntermediate]; - VARPQ= [xdiscretized;ActivePower_dataDIntermediate/10]; + VARPA= [xdiscretized;ActivePower_dataDIntermediate*10]; + VARPQ= [xdiscretized;ActivePower_dataDIntermediate]; % Write Data vectors in the workspace for the Simulink assignin('base', 'VARins', VARins); assignin('base', 'VARTemp', VARTemp); @@ -441,22 +511,22 @@ function popup_menu_Callback(source, eventdata, handles) assignin('base', 'VARPQ', VARPQ); case 'Block D Winter' - plot(h2,xdiscretized,ActivePower_dataDWinter); + plot(h2,xdiscretized*10,ActivePower_dataDWinter*10); title(h2,'Active Power Block D during the Winter'); ylabel(h2,'Active Power (kW)'); grid(h2,'on'); - plot(h3,xdiscretized,ActivePower_dataDWinter/10,'r'); + plot(h3,xdiscretized*10,ActivePower_dataDWinter,'r'); xlabel(h3,'Time (Hours)'); ylabel(h3,'Reactive Power (kVAR)'); title(h3,'Reactive Power Block D during the Winter'); grid(h3,'on'); % Vector Data for the Simulink (Insolation) - VARins = [xdiscretized;Ins_W]; + VARins = [xdiscretized;Ins_W'/1000]; % Vector Data for the Simulink (Temperature) VARTemp = [xdiscretized;Temp3]; % Vector Data for the Simulink (Power) - VARPA= [xdiscretized;ActivePower_dataDWinter]; - VARPQ= [xdiscretized;ActivePower_dataDWinter/10]; + VARPA= [xdiscretized;ActivePower_dataDWinter*10]; + VARPQ= [xdiscretized;ActivePower_dataDWinter]; % Write Data vectors in the workspace for the Simulink assignin('base', 'VARins', VARins); assignin('base', 'VARTemp', VARTemp); @@ -466,22 +536,22 @@ function popup_menu_Callback(source, eventdata, handles) % User selects Block E %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% case 'Block E Monsoon' - plot(h2,xdiscretized,ActivePower_dataEMonsoon); + plot(h2,xdiscretized*10,ActivePower_dataEMonsoon*10); title(h2,'Active Power Block E during the Monsoon'); ylabel(h2,'Active Power (kW)'); grid(h2,'on'); - plot(h3,xdiscretized,ActivePower_dataEMonsoon/10,'r'); + plot(h3,xdiscretized*10,ActivePower_dataEMonsoon,'r'); xlabel(h3,'Time (Hours)'); ylabel(h3,'Reactive Power (kVAR)'); title(h3,'Reactive Power Block E during the Monsoon'); grid(h3,'on'); % Vector Data for the Simulink (Insolation) - VARins = [xdiscretized;Ins_M]; + VARins = [xdiscretized;Ins_M'/1000]; % Vector Data for the Simulink (Temperature) VARTemp= [xdiscretized;Temp1]; % Vector Data for the Simulink (Power) - VARPA= [xdiscretized;ActivePower_dataEMonsoon]; - VARPQ= [xdiscretized;ActivePower_dataEMonsoon/10]; + VARPA= [xdiscretized;ActivePower_dataEMonsoon*10]; + VARPQ= [xdiscretized;ActivePower_dataEMonsoon]; % Write Data vectors in the workspace for the Simulink assignin('base', 'VARins', VARins); assignin('base', 'VARTemp', VARTemp); @@ -489,22 +559,22 @@ function popup_menu_Callback(source, eventdata, handles) assignin('base', 'VARPQ', VARPQ); case 'Block E Intermediate' - plot(h2,xdiscretized,ActivePower_dataEIntermediate); + plot(h2,xdiscretized*10,ActivePower_dataEIntermediate*10); title(h2,'Active Power Block E during the Intermediate Season'); ylabel(h2,'Active Power (kW)'); grid(h2,'on'); - plot(h3,xdiscretized,ActivePower_dataEIntermediate/10,'r'); + plot(h3,xdiscretized*10,ActivePower_dataEIntermediate,'r'); xlabel(h3,'Time (Hours)'); ylabel(h3,'Reactive Power (kVAR)'); title(h3,'Reactive Power Block E during the Intermediate Season') grid(h3,'on'); % Vector Data for the Simulink (Insolation) - VARins = [xdiscretized;Ins_I]; + VARins = [xdiscretized;Ins_I'/1000]; % Vector Data for the Simulink (Temperature) VARTemp = [xdiscretized;Temp2]; % Vector Data for the Simulink (Power) - VARPA= [xdiscretized;ActivePower_dataEIntermediate]; - VARPQ= [xdiscretized;ActivePower_dataEIntermediate/10]; + VARPA= [xdiscretized;ActivePower_dataEIntermediate*10]; + VARPQ= [xdiscretized;ActivePower_dataEIntermediate]; % Write Data vectors in the workspace for the Simulink assignin('base', 'VARins', VARins); assignin('base', 'VARTemp', VARTemp); @@ -512,22 +582,22 @@ function popup_menu_Callback(source, eventdata, handles) assignin('base', 'VARPQ', VARPQ); case 'Block E Winter' - plot(h2,xdiscretized,ActivePower_dataEWinter); + plot(h2,xdiscretized*10,ActivePower_dataEWinter*10); title(h2,'Active Power Block E during the Winter'); ylabel(h2,'Active Power (kW)'); grid(h2,'on'); - plot(h3,xdiscretized,ActivePower_dataEWinter/10,'r'); + plot(h3,xdiscretized*10,ActivePower_dataEWinter,'r'); xlabel(h3,'Time (Hours)'); ylabel(h3,'Reactive Power (kVAR)'); title(h3,'Reactive Power Block E during the Winter'); grid(h3,'on'); % Vector Data for the Simulink (Insolation) - VARins = [xdiscretized;Ins_W]; + VARins = [xdiscretized;Ins_W'/1000]; % Vector Data for the Simulink (Temperature) VARTemp = [xdiscretized;Temp3]; % Vector Data for the Simulink (Power) - VARPA= [xdiscretized;ActivePower_dataEWinter]; - VARPQ= [xdiscretized;ActivePower_dataEWinter/10]; + VARPA= [xdiscretized;ActivePower_dataEWinter*10]; + VARPQ= [xdiscretized;ActivePower_dataEWinter]; % Write Data vectors in the workspace for the Simulink assignin('base', 'VARins', VARins); assignin('base', 'VARTemp', VARTemp); @@ -537,22 +607,22 @@ function popup_menu_Callback(source, eventdata, handles) % User selects Block C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% case 'Block C Monsoon' - plot(h2,xdiscretized,ActivePower_dataCMonsoon); + plot(h2,xdiscretized*10,ActivePower_dataCMonsoon*10); title(h2,'Active Power Block C during the Monsoon'); ylabel(h2,'Active Power (kW)'); grid(h2,'on'); - plot(h3,xdiscretized,ActivePower_dataCMonsoon/10,'r'); + plot(h3,xdiscretized*10,ActivePower_dataCMonsoon,'r'); xlabel(h3,'Time (Hours)'); ylabel(h3,'Reactive Power (kVAR)'); title(h3,'Reactive Power Block C during the Monsoon'); grid(h3,'on'); % Vector Data for the Simulink (Insolation) - VARins = [xdiscretized;Ins_M]; + VARins = [xdiscretized;Ins_M'/1000]; % Vector Data for the Simulink (Temperature) VARTemp = [xdiscretized;Temp1]; % Vector Data for the Simulink (Power) - VARPA= [xdiscretized;ActivePower_dataCMonsoon]; - VARPQ= [xdiscretized;ActivePower_dataCMonsoon/10]; + VARPA= [xdiscretized;ActivePower_dataCMonsoon*10]; + VARPQ= [xdiscretized;ActivePower_dataCMonsoon]; % Write Data vectors in the workspace for the Simulink assignin('base', 'VARins', VARins); assignin('base', 'VARTemp', VARTemp); @@ -560,22 +630,22 @@ function popup_menu_Callback(source, eventdata, handles) assignin('base', 'VARPQ', VARPQ); case 'Block C Intermediate' - plot(h2,xdiscretized,ActivePower_dataCIntermediate); + plot(h2,xdiscretized*10,ActivePower_dataCIntermediate*10); title(h2,'Active Power Block C during the Intermediate Season'); ylabel(h2,'Active Power (kW)'); grid(h2,'on'); - plot(h3,xdiscretized,ActivePower_dataCIntermediate/10,'r'); + plot(h3,xdiscretized*10,ActivePower_dataCIntermediate,'r'); xlabel(h3,'Time (Hours)'); ylabel(h3,'Reactive Power (kVAR)'); title(h3,'Reactive Power Block C during the Intermediate Season'); grid(h3,'on'); % Vector Data for the Simulink (Insolation) - VARins = [xdiscretized;Ins_I]; + VARins = [xdiscretized;Ins_I'/1000]; % Vector Data for the Simulink (Temperature) VARTemp = [xdiscretized;Temp2]; % Vector Data for the Simulink (Power) - VARPA= [xdiscretized;ActivePower_dataCIntermediate]; - VARPQ= [xdiscretized;ActivePower_dataCIntermediate/10]; + VARPA= [xdiscretized;ActivePower_dataCIntermediate*10]; + VARPQ= [xdiscretized;ActivePower_dataCIntermediate]; % Write Data vectors in the workspace for the Simulink assignin('base', 'VARins', VARins); assignin('base', 'VARTemp', VARTemp); @@ -583,22 +653,22 @@ function popup_menu_Callback(source, eventdata, handles) assignin('base', 'VARPQ', VARPQ); case 'Block C Winter' - plot(h2,xdiscretized,ActivePower_dataCWinter); + plot(h2,xdiscretized*10,ActivePower_dataCWinter*10); title(h2,'Active Power Block C during the Winter'); ylabel(h2,'Active Power (kW)'); grid(h2,'on'); - plot(h3,xdiscretized,ActivePower_dataCWinter/10,'r'); + plot(h3,xdiscretized*10,ActivePower_dataCWinter,'r'); xlabel(h3,'Time (Hours)'); ylabel(h3,'Reactive Power (kVAR)'); title(h3,'Reactive Power Block C during the Winter'); grid(h3,'on'); % Vector Data for the Simulink (Insolation) - VARins = [xdiscretized;Ins_W]; + VARins = [xdiscretized;Ins_W'/1000]; % Vector Data for the Simulink (Temperature) VARTemp = [xdiscretized;Temp3]; % Vector Data for the Simulink (Power) - VARPA= [xdiscretized;ActivePower_dataCWinter]; - VARPQ= [xdiscretized;ActivePower_dataCWinter/10]; + VARPA= [xdiscretized;ActivePower_dataCWinter*10]; + VARPQ= [xdiscretized;ActivePower_dataCWinter]; % Write Data vectors in the workspace for the Simulink assignin('base', 'VARins', VARins); assignin('base', 'VARTemp', VARTemp); @@ -608,22 +678,22 @@ function popup_menu_Callback(source, eventdata, handles) % User selects Block A %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% case 'Block A Monsoon' - plot(h2,xdiscretized,ActivePower_dataAMonsoon); + plot(h2,xdiscretized*10,ActivePower_dataAMonsoon*10); title(h2,'Active Power Block A during the Monsoon'); ylabel(h2,'Active Power (kW)'); grid(h2,'on'); - plot(h3,xdiscretized,ActivePower_dataAMonsoon/10,'r'); + plot(h3,xdiscretized*10,ActivePower_dataAMonsoon,'r'); xlabel(h3,'Time (Hours)'); ylabel(h3,'Reactive Power (kVAR)'); title(h3,'Reactive Power Block A during the Monsoon'); grid(h3,'on'); % Vector Data for the Simulink (Insolation) - VARins = [xdiscretized;Ins_M]; + VARins = [xdiscretized;Ins_M'/1000]; % Vector Data for the Simulink (Temperature) VARTemp = [xdiscretized;Temp1]; % Vector Data for the Simulink (Power) - VARPA= [xdiscretized;ActivePower_dataAMonsoon]; - VARPQ= [xdiscretized;ActivePower_dataAMonsoon/10]; + VARPA= [xdiscretized;ActivePower_dataAMonsoon*10]; + VARPQ= [xdiscretized;ActivePower_dataAMonsoon]; % Write Data vectors in the workspace for the Simulink assignin('base', 'VARins', VARins); assignin('base', 'VARTemp', VARTemp); @@ -631,22 +701,22 @@ function popup_menu_Callback(source, eventdata, handles) assignin('base', 'VARPQ', VARPQ); case 'Block A Intermediate' - plot(h2,xdiscretized,ActivePower_dataAIntermediate); + plot(h2,xdiscretized*10,ActivePower_dataAIntermediate*10); title(h2,'Active Power Block A during the Intermediate Season'); ylabel(h2,'Active Power (kW)'); grid(h2,'on'); - plot(h3,xdiscretized,ActivePower_dataAIntermediate/10,'r'); + plot(h3,xdiscretized*10,ActivePower_dataAIntermediate,'r'); xlabel(h3,'Time (Hours)'); ylabel(h3,'Reactive Power (kVAR)'); title(h3,'Reactive Power Block A during the Intermediate Season'); grid(h3,'on'); % Vector Data for the Simulink (Insolation) - VARins = [xdiscretized;Ins_I]; + VARins = [xdiscretized;Ins_I'/1000]; % Vector Data for the Simulink (Temperature) VARTemp = [xdiscretized;Temp2]; % Vector Data for the Simulink (Power) - VARPA= [xdiscretized;ActivePower_dataAIntermediate]; - VARPQ= [xdiscretized;ActivePower_dataAIntermediate/10]; + VARPA= [xdiscretized;ActivePower_dataAIntermediate*10]; + VARPQ= [xdiscretized;ActivePower_dataAIntermediate]; % Write Data vectors in the workspace for the Simulink assignin('base', 'VARins', VARins); assignin('base', 'VARTemp', VARTemp); @@ -654,22 +724,22 @@ function popup_menu_Callback(source, eventdata, handles) assignin('base', 'VARPQ', VARPQ); case 'Block A Winter' - plot(h2,xdiscretized,ActivePower_dataAWinter); + plot(h2,xdiscretized*10,ActivePower_dataAWinter*10); title(h2,'Active Power Block A during the Winter'); ylabel(h2,'Active Power (kW)'); grid(h2,'on'); - plot(h3,xdiscretized,ActivePower_dataAWinter/10,'r'); + plot(h3,xdiscretized*10,ActivePower_dataAWinter,'r'); xlabel(h3,'Time (Hours)'); ylabel(h3,'Reactive Power (kVAR)'); title(h3,'Reactive Power Block A during the Winter'); grid(h3,'on'); % Vector Data for the Simulink (Insolation) - VARins = [xdiscretized;Ins_W]; + VARins = [xdiscretized;Ins_W'/1000]; % Vector Data for the Simulink (Temperature) VARTemp = [xdiscretized;Temp3]; % Vector Data for the Simulink (Power) - VARPA= [xdiscretized;ActivePower_dataAWinter]; - VARPQ= [xdiscretized;ActivePower_dataAWinter/10]; + VARPA= [xdiscretized;ActivePower_dataAWinter*10]; + VARPQ= [xdiscretized;ActivePower_dataAWinter]; % Write Data vectors in the workspace for the Simulink assignin('base', 'VARins', VARins); assignin('base', 'VARTemp', VARTemp); @@ -679,22 +749,22 @@ function popup_menu_Callback(source, eventdata, handles) % User selects Block B %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% case 'Block B Monsoon' - plot(h2,xdiscretized,ActivePower_dataBMonsoon); + plot(h2,xdiscretized*10,ActivePower_dataBMonsoon*10); title(h2,'Active Power Block B during the Monsoon'); ylabel(h2,'Active Power (kW)'); grid(h2,'on'); - plot(h3,xdiscretized,ActivePower_dataBMonsoon/10,'r'); + plot(h3,xdiscretized*10,ActivePower_dataBMonsoon,'r'); xlabel(h3,'Time (Hours)'); ylabel(h3,'Reactive Power (kVAR)'); title(h3,'Reactive Power Block B during the Monsoon'); grid(h3,'on'); % Vector Data for the Simulink (Insolation) - VARins = [xdiscretized;Ins_M]; + VARins = [xdiscretized;Ins_M'/1000]; % Vector Data for the Simulink (Temperature) VARTemp = [xdiscretized;Temp1]; % Vector Data for the Simulink (Power) - VARPA= [xdiscretized;ActivePower_dataBMonsoon]; - VARPQ= [xdiscretized;ActivePower_dataBMonsoon/10]; + VARPA= [xdiscretized;ActivePower_dataBMonsoon*10]; + VARPQ= [xdiscretized;ActivePower_dataBMonsoon]; % Write Data vectors in the workspace for the Simulink assignin('base', 'VARins', VARins); assignin('base', 'VARTemp', VARTemp); @@ -702,22 +772,22 @@ function popup_menu_Callback(source, eventdata, handles) assignin('base', 'VARPQ', VARPQ); case 'Block B Intermediate' - plot(h2,xdiscretized,ActivePower_dataBIntermediate); + plot(h2,xdiscretized*10,ActivePower_dataBIntermediate*10); title(h2,'Active Power Block B during the Intermediate Season'); ylabel(h2,'Active Power (kW)'); grid(h2,'on'); - plot(h3,xdiscretized,ActivePower_dataBIntermediate/10,'r'); + plot(h3,xdiscretized*10,ActivePower_dataBIntermediate,'r'); xlabel(h3,'Time (Hours)'); ylabel(h3,'Reactive Power (kVAR)'); title(h3,'Reactive Power Block B during the Intermediate Season'); grid(h3,'on'); % Vector Data for the Simulink (Insolation) - VARins = [xdiscretized;Ins_I]; + VARins = [xdiscretized;Ins_I'/1000]; % Vector Data for the Simulink (Temperature) VARTemp = [xdiscretized;Temp2]; % Vector Data for the Simulink (Power) - VARPA= [xdiscretized;ActivePower_dataBIntermediate]; - VARPQ= [xdiscretized;ActivePower_dataBIntermediate/10]; + VARPA= [xdiscretized;ActivePower_dataBIntermediate*10]; + VARPQ= [xdiscretized;ActivePower_dataBIntermediate]; % Write Data vectors in the workspace for the Simulink assignin('base', 'VARins', VARins); assignin('base', 'VARTemp', VARTemp); @@ -725,22 +795,22 @@ function popup_menu_Callback(source, eventdata, handles) assignin('base', 'VARPQ', VARPQ); case 'Block B Winter' - plot(h2,xdiscretized,ActivePower_dataBWinter); + plot(h2,xdiscretized*10,ActivePower_dataBWinter*10); title(h2,'Active Power Block B during the Winter'); ylabel(h2,'Active Power (kW)'); grid(h2,'on'); - plot(h3,xdiscretized,ActivePower_dataBWinter/10,'r'); + plot(h3,xdiscretized*10,ActivePower_dataBWinter,'r'); xlabel(h3,'Time (Hours)'); ylabel(h3,'Reactive Power (kVAR)'); title(h3,'Reactive Power Block B during the Winter'); grid(h3,'on'); % Vector Data for the Simulink (Insolation) - VARins = [xdiscretized;Ins_W]; + VARins = [xdiscretized;Ins_W'/1000]; % Vector Data for the Simulink (Temperature) VARTemp = [xdiscretized;Temp3]; % Vector Data for the Simulink (Power) - VARPA= [xdiscretized;ActivePower_dataBWinter]; - VARPQ= [xdiscretized;ActivePower_dataBWinter/10]; + VARPA= [xdiscretized;ActivePower_dataBWinter*10]; + VARPQ= [xdiscretized;ActivePower_dataBWinter]; % Write Data vectors in the workspace for the Simulink assignin('base', 'VARins', VARins); assignin('base', 'VARTemp', VARTemp); @@ -750,22 +820,22 @@ function popup_menu_Callback(source, eventdata, handles) % User selects Block LH %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% case 'Block LH Monsoon' - plot(h2,xdiscretized,ActivePower_dataLHMonsoon); + plot(h2,xdiscretized*10,ActivePower_dataLHMonsoon*10); title(h2,'Active Power Block LH during the Monsoon'); ylabel(h2,'Active Power (kW)'); grid(h2,'on'); - plot(h3,xdiscretized,ActivePower_dataLHMonsoon/10,'r'); + plot(h3,xdiscretized*10,ActivePower_dataLHMonsoon,'r'); xlabel(h3,'Time (Hours)'); ylabel(h3,'Reactive Power (kVAR)'); title(h3,'Reactive Power Block LH during the Monsoon'); grid(h3,'on'); % Vector Data for the Simulink (Insolation) - VARins = [xdiscretized;Ins_M]; + VARins = [xdiscretized;Ins_M'/1000]; % Vector Data for the Simulink (Temperature) VARTemp = [xdiscretized;Temp1]; % Vector Data for the Simulink (Power) - VARPA= [xdiscretized;ActivePower_dataLHMonsoon]; - VARPQ= [xdiscretized;ActivePower_dataLHMonsoon/10]; + VARPA= [xdiscretized;ActivePower_dataLHMonsoon*10]; + VARPQ= [xdiscretized;ActivePower_dataLHMonsoon]; % Write Data vectors in the workspace for the Simulink assignin('base', 'VARins', VARins); assignin('base', 'VARTemp', VARTemp); @@ -773,22 +843,22 @@ function popup_menu_Callback(source, eventdata, handles) assignin('base', 'VARPQ', VARPQ); case 'Block LH Intermediate' - plot(h2,xdiscretized,ActivePower_dataLHIntermediate); + plot(h2,xdiscretized*10,ActivePower_dataLHIntermediate*10); title(h2,'Active Power Block LH during the Intermediate Season'); ylabel(h2,'Active Power (kW)'); grid(h2,'on'); - plot(h3,xdiscretized,ActivePower_dataLHIntermediate/10,'r'); + plot(h3,xdiscretized*10,ActivePower_dataLHIntermediate,'r'); xlabel(h3,'Time (Hours)'); ylabel(h3,'Reactive Power (kVAR)'); title(h3,'Reactive Power Block LH during the Intermediate Season'); grid(h3,'on'); % Vector Data for the Simulink (Insolation) - VARins = [xdiscretized;Ins_I]; + VARins = [xdiscretized;Ins_I'/1000]; % Vector Data for the Simulink (Temperature) VARTemp = [xdiscretized;Temp2]; % Vector Data for the Simulink (Power) - VARPA= [xdiscretized;ActivePower_dataLHIntermediate]; - VARPQ= [xdiscretized;ActivePower_dataLHIntermediate/10]; + VARPA= [xdiscretized;ActivePower_dataLHIntermediate*10]; + VARPQ= [xdiscretized;ActivePower_dataLHIntermediate]; % Write Data vectors in the workspace for the Simulink assignin('base', 'VARins', VARins); assignin('base', 'VARTemp', VARTemp); @@ -796,22 +866,22 @@ function popup_menu_Callback(source, eventdata, handles) assignin('base', 'VARPQ', VARPQ); case 'Block LH Winter' - plot(h2,xdiscretized,ActivePower_dataLHWinter); + plot(h2,xdiscretized*10,ActivePower_dataLHWinter*10); title(h2,'Active Power Block LH during the Winter'); ylabel(h2,'Active Power (kW)'); grid(h2,'on'); - plot(h3,xdiscretized,ActivePower_dataLHWinter/10,'r'); + plot(h3,xdiscretized*10,ActivePower_dataLHWinter,'r'); xlabel(h3,'Time (Hours)'); ylabel(h3,'Reactive Power (kVAR)'); title(h3,'Reactive Power Block LH during the Winter'); grid(h3,'on'); % Vector Data for the Simulink (Insolation) - VARins = [xdiscretized;Ins_W]; + VARins = [xdiscretized;Ins_W'/1000]; % Vector Data for the Simulink (Temperature) VARTemp = [xdiscretized;Temp3]; % Vector Data for the Simulink (Power) - VARPA= [xdiscretized;ActivePower_dataLHWinter]; - VARPQ= [xdiscretized;ActivePower_dataLHWinter/10]; + VARPA= [xdiscretized;ActivePower_dataLHWinter*10]; + VARPQ= [xdiscretized;ActivePower_dataLHWinter]; % Write Data vectors in the workspace for the Simulink assignin('base', 'VARins', VARins); assignin('base', 'VARTemp', VARTemp); @@ -821,22 +891,22 @@ function popup_menu_Callback(source, eventdata, handles) % User selects Block RH %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% case 'Block RH Monsoon' - plot(h2,xdiscretized,ActivePower_dataRHMonsoon); + plot(h2,xdiscretized*10,ActivePower_dataRHMonsoon*10); title(h2,'Active Power Block RH during the Monsoon'); ylabel(h2,'Active Power (kW)'); grid(h2,'on'); - plot(h3,xdiscretized,ActivePower_dataRHMonsoon/10,'r'); + plot(h3,xdiscretized*10,ActivePower_dataRHMonsoon,'r'); xlabel(h3,'Time (Hours)'); ylabel(h3,'Reactive Power (kVAR)'); title(h3,'Reactive Power Block RH during the Monsoon'); grid(h3,'on'); % Vector Data for the Simulink (Insolation) - VARins = [xdiscretized;Ins_M]; + VARins = [xdiscretized;Ins_M'/1000]; % Vector Data for the Simulink (Temperature) VARTemp = [xdiscretized;Temp1]; % Vector Data for the Simulink (Power) - VARPA= [xdiscretized;ActivePower_dataRHMonsoon]; - VARPQ= [xdiscretized;ActivePower_dataRHMonsoon/10]; + VARPA= [xdiscretized;ActivePower_dataRHMonsoon*10]; + VARPQ= [xdiscretized;ActivePower_dataRHMonsoon]; % Write Data vectors in the workspace for the Simulink assignin('base', 'VARins', VARins); assignin('base', 'VARTemp', VARTemp); @@ -844,22 +914,22 @@ function popup_menu_Callback(source, eventdata, handles) assignin('base', 'VARPQ', VARPQ); case 'Block RH Intermediate' - plot(h2,xdiscretized,ActivePower_dataRHIntermediate); + plot(h2,xdiscretized*10,ActivePower_dataRHIntermediate*10); title(h2,'Active Power Block RH during the Intermediate Season'); ylabel(h2,'Active Power (kW)'); grid(h2,'on'); - plot(h3,xdiscretized,ActivePower_dataRHIntermediate/10,'r'); + plot(h3,xdiscretized*10,ActivePower_dataRHIntermediate,'r'); xlabel(h3,'Time (Hours)'); ylabel(h3,'Reactive Power (kVAR)'); title(h3,'Reactive Power Block RH during the Intermediate Season'); grid(h3,'on'); % Vector Data for the Simulink (Insolation) - VARins = [xdiscretized;Ins_I]; + VARins = [xdiscretized;Ins_I'/1000]; % Vector Data for the Simulink (Temperature) VARTemp = [xdiscretized;Temp2]; % Vector Data for the Simulink (Power) - VARPA= [xdiscretized;ActivePower_dataRHIntermediate]; - VARPQ= [xdiscretized;ActivePower_dataRHIntermediate/10]; + VARPA= [xdiscretized;ActivePower_dataRHIntermediate*10]; + VARPQ= [xdiscretized;ActivePower_dataRHIntermediate]; % Write Data vectors in the workspace for the Simulink assignin('base', 'VARins', VARins); assignin('base', 'VARTemp', VARTemp); @@ -867,22 +937,22 @@ function popup_menu_Callback(source, eventdata, handles) assignin('base', 'VARPQ', VARPQ); case 'Block RH Winter' - plot(h2,xdiscretized,ActivePower_dataRHWinter); + plot(h2,xdiscretized*10,ActivePower_dataRHWinter*10); title(h2,'Active Power Block RH during the Winter'); ylabel(h2,'Active Power (kW)'); grid(h2,'on'); - plot(h3,xdiscretized,ActivePower_dataRHWinter/10,'r'); + plot(h3,xdiscretized*10,ActivePower_dataRHWinter,'r'); xlabel(h3,'Time (Hours)'); ylabel(h3,'Reactive Power (kVAR)'); title(h3,'Reactive Power Block RH during the Winter'); grid(h3,'on'); % Vector Data for the Simulink (Insolation) - VARins = [xdiscretized;Ins_W]; + VARins = [xdiscretized;Ins_W'/1000]; % Vector Data for the Simulink (Temperature) VARTemp = [xdiscretized;Temp3]; % Vector Data for the Simulink (Power) - VARPA= [xdiscretized;ActivePower_dataRHWinter]; - VARPQ= [xdiscretized;ActivePower_dataRHWinter/10]; + VARPA= [xdiscretized;ActivePower_dataRHWinter*10]; + VARPQ= [xdiscretized;ActivePower_dataRHWinter]; % Write Data vectors in the workspace for the Simulink assignin('base', 'VARins', VARins); assignin('base', 'VARTemp', VARTemp); @@ -898,7 +968,7 @@ function popup_menu_Callback(source, eventdata, handles) function monsoonbutton_Callback(source, eventdata, handles) % Plot monsoon season from dataBase -plot(h1,xdiscretized,Ins_M,'r'); +plot(h1,xdiscretized*10,Ins_M,'r'); xlabel(h1,'Time (Hours)'); ylabel(h1,'Insolation (W/m˛)'); title(h1,'Insolation during the Monsoon'); @@ -919,7 +989,7 @@ function monsoonbutton_Callback(source, eventdata, handles) function intermediatebutton_Callback(source, eventdata, handles) % Plot intemediate season from dataBase -plot(h1,xdiscretized,Ins_I,'m'); +plot(h1,xdiscretized*10,Ins_I,'m'); xlabel(h1,'Time (Hours)'); ylabel(h1,'Insolation (W/m˛)'); title(h1,'Insolation during the Intermediate Season'); @@ -941,7 +1011,7 @@ function intermediatebutton_Callback(source, eventdata, handles) function winterbutton_Callback(source, eventdata, handles) % Plot winter season from dataBase -plot(h1,xdiscretized,Ins_W,'g'); +plot(h1,xdiscretized*10,Ins_W,'g'); xlabel(h1,'Time (Hours)'); ylabel(h1,'Insolation (W/m˛)'); title(h1,'Insolation during the Winter'); @@ -961,10 +1031,7 @@ function winterbutton_Callback(source, eventdata, handles) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function runbutton_Callback(source, eventdata, handles) -start=1; -assignin('base', 'start', start); -message1 = msgbox('Please wait ! This simulation will take few hours'); - + % toggle the buttons %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Turn off the Start button @@ -973,16 +1040,12 @@ function runbutton_Callback(source, eventdata, handles) set(hstop,'Enable','on'); % Turn off the popup menu set(hpopup,'Enable','off'); -% Turn on the update button -set(hupdate,'Enable','on'); +% % Turn on the update button +% set(hupdate,'Enable','on'); % Turn off set(txtbox2,'Enable','off'); set(txtbox1,'Enable','off'); -% update the model %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -set_param(modelName,'SimulationCommand','update'); - % start the model %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% set_param(modelName,'SimulationCommand','start'); @@ -993,7 +1056,7 @@ function runbutton_Callback(source, eventdata, handles) % Callback Function for the stop button %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function stopbutton_Callback(source, eventdata, handles) - + % toggle the buttons %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Turn on the Start button @@ -1002,8 +1065,8 @@ function stopbutton_Callback(source, eventdata, handles) set(hstop,'Enable','off'); % Turn on the popup menu set(hpopup,'Enable','on'); -% Turn off the update button -set(hupdate,'Enable','off'); +% % Turn off the update button +% set(hupdate,'Enable','off'); % Turn on set(txtbox2,'Enable','on'); set(txtbox1,'Enable','on'); @@ -1014,58 +1077,367 @@ function stopbutton_Callback(source, eventdata, handles) end -% function updatebutton_Callback(source, eventdata, handles) +end -function updatebutton_Callback(hObject, eventdata, handles) +function varargout = updategui(varargin) + % Take the data from the simulink %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% SOC -rto1 = get_param('Microgrid_24h_Simulation/Subsystem/Gain1','RuntimeObject'); -% blockData1 = rto1.OutputPort(1).Data; -SOC= rto1.OutputPort(1).Data; - % Time rtoc = get_param('Microgrid_24h_Simulation/Subsystem/Clock','RuntimeObject'); -% clock = rtoc.OutputPort(1).Data; clock= rtoc.OutputPort(1).Data; - -% Execute MATLAB expression in specified workspace(Allow visibility for the GUI) +superclock=[clock;clock;clock]; assignin('base', 'clock', clock); - -plot(h6,clock*100,SOC,'ro'); -xlabel(h6,'Time (Hours)'); -ylabel(h6,'SOC (%)'); -title(h6,'State of charge'); -grid(h6,'on'); - -% Take the data from the simulink %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +assignin('base', 'superclock', superclock); + +% Voltage +rto1 = get_param('Microgrid_24h_Simulation/Subsystem/Gain1','RuntimeObject'); +voltage= rto1.OutputPort(1).Data; +assignin('base','voltage', voltage); % Frequency rto2 = get_param('Microgrid_24h_Simulation/Subsystem/Gain2','RuntimeObject'); -% blockData2 = rto2.OutputPort(1).Data; -F= rto2.OutputPort(1).Data; - -plot(h5,clock*100,F,'ro'); -xlabel(h5,'Time (Hours)'); -ylabel(h5,'f (Hz)'); -title(h5,'Frequency'); -grid(h5,'on'); +frequency= rto2.OutputPort(1).Data; +assignin('base','frequency', frequency); -% Take the data from the simulink %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -% Voltage +% SOC rto3 = get_param('Microgrid_24h_Simulation/Subsystem/Gain3','RuntimeObject'); -% blockData3 = rto3.OutputPort(1).Data; -V= rto3.OutputPort(1).Data; +SOC= rto3.OutputPort(1).Data; +assignin('base', 'SOC', SOC); + + +% Load current +rto4 = get_param('Microgrid_24h_Simulation/Subsystem/Gain4','RuntimeObject'); +current= rto4.OutputPort(1).Data; +assignin('base','current', current); + +% Load active power +rto5 = get_param('Microgrid_24h_Simulation/Subsystem/Gain5','RuntimeObject'); +activepower= rto5.OutputPort(1).Data; +assignin('base','activepower', activepower); + +% Load reactive power +rto6 = get_param('Microgrid_24h_Simulation/Subsystem/Gain6','RuntimeObject'); +reactivepower= rto6.OutputPort(1).Data; +assignin('base','reactivepower', reactivepower); + +% Load chargecontrol +rto7 = get_param('Microgrid_24h_Simulation/Subsystem/Gain7','RuntimeObject'); +chargecontrol= rto7.OutputPort(1).Data; +assignin('base','chargecontrol', chargecontrol); + +% Dynamic upload of the data to files for the plot frequency + +Af=evalin('caller','Af'); +Bf=evalin('caller','Bf'); + + if size(Af)==size(Bf) + + % Open and write the new value of clock in clocktxt + fid = fopen('dataBase/clocktxt.txt','a+'); + fprintf(fid,' %i\n',clock); + fclose(fid) + fid = fopen('dataBase/clocktxt.txt','r'); + Af = fscanf(fid,'%f'); + assignin('base','Af', Af); + fclose(fid); + + % Open and write the new value of frequency in frequencytxt + fid2 = fopen('dataBase/frequencytxt.txt','a+'); + fprintf(fid2,' %i\n',frequency); + fclose(fid2) + fid2 = fopen('dataBase/frequencytxt.txt','r'); + Bf = fscanf(fid2,'%f'); + assignin('base','Bf', Bf); + fclose(fid2); + + elseif size(Bf)size(Af) + + % Open and write the new value of clock in clocktxt + fid = fopen('dataBase/clocktxt.txt','a+'); + fprintf(fid,' %i\n',clock); + fclose(fid) + fid = fopen('dataBase/clocktxt.txt','r'); + Af = fscanf(fid,'%f'); + assignin('base','Af', Af); + fclose(fid); + end + + +% Dynamic upload of the data to files for the plot voltage %%%%%%%%%%%%%%% + +Av=evalin('caller','Av'); +Bv=evalin('caller','Bv'); + + if size(Av)==size(Bv) + + % Open and write the new value of clock in clocktxtvoltage + fidv = fopen('dataBase/clocktxtvoltage.txt','a+'); + fprintf(fidv,' %i\n',superclock); + fclose(fidv) + fidv = fopen('dataBase/clocktxtvoltage.txt','r'); + Av = fscanf(fidv,'%f'); + assignin('base','Av', Av); + fclose(fidv); + + % Open and write the new value of voltage in voltagetxt + fid1 = fopen('dataBase/voltagetxt.txt','a+'); + fprintf(fid1,' %i\n',voltage); + fclose(fid1) + fid1 = fopen('dataBase/voltagetxt.txt','r'); + Bv = fscanf(fid1,'%f'); + assignin('base','Bv', Bv); + fclose(fid1); + + elseif size(Bv)size(Av) + + % Open and write the new value of clock in clocktxtvoltage + fidv = fopen('dataBase/clocktxtvoltage.txt','a+'); + fprintf(fidv,' %i\n',superclock); + fclose(fidv) + fidv = fopen('dataBase/clocktxtvoltage.txt','r'); + Av = fscanf(fidv,'%f'); + assignin('base','Av',Av); + fclose(fidv); + + end + +% Dynamic upload of the data for the plot SOC %%%%%%%%%%%%%%%%%%%%%%%%%%%% + +Asoc=evalin('caller','Asoc'); +Bsoc=evalin('caller','Bsoc'); + + if size(Asoc)==size(Bsoc) + + % Open and write the new value of clock in clocktxtsoc + fidsoc = fopen('dataBase/clocktxtsoc.txt','a+'); + fprintf(fidsoc,' %i\n',clock); + fclose(fidsoc) + % Update the plot + fidsoc = fopen('dataBase/clocktxtsoc.txt','r'); + Asoc = fscanf(fidsoc,'%f'); + assignin('base','Asoc', Asoc); + fclose(fidsoc); + + % Open and write the new value of SOC in soctxt + fid3 = fopen('dataBase/soctxt.txt','a+'); + fprintf(fid3,' %i\n',SOC); + fclose(fid3) + fid3 = fopen('dataBase/soctxt.txt','r'); + Bsoc = fscanf(fid3,'%f'); + assignin('base','Bsoc', Bsoc); + fclose(fid3); + + elseif size(Bsoc)size(Asoc) + + % Open and write the new value of SOC in soctxt + fidsoc = fopen('dataBase/clocktxtsoc.txt','a+'); + fprintf(fidsoc,' %i\n',clock); + fclose(fidsoc) + fidsoc = fopen('dataBase/clocktxtsoc.txt','r'); + Af = fscanf(fidsoc,'%f'); + assignin('base','Asoc', Asoc); + fclose(fidsoc); + end + +% Dynamic upload of the data to file for the plot current %%%%%%%%%%%%%%%% + +Acurrent=evalin('caller','Acurrent'); +Bcurrent=evalin('caller','Bcurrent'); + + if size(Acurrent)==size(Bcurrent) + + % Open and write the new value of clock in clocktxtc + fidc = fopen('dataBase/clocktxtc.txt','a+'); + fprintf(fidc,' %i\n',superclock); + fclose(fidc) + fidc = fopen('dataBase/clocktxtc.txt','r'); + Acurrent = fscanf(fidc,'%f'); + assignin('base','Acurrent', Acurrent); + fclose(fidc); + + % Open and write the new value of current in currenttxt + fid4 = fopen('dataBase/currenttxt.txt','a+'); + fprintf(fid4,' %i\n',current); + fclose(fid4) + fid4 = fopen('dataBase/currenttxt.txt','r'); + Bcurrent = fscanf(fid4,'%f'); + assignin('base','Bcurrent', Bcurrent); + fclose(fid4); + + elseif size(Bcurrent)size(Acurrent) + + % Open and write the new value of clock in clocktxtc + fidc = fopen('dataBase/clocktxtc.txt','a+'); + fprintf(fidc,' %i\n',superclock); + fclose(fidc) + fidc = fopen('dataBase/clocktxtc.txt','r'); + Acurrent = fscanf(fidc,'%f'); + assignin('base','Acurrent',Acurrent); + fclose(fidc); + + end + +% Dynamic upload of the data to file for the plot Active power %%%%%%%%%%% + +Aactivepower=evalin('caller','Aactivepower'); +Bactivepower=evalin('caller','Bactivepower'); + + if size(Aactivepower)==size(Bactivepower) + + % Open and write the new value of clock in clocktxtap + fidap = fopen('dataBase/clocktxtap.txt','a+'); + fprintf(fidap,' %i\n',clock); + fclose(fidap) + % Update the plot + fidap = fopen('dataBase/clocktxtap.txt','r'); + Aactivepower = fscanf(fidap,'%f'); + assignin('base','Aactivepower', Aactivepower); + fclose(fidap); + + % Open and write the new value of SOC in soctxt + fid5 = fopen('dataBase/activepowertxt.txt','a+'); + fprintf(fid5,' %i\n',activepower); + fclose(fid5) + fid5 = fopen('dataBase/activepowertxt.txt','r'); + Bactivepower = fscanf(fid5,'%f'); + assignin('base','Bactivepower', Bactivepower); + fclose(fid5); + + elseif size(Bactivepower)size(Aactivepower) + + % Open and write the new value of SOC in clocktxtap + fidap = fopen('dataBase/clocktxtap.txt','a+'); + fprintf(fidap,' %i\n',clock); + fclose(fidap) + fidap= fopen('dataBase/clocktxtap.txt','r'); + Aactivepower = fscanf(fidap,'%f'); + assignin('base','Aactivepower', Aactivepower); + fclose(fidap); + end + +% Dynamic upload of the data to file for the plot Reactive power %%%%%%%%% + +Areactivepower=evalin('caller','Areactivepower'); +Breactivepower=evalin('caller','Breactivepower'); + + if size(Areactivepower)==size(Breactivepower) + + % Open and write the new value of clock in clocktxtrap + fidrap = fopen('dataBase/clocktxtrap.txt','a+'); + fprintf(fidrap,' %i\n',clock); + fclose(fidrap) + % Update the plot + fidrap = fopen('dataBase/clocktxtrap.txt','r'); + Areactivepower = fscanf(fidrap,'%f'); + assignin('base','Areactivepower', Areactivepower); + fclose(fidrap); + + % Open and write the new value of SOC in reactivepowertxt + fid5 = fopen('dataBase/reactivepowertxt.txt','a+'); + fprintf(fid5,' %i\n',reactivepower); + fclose(fid5) + fid5 = fopen('dataBase/reactivepowertxt.txt','r'); + Breactivepower = fscanf(fid5,'%f'); + assignin('base','Breactivepower', Breactivepower); + fclose(fid5); + + elseif size(Breactivepower)size(Areactivepower) + + % Open and write the new value of SOC in clocktxtrap + fidap = fopen('dataBase/clocktxtrap.txt','a+'); + fprintf(fidap,' %i\n',clock); + fclose(fidap) + fidap= fopen('dataBase/clocktxtrap.txt','r'); + Areactivepower = fscanf(fidap,'%f'); + assignin('base','Areactivepower', Areactivepower); + fclose(fidap); + end + +% Dynamic upload of the data to file for the control charge %%%%%%%%%%%%%% + + Achargecontrol=evalin('caller','Achargecontrol'); + + % Open and write the new value of controlcharge in chargecontroltxt + fid7 = fopen('dataBase/chargecontroltxt.txt','a+'); + fprintf(fid7,' %i\n',chargecontrol); + fclose(fid7) + fid7= fopen('dataBase/chargecontroltxt.txt','r'); + Achargecontrol = fscanf(fid7,'%f'); + assignin('base','Achargecontrol', Achargecontrol); + fclose(fid7); + + +% Updating Graphs with refreshdata +refreshdata -plot(h4,clock*100,V,'ro'); -xlabel(h4,'Time (Hours)'); -ylabel(h4,'Voltage (V)'); -title(h4,'Voltage Grid'); -grid(h4,'on'); - -end end diff --git a/src/updategui.m b/src/updategui.m new file mode 100644 index 0000000..4dfbaf5 --- /dev/null +++ b/src/updategui.m @@ -0,0 +1,3 @@ +function varargout = updategui(varargin) +% Avoid error when you run the simulation without GUI +end \ No newline at end of file