📄 testmotor.mdl
字号:
Model {
Name "testmotor"
Version 4.00
SampleTimeColors off
LibraryLinkDisplay "none"
WideLines on
ShowLineDimensions on
ShowPortDataTypes off
ShowStorageClass off
ExecutionOrder off
RecordCoverage off
CovPath "/"
CovSaveName "covdata"
CovMetricSettings "dw"
CovNameIncrementing off
CovHtmlReporting on
BlockNameDataTip off
BlockParametersDataTip on
BlockDescriptionStringDataTip off
ToolBar on
StatusBar on
BrowserShowLibraryLinks off
BrowserLookUnderMasks off
InitFcn "powericon('psbinitsys',bdroot);"
Created "Thu Aug 23 15:01:18 2001"
UpdateHistory "UpdateHistoryNever"
ModifiedByFormat "%<Auto>"
LastModifiedBy "Administrator"
ModifiedDateFormat "%<Auto>"
LastModifiedDate "Wed Jul 02 17:43:47 2003"
ModelVersionFormat "1.%<AutoIncrement:133>"
ConfigurationManager "none"
SimParamPage "Solver"
StartTime "0.0"
StopTime "10"
SolverMode "Auto"
Solver "ode45"
RelTol "1e-3"
AbsTol "auto"
Refine "1"
MaxStep "1e-4"
MinStep "auto"
MaxNumMinSteps "-1"
InitialStep "auto"
FixedStep "auto"
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 "Array"
LimitDataPoints off
MaxDataPoints "1000"
Decimation "1"
AlgebraicLoopMsg "warning"
MinStepSizeMsg "warning"
UnconnectedInputMsg "warning"
UnconnectedOutputMsg "warning"
UnconnectedLineMsg "warning"
InheritedTsInSrcMsg "warning"
SingleTaskRateTransMsg "none"
MultiTaskRateTransMsg "error"
IntegerOverflowMsg "none"
CheckForMatrixSingularity "none"
UnnecessaryDatatypeConvMsg "none"
Int32ToFloatConvMsg "warning"
InvalidFcnCallConnMsg "error"
SignalLabelMismatchMsg "none"
LinearizationMsg "none"
VectorMatrixConversionMsg "none"
SfunCompatibilityCheckMsg "none"
BlockPriorityViolationMsg "warning"
ArrayBoundsChecking "none"
ConsistencyChecking "none"
ZeroCross off
Profile off
SimulationMode "normal"
RTWSystemTargetFile "grt.tlc"
RTWInlineParameters off
RTWRetainRTWFile off
RTWTemplateMakefile "grt_default_tmf"
RTWMakeCommand "make_rtw"
RTWGenerateCodeOnly off
TLCProfiler off
TLCDebug off
TLCCoverage off
AccelSystemTargetFile "accel.tlc"
AccelTemplateMakefile "accel_default_tmf"
AccelMakeCommand "make_rtw"
TryForcingSFcnDF off
ExtModeMexFile "ext_comm"
ExtModeBatchMode off
ExtModeTrigType "manual"
ExtModeTrigMode "oneshot"
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 off
ExtModeSkipDownloadWhenConnect off
ExtModeLogAll on
ExtModeAutoUpdateStatusClock on
OptimizeBlockIOStorage on
BufferReuse on
ParameterPooling on
BlockReductionOpt on
RTWExpressionDepthLimit 5
BooleanDataType off
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 "testmotor"
Location [2, 70, 782, 536]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "automatic"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Display
Name "Display"
Ports [1]
Position [540, 223, 610, 257]
Format "short"
Decimation "1"
Floating off
SampleTime "-1"
}
Block {
BlockType Sin
Name "Sine Wave"
Position [200, 135, 230, 165]
SineType "Time-based"
Amplitude "50"
Bias "0"
Frequency "50"
Phase "0"
Samples "10"
Offset "0"
SampleTime "0"
VectorParams1D on
}
Block {
BlockType Sin
Name "Sine Wave1"
Position [200, 175, 230, 205]
SineType "Time-based"
Amplitude "50"
Bias "0"
Frequency "50"
Phase "2.0944"
Samples "10"
Offset "0"
SampleTime "0"
VectorParams1D on
}
Block {
BlockType Sin
Name "Sine Wave2"
Position [200, 215, 230, 245]
SineType "Time-based"
Amplitude "50"
Bias "0"
Frequency "50"
Phase "-2.0944"
Samples "10"
Offset "0"
SampleTime "0"
VectorParams1D on
}
Block {
BlockType Step
Name "Step"
Position [160, 280, 190, 310]
Time "0"
Before "0"
After "0"
SampleTime "0"
VectorParams1D on
}
Block {
BlockType Step
Name "Step1"
Position [160, 325, 190, 355]
Time "7"
Before "0"
After "0"
SampleTime "0"
VectorParams1D on
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [220, 273, 245, 362]
ShowName off
IconShape "rectangular"
Inputs "+-"
SaturateOnIntegerOverflow on
}
Block {
BlockType Scope
Name "Te"
Ports [1]
Position [470, 389, 500, 421]
Floating off
Location [1, 49, 801, 571]
Open off
NumInputPorts "1"
TickLabels "OneTimeTick"
ZoomMode "on"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
}
Grid "on"
TimeRange "auto"
YMin "-10"
YMax "12"
SaveToWorkspace off
SaveName "ScopeData1"
DataFormat "StructureWithTime"
LimitDataPoints off
MaxDataPoints "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType SubSystem
Name "abcmotor"
Ports [4, 6]
Position [310, 131, 370, 284]
ShowPortLabels on
TreatAsAtomicUnit off
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
System {
Name "abcmotor"
Location [451, 84, 761, 318]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "automatic"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "van"
Position [25, 68, 55, 82]
Port "1"
LatchInput off
Interpolate on
}
Block {
BlockType Inport
Name "vbn"
Position [25, 98, 55, 112]
Port "2"
LatchInput off
Interpolate on
}
Block {
BlockType Inport
Name "vcn"
Position [25, 128, 55, 142]
Port "3"
LatchInput off
Interpolate on
}
Block {
BlockType Inport
Name "TL"
Position [25, 158, 55, 172]
Port "4"
LatchInput off
Interpolate on
}
Block {
BlockType Demux
Name "Demux"
Ports [1, 6]
Position [225, 29, 230, 211]
BackgroundColor "black"
ShowName off
Outputs "6"
BusSelectionMode off
}
Block {
BlockType Mux
Name "Mux1"
Ports [4, 1]
Position [90, 57, 95, 183]
ShowName off
Inputs "4"
DisplayOption "bar"
}
Block {
BlockType "S-Function"
Name "S-Function"
Ports [1, 1]
Position [130, 68, 195, 172]
FunctionName "motor"
Parameters "Incond,[Rs,0.001*Lls,0.001*L0,0.001*Lms,0.0"
"01*Ld,0.001*Lq,p,J,pusa,Jtype]"
PortCounts "[]"
SFunctionModules "''"
MaskType "EV Motor"
MaskDescription "Parameters for Electric Vechicle Motor"
MaskPromptString "Stator Resistance [ Rs(Ω) ]:|Leakage induc"
"tance [ Lls(mH) ]:|Partial-DC phase inductance [ L0 (mH) ]:|Peak value of AC "
"phase inductance [ Lms(mH) ]:|Direct component of phase inductance [ Ld(mH) ]"
":|Quad component of phase inductance [ Lq(mH) ]:|Pole-pair number [ p ]:|Iner"
"tia [ J(Kg·m2) ]:|Inertia Type|Peak vaule of PM flux of phase winding [Ψmag"
"(Wb) ]:|Initial conditions [ia,ib,ic,ωr,θ]"
MaskStyleString "edit,edit,edit,edit,edit,edit,edit,edit,pop"
"up(Including Motor Shaft|Excluding Motor Shaft ),edit,edit"
MaskTunableValueString "on,on,on,on,on,on,on,on,on,on,on"
MaskCallbackString "||||||||||"
MaskEnableString "on,on,on,on,on,on,on,on,on,on,on"
MaskVisibilityString "on,on,on,on,on,on,on,on,on,on,on"
MaskToolTipString "on,on,on,on,on,on,on,on,on,on,on"
MaskVariables "Rs=@1;Lls=@2;L0=@3;Lms=@4;Ld=@5;Lq=@6;p=@7;"
"J=@8;Jtype=@9;pusa=@10;Incond=@11;"
MaskDisplay "disp('Motor for \\nElectric Vehicle')\n"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "0.034593|0.153|0.5127|0.3467|0.402|1.442|2|"
"0.06|Including Motor Shaft|0.0927|[0,0,0,0,0]"
MaskVariableAliases ",,,,,,,,,,"
}
Block {
BlockType Outport
Name "ian"
Position [255, 38, 285, 52]
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Outport
Name "ibn"
Position [255, 68, 285, 82]
Port "2"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Outport
Name "icn"
Position [255, 98, 285, 112]
Port "3"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Outport
Name "wr1"
Position [255, 128, 285, 142]
Port "4"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Outport
Name "theta1"
Position [255, 158, 285, 172]
Port "5"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Outport
Name "Te1"
Position [255, 188, 285, 202]
Port "6"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "Mux1"
SrcPort 1
DstBlock "S-Function"
DstPort 1
}
Line {
SrcBlock "S-Function"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
Line {
SrcBlock "van"
SrcPort 1
DstBlock "Mux1"
DstPort 1
}
Line {
SrcBlock "vbn"
SrcPort 1
DstBlock "Mux1"
DstPort 2
}
Line {
SrcBlock "vcn"
SrcPort 1
DstBlock "Mux1"
DstPort 3
}
Line {
SrcBlock "TL"
SrcPort 1
DstBlock "Mux1"
DstPort 4
}
Line {
SrcBlock "Demux"
SrcPort 1
DstBlock "ian"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 2
DstBlock "ibn"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 3
DstBlock "icn"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 4
DstBlock "wr1"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 5
DstBlock "theta1"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 6
DstBlock "Te1"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "dpPMSM1"
Ports [4, 6]
Position [785, 329, 845, 476]
ShowPortLabels on
TreatAsAtomicUnit off
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
System {
Name "dpPMSM1"
Location [2, 74, 790, 556]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "van"
Position [50, 143, 80, 157]
Port "1"
LatchInput off
Interpolate on
}
Block {
BlockType Inport
Name "vbn"
Position [50, 173, 80, 187]
Port "2"
LatchInput off
Interpolate on
}
Block {
BlockType Inport
Name "vcn"
Position [50, 203, 80, 217]
Port "3"
LatchInput off
Interpolate on
}
Block {
BlockType Inport
Name "TL"
Position [200, 243, 230, 257]
Port "4"
LatchInput off
Interpolate on
}
Block {
BlockType SubSystem
Name " "
Ports [2, 2]
Position [150, 160, 220, 235]
BackgroundColor "yellow"
NamePlacement "alternate"
ShowPortLabels on
TreatAsAtomicUnit off
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
MaskType "C3/2"
MaskDescription "[Xd Xq]=C3/2 ( [XA ,XB XC] )\n\n"
MaskDisplay "disp('abc-dq\\n变换')"
MaskIconFrame on
MaskIconOpaque off
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name " "
Location [2, 74, 790, 556]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "automatic"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "XABC"
Position [85, 248, 115, 262]
Port "1"
LatchInput off
Interpolate on
}
Block {
BlockType Inport
Name "theta"
Position [420, 433, 450, 447]
NamePlacement "alternate"
Port "2"
LatchInput off
Interpolate on
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -