📄 motor_speed.mdl
字号:
ParameterDataTypeMode "Same as input"
ParameterDataType "fixdt(1,16,0)"
ParameterScalingMode "Best Precision: Matrix-wise"
ParameterScaling "[]"
ParamDataTypeStr "Inherit: Same as input"
OutMin "[]"
OutMax "[]"
OutDataTypeMode "Same as input"
OutDataType "fixdt(1,16,0)"
OutScaling "[]"
OutDataTypeStr "Inherit: Same as input"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Inport
Port "1"
UseBusObject off
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
OutMin "[]"
OutMax "[]"
DataType "auto"
OutDataType "fixdt(1,16,0)"
OutScaling "[]"
OutDataTypeStr "Inherit: auto"
SignalType "auto"
SamplingMode "auto"
LatchByDelayingOutsideSignal off
LatchByCopyingInsideSignal off
Interpolate on
}
Block {
BlockType Outport
Port "1"
UseBusObject off
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
OutMin "[]"
OutMax "[]"
DataType "auto"
OutDataType "fixdt(1,16,0)"
OutScaling "[]"
OutDataTypeStr "Inherit: auto"
SignalType "auto"
SamplingMode "auto"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Scope
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 "-1"
}
Block {
BlockType SubSystem
ShowPortLabels "FromPortIcon"
Permissions "ReadWrite"
PermitHierarchicalResolution "All"
TreatAsAtomicUnit off
CheckFcnCallInpInsideContextMsg off
SystemSampleTime "-1"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
Block {
BlockType Sum
IconShape "rectangular"
Inputs "++"
CollapseMode "All dimensions"
CollapseDim "1"
InputSameDT on
AccumDataTypeStr "Inherit: Inherit via internal rule"
OutMin "[]"
OutMax "[]"
OutDataTypeMode "Same as first input"
OutDataType "fixdt(1,16,0)"
OutScaling "[]"
OutDataTypeStr "Inherit: Same as first input"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Constant
Value "1"
VectorParams1D on
SamplingMode "Sample based"
OutMin "[]"
OutMax "[]"
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "fixdt(1,16,0)"
ConRadixGroup "Use specified scaling"
OutScaling "[]"
OutDataTypeStr "Inherit: Inherit from 'Constant value'"
SampleTime "inf"
FramePeriod "inf"
}
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
UseDisplayTextAsClickCallback off
}
LineDefaults {
FontName "Helvetica"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "motor_speed"
Location [850, 121, 1614, 674]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType DiscreteTransferFcn
Name "1/(Js+B)"
Position [510, 164, 600, 206]
Numerator "[0.000000000000000 33.314897187661735 ]"
Denominator "[1.000000000000000 -0.000553084370148 ]"
MaskType "DiscretizedDiscreteTransferFcn"
MaskInitialization "%zoh"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Block {
BlockType SubSystem
Name "1/(Ls+R)"
Ports [1, 1]
Position [220, 164, 295, 206]
MinAlgLoopOccurrences off
PropExecContextOutsideSubsystem off
RTWSystemCode "Auto"
FunctionWithSeparateData off
Opaque off
RequestExecContextInheritance off
MaskHideContents off
MaskType "DiscretizedTransferFcn"
MaskDescription "Continuous mask uses c2d to transform parameters onto the Discrete Transfer function block inside."
MaskPromptString "Numerator (enter in s-domain:)|Denominator (enter in s-domain:)|Absolute tolerance:|Sample time:|Method:|Critical Frequency (Hz):"
MaskStyleString "edit,edit,edit,edit,popup(zoh|foh|tustin|prewarp|matched),edit"
MaskTunableValueString "on,on,on,on,on,on"
MaskCallbackString "||||hidecrit|"
MaskEnableString "on,on,on,on,on,on"
MaskVisibilityString "on,on,on,on,on,off"
MaskToolTipString "on,on,on,on,on,on"
MaskVarAliasString ",,,,,"
MaskVariables "Numerator=@1;Denominator=@2;AbsTol=&3;SampleTime=@4;method=&5;Wc=@6;"
MaskInitialization "st=SampleTime;\nif length(st)>1\n st=SampleTime(1);\nend\nif(st>0)\n [numd,dend] = sldiscutil('disctransferfcn',{st,method,Wc,Numerator,Denominator});\nend \ns = get_param(gcb,'maskvalues');\nnums = s{1};\ndens = s{2};\n%numc = eval(nums);\n%denc = eval(dens);\nsldiscutil('inittfmask', st);\nif(st==0)\nset_param([gcb '/Transfer Fcn'], 'AbsoluteTolerance', AbsTol);\nend"
MaskDisplay "dpoly(nums,dens)\ntext( 0.5, 1.0, method, 'verticalAlignment','top')"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "port"
MaskIconUnits "normalized"
MaskValueString "[1]|[0.0015 8]|auto|1.0|zoh|1"
MaskTabNameString ",,,,,"
System {
Name "1/(Ls+R)"
Location [129, 251, 421, 508]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [60, 103, 90, 117]
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType DiscreteTransferFcn
Name "Discrete\nTransfer Fcn"
Position [115, 92, 175, 128]
Numerator "numd"
Denominator "dend"
SampleTime "SampleTime"
}
Block {
BlockType Outport
Name "Out1"
Position [200, 103, 230, 117]
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Discrete\nTransfer Fcn"
DstPort 1
}
Line {
SrcBlock "Discrete\nTransfer Fcn"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType Constant
Name "Input\nSpeed"
Position [40, 155, 60, 175]
Value "10"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Gain
Name "Ke"
Position [375, 223, 420, 257]
Orientation "left"
Gain "1.18"
ParameterDataType "sfix(16)"
ParameterScaling "2^0"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Gain
Name "Kt"
Position [385, 168, 430, 202]
Gain "1.18"
ParameterDataType "sfix(16)"
ParameterScaling "2^0"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Scope
Name "Scope1"
Ports [1]
Position [195, 14, 225, 46]
Floating off
Location [516, 401, 840, 640]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
SaveName "ScopeData1"
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType Scope
Name "Scope2"
Ports [1]
Position [85, 44, 115, 76]
Floating off
Location [519, 434, 843, 673]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType Scope
Name "Scope3"
Ports [3]
Position [750, 124, 785, 196]
Floating off
Location [431, 401, 831, 784]
Open off
NumInputPorts "3"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
axes3 "%<SignalLabel>"
}
YMin "-5~-5~-5"
YMax "5~5~5"
SaveName "ScopeData2"
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [155, 167, 175, 203]
Inputs "+-"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [95, 157, 115, 193]
Inputs "+-"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Gain
Name "geribesleme"
Position [385, 285, 415, 315]
Orientation "left"
Gain "10"
ParameterDataType "sfix(16)"
ParameterScaling "2^0"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Line {
SrcBlock "Kt"
SrcPort 1
Points [35, 0]
Branch {
DstBlock "1/(Js+B)"
DstPort 1
}
Branch {
Points [0, -50]
DstBlock "Scope3"
DstPort 1
}
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "1/(Ls+R)"
DstPort 1
}
Line {
SrcBlock "1/(Ls+R)"
SrcPort 1
Points [15, 0]
Branch {
DstBlock "Kt"
DstPort 1
}
Branch {
Points [0, -90; 365, 0; 0, 65]
DstBlock "Scope3"
DstPort 2
}
}
Line {
SrcBlock "Ke"
SrcPort 1
Points [-230, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "1/(Js+B)"
SrcPort 1
Points [50, 0]
Branch {
Points [0, 55]
Branch {
DstBlock "Ke"
DstPort 1
}
Branch {
Points [0, 60]
DstBlock "geribesleme"
DstPort 1
}
}
Branch {
DstBlock "Scope3"
DstPort 3
}
}
Line {
SrcBlock "Input\nSpeed"
SrcPort 1
Points [5, 0]
Branch {
DstBlock "Sum2"
DstPort 1
}
Branch {
DstBlock "Scope2"
DstPort 1
}
}
Line {
SrcBlock "geribesleme"
SrcPort 1
Points [-300, 0]
DstBlock "Sum2"
DstPort 2
}
Line {
SrcBlock "Sum2"
SrcPort 1
Points [5, 0]
Branch {
Points [0, -145]
DstBlock "Scope1"
DstPort 1
}
Branch {
DstBlock "Sum"
DstPort 1
}
}
Annotation {
Name "ters emk"
Position [227, 227]
VerticalAlignment "top"
}
Annotation {
Name "hiz"
Position [627, 164]
VerticalAlignment "top"
}
Annotation {
Name "tork"
Position [447, 162]
VerticalAlignment "top"
}
Annotation {
Name "akim"
Position [342, 167]
VerticalAlignment "top"
}
Annotation {
Name "kazanci"
Position [407, 338]
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -