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

Matlab

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