📄 simulation.mdl
字号:
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType "S-Function"
FunctionName "system"
PortCounts "[]"
SFunctionModules "''"
}
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, 929, 701]
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 [240, 85, 270, 115]
Time "0"
After "10"
}
Block {
BlockType Clock
Name "Clock"
Position [155, 280, 175, 300]
Decimation "1"
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [535, 496, 540, 534]
Orientation "left"
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Relay
Name "Relay"
Position [405, 90, 435, 120]
OffOutputValue "-1"
}
Block {
BlockType Relay
Name "Relay1"
Position [410, 150, 440, 180]
OffOutputValue "-1"
}
Block {
BlockType Scope
Name "Scope13"
Ports [2]
Position [475, 16, 505, 49]
Location [5, 54, 1029, 737]
Open off
NumInputPorts "2"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
}
YMin "-1~-1"
YMax "1~1"
SaveName "ScopeData23"
DataFormat "StructureWithTime"
}
Block {
BlockType Scope
Name "Scope4"
Ports [3]
Position [640, 24, 670, 56]
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 [245, 150, 275, 180]
Time "0"
}
Block {
BlockType SubSystem
Name "Subsystem3"
Ports [1, 1]
Position [585, 364, 650, 506]
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 [335, 95, 355, 115]
ShowName off
IconShape "round"
Inputs "+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [365, 155, 385, 175]
ShowName off
IconShape "round"
Inputs "+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType ToWorkspace
Name "To Workspace3"
Position [215, 275, 275, 305]
VariableName "t"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType Scope
Name "ce"
Ports [1]
Position [890, 309, 920, 341]
Location [-6, 137, 318, 376]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
YMin "23.5"
YMax "30.5"
SaveName "ScopeData14"
DataFormat "StructureWithTime"
}
Block {
BlockType Scope
Name "ce1"
Ports [1]
Position [600, 584, 630, 616]
Orientation "left"
Location [188, 355, 512, 594]
Open on
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
YMin "-125"
YMax "225"
SaveName "ScopeData1"
DataFormat "StructureWithTime"
}
Block {
BlockType SubSystem
Name "estimation"
Ports [4, 4]
Position [695, 398, 755, 627]
Orientation "left"
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "estimation"
Location [2, 85, 757, 402]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "vqs"
Position [35, 73, 65, 87]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "vds"
Position [30, 38, 60, 52]
Port "2"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "ids"
Position [25, 113, 55, 127]
Port "3"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "iqs"
Position [30, 153, 60, 167]
Port "4"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Sum
Name "Add"
Ports [2, 1]
Position [555, 222, 585, 253]
Inputs "-+"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Add1"
Ports [2, 1]
Position [205, 107, 235, 138]
Inputs "+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Add2"
Ports [2, 1]
Position [205, 37, 235, 68]
Inputs "+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType Fcn
Name "Fcn"
Position [525, 130, 585, 160]
Expr "sqrt(u[1]*u[1]+u[2]*u[2])"
}
Block {
BlockType Gain
Name "Gain1"
Position [120, 55, 150, 85]
Gain "4.85"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain2"
Position [120, 120, 150, 150]
Gain "4.85"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain4"
Position [610, 230, 640, 260]
Gain "2"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Integrator
Name "Integrator"
Ports [1, 1]
Position [275, 47, 305, 83]
ZeroCross off
}
Block {
BlockType Integrator
Name "Integrator1"
Ports [1, 1]
Position [285, 109, 315, 141]
ZeroCross off
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [450, 91, 455, 129]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [445, 262, 475, 293]
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Product
Name "Product1"
Ports [2, 1]
Position [445, 197, 475, 228]
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Outport
Name "fsd"
Position [600, 28, 630, 42]
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "fsq"
Position [600, 78, 630, 92]
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "mod_f"
Position [615, 143, 645, 157]
Port "3"
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "cem1"
Position [700, 238, 730, 252]
Port "4"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Mux"
SrcPort 1
Points [25, 0; 0, 35]
DstBlock "Fcn"
DstPort 1
}
Line {
SrcBlock "Fcn"
SrcPort 1
Points [5, 0; 0, 5]
DstBlock "mod_f"
DstPort 1
}
Line {
SrcBlock "ids"
SrcPort 1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -