📄 simulation.mdl
字号:
Block {
BlockType Step
Time "1"
Before "0"
After "1"
SampleTime "-1"
VectorParams1D on
ZeroCross on
}
Block {
BlockType SubSystem
ShowPortLabels on
Permissions "ReadWrite"
PermitHierarchicalResolution "All"
SystemSampleTime "-1"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
Block {
BlockType Sum
IconShape "rectangular"
Inputs "++"
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType ToWorkspace
VariableName "simulink_output"
MaxDataPoints "1000"
Decimation "1"
SampleTime "0"
FixptAsFi off
}
}
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 "simulation"
Location [2, 82, 1014, 718]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Step
Name "CEM"
Position [130, 95, 160, 125]
Time "0"
After "10"
}
Block {
BlockType Clock
Name "Clock"
Position [70, 280, 90, 300]
Decimation "1"
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [800, 386, 805, 424]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Relay
Name "Relay"
Position [295, 95, 325, 125]
OffSwitchValue "-eps"
}
Block {
BlockType Relay
Name "Relay1"
Position [300, 160, 330, 190]
OffSwitchValue "-eps"
}
Block {
BlockType Scope
Name "Scope13"
Ports [2]
Position [385, 26, 415, 59]
Location [5, 54, 1029, 737]
Open off
NumInputPorts "2"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
}
YMin "0~-5"
YMax "1~5"
SaveName "ScopeData23"
DataFormat "StructureWithTime"
}
Block {
BlockType Scope
Name "Scope4"
Ports [3]
Position [520, 34, 550, 66]
Location [5, 54, 1029, 737]
Open off
NumInputPorts "3"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
axes3 "%<SignalLabel>"
}
TimeRange "1"
YMin "-1~-5~-5"
YMax "1~5~5"
SaveName "ScopeData12"
DataFormat "StructureWithTime"
}
Block {
BlockType Step
Name "Step1"
Position [135, 160, 165, 190]
Time "0"
}
Block {
BlockType SubSystem
Name "Subsystem2"
Ports [3, 3]
Position [420, 95, 470, 295]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "Subsystem2"
Location [2, 89, 950, 576]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 33, 55, 47]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "In2"
Position [25, 43, 55, 57]
Port "2"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "In3"
Position [25, 53, 55, 67]
Port "3"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Demux
Name "Demux"
Ports [1, 3]
Position [225, 26, 230, 64]
BackgroundColor "black"
ShowName off
Outputs "3"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux"
Ports [3, 1]
Position [80, 31, 85, 69]
ShowName off
Inputs "3"
DisplayOption "bar"
}
Block {
BlockType "S-Function"
Name "S-Function"
Ports [1, 1]
Position [140, 35, 200, 65]
FunctionName "intr"
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [310, 114, 340, 146]
Location [188, 355, 512, 594]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
YMin "-1"
YMax "1"
SaveName "ScopeData4"
DataFormat "StructureWithTime"
}
Block {
BlockType Scope
Name "Scope1"
Ports [1]
Position [370, 174, 400, 206]
Location [188, 355, 512, 594]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
YMin "-1"
YMax "1"
SaveName "ScopeData18"
DataFormat "StructureWithTime"
}
Block {
BlockType Outport
Name "Out1"
Position [265, 18, 295, 32]
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "Out2"
Position [320, 38, 350, 52]
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "Out3"
Position [255, 68, 285, 82]
Port "3"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "S-Function"
DstPort 1
}
Line {
SrcBlock "S-Function"
SrcPort 1
Points [-5, 0; 0, -5]
DstBlock "Demux"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 1
Points [15, 0]
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 2
Points [5, 0]
Branch {
DstBlock "Out2"
DstPort 1
}
Branch {
Points [0, 145]
DstBlock "Scope1"
DstPort 1
}
}
Line {
SrcBlock "In2"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Demux"
SrcPort 3
Points [5, 0]
Branch {
DstBlock "Out3"
DstPort 1
}
Branch {
Points [0, 75]
DstBlock "Scope"
DstPort 1
}
}
Line {
SrcBlock "In3"
SrcPort 1
DstBlock "Mux"
DstPort 3
}
}
}
Block {
BlockType SubSystem
Name "Subsystem3"
Ports [1, 1]
Position [475, 374, 540, 516]
Orientation "left"
NamePlacement "alternate"
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "Subsystem3"
Location [2, 82, 1014, 718]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "theta_s"
Position [25, 33, 55, 47]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType "S-Function"
Name "S-Function"
Ports [1, 1]
Position [100, 35, 160, 65]
FunctionName "gr"
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [255, 104, 285, 136]
Location [31, 239, 355, 478]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
YMin "0.95"
YMax "1.05"
SaveName "ScopeData5"
DataFormat "StructureWithTime"
}
Block {
BlockType Scope
Name "Scope1"
Ports [1]
Position [110, 114, 140, 146]
Location [188, 355, 512, 594]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
YMin "2.0087"
YMax "2.22014"
SaveName "ScopeData25"
DataFormat "StructureWithTime"
}
Block {
BlockType Outport
Name "N1"
Position [290, 43, 320, 57]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "S-Function"
SrcPort 1
Points [-5, -10; 10, 0]
Branch {
Points [105, 0]
DstBlock "N1"
DstPort 1
}
Branch {
Points [0, 80]
DstBlock "Scope"
DstPort 1
}
}
Line {
SrcBlock "theta_s"
SrcPort 1
Points [0, 0; 20, 0]
Branch {
Points [0, 90]
DstBlock "Scope1"
DstPort 1
}
Branch {
Points [5, 0]
DstBlock "S-Function"
DstPort 1
}
}
}
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [225, 110, 245, 130]
ShowName off
IconShape "round"
Inputs "+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [255, 165, 275, 185]
ShowName off
IconShape "round"
Inputs "+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType ToWorkspace
Name "To Workspace1"
Position [930, 235, 990, 265]
VariableName "fsd"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace2"
Position [940, 295, 1000, 325]
VariableName "fsq"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace3"
Position [120, 275, 180, 305]
VariableName "t"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType Scope
Name "ce"
Ports [1]
Position [800, 179, 830, 211]
Location [188, 355, 512, 594]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
YMin "100"
YMax "110"
SaveName "ScopeData32"
DataFormat "StructureWithTime"
}
Block {
BlockType Scope
Name "fdr"
Ports [1]
Position [825, 104, 855, 136]
Location [475, 349, 799, 588]
Open off
NumInputPorts "1"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -