Model { Name "pmsm_simulink_r13" Version 5.0 SaveDefaultBlockParams on SampleTimeColors off LibraryLinkDisplay "none" WideLines off ShowLineDimensions off ShowPortDataTypes off ShowLoopsOnError on IgnoreBidirectionalLines off ShowStorageClass off ExecutionOrder off RecordCoverage off CovPath "/" CovSaveName "covdata" CovMetricSettings "dw" CovNameIncrementing off CovHtmlReporting on covSaveCumulativeToWorkspaceVar on CovSaveSingleToWorkspaceVar on CovCumulativeVarName "covCumulativeData" CovCumulativeReport off DataTypeOverride "UseLocalSettings" MinMaxOverflowLogging "UseLocalSettings" MinMaxOverflowArchiveMode "Overwrite" BlockNameDataTip off BlockParametersDataTip off BlockDescriptionStringDataTip off ToolBar on StatusBar on BrowserShowLibraryLinks off BrowserLookUnderMasks off Created "Fri Aug 09 15:27:52 2002" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%" LastModifiedBy "user" ModifiedDateFormat "%" LastModifiedDate "Thu Dec 02 16:04:11 2004" ModelVersionFormat "1.%" ConfigurationManager "none" SimParamPage "Solver" LinearizationMsg "none" Profile off ParamWorkspaceSource "MATLABWorkspace" AccelSystemTargetFile "accel.tlc" AccelTemplateMakefile "accel_default_tmf" AccelMakeCommand "make_rtw" TryForcingSFcnDF off ExtModeMexFile "ext_comm" ExtModeBatchMode off ExtModeTrigType "manual" ExtModeTrigMode "normal" ExtModeTrigPort "1" ExtModeTrigElement "any" ExtModeTrigDuration 1000 ExtModeTrigHoldOff 0 ExtModeTrigDelay 0 ExtModeTrigDirection "rising" ExtModeTrigLevel 0 ExtModeArchiveMode "off" ExtModeAutoIncOneShot off ExtModeIncDirWhenArm off ExtModeAddSuffixToVar off ExtModeWriteAllDataToWs off ExtModeArmWhenConnect on ExtModeSkipDownloadWhenConnect off ExtModeLogAll on ExtModeAutoUpdateStatusClock on BufferReuse on RTWExpressionDepthLimit 5 SimulationMode "normal" Solver "ode5" SolverMode "Auto" StartTime "0.0" StopTime "0.5" MaxOrder 5 MaxStep "auto" MinStep "auto" MaxNumMinSteps "-1" InitialStep "auto" FixedStep "0.1e-3" RelTol "1e-3" AbsTol "auto" OutputOption "RefineOutputTimes" OutputTimes "[]" Refine "1" LoadExternalInput off ExternalInput "[t, u]" LoadInitialState off InitialState "xInitial" SaveTime on TimeSaveName "tout" SaveState off StateSaveName "xout" SaveOutput on OutputSaveName "yout" SaveFinalState off FinalStateName "xFinal" SaveFormat "Array" Decimation "1" LimitDataPoints off MaxDataPoints "1000" SignalLoggingName "sigsOut" ConsistencyChecking "none" ArrayBoundsChecking "none" AlgebraicLoopMsg "warning" BlockPriorityViolationMsg "warning" MinStepSizeMsg "warning" InheritedTsInSrcMsg "warning" DiscreteInheritContinuousMsg "warning" MultiTaskRateTransMsg "error" SingleTaskRateTransMsg "none" CheckForMatrixSingularity "none" IntegerOverflowMsg "warning" Int32ToFloatConvMsg "warning" ParameterDowncastMsg "error" ParameterOverflowMsg "error" ParameterPrecisionLossMsg "warning" UnderSpecifiedDataTypeMsg "none" UnnecessaryDatatypeConvMsg "none" VectorMatrixConversionMsg "none" InvalidFcnCallConnMsg "error" SignalLabelMismatchMsg "none" UnconnectedInputMsg "warning" UnconnectedOutputMsg "warning" UnconnectedLineMsg "warning" SfunCompatibilityCheckMsg "none" RTWInlineParameters off BlockReductionOpt on BooleanDataType off ConditionallyExecuteInputs on ParameterPooling on OptimizeBlockIOStorage on ZeroCross on AssertionControl "UseLocalSettings" ProdHWDeviceType "Microprocessor" ProdHWWordLengths "8,16,32,32" RTWSystemTargetFile "grt.tlc" RTWTemplateMakefile "grt_default_tmf" RTWMakeCommand "make_rtw" RTWGenerateCodeOnly off RTWRetainRTWFile off TLCProfiler off TLCDebug off TLCCoverage off TLCAssertion off BlockDefaults { Orientation "right" ForegroundColor "black" BackgroundColor "white" DropShadow off NamePlacement "normal" FontName "Helvetica" FontSize 10 FontWeight "normal" FontAngle "normal" ShowName on } BlockParameterDefaults { Block { BlockType Constant Value "1" VectorParams1D on ShowAdditionalParam off OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" } Block { BlockType Fcn Expr "sin(u[1])" } Block { BlockType Gain Gain "1" Multiplication "Element-wise(K.*u)" ShowAdditionalParam off ParameterDataTypeMode "Same as input" ParameterDataType "sfix(16)" ParameterScalingMode "Best Precision: Matrix-wise" ParameterScaling "2^0" OutDataTypeMode "Same as input" OutDataType "sfix(16)" OutScaling "2^0" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on } Block { BlockType Integrator ExternalReset "none" InitialConditionSource "internal" InitialCondition "0" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" ZeroCross on } Block { BlockType Memory X0 "0" InheritSampleTime off LinearizeMemory off RTWStateStorageClass "Auto" } Block { BlockType Mux Inputs "4" DisplayOption "none" } Block { BlockType Scope Floating off ModelBased off TickLabels "OneTimeTick" ZoomMode "on" Grid "on" TimeRange "auto" YMin "-5" YMax "5" SaveToWorkspace off SaveName "ScopeData" LimitDataPoints on MaxDataPoints "5000" Decimation "1" SampleInput off SampleTime "0" } Block { BlockType "S-Function" FunctionName "system" PortCounts "[]" SFunctionModules "''" } Block { BlockType Sum IconShape "rectangular" Inputs "++" ShowAdditionalParam off InputSameDT on OutDataTypeMode "Same as first input" OutDataType "sfix(16)" OutScaling "2^0" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on } Block { BlockType TransferFcn Numerator "[1]" Denominator "[1 2 1]" AbsoluteTolerance "auto" Realization "auto" } } AnnotationDefaults { HorizontalAlignment "center" VerticalAlignment "middle" ForegroundColor "black" BackgroundColor "white" DropShadow off FontName "Helvetica" FontSize 10 FontWeight "normal" FontAngle "normal" } LineDefaults { FontName "Helvetica" FontSize 9 FontWeight "normal" FontAngle "normal" } System { Name "pmsm_simulink_r13" Location [46, 98, 777, 529] Open on ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "88" ReportName "simulink-default.rpt" Block { BlockType Gain Name "Gain" Position [625, 352, 675, 388] Orientation "left" Gain "2*pi*(6/2)/60" Port { PortNumber 1 Name "Wrpm" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" DataLogging off DataLoggingNameMode "SignalName" DataLoggingDecimateData off DataLoggingDecimation "2" DataLoggingLimitDataPoints off DataLoggingMaxPoints "5000" } } Block { BlockType Fcn Name "Id" Position [320, 300, 420, 330] Orientation "left" Expr "(2/3)*(u(1)*cos(u(4))+u(2)*cos(u(4)-2*pi/3)+u(3" ")*cos(u(4)+2*pi/3))" } Block { BlockType Constant Name "Id_ref" Position [30, 96, 70, 124] Value "0" } Block { BlockType Integrator Name "Integrator" Ports [1, 1] Position [525, 358, 570, 382] Orientation "left" } Block { BlockType Fcn Name "Iq" Position [320, 349, 420, 381] Orientation "left" Expr "(-2/3)*(u(1)*sin(u(4))+u(2)*sin(u(4)-2*pi/3)+u(" "3)*sin(u(4)+2*pi/3))" } Block { BlockType Memory Name "Memory" Position [560, 305, 590, 335] Orientation "left" } Block { BlockType Memory Name "Memory1" Position [700, 200, 730, 230] } Block { BlockType Mux Name "Mux1" Ports [2, 1] Position [460, 303, 465, 372] Orientation "left" ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Mux Name "Mux2" Ports [3, 1] Position [175, 145, 180, 195] ShowName off Inputs "3" DisplayOption "bar" } Block { BlockType Mux Name "Mux3" Ports [3, 1] Position [465, 134, 470, 206] ShowName off Inputs "3" DisplayOption "bar" } Block { BlockType Mux Name "Mux5" Ports [3, 1] Position [670, 112, 675, 198] ShowName off Inputs "3" DisplayOption "bar" Port { PortNumber 1 Name "Iabc" PropagatedSignals "Ia, Ib, Ic" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" DataLogging off DataLoggingNameMode "SignalName" DataLoggingDecimateData off DataLoggingDecimation "2" DataLoggingLimitDataPoints off DataLoggingMaxPoints "5000" } } Block { BlockType TransferFcn Name "PI_Id" Position [185, 93, 265, 127] Numerator "[0.005 5]" Denominator "[0.001 0]" } Block { BlockType TransferFcn Name "PI_Iq" Position [320, 221, 385, 259] Numerator "[0.005 5]" Denominator "[0.001 0]" } Block { BlockType TransferFcn Name "PI_W" Position [170, 223, 250, 257] Numerator "[0.0025 0.0025]" Denominator "[1 0]" } Block { BlockType "S-Function" Name "PMSM Motor Drive\nin PSIM" Ports [3, 4] Position [580, 110, 635, 230] BackgroundColor "yellow" FunctionName "SimCoupler" Parameters "Netlist_File" MaskType "SimCoupler" MaskPromptString "Model Netlist File " MaskStyleString "edit" MaskTunableValueString "on" MaskEnableString "on" MaskVisibilityString "on" MaskToolTipString "on" MaskVariables "Netlist_File=&1;" MaskInitialization "c=[0:10:360]*pi/180;\nx1=cos(c)*30; y1=sin(c)*3" "0+20;\nx2=cos(c)*30;y2=sin(c)*30-20;" MaskDisplay "plot(-60,-60,60,60,x1,y1,x2,y2)" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" MaskValueString "C:\\PSIM6_demo\\examples\\simcoupler\\PMSM_psim" ".cct" Port { PortNumber 1 Name "Ia" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" DataLogging off DataLoggingNameMode "SignalName" DataLoggingDecimateData off DataLoggingDecimation "2" DataLoggingLimitDataPoints off DataLoggingMaxPoints "5000" } Port { PortNumber 2 Name "Ib" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" DataLogging off DataLoggingNameMode "SignalName" DataLoggingDecimateData off DataLoggingDecimation "2" DataLoggingLimitDataPoints off DataLoggingMaxPoints "5000" } Port { PortNumber 3 Name "Ic" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" DataLogging off DataLoggingNameMode "SignalName" DataLoggingDecimateData off DataLoggingDecimation "2" DataLoggingLimitDataPoints off DataLoggingMaxPoints "5000" } Port { PortNumber 4 Name "Wrpm" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" DataLogging off DataLoggingNameMode "SignalName" DataLoggingDecimateData off DataLoggingDecimation "2" DataLoggingLimitDataPoints off DataLoggingMaxPoints "5000" } } Block { BlockType Scope Name "Scope" Ports [1] Position [625, 269, 655, 301] Orientation "left" Location [1, 49, 801, 571] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } List { ListType SelectedSignals axes1 "" } DataFormat "StructureWithTime" } Block { BlockType Scope Name "Scope1" Ports [2] Position [205, 322, 245, 353] Orientation "left" Location [6, 57, 763, 563] Open off NumInputPorts "2" TickLabels "on" ZoomMode "yonly" List { ListType AxesTitles axes1 "%" axes2 "%" } List { ListType SelectedSignals axes1 "" axes2 "" } TimeRange "0.5 " YMin "-0.75~0" YMax "0.75~7.5" SaveName "ScopeData1" DataFormat "StructureWithTime" MaxDataPoints "500000" } Block { BlockType Sum Name "Sum" Ports [2, 1] Position [85, 225, 115, 255] ShowName off IconShape "round" Inputs "|+-" } Block { BlockType Sum Name "Sum1" Ports [2, 1] Position [115, 95, 145, 125] ShowName off IconShape "round" Inputs "|+-" } Block { BlockType Sum Name "Sum2" Ports [2, 1] Position [270, 225, 300, 255] ShowName off IconShape "round" Inputs "|+-" } Block { BlockType Sum Name "Sum3" Ports [2, 1] Position [395, 95, 425, 125] ShowName off IconShape "round" Inputs "|+-" } Block { BlockType Sum Name "Sum4" Ports [2, 1] Position [400, 225, 430, 255] ShowName off IconShape "round" Inputs "++|" } Block { BlockType Fcn Name "Vd_1" Position [245, 139, 390, 161] NamePlacement "alternate" Expr "0.04159*u(2)*u(3)" } Block { BlockType Fcn Name "Vma" Position [500, 121, 540, 139] Expr "u(1)*cos(u(3))-u(2)*sin(u(3))" Port { PortNumber 1 Name "Vma" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" DataLogging off DataLoggingNameMode "SignalName" DataLoggingDecimateData off DataLoggingDecimation "2" DataLoggingLimitDataPoints off DataLoggingMaxPoints "5000" } } Block { BlockType Fcn Name "Vmb" Position [500, 161, 540, 179] Expr "u(1)*cos(u(3)-2*pi/3)-u(2)*sin(u(3)-2*pi/3)" Port { PortNumber 1 Name "Vmb" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" DataLogging off DataLoggingNameMode "SignalName" DataLoggingDecimateData off DataLoggingDecimation "2" DataLoggingLimitDataPoints off DataLoggingMaxPoints "5000" } } Block { BlockType Fcn Name "Vmc" Position [500, 201, 540, 219] Expr "u(1)*cos(u(3)+2*pi/3)-u(2)*sin(u(3)+2*pi/3)" Port { PortNumber 1 Name "Vmc" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" DataLogging off DataLoggingNameMode "SignalName" DataLoggingDecimateData off DataLoggingDecimation "2" DataLoggingLimitDataPoints off DataLoggingMaxPoints "5000" } } Block { BlockType Fcn Name "Vq_1" Position [245, 173, 390, 197] Expr "(0.4832+0.04159*u(1))*u(3)" } Block { BlockType Constant Name "W_ref (RPM)" Position [20, 224, 55, 256] NamePlacement "alternate" Value "2000" } Line { Name "Wrpm" SrcBlock "Gain" SrcPort 1 Points [0, 0; -15, 0] Branch { DstBlock "Integrator" DstPort 1 } Branch { Points [0, 35; -455, 0; 0, -220] DstBlock "Mux2" DstPort 3 } } Line { SrcBlock "Integrator" SrcPort 1 Points [0, 0; -10, 0] Branch { Points [-30, 0] DstBlock "Mux1" DstPort 2 } Branch { Points [0, -90; -60, 0] DstBlock "Mux3" DstPort 3 } } Line { SrcBlock "Mux1" SrcPort 1 Points [0, 0; -20, 0] Branch { DstBlock "Id" DstPort 1 } Branch { DstBlock "Iq" DstPort 1 } } Line { SrcBlock "Id" SrcPort 1 Points [0, 0; -50, 0] Branch { Points [0, 15] DstBlock "Scope1" DstPort 1 } Branch { Points [-135, 0; 0, -160] Branch { DstBlock "Sum1" DstPort 2 } Branch { DstBlock "Mux2" DstPort 1 } } } Line { SrcBlock "Iq" SrcPort 1 Points [0, 0; -30, 0] Branch { DstBlock "Sum2" DstPort 2 } Branch { Points [-20, 0] Branch { Points [-125, 0; 0, -195] DstBlock "Mux2" DstPort 2 } Branch { Points [0, -20] DstBlock "Scope1" DstPort 2 } } } Line { SrcBlock "W_ref (RPM)" SrcPort 1 DstBlock "Sum" DstPort 1 } Line { SrcBlock "Id_ref" SrcPort 1 DstBlock "Sum1" DstPort 1 } Line { SrcBlock "Sum1" SrcPort 1 DstBlock "PI_Id" DstPort 1 } Line { Labels [0, 0] SrcBlock "PI_Id" SrcPort 1 DstBlock "Sum3" DstPort 1 } Line { SrcBlock "Sum" SrcPort 1 DstBlock "PI_W" DstPort 1 } Line { SrcBlock "Sum2" SrcPort 1 DstBlock "PI_Iq" DstPort 1 } Line { SrcBlock "Vd_1" SrcPort 1 Points [15, 0] DstBlock "Sum3" DstPort 2 } Line { SrcBlock "PI_Iq" SrcPort 1 DstBlock "Sum4" DstPort 2 } Line { SrcBlock "Vq_1" SrcPort 1 Points [20, 0] DstBlock "Sum4" DstPort 1 } Line { SrcBlock "Mux2" SrcPort 1 Points [0, 0; 40, 0] Branch { Points [0, -20] DstBlock "Vd_1" DstPort 1 } Branch { Points [0, 15] DstBlock "Vq_1" DstPort 1 } } Line { SrcBlock "Sum3" SrcPort 1 Points [10, 0; 0, 35] DstBlock "Mux3" DstPort 1 } Line { SrcBlock "Sum4" SrcPort 1 Points [5, 0; 0, -70] DstBlock "Mux3" DstPort 2 } Line { SrcBlock "Mux3" SrcPort 1 Points [0, 0; 5, 0] Branch { Points [0, -40] DstBlock "Vma" DstPort 1 } Branch { DstBlock "Vmb" DstPort 1 } Branch { Points [0, 40] DstBlock "Vmc" DstPort 1 } } Line { SrcBlock "PI_W" SrcPort 1 DstBlock "Sum2" DstPort 1 } Line { Name "Iabc" SrcBlock "Mux5" SrcPort 1 Points [5, 0; 0, 130] Branch { DstBlock "Scope" DstPort 1 } Branch { Points [0, 35] DstBlock "Memory" DstPort 1 } } Line { Name "Ia" Labels [0, 0] SrcBlock "PMSM Motor Drive\nin PSIM" SrcPort 1 DstBlock "Mux5" DstPort 1 } Line { Name "Ib" Labels [0, 0] SrcBlock "PMSM Motor Drive\nin PSIM" SrcPort 2 DstBlock "Mux5" DstPort 2 } Line { Name "Ic" Labels [0, 0] SrcBlock "PMSM Motor Drive\nin PSIM" SrcPort 3 DstBlock "Mux5" DstPort 3 } Line { Name "Vmb" Labels [0, 0] SrcBlock "Vmb" SrcPort 1 DstBlock "PMSM Motor Drive\nin PSIM" DstPort 2 } Line { Name "Vmc" Labels [0, 0] SrcBlock "Vmc" SrcPort 1 DstBlock "PMSM Motor Drive\nin PSIM" DstPort 3 } Line { Name "Wrpm" Labels [0, 0] SrcBlock "PMSM Motor Drive\nin PSIM" SrcPort 4 DstBlock "Memory1" DstPort 1 } Line { Name "Vma" Labels [0, 0] SrcBlock "Vma" SrcPort 1 DstBlock "PMSM Motor Drive\nin PSIM" DstPort 1 } Line { SrcBlock "Memory" SrcPort 1 DstBlock "Mux1" DstPort 1 } Line { SrcBlock "Memory1" SrcPort 1 Points [0, 155; -40, 0] Branch { DstBlock "Gain" DstPort 1 } Branch { Points [0, 50; -595, 0] DstBlock "Sum" DstPort 2 } } Annotation { Name "PMSM Drive Co-Simulated by PSIM and Simulink (c" "ontrol in Simulink)" Position [362, 32] FontName "Arial" FontSize 12 FontWeight "bold" } Annotation { Name "Note: This file can not be co-simulated by the " "PSIM demo version." Position [307, 55] } Annotation { Name "It can be co-simulated by the PSIM full version" " only!" Position [303, 72] } } }