smvcurve.mdl
来自「关于电机的.m程序」· MDL 代码 · 共 413 行
MDL
413 行
Model {
Name "smVcurve"
Version 3.00
SimParamPage "WorkspaceI/O"
SampleTimeColors off
InvariantConstants off
WideVectorLines off
ShowLineWidths off
ShowPortDataTypes off
StartTime "0.0"
StopTime "0"
SolverMode "Auto"
Solver "ode45"
RelTol "1e-3"
AbsTol "auto"
Refine "1"
MaxStep "3"
InitialStep "auto"
FixedStep "auto"
MaxOrder 5
OutputOption "RefineOutputTimes"
OutputTimes "[]"
LoadExternalInput off
ExternalInput "[t, u]"
SaveTime off
TimeSaveName "tout"
SaveState off
StateSaveName "xout"
SaveOutput on
OutputSaveName "current,delta"
LoadInitialState off
InitialState "xInitial"
SaveFinalState off
FinalStateName "xFinal"
SaveFormat "Matrix"
LimitMaxRows off
MaxRows "1000"
Decimation "1"
AlgebraicLoopMsg "none"
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 on
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 "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
Created "Wed May 24 20:09:50 2000"
UpdateHistory "UpdateHistoryNever"
ModifiedByFormat "%<Auto>"
ModifiedDateFormat "%<Auto>"
LastModifiedDate "Tue Jun 06 11:13:50 2000"
ModelVersionFormat "1.%<AutoIncrement:6>"
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 "smVcurve"
Location [233, 287, 997, 679]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "automatic"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "136"
AutoZoom on
ReportName "simulink-default.rpt"
Block {
BlockType SubSystem
Name " Run"
Ports [0, 0, 0, 0, 0]
Position [435, 216, 490, 267]
BackgroundColor "yellow"
DropShadow on
ShowName off
OpenFcn "vcurverun"
ShowPortLabels on
MaskDisplay "disp('RUN')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name " Run"
Location [14, 552, 453, 680]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "148"
AutoZoom on
Annotation {
Position [140, 64]
Text " Double click the <RUN> block to enter the "
"machine\nparameters and run the simulation"
FontName "Arial"
FontSize 11
}
Annotation {
Position [145, 20]
Text "This demo illustrates the generation of the"
" V_ and C_curves\nof a synchronous machine"
}
}
}
Block {
BlockType Reference
Name "Algebraic Constraint"
Ports [1, 1, 0, 0, 0]
Position [250, 30, 320, 60]
ShowName off
SourceBlock "simulink3/Math/Algebraic Constraint"
SourceType "Algebraic Constraint"
z0 "1"
Port {
PortNumber 1
Name "id"
TestPoint off
RTWStorageClass "Auto"
}
}
Block {
BlockType Reference
Name "Algebraic Constraint1"
Ports [1, 1, 0, 0, 0]
Position [250, 140, 320, 170]
ShowName off
SourceBlock "simulink3/Math/Algebraic Constraint"
SourceType "Algebraic Constraint"
z0 ".1"
}
Block {
BlockType Reference
Name "Algebraic Constraint2"
Ports [1, 1, 0, 0, 0]
Position [250, 85, 320, 115]
ShowName off
SourceBlock "simulink3/Math/Algebraic Constraint"
SourceType "Algebraic Constraint"
z0 "1"
}
Block {
BlockType Constant
Name "Ef"
Position [15, 25, 45, 55]
NamePlacement "alternate"
Value "Ef"
}
Block {
BlockType Fcn
Name "Fcn"
Position [175, 30, 220, 60]
ShowName off
Expr "Ra*u(3)-Xq*u(4)+Vs*sin(u(5))"
}
Block {
BlockType Fcn
Name "Fcn1"
Position [175, 85, 220, 115]
ShowName off
Expr "Xd*u(3)+Ra*u(4)-Vs*cos(u(5))+u(1)"
}
Block {
BlockType Fcn
Name "Fcn2"
Position [175, 140, 220, 170]
ShowName off
Expr "u(1)*u(4)+(Xd-Xq)*u(3)*u(4)-u(2)"
}
Block {
BlockType Mux
Name "Mux"
Ports [5, 1, 0, 0, 0]
Position [110, 47, 115, 153]
ShowName off
Inputs "5"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux1"
Ports [2, 1, 0, 0, 0]
Position [400, 19, 405, 126]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Constant
Name "Tl"
Position [15, 65, 45, 95]
Value "Tl"
}
Block {
BlockType Fcn
Name "mag"
Position [425, 60, 465, 90]
Expr "sqrt(u(1)^2+u(2)^2)"
}
Block {
BlockType Outport
Name "Current"
Position [505, 68, 535, 82]
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Outport
Name "delta"
Position [505, 148, 535, 162]
Port "2"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "Mux"
SrcPort 1
Points [20, 0]
Branch {
DstBlock "Fcn1"
DstPort 1
}
Branch {
Points [0, 55]
DstBlock "Fcn2"
DstPort 1
}
Branch {
Points [0, -55]
DstBlock "Fcn"
DstPort 1
}
}
Line {
SrcBlock "Ef"
SrcPort 1
Points [35, 0; 0, 20]
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Tl"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Fcn"
SrcPort 1
DstBlock "Algebraic Constraint"
DstPort 1
}
Line {
SrcBlock "Fcn1"
SrcPort 1
DstBlock "Algebraic Constraint2"
DstPort 1
}
Line {
SrcBlock "Fcn2"
SrcPort 1
DstBlock "Algebraic Constraint1"
DstPort 1
}
Line {
Name "id"
Labels [1, 0]
SrcBlock "Algebraic Constraint"
SrcPort 1
Points [55, 0]
Branch {
Points [0, 190; -335, 0; 0, -135]
DstBlock "Mux"
DstPort 3
}
Branch {
DstBlock "Mux1"
DstPort 1
}
}
Line {
SrcBlock "Algebraic Constraint2"
SrcPort 1
Points [35, 0]
Branch {
Points [0, 105; -295, 0; 0, -85]
DstBlock "Mux"
DstPort 4
}
Branch {
DstBlock "Mux1"
DstPort 2
}
}
Line {
SrcBlock "Algebraic Constraint1"
SrcPort 1
Points [20, 0]
Branch {
Points [0, 30; -265, 0; 0, -45]
DstBlock "Mux"
DstPort 5
}
Branch {
DstBlock "delta"
DstPort 1
}
}
Line {
SrcBlock "Mux1"
SrcPort 1
DstBlock "mag"
DstPort 1
}
Line {
SrcBlock "mag"
SrcPort 1
DstBlock "Current"
DstPort 1
}
Annotation {
Position [349, 99]
Text "iq\n"
}
Annotation {
Position [347, 148]
Text "delta"
}
Annotation {
Position [218, 259]
Text "V_curves of the synchronous machine"
FontSize 12
FontWeight "bold"
FontAngle "italic"
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?