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

Matlab

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