Model { Name "pmsm_simulink_r11" Version 3.00 SimParamPage "Solver" SampleTimeColors off InvariantConstants off WideVectorLines off ShowLineWidths off ShowPortDataTypes off StartTime "0.0" StopTime "0.5" SolverMode "Auto" Solver "ode5" RelTol "1e-3" AbsTol "auto" Refine "1" MaxStep "auto" InitialStep "auto" FixedStep "0.0001" MaxOrder 5 OutputOption "RefineOutputTimes" OutputTimes "[]" LoadExternalInput off ExternalInput "[t, u]" SaveTime on TimeSaveName "tout" SaveState off StateSaveName "xout" SaveOutput on OutputSaveName "yout" LoadInitialState off InitialState "xInitial" SaveFinalState off FinalStateName "xFinal" SaveFormat "Matrix" LimitMaxRows off MaxRows "1000" Decimation "1" AlgebraicLoopMsg "warning" MinStepSizeMsg "warning" UnconnectedInputMsg "warning" UnconnectedOutputMsg "warning" UnconnectedLineMsg "warning" InheritedTsInSrcMsg "warning" IntegerOverflowMsg "warning" UnnecessaryDatatypeConvMsg "none" Int32ToFloatConvMsg "warning" SignalLabelMismatchMsg "none" ConsistencyChecking "off" ZeroCross on SimulationMode "normal" BlockDataTips on BlockParametersDataTip off BlockAttributesDataTip off BlockPortWidthsDataTip off BlockDescriptionStringDataTip off BlockMaskParametersDataTip off ToolBar on StatusBar on BrowserShowLibraryLinks off BrowserLookUnderMasks off OptimizeBlockIOStorage on BufferReuse on BooleanDataType off RTWSystemTargetFile "grt.tlc" RTWInlineParameters off RTWRetainRTWFile off RTWTemplateMakefile "grt_default_tmf" RTWMakeCommand "make_rtw" RTWGenerateCodeOnly 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 Created "Fri Aug 09 15:27:52 2002" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%" LastModifiedBy "user" ModifiedDateFormat "%" LastModifiedDate "Thu Dec 02 16:06:46 2004" ModelVersionFormat "1.%" ConfigurationManager "none" BlockDefaults { Orientation "right" ForegroundColor "black" BackgroundColor "white" DropShadow off NamePlacement "normal" FontName "Helvetica" FontSize 10 FontWeight "normal" FontAngle "normal" ShowName on } 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_r11" Location [-1, 74, 795, 545] Open on ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "automatic" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "86" AutoZoom on ReportName "simulink-default.rpt" Block { BlockType Gain Name "Gain" Position [670, 362, 720, 398] Orientation "left" Gain "2*pi*(6/2)/60" SaturateOnIntegerOverflow on Port { PortNumber 1 Name "Wrpm" TestPoint off RTWStorageClass "Auto" } } Block { BlockType Fcn Name "Id" Position [295, 311, 430, 339] 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 [25, 107, 80, 133] Value "0" } Block { BlockType Integrator Name "Integrator" Ports [1, 1, 0, 0, 0] Position [560, 368, 605, 392] Orientation "left" ExternalReset "none" InitialConditionSource "internal" InitialCondition "0" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" } Block { BlockType Fcn Name "Iq" Position [295, 360, 430, 390] 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 [645, 320, 675, 350] Orientation "left" X0 "0" InheritSampleTime off } Block { BlockType Memory Name "Memory1" Position [755, 365, 780, 395] Orientation "left" X0 "0" InheritSampleTime off } Block { BlockType Mux Name "Mux1" Ports [2, 1, 0, 0, 0] Position [510, 318, 515, 387] Orientation "left" ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Mux Name "Mux2" Ports [3, 1, 0, 0, 0] Position [185, 155, 190, 205] ShowName off Inputs "3" DisplayOption "bar" } Block { BlockType Mux Name "Mux3" Ports [3, 1, 0, 0, 0] Position [475, 144, 480, 216] ShowName off Inputs "3" DisplayOption "bar" } Block { BlockType Mux Name "Mux4" Ports [3, 1, 0, 0, 0] Position [595, 55, 600, 105] ShowName off Inputs "3" DisplayOption "bar" Port { PortNumber 1 Name "Vabc" TestPoint off RTWStorageClass "Auto" } } Block { BlockType Mux Name "Mux5" Ports [3, 1, 0, 0, 0] Position [725, 117, 730, 203] ShowName off Inputs "3" DisplayOption "bar" Port { PortNumber 1 Name "Iabc" TestPoint off RTWStorageClass "Auto" } } Block { BlockType Mux Name "Mux6" Ports [2, 1, 0, 0, 0] Position [815, 186, 820, 239] ShowName off Inputs "2" DisplayOption "bar" Port { PortNumber 1 Name "Speed(RPM)" TestPoint off RTWStorageClass "Auto" } } Block { BlockType TransferFcn Name "PI_Id" Position [185, 104, 275, 136] Numerator "[0.05 5]" Denominator "[0.01 0]" } Block { BlockType TransferFcn Name "PI_Iq" Position [305, 234, 395, 266] Numerator "[0.05 5]" Denominator "[0.01 0]" } Block { BlockType TransferFcn Name "PI_W" Position [165, 233, 245, 267] Numerator "[0.0025 0.0025]" Denominator "[1 0]" } Block { BlockType "S-Function" Name "PMSM Motor Drive" Ports [3, 4, 0, 0, 0] Position [605, 113, 690, 237] BackgroundColor "yellow" FunctionName "SimCoupler" Parameters "Netlist_File" PortCounts "[]" SFunctionModules "''" MaskType "SimCoupler" MaskPromptString "Model Netlist File " MaskStyleString "edit" MaskTunableValueString "on" MaskEnableString "on" MaskVisibilityString "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 RTWStorageClass "Auto" } Port { PortNumber 2 Name "Ib" TestPoint off RTWStorageClass "Auto" } Port { PortNumber 3 Name "Ic" TestPoint off RTWStorageClass "Auto" } Port { PortNumber 4 Name "Wrpm" TestPoint off RTWStorageClass "Auto" } } Block { BlockType Scope Name "Scope" Ports [3, 0, 0, 0, 0] Position [860, 61, 910, 249] Floating off Location [6, 57, 933, 659] Open off NumInputPorts "3" TickLabels "on" ZoomMode "xonly" List { ListType AxesTitles axes1 "%" axes2 "%" axes3 "%" } Grid "on" TimeRange "2" YMin "-400~-5~-500" YMax "400~5~2500" SaveToWorkspace off SaveName "ScopeData" DataFormat "StructureWithTime" LimitMaxRows on MaxRows "500000" Decimation "1" SampleInput off SampleTime "0" } Block { BlockType Scope Name "Scope1" Ports [2, 0, 0, 0, 0] Position [190, 330, 235, 365] Orientation "left" Floating off Location [6, 57, 763, 563] Open off NumInputPorts "2" TickLabels "on" ZoomMode "yonly" List { ListType AxesTitles axes1 "%" axes2 "%" } Grid "on" TimeRange "2" YMin "-0.05~0" YMax "0.2~5" SaveToWorkspace off SaveName "ScopeData1" DataFormat "StructureWithTime" LimitMaxRows on MaxRows "500000" Decimation "1" SampleInput off SampleTime "0" } Block { BlockType Sum Name "Sum" Ports [2, 1, 0, 0, 0] Position [80, 235, 110, 265] ShowName off IconShape "round" Inputs "|+-" SaturateOnIntegerOverflow on } Block { BlockType Sum Name "Sum1" Ports [2, 1, 0, 0, 0] Position [125, 105, 155, 135] ShowName off IconShape "round" Inputs "|+-" SaturateOnIntegerOverflow on } Block { BlockType Sum Name "Sum2" Ports [2, 1, 0, 0, 0] Position [260, 235, 290, 265] ShowName off IconShape "round" Inputs "|+-" SaturateOnIntegerOverflow on } Block { BlockType Sum Name "Sum3" Ports [2, 1, 0, 0, 0] Position [405, 105, 435, 135] ShowName off IconShape "round" Inputs "|+-" SaturateOnIntegerOverflow on } Block { BlockType Sum Name "Sum4" Ports [2, 1, 0, 0, 0] Position [410, 235, 440, 265] ShowName off IconShape "round" Inputs "++|" SaturateOnIntegerOverflow on } Block { BlockType Fcn Name "Va" Position [510, 126, 550, 144] Expr "u(1)*cos(u(3))-u(2)*sin(u(3))" Port { PortNumber 1 Name "Va" TestPoint off RTWStorageClass "Auto" } } Block { BlockType Fcn Name "Vb" Position [510, 166, 550, 184] Expr "u(1)*cos(u(3)-2*pi/3)-u(2)*sin(u(3)-2*pi/3)" Port { PortNumber 1 Name "Vb" TestPoint off RTWStorageClass "Auto" } } Block { BlockType Fcn Name "Vc" Position [510, 206, 550, 224] Expr "u(1)*cos(u(3)+2*pi/3)-u(2)*sin(u(3)+2*pi/3)" Port { PortNumber 1 Name "Vc" TestPoint off RTWStorageClass "Auto" } } Block { BlockType Fcn Name "Vd_1" Position [255, 149, 400, 171] NamePlacement "alternate" Expr "0.04159*u(2)*u(3)" } Block { BlockType Fcn Name "Vq_1" Position [255, 183, 400, 207] Expr "(0.4832+0.04159*u(1))*u(3)" } Block { BlockType Constant Name "W_ref (RPM)" Position [15, 235, 55, 265] Value "2000" } Line { Name "Va" Labels [0, 0] SrcBlock "Va" SrcPort 1 Points [5, 0] Branch { DstBlock "PMSM Motor Drive" DstPort 1 } Branch { Points [0, -70] DstBlock "Mux4" DstPort 1 } } Line { Name "Wrpm" SrcBlock "Gain" SrcPort 1 Points [0, 0; -20, 0] Branch { DstBlock "Integrator" DstPort 1 } Branch { Points [0, 35; -495, 0; 0, -220] DstBlock "Mux2" DstPort 3 } } Line { SrcBlock "Integrator" SrcPort 1 Points [0, 0; -15, 0] Branch { Points [-10, 0] DstBlock "Mux1" DstPort 2 } Branch { Points [0, 15; -80, 0] DstBlock "Mux3" DstPort 3 } } Line { SrcBlock "Mux1" SrcPort 1 Points [0, -5; -60, 0] Branch { DstBlock "Id" DstPort 1 } Branch { DstBlock "Iq" DstPort 1 } } Line { SrcBlock "Id" SrcPort 1 Points [0, 0; -35, 0] Branch { Points [0, 15] DstBlock "Scope1" DstPort 1 } Branch { Points [-115, 0; 0, -160] Branch { DstBlock "Sum1" DstPort 2 } Branch { DstBlock "Mux2" DstPort 1 } } } Line { SrcBlock "Iq" SrcPort 1 Points [0, 0; -15, 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 Points [5, 0] Branch { DstBlock "Sum" DstPort 1 } Branch { Points [0, 205; 735, 0] DstBlock "Mux6" DstPort 2 } } Line { SrcBlock "Id_ref" SrcPort 1 DstBlock "Sum1" DstPort 1 } Line { SrcBlock "Sum1" SrcPort 1 DstBlock "PI_Id" DstPort 1 } Line { 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 "Va" DstPort 1 } Branch { DstBlock "Vb" DstPort 1 } Branch { Points [0, 40] DstBlock "Vc" DstPort 1 } } Line { SrcBlock "PI_W" SrcPort 1 DstBlock "Sum2" DstPort 1 } Line { Name "Iabc" Labels [0, 0] SrcBlock "Mux5" SrcPort 1 Points [5, 0] Branch { Labels [1, 0] Points [105, 0] DstBlock "Scope" DstPort 2 } Branch { Points [0, 175] DstBlock "Memory" DstPort 1 } } Line { Name "Vabc" Labels [0, 0] SrcBlock "Mux4" SrcPort 1 Points [240, 0] DstBlock "Scope" DstPort 1 } Line { Name "Ia" Labels [0, 0] SrcBlock "PMSM Motor Drive" SrcPort 1 DstBlock "Mux5" DstPort 1 } Line { Name "Ib" Labels [0, 0] SrcBlock "PMSM Motor Drive" SrcPort 2 DstBlock "Mux5" DstPort 2 } Line { Name "Ic" Labels [0, 0] SrcBlock "PMSM Motor Drive" SrcPort 3 DstBlock "Mux5" DstPort 3 } Line { Name "Vb" Labels [0, 0] SrcBlock "Vb" SrcPort 1 Points [15, 0] Branch { Points [0, -95] DstBlock "Mux4" DstPort 2 } Branch { DstBlock "PMSM Motor Drive" DstPort 2 } } Line { Name "Vc" Labels [0, 0] SrcBlock "Vc" SrcPort 1 Points [25, 0] Branch { DstBlock "Mux4" DstPort 3 } Branch { DstBlock "PMSM Motor Drive" DstPort 3 } } Line { Name "Speed(RPM)" Labels [0, 0] SrcBlock "Mux6" SrcPort 1 DstBlock "Scope" DstPort 3 } Line { Name "Wrpm" Labels [0, 0] SrcBlock "PMSM Motor Drive" SrcPort 4 Points [100, 0] Branch { Points [0, -20] DstBlock "Mux6" DstPort 1 } Branch { DstBlock "Memory1" DstPort 1 } } Line { SrcBlock "Memory1" SrcPort 1 Points [-10, 0] Branch { DstBlock "Gain" DstPort 1 } Branch { Points [0, 50; -645, 0] DstBlock "Sum" DstPort 2 } } Line { SrcBlock "Memory" SrcPort 1 DstBlock "Mux1" DstPort 1 } Annotation { Position [290, 25] Text "PMSM Drive Co-Simulated by PSIM and Simulink (c" "ontrol in Simulink)" FontName "Arial" FontSize 12 FontWeight "bold" } Annotation { Position [247, 53] Text "Note: This file can not be co-simulated by the " "PSIM demo version. " } Annotation { Position [244, 72] Text "It can be co-simulated by the PSIM full version" " only!" } } }