power_wind_dfig.mdl
上传用户:sdgangguan
上传日期:2017-10-18
资源大小:179k
文件大小:487k
开发平台:

Matlab

  1. Model {
  2.   Name   "power_wind_dfig"
  3.   Version   6.3
  4.   MdlSubVersion   0
  5.   GraphicalInterface {
  6.     NumRootInports     0
  7.     NumRootOutports     0
  8.     ParameterArgumentNames  ""
  9.     ComputedModelVersion    "1.538"
  10.     NumModelReferences     0
  11.     NumTestPointedSignals   0
  12.   }
  13.   SavedCharacterEncoding  "US-ASCII"
  14.   SaveDefaultBlockParams  on
  15.   SampleTimeColors   off
  16.   LibraryLinkDisplay   "none"
  17.   WideLines   off
  18.   ShowLineDimensions   off
  19.   ShowPortDataTypes   off
  20.   ShowLoopsOnError   on
  21.   IgnoreBidirectionalLines off
  22.   ShowStorageClass   off
  23.   ShowTestPointIcons   on
  24.   ShowViewerIcons   on
  25.   SortedOrder   off
  26.   ExecutionContextIcon   off
  27.   ShowLinearizationAnnotations on
  28.   RecordCoverage   off
  29.   CovPath   "/"
  30.   CovSaveName   "covdata"
  31.   CovMetricSettings   "dw"
  32.   CovNameIncrementing   off
  33.   CovHtmlReporting   on
  34.   covSaveCumulativeToWorkspaceVar on
  35.   CovSaveSingleToWorkspaceVar on
  36.   CovCumulativeVarName   "covCumulativeData"
  37.   CovCumulativeReport   off
  38.   CovReportOnPause   on
  39.   ScopeRefreshTime   0.035000
  40.   OverrideScopeRefreshTime on
  41.   DisableAllScopes   off
  42.   DataTypeOverride   "UseLocalSettings"
  43.   MinMaxOverflowLogging   "UseLocalSettings"
  44.   MinMaxOverflowArchiveMode "Overwrite"
  45.   BlockNameDataTip   off
  46.   BlockParametersDataTip  off
  47.   BlockDescriptionStringDataTip off
  48.   ToolBar   on
  49.   StatusBar   on
  50.   BrowserShowLibraryLinks off
  51.   BrowserLookUnderMasks   off
  52.   InitFcn   "load power_wind_dfig_xinit"
  53.   Created   "Fri Dec 05 09:05:34 2003"
  54.   Creator   "batserve"
  55.   UpdateHistory   "UpdateHistoryNever"
  56.   ModifiedByFormat   "%<Auto>"
  57.   LastModifiedBy   "Administrator"
  58.   ModifiedDateFormat   "%<Auto>"
  59.   LastModifiedDate   "Wed May 20 10:07:55 2009"
  60.   ModelVersionFormat   "1.%<AutoIncrement:538>"
  61.   ConfigurationManager   "None"
  62.   LinearizationMsg   "none"
  63.   Profile   off
  64.   ParamWorkspaceSource   "MATLABWorkspace"
  65.   AccelSystemTargetFile   "accel.tlc"
  66.   AccelTemplateMakefile   "accel_default_tmf"
  67.   AccelMakeCommand   "make_rtw"
  68.   TryForcingSFcnDF   off
  69.   ExtModeBatchMode   off
  70.   ExtModeEnableFloating   on
  71.   ExtModeTrigType   "manual"
  72.   ExtModeTrigMode   "normal"
  73.   ExtModeTrigPort   "1"
  74.   ExtModeTrigElement   "any"
  75.   ExtModeTrigDuration   1000
  76.   ExtModeTrigDurationFloating "auto"
  77.   ExtModeTrigHoldOff   0
  78.   ExtModeTrigDelay   0
  79.   ExtModeTrigDirection   "rising"
  80.   ExtModeTrigLevel   0
  81.   ExtModeArchiveMode   "off"
  82.   ExtModeAutoIncOneShot   off
  83.   ExtModeIncDirWhenArm   off
  84.   ExtModeAddSuffixToVar   off
  85.   ExtModeWriteAllDataToWs off
  86.   ExtModeArmWhenConnect   on
  87.   ExtModeSkipDownloadWhenConnect off
  88.   ExtModeLogAll   on
  89.   ExtModeAutoUpdateStatusClock off
  90.   BufferReuse   on
  91.   StrictBusMsg   "None"
  92.   ProdHWDeviceType   "32-bit Generic"
  93.   ShowModelReferenceBlockVersion off
  94.   ShowModelReferenceBlockIO off
  95.   Array {
  96.     Type     "Handle"
  97.     Dimension     1
  98.     Simulink.ConfigSet {
  99.       $ObjectID       1
  100.       Version       "1.1.0"
  101.       Array {
  102. Type "Handle"
  103. Dimension 7
  104. Simulink.SolverCC {
  105.   $ObjectID   2
  106.   Version   "1.1.0"
  107.   StartTime   "0.0"
  108.   StopTime   "50"
  109.   AbsTol   "1e-3"
  110.   FixedStep   "auto"
  111.   InitialStep   "auto"
  112.   MaxNumMinSteps   "-1"
  113.   MaxOrder   5
  114.   ExtrapolationOrder   4
  115.   NumberNewtonIterations  1
  116.   MaxStep   "1/60"
  117.   MinStep   "auto"
  118.   RelTol   "1e-4"
  119.   SolverMode   "Auto"
  120.   Solver   "ode23tb"
  121.   SolverName   "ode23tb"
  122.   ZeroCrossControl   "UseLocalSettings"
  123.   AlgebraicLoopSolver   "TrustRegion"
  124.   SolverResetMethod   "Fast"
  125.   PositivePriorityOrder   off
  126.   AutoInsertRateTranBlk   off
  127.   SampleTimeConstraint   "Unconstrained"
  128.   RateTranMode   "Deterministic"
  129. }
  130. Simulink.DataIOCC {
  131.   $ObjectID   3
  132.   Version   "1.1.0"
  133.   Decimation   "1"
  134.   ExternalInput   "[t, u]"
  135.   FinalStateName   "xFinal"
  136.   InitialState   "xInitial"
  137.   LimitDataPoints   on
  138.   MaxDataPoints   "1000"
  139.   LoadExternalInput   off
  140.   LoadInitialState   on
  141.   SaveFinalState   on
  142.   SaveFormat   "Array"
  143.   SaveOutput   on
  144.   SaveState   off
  145.   SignalLogging   on
  146.   InspectSignalLogs   off
  147.   SaveTime   on
  148.   StateSaveName   "xout"
  149.   TimeSaveName   "tout"
  150.   OutputSaveName   "yout"
  151.   SignalLoggingName   "sigsOut"
  152.   OutputOption   "RefineOutputTimes"
  153.   OutputTimes   "[]"
  154.   Refine   "1"
  155. }
  156. Simulink.OptimizationCC {
  157.   $ObjectID   4
  158.   Array {
  159.     Type     "Cell"
  160.     Dimension     5
  161.     Cell     "ZeroExternalMemoryAtStartup"
  162.     Cell     "ZeroInternalMemoryAtStartup"
  163.     Cell     "InitFltsAndDblsToZero"
  164.     Cell     "OptimizeModelRefInitCode"
  165.     Cell     "NoFixptDivByZeroProtection"
  166.     PropName     "DisabledProps"
  167.   }
  168.   Version   "1.1.0"
  169.   BlockReduction   on
  170.   BooleanDataType   on
  171.   ConditionallyExecuteInputs on
  172.   InlineParams   off
  173.   InlineInvariantSignals  on
  174.   OptimizeBlockIOStorage  on
  175.   BufferReuse   on
  176.   EnforceIntegerDowncast  on
  177.   ExpressionFolding   on
  178.   FoldNonRolledExpr   on
  179.   LocalBlockOutputs   on
  180.   ParameterPooling   on
  181.   RollThreshold   5
  182.   SystemCodeInlineAuto   off
  183.   StateBitsets   off
  184.   DataBitsets   off
  185.   UseTempVars   off
  186.   ZeroExternalMemoryAtStartup on
  187.   ZeroInternalMemoryAtStartup on
  188.   InitFltsAndDblsToZero   on
  189.   NoFixptDivByZeroProtection off
  190.   EfficientFloat2IntCast  off
  191.   OptimizeModelRefInitCode off
  192.   LifeSpan   "inf"
  193.   BufferReusableBoundary  on
  194. }
  195. Simulink.DebuggingCC {
  196.   $ObjectID   5
  197.   Version   "1.1.0"
  198.   RTPrefix   "error"
  199.   ConsistencyChecking   "none"
  200.   ArrayBoundsChecking   "none"
  201.   SignalInfNanChecking   "none"
  202.   ReadBeforeWriteMsg   "UseLocalSettings"
  203.   WriteAfterWriteMsg   "UseLocalSettings"
  204.   WriteAfterReadMsg   "UseLocalSettings"
  205.   AlgebraicLoopMsg   "warning"
  206.   ArtificialAlgebraicLoopMsg "warning"
  207.   CheckSSInitialOutputMsg on
  208.   CheckExecutionContextPreStartOutputMsg on
  209.   CheckExecutionContextRuntimeOutputMsg on
  210.   SignalResolutionControl "TryResolveAllWithWarning"
  211.   BlockPriorityViolationMsg "warning"
  212.   MinStepSizeMsg   "warning"
  213.   SolverPrmCheckMsg   "none"
  214.   InheritedTsInSrcMsg   "warning"
  215.   DiscreteInheritContinuousMsg "warning"
  216.   MultiTaskDSMMsg   "warning"
  217.   MultiTaskRateTransMsg   "error"
  218.   SingleTaskRateTransMsg  "none"
  219.   TasksWithSamePriorityMsg "warning"
  220.   SigSpecEnsureSampleTimeMsg "warning"
  221.   CheckMatrixSingularityMsg "none"
  222.   IntegerOverflowMsg   "warning"
  223.   Int32ToFloatConvMsg   "warning"
  224.   ParameterDowncastMsg   "error"
  225.   ParameterOverflowMsg   "error"
  226.   ParameterUnderflowMsg   "none"
  227.   ParameterPrecisionLossMsg "warning"
  228.   UnderSpecifiedDataTypeMsg "none"
  229.   UnnecessaryDatatypeConvMsg "none"
  230.   VectorMatrixConversionMsg "none"
  231.   InvalidFcnCallConnMsg   "error"
  232.   FcnCallInpInsideContextMsg "Use local settings"
  233.   SignalLabelMismatchMsg  "none"
  234.   UnconnectedInputMsg   "warning"
  235.   UnconnectedOutputMsg   "warning"
  236.   UnconnectedLineMsg   "none"
  237.   SFcnCompatibilityMsg   "none"
  238.   UniqueDataStoreMsg   "none"
  239.   BusObjectLabelMismatch  "warning"
  240.   RootOutportRequireBusObject "warning"
  241.   AssertControl   "UseLocalSettings"
  242.   EnableOverflowDetection off
  243.   ModelReferenceIOMsg   "none"
  244.   ModelReferenceVersionMismatchMessage "none"
  245.   ModelReferenceIOMismatchMessage "none"
  246.   ModelReferenceCSMismatchMessage "none"
  247.   ModelReferenceSimTargetVerbose off
  248.   UnknownTsInhSupMsg   "warning"
  249.   ModelReferenceDataLoggingMessage "warning"
  250.   ModelReferenceSymbolNameMessage "warning"
  251.   ModelReferenceExtraNoncontSigs "error"
  252. }
  253. Simulink.HardwareCC {
  254.   $ObjectID   6
  255.   Version   "1.1.0"
  256.   ProdBitPerChar   8
  257.   ProdBitPerShort   16
  258.   ProdBitPerInt   32
  259.   ProdBitPerLong   32
  260.   ProdIntDivRoundTo   "Undefined"
  261.   ProdEndianess   "Unspecified"
  262.   ProdWordSize   32
  263.   ProdShiftRightIntArith  on
  264.   ProdHWDeviceType   "32-bit Generic"
  265.   TargetBitPerChar   8
  266.   TargetBitPerShort   16
  267.   TargetBitPerInt   32
  268.   TargetBitPerLong   32
  269.   TargetShiftRightIntArith on
  270.   TargetIntDivRoundTo   "Undefined"
  271.   TargetEndianess   "Unspecified"
  272.   TargetWordSize   32
  273.   TargetTypeEmulationWarnSuppressLevel 0
  274.   TargetPreprocMaxBitsSint 32
  275.   TargetPreprocMaxBitsUint 32
  276.   TargetHWDeviceType   "Specified"
  277.   TargetUnknown   on
  278.   ProdEqTarget   on
  279. }
  280. Simulink.ModelReferenceCC {
  281.   $ObjectID   7
  282.   Version   "1.1.0"
  283.   UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange"
  284.   CheckModelReferenceTargetMessage "error"
  285.   ModelReferenceNumInstancesAllowed "Multi"
  286.   ModelReferencePassRootInputsByReference on
  287.   ModelReferenceMinAlgLoopOccurrences off
  288. }
  289. Simulink.RTWCC {
  290.   $BackupClass   "Simulink.RTWCC"
  291.   $ObjectID   8
  292.   Array {
  293.     Type     "Cell"
  294.     Dimension     1
  295.     Cell     "IncludeHyperlinkInReport"
  296.     PropName     "DisabledProps"
  297.   }
  298.   Version   "1.1.0"
  299.   SystemTargetFile   "grt.tlc"
  300.   GenCodeOnly   off
  301.   MakeCommand   "make_rtw"
  302.   TemplateMakefile   "grt_default_tmf"
  303.   GenerateReport   off
  304.   SaveLog   off
  305.   RTWVerbose   on
  306.   RetainRTWFile   off
  307.   ProfileTLC   off
  308.   TLCDebug   off
  309.   TLCCoverage   off
  310.   TLCAssert   off
  311.   ProcessScriptMode   "Default"
  312.   ConfigurationMode   "Optimized"
  313.   ConfigAtBuild   off
  314.   IncludeHyperlinkInReport off
  315.   LaunchReport   off
  316.   TargetLang   "C"
  317.   Array {
  318.     Type     "Handle"
  319.     Dimension     2
  320.     Simulink.CodeAppCC {
  321.       $ObjectID       9
  322.       Array {
  323. Type "Cell"
  324. Dimension 9
  325. Cell "IgnoreCustomStorageClasses"
  326. Cell "InsertBlockDesc"
  327. Cell "SFDataObjDesc"
  328. Cell "SimulinkDataObjDesc"
  329. Cell "DefineNamingRule"
  330. Cell "SignalNamingRule"
  331. Cell "ParamNamingRule"
  332. Cell "InlinedPrmAccess"
  333. Cell "CustomSymbolStr"
  334. PropName "DisabledProps"
  335.       }
  336.       Version       "1.1.0"
  337.       ForceParamTrailComments off
  338.       GenerateComments       on
  339.       IgnoreCustomStorageClasses on
  340.       IncHierarchyInIds       off
  341.       MaxIdLength       31
  342.       PreserveName       off
  343.       PreserveNameWithParent  off
  344.       ShowEliminatedStatement off
  345.       IncAutoGenComments      off
  346.       SimulinkDataObjDesc     off
  347.       SFDataObjDesc       off
  348.       IncDataTypeInIds       off
  349.       PrefixModelToSubsysFcnNames on
  350.       CustomSymbolStr       "$R$N$M"
  351.       MangleLength       1
  352.       DefineNamingRule       "None"
  353.       ParamNamingRule       "None"
  354.       SignalNamingRule       "None"
  355.       InsertBlockDesc       off
  356.       SimulinkBlockComments   on
  357.       EnableCustomComments    off
  358.       InlinedPrmAccess       "Literals"
  359.       ReqsInCode       off
  360.     }
  361.     Simulink.GRTTargetCC {
  362.       $BackupClass       "Simulink.TargetCC"
  363.       $ObjectID       10
  364.       Array {
  365. Type "Cell"
  366. Dimension 13
  367. Cell "IncludeMdlTerminateFcn"
  368. Cell "CombineOutputUpdateFcns"
  369. Cell "SuppressErrorStatus"
  370. Cell "ERTCustomFileBanners"
  371. Cell "GenerateSampleERTMain"
  372. Cell "MultiInstanceERTCode"
  373. Cell "PurelyIntegerCode"
  374. Cell "SupportNonFinite"
  375. Cell "SupportComplex"
  376. Cell "SupportAbsoluteTime"
  377. Cell "SupportContinuousTime"
  378. Cell "SupportNonInlinedSFcns"
  379. Cell "LifeSpan"
  380. PropName "DisabledProps"
  381.       }
  382.       Version       "1.1.0"
  383.       TargetFcnLib       "ansi_tfl_tmw.mat"
  384.       TargetLibSuffix       ""
  385.       TargetPreCompLibLocation ""
  386.       GenFloatMathFcnCalls    "ANSI_C"
  387.       UtilityFuncGeneration   "Auto"
  388.       GenerateFullHeader      on
  389.       GenerateSampleERTMain   off
  390.       IsPILTarget       off
  391.       ModelReferenceCompliant on
  392.       IncludeMdlTerminateFcn  on
  393.       CombineOutputUpdateFcns off
  394.       SuppressErrorStatus     off
  395.       IncludeFileDelimiter    "Auto"
  396.       ERTCustomFileBanners    off
  397.       SupportAbsoluteTime     on
  398.       LogVarNameModifier      "rt_"
  399.       MatFileLogging       on
  400.       MultiInstanceERTCode    off
  401.       SupportNonFinite       on
  402.       SupportComplex       on
  403.       PurelyIntegerCode       off
  404.       SupportContinuousTime   on
  405.       SupportNonInlinedSFcns  on
  406.       ExtMode       off
  407.       ExtModeStaticAlloc      off
  408.       ExtModeTesting       off
  409.       ExtModeStaticAllocSize  1000000
  410.       ExtModeTransport       0
  411.       ExtModeMexFile       "ext_comm"
  412.       RTWCAPISignals       off
  413.       RTWCAPIParams       off
  414.       RTWCAPIStates       off
  415.       GenerateASAP2       off
  416.     }
  417.     PropName     "Components"
  418.   }
  419. }
  420. PropName "Components"
  421.       }
  422.       Name       "Configuration"
  423.       SimulationMode       "normal"
  424.       CurrentDlgPage       "Data Import/Export"
  425.     }
  426.     PropName     "ConfigurationSets"
  427.   }
  428.   Simulink.ConfigSet {
  429.     $PropName     "ActiveConfigurationSet"
  430.     $ObjectID     1
  431.   }
  432.   BlockDefaults {
  433.     Orientation     "right"
  434.     ForegroundColor     "black"
  435.     BackgroundColor     "white"
  436.     DropShadow     off
  437.     NamePlacement     "normal"
  438.     FontName     "Helvetica"
  439.     FontSize     10
  440.     FontWeight     "normal"
  441.     FontAngle     "normal"
  442.     ShowName     on
  443.   }
  444.   BlockParameterDefaults {
  445.     Block {
  446.       BlockType       BusCreator
  447.       Inputs       "4"
  448.       DisplayOption       "none"
  449.       UseBusObject       off
  450.       BusObject       "BusObject"
  451.       NonVirtualBus       off
  452.     }
  453.     Block {
  454.       BlockType       BusSelector
  455.       OutputAsBus       off
  456.     }
  457.     Block {
  458.       BlockType       Clock
  459.       DisplayTime       off
  460.     }
  461.     Block {
  462.       BlockType       ComplexToMagnitudeAngle
  463.       Output       "Magnitude and angle"
  464.       SampleTime       "-1"
  465.     }
  466.     Block {
  467.       BlockType       ComplexToRealImag
  468.       Output       "Real and imag"
  469.       SampleTime       "-1"
  470.     }
  471.     Block {
  472.       BlockType       Constant
  473.       Value       "1"
  474.       VectorParams1D       on
  475.       OutDataTypeMode       "Inherit from 'Constant value'"
  476.       OutDataType       "sfix(16)"
  477.       ConRadixGroup       "Use specified scaling"
  478.       OutScaling       "2^0"
  479.       SampleTime       "inf"
  480.     }
  481.     Block {
  482.       BlockType       DataTypeConversion
  483.       OutDataTypeMode       "Inherit via back propagation"
  484.       OutDataType       "sfix(16)"
  485.       OutScaling       "2^0"
  486.       LockScale       off
  487.       ConvertRealWorld       "Real World Value (RWV)"
  488.       RndMeth       "Zero"
  489.       SaturateOnIntegerOverflow on
  490.       SampleTime       "-1"
  491.     }
  492.     Block {
  493.       BlockType       Demux
  494.       Outputs       "4"
  495.       DisplayOption       "none"
  496.       BusSelectionMode       off
  497.     }
  498.     Block {
  499.       BlockType       Derivative
  500.       LinearizePole       "inf"
  501.     }
  502.     Block {
  503.       BlockType       Display
  504.       Format       "short"
  505.       Decimation       "10"
  506.       Floating       off
  507.       SampleTime       "-1"
  508.     }
  509.     Block {
  510.       BlockType       EnablePort
  511.       StatesWhenEnabling      "held"
  512.       ShowOutputPort       off
  513.       ZeroCross       on
  514.     }
  515.     Block {
  516.       BlockType       From
  517.       IconDisplay       "Tag"
  518.     }
  519.     Block {
  520.       BlockType       Fcn
  521.       Expr       "sin(u[1])"
  522.       SampleTime       "-1"
  523.     }
  524.     Block {
  525.       BlockType       Gain
  526.       Gain       "1"
  527.       Multiplication       "Element-wise(K.*u)"
  528.       ParameterDataTypeMode   "Same as input"
  529.       ParameterDataType       "sfix(16)"
  530.       ParameterScalingMode    "Best Precision: Matrix-wise"
  531.       ParameterScaling       "2^0"
  532.       OutDataTypeMode       "Same as input"
  533.       OutDataType       "sfix(16)"
  534.       OutScaling       "2^0"
  535.       LockScale       off
  536.       RndMeth       "Floor"
  537.       SaturateOnIntegerOverflow on
  538.       SampleTime       "-1"
  539.     }
  540.     Block {
  541.       BlockType       Goto
  542.       IconDisplay       "Tag"
  543.     }
  544.     Block {
  545.       BlockType       Ground
  546.     }
  547.     Block {
  548.       BlockType       HitCross
  549.       HitCrossingOffset       "0"
  550.       HitCrossingDirection    "either"
  551.       ShowOutputPort       on
  552.       ZeroCross       on
  553.       SampleTime       "-1"
  554.     }
  555.     Block {
  556.       BlockType       Inport
  557.       Port       "1"
  558.       UseBusObject       off
  559.       BusObject       "BusObject"
  560.       BusOutputAsStruct       off
  561.       PortDimensions       "-1"
  562.       SampleTime       "-1"
  563.       DataType       "auto"
  564.       OutDataType       "sfix(16)"
  565.       OutScaling       "2^0"
  566.       SignalType       "auto"
  567.       SamplingMode       "auto"
  568.       LatchByDelayingOutsideSignal off
  569.       LatchByCopyingInsideSignal off
  570.       Interpolate       on
  571.     }
  572.     Block {
  573.       BlockType       Integrator
  574.       ExternalReset       "none"
  575.       InitialConditionSource  "internal"
  576.       InitialCondition       "0"
  577.       LimitOutput       off
  578.       UpperSaturationLimit    "inf"
  579.       LowerSaturationLimit    "-inf"
  580.       ShowSaturationPort      off
  581.       ShowStatePort       off
  582.       AbsoluteTolerance       "auto"
  583.       IgnoreLimit       off
  584.       ZeroCross       on
  585.     }
  586.     Block {
  587.       BlockType       Logic
  588.       Operator       "AND"
  589.       Inputs       "2"
  590.       AllPortsSameDT       on
  591.       OutDataTypeMode       "Logical (see Configuration Parameters: Optimiza"
  592. "tion)"
  593.       LogicDataType       "uint(8)"
  594.       SampleTime       "-1"
  595.     }
  596.     Block {
  597.       BlockType       Lookup
  598.       InputValues       "[-4:5]"
  599.       OutputValues       " rand(1,10)-0.5"
  600.       LookUpMeth       "Interpolation-Extrapolation"
  601.       OutDataTypeMode       "Same as input"
  602.       OutDataType       "sfix(16)"
  603.       OutScaling       "2^0"
  604.       LockScale       off
  605.       RndMeth       "Floor"
  606.       SaturateOnIntegerOverflow on
  607.       SampleTime       "-1"
  608.       LUTDesignTableMode      "Redesign Table"
  609.       LUTDesignDataSource     "Block Dialog"
  610.       LUTDesignFunctionName   "sqrt(x)"
  611.       LUTDesignUseExistingBP  on
  612.       LUTDesignRelError       "0.01"
  613.       LUTDesignAbsError       "1e-6"
  614.     }
  615.     Block {
  616.       BlockType       MagnitudeAngleToComplex
  617.       Input       "Magnitude and angle"
  618.       ConstantPart       "0"
  619.       SampleTime       "-1"
  620.     }
  621.     Block {
  622.       BlockType       Math
  623.       Operator       "exp"
  624.       OutputSignalType       "auto"
  625.       SampleTime       "-1"
  626.       OutDataTypeMode       "Same as first input"
  627.       OutDataType       "sfix(16)"
  628.       OutScaling       "2^0"
  629.       LockScale       off
  630.       RndMeth       "Floor"
  631.       SaturateOnIntegerOverflow on
  632.     }
  633.     Block {
  634.       BlockType       Memory
  635.       X0       "0"
  636.       InheritSampleTime       off
  637.       LinearizeMemory       off
  638.       StateMustResolveToSignalObject off
  639.       RTWStateStorageClass    "Auto"
  640.     }
  641.     Block {
  642.       BlockType       MinMax
  643.       Function       "min"
  644.       Inputs       "1"
  645.       InputSameDT       on
  646.       OutDataTypeMode       "Inherit via internal rule"
  647.       OutDataType       "sfix(16)"
  648.       OutScaling       "2^0"
  649.       LockScale       off
  650.       RndMeth       "Floor"
  651.       SaturateOnIntegerOverflow on
  652.       ZeroCross       on
  653.       SampleTime       "-1"
  654.     }
  655.     Block {
  656.       BlockType       MultiPortSwitch
  657.       Inputs       "4"
  658.       zeroidx       off
  659.       InputSameDT       on
  660.       OutDataTypeMode       "Inherit via internal rule"
  661.       RndMeth       "Floor"
  662.       SaturateOnIntegerOverflow on
  663.       SampleTime       "-1"
  664.     }
  665.     Block {
  666.       BlockType       Mux
  667.       Inputs       "4"
  668.       DisplayOption       "none"
  669.       UseBusObject       off
  670.       BusObject       "BusObject"
  671.       NonVirtualBus       off
  672.     }
  673.     Block {
  674.       BlockType       Outport
  675.       Port       "1"
  676.       UseBusObject       off
  677.       BusObject       "BusObject"
  678.       BusOutputAsStruct       off
  679.       PortDimensions       "-1"
  680.       SampleTime       "-1"
  681.       DataType       "auto"
  682.       OutDataType       "sfix(16)"
  683.       OutScaling       "2^0"
  684.       SignalType       "auto"
  685.       SamplingMode       "auto"
  686.       OutputWhenDisabled      "held"
  687.       InitialOutput       "[]"
  688.     }
  689.     Block {
  690.       BlockType       PMComponent
  691.       SubClassName       "unknown"
  692.     }
  693.     Block {
  694.       BlockType       PMIOPort
  695.     }
  696.     Block {
  697.       BlockType       Product
  698.       Inputs       "2"
  699.       Multiplication       "Element-wise(.*)"
  700.       InputSameDT       on
  701.       OutDataTypeMode       "Same as first input"
  702.       OutDataType       "sfix(16)"
  703.       OutScaling       "2^0"
  704.       LockScale       off
  705.       RndMeth       "Zero"
  706.       SaturateOnIntegerOverflow on
  707.       SampleTime       "-1"
  708.     }
  709.     Block {
  710.       BlockType       RateLimiter
  711.       RisingSlewLimit       "1"
  712.       FallingSlewLimit       "-1"
  713.       SampleTimeMode       "continuous"
  714.       InitialCondition       "0"
  715.       LinearizeAsGain       on
  716.     }
  717.     Block {
  718.       BlockType       RealImagToComplex
  719.       Input       "Real and imag"
  720.       ConstantPart       "0"
  721.       SampleTime       "-1"
  722.     }
  723.     Block {
  724.       BlockType       Relay
  725.       OnSwitchValue       "eps"
  726.       OffSwitchValue       "eps"
  727.       OnOutputValue       "1"
  728.       OffOutputValue       "0"
  729.       OutputDataTypeScalingMode "All ports same datatype"
  730.       OutDataType       "sfix(16)"
  731.       OutScaling       "2^0"
  732.       ConRadixGroup       "Use specified scaling"
  733.       ZeroCross       on
  734.       SampleTime       "-1"
  735.     }
  736.     Block {
  737.       BlockType       RelationalOperator
  738.       Operator       ">="
  739.       InputSameDT       on
  740.       LogicOutDataTypeMode    "Logical (see Configuration Parameters: Optimiza"
  741. "tion)"
  742.       LogicDataType       "uint(8)"
  743.       ZeroCross       on
  744.       SampleTime       "-1"
  745.     }
  746.     Block {
  747.       BlockType       Rounding
  748.       Operator       "floor"
  749.       SampleTime       "-1"
  750.     }
  751.     Block {
  752.       BlockType       Saturate
  753.       UpperLimit       "0.5"
  754.       LowerLimit       "-0.5"
  755.       LinearizeAsGain       on
  756.       ZeroCross       on
  757.       SampleTime       "-1"
  758.     }
  759.     Block {
  760.       BlockType       Scope
  761.       ModelBased       off
  762.       TickLabels       "OneTimeTick"
  763.       ZoomMode       "on"
  764.       Grid       "on"
  765.       TimeRange       "auto"
  766.       YMin       "-5"
  767.       YMax       "5"
  768.       SaveToWorkspace       off
  769.       SaveName       "ScopeData"
  770.       LimitDataPoints       on
  771.       MaxDataPoints       "5000"
  772.       Decimation       "1"
  773.       SampleInput       off
  774.       SampleTime       "-1"
  775.     }
  776.     Block {
  777.       BlockType       Selector
  778.       InputType       "Vector"
  779.       IndexMode       "One-based"
  780.       ElementSrc       "Internal"
  781.       Elements       "1"
  782.       RowSrc       "Internal"
  783.       Rows       "1"
  784.       ColumnSrc       "Internal"
  785.       Columns       "1"
  786.       InputPortWidth       "-1"
  787.       IndexIsStartValue       off
  788.       OutputPortSize       "1"
  789.     }
  790.     Block {
  791.       BlockType       "S-Function"
  792.       FunctionName       "system"
  793.       SFunctionModules       "''"
  794.       PortCounts       "[]"
  795.     }
  796.     Block {
  797.       BlockType       Signum
  798.       ZeroCross       on
  799.       SampleTime       "-1"
  800.     }
  801.     Block {
  802.       BlockType       Sin
  803.       SineType       "Time based"
  804.       TimeSource       "Use simulation time"
  805.       Amplitude       "1"
  806.       Bias       "0"
  807.       Frequency       "1"
  808.       Phase       "0"
  809.       Samples       "10"
  810.       Offset       "0"
  811.       SampleTime       "-1"
  812.       VectorParams1D       on
  813.     }
  814.     Block {
  815.       BlockType       Step
  816.       Time       "1"
  817.       Before       "0"
  818.       After       "1"
  819.       SampleTime       "-1"
  820.       VectorParams1D       on
  821.       ZeroCross       on
  822.     }
  823.     Block {
  824.       BlockType       SubSystem
  825.       ShowPortLabels       on
  826.       Permissions       "ReadWrite"
  827.       PermitHierarchicalResolution "All"
  828.       SystemSampleTime       "-1"
  829.       RTWFcnNameOpts       "Auto"
  830.       RTWFileNameOpts       "Auto"
  831.       SimViewingDevice       off
  832.       DataTypeOverride       "UseLocalSettings"
  833.       MinMaxOverflowLogging   "UseLocalSettings"
  834.     }
  835.     Block {
  836.       BlockType       Sum
  837.       IconShape       "rectangular"
  838.       Inputs       "++"
  839.       InputSameDT       on
  840.       OutDataTypeMode       "Same as first input"
  841.       OutDataType       "sfix(16)"
  842.       OutScaling       "2^0"
  843.       LockScale       off
  844.       RndMeth       "Floor"
  845.       SaturateOnIntegerOverflow on
  846.       SampleTime       "-1"
  847.     }
  848.     Block {
  849.       BlockType       Switch
  850.       Criteria       "u2 >= Threshold"
  851.       Threshold       "0"
  852.       InputSameDT       on
  853.       OutDataTypeMode       "Inherit via internal rule"
  854.       RndMeth       "Floor"
  855.       SaturateOnIntegerOverflow on
  856.       ZeroCross       on
  857.       SampleTime       "-1"
  858.     }
  859.     Block {
  860.       BlockType       Terminator
  861.     }
  862.     Block {
  863.       BlockType       TransportDelay
  864.       DelayTime       "1"
  865.       InitialOutput       "0"
  866.       BufferSize       "1024"
  867.       FixedBuffer       off
  868.       TransDelayFeedthrough   off
  869.       PadeOrder       "0"
  870.     }
  871.     Block {
  872.       BlockType       Trigonometry
  873.       Operator       "sin"
  874.       OutputSignalType       "auto"
  875.       SampleTime       "-1"
  876.     }
  877.   }
  878.   AnnotationDefaults {
  879.     HorizontalAlignment     "center"
  880.     VerticalAlignment     "middle"
  881.     ForegroundColor     "black"
  882.     BackgroundColor     "white"
  883.     DropShadow     off
  884.     FontName     "Helvetica"
  885.     FontSize     10
  886.     FontWeight     "normal"
  887.     FontAngle     "normal"
  888.   }
  889.   LineDefaults {
  890.     FontName     "Helvetica"
  891.     FontSize     9
  892.     FontWeight     "normal"
  893.     FontAngle     "normal"
  894.   }
  895.   System {
  896.     Name     "power_wind_dfig"
  897.     Location     [2, 78, 1278, 749]
  898.     Open     on
  899.     ModelBrowserVisibility  off
  900.     ModelBrowserWidth     200
  901.     ScreenColor     "white"
  902.     PaperOrientation     "landscape"
  903.     PaperPositionMode     "auto"
  904.     PaperType     "usletter"
  905.     PaperUnits     "inches"
  906.     ZoomFactor     "100"
  907.     ReportName     "simulink-default.rpt"
  908.     Block {
  909.       BlockType       Reference
  910.       Name       "10 km line"
  911.       Ports       [0, 0, 0, 0, 0, 3, 3]
  912.       Position       [525, 108, 605, 152]
  913.       BackgroundColor       "yellow"
  914.       AttributesFormatString  "\n"
  915.       SourceBlock       "powerlib/Elements/Three-PhasenPI Section Line"
  916.       SourceType       "Three-Phase PI Section Line"
  917.       PhysicalDomain       "powersysdomain"
  918.       SubClassName       "unknown"
  919.       LeftPortType       "p1"
  920.       RightPortType       "p1"
  921.       LConnTagsString       "a|b|c"
  922.       RConnTagsString       "A|B|C"
  923.       Frequency       "60"
  924.       Resistances       "[0.1153 0.413]"
  925.       Inductances       "[1.05e-3 3.32e-3]"
  926.       Capacitances       "[11.33e-009 5.01e-009]"
  927.       Length       "10"
  928.     }
  929.     Block {
  930.       BlockType       Reference
  931.       Name       "120 kV"
  932.       Ports       [0, 0, 0, 0, 0, 1, 3]
  933.       Position       [40, 109, 85, 151]
  934.       BackgroundColor       "yellow"
  935.       SourceBlock       "powerlib/ElectricalnSources/Three-PhasenProgr"
  936. "ammablenVoltage Source"
  937.       SourceType       "Three-Phase Programmable Voltage Source"
  938.       ShowPortLabels       on
  939.       PositiveSequence       "[120e3 0 60]"
  940.       VariationEntity       "None"
  941.       VariationType       "Step"
  942.       VariationStep       "-0.15"
  943.       VariationRate       "10"
  944.       VariationMagnitude      "0.3"
  945.       VariationFrequency      "2"
  946.       VariationTiming       "[5 5.5]"
  947.       VariationPhaseA       off
  948.       Amplitudes       "[1 0.8 1.2 1.0]"
  949.       TimeValues       "[0 0.1 0.15 0.2]"
  950.       HarmonicGeneration      off
  951.       HarmonicA       "[1 -0.1 0 1]"
  952.       HarmonicB       "[2 0.15 35 2]"
  953.       Timing       "[5  5.5]"
  954.     }
  955.     Block {
  956.       BlockType       Reference
  957.       Name       "120 kV/25 kVn47 MVA"
  958.       Ports       [0, 0, 0, 0, 0, 3, 3]
  959.       Position       [225, 105, 280, 155]
  960.       BackgroundColor       "yellow"
  961.       AttributesFormatString  "\n"
  962.       SourceBlock       "powerlib/Elements/Three-PhasenTransformern(Tw"
  963. "o Windings)"
  964.       SourceType       "Three-Phase Transformer (Two Windings)"
  965.       ShowPortLabels       on
  966.       NominalPower       "[47e6 60 ]"
  967.       Winding1Connection      "Yg"
  968.       Winding1       "[ 120e3  0.08/30   0.08 ]"
  969.       Winding2Connection      "Delta (D1)"
  970.       Winding2       "[ 25e3  0.08/30  0.08]"
  971.       SetSaturation       off
  972.       Rm       "500"
  973.       Lm       "500"
  974.       Saturation       "[ 0,0  ;  0.005,1.2  ;  1.0,1.4 ]"
  975.       Hysteresis       off
  976.       DataFile       "'basic_model'"
  977.       SetInitialFlux       off
  978.       InitialFluxes       "[ 0.8 , -0.8 , 0.7 ]"
  979.       Measurements       "None"
  980.       TransfoNumber       "0"
  981.       MoreParameters       off
  982.       BreakLoop       off
  983.     }
  984.     Block {
  985.       BlockType       Reference
  986.       Name       "20 km line"
  987.       Ports       [0, 0, 0, 0, 0, 3, 3]
  988.       Position       [335, 108, 415, 152]
  989.       BackgroundColor       "yellow"
  990.       AttributesFormatString  "\n"
  991.       SourceBlock       "powerlib/Elements/Three-PhasenPI Section Line"
  992.       SourceType       "Three-Phase PI Section Line"
  993.       PhysicalDomain       "powersysdomain"
  994.       SubClassName       "unknown"
  995.       LeftPortType       "p1"
  996.       RightPortType       "p1"
  997.       LConnTagsString       "a|b|c"
  998.       RConnTagsString       "A|B|C"
  999.       Frequency       "60"
  1000.       Resistances       "[0.1153 0.413]"
  1001.       Inductances       "[1.05e-3 3.32e-3]"
  1002.       Capacitances       "[11.33e-009 5.01e-009]"
  1003.       Length       "20"
  1004.     }
  1005.     Block {
  1006.       BlockType       Reference
  1007.       Name       "25 kV/ 575 Vn6*2 MVA"
  1008.       Ports       [0, 0, 0, 0, 0, 3, 3]
  1009.       Position       [630, 105, 675, 155]
  1010.       BackgroundColor       "yellow"
  1011.       AttributesFormatString  "\n"
  1012.       SourceBlock       "powerlib/Elements/Three-PhasenTransformern(Tw"
  1013. "o Windings)"
  1014.       SourceType       "Three-Phase Transformer (Two Windings)"
  1015.       ShowPortLabels       on
  1016.       NominalPower       "[2e6*6  60]"
  1017.       Winding1Connection      "Yg"
  1018.       Winding1       "[25e3 , 0.025/30 , 0.025]"
  1019.       Winding2Connection      "Delta (D1)"
  1020.       Winding2       "[ 575, 0.025/30 , 0.025]"
  1021.       SetSaturation       off
  1022.       Rm       "500"
  1023.       Lm       "inf"
  1024.       Saturation       "[ 0,0 ; 0.0024,1.2 ; 1.0,1.52 ]"
  1025.       Hysteresis       off
  1026.       DataFile       "'hysteresis'"
  1027.       SetInitialFlux       off
  1028.       InitialFluxes       "[ 0.8 , -0.8 , 0.7 ]"
  1029.       Measurements       "None"
  1030.       TransfoNumber       "0"
  1031.       MoreParameters       off
  1032.       BreakLoop       off
  1033.     }
  1034.     Block {
  1035.       BlockType       Reference
  1036.       Name       "2500 MVAnX0/X1=3"
  1037.       Ports       [0, 0, 0, 0, 0, 3, 3]
  1038.       Position       [105, 108, 160, 152]
  1039.       BackgroundColor       "yellow"
  1040.       AttributesFormatString  "\n"
  1041.       SourceBlock       "powerlib/Elements/Three-PhasenMutual Inductanc"
  1042. "enZ1-Z0"
  1043.       SourceType       "Three-Phase Mutual Inductance Z1-Z0"
  1044.       PhysicalDomain       "powersysdomain"
  1045.       SubClassName       "unknown"
  1046.       LeftPortType       "p1"
  1047.       RightPortType       "p1"
  1048.       LConnTagsString       "a|b|c"
  1049.       RConnTagsString       "A|B|C"
  1050.       PositiveSequence       "[0.1  1.0/(2*pi*60)] *120e3^2/2500e6"
  1051.       ZeroSequence       "[0.3  3.0/(2*pi*60)] *120e3^2/2500e6"
  1052.     }
  1053.     Block {
  1054.       BlockType       Reference
  1055.       Name       "3.3ohms "
  1056.       Ports       [0, 0, 0, 0, 0, 1, 1]
  1057.       Position       [289, 250, 311, 270]
  1058.       Orientation       "down"
  1059.       SourceBlock       "powerlib/Elements/Series RLC Branch"
  1060.       SourceType       "Series RLC Branch"
  1061.       PhysicalDomain       "powersysdomain"
  1062.       SubClassName       "unknown"
  1063.       LeftPortType       "p1"
  1064.       RightPortType       "p1"
  1065.       LConnTagsString       "__new0"
  1066.       RConnTagsString       "__new0"
  1067.       BranchType       "R"
  1068.       Resistance       "3.3"
  1069.       Inductance       "[]"
  1070.       SetiL0       off
  1071.       InitialCurrent       "0"
  1072.       Capacitance       "[]"
  1073.       Setx0       off
  1074.       InitialVoltage       "0"
  1075.       Measurements       "None"
  1076.     }
  1077.     Block {
  1078.       BlockType       Reference
  1079.       Name       "B120n(120 kV)"
  1080.       Ports       [0, 0, 0, 0, 0, 3, 3]
  1081.       Position       [190, 107, 195, 153]
  1082.       BackgroundColor       "black"
  1083.       SourceBlock       "powerlib/Measurements/Three-PhasenV-I Measurem"
  1084. "ent"
  1085.       SourceType       "Three-Phase VI Measurement"
  1086.       ShowPortLabels       on
  1087.       VoltageMeasurement      "phase-to-ground"
  1088.       SetLabelV       on
  1089.       LabelV       "Vabc_B120"
  1090.       Vpu       on
  1091.       CurrentMeasurement      "no"
  1092.       SetLabelI       on
  1093.       LabelI       "Iabc_B120"
  1094.       Ipu       off
  1095.       Pbase       "100e6"
  1096.       Vbase       "120e3"
  1097.       OutputType       "Complex"
  1098.       PhasorSimulation       on
  1099.       PSBequivalent       "0"
  1100.     }
  1101.     Block {
  1102.       BlockType       Reference
  1103.       Name       "B25n(25 kV)"
  1104.       Ports       [0, 0, 0, 0, 0, 3, 3]
  1105.       Position       [445, 107, 450, 153]
  1106.       BackgroundColor       "black"
  1107.       SourceBlock       "powerlib/Measurements/Three-PhasenV-I Measurem"
  1108. "ent"
  1109.       SourceType       "Three-Phase VI Measurement"
  1110.       ShowPortLabels       on
  1111.       VoltageMeasurement      "phase-to-ground"
  1112.       SetLabelV       on
  1113.       LabelV       "Vabc_B25"
  1114.       Vpu       on
  1115.       CurrentMeasurement      "yes"
  1116.       SetLabelI       on
  1117.       LabelI       "Iabc_B25"
  1118.       Ipu       on
  1119.       Pbase       "10e6"
  1120.       Vbase       "25e3"
  1121.       OutputType       "Complex"
  1122.       PhasorSimulation       on
  1123.       PSBequivalent       "0"
  1124.     }
  1125.     Block {
  1126.       BlockType       Reference
  1127.       Name       "B575n(575 V)"
  1128.       Ports       [0, 0, 0, 0, 0, 3, 3]
  1129.       Position       [755, 110, 760, 150]
  1130.       BackgroundColor       "black"
  1131.       SourceBlock       "powerlib/Measurements/Three-PhasenV-I Measurem"
  1132. "ent"
  1133.       SourceType       "Three-Phase VI Measurement"
  1134.       ShowPortLabels       on
  1135.       VoltageMeasurement      "phase-to-ground"
  1136.       SetLabelV       on
  1137.       LabelV       "Vabc_B575"
  1138.       Vpu       on
  1139.       CurrentMeasurement      "yes"
  1140.       SetLabelI       on
  1141.       LabelI       "Iabc_B575"
  1142.       Ipu       on
  1143.       Pbase       "6*1.5e6/0.9"
  1144.       Vbase       "575"
  1145.       OutputType       "Complex"
  1146.       PhasorSimulation       on
  1147.       PSBequivalent       "0"
  1148.     }
  1149.     Block {
  1150.       BlockType       BusSelector
  1151.       Name       "BusnSelector1"
  1152.       Ports       [1, 3]
  1153.       Position       [880, 75, 885, 155]
  1154.       ShowName       off
  1155.       OutputSignals       "Vdc (V),wr (pu),Pitch_angle (deg)"
  1156.       Port {
  1157. PortNumber 1
  1158. Name "<Vdc (V)>"
  1159. RTWStorageClass "Auto"
  1160. DataLoggingNameMode "SignalName"
  1161.       }
  1162.       Port {
  1163. PortNumber 2
  1164. Name "<wr (pu)>"
  1165. RTWStorageClass "Auto"
  1166. DataLoggingNameMode "SignalName"
  1167.       }
  1168.       Port {
  1169. PortNumber 3
  1170. Name "<Pitch_angle (deg)>"
  1171. RTWStorageClass "Auto"
  1172. DataLoggingNameMode "SignalName"
  1173.       }
  1174.     }
  1175.     Block {
  1176.       BlockType       Reference
  1177.       Name       "Fault"
  1178.       Ports       [0, 0, 0, 0, 0, 3]
  1179.       Position       [425, 23, 455, 67]
  1180.       Orientation       "left"
  1181.       ForegroundColor       "red"
  1182.       SourceBlock       "powerlib/Elements/Three-Phase Fault"
  1183.       SourceType       "Three-Phase Fault"
  1184.       ShowPortLabels       on
  1185.       FaultA       off
  1186.       FaultB       off
  1187.       FaultC       off
  1188.       FaultResistance       "1e-3"
  1189.       GroundFault       on
  1190.       GroundResistance       "1e-3"
  1191.       External       off
  1192.       SwitchStatus       "[1 0]"
  1193.       SwitchTimes       "[ 5 5+9/60]"
  1194.       InitialStates       "[0 0 1]"
  1195.       SnubberResistance       "1e4"
  1196.       SnubberCapacitance      "inf"
  1197.       Measurements       "None"
  1198.     }
  1199.     Block {
  1200.       BlockType       From
  1201.       Name       "From1"
  1202.       Position       [490, 486, 525, 504]
  1203.       ShowName       off
  1204.       CloseFcn       "tagdialog Close"
  1205.       GotoTag       "wind"
  1206.       Port {
  1207. PortNumber 1
  1208. Name "Wind speed (m/s)"
  1209. RTWStorageClass "Auto"
  1210. DataLoggingNameMode "SignalName"
  1211.       }
  1212.     }
  1213.     Block {
  1214.       BlockType       From
  1215.       Name       "From12"
  1216.       Position       [675, 76, 740, 94]
  1217.       BackgroundColor       "lightBlue"
  1218.       ShowName       off
  1219.       CloseFcn       "tagdialog Close"
  1220.       GotoTag       "Trip_WT"
  1221.     }
  1222.     Block {
  1223.       BlockType       From
  1224.       Name       "From2"
  1225.       Position       [490, 511, 525, 529]
  1226.       ShowName       off
  1227.       CloseFcn       "tagdialog Close"
  1228.       GotoTag       "pitch"
  1229.       Port {
  1230. PortNumber 1
  1231. Name "pitch angle (deg)"
  1232. PropagatedSignals "Pitch_angle (deg)"
  1233. RTWStorageClass "Auto"
  1234. DataLoggingNameMode "SignalName"
  1235.       }
  1236.     }
  1237.     Block {
  1238.       BlockType       From
  1239.       Name       "From3"
  1240.       Position       [490, 435, 525, 455]
  1241.       ShowName       off
  1242.       CloseFcn       "tagdialog Close"
  1243.       GotoTag       "Vdc"
  1244.       Port {
  1245. PortNumber 1
  1246. Name "Vdc (V)"
  1247. PropagatedSignals "Vdc (V)"
  1248. RTWStorageClass "Auto"
  1249. DataLoggingNameMode "SignalName"
  1250.       }
  1251.     }
  1252.     Block {
  1253.       BlockType       From
  1254.       Name       "From4"
  1255.       Position       [490, 461, 525, 479]
  1256.       ShowName       off
  1257.       CloseFcn       "tagdialog Close"
  1258.       GotoTag       "wr"
  1259.       Port {
  1260. PortNumber 1
  1261. Name "Speed (pu)"
  1262. PropagatedSignals "wr (pu)"
  1263. RTWStorageClass "Auto"
  1264. DataLoggingNameMode "SignalName"
  1265.       }
  1266.     }
  1267.     Block {
  1268.       BlockType       Goto
  1269.       Name       "Goto1"
  1270.       Position       [820, 35, 850, 55]
  1271.       ShowName       off
  1272.       GotoTag       "wind"
  1273.       TagVisibility       "global"
  1274.     }
  1275.     Block {
  1276.       BlockType       Goto
  1277.       Name       "Goto2"
  1278.       Position       [975, 80, 1005, 100]
  1279.       ShowName       off
  1280.       GotoTag       "Vdc"
  1281.       TagVisibility       "global"
  1282.     }
  1283.     Block {
  1284.       BlockType       Goto
  1285.       Name       "Goto3"
  1286.       Position       [975, 105, 1005, 125]
  1287.       ShowName       off
  1288.       GotoTag       "wr"
  1289.       TagVisibility       "global"
  1290.     }
  1291.     Block {
  1292.       BlockType       Goto
  1293.       Name       "Goto4"
  1294.       Position       [975, 130, 1005, 150]
  1295.       ShowName       off
  1296.       GotoTag       "pitch"
  1297.       TagVisibility       "global"
  1298.     }
  1299.     Block {
  1300.       BlockType       Goto
  1301.       Name       "Goto6"
  1302.       Position       [905, 350, 965, 370]
  1303.       ShowName       off
  1304.       GotoTag       "Trip_WT"
  1305.       TagVisibility       "local"
  1306.     }
  1307.     Block {
  1308.       BlockType       Scope
  1309.       Name       "Grid"
  1310.       Ports       [8]
  1311.       Position       [240, 315, 300, 530]
  1312.       BackgroundColor       "green"
  1313.       Floating       off
  1314.       Location       [64, 98, 729, 655]
  1315.       Open       off
  1316.       NumInputPorts       "8"
  1317.       ZoomMode       "yonly"
  1318.       List {
  1319. ListType AxesTitles
  1320. axes1 "%<SignalLabel>"
  1321. axes2 "%<SignalLabel>"
  1322. axes3 "%<SignalLabel>"
  1323. axes4 "%<SignalLabel>"
  1324. axes5 "%<SignalLabel>"
  1325. axes6 "%<SignalLabel>"
  1326. axes7 "%<SignalLabel>"
  1327. axes8 "%<SignalLabel>"
  1328.       }
  1329.       TimeRange       "50"
  1330.       YMin       "0~0~0~-10~-5~0~0~0"
  1331.       YMax       "1.1~1.1~1.1~5~5~1.1~1.1~1.1"
  1332.       SaveName       "ScopeData1"
  1333.       DataFormat       "StructureWithTime"
  1334.       LimitDataPoints       off
  1335.       SampleTime       "0"
  1336.     }
  1337.     Block {
  1338.       BlockType       SubSystem
  1339.       Name       "GridnData acquisition"
  1340.       Ports       [0, 8]
  1341.       Position       [15, 327, 95, 518]
  1342.       TreatAsAtomicUnit       off
  1343.       MinAlgLoopOccurrences   off
  1344.       RTWSystemCode       "Auto"
  1345.       MaskHideContents       off
  1346.       Port {
  1347. PortNumber 1
  1348. Name "Vabc_B120 (pu)"
  1349. RTWStorageClass "Auto"
  1350. DataLoggingNameMode "SignalName"
  1351.       }
  1352.       Port {
  1353. PortNumber 2
  1354. Name "Vabc_B25 (pu)"
  1355. RTWStorageClass "Auto"
  1356. DataLoggingNameMode "SignalName"
  1357.       }
  1358.       Port {
  1359. PortNumber 3
  1360. Name "Vabc_B575 (pu)"
  1361. RTWStorageClass "Auto"
  1362. DataLoggingNameMode "SignalName"
  1363.       }
  1364.       Port {
  1365. PortNumber 4
  1366. Name "P_B25 (MW)"
  1367. RTWStorageClass "Auto"
  1368. DataLoggingNameMode "SignalName"
  1369.       }
  1370.       Port {
  1371. PortNumber 5
  1372. Name "Q_B25 (Mvar)"
  1373. RTWStorageClass "Auto"
  1374. DataLoggingNameMode "SignalName"
  1375.       }
  1376.       Port {
  1377. PortNumber 6
  1378. Name "V_Plant 2.3kV pos. seq. (pu)"
  1379. RTWStorageClass "Auto"
  1380. DataLoggingNameMode "SignalName"
  1381.       }
  1382.       Port {
  1383. PortNumber 7
  1384. Name "I Plant pos. seq. (pu/2 MVA) "
  1385. RTWStorageClass "Auto"
  1386. DataLoggingNameMode "SignalName"
  1387.       }
  1388.       Port {
  1389. PortNumber 8
  1390. Name "Motor Speed (pu)"
  1391. PropagatedSignals "Rotor speed (wm)"
  1392. RTWStorageClass "Auto"
  1393. DataLoggingNameMode "SignalName"
  1394.       }
  1395.       System {
  1396. Name "GridnData acquisition"
  1397. Location [426, 74, 1093, 590]
  1398. Open off
  1399. ModelBrowserVisibility off
  1400. ModelBrowserWidth 200
  1401. ScreenColor "white"
  1402. PaperOrientation "landscape"
  1403. PaperPositionMode "auto"
  1404. PaperType "usletter"
  1405. PaperUnits "inches"
  1406. ZoomFactor "100"
  1407. Block {
  1408.   BlockType   Reference
  1409.   Name   "3-PhasenActive & Reactive Powern(Phasor T"
  1410. "ype)"
  1411.   Ports   [2, 1]
  1412.   Position   [220, 139, 275, 201]
  1413.   SourceBlock   "powerlib_extras/PhasornLibrary/3-PhasenAc"
  1414. "tive & Reactive Powern(Phasor Type)"
  1415.   SourceType   "3-Phase Active & Reactive Power (Phasor Typ"
  1416. "e)"
  1417.   ShowPortLabels   on
  1418. }
  1419. Block {
  1420.   BlockType   ComplexToMagnitudeAngle
  1421.   Name   "Complex tonMagnitude-Angle "
  1422.   Ports   [1, 1]
  1423.   Position   [175, 29, 195, 51]
  1424.   ShowName   off
  1425.   Output   "Magnitude"
  1426. }
  1427. Block {
  1428.   BlockType   ComplexToMagnitudeAngle
  1429.   Name   "Complex tonMagnitude-Angle 1"
  1430.   Ports   [1, 1]
  1431.   Position   [175, 59, 195, 81]
  1432.   ShowName   off
  1433.   Output   "Magnitude"
  1434. }
  1435. Block {
  1436.   BlockType   ComplexToMagnitudeAngle
  1437.   Name   "Complex tonMagnitude-Angle 2"
  1438.   Ports   [1, 1]
  1439.   Position   [175, 89, 195, 111]
  1440.   ShowName   off
  1441.   Output   "Magnitude"
  1442. }
  1443. Block {
  1444.   BlockType   Constant
  1445.   Name   "Constant"
  1446.   Position   [370, 245, 400, 265]
  1447.   ShowName   off
  1448.   Value   "0"
  1449. }
  1450. Block {
  1451.   BlockType   Demux
  1452.   Name   "Demux"
  1453.   Ports   [1, 2]
  1454.   Position   [365, 134, 370, 201]
  1455.   BackgroundColor   "black"
  1456.   ShowName   off
  1457.   Outputs   "2"
  1458. }
  1459. Block {
  1460.   BlockType   From
  1461.   Name   "From"
  1462.   Position   [50, 31, 120, 49]
  1463.   ShowName   off
  1464.   CloseFcn   "tagdialog Close"
  1465.   GotoTag   "Vabc_B120"
  1466. }
  1467. Block {
  1468.   BlockType   From
  1469.   Name   "From1"
  1470.   Position   [50, 61, 120, 79]
  1471.   ShowName   off
  1472.   CloseFcn   "tagdialog Close"
  1473.   GotoTag   "Vabc_B25"
  1474. }
  1475. Block {
  1476.   BlockType   From
  1477.   Name   "From2"
  1478.   Position   [60, 176, 130, 194]
  1479.   ShowName   off
  1480.   CloseFcn   "tagdialog Close"
  1481.   GotoTag   "Iabc_B25"
  1482. }
  1483. Block {
  1484.   BlockType   From
  1485.   Name   "From3"
  1486.   Position   [65, 334, 140, 356]
  1487.   ShowName   off
  1488.   CloseFcn   "tagdialog Close"
  1489.   GotoTag   "Vabc_B2300"
  1490. }
  1491. Block {
  1492.   BlockType   From
  1493.   Name   "From4"
  1494.   Position   [70, 419, 145, 441]
  1495.   ShowName   off
  1496.   CloseFcn   "tagdialog Close"
  1497.   GotoTag   "Iabc_B2300"
  1498. }
  1499. Block {
  1500.   BlockType   From
  1501.   Name   "From8"
  1502.   Position   [50, 91, 120, 109]
  1503.   ShowName   off
  1504.   CloseFcn   "tagdialog Close"
  1505.   GotoTag   "Vabc_B575"
  1506. }
  1507. Block {
  1508.   BlockType   Gain
  1509.   Name   "MW"
  1510.   Position   [295, 146, 345, 194]
  1511.   Gain   "1/1e6"
  1512. }
  1513. Block {
  1514.   BlockType   SubSystem
  1515.   Name   "Mean Value1"
  1516.   Ports   [2, 1]
  1517.   Position   [435, 144, 490, 171]
  1518.   TreatAsAtomicUnit   off
  1519.   MinAlgLoopOccurrences   off
  1520.   RTWSystemCode   "Auto"
  1521.   MaskHideContents   off
  1522.   MaskType   "Mean value"
  1523.   MaskDescription   "This block uses the running window averagin"
  1524. "g technique to compute the mean value of the input signal over the specified "
  1525. "period.n"
  1526.   MaskPromptString   "Averaging period (s):"
  1527.   MaskStyleString   "edit"
  1528.   MaskTunableValueString  "on"
  1529.   MaskEnableString   "on"
  1530.   MaskVisibilityString   "on"
  1531.   MaskToolTipString   "on"
  1532.   MaskVariables   "Period=@1;"
  1533.   MaskInitialization   "n"
  1534.   MaskIconFrame   on
  1535.   MaskIconOpaque   on
  1536.   MaskIconRotate   "none"
  1537.   MaskIconUnits   "autoscale"
  1538.   MaskValueString   "1/60"
  1539.   System {
  1540.     Name     "Mean Value1"
  1541.     Location     [220, 282, 763, 473]
  1542.     Open     off
  1543.     ModelBrowserVisibility  off
  1544.     ModelBrowserWidth     200
  1545.     ScreenColor     "white"
  1546.     PaperOrientation     "landscape"
  1547.     PaperPositionMode     "auto"
  1548.     PaperType     "usletter"
  1549.     PaperUnits     "inches"
  1550.     ZoomFactor     "100"
  1551.     Block {
  1552.       BlockType       Inport
  1553.       Name       "In"
  1554.       Position       [20, 73, 50, 87]
  1555.       IconDisplay       "Port number"
  1556.     }
  1557.     Block {
  1558.       BlockType       Inport
  1559.       Name       "Init"
  1560.       Position       [380, 143, 410, 157]
  1561.       Port       "2"
  1562.       IconDisplay       "Port number"
  1563.     }
  1564.     Block {
  1565.       BlockType       Gain
  1566.       Name       "Gain"
  1567.       Position       [310, 73, 385, 117]
  1568.       Gain       "1/Period"
  1569.     }
  1570.     Block {
  1571.       BlockType       Step
  1572.       Name       "Step"
  1573.       Position       [370, 25, 400, 55]
  1574.       Time       "Period+eps"
  1575.       SampleTime       "0"
  1576.     }
  1577.     Block {
  1578.       BlockType       Sum
  1579.       Name       "Sum"
  1580.       Ports       [2, 1]
  1581.       Position       [250, 69, 270, 116]
  1582.       Inputs       "+-"
  1583.     }
  1584.     Block {
  1585.       BlockType       Switch
  1586.       Name       "Switch"
  1587.       Position       [435, 90, 465, 120]
  1588.       Threshold       "0.5"
  1589.       InputSameDT       off
  1590.     }
  1591.     Block {
  1592.       BlockType       TransportDelay
  1593.       Name       "TransportnDelay"
  1594.       Position       [175, 90, 205, 120]
  1595.       DelayTime       "Period"
  1596.     }
  1597.     Block {
  1598.       BlockType       Integrator
  1599.       Name       "integrator"
  1600.       Ports       [1, 1]
  1601.       Position       [85, 59, 115, 101]
  1602.       IgnoreLimit       off
  1603.     }
  1604.     Block {
  1605.       BlockType       Outport
  1606.       Name       "Mean"
  1607.       Position       [490, 98, 520, 112]
  1608.       IconDisplay       "Port number"
  1609.       BusOutputAsStruct       off
  1610.     }
  1611.     Line {
  1612.       SrcBlock       "TransportnDelay"
  1613.       SrcPort       1
  1614.       DstBlock       "Sum"
  1615.       DstPort       2
  1616.     }
  1617.     Line {
  1618.       SrcBlock       "integrator"
  1619.       SrcPort       1
  1620.       Points       [0, 0; 25, 0]
  1621.       Branch {
  1622. Points [0, 25]
  1623. DstBlock "TransportnDelay"
  1624. DstPort 1
  1625.       }
  1626.       Branch {
  1627. DstBlock "Sum"
  1628. DstPort 1
  1629.       }
  1630.     }
  1631.     Line {
  1632.       SrcBlock       "In"
  1633.       SrcPort       1
  1634.       DstBlock       "integrator"
  1635.       DstPort       1
  1636.     }
  1637.     Line {
  1638.       SrcBlock       "Sum"
  1639.       SrcPort       1
  1640.       DstBlock       "Gain"
  1641.       DstPort       1
  1642.     }
  1643.     Line {
  1644.       SrcBlock       "Gain"
  1645.       SrcPort       1
  1646.       DstBlock       "Switch"
  1647.       DstPort       1
  1648.     }
  1649.     Line {
  1650.       SrcBlock       "Switch"
  1651.       SrcPort       1
  1652.       DstBlock       "Mean"
  1653.       DstPort       1
  1654.     }
  1655.     Line {
  1656.       SrcBlock       "Step"
  1657.       SrcPort       1
  1658.       Points       [10, 0; 0, 65]
  1659.       DstBlock       "Switch"
  1660.       DstPort       2
  1661.     }
  1662.     Line {
  1663.       SrcBlock       "Init"
  1664.       SrcPort       1
  1665.       Points       [0, -35]
  1666.       DstBlock       "Switch"
  1667.       DstPort       3
  1668.     }
  1669.     Annotation {
  1670.       Name       "Mean value"
  1671.       Position       [48, 26]
  1672.       UseDisplayTextAsClickCallback off
  1673.       FontSize       12
  1674.       FontWeight       "bold"
  1675.     }
  1676.   }
  1677. }
  1678. Block {
  1679.   BlockType   SubSystem
  1680.   Name   "Mean Value2"
  1681.   Ports   [2, 1]
  1682.   Position   [435, 199, 490, 226]
  1683.   TreatAsAtomicUnit   off
  1684.   MinAlgLoopOccurrences   off
  1685.   RTWSystemCode   "Auto"
  1686.   MaskHideContents   off
  1687.   MaskType   "Mean value"
  1688.   MaskDescription   "This block uses the running window averagin"
  1689. "g technique to compute the mean value of the input signal over the specified "
  1690. "period.n"
  1691.   MaskPromptString   "Averaging period (s):"
  1692.   MaskStyleString   "edit"
  1693.   MaskTunableValueString  "on"
  1694.   MaskEnableString   "on"
  1695.   MaskVisibilityString   "on"
  1696.   MaskToolTipString   "on"
  1697.   MaskVariables   "Period=@1;"
  1698.   MaskInitialization   "n"
  1699.   MaskIconFrame   on
  1700.   MaskIconOpaque   on
  1701.   MaskIconRotate   "none"
  1702.   MaskIconUnits   "autoscale"
  1703.   MaskValueString   "1/60"
  1704.   System {
  1705.     Name     "Mean Value2"
  1706.     Location     [220, 282, 763, 473]
  1707.     Open     off
  1708.     ModelBrowserVisibility  off
  1709.     ModelBrowserWidth     200
  1710.     ScreenColor     "white"
  1711.     PaperOrientation     "landscape"
  1712.     PaperPositionMode     "auto"
  1713.     PaperType     "usletter"
  1714.     PaperUnits     "inches"
  1715.     ZoomFactor     "100"
  1716.     Block {
  1717.       BlockType       Inport
  1718.       Name       "In"
  1719.       Position       [20, 73, 50, 87]
  1720.       IconDisplay       "Port number"
  1721.     }
  1722.     Block {
  1723.       BlockType       Inport
  1724.       Name       "Init"
  1725.       Position       [380, 143, 410, 157]
  1726.       Port       "2"
  1727.       IconDisplay       "Port number"
  1728.     }
  1729.     Block {
  1730.       BlockType       Gain
  1731.       Name       "Gain"
  1732.       Position       [310, 73, 385, 117]
  1733.       Gain       "1/Period"
  1734.     }
  1735.     Block {
  1736.       BlockType       Step
  1737.       Name       "Step"
  1738.       Position       [370, 25, 400, 55]
  1739.       Time       "Period+eps"
  1740.       SampleTime       "0"
  1741.     }
  1742.     Block {
  1743.       BlockType       Sum
  1744.       Name       "Sum"
  1745.       Ports       [2, 1]
  1746.       Position       [250, 69, 270, 116]
  1747.       Inputs       "+-"
  1748.     }
  1749.     Block {
  1750.       BlockType       Switch
  1751.       Name       "Switch"
  1752.       Position       [435, 90, 465, 120]
  1753.       Threshold       "0.5"
  1754.       InputSameDT       off
  1755.     }
  1756.     Block {
  1757.       BlockType       TransportDelay
  1758.       Name       "TransportnDelay"
  1759.       Position       [175, 90, 205, 120]
  1760.       DelayTime       "Period"
  1761.     }
  1762.     Block {
  1763.       BlockType       Integrator
  1764.       Name       "integrator"
  1765.       Ports       [1, 1]
  1766.       Position       [85, 59, 115, 101]
  1767.       IgnoreLimit       off
  1768.     }
  1769.     Block {
  1770.       BlockType       Outport
  1771.       Name       "Mean"
  1772.       Position       [490, 98, 520, 112]
  1773.       IconDisplay       "Port number"
  1774.       BusOutputAsStruct       off
  1775.     }
  1776.     Line {
  1777.       SrcBlock       "Init"
  1778.       SrcPort       1
  1779.       Points       [0, -35]
  1780.       DstBlock       "Switch"
  1781.       DstPort       3
  1782.     }
  1783.     Line {
  1784.       SrcBlock       "Step"
  1785.       SrcPort       1
  1786.       Points       [10, 0; 0, 65]
  1787.       DstBlock       "Switch"
  1788.       DstPort       2
  1789.     }
  1790.     Line {
  1791.       SrcBlock       "Switch"
  1792.       SrcPort       1
  1793.       DstBlock       "Mean"
  1794.       DstPort       1
  1795.     }
  1796.     Line {
  1797.       SrcBlock       "Gain"
  1798.       SrcPort       1
  1799.       DstBlock       "Switch"
  1800.       DstPort       1
  1801.     }
  1802.     Line {
  1803.       SrcBlock       "Sum"
  1804.       SrcPort       1
  1805.       DstBlock       "Gain"
  1806.       DstPort       1
  1807.     }
  1808.     Line {
  1809.       SrcBlock       "In"
  1810.       SrcPort       1
  1811.       DstBlock       "integrator"
  1812.       DstPort       1
  1813.     }
  1814.     Line {
  1815.       SrcBlock       "integrator"
  1816.       SrcPort       1
  1817.       Points       [0, 0; 25, 0]
  1818.       Branch {
  1819. DstBlock "Sum"
  1820. DstPort 1
  1821.       }
  1822.       Branch {
  1823. Points [0, 25]
  1824. DstBlock "TransportnDelay"
  1825. DstPort 1
  1826.       }
  1827.     }
  1828.     Line {
  1829.       SrcBlock       "TransportnDelay"
  1830.       SrcPort       1
  1831.       DstBlock       "Sum"
  1832.       DstPort       2
  1833.     }
  1834.     Annotation {
  1835.       Name       "Mean value"
  1836.       Position       [48, 26]
  1837.       UseDisplayTextAsClickCallback off
  1838.       FontSize       12
  1839.       FontWeight       "bold"
  1840.     }
  1841.   }
  1842. }
  1843. Block {
  1844.   BlockType   Reference
  1845.   Name   "Sequence Analyzern(Phasor Type)"
  1846.   Ports   [1, 2]
  1847.   Position   [195, 316, 245, 369]
  1848.   SourceBlock   "powerlib_extras/PhasornLibrary/Sequence An"
  1849. "alyzern(Phasor Type)"
  1850.   SourceType   "Sequence Analyzer (Phasor Type)"
  1851.   ShowPortLabels   on
  1852.   seq   "Positive"
  1853. }
  1854. Block {
  1855.   BlockType   Reference
  1856.   Name   "Sequence Analyzern(Phasor Type)1"
  1857.   Ports   [1, 2]
  1858.   Position   [195, 401, 245, 454]
  1859.   SourceBlock   "powerlib_extras/PhasornLibrary/Sequence An"
  1860. "alyzern(Phasor Type)"
  1861.   SourceType   "Sequence Analyzer (Phasor Type)"
  1862.   ShowPortLabels   on
  1863.   seq   "Positive"
  1864. }
  1865. Block {
  1866.   BlockType   Terminator
  1867.   Name   "Terminator"
  1868.   Position   [265, 347, 280, 363]
  1869.   ShowName   off
  1870. }
  1871. Block {
  1872.   BlockType   Terminator
  1873.   Name   "Terminator1"
  1874.   Position   [265, 432, 280, 448]
  1875.   ShowName   off
  1876. }
  1877. Block {
  1878.   BlockType   From
  1879.   Name   "m_load "
  1880.   Position   [60, 270, 135, 290]
  1881.   ShowName   off
  1882.   CloseFcn   "tagdialog Close"
  1883.   GotoTag   "MotorSpeed"
  1884. }
  1885. Block {
  1886.   BlockType   Gain
  1887.   Name   "pu->A"
  1888.   Position   [180, 174, 200, 196]
  1889.   Gain   "10e6/sqrt(3)/25e3*sqrt(2)"
  1890. }
  1891. Block {
  1892.   BlockType   Gain
  1893.   Name   "pu->V"
  1894.   Position   [180, 144, 200, 166]
  1895.   NamePlacement   "alternate"
  1896.   Gain   "25e3*sqrt(2)/sqrt(3)"
  1897. }
  1898. Block {
  1899.   BlockType   Outport
  1900.   Name   "Vabc_B120 "
  1901.   Position   [245, 33, 275, 47]
  1902.   IconDisplay   "Port number"
  1903.   BusOutputAsStruct   off
  1904. }
  1905. Block {
  1906.   BlockType   Outport
  1907.   Name   "Vabc_B25 "
  1908.   Position   [245, 63, 275, 77]
  1909.   Port   "2"
  1910.   IconDisplay   "Port number"
  1911.   BusOutputAsStruct   off
  1912. }
  1913. Block {
  1914.   BlockType   Outport
  1915.   Name   "Vabc_B575 "
  1916.   Position   [245, 93, 275, 107]
  1917.   Port   "3"
  1918.   IconDisplay   "Port number"
  1919.   BusOutputAsStruct   off
  1920. }
  1921. Block {
  1922.   BlockType   Outport
  1923.   Name   "P_B25"
  1924.   Position   [530, 153, 560, 167]
  1925.   Port   "4"
  1926.   IconDisplay   "Port number"
  1927.   BusOutputAsStruct   off
  1928. }
  1929. Block {
  1930.   BlockType   Outport
  1931.   Name   "Q_B25"
  1932.   Position   [530, 208, 560, 222]
  1933.   Port   "5"
  1934.   IconDisplay   "Port number"
  1935.   BusOutputAsStruct   off
  1936. }
  1937. Block {
  1938.   BlockType   Outport
  1939.   Name   "V1_Plant"
  1940.   Position   [310, 323, 340, 337]
  1941.   Port   "6"
  1942.   IconDisplay   "Port number"
  1943.   BusOutputAsStruct   off
  1944. }
  1945. Block {
  1946.   BlockType   Outport
  1947.   Name   "I1_Plant"
  1948.   Position   [310, 408, 340, 422]
  1949.   Port   "7"
  1950.   IconDisplay   "Port number"
  1951.   BusOutputAsStruct   off
  1952. }
  1953. Block {
  1954.   BlockType   Outport
  1955.   Name   "Motor_Speed"
  1956.   Position   [260, 273, 290, 287]
  1957.   Port   "8"
  1958.   IconDisplay   "Port number"
  1959.   BusOutputAsStruct   off
  1960. }
  1961. Line {
  1962.   SrcBlock   "pu->A"
  1963.   SrcPort   1
  1964.   DstBlock   "3-PhasenActive & Reactive Powern(Phasor T"
  1965. "ype)"
  1966.   DstPort   2
  1967. }
  1968. Line {
  1969.   SrcBlock   "pu->V"
  1970.   SrcPort   1
  1971.   DstBlock   "3-PhasenActive & Reactive Powern(Phasor T"
  1972. "ype)"
  1973.   DstPort   1
  1974. }
  1975. Line {
  1976.   SrcBlock   "3-PhasenActive & Reactive Powern(Phasor T"
  1977. "ype)"
  1978.   SrcPort   1
  1979.   DstBlock   "MW"
  1980.   DstPort   1
  1981. }
  1982. Line {
  1983.   SrcBlock   "Complex tonMagnitude-Angle "
  1984.   SrcPort   1
  1985.   DstBlock   "Vabc_B120 "
  1986.   DstPort   1
  1987. }
  1988. Line {
  1989.   SrcBlock   "From"
  1990.   SrcPort   1
  1991.   DstBlock   "Complex tonMagnitude-Angle "
  1992.   DstPort   1
  1993. }
  1994. Line {
  1995.   SrcBlock   "Complex tonMagnitude-Angle 1"
  1996.   SrcPort   1
  1997.   DstBlock   "Vabc_B25 "
  1998.   DstPort   1
  1999. }
  2000. Line {
  2001.   SrcBlock   "From1"
  2002.   SrcPort   1
  2003.   Points   [30, 0]
  2004.   Branch {
  2005.     DstBlock     "Complex tonMagnitude-Angle 1"
  2006.     DstPort     1
  2007.   }
  2008.   Branch {
  2009.     Points     [0, 85]
  2010.     DstBlock     "pu->V"
  2011.     DstPort     1
  2012.   }
  2013. }
  2014. Line {
  2015.   SrcBlock   "Complex tonMagnitude-Angle 2"
  2016.   SrcPort   1
  2017.   DstBlock   "Vabc_B575 "
  2018.   DstPort   1
  2019. }
  2020. Line {
  2021.   SrcBlock   "From8"
  2022.   SrcPort   1
  2023.   DstBlock   "Complex tonMagnitude-Angle 2"
  2024.   DstPort   1
  2025. }
  2026. Line {
  2027.   SrcBlock   "From2"
  2028.   SrcPort   1
  2029.   DstBlock   "pu->A"
  2030.   DstPort   1
  2031. }
  2032. Line {
  2033.   SrcBlock   "MW"
  2034.   SrcPort   1
  2035.   DstBlock   "Demux"
  2036.   DstPort   1
  2037. }
  2038. Line {
  2039.   SrcBlock   "Demux"
  2040.   SrcPort   1
  2041.   DstBlock   "Mean Value1"
  2042.   DstPort   1
  2043. }
  2044. Line {
  2045.   SrcBlock   "Demux"
  2046.   SrcPort   2
  2047.   Points   [0, 20]
  2048.   DstBlock   "Mean Value2"
  2049.   DstPort   1
  2050. }
  2051. Line {
  2052.   SrcBlock   "Constant"
  2053.   SrcPort   1
  2054.   Points   [5, 0; 0, -35]
  2055.   Branch {
  2056.     Points     [0, -55]
  2057.     DstBlock     "Mean Value1"
  2058.     DstPort     2
  2059.   }
  2060.   Branch {
  2061.     DstBlock     "Mean Value2"
  2062.     DstPort     2
  2063.   }
  2064. }
  2065. Line {
  2066.   SrcBlock   "Mean Value1"
  2067.   SrcPort   1
  2068.   DstBlock   "P_B25"
  2069.   DstPort   1
  2070. }
  2071. Line {
  2072.   SrcBlock   "Mean Value2"
  2073.   SrcPort   1
  2074.   DstBlock   "Q_B25"
  2075.   DstPort   1
  2076. }
  2077. Line {
  2078.   SrcBlock   "m_load "
  2079.   SrcPort   1
  2080.   DstBlock   "Motor_Speed"
  2081.   DstPort   1
  2082. }
  2083. Line {
  2084.   SrcBlock   "From3"
  2085.   SrcPort   1
  2086.   DstBlock   "Sequence Analyzern(Phasor Type)"
  2087.   DstPort   1
  2088. }
  2089. Line {
  2090.   SrcBlock   "Sequence Analyzern(Phasor Type)"
  2091.   SrcPort   1
  2092.   DstBlock   "V1_Plant"
  2093.   DstPort   1
  2094. }
  2095. Line {
  2096.   SrcBlock   "Sequence Analyzern(Phasor Type)"
  2097.   SrcPort   2
  2098.   DstBlock   "Terminator"
  2099.   DstPort   1
  2100. }
  2101. Line {
  2102.   SrcBlock   "From4"
  2103.   SrcPort   1
  2104.   DstBlock   "Sequence Analyzern(Phasor Type)1"
  2105.   DstPort   1
  2106. }
  2107. Line {
  2108.   SrcBlock   "Sequence Analyzern(Phasor Type)1"
  2109.   SrcPort   1
  2110.   DstBlock   "I1_Plant"
  2111.   DstPort   1
  2112. }
  2113. Line {
  2114.   SrcBlock   "Sequence Analyzern(Phasor Type)1"
  2115.   SrcPort   2
  2116.   DstBlock   "Terminator1"
  2117.   DstPort   1
  2118. }
  2119.       }
  2120.     }
  2121.     Block {
  2122.       BlockType       Reference
  2123.       Name       "Ground1"
  2124.       Ports       [0, 0, 0, 0, 0, 1]
  2125.       Position       [14, 150, 26, 165]
  2126.       Orientation       "down"
  2127.       ShowName       off
  2128.       AttributesFormatString  "\n"
  2129.       SourceBlock       "powerlib/Elements/Ground"
  2130.       SourceType       "Ground"
  2131.       PhysicalDomain       "powersysdomain"
  2132.       SubClassName       "unknown"
  2133.       LeftPortType       "p1"
  2134.       RightPortType       "p1"
  2135.       LConnTagsString       "a"
  2136.     }
  2137.     Block {
  2138.       BlockType       Reference
  2139.       Name       "Ground3"
  2140.       Ports       [0, 0, 0, 0, 0, 1]
  2141.       Position       [294, 290, 306, 305]
  2142.       Orientation       "down"
  2143.       ShowName       off
  2144.       AttributesFormatString  "\n"
  2145.       SourceBlock       "powerlib/Elements/Ground"
  2146.       SourceType       "Ground"
  2147.       PhysicalDomain       "powersysdomain"
  2148.       SubClassName       "unknown"
  2149.       LeftPortType       "p1"
  2150.       RightPortType       "p1"
  2151.       LConnTagsString       "a"
  2152.     }
  2153.     Block {
  2154.       BlockType       Reference
  2155.       Name       "GroundingnTransformernX0=4.7 Ohms"
  2156.       Ports       [0, 0, 0, 0, 0, 4, 3]
  2157.       Position       [230, 195, 280, 245]
  2158.       Orientation       "left"
  2159.       BackgroundColor       "yellow"
  2160.       AttributesFormatString  "\n"
  2161.       SourceBlock       "powerlib/Elements/Three-PhasenTransformern(Tw"
  2162. "o Windings)"
  2163.       SourceType       "Three-Phase Transformer (Two Windings)"
  2164.       ShowPortLabels       on
  2165.       NominalPower       "[100e6 60]"
  2166.       Winding1Connection      "Yn"
  2167.       Winding1       "[ 25e3  4.7/(25e3^2/100e6)/30    4.7/(25e3^2/10"
  2168. "0e6)]"
  2169.       Winding2Connection      "Delta (D11)"
  2170.       Winding2       "[ 25e3  1e-6  0]"
  2171.       SetSaturation       off
  2172.       Rm       "500"
  2173.       Lm       "500"
  2174.       Saturation       "[ 0,0  ;  0.005,1.2  ;  1.0,1.4 ]"
  2175.       Hysteresis       off
  2176.       DataFile       "'basic_model'"
  2177.       SetInitialFlux       off
  2178.       InitialFluxes       "[ 0.8 , -0.8 , 0.7 ]"
  2179.       Measurements       "None"
  2180.       TransfoNumber       "0"
  2181.       MoreParameters       off
  2182.       BreakLoop       off
  2183.     }
  2184.     Block {
  2185.       BlockType       Reference
  2186.       Name       "Loadn500 kW"
  2187.       Ports       [0, 0, 0, 0, 0, 3]
  2188.       Position       [705, 195, 735, 235]
  2189.       Orientation       "down"
  2190.       BackgroundColor       "yellow"
  2191.       AttributesFormatString  "\n"
  2192.       SourceBlock       "powerlib/Elements/Three-PhasenSeries RLC Load"
  2193.       SourceType       "Three-Phase Series RLC Load"
  2194.       PhysicalDomain       "powersysdomain"
  2195.       SubClassName       "unknown"
  2196.       LeftPortType       "p1"
  2197.       RightPortType       "p1"
  2198.       LConnTagsString       "A|B|C"
  2199.       Configuration       "Y (grounded)"
  2200.       NominalVoltage       "575"
  2201.       NominalFrequency       "60"
  2202.       ActivePower       "500e3"
  2203.       InductivePower       "0"
  2204.       CapacitivePower       "0"
  2205.       Measurements       "None"
  2206.     }
  2207.     Block {
  2208.       BlockType       SubSystem
  2209.       Name       "More info"
  2210.       Ports       []
  2211.       Position       [925, 580, 952, 605]
  2212.       ForegroundColor       "blue"
  2213.       DropShadow       on
  2214.       OpenFcn       "web('power_wind_dfig.html')"
  2215.       TreatAsAtomicUnit       off
  2216.       MinAlgLoopOccurrences   off
  2217.       RTWSystemCode       "Auto"
  2218.       MaskHideContents       off
  2219.       MaskDisplay       "disp('?')"
  2220.       MaskIconFrame       on
  2221.       MaskIconOpaque       on
  2222.       MaskIconRotate       "none"
  2223.       MaskIconUnits       "autoscale"
  2224.       System {
  2225. Name "More info"
  2226. Location [125, 254, 937, 641]
  2227. Open off
  2228. ModelBrowserVisibility off
  2229. ModelBrowserWidth 200
  2230. ScreenColor "white"
  2231. PaperOrientation "landscape"
  2232. PaperPositionMode "auto"
  2233. PaperType "usletter"
  2234. PaperUnits "inches"
  2235. ZoomFactor "100"
  2236.       }
  2237.     }
  2238.     Block {
  2239.       BlockType       SubSystem
  2240.       Name       "Plantn2 MVA"
  2241.       Ports       [0, 0, 0, 0, 0, 3]
  2242.       Position       [520, 173, 570, 237]
  2243.       BackgroundColor       "yellow"
  2244.       DropShadow       on
  2245.       TreatAsAtomicUnit       off
  2246.       MinAlgLoopOccurrences   off
  2247.       RTWSystemCode       "Auto"
  2248.       MaskHideContents       off
  2249.       System {
  2250. Name "Plantn2 MVA"
  2251. Location [63, 103, 895, 743]
  2252. Open off
  2253. ModelBrowserVisibility off
  2254. ModelBrowserWidth 200
  2255. ScreenColor "white"
  2256. PaperOrientation "landscape"
  2257. PaperPositionMode "auto"
  2258. PaperType "usletter"
  2259. PaperUnits "inches"
  2260. ZoomFactor "100"
  2261. Block {
  2262.   BlockType   Reference
  2263.   Name   "1.68 MW 0.93 PFn 2300 V"
  2264.   Ports   [1, 1, 0, 0, 0, 3]
  2265.   Position   [530, 90, 590, 155]
  2266.   BackgroundColor   "lightBlue"
  2267.   SourceBlock   "powerlib/Machines/Asynchronous Machinenpu "
  2268. "Units"
  2269.   SourceType   "Asynchronous Machine"
  2270.   ShowPortLabels   on
  2271.   PresetModel   "No"
  2272.   MechanicalLoad   "Torque Tm"
  2273.   ShowDetailedParameters  on
  2274.   RotorType   "Squirrel-cage"
  2275.   ReferenceFrame   "Rotor"
  2276.   NominalParameters   "[1.68e6/0.93 2300 60]"
  2277.   Stator   "[0.0092 0.0717]"
  2278.   Rotor   "[0.007 0.0717]"
  2279.   Lm   "4.14"
  2280.   Mechanical   "[0.5 0 2]"
  2281.   InitialConditions   "[ 1e-3,0   0,0,0   0,0,0 ]  "
  2282.   Units   "0"
  2283.   LoadFlowParameters   "0"
  2284.   SimulateSaturation   off
  2285.   Saturation   "[ 0 0 ; 0 0 ]"
  2286. }
  2287. Block {
  2288.   BlockType   Reference
  2289.   Name   "200 kW"
  2290.   Ports   [0, 0, 0, 0, 0, 3]
  2291.   Position   [430, 210, 470, 260]
  2292.   Orientation   "down"
  2293.   BackgroundColor   "yellow"
  2294.   AttributesFormatString  "\n"
  2295.   SourceBlock   "powerlib/Elements/Three-PhasenSeries RLC L"
  2296. "oad"
  2297.   SourceType   "Three-Phase Series RLC Load"
  2298.   PhysicalDomain   "powersysdomain"
  2299.   SubClassName   "unknown"
  2300.   LeftPortType   "p1"
  2301.   RightPortType   "p1"
  2302.   LConnTagsString   "A|B|C"
  2303.   Configuration   "Y (grounded)"
  2304.   NominalVoltage   "2300"
  2305.   NominalFrequency   "60"
  2306.   ActivePower   "200e3"
  2307.   InductivePower   "0"
  2308.   CapacitivePower   "0"
  2309.   Measurements   "None"
  2310. }
  2311. Block {
  2312.   BlockType   Reference
  2313.   Name   "25/2.3 kVn2.5 MVA"
  2314.   Ports   [0, 0, 0, 0, 0, 3, 4]
  2315.   Position   [100, 108, 160, 177]
  2316.   BackgroundColor   "yellow"
  2317.   AttributesFormatString  "\n"
  2318.   SourceBlock   "powerlib/Elements/Three-PhasenTransformer"
  2319. "n(Two Windings)"
  2320.   SourceType   "Three-Phase Transformer (Two Windings)"
  2321.   ShowPortLabels   on
  2322.   NominalPower   "[2.5e6 60 ]"
  2323.   Winding1Connection   "Delta (D11)"
  2324.   Winding1   "[ 25e3  0.04/30   0.04 ]"
  2325.   Winding2Connection   "Yn"
  2326.   Winding2   "[ 2.3e3  0.04/30  0.04]"
  2327.   SetSaturation   off
  2328.   Rm   "500"
  2329.   Lm   "500"
  2330.   Saturation   "[ 0,0  ;  0.005,1.2  ;  1.0,1.4 ]"
  2331.   Hysteresis   off
  2332.   DataFile   "'basic_model'"
  2333.   SetInitialFlux   off
  2334.   InitialFluxes   "[ 0.8 , -0.8 , 0.7 ]"
  2335.   Measurements   "None"
  2336.   TransfoNumber   "0"
  2337.   MoreParameters   off
  2338.   BreakLoop   off
  2339. }
  2340. Block {
  2341.   BlockType   Reference
  2342.   Name   "265 ohms"
  2343.   Ports   [0, 0, 0, 0, 0, 1, 1]
  2344.   Position   [165, 215, 195, 235]
  2345.   Orientation   "down"
  2346.   NamePlacement   "alternate"
  2347.   SourceBlock   "powerlib/Elements/Series RLC Branch"
  2348.   SourceType   "Series RLC Branch"
  2349.   PhysicalDomain   "powersysdomain"
  2350.   SubClassName   "unknown"
  2351.   LeftPortType   "p1"
  2352.   RightPortType   "p1"
  2353.   LConnTagsString   "__new0"
  2354.   RConnTagsString   "__new0"
  2355.   BranchType   "R"
  2356.   Resistance   "265"
  2357.   Inductance   "[]"
  2358.   SetiL0   off
  2359.   InitialCurrent   "0"
  2360.   Capacitance   "[]"
  2361.   Setx0   off
  2362.   InitialVoltage   "0"
  2363.   Measurements   "None"
  2364. }
  2365. Block {
  2366.   BlockType   Reference
  2367.   Name   "B2300"
  2368.   Ports   [0, 0, 0, 0, 0, 3, 3]
  2369.   Position   [270, 112, 275, 158]
  2370.   BackgroundColor   "black"
  2371.   SourceBlock   "powerlib/Measurements/Three-PhasenV-I Meas"
  2372. "urement"
  2373.   SourceType   "Three-Phase VI Measurement"
  2374.   ShowPortLabels   on
  2375.   VoltageMeasurement   "phase-to-ground"
  2376.   SetLabelV   on
  2377.   LabelV   "Vabc_B2300"
  2378.   Vpu   on
  2379.   CurrentMeasurement   "yes"
  2380.   SetLabelI   on
  2381.   LabelI   "Iabc_B2300"
  2382.   Ipu   on
  2383.   Pbase   "2.0e6"
  2384.   Vbase   "2300"
  2385.   OutputType   "Complex"
  2386.   PhasorSimulation   on
  2387.   PSBequivalent   "0"
  2388. }
  2389. Block {
  2390.   BlockType   BusSelector
  2391.   Name   "BusnSelector"
  2392.   Ports   [1, 1]
  2393.   Position   [615, 109, 620, 141]
  2394.   ShowName   off
  2395.   OutputSignals   "Mechanical.Rotor speed (wm)"
  2396.   Port {
  2397.     PortNumber     1
  2398.     Name     "<Rotor speed (wm)>"
  2399.     RTWStorageClass     "Auto"
  2400.     DataLoggingNameMode     "SignalName"
  2401.   }
  2402. }
  2403. Block {
  2404.   BlockType   DataTypeConversion
  2405.   Name   "Data Type Conversion"
  2406.   Position   [340, 342, 380, 368]
  2407.   ShowName   off
  2408.   OutDataTypeMode   "double"
  2409.   SampleTime   "0"
  2410. }
  2411. Block {
  2412.   BlockType   From
  2413.   Name   "From1"
  2414.   Position   [60, 450, 135, 470]
  2415.   ShowName   off
  2416.   CloseFcn   "tagdialog Close"
  2417.   GotoTag   "MotorSpeed"
  2418. }
  2419. Block {
  2420.   BlockType   From
  2421.   Name   "From2"
  2422.   Position   [230, 66, 315, 84]
  2423.   ShowName   off
  2424.   CloseFcn   "tagdialog Close"
  2425.   GotoTag   "Trip_Plant"
  2426. }
  2427. Block {
  2428.   BlockType   From
  2429.   Name   "From7"
  2430.   Position   [60, 360, 135, 380]
  2431.   ShowName   off
  2432.   CloseFcn   "tagdialog Close"
  2433.   GotoTag   "Iabc_B2300"
  2434. }
  2435. Block {
  2436.   BlockType   From
  2437.   Name   "From9"
  2438.   Position   [60, 330, 135, 350]
  2439.   ShowName   off
  2440.   CloseFcn   "tagdialog Close"
  2441.   GotoTag   "Vabc_B2300"
  2442. }
  2443. Block {
  2444.   BlockType   Gain
  2445.   Name   "Gain"
  2446.   Position   [525, 31, 565, 69]
  2447.   Orientation   "left"
  2448.   ShowName   off
  2449.   Gain   "0.9"
  2450. }
  2451. Block {
  2452.   BlockType   Goto
  2453.   Name   "Goto1"
  2454.   Position   [400, 346, 480, 364]
  2455.   ShowName   off
  2456.   GotoTag   "Trip_Plant"
  2457.   TagVisibility   "local"
  2458. }
  2459. Block {
  2460.   BlockType   Goto
  2461.   Name   "Goto6"
  2462.   Position   [720, 114, 795, 136]
  2463.   ShowName   off
  2464.   GotoTag   "MotorSpeed"
  2465.   TagVisibility   "global"
  2466. }
  2467. Block {
  2468.   BlockType   Reference
  2469.   Name   "Ground"
  2470.   Ports   [0, 0, 0, 0, 0, 1]
  2471.   Position   [169, 260, 191, 285]
  2472.   Orientation   "down"
  2473.   ShowName   off
  2474.   SourceBlock   "powerlib/Elements/Ground"
  2475.   SourceType   "Ground"
  2476.   PhysicalDomain   "powersysdomain"
  2477.   SubClassName   "unknown"
  2478.   LeftPortType   "p1"
  2479.   RightPortType   "p1"
  2480.   LConnTagsString   "a"
  2481. }
  2482. Block {
  2483.   BlockType   Ground
  2484.   Name   "Ground1"
  2485.   Position   [125, 393, 135, 407]
  2486.   ShowName   off
  2487. }
  2488. Block {
  2489.   BlockType   Ground
  2490.   Name   "Ground2"
  2491.   Position   [125, 423, 135, 437]
  2492.   ShowName   off
  2493. }
  2494. Block {
  2495.   BlockType   Logic
  2496.   Name   "LogicalnOperator"
  2497.   Ports   [1, 1]
  2498.   Position   [290, 339, 320, 371]
  2499.   ShowName   off
  2500.   Operator   "NOT"
  2501.   AllPortsSameDT   off
  2502. }
  2503. Block {
  2504.   BlockType   Reference
  2505.   Name   "PF CorrectionnCapacitorn800 kvar"
  2506.   Ports   [0, 0, 0, 0, 0, 3]
  2507.   Position   [215, 210, 255, 260]
  2508.   Orientation   "down"
  2509.   BackgroundColor   "yellow"
  2510.   AttributesFormatString  "\n"
  2511.   SourceBlock   "powerlib/Elements/Three-PhasenSeries RLC L"
  2512. "oad"
  2513.   SourceType   "Three-Phase Series RLC Load"
  2514.   PhysicalDomain   "powersysdomain"
  2515.   SubClassName   "unknown"
  2516.   LeftPortType   "p1"
  2517.   RightPortType   "p1"
  2518.   LConnTagsString   "A|B|C"
  2519.   Configuration   "Y (grounded)"
  2520.   NominalVoltage   "2300"
  2521.   NominalFrequency   "60"
  2522.   ActivePower   "0"
  2523.   InductivePower   "0"
  2524.   CapacitivePower   "800e3"
  2525.   Measurements   "None"
  2526. }
  2527. Block {
  2528.   BlockType   SubSystem
  2529.   Name   "Plant & Motor nProtection"
  2530.   Ports   [5, 3]
  2531.   Position   [170, 329, 270, 471]
  2532.   BackgroundColor   "cyan"
  2533.   TreatAsAtomicUnit   off
  2534.   MinAlgLoopOccurrences   off
  2535.   RTWSystemCode   "Auto"
  2536.   MaskHideContents   off
  2537.   MaskType   "Protection System"
  2538.   MaskDescription   "Protection type:n1.    Instantaneous AC Ov"
  2539. "ercurrentn2.    AC Overcurrent (positive-sequence)n3.    AC Current Unbalan"
  2540. "cen4.    AC Undervoltage (positive-sequence)n5.    AC Overvoltage (positive"
  2541. "-sequence)n6.    AC Voltage Unbalance (Negative-sequence)n7.    AC Voltage "
  2542. "Unbalance (Zero-sequence)n8.    DC Overvoltage n9.    Under Speedn10.  Ove"
  2543. "r Speedn"
  2544.   MaskPromptString   "Fundamental frequency f1 (Hz):|Instantaneou"
  2545. "s AC Overcurrent (pu):|Maximum AC Current [ I1max(pu), Delay(s) ]:|Maximum AC"
  2546. " Current Unbalance [ I2/I1max(pu), Delay(s) ]|AC Under/Over Voltage [ V1min(p"
  2547. "u), V1max(pu), Delay(s) ]:|Maximum Voltage Unbalance [ V2/V1max(pu), V0/V1max"
  2548. "(pu), Delay(s)]:|Maximum DC Voltage  [ Vmax(V), Delay(s) ]:|Under/Over Speed "
  2549. "[ Speedmin (pu), Speedmax (pu), Delay(s)]:|Start time for protection system ("
  2550. "s):"
  2551.   MaskStyleString   "edit,edit,edit,edit,edit,edit,edit,edit,edi"
  2552. "t"
  2553.   MaskTunableValueString  "on,on,on,on,on,on,on,on,on"
  2554.   MaskCallbackString   "||||||||"
  2555.   MaskEnableString   "on,on,on,on,on,on,on,on,on"
  2556.   MaskVisibilityString   "on,on,on,on,on,on,on,on,on"
  2557.   MaskToolTipString   "on,on,on,on,on,on,on,on,on"
  2558.   MaskVarAliasString   ",,,,,,,,"
  2559.   MaskVariables   "Freq=@1;Max_Iinst=@2;MaxI1=@3;MaxI2I1=@4;Mi"
  2560. "nMaxV1=@5;MaxV2V1=@6;MaxVdc=@7;MaxSpeed=@8;Delay_Protection=@9;"
  2561.   MaskInitialization   "a=exp(2*pi*j/3);na2=a^2;nMax_I1=MaxI1(1);"
  2562. "nDelay_I1=MaxI1(2);nMax_I2_I1=MaxI2I1(1);nDelay_I2_I1=MaxI2I1(2);nMin_V1="
  2563. "MinMaxV1(1);nMax_V1=MinMaxV1(2);nDelay_V1=MinMaxV1(3);nMax_V2_V1=MaxV2V1(1"
  2564. ");nMax_V0_V1=MaxV2V1(2);nDelay_V2_V1=MaxV2V1(3);nMax_Vdc=MaxVdc(1);nDelay"
  2565. "_Vdc=MaxVdc(2);nMin_Speed=MaxSpeed(1);nMax_Speed=MaxSpeed(2);nDelay_Speed="
  2566. "MaxSpeed(3);n"
  2567.   MaskIconFrame   on
  2568.   MaskIconOpaque   on
  2569.   MaskIconRotate   "none"
  2570.   MaskIconUnits   "autoscale"
  2571.   MaskValueString   "60|10|[ 1.1, 5 ]|[ 0.4, 0.2]|[ 0.9, 1.1, 0."
  2572. "2 ]|[ 0.1, 0.1, 0.3 ]|[ inf, 0 ]|[ 0.9, 1.1, 1 ]|1"
  2573.   MaskTabNameString   ",,,,,,,,"
  2574.   System {
  2575.     Name     "Plant & Motor nProtection"
  2576.     Location     [30, 258, 1119, 966]
  2577.     Open     off
  2578.     ModelBrowserVisibility  off
  2579.     ModelBrowserWidth     200
  2580.     ScreenColor     "white"
  2581.     PaperOrientation     "landscape"
  2582.     PaperPositionMode     "auto"
  2583.     PaperType     "usletter"
  2584.     PaperUnits     "inches"
  2585.     ZoomFactor     "100"
  2586.     Block {
  2587.       BlockType       Inport
  2588.       Name       "Vabc (pu)"
  2589.       Position       [95, 208, 125, 222]
  2590.       IconDisplay       "Port number"
  2591.       PortDimensions       "3"
  2592.     }
  2593.     Block {
  2594.       BlockType       Inport
  2595.       Name       "Iabc (pu)"
  2596.       Position       [95, 68, 125, 82]
  2597.       Port       "2"
  2598.       IconDisplay       "Port number"
  2599.       PortDimensions       "3"
  2600.     }
  2601.     Block {
  2602.       BlockType       Inport
  2603.       Name       "Vdc (V)"
  2604.       Position       [95, 338, 125, 352]
  2605.       Port       "3"
  2606.       IconDisplay       "Port number"
  2607.       PortDimensions       "1"
  2608.     }
  2609.     Block {
  2610.       BlockType       Inport
  2611.       Name       "Reset"
  2612.       Position       [610, 223, 640, 237]
  2613.       Port       "4"
  2614.       IconDisplay       "Port number"
  2615.       PortDimensions       "1"
  2616.     }
  2617.     Block {
  2618.       BlockType       Inport
  2619.       Name       "Speed (pu)"
  2620.       Position       [95, 463, 125, 477]
  2621.       Port       "5"
  2622.       IconDisplay       "Port number"
  2623.       PortDimensions       "1"
  2624.     }
  2625.     Block {
  2626.       BlockType       SubSystem
  2627.       Name       "AC CurrentnProtection"
  2628.       Ports       [1, 3]
  2629.       Position       [165, 27, 240, 123]
  2630.       TreatAsAtomicUnit       off
  2631.       MinAlgLoopOccurrences   off
  2632.       RTWSystemCode       "Auto"
  2633.       MaskHideContents       off
  2634.       System {
  2635. Name "AC CurrentnProtection"
  2636. Location [366, 109, 1176, 404]
  2637. Open off
  2638. ModelBrowserVisibility off
  2639. ModelBrowserWidth 200
  2640. ScreenColor "white"
  2641. PaperOrientation "landscape"
  2642. PaperPositionMode "auto"
  2643. PaperType "usletter"
  2644. PaperUnits "inches"
  2645. ZoomFactor "100"
  2646. Block {
  2647.   BlockType   Inport
  2648.   Name   "abc"
  2649.   Position   [40, 193, 70, 207]
  2650.   IconDisplay   "Port number"
  2651.   PortDimensions   "3"
  2652. }
  2653. Block {
  2654.   BlockType   ComplexToMagnitudeAngle
  2655.   Name   "Complex tonMagnitude-Angle1"
  2656.   Ports   [1, 1]
  2657.   Position   [240, 68, 265, 92]
  2658.   ShowName   off
  2659.   Output   "Magnitude"
  2660. }
  2661. Block {
  2662.   BlockType   SubSystem
  2663.   Name   "CurrentnMeasurement"
  2664.   Ports   [1, 2]
  2665.   Position   [150, 181, 210, 214]
  2666.   TreatAsAtomicUnit   off
  2667.   MinAlgLoopOccurrences   off
  2668.   RTWSystemCode   "Auto"
  2669.   MaskHideContents   off
  2670.   System {
  2671.     Name     "CurrentnMeasurement"
  2672.     Location     [278, 268, 1122, 478]
  2673.     Open     off
  2674.     ModelBrowserVisibility  off
  2675.     ModelBrowserWidth     200
  2676.     ScreenColor     "white"
  2677.     PaperOrientation     "landscape"
  2678.     PaperPositionMode     "auto"
  2679.     PaperType     "usletter"
  2680.     PaperUnits     "inches"
  2681.     ZoomFactor     "100"
  2682.     Block {
  2683.     BlockType     Inport
  2684.     Name     "abc"
  2685.     Position     [15, 43, 45, 57]
  2686.     IconDisplay     "Port number"
  2687.     PortDimensions     "3"
  2688.     }
  2689.     Block {
  2690.     BlockType     Gain
  2691.     Name     "Gain1"
  2692.     Position     [275, 45, 345, 85]
  2693.     Gain     "[1 a a2]"
  2694.     }
  2695.     Block {
  2696.     BlockType     Gain
  2697.     Name     "Gain2"
  2698.     Position     [275, 110, 345, 150]
  2699.     Gain     "[1 a2 a]"
  2700.     }
  2701.     Block {
  2702.     BlockType     Gain
  2703.     Name     "Gain3"
  2704.     Position     [430, 47, 480, 83]
  2705.     ShowName     off
  2706.     Gain     "1/3"
  2707.     }
  2708.     Block {
  2709.     BlockType     Gain
  2710.     Name     "Gain4"
  2711.     Position     [430, 112, 480, 148]
  2712.     ShowName     off
  2713.     Gain     "1/3"
  2714.     }
  2715.     Block {
  2716.     BlockType     Mux
  2717.     Name     "Mux"
  2718.     Ports     [3, 1]
  2719.     Position     [170, 39, 175, 91]
  2720.     ShowName     off
  2721.     Inputs     "3"
  2722.     DisplayOption     "bar"
  2723.     }
  2724.     Block {
  2725.     BlockType     Product
  2726.     Name     "Product"
  2727.     Ports     [2, 1]
  2728.     Position     [670, 91, 705, 144]
  2729.     ShowName     off
  2730.     Inputs     "/*"
  2731.     InputSameDT     off
  2732.     RndMeth     "Floor"
  2733.     }
  2734.     Block {
  2735.     BlockType     Saturate
  2736.     Name     "Saturation"
  2737.     Position     [600, 52, 625, 78]
  2738.     ShowName     off
  2739.     UpperLimit     "1e6"
  2740.     LowerLimit     "1e-6"
  2741.     }
  2742.     Block {
  2743.     BlockType     Selector
  2744.     Name     "Selector"
  2745.     Ports     [1, 1]
  2746.     Position     [100, 44, 135, 56]
  2747.     ShowName     off
  2748.     InputPortWidth     "3"
  2749.     }
  2750.     Block {
  2751.     BlockType     Selector
  2752.     Name     "Selector1"
  2753.     Ports     [1, 1]
  2754.     Position     [100, 59, 135, 71]
  2755.     ShowName     off
  2756.     Elements     "2"
  2757.     InputPortWidth     "3"
  2758.     }
  2759.     Block {
  2760.     BlockType     Selector
  2761.     Name     "Selector2"
  2762.     Ports     [1, 1]
  2763.     Position     [100, 74, 135, 86]
  2764.     ShowName     off
  2765.     Elements     "3"
  2766.     InputPortWidth     "3"
  2767.     }
  2768.     Block {
  2769.     BlockType     Sum
  2770.     Name     "Sum"
  2771.     Ports     [1, 1]
  2772.     Position     [375, 55, 395, 75]
  2773.     ShowName     off
  2774.     IconShape     "round"
  2775.     Inputs     "1"
  2776.     }
  2777.     Block {
  2778.     BlockType     Sum
  2779.     Name     "Sum1"
  2780.     Ports     [1, 1]
  2781.     Position     [375, 120, 395, 140]
  2782.     ShowName     off
  2783.     IconShape     "round"
  2784.     Inputs     "1"
  2785.     }
  2786.     Block {
  2787.     BlockType     SubSystem
  2788.     Name     "magnitude"
  2789.     Ports     [1, 1]
  2790.     Position     [520, 54, 565, 76]
  2791.     TreatAsAtomicUnit     off
  2792.     MinAlgLoopOccurrences   off
  2793.     RTWSystemCode     "Auto"
  2794.     MaskHideContents     off
  2795.     System {
  2796.     Name     "magnitude"
  2797.     Location     [238, 376, 639, 546]
  2798.     Open     off
  2799.     ModelBrowserVisibility  off
  2800.     ModelBrowserWidth     200
  2801.     ScreenColor     "white"
  2802.     PaperOrientation     "landscape"
  2803.     PaperPositionMode     "auto"
  2804.     PaperType     "usletter"
  2805.     PaperUnits     "inches"
  2806.     ZoomFactor     "100"
  2807.     Block {
  2808.     BlockType     Inport
  2809.     Name     "In1"
  2810.     Position     [25, 68, 55, 82]
  2811.     IconDisplay     "Port number"
  2812.     }
  2813.     Block {
  2814.     BlockType     ComplexToRealImag
  2815.     Name     "Complex tonReal-Imag"
  2816.     Ports     [1, 2]
  2817.     Position     [80, 58, 110, 87]
  2818.     ShowName     off
  2819.     Output     "Real and imag"
  2820.     }
  2821.     Block {
  2822.     BlockType     SubSystem
  2823.     Name     "Fourier1"
  2824.     Ports     [1, 2]
  2825.     Position     [155, 26, 220, 59]
  2826.     ShowName     off
  2827.     TreatAsAtomicUnit     off
  2828.     MinAlgLoopOccurrences   off
  2829.     RTWSystemCode     "Auto"
  2830.     MaskHideContents     off
  2831.     MaskType     "Fourier analyser"
  2832.     MaskDescription     "The Fourier block performs a Four"
  2833. "ier analysis of the input signal over a running window of one cycle of the fu"
  2834. "ndamental frequency. First and second outputs return respectively the magnitu"
  2835. "de and phase (degrees) of the harmonic component specified."
  2836.     MaskHelp     "web(psbhelp)"
  2837.     MaskPromptString     "Fundamental frequency f1 (Hz):|Ha"
  2838. "rmonic n (0=DC; 1=fundamental; 2=2nd harm;  ...) :"
  2839.     MaskStyleString     "edit,edit"
  2840.     MaskTunableValueString  "on,on"
  2841.     MaskCallbackString     "|"
  2842.     MaskEnableString     "on,on"
  2843.     MaskVisibilityString    "on,on"
  2844.     MaskToolTipString     "on,on"
  2845.     MaskVarAliasString     ","
  2846.     MaskVariables     "f1=@1;n=@2;"
  2847.     MaskInitialization     "  k=2-(n==0);n"
  2848.     MaskIconFrame     on
  2849.     MaskIconOpaque     off
  2850.     MaskIconRotate     "none"
  2851.     MaskIconUnits     "autoscale"
  2852.     MaskValueString     "Freq|0"
  2853.     MaskTabNameString     ","
  2854.     System {
  2855.     Name     "Fourier1"
  2856.     Location     [52, 538, 953, 977]
  2857.     Open     off
  2858.     ModelBrowserVisibility  off
  2859.     ModelBrowserWidth     200
  2860.     ScreenColor     "white"
  2861.     PaperOrientation     "landscape"
  2862.     PaperPositionMode     "auto"
  2863.     PaperType     "usletter"
  2864.     PaperUnits     "inches"
  2865.     ZoomFactor     "100"
  2866.     Block {
  2867.     BlockType     Inport
  2868.     Name     "signal"
  2869.     Position     [15, 105, 35, 125]
  2870.     IconDisplay     "Port number"
  2871.     }
  2872.     Block {
  2873.     BlockType     Constant
  2874.     Name     "Constant"
  2875.     Position     [160, 100, 190, 130]
  2876.     Value     "0"
  2877.     }
  2878.     Block {
  2879.     BlockType     Fcn
  2880.     Name     "Fcn"
  2881.     Position     [475, 45, 515, 65]
  2882.     Expr     "u^2"
  2883.     }
  2884.     Block {
  2885.     BlockType     Fcn
  2886.     Name     "Fcn1"
  2887.     Position     [475, 135, 515, 155]
  2888.     Expr     "u^2"
  2889.     }
  2890.     Block {
  2891.     BlockType     Fcn
  2892.     Name     "Fcn2"
  2893.     Position     [595, 94, 665, 116]
  2894.     Expr     "sqrt(u)"
  2895.     }
  2896.     Block {
  2897.     BlockType     Fcn
  2898.     Name     "Fcn3"
  2899.     Position     [550, 180, 685, 210]
  2900.     Expr     "180/pi*atan2(u[2],u[1])"
  2901.     }
  2902.     Block {
  2903.     BlockType     Gain
  2904.     Name     "Gain1"
  2905.     Position     [55, 97, 105, 133]
  2906.     Gain     "k*f1"
  2907.     }
  2908.     Block {
  2909.     BlockType     Integrator
  2910.     Name     "Integ2"
  2911.     Ports     [2, 1]
  2912.     Position     [220, 174, 260, 216]
  2913.     InitialConditionSource  "external"
  2914.     IgnoreLimit     off
  2915.     }
  2916.     Block {
  2917.     BlockType     Mux
  2918.     Name     "Mux"
  2919.     Ports     [2, 1]
  2920.     Position     [475, 176, 505, 209]
  2921.     Inputs     "2"
  2922.     }
  2923.     Block {
  2924.     BlockType     Product
  2925.     Name     "Product"
  2926.     Ports     [2, 1]
  2927.     Position     [165, 21, 190, 59]
  2928.     RndMeth     "Floor"
  2929.     }
  2930.     Block {
  2931.     BlockType     Product
  2932.     Name     "Product1"
  2933.     Ports     [2, 1]
  2934.     Position     [160, 166, 185, 204]
  2935.     RndMeth     "Floor"
  2936.     }
  2937.     Block {
  2938.     BlockType     Sum
  2939.     Name     "Sum"
  2940.     Ports     [2, 1]
  2941.     Position     [550, 79, 570, 126]
  2942.     }
  2943.     Block {
  2944.     BlockType     Sum
  2945.     Name     "Sum1"
  2946.     Ports     [2, 1]
  2947.     Position     [365, 29, 385, 76]
  2948.     Inputs     "+-"
  2949.     }
  2950.     Block {
  2951.     BlockType     Sum
  2952.     Name     "Sum2"
  2953.     Ports     [2, 1]
  2954.     Position     [380, 174, 400, 221]
  2955.     Inputs     "+-"
  2956.     }
  2957.     Block {
  2958.     BlockType     TransportDelay
  2959.     Name     "T"
  2960.     Position     [300, 50, 340, 80]
  2961.     DelayTime     "1/f1"
  2962.     BufferSize     "2048"
  2963.     }
  2964.     Block {
  2965.     BlockType     TransportDelay
  2966.     Name     "T1"
  2967.     Position     [305, 195, 345, 225]
  2968.     DelayTime     "1/f1"
  2969.     BufferSize     "2048"
  2970.     }
  2971.     Block {
  2972.     BlockType     Sin
  2973.     Name     "cos(nwt)"
  2974.     Ports     [0, 1]
  2975.     Position     [65, 180, 90, 210]
  2976.     SineType     "Time based"
  2977.     Frequency     "2*pi*n*f1"
  2978.     Phase     "pi/2"
  2979.     SampleTime     "0"
  2980.     }
  2981.     Block {
  2982.     BlockType     Integrator
  2983.     Name     "integ1"
  2984.     Ports     [2, 1]
  2985.     Position     [230, 19, 260, 61]
  2986.     InitialConditionSource  "external"
  2987.     IgnoreLimit     off
  2988.     }
  2989.     Block {
  2990.     BlockType     Sin
  2991.     Name     "sin(nwt)"
  2992.     Ports     [0, 1]
  2993.     Position     [65, 15, 90, 45]
  2994.     SineType     "Time based"
  2995.     Frequency     "2*pi*n*f1"
  2996.     SampleTime     "0"
  2997.     }
  2998.     Block {
  2999.     BlockType     Outport
  3000.     Name     "magnitude"
  3001.     Position     [710, 95, 730, 115]
  3002.     IconDisplay     "Port number"
  3003.     BusOutputAsStruct     off
  3004.     InitialOutput     "0"
  3005.     }
  3006.     Block {
  3007.     BlockType     Outport
  3008.     Name     "angle"
  3009.     Position     [710, 185, 730, 205]
  3010.     Port     "2"
  3011.     IconDisplay     "Port number"
  3012.     BusOutputAsStruct     off
  3013.     InitialOutput     "0"
  3014.     }
  3015.     Line {
  3016.     SrcBlock     "Constant"
  3017.     SrcPort     1
  3018.     Points     [10, 0]
  3019.     Branch {
  3020.     Points     [0, -65]
  3021.     DstBlock     "integ1"
  3022.     DstPort     2
  3023.     }
  3024.     Branch {
  3025.     DstBlock     "Integ2"
  3026.     DstPort     2
  3027.     }
  3028.     }
  3029.     Line {
  3030.     SrcBlock     "Sum"
  3031.     SrcPort     1
  3032.     DstBlock     "Fcn2"
  3033.     DstPort     1
  3034.     }
  3035.     Line {
  3036.     SrcBlock     "Fcn"
  3037.     SrcPort     1
  3038.     Points     [15, 0]
  3039.     DstBlock     "Sum"
  3040.     DstPort     1
  3041.     }
  3042.     Line {
  3043.     SrcBlock     "Fcn1"
  3044.     SrcPort     1
  3045.     Points     [15, 0]
  3046.     DstBlock     "Sum"
  3047.     DstPort     2
  3048.     }
  3049.     Line {
  3050.     SrcBlock     "Mux"
  3051.     SrcPort     1
  3052.     DstBlock     "Fcn3"
  3053.     DstPort     1
  3054.     }
  3055.     Line {
  3056.     SrcBlock     "Fcn3"
  3057.     SrcPort     1
  3058.     DstBlock     "angle"
  3059.     DstPort     1
  3060.     }
  3061.     Line {
  3062.     SrcBlock     "sin(nwt)"
  3063.     SrcPort     1
  3064.     DstBlock     "Product"
  3065.     DstPort     1
  3066.     }
  3067.     Line {
  3068.     SrcBlock     "cos(nwt)"
  3069.     SrcPort     1
  3070.     DstBlock     "Product1"
  3071.     DstPort     2
  3072.     }
  3073.     Line {
  3074.     SrcBlock     "Product"
  3075.     SrcPort     1
  3076.     Points     [20, 0]
  3077.     DstBlock     "integ1"
  3078.     DstPort     1
  3079.     }
  3080.     Line {
  3081.     SrcBlock     "Product1"
  3082.     SrcPort     1
  3083.     DstBlock     "Integ2"
  3084.     DstPort     1
  3085.     }
  3086.     Line {
  3087.     SrcBlock     "T"
  3088.     SrcPort     1
  3089.     DstBlock     "Sum1"
  3090.     DstPort     2
  3091.     }
  3092.     Line {
  3093.     SrcBlock     "T1"
  3094.     SrcPort     1
  3095.     DstBlock     "Sum2"
  3096.     DstPort     2
  3097.     }
  3098.     Line {
  3099.     SrcBlock     "integ1"
  3100.     SrcPort     1
  3101.     Points     [20, 0]
  3102.     Branch {
  3103.     DstBlock     "Sum1"
  3104.     DstPort     1
  3105.     }
  3106.     Branch {
  3107.     DstBlock     "T"
  3108.     DstPort     1
  3109.     }
  3110.     }
  3111.     Line {
  3112.     SrcBlock     "Integ2"
  3113.     SrcPort     1
  3114.     Points     [0, -10; 20, 0]
  3115.     Branch {
  3116.     Points     [0, 25]
  3117.     DstBlock     "T1"
  3118.     DstPort     1
  3119.     }
  3120.     Branch {
  3121.     DstBlock     "Sum2"
  3122.     DstPort     1
  3123.     }
  3124.     }
  3125.     Line {
  3126.     SrcBlock     "Sum2"
  3127.     SrcPort     1
  3128.     Points     [20, 0]
  3129.     Branch {
  3130.     Points     [0, -55]
  3131.     DstBlock     "Fcn1"
  3132.     DstPort     1
  3133.     }
  3134.     Branch {
  3135.     DstBlock     "Mux"
  3136.     DstPort     2
  3137.     }
  3138.     }
  3139.     Line {
  3140.     SrcBlock     "Sum1"
  3141.     SrcPort     1
  3142.     Points     [55, 0]
  3143.     Branch {
  3144.     DstBlock     "Fcn"
  3145.     DstPort     1
  3146.     }
  3147.     Branch {
  3148.     Points     [0, 130]
  3149.     DstBlock     "Mux"
  3150.     DstPort     1
  3151.     }
  3152.     }
  3153.     Line {
  3154.     SrcBlock     "signal"
  3155.     SrcPort     1
  3156.     DstBlock     "Gain1"
  3157.     DstPort     1
  3158.     }
  3159.     Line {
  3160.     SrcBlock     "Gain1"
  3161.     SrcPort     1
  3162.     Points     [0, 0; 10, 0]
  3163.     Branch {
  3164.     Points     [0, -65]
  3165.     DstBlock     "Product"
  3166.     DstPort     2
  3167.     }
  3168.     Branch {
  3169.     Points     [0, 60]
  3170.     DstBlock     "Product1"
  3171.     DstPort     1
  3172.     }
  3173.     }
  3174.     Line {
  3175.     SrcBlock     "Fcn2"
  3176.     SrcPort     1
  3177.     DstBlock     "magnitude"
  3178.     DstPort     1
  3179.     }
  3180.     }
  3181.     }
  3182.     Block {
  3183.     BlockType     SubSystem
  3184.     Name     "Fourier2"
  3185.     Ports     [1, 2]
  3186.     Position     [155, 81, 220, 114]
  3187.     ShowName     off
  3188.     TreatAsAtomicUnit     off
  3189.     MinAlgLoopOccurrences   off
  3190.     RTWSystemCode     "Auto"
  3191.     MaskHideContents     off
  3192.     MaskType     "Fourier analyser"
  3193.     MaskDescription     "The Fourier block performs a Four"
  3194. "ier analysis of the input signal over a running window of one cycle of the fu"
  3195. "ndamental frequency. First and second outputs return respectively the magnitu"
  3196. "de and phase (degrees) of the harmonic component specified."
  3197.     MaskHelp     "web(psbhelp)"
  3198.     MaskPromptString     "Fundamental frequency f1 (Hz):|Ha"
  3199. "rmonic n (0=DC; 1=fundamental; 2=2nd harm;  ...) :"
  3200.     MaskStyleString     "edit,edit"
  3201.     MaskTunableValueString  "on,on"
  3202.     MaskCallbackString     "|"
  3203.     MaskEnableString     "on,on"
  3204.     MaskVisibilityString    "on,on"
  3205.     MaskToolTipString     "on,on"
  3206.     MaskVarAliasString     ","
  3207.     MaskVariables     "f1=@1;n=@2;"
  3208.     MaskInitialization     "  k=2-(n==0);n"
  3209.     MaskIconFrame     on
  3210.     MaskIconOpaque     off
  3211.     MaskIconRotate     "none"
  3212.     MaskIconUnits     "autoscale"
  3213.     MaskValueString     "Freq|0"
  3214.     MaskTabNameString     ","
  3215.     System {
  3216.     Name     "Fourier2"
  3217.     Location     [52, 538, 953, 977]
  3218.     Open     off
  3219.     ModelBrowserVisibility  off
  3220.     ModelBrowserWidth     200
  3221.     ScreenColor     "white"
  3222.     PaperOrientation     "landscape"
  3223.     PaperPositionMode     "auto"
  3224.     PaperType     "usletter"
  3225.     PaperUnits     "inches"
  3226.     ZoomFactor     "100"
  3227.     Block {
  3228.     BlockType     Inport
  3229.     Name     "signal"
  3230.     Position     [15, 105, 35, 125]
  3231.     IconDisplay     "Port number"
  3232.     }
  3233.     Block {
  3234.     BlockType     Constant
  3235.     Name     "Constant"
  3236.     Position     [160, 100, 190, 130]
  3237.     Value     "0"
  3238.     }
  3239.     Block {
  3240.     BlockType     Fcn
  3241.     Name     "Fcn"
  3242.     Position     [475, 45, 515, 65]
  3243.     Expr     "u^2"
  3244.     }
  3245.     Block {
  3246.     BlockType     Fcn
  3247.     Name     "Fcn1"
  3248.     Position     [475, 135, 515, 155]
  3249.     Expr     "u^2"
  3250.     }
  3251.     Block {
  3252.     BlockType     Fcn
  3253.     Name     "Fcn2"
  3254.     Position     [595, 94, 665, 116]
  3255.     Expr     "sqrt(u)"
  3256.     }
  3257.     Block {
  3258.     BlockType     Fcn
  3259.     Name     "Fcn3"
  3260.     Position     [550, 180, 685, 210]
  3261.     Expr     "180/pi*atan2(u[2],u[1])"
  3262.     }
  3263.     Block {
  3264.     BlockType     Gain
  3265.     Name     "Gain1"
  3266.     Position     [55, 97, 105, 133]
  3267.     Gain     "k*f1"
  3268.     }
  3269.     Block {
  3270.     BlockType     Integrator
  3271.     Name     "Integ2"
  3272.     Ports     [2, 1]
  3273.     Position     [220, 174, 260, 216]
  3274.     InitialConditionSource  "external"
  3275.     IgnoreLimit     off
  3276.     }
  3277.     Block {
  3278.     BlockType     Mux
  3279.     Name     "Mux"
  3280.     Ports     [2, 1]
  3281.     Position     [475, 176, 505, 209]
  3282.     Inputs     "2"
  3283.     }
  3284.     Block {
  3285.     BlockType     Product
  3286.     Name     "Product"
  3287.     Ports     [2, 1]
  3288.     Position     [165, 21, 190, 59]
  3289.     RndMeth     "Floor"
  3290.     }
  3291.     Block {
  3292.     BlockType     Product
  3293.     Name     "Product1"
  3294.     Ports     [2, 1]
  3295.     Position     [160, 166, 185, 204]
  3296.     RndMeth     "Floor"
  3297.     }
  3298.     Block {
  3299.     BlockType     Sum
  3300.     Name     "Sum"
  3301.     Ports     [2, 1]
  3302.     Position     [550, 79, 570, 126]
  3303.     }
  3304.     Block {
  3305.     BlockType     Sum
  3306.     Name     "Sum1"
  3307.     Ports     [2, 1]
  3308.     Position     [365, 29, 385, 76]
  3309.     Inputs     "+-"
  3310.     }
  3311.     Block {
  3312.     BlockType     Sum
  3313.     Name     "Sum2"
  3314.     Ports     [2, 1]
  3315.     Position     [380, 174, 400, 221]
  3316.     Inputs     "+-"
  3317.     }
  3318.     Block {
  3319.     BlockType     TransportDelay
  3320.     Name     "T"
  3321.     Position     [300, 50, 340, 80]
  3322.     DelayTime     "1/f1"
  3323.     BufferSize     "2048"
  3324.     }
  3325.     Block {
  3326.     BlockType     TransportDelay
  3327.     Name     "T1"
  3328.     Position     [305, 195, 345, 225]
  3329.     DelayTime     "1/f1"
  3330.     BufferSize     "2048"
  3331.     }
  3332.     Block {
  3333.     BlockType     Sin
  3334.     Name     "cos(nwt)"
  3335.     Ports     [0, 1]
  3336.     Position     [65, 180, 90, 210]
  3337.     SineType     "Time based"
  3338.     Frequency     "2*pi*n*f1"
  3339.     Phase     "pi/2"
  3340.     SampleTime     "0"
  3341.     }
  3342.     Block {
  3343.     BlockType     Integrator
  3344.     Name     "integ1"
  3345.     Ports     [2, 1]
  3346.     Position     [230, 19, 260, 61]
  3347.     InitialConditionSource  "external"
  3348.     IgnoreLimit     off
  3349.     }
  3350.     Block {
  3351.     BlockType     Sin
  3352.     Name     "sin(nwt)"
  3353.     Ports     [0, 1]
  3354.     Position     [65, 15, 90, 45]
  3355.     SineType     "Time based"
  3356.     Frequency     "2*pi*n*f1"
  3357.     SampleTime     "0"
  3358.     }
  3359.     Block {
  3360.     BlockType     Outport
  3361.     Name     "magnitude"
  3362.     Position     [710, 95, 730, 115]
  3363.     IconDisplay     "Port number"
  3364.     BusOutputAsStruct     off
  3365.     InitialOutput     "0"
  3366.     }
  3367.     Block {
  3368.     BlockType     Outport
  3369.     Name     "angle"
  3370.     Position     [710, 185, 730, 205]
  3371.     Port     "2"
  3372.     IconDisplay     "Port number"
  3373.     BusOutputAsStruct     off
  3374.     InitialOutput     "0"
  3375.     }
  3376.     Line {
  3377.     SrcBlock     "Fcn2"
  3378.     SrcPort     1
  3379.     DstBlock     "magnitude"
  3380.     DstPort     1
  3381.     }
  3382.     Line {
  3383.     SrcBlock     "Gain1"
  3384.     SrcPort     1
  3385.     Points     [0, 0; 10, 0]
  3386.     Branch {
  3387.     Points     [0, 60]
  3388.     DstBlock     "Product1"
  3389.     DstPort     1
  3390.     }
  3391.     Branch {
  3392.     Points     [0, -65]
  3393.     DstBlock     "Product"
  3394.     DstPort     2
  3395.     }
  3396.     }
  3397.     Line {
  3398.     SrcBlock     "signal"
  3399.     SrcPort     1
  3400.     DstBlock     "Gain1"
  3401.     DstPort     1
  3402.     }
  3403.     Line {
  3404.     SrcBlock     "Sum1"
  3405.     SrcPort     1
  3406.     Points     [55, 0]
  3407.     Branch {
  3408.     Points     [0, 130]
  3409.     DstBlock     "Mux"
  3410.     DstPort     1
  3411.     }
  3412.     Branch {
  3413.     DstBlock     "Fcn"
  3414.     DstPort     1
  3415.     }
  3416.     }
  3417.     Line {
  3418.     SrcBlock     "Sum2"
  3419.     SrcPort     1
  3420.     Points     [20, 0]
  3421.     Branch {
  3422.     DstBlock     "Mux"
  3423.     DstPort     2
  3424.     }
  3425.     Branch {
  3426.     Points     [0, -55]
  3427.     DstBlock     "Fcn1"
  3428.     DstPort     1
  3429.     }
  3430.     }
  3431.     Line {
  3432.     SrcBlock     "Integ2"
  3433.     SrcPort     1
  3434.     Points     [0, -10; 20, 0]
  3435.     Branch {
  3436.     DstBlock     "Sum2"
  3437.     DstPort     1
  3438.     }
  3439.     Branch {
  3440.     Points     [0, 25]
  3441.     DstBlock     "T1"
  3442.     DstPort     1
  3443.     }
  3444.     }
  3445.     Line {
  3446.     SrcBlock     "integ1"
  3447.     SrcPort     1
  3448.     Points     [20, 0]
  3449.     Branch {
  3450.     DstBlock     "T"
  3451.     DstPort     1
  3452.     }
  3453.     Branch {
  3454.     DstBlock     "Sum1"
  3455.     DstPort     1
  3456.     }
  3457.     }
  3458.     Line {
  3459.     SrcBlock     "T1"
  3460.     SrcPort     1
  3461.     DstBlock     "Sum2"
  3462.     DstPort     2
  3463.     }
  3464.     Line {
  3465.     SrcBlock     "T"
  3466.     SrcPort     1
  3467.     DstBlock     "Sum1"
  3468.     DstPort     2
  3469.     }
  3470.     Line {
  3471.     SrcBlock     "Product1"
  3472.     SrcPort     1
  3473.     DstBlock     "Integ2"
  3474.     DstPort     1
  3475.     }
  3476.     Line {
  3477.     SrcBlock     "Product"
  3478.     SrcPort     1
  3479.     Points     [20, 0]
  3480.     DstBlock     "integ1"
  3481.     DstPort     1
  3482.     }
  3483.     Line {
  3484.     SrcBlock     "cos(nwt)"
  3485.     SrcPort     1
  3486.     DstBlock     "Product1"
  3487.     DstPort     2
  3488.     }
  3489.     Line {
  3490.     SrcBlock     "sin(nwt)"
  3491.     SrcPort     1
  3492.     DstBlock     "Product"
  3493.     DstPort     1
  3494.     }
  3495.     Line {
  3496.     SrcBlock     "Fcn3"
  3497.     SrcPort     1
  3498.     DstBlock     "angle"
  3499.     DstPort     1
  3500.     }
  3501.     Line {
  3502.     SrcBlock     "Mux"
  3503.     SrcPort     1
  3504.     DstBlock     "Fcn3"
  3505.     DstPort     1
  3506.     }
  3507.     Line {
  3508.     SrcBlock     "Fcn1"
  3509.     SrcPort     1
  3510.     Points     [15, 0]
  3511.     DstBlock     "Sum"
  3512.     DstPort     2
  3513.     }
  3514.     Line {
  3515.     SrcBlock     "Fcn"
  3516.     SrcPort     1
  3517.     Points     [15, 0]
  3518.     DstBlock     "Sum"
  3519.     DstPort     1
  3520.     }
  3521.     Line {
  3522.     SrcBlock     "Sum"
  3523.     SrcPort     1
  3524.     DstBlock     "Fcn2"
  3525.     DstPort     1
  3526.     }
  3527.     Line {
  3528.     SrcBlock     "Constant"
  3529.     SrcPort     1
  3530.     Points     [10, 0]
  3531.     Branch {
  3532.     DstBlock     "Integ2"
  3533.     DstPort     2
  3534.     }
  3535.     Branch {
  3536.     Points     [0, -65]
  3537.     DstBlock     "integ1"
  3538.     DstPort     2
  3539.     }
  3540.     }
  3541.     }
  3542.     }
  3543.     Block {
  3544.     BlockType     Math
  3545.     Name     "MathnFunction"
  3546.     Ports     [2, 1]
  3547.     Position     [295, 45, 325, 85]
  3548.     Operator     "hypot"
  3549.     }
  3550.     Block {
  3551.     BlockType     Terminator
  3552.     Name     "Terminator"
  3553.     Position     [240, 43, 250, 57]
  3554.     ShowName     off
  3555.     }
  3556.     Block {
  3557.     BlockType     Terminator
  3558.     Name     "Terminator1"
  3559.     Position     [240, 98, 250, 112]
  3560.     ShowName     off
  3561.     }
  3562.     Block {
  3563.     BlockType     Outport
  3564.     Name     "Out1"
  3565.     Position     [350, 58, 380, 72]
  3566.     IconDisplay     "Port number"
  3567.     BusOutputAsStruct     off
  3568.     }
  3569.     Line {
  3570.     SrcBlock     "In1"
  3571.     SrcPort     1
  3572.     DstBlock     "Complex tonReal-Imag"
  3573.     DstPort     1
  3574.     }
  3575.     Line {
  3576.     SrcBlock     "MathnFunction"
  3577.     SrcPort     1
  3578.     DstBlock     "Out1"
  3579.     DstPort     1
  3580.     }
  3581.     Line {
  3582.     SrcBlock     "Fourier2"
  3583.     SrcPort     1
  3584.     Points     [40, 0; 0, -15]
  3585.     DstBlock     "MathnFunction"
  3586.     DstPort     2
  3587.     }
  3588.     Line {
  3589.     SrcBlock     "Fourier1"
  3590.     SrcPort     1
  3591.     Points     [40, 0; 0, 20]
  3592.     DstBlock     "MathnFunction"
  3593.     DstPort     1
  3594.     }
  3595.     Line {
  3596.     SrcBlock     "Fourier2"
  3597.     SrcPort     2
  3598.     DstBlock     "Terminator1"
  3599.     DstPort     1
  3600.     }
  3601.     Line {
  3602.     SrcBlock     "Fourier1"
  3603.     SrcPort     2
  3604.     DstBlock     "Terminator"
  3605.     DstPort     1
  3606.     }
  3607.     Line {
  3608.     SrcBlock     "Complex tonReal-Imag"
  3609.     SrcPort     2
  3610.     Points     [15, 0; 0, 20]
  3611.     DstBlock     "Fourier2"
  3612.     DstPort     1
  3613.     }
  3614.     Line {
  3615.     SrcBlock     "Complex tonReal-Imag"
  3616.     SrcPort     1
  3617.     Points     [15, 0; 0, -20]
  3618.     DstBlock     "Fourier1"
  3619.     DstPort     1
  3620.     }
  3621.     }
  3622.     }
  3623.     Block {
  3624.     BlockType     SubSystem
  3625.     Name     "magnitude1"
  3626.     Ports     [1, 1]
  3627.     Position     [520, 119, 565, 141]
  3628.     TreatAsAtomicUnit     off
  3629.     MinAlgLoopOccurrences   off
  3630.     RTWSystemCode     "Auto"
  3631.     MaskHideContents     off
  3632.     System {
  3633.     Name     "magnitude1"
  3634.     Location     [238, 376, 639, 546]
  3635.     Open     off
  3636.     ModelBrowserVisibility  off
  3637.     ModelBrowserWidth     200
  3638.     ScreenColor     "white"
  3639.     PaperOrientation     "landscape"
  3640.     PaperPositionMode     "auto"
  3641.     PaperType     "usletter"
  3642.     PaperUnits     "inches"
  3643.     ZoomFactor     "100"
  3644.     Block {
  3645.     BlockType     Inport
  3646.     Name     "In1"
  3647.     Position     [25, 68, 55, 82]
  3648.     IconDisplay     "Port number"
  3649.     }
  3650.     Block {
  3651.     BlockType     ComplexToRealImag
  3652.     Name     "Complex tonReal-Imag"
  3653.     Ports     [1, 2]
  3654.     Position     [80, 58, 110, 87]
  3655.     ShowName     off
  3656.     Output     "Real and imag"
  3657.     }
  3658.     Block {
  3659.     BlockType     SubSystem
  3660.     Name     "Fourier1"
  3661.     Ports     [1, 2]
  3662.     Position     [155, 26, 220, 59]
  3663.     ShowName     off
  3664.     TreatAsAtomicUnit     off
  3665.     MinAlgLoopOccurrences   off
  3666.     RTWSystemCode     "Auto"
  3667.     MaskHideContents     off
  3668.     MaskType     "Fourier analyser"
  3669.     MaskDescription     "The Fourier block performs a Four"
  3670. "ier analysis of the input signal over a running window of one cycle of the fu"
  3671. "ndamental frequency. First and second outputs return respectively the magnitu"
  3672. "de and phase (degrees) of the harmonic component specified."
  3673.     MaskHelp     "web(psbhelp)"
  3674.     MaskPromptString     "Fundamental frequency f1 (Hz):|Ha"
  3675. "rmonic n (0=DC; 1=fundamental; 2=2nd harm;  ...) :"
  3676.     MaskStyleString     "edit,edit"
  3677.     MaskTunableValueString  "on,on"
  3678.     MaskCallbackString     "|"
  3679.     MaskEnableString     "on,on"
  3680.     MaskVisibilityString    "on,on"
  3681.     MaskToolTipString     "on,on"
  3682.     MaskVarAliasString     ","
  3683.     MaskVariables     "f1=@1;n=@2;"
  3684.     MaskInitialization     "  k=2-(n==0);n"
  3685.     MaskIconFrame     on
  3686.     MaskIconOpaque     off
  3687.     MaskIconRotate     "none"
  3688.     MaskIconUnits     "autoscale"
  3689.     MaskValueString     "Freq|0"
  3690.     MaskTabNameString     ","
  3691.     System {
  3692.     Name     "Fourier1"
  3693.     Location     [52, 538, 953, 977]
  3694.     Open     off
  3695.     ModelBrowserVisibility  off
  3696.     ModelBrowserWidth     200
  3697.     ScreenColor     "white"
  3698.     PaperOrientation     "landscape"
  3699.     PaperPositionMode     "auto"
  3700.     PaperType     "usletter"
  3701.     PaperUnits     "inches"
  3702.     ZoomFactor     "100"
  3703.     Block {
  3704.     BlockType     Inport
  3705.     Name     "signal"
  3706.     Position     [15, 105, 35, 125]
  3707.     IconDisplay     "Port number"
  3708.     }
  3709.     Block {
  3710.     BlockType     Constant
  3711.     Name     "Constant"
  3712.     Position     [160, 100, 190, 130]
  3713.     Value     "0"
  3714.     }
  3715.     Block {
  3716.     BlockType     Fcn
  3717.     Name     "Fcn"
  3718.     Position     [475, 45, 515, 65]
  3719.     Expr     "u^2"
  3720.     }
  3721.     Block {
  3722.     BlockType     Fcn
  3723.     Name     "Fcn1"
  3724.     Position     [475, 135, 515, 155]
  3725.     Expr     "u^2"
  3726.     }
  3727.     Block {
  3728.     BlockType     Fcn
  3729.     Name     "Fcn2"
  3730.     Position     [595, 94, 665, 116]
  3731.     Expr     "sqrt(u)"
  3732.     }
  3733.     Block {
  3734.     BlockType     Fcn
  3735.     Name     "Fcn3"
  3736.     Position     [550, 180, 685, 210]
  3737.     Expr     "180/pi*atan2(u[2],u[1])"
  3738.     }
  3739.     Block {
  3740.     BlockType     Gain
  3741.     Name     "Gain1"
  3742.     Position     [55, 97, 105, 133]
  3743.     Gain     "k*f1"
  3744.     }
  3745.     Block {
  3746.     BlockType     Integrator
  3747.     Name     "Integ2"
  3748.     Ports     [2, 1]
  3749.     Position     [220, 174, 260, 216]
  3750.     InitialConditionSource  "external"
  3751.     IgnoreLimit     off
  3752.     }
  3753.     Block {
  3754.     BlockType     Mux
  3755.     Name     "Mux"
  3756.     Ports     [2, 1]
  3757.     Position     [475, 176, 505, 209]
  3758.     Inputs     "2"
  3759.     }
  3760.     Block {
  3761.     BlockType     Product
  3762.     Name     "Product"
  3763.     Ports     [2, 1]
  3764.     Position     [165, 21, 190, 59]
  3765.     RndMeth     "Floor"
  3766.     }
  3767.     Block {
  3768.     BlockType     Product
  3769.     Name     "Product1"
  3770.     Ports     [2, 1]
  3771.     Position     [160, 166, 185, 204]
  3772.     RndMeth     "Floor"
  3773.     }
  3774.     Block {
  3775.     BlockType     Sum
  3776.     Name     "Sum"
  3777.     Ports     [2, 1]
  3778.     Position     [550, 79, 570, 126]
  3779.     }
  3780.     Block {
  3781.     BlockType     Sum
  3782.     Name     "Sum1"
  3783.     Ports     [2, 1]
  3784.     Position     [365, 29, 385, 76]
  3785.     Inputs     "+-"
  3786.     }
  3787.     Block {
  3788.     BlockType     Sum
  3789.     Name     "Sum2"
  3790.     Ports     [2, 1]
  3791.     Position     [380, 174, 400, 221]
  3792.     Inputs     "+-"
  3793.     }
  3794.     Block {
  3795.     BlockType     TransportDelay
  3796.     Name     "T"
  3797.     Position     [300, 50, 340, 80]
  3798.     DelayTime     "1/f1"
  3799.     BufferSize     "2048"
  3800.     }
  3801.     Block {
  3802.     BlockType     TransportDelay
  3803.     Name     "T1"
  3804.     Position     [305, 195, 345, 225]
  3805.     DelayTime     "1/f1"
  3806.     BufferSize     "2048"
  3807.     }
  3808.     Block {
  3809.     BlockType     Sin
  3810.     Name     "cos(nwt)"
  3811.     Ports     [0, 1]
  3812.     Position     [65, 180, 90, 210]
  3813.     SineType     "Time based"
  3814.     Frequency     "2*pi*n*f1"
  3815.     Phase     "pi/2"
  3816.     SampleTime     "0"
  3817.     }
  3818.     Block {
  3819.     BlockType     Integrator
  3820.     Name     "integ1"
  3821.     Ports     [2, 1]
  3822.     Position     [230, 19, 260, 61]
  3823.     InitialConditionSource  "external"
  3824.     IgnoreLimit     off
  3825.     }
  3826.     Block {
  3827.     BlockType     Sin
  3828.     Name     "sin(nwt)"
  3829.     Ports     [0, 1]
  3830.     Position     [65, 15, 90, 45]
  3831.     SineType     "Time based"
  3832.     Frequency     "2*pi*n*f1"
  3833.     SampleTime     "0"
  3834.     }
  3835.     Block {
  3836.     BlockType     Outport
  3837.     Name     "magnitude"
  3838.     Position     [710, 95, 730, 115]
  3839.     IconDisplay     "Port number"
  3840.     BusOutputAsStruct     off
  3841.     InitialOutput     "0"
  3842.     }
  3843.     Block {
  3844.     BlockType     Outport
  3845.     Name     "angle"
  3846.     Position     [710, 185, 730, 205]
  3847.     Port     "2"
  3848.     IconDisplay     "Port number"
  3849.     BusOutputAsStruct     off
  3850.     InitialOutput     "0"
  3851.     }
  3852.     Line {
  3853.     SrcBlock     "Fcn2"
  3854.     SrcPort     1
  3855.     DstBlock     "magnitude"
  3856.     DstPort     1
  3857.     }
  3858.     Line {
  3859.     SrcBlock     "Gain1"
  3860.     SrcPort     1
  3861.     Points     [0, 0; 10, 0]
  3862.     Branch {
  3863.     Points     [0, 60]
  3864.     DstBlock     "Product1"
  3865.     DstPort     1
  3866.     }
  3867.     Branch {
  3868.     Points     [0, -65]
  3869.     DstBlock     "Product"
  3870.     DstPort     2
  3871.     }
  3872.     }
  3873.     Line {
  3874.     SrcBlock     "signal"
  3875.     SrcPort     1
  3876.     DstBlock     "Gain1"
  3877.     DstPort     1
  3878.     }
  3879.     Line {
  3880.     SrcBlock     "Sum1"
  3881.     SrcPort     1
  3882.     Points     [55, 0]
  3883.     Branch {
  3884.     Points     [0, 130]
  3885.     DstBlock     "Mux"
  3886.     DstPort     1
  3887.     }
  3888.     Branch {
  3889.     DstBlock     "Fcn"
  3890.     DstPort     1
  3891.     }
  3892.     }
  3893.     Line {
  3894.     SrcBlock     "Sum2"
  3895.     SrcPort     1
  3896.     Points     [20, 0]
  3897.     Branch {
  3898.     DstBlock     "Mux"
  3899.     DstPort     2
  3900.     }
  3901.     Branch {
  3902.     Points     [0, -55]
  3903.     DstBlock     "Fcn1"
  3904.     DstPort     1
  3905.     }
  3906.     }
  3907.     Line {
  3908.     SrcBlock     "Integ2"
  3909.     SrcPort     1
  3910.     Points     [0, -10; 20, 0]
  3911.     Branch {
  3912.     DstBlock     "Sum2"
  3913.     DstPort     1
  3914.     }
  3915.     Branch {
  3916.     Points     [0, 25]
  3917.     DstBlock     "T1"
  3918.     DstPort     1
  3919.     }
  3920.     }
  3921.     Line {
  3922.     SrcBlock     "integ1"
  3923.     SrcPort     1
  3924.     Points     [20, 0]
  3925.     Branch {
  3926.     DstBlock     "T"
  3927.     DstPort     1
  3928.     }
  3929.     Branch {
  3930.     DstBlock     "Sum1"
  3931.     DstPort     1
  3932.     }
  3933.     }
  3934.     Line {
  3935.     SrcBlock     "T1"
  3936.     SrcPort     1
  3937.     DstBlock     "Sum2"
  3938.     DstPort     2
  3939.     }
  3940.     Line {
  3941.     SrcBlock     "T"
  3942.     SrcPort     1
  3943.     DstBlock     "Sum1"
  3944.     DstPort     2
  3945.     }
  3946.     Line {
  3947.     SrcBlock     "Product1"
  3948.     SrcPort     1
  3949.     DstBlock     "Integ2"
  3950.     DstPort     1
  3951.     }
  3952.     Line {
  3953.     SrcBlock     "Product"
  3954.     SrcPort     1
  3955.     Points     [20, 0]
  3956.     DstBlock     "integ1"
  3957.     DstPort     1
  3958.     }
  3959.     Line {
  3960.     SrcBlock     "cos(nwt)"
  3961.     SrcPort     1
  3962.     DstBlock     "Product1"
  3963.     DstPort     2
  3964.     }
  3965.     Line {
  3966.     SrcBlock     "sin(nwt)"
  3967.     SrcPort     1
  3968.     DstBlock     "Product"
  3969.     DstPort     1
  3970.     }
  3971.     Line {
  3972.     SrcBlock     "Fcn3"
  3973.     SrcPort     1
  3974.     DstBlock     "angle"
  3975.     DstPort     1
  3976.     }
  3977.     Line {
  3978.     SrcBlock     "Mux"
  3979.     SrcPort     1
  3980.     DstBlock     "Fcn3"
  3981.     DstPort     1
  3982.     }
  3983.     Line {
  3984.     SrcBlock     "Fcn1"
  3985.     SrcPort     1
  3986.     Points     [15, 0]
  3987.     DstBlock     "Sum"
  3988.     DstPort     2
  3989.     }
  3990.     Line {
  3991.     SrcBlock     "Fcn"
  3992.     SrcPort     1
  3993.     Points     [15, 0]
  3994.     DstBlock     "Sum"
  3995.     DstPort     1
  3996.     }
  3997.     Line {
  3998.     SrcBlock     "Sum"
  3999.     SrcPort     1
  4000.     DstBlock     "Fcn2"
  4001.     DstPort     1
  4002.     }
  4003.     Line {
  4004.     SrcBlock     "Constant"
  4005.     SrcPort     1
  4006.     Points     [10, 0]
  4007.     Branch {
  4008.     DstBlock     "Integ2"
  4009.     DstPort     2
  4010.     }
  4011.     Branch {
  4012.     Points     [0, -65]
  4013.     DstBlock     "integ1"
  4014.     DstPort     2
  4015.     }
  4016.     }
  4017.     }
  4018.     }
  4019.     Block {
  4020.     BlockType     SubSystem
  4021.     Name     "Fourier2"
  4022.     Ports     [1, 2]
  4023.     Position     [155, 81, 220, 114]
  4024.     ShowName     off
  4025.     TreatAsAtomicUnit     off
  4026.     MinAlgLoopOccurrences   off
  4027.     RTWSystemCode     "Auto"
  4028.     MaskHideContents     off
  4029.     MaskType     "Fourier analyser"
  4030.     MaskDescription     "The Fourier block performs a Four"
  4031. "ier analysis of the input signal over a running window of one cycle of the fu"
  4032. "ndamental frequency. First and second outputs return respectively the magnitu"
  4033. "de and phase (degrees) of the harmonic component specified."
  4034.     MaskHelp     "web(psbhelp)"
  4035.     MaskPromptString     "Fundamental frequency f1 (Hz):|Ha"
  4036. "rmonic n (0=DC; 1=fundamental; 2=2nd harm;  ...) :"
  4037.     MaskStyleString     "edit,edit"
  4038.     MaskTunableValueString  "on,on"
  4039.     MaskCallbackString     "|"
  4040.     MaskEnableString     "on,on"
  4041.     MaskVisibilityString    "on,on"
  4042.     MaskToolTipString     "on,on"
  4043.     MaskVarAliasString     ","
  4044.     MaskVariables     "f1=@1;n=@2;"
  4045.     MaskInitialization     "  k=2-(n==0);n"
  4046.     MaskIconFrame     on
  4047.     MaskIconOpaque     off
  4048.     MaskIconRotate     "none"
  4049.     MaskIconUnits     "autoscale"
  4050.     MaskValueString     "Freq|0"
  4051.     MaskTabNameString     ","
  4052.     System {
  4053.     Name     "Fourier2"
  4054.     Location     [52, 538, 953, 977]
  4055.     Open     off
  4056.     ModelBrowserVisibility  off
  4057.     ModelBrowserWidth     200
  4058.     ScreenColor     "white"
  4059.     PaperOrientation     "landscape"
  4060.     PaperPositionMode     "auto"
  4061.     PaperType     "usletter"
  4062.     PaperUnits     "inches"
  4063.     ZoomFactor     "100"
  4064.     Block {
  4065.     BlockType     Inport
  4066.     Name     "signal"
  4067.     Position     [15, 105, 35, 125]
  4068.     IconDisplay     "Port number"
  4069.     }
  4070.     Block {
  4071.     BlockType     Constant
  4072.     Name     "Constant"
  4073.     Position     [160, 100, 190, 130]
  4074.     Value     "0"
  4075.     }
  4076.     Block {
  4077.     BlockType     Fcn
  4078.     Name     "Fcn"
  4079.     Position     [475, 45, 515, 65]
  4080.     Expr     "u^2"
  4081.     }
  4082.     Block {
  4083.     BlockType     Fcn
  4084.     Name     "Fcn1"
  4085.     Position     [475, 135, 515, 155]
  4086.     Expr     "u^2"
  4087.     }
  4088.     Block {
  4089.     BlockType     Fcn
  4090.     Name     "Fcn2"
  4091.     Position     [595, 94, 665, 116]
  4092.     Expr     "sqrt(u)"
  4093.     }
  4094.     Block {
  4095.     BlockType     Fcn
  4096.     Name     "Fcn3"
  4097.     Position     [550, 180, 685, 210]
  4098.     Expr     "180/pi*atan2(u[2],u[1])"
  4099.     }
  4100.     Block {
  4101.     BlockType     Gain
  4102.     Name     "Gain1"
  4103.     Position     [55, 97, 105, 133]
  4104.     Gain     "k*f1"
  4105.     }
  4106.     Block {
  4107.     BlockType     Integrator
  4108.     Name     "Integ2"
  4109.     Ports     [2, 1]
  4110.     Position     [220, 174, 260, 216]
  4111.     InitialConditionSource  "external"
  4112.     IgnoreLimit     off
  4113.     }
  4114.     Block {
  4115.     BlockType     Mux
  4116.     Name     "Mux"
  4117.     Ports     [2, 1]
  4118.     Position     [475, 176, 505, 209]
  4119.     Inputs     "2"
  4120.     }
  4121.     Block {
  4122.     BlockType     Product
  4123.     Name     "Product"
  4124.     Ports     [2, 1]
  4125.     Position     [165, 21, 190, 59]
  4126.     RndMeth     "Floor"
  4127.     }
  4128.     Block {
  4129.     BlockType     Product
  4130.     Name     "Product1"
  4131.     Ports     [2, 1]
  4132.     Position     [160, 166, 185, 204]
  4133.     RndMeth     "Floor"
  4134.     }
  4135.     Block {
  4136.     BlockType     Sum
  4137.     Name     "Sum"
  4138.     Ports     [2, 1]
  4139.     Position     [550, 79, 570, 126]
  4140.     }
  4141.     Block {
  4142.     BlockType     Sum
  4143.     Name     "Sum1"
  4144.     Ports     [2, 1]
  4145.     Position     [365, 29, 385, 76]
  4146.     Inputs     "+-"
  4147.     }
  4148.     Block {
  4149.     BlockType     Sum
  4150.     Name     "Sum2"
  4151.     Ports     [2, 1]
  4152.     Position     [380, 174, 400, 221]
  4153.     Inputs     "+-"
  4154.     }
  4155.     Block {
  4156.     BlockType     TransportDelay
  4157.     Name     "T"
  4158.     Position     [300, 50, 340, 80]
  4159.     DelayTime     "1/f1"
  4160.     BufferSize     "2048"
  4161.     }
  4162.     Block {
  4163.     BlockType     TransportDelay
  4164.     Name     "T1"
  4165.     Position     [305, 195, 345, 225]
  4166.     DelayTime     "1/f1"
  4167.     BufferSize     "2048"
  4168.     }
  4169.     Block {
  4170.     BlockType     Sin
  4171.     Name     "cos(nwt)"
  4172.     Ports     [0, 1]
  4173.     Position     [65, 180, 90, 210]
  4174.     SineType     "Time based"
  4175.     Frequency     "2*pi*n*f1"
  4176.     Phase     "pi/2"
  4177.     SampleTime     "0"
  4178.     }
  4179.     Block {
  4180.     BlockType     Integrator
  4181.     Name     "integ1"
  4182.     Ports     [2, 1]
  4183.     Position     [230, 19, 260, 61]
  4184.     InitialConditionSource  "external"
  4185.     IgnoreLimit     off
  4186.     }
  4187.     Block {
  4188.     BlockType     Sin
  4189.     Name     "sin(nwt)"
  4190.     Ports     [0, 1]
  4191.     Position     [65, 15, 90, 45]
  4192.     SineType     "Time based"
  4193.     Frequency     "2*pi*n*f1"
  4194.     SampleTime     "0"
  4195.     }
  4196.     Block {
  4197.     BlockType     Outport
  4198.     Name     "magnitude"
  4199.     Position     [710, 95, 730, 115]
  4200.     IconDisplay     "Port number"
  4201.     BusOutputAsStruct     off
  4202.     InitialOutput     "0"
  4203.     }
  4204.     Block {
  4205.     BlockType     Outport
  4206.     Name     "angle"
  4207.     Position     [710, 185, 730, 205]
  4208.     Port     "2"
  4209.     IconDisplay     "Port number"
  4210.     BusOutputAsStruct     off
  4211.     InitialOutput     "0"
  4212.     }
  4213.     Line {
  4214.     SrcBlock     "Constant"
  4215.     SrcPort     1
  4216.     Points     [10, 0]
  4217.     Branch {
  4218.     Points     [0, -65]
  4219.     DstBlock     "integ1"
  4220.     DstPort     2
  4221.     }
  4222.     Branch {
  4223.     DstBlock     "Integ2"
  4224.     DstPort     2
  4225.     }
  4226.     }
  4227.     Line {
  4228.     SrcBlock     "Sum"
  4229.     SrcPort     1
  4230.     DstBlock     "Fcn2"
  4231.     DstPort     1
  4232.     }
  4233.     Line {
  4234.     SrcBlock     "Fcn"
  4235.     SrcPort     1
  4236.     Points     [15, 0]
  4237.     DstBlock     "Sum"
  4238.     DstPort     1
  4239.     }
  4240.     Line {
  4241.     SrcBlock     "Fcn1"
  4242.     SrcPort     1
  4243.     Points     [15, 0]
  4244.     DstBlock     "Sum"
  4245.     DstPort     2
  4246.     }
  4247.     Line {
  4248.     SrcBlock     "Mux"
  4249.     SrcPort     1
  4250.     DstBlock     "Fcn3"
  4251.     DstPort     1
  4252.     }
  4253.     Line {
  4254.     SrcBlock     "Fcn3"
  4255.     SrcPort     1
  4256.     DstBlock     "angle"
  4257.     DstPort     1
  4258.     }
  4259.     Line {
  4260.     SrcBlock     "sin(nwt)"
  4261.     SrcPort     1
  4262.     DstBlock     "Product"
  4263.     DstPort     1
  4264.     }
  4265.     Line {
  4266.     SrcBlock     "cos(nwt)"
  4267.     SrcPort     1
  4268.     DstBlock     "Product1"
  4269.     DstPort     2
  4270.     }
  4271.     Line {
  4272.     SrcBlock     "Product"
  4273.     SrcPort     1
  4274.     Points     [20, 0]
  4275.     DstBlock     "integ1"
  4276.     DstPort     1
  4277.     }
  4278.     Line {
  4279.     SrcBlock     "Product1"
  4280.     SrcPort     1
  4281.     DstBlock     "Integ2"
  4282.     DstPort     1
  4283.     }
  4284.     Line {
  4285.     SrcBlock     "T"
  4286.     SrcPort     1
  4287.     DstBlock     "Sum1"
  4288.     DstPort     2
  4289.     }
  4290.     Line {
  4291.     SrcBlock     "T1"
  4292.     SrcPort     1
  4293.     DstBlock     "Sum2"
  4294.     DstPort     2
  4295.     }
  4296.     Line {
  4297.     SrcBlock     "integ1"
  4298.     SrcPort     1
  4299.     Points     [20, 0]
  4300.     Branch {
  4301.     DstBlock     "Sum1"
  4302.     DstPort     1
  4303.     }
  4304.     Branch {
  4305.     DstBlock     "T"
  4306.     DstPort     1
  4307.     }
  4308.     }
  4309.     Line {
  4310.     SrcBlock     "Integ2"
  4311.     SrcPort     1
  4312.     Points     [0, -10; 20, 0]
  4313.     Branch {
  4314.     Points     [0, 25]
  4315.     DstBlock     "T1"
  4316.     DstPort     1
  4317.     }
  4318.     Branch {
  4319.     DstBlock     "Sum2"
  4320.     DstPort     1
  4321.     }
  4322.     }
  4323.     Line {
  4324.     SrcBlock     "Sum2"
  4325.     SrcPort     1
  4326.     Points     [20, 0]
  4327.     Branch {
  4328.     Points     [0, -55]
  4329.     DstBlock     "Fcn1"
  4330.     DstPort     1
  4331.     }
  4332.     Branch {
  4333.     DstBlock     "Mux"
  4334.     DstPort     2
  4335.     }
  4336.     }
  4337.     Line {
  4338.     SrcBlock     "Sum1"
  4339.     SrcPort     1
  4340.     Points     [55, 0]
  4341.     Branch {
  4342.     DstBlock     "Fcn"
  4343.     DstPort     1
  4344.     }
  4345.     Branch {
  4346.     Points     [0, 130]
  4347.     DstBlock     "Mux"
  4348.     DstPort     1
  4349.     }
  4350.     }
  4351.     Line {
  4352.     SrcBlock     "signal"
  4353.     SrcPort     1
  4354.     DstBlock     "Gain1"
  4355.     DstPort     1
  4356.     }
  4357.     Line {
  4358.     SrcBlock     "Gain1"
  4359.     SrcPort     1
  4360.     Points     [0, 0; 10, 0]
  4361.     Branch {
  4362.     Points     [0, -65]
  4363.     DstBlock     "Product"
  4364.     DstPort     2
  4365.     }
  4366.     Branch {
  4367.     Points     [0, 60]
  4368.     DstBlock     "Product1"
  4369.     DstPort     1
  4370.     }
  4371.     }
  4372.     Line {
  4373.     SrcBlock     "Fcn2"
  4374.     SrcPort     1
  4375.     DstBlock     "magnitude"
  4376.     DstPort     1
  4377.     }
  4378.     }
  4379.     }
  4380.     Block {
  4381.     BlockType     Math
  4382.     Name     "MathnFunction"
  4383.     Ports     [2, 1]
  4384.     Position     [295, 45, 325, 85]
  4385.     Operator     "hypot"
  4386.     }
  4387.     Block {
  4388.     BlockType     Terminator
  4389.     Name     "Terminator"
  4390.     Position     [240, 43, 250, 57]
  4391.     ShowName     off
  4392.     }
  4393.     Block {
  4394.     BlockType     Terminator
  4395.     Name     "Terminator1"
  4396.     Position     [240, 98, 250, 112]
  4397.     ShowName     off
  4398.     }
  4399.     Block {
  4400.     BlockType     Outport
  4401.     Name     "Out1"
  4402.     Position     [350, 58, 380, 72]
  4403.     IconDisplay     "Port number"
  4404.     BusOutputAsStruct     off
  4405.     }
  4406.     Line {
  4407.     SrcBlock     "Complex tonReal-Imag"
  4408.     SrcPort     1
  4409.     Points     [15, 0; 0, -20]
  4410.     DstBlock     "Fourier1"
  4411.     DstPort     1
  4412.     }
  4413.     Line {
  4414.     SrcBlock     "Complex tonReal-Imag"
  4415.     SrcPort     2
  4416.     Points     [15, 0; 0, 20]
  4417.     DstBlock     "Fourier2"
  4418.     DstPort     1
  4419.     }
  4420.     Line {
  4421.     SrcBlock     "Fourier1"
  4422.     SrcPort     2
  4423.     DstBlock     "Terminator"
  4424.     DstPort     1
  4425.     }
  4426.     Line {
  4427.     SrcBlock     "Fourier2"
  4428.     SrcPort     2
  4429.     DstBlock     "Terminator1"
  4430.     DstPort     1
  4431.     }
  4432.     Line {
  4433.     SrcBlock     "Fourier1"
  4434.     SrcPort     1
  4435.     Points     [40, 0; 0, 20]
  4436.     DstBlock     "MathnFunction"
  4437.     DstPort     1
  4438.     }
  4439.     Line {
  4440.     SrcBlock     "Fourier2"
  4441.     SrcPort     1
  4442.     Points     [40, 0; 0, -15]
  4443.     DstBlock     "MathnFunction"
  4444.     DstPort     2
  4445.     }
  4446.     Line {
  4447.     SrcBlock     "MathnFunction"
  4448.     SrcPort     1
  4449.     DstBlock     "Out1"
  4450.     DstPort     1
  4451.     }
  4452.     Line {
  4453.     SrcBlock     "In1"
  4454.     SrcPort     1
  4455.     DstBlock     "Complex tonReal-Imag"
  4456.     DstPort     1
  4457.     }
  4458.     }
  4459.     }
  4460.     Block {
  4461.     BlockType     Outport
  4462.     Name     "I1"
  4463.     Position     [750, 38, 780, 52]
  4464.     IconDisplay     "Port number"
  4465.     BusOutputAsStruct     off
  4466.     }
  4467.     Block {
  4468.     BlockType     Outport
  4469.     Name     "I2/I1"
  4470.     Position     [750, 113, 780, 127]
  4471.     Port     "2"
  4472.     IconDisplay     "Port number"
  4473.     BusOutputAsStruct     off
  4474.     }
  4475.     Line {
  4476.     SrcBlock     "magnitude"
  4477.     SrcPort     1
  4478.     Points     [10, 0]
  4479.     Branch {
  4480.     Points     [0, -20]
  4481.     DstBlock     "I1"
  4482.     DstPort     1
  4483.     }
  4484.     Branch {
  4485.     DstBlock     "Saturation"
  4486.     DstPort     1
  4487.     }
  4488.     }
  4489.     Line {
  4490.     SrcBlock     "magnitude1"
  4491.     SrcPort     1
  4492.     DstBlock     "Product"
  4493.     DstPort     2
  4494.     }
  4495.     Line {
  4496.     SrcBlock     "Product"
  4497.     SrcPort     1
  4498.     DstBlock     "I2/I1"
  4499.     DstPort     1
  4500.     }
  4501.     Line {
  4502.     SrcBlock     "Saturation"
  4503.     SrcPort     1
  4504.     Points     [10, 0; 0, 40]
  4505.     DstBlock     "Product"
  4506.     DstPort     1
  4507.     }
  4508.     Line {
  4509.     SrcBlock     "Gain4"
  4510.     SrcPort     1
  4511.     DstBlock     "magnitude1"
  4512.     DstPort     1
  4513.     }
  4514.     Line {
  4515.     SrcBlock     "Gain3"
  4516.     SrcPort     1
  4517.     DstBlock     "magnitude"
  4518.     DstPort     1
  4519.     }
  4520.     Line {
  4521.     SrcBlock     "Mux"
  4522.     SrcPort     1
  4523.     Points     [45, 0; 20, 0]
  4524.     Branch {
  4525.     Points     [0, 65]
  4526.     DstBlock     "Gain2"
  4527.     DstPort     1
  4528.     }
  4529.     Branch {
  4530.     DstBlock     "Gain1"
  4531.     DstPort     1
  4532.     }
  4533.     }
  4534.     Line {
  4535.     SrcBlock     "abc"
  4536.     SrcPort     1
  4537.     Points     [0, 0; 25, 0]
  4538.     Branch {
  4539.     DstBlock     "Selector"
  4540.     DstPort     1
  4541.     }
  4542.     Branch {
  4543.     Points     [0, 15]
  4544.     Branch {
  4545.     DstBlock     "Selector1"
  4546.     DstPort     1
  4547.     }
  4548.     Branch {
  4549.     Points     [0, 15]
  4550.     DstBlock     "Selector2"
  4551.     DstPort     1
  4552.     }
  4553.     }
  4554.     }
  4555.     Line {
  4556.     SrcBlock     "Gain2"
  4557.     SrcPort     1
  4558.     DstBlock     "Sum1"
  4559.     DstPort     1
  4560.     }
  4561.     Line {
  4562.     SrcBlock     "Sum1"
  4563.     SrcPort     1
  4564.     DstBlock     "Gain4"
  4565.     DstPort     1
  4566.     }
  4567.     Line {
  4568.     SrcBlock     "Gain1"
  4569.     SrcPort     1
  4570.     DstBlock     "Sum"
  4571.     DstPort     1
  4572.     }
  4573.     Line {
  4574.     SrcBlock     "Sum"
  4575.     SrcPort     1
  4576.     DstBlock     "Gain3"
  4577.     DstPort     1
  4578.     }
  4579.     Line {
  4580.     SrcBlock     "Selector"
  4581.     SrcPort     1
  4582.     DstBlock     "Mux"
  4583.     DstPort     1
  4584.     }
  4585.     Line {
  4586.     SrcBlock     "Selector1"
  4587.     SrcPort     1
  4588.     DstBlock     "Mux"
  4589.     DstPort     2
  4590.     }
  4591.     Line {
  4592.     SrcBlock     "Selector2"
  4593.     SrcPort     1
  4594.     DstBlock     "Mux"
  4595.     DstPort     3
  4596.     }
  4597.   }
  4598. }
  4599. Block {
  4600.   BlockType   MinMax
  4601.   Name   "MinMax"
  4602.   Ports   [1, 1]
  4603.   Position   [305, 65, 335, 95]
  4604.   Function   "max"
  4605.   ZeroCross   off
  4606. }
  4607. Block {
  4608.   BlockType   Mux
  4609.   Name   "Mux"
  4610.   Ports   [3, 1]
  4611.   Position   [200, 35, 205, 125]
  4612.   ShowName   off
  4613.   Inputs   "3"
  4614.   DisplayOption   "bar"
  4615. }
  4616. Block {
  4617.   BlockType   Reference
  4618.   Name   "On/Off Delay"
  4619.   Ports   [1, 1]
  4620.   Position   [490, 159, 530, 191]
  4621.   ShowName   off
  4622.   SourceBlock   "powerlib_extras/Control nBlocks/On"
  4623. "//Off Delay"
  4624.   SourceType   "On/Off Delay "
  4625.   ShowPortLabels   off
  4626.   type_delay   "On delay"
  4627.   delay   "Delay_I1"
  4628.   ic   "0"
  4629. }
  4630. Block {
  4631.   BlockType   Reference
  4632.   Name   "On/Off Delay2"
  4633.   Ports   [1, 1]
  4634.   Position   [490, 224, 530, 256]
  4635.   ShowName   off
  4636.   SourceBlock   "powerlib_extras/Control nBlocks/On"
  4637. "//Off Delay"
  4638.   SourceType   "On/Off Delay "
  4639.   ShowPortLabels   off
  4640.   type_delay   "On delay"
  4641.   delay   "Delay_I2_I1"
  4642.   ic   "0"
  4643. }
  4644. Block {
  4645.   BlockType   RelationalOperator
  4646.   Name   "RelationalnOperator10"
  4647.   Position   [475, 68, 505, 112]
  4648.   ShowName   off
  4649.   Operator   ">"
  4650.   InputSameDT   off
  4651. }
  4652. Block {
  4653.   BlockType   RelationalOperator
  4654.   Name   "RelationalnOperator6"
  4655.   Position   [410, 153, 440, 197]
  4656.   ShowName   off
  4657.   Operator   ">"
  4658.   InputSameDT   off
  4659. }
  4660. Block {
  4661.   BlockType   RelationalOperator
  4662.   Name   "RelationalnOperator8"
  4663.   Position   [410, 218, 440, 262]
  4664.   ShowName   off
  4665.   Operator   ">"
  4666.   InputSameDT   off
  4667. }
  4668. Block {
  4669.   BlockType   Selector
  4670.   Name   "Selector"
  4671.   Ports   [1, 1]
  4672.   Position   [130, 44, 165, 56]
  4673.   ShowName   off
  4674.   InputPortWidth   "3"
  4675. }
  4676. Block {
  4677.   BlockType   Selector
  4678.   Name   "Selector1"
  4679.   Ports   [1, 1]
  4680.   Position   [130, 74, 165, 86]
  4681.   ShowName   off
  4682.   Elements   "2"
  4683.   InputPortWidth   "3"
  4684. }
  4685. Block {
  4686.   BlockType   Selector
  4687.   Name   "Selector2"
  4688.   Ports   [1, 1]
  4689.   Position   [130, 104, 165, 116]
  4690.   ShowName   off
  4691.   Elements   "3"
  4692.   InputPortWidth   "3"
  4693. }
  4694. Block {
  4695.   BlockType   Constant
  4696.   Name   "V0/V1 max3"
  4697.   Position   [315, 175, 380, 195]
  4698.   ForegroundColor   "magenta"
  4699.   ShowName   off
  4700.   Value   "Max_I1"
  4701. }
  4702. Block {
  4703.   BlockType   Constant
  4704.   Name   "V1 max"
  4705.   Position   [320, 240, 380, 260]
  4706.   ForegroundColor   "magenta"
  4707.   ShowName   off
  4708.   Value   "Max_I2_I1"
  4709. }
  4710. Block {
  4711.   BlockType   Constant
  4712.   Name   "V1 max2"
  4713.   Position   [390, 90, 450, 110]
  4714.   ForegroundColor   "magenta"
  4715.   ShowName   off
  4716.   Value   "Max_Iinst"
  4717. }
  4718. Block {
  4719.   BlockType   Outport
  4720.   Name   "MaxIinst"
  4721.   Position   [580, 83, 610, 97]
  4722.   IconDisplay   "Port number"
  4723.   BusOutputAsStruct   off
  4724. }
  4725. Block {
  4726.   BlockType   Outport
  4727.   Name   "MaxI1"
  4728.   Position   [580, 168, 610, 182]
  4729.   Port   "2"
  4730.   IconDisplay   "Port number"
  4731.   BusOutputAsStruct   off
  4732. }
  4733. Block {
  4734.   BlockType   Outport
  4735.   Name   "MaxI2I1"
  4736.   Position   [580, 233, 610, 247]
  4737.   Port   "3"
  4738.   IconDisplay   "Port number"
  4739.   BusOutputAsStruct   off
  4740. }
  4741. Line {
  4742.   SrcBlock   "MinMax"
  4743.   SrcPort   1
  4744.   DstBlock   "RelationalnOperator10"
  4745.   DstPort   1
  4746. }
  4747. Line {
  4748.   SrcBlock   "Complex tonMagnitude-Angle1"
  4749.   SrcPort   1
  4750.   DstBlock   "MinMax"
  4751.   DstPort   1
  4752. }
  4753. Line {
  4754.   SrcBlock   "Mux"
  4755.   SrcPort   1
  4756.   DstBlock   "Complex tonMagnitude-Angle1"
  4757.   DstPort   1
  4758. }
  4759. Line {
  4760.   SrcBlock   "Selector1"
  4761.   SrcPort   1
  4762.   DstBlock   "Mux"
  4763.   DstPort   2
  4764. }
  4765. Line {
  4766.   SrcBlock   "Selector2"
  4767.   SrcPort   1
  4768.   DstBlock   "Mux"
  4769.   DstPort   3
  4770. }
  4771. Line {
  4772.   SrcBlock   "Selector"
  4773.   SrcPort   1
  4774.   DstBlock   "Mux"
  4775.   DstPort   1
  4776. }
  4777. Line {
  4778.   SrcBlock   "V1 max2"
  4779.   SrcPort   1
  4780.   DstBlock   "RelationalnOperator10"
  4781.   DstPort   2
  4782. }
  4783. Line {
  4784.   SrcBlock   "RelationalnOperator10"
  4785.   SrcPort   1
  4786.   DstBlock   "MaxIinst"
  4787.   DstPort   1
  4788. }
  4789. Line {
  4790.   SrcBlock   "On/Off Delay2"
  4791.   SrcPort   1
  4792.   DstBlock   "MaxI2I1"
  4793.   DstPort   1
  4794. }
  4795. Line {
  4796.   SrcBlock   "On/Off Delay"
  4797.   SrcPort   1
  4798.   DstBlock   "MaxI1"
  4799.   DstPort   1
  4800. }
  4801. Line {
  4802.   SrcBlock   "RelationalnOperator8"
  4803.   SrcPort   1
  4804.   DstBlock   "On/Off Delay2"
  4805.   DstPort   1
  4806. }
  4807. Line {
  4808.   SrcBlock   "RelationalnOperator6"
  4809.   SrcPort   1
  4810.   DstBlock   "On/Off Delay"
  4811.   DstPort   1
  4812. }
  4813. Line {
  4814.   SrcBlock   "CurrentnMeasurement"
  4815.   SrcPort   2
  4816.   Points   [20, 0; 0, 25]
  4817.   DstBlock   "RelationalnOperator8"
  4818.   DstPort   1
  4819. }
  4820. Line {
  4821.   SrcBlock   "V1 max"
  4822.   SrcPort   1
  4823.   DstBlock   "RelationalnOperator8"
  4824.   DstPort   2
  4825. }
  4826. Line {
  4827.   SrcBlock   "V0/V1 max3"
  4828.   SrcPort   1
  4829.   DstBlock   "RelationalnOperator6"
  4830.   DstPort   2
  4831. }
  4832. Line {
  4833.   SrcBlock   "CurrentnMeasurement"
  4834.   SrcPort   1
  4835.   Points   [20, 0; 0, -25]
  4836.   DstBlock   "RelationalnOperator6"
  4837.   DstPort   1
  4838. }
  4839. Line {
  4840.   SrcBlock   "abc"
  4841.   SrcPort   1
  4842.   Points   [25, 0]
  4843.   Branch {
  4844.     Points     [0, -90]
  4845.     Branch {
  4846.     DstBlock     "Selector2"
  4847.     DstPort     1
  4848.     }
  4849.     Branch {
  4850.     Points     [0, -30]
  4851.     Branch {
  4852.     DstBlock     "Selector1"
  4853.     DstPort     1
  4854.     }
  4855.     Branch {
  4856.     Points     [0, -30]
  4857.     DstBlock     "Selector"
  4858.     DstPort     1
  4859.     }
  4860.     }
  4861.   }
  4862.   Branch {
  4863.     DstBlock     "CurrentnMeasurement"
  4864.     DstPort     1
  4865.   }
  4866. }
  4867.       }
  4868.     }
  4869.     Block {
  4870.       BlockType       SubSystem
  4871.       Name       "AC VoltagenProtection"
  4872.       Ports       [1, 4]
  4873.       Position       [160, 166, 240, 259]
  4874.       TreatAsAtomicUnit       off
  4875.       MinAlgLoopOccurrences   off
  4876.       RTWSystemCode       "Auto"
  4877.       MaskHideContents       off
  4878.       System {
  4879. Name "AC VoltagenProtection"
  4880. Location [318, 304, 1016, 710]
  4881. Open off
  4882. ModelBrowserVisibility off
  4883. ModelBrowserWidth 200
  4884. ScreenColor "white"
  4885. PaperOrientation "landscape"
  4886. PaperPositionMode "auto"
  4887. PaperType "usletter"
  4888. PaperUnits "inches"
  4889. ZoomFactor "100"
  4890. Block {
  4891.   BlockType   Inport
  4892.   Name   "abc"
  4893.   Position   [45, 113, 75, 127]
  4894.   IconDisplay   "Port number"
  4895.   PortDimensions   "3"
  4896. }
  4897. Block {
  4898.   BlockType   Reference
  4899.   Name   "On/Off Delay1"
  4900.   Ports   [1, 1]
  4901.   Position   [495, 224, 535, 256]
  4902.   ShowName   off
  4903.   SourceBlock   "powerlib_extras/Control nBlocks/On"
  4904. "//Off Delay"
  4905.   SourceType   "On/Off Delay "
  4906.   ShowPortLabels   off
  4907.   type_delay   "On delay"
  4908.   delay   "Delay_V2_V1"
  4909.   ic   "0"
  4910. }
  4911. Block {
  4912.   BlockType   Reference
  4913.   Name   "On/Off Delay2"
  4914.   Ports   [1, 1]
  4915.   Position   [495, 79, 535, 111]
  4916.   ShowName   off
  4917.   SourceBlock   "powerlib_extras/Control nBlocks/On"
  4918. "//Off Delay"
  4919.   SourceType   "On/Off Delay "
  4920.   ShowPortLabels   off
  4921.   type_delay   "On delay"
  4922.   delay   "Delay_V1"
  4923.   ic   "0"
  4924. }
  4925. Block {
  4926.   BlockType   Reference
  4927.   Name   "On/Off Delay3"
  4928.   Ports   [1, 1]
  4929.   Position   [495, 149, 535, 181]
  4930.   ShowName   off
  4931.   SourceBlock   "powerlib_extras/Control nBlocks/On"
  4932. "//Off Delay"
  4933.   SourceType   "On/Off Delay "
  4934.   ShowPortLabels   off
  4935.   type_delay   "On delay"
  4936.   delay   "Delay_V1"
  4937.   ic   "0"
  4938. }
  4939. Block {
  4940.   BlockType   Reference
  4941.   Name   "On/Off Delay4"
  4942.   Ports   [1, 1]
  4943.   Position   [495, 314, 535, 346]
  4944.   ShowName   off
  4945.   SourceBlock   "powerlib_extras/Control nBlocks/On"
  4946. "//Off Delay"
  4947.   SourceType   "On/Off Delay "
  4948.   ShowPortLabels   off
  4949.   type_delay   "On delay"
  4950.   delay   "Delay_V2_V1"
  4951.   ic   "0"
  4952. }
  4953. Block {
  4954.   BlockType   RelationalOperator
  4955.   Name   "RelationalnOperator6"
  4956.   Position   [410, 143, 440, 187]
  4957.   ShowName   off
  4958.   Operator   ">"
  4959.   InputSameDT   off
  4960. }
  4961. Block {
  4962.   BlockType   RelationalOperator
  4963.   Name   "RelationalnOperator7"
  4964.   Position   [410, 73, 440, 117]
  4965.   ShowName   off
  4966.   Operator   "<"
  4967.   InputSameDT   off
  4968. }
  4969. Block {
  4970.   BlockType   RelationalOperator
  4971.   Name   "RelationalnOperator8"
  4972.   Position   [410, 218, 440, 262]
  4973.   ShowName   off
  4974.   Operator   ">"
  4975.   InputSameDT   off
  4976. }
  4977. Block {
  4978.   BlockType   RelationalOperator
  4979.   Name   "RelationalnOperator9"
  4980.   Position   [410, 308, 440, 352]
  4981.   ShowName   off
  4982.   Operator   ">"
  4983.   InputSameDT   off
  4984. }
  4985. Block {
  4986.   BlockType   Constant
  4987.   Name   "V0/V1 max3"
  4988.   Position   [315, 165, 380, 185]
  4989.   ForegroundColor   "magenta"
  4990.   ShowName   off
  4991.   Value   "Max_V1"
  4992. }
  4993. Block {
  4994.   BlockType   Constant
  4995.   Name   "V0/V1 max4"
  4996.   Position   [315, 95, 380, 115]
  4997.   ForegroundColor   "magenta"
  4998.   ShowName   off
  4999.   Value   "Min_V1"
  5000. }
  5001. Block {
  5002.   BlockType   Constant
  5003.   Name   "V1 max"
  5004.   Position   [320, 240, 380, 260]
  5005.   ForegroundColor   "magenta"
  5006.   ShowName   off
  5007.   Value   "Max_V2_V1"
  5008. }
  5009. Block {
  5010.   BlockType   Constant
  5011.   Name   "V1 max1"
  5012.   Position   [320, 330, 380, 350]
  5013.   ForegroundColor   "magenta"
  5014.   ShowName   off
  5015.   Value   "Max_V0_V1"
  5016. }
  5017. Block {
  5018.   BlockType   SubSystem
  5019.   Name   "VoltagenMeasurement"
  5020.   Ports   [1, 3]
  5021.   Position   [120, 66, 205, 174]
  5022.   TreatAsAtomicUnit   off
  5023.   MinAlgLoopOccurrences   off
  5024.   RTWSystemCode   "Auto"
  5025.   MaskHideContents   off
  5026.   System {
  5027.     Name     "VoltagenMeasurement"
  5028.     Location     [341, 194, 1175, 496]
  5029.     Open     off
  5030.     ModelBrowserVisibility  off
  5031.     ModelBrowserWidth     200
  5032.     ScreenColor     "white"
  5033.     PaperOrientation     "landscape"
  5034.     PaperPositionMode     "auto"
  5035.     PaperType     "usletter"
  5036.     PaperUnits     "inches"
  5037.     ZoomFactor     "100"
  5038.     Block {
  5039.     BlockType     Inport
  5040.     Name     "abc"
  5041.     Position     [30, 73, 60, 87]
  5042.     IconDisplay     "Port number"
  5043.     PortDimensions     "3"
  5044.     }
  5045.     Block {
  5046.     BlockType     Gain
  5047.     Name     "Gain1"
  5048.     Position     [260, 75, 330, 115]
  5049.     Gain     "[1 a a2]"
  5050.     }
  5051.     Block {
  5052.     BlockType     Gain
  5053.     Name     "Gain2"
  5054.     Position     [260, 140, 330, 180]
  5055.     Gain     "[1 a2 a]"
  5056.     }
  5057.     Block {
  5058.     BlockType     Gain
  5059.     Name     "Gain3"
  5060.     Position     [400, 77, 450, 113]
  5061.     ShowName     off
  5062.     Gain     "1/3"
  5063.     }
  5064.     Block {
  5065.     BlockType     Gain
  5066.     Name     "Gain4"
  5067.     Position     [400, 142, 450, 178]
  5068.     ShowName     off
  5069.     Gain     "1/3"
  5070.     }