📄 quadrotorsim.mdl
字号:
SrcPort 1
DstBlock "Mux"
DstPort 3
}
Annotation {
Name "Quadrotor yaw Model"
Position [283, 20]
ForegroundColor "blue"
UseDisplayTextAsClickCallback off
FontName "Arial"
FontSize 12
FontWeight "bold"
}
}
}
Block {
BlockType SubSystem
Name "Vision System"
Ports [2, 1]
Position [330, 221, 415, 259]
Orientation "left"
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "Vision System"
Location [287, 417, 728, 662]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "quad"
Position [50, 53, 80, 67]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "target"
Position [55, 108, 85, 122]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Goto
Name "Goto1"
Position [340, 150, 400, 180]
GotoTag "camera"
TagVisibility "global"
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [150, 31, 155, 144]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType "S-Function"
Name "S-Function3"
Ports [1, 1]
Position [185, 75, 285, 105]
ShowName off
FunctionName "camera"
Parameters "C"
}
Block {
BlockType Outport
Name "cam"
Position [340, 83, 370, 97]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "S-Function3"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
Points [0, 75]
DstBlock "Goto1"
DstPort 1
}
Branch {
DstBlock "cam"
DstPort 1
}
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "S-Function3"
DstPort 1
}
Line {
SrcBlock "quad"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "target"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
}
}
Block {
BlockType SubSystem
Name "plotting\nroutines"
Ports []
Position [500, 28, 560, 98]
ForegroundColor "red"
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "plotting\nroutines"
Location [997, 472, 1518, 1075]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType From
Name "Controls"
Position [120, 461, 160, 489]
CloseFcn "tagdialog Close"
GotoTag "u"
}
Block {
BlockType From
Name "Desired State"
Position [125, 406, 165, 434]
CloseFcn "tagdialog Close"
GotoTag "xd"
}
Block {
BlockType From
Name "Estimated State"
Position [125, 351, 165, 379]
CloseFcn "tagdialog Close"
GotoTag "xhat"
}
Block {
BlockType Mux
Name "Mux"
Ports [3, 1]
Position [260, 68, 265, 262]
ShowName off
Inputs "3"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux1"
Ports [4, 1]
Position [260, 284, 265, 501]
ShowName off
DisplayOption "bar"
}
Block {
BlockType "S-Function"
Name "S-Function"
Ports [1]
Position [350, 151, 425, 179]
ShowName off
FunctionName "plotQuadrotor"
Parameters "C"
}
Block {
BlockType "S-Function"
Name "S-Function1"
Ports [1]
Position [360, 380, 480, 410]
ShowName off
FunctionName "plotQuadStateVariables"
Parameters "Ts,C"
}
Block {
BlockType From
Name "State"
Position [45, 86, 85, 114]
CloseFcn "tagdialog Close"
GotoTag "x"
}
Block {
BlockType ZeroOrderHold
Name "Zero-Order\nHold"
Position [290, 146, 325, 184]
ShowName off
SampleTime "2*Ts"
}
Block {
BlockType ZeroOrderHold
Name "Zero-Order\nHold1"
Position [300, 376, 335, 414]
ShowName off
SampleTime "Ts"
}
Block {
BlockType From
Name "camera"
Position [170, 151, 230, 179]
CloseFcn "tagdialog Close"
GotoTag "camera"
}
Block {
BlockType From
Name "target"
Position [170, 216, 230, 244]
CloseFcn "tagdialog Close"
GotoTag "target"
}
Line {
SrcBlock "State"
SrcPort 1
Points [0, 0]
Branch {
Points [0, 210]
DstBlock "Mux1"
DstPort 1
}
Branch {
DstBlock "Mux"
DstPort 1
}
}
Line {
SrcBlock "Zero-Order\nHold"
SrcPort 1
DstBlock "S-Function"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Zero-Order\nHold"
DstPort 1
}
Line {
SrcBlock "Desired State"
SrcPort 1
DstBlock "Mux1"
DstPort 3
}
Line {
SrcBlock "Controls"
SrcPort 1
DstBlock "Mux1"
DstPort 4
}
Line {
SrcBlock "Zero-Order\nHold1"
SrcPort 1
DstBlock "S-Function1"
DstPort 1
}
Line {
SrcBlock "Mux1"
SrcPort 1
DstBlock "Zero-Order\nHold1"
DstPort 1
}
Line {
SrcBlock "Estimated State"
SrcPort 1
DstBlock "Mux1"
DstPort 2
}
Line {
SrcBlock "target"
SrcPort 1
DstBlock "Mux"
DstPort 3
}
Line {
SrcBlock "camera"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Annotation {
Name "UAV Visualization"
Position [228, 35]
ForegroundColor "blue"
UseDisplayTextAsClickCallback off
FontName "Arial"
FontSize 12
FontWeight "bold"
}
}
}
Block {
BlockType SubSystem
Name "target motion"
Ports [0, 1]
Position [460, 236, 530, 264]
Orientation "left"
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "target motion"
Location [482, 257, 1041, 791]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Goto
Name "Goto1"
Position [360, 285, 420, 315]
GotoTag "target"
TagVisibility "global"
}
Block {
BlockType Mux
Name "Mux"
Ports [4, 1]
Position [255, 23, 260, 507]
ShowName off
DisplayOption "bar"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [145, 315, 165, 335]
ShowName off
IconShape "round"
Inputs "|++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType SignalGenerator
Name "Target North\nlocation"
Ports [0, 1]
Position [40, 70, 70, 100]
WaveForm "square"
Amplitude ".1"
Frequency ".08"
}
Block {
BlockType SignalGenerator
Name "Target down"
Ports [0, 1]
Position [45, 310, 75, 340]
WaveForm "square"
Amplitude "-0.125"
Frequency ".1"
}
Block {
BlockType Constant
Name "Target down_"
Position [133, 375, 177, 405]
Orientation "up"
Value "-0.126"
}
Block {
BlockType Constant
Name "Target east location"
Position [40, 190, 70, 220]
Value "0"
}
Block {
BlockType SignalGenerator
Name "Target heading\n(from North)"
Ports [0, 1]
Position [45, 430, 75, 460]
WaveForm "square"
Amplitude "0.25"
Frequency ".05"
}
Block {
BlockType Outport
Name "[tn; te; td; tpsi]"
Position [385, 258, 415, 272]
NamePlacement "alternate"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Target North\nlocation"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Target east location"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Target heading\n(from North)"
SrcPort 1
DstBlock "Mux"
DstPort 4
}
Line {
SrcBlock "Target down_"
SrcPort 1
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Target down"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
Points [55, 0]
Branch {
DstBlock "[tn; te; td; tpsi]"
DstPort 1
}
Branch {
Points [0, 35]
DstBlock "Goto1"
DstPort 1
}
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Mux"
DstPort 3
}
Annotation {
Position [89, 81]
UseDisplayTextAsClickCallback off
}
}
}
Line {
SrcBlock "Quadrotor"
SrcPort 1
Points [130, 0; 0, 155; -415, 0; 0, -155]
DstBlock "Autopilot"
DstPort 1
}
Line {
SrcBlock "Autopilot"
SrcPort 1
DstBlock "Quadrotor"
DstPort 1
}
Line {
SrcBlock "Vision System"
SrcPort 1
Points [-170, 0; 0, -70]
DstBlock "Autopilot"
DstPort 2
}
Line {
SrcBlock "Quadrotor"
SrcPort 2
Points [15, 0; 0, 55]
DstBlock "Vision System"
DstPort 1
}
Line {
SrcBlock "target motion"
SrcPort 1
DstBlock "Vision System"
DstPort 2
}
Annotation {
Name "Quadrotor Simulation\nBYU ECEn 483 / ME431"
Position [298, 35]
ForegroundColor "blue"
UseDisplayTextAsClickCallback off
FontName "Arial"
FontSize 12
FontWeight "bold"
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -