?? threedim_control.mdl
字號:
SrcBlock "Mux"
SrcPort 1
DstBlock "Fcn2"
DstPort 1
}
Line {
SrcBlock "Mux1"
SrcPort 1
DstBlock "Fcn1"
DstPort 1
}
Line {
SrcBlock "Fcn1"
SrcPort 1
DstBlock "Integrator4"
DstPort 1
}
Line {
SrcBlock "Integrator4"
SrcPort 1
DstBlock "Integrator1"
DstPort 1
}
Line {
SrcBlock "Force"
SrcPort 1
Points [30, 0]
Branch {
DstBlock "Mux1"
DstPort 1
}
Branch {
Points [0, 85]
DstBlock "Mux"
DstPort 1
}
}
Line {
SrcBlock "Integrator3"
SrcPort 1
Points [20, 0]
Branch {
DstBlock "Integrator2"
DstPort 1
}
Branch {
Points [0, -35; -270, 0]
Branch {
Points [0, -50]
DstBlock "Mux1"
DstPort 2
}
Branch {
Points [0, 35]
DstBlock "Mux"
DstPort 2
}
}
}
Line {
SrcBlock "Integrator2"
SrcPort 1
Points [20, 0]
Branch {
DstBlock "Angle"
DstPort 1
}
Branch {
Points [0, -50; -335, 0]
Branch {
Points [0, -25]
DstBlock "Mux1"
DstPort 3
}
Branch {
Points [0, 60]
DstBlock "Mux"
DstPort 3
}
}
}
}
}
Block {
BlockType Outport
Name "Position"
Position [275, 48, 305, 62]
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "Angle"
Position [275, 158, 305, 172]
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Pendulum X"
SrcPort 1
DstBlock "Mux1"
DstPort 1
}
Line {
SrcBlock "Pendulum Z"
SrcPort 1
Points [35, 0]
DstBlock "Mux1"
DstPort 2
}
Line {
SrcBlock "Pendulum Z"
SrcPort 2
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Pendulum X"
SrcPort 2
Points [10, 0; 0, 75]
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 1
DstBlock "Pendulum X"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 2
Points [20, 0; 0, 75]
DstBlock "Pendulum Z"
DstPort 1
}
Line {
SrcBlock "Mux1"
SrcPort 1
DstBlock "Position"
DstPort 1
}
Line {
SrcBlock "Force"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Angle"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Pole angle 3D\ntransformation"
Ports [1, 2]
Position [380, 65, 490, 120]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "Pole angle 3D\ntransformation"
Location [472, 223, 834, 475]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "2D angle"
Position [25, 73, 55, 87]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Constant
Name "Axis 1"
Position [115, 20, 145, 50]
Value "[ 1 0 0 ]"
}
Block {
BlockType Constant
Name "Axis 2"
Position [120, 120, 150, 150]
Value "[ 0 0 -1 ]"
}
Block {
BlockType Demux
Name "Demux3"
Ports [1, 2]
Position [90, 60, 95, 100]
BackgroundColor "black"
ShowName off
Outputs "2"
}
Block {
BlockType Mux
Name "Mux6"
Ports [2, 1]
Position [190, 126, 195, 159]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux7"
Ports [2, 1]
Position [185, 36, 190, 69]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Outport
Name "3D angle 1"
Position [220, 48, 250, 62]
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "3D angle 2"
Position [220, 138, 250, 152]
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Axis 1"
SrcPort 1
Points [20, 0]
DstBlock "Mux7"
DstPort 1
}
Line {
SrcBlock "Axis 2"
SrcPort 1
DstBlock "Mux6"
DstPort 1
}
Line {
SrcBlock "2D angle"
SrcPort 1
DstBlock "Demux3"
DstPort 1
}
Line {
SrcBlock "Mux7"
SrcPort 1
DstBlock "3D angle 1"
DstPort 1
}
Line {
SrcBlock "Demux3"
SrcPort 1
Points [70, 0]
DstBlock "Mux7"
DstPort 2
}
Line {
SrcBlock "Demux3"
SrcPort 2
Points [65, 0; 0, 60]
DstBlock "Mux6"
DstPort 2
}
Line {
SrcBlock "Mux6"
SrcPort 1
DstBlock "3D angle 2"
DstPort 1
}
}
}
Block {
BlockType RandomNumber
Name "Random\nNumber"
Position [410, 250, 440, 280]
Mean "[0 0]"
Variance "[5 5]"
Seed "[0 5]"
SampleTime "3"
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [65, 175, 85, 195]
ShowName off
IconShape "round"
Inputs "-+"
}
Block {
BlockType Sum
Name "Sum4"
Ports [2, 1]
Position [170, 210, 190, 230]
ShowName off
IconShape "round"
}
Block {
BlockType SubSystem
Name "Trajectory\nGraph"
Ports [2, 1]
Position [500, 241, 530, 274]
CopyFcn "sfuntraj([],[],[],'CopyBlock')"
DeleteFcn "sfuntraj([],[],[],'DeleteBlock')"
LoadFcn "sfuntraj([],[],[],'LoadBlock')"
StartFcn "sfuntraj([],[],[],'Start')"
StopFcn "sfuntraj([],[],[],'Stop')"
NameChangeFcn "sfuntraj([],[],[],'NameChange')"
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskType "Trajectory scope."
MaskDescription "Trajectory scope using MATLAB graph window. Ent"
"er plotting ranges."
MaskHelp "This block can be used to explore limit cycles."
" Look at the m-file sfuntraj.m to see how it works."
MaskPromptString "x-min:|x-max:|y-min:|y-max:|Sample time:|Setpoi"
"nt mode"
MaskStyleString "edit,edit,edit,edit,edit,popup(Mouse|Input sign"
"al|VR sensor)"
MaskTunableValueString "on,on,on,on,on,on"
MaskCallbackString "|||||"
MaskEnableString "on,on,on,on,on,on"
MaskVisibilityString "on,on,on,on,on,on"
MaskToolTipString "on,on,on,on,on,on"
MaskVarAliasString ",,,,,"
MaskVariables "xmin=@1;xmax=@2;ymin=@3;ymax=@4;Ts=@5;mode=@6;"
MaskDisplay "plot([.05 .95 .95 .05 .05],[.45 .45 .95 .95 .45"
"], 0.5+cos(0:0.1:2*pi)*0.3,0.7+sin(0:0.1:2*pi)*0.2)"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "normalized"
MaskValueString "-10|10|-10|10|0.2|VR sensor"
MaskTabNameString ",,,,,"
System {
Name "Trajectory\nGraph"
Location [104, 93, 460, 244]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "data"
Position [25, 27, 55, 43]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "setpoint"
Position [25, 77, 55, 93]
Port "2"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [105, 27, 110, 63]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Constant
Name "Setpoint"
Position [110, 84, 180, 116]
Value "[-0.15024 -0.065534]"
}
Block {
BlockType "S-Function"
Name "sfuntraj"
Ports [1]
Position [125, 35, 175, 55]
ShowName off
FunctionName "sfuntraj"
Parameters "[xmin xmax ymin ymax], Ts, mode"
}
Block {
BlockType Outport
Name "mouse"
Position [220, 93, 250, 107]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "setpoint"
SrcPort 1
Points [15, 0; 0, -30]
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "data"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "sfuntraj"
DstPort 1
}
Line {
SrcBlock "Setpoint"
SrcPort 1
DstBlock "mouse"
DstPort 1
}
}
}
Block {
BlockType Reference
Name "VR Sink"
Ports [4]
Position [530, 23, 645, 172]
SourceBlock "vrlib/VR Sink"
SourceType "Virtual Reality Sink"
SampleTime "0.2"
ViewEnable on
RemoteChange off
RemoteView off
FieldsWritten "Pendulum.translation.3.1.double#Pole1.rotation."
"4.1.double#Pole2.rotation.4.1.double#Marker.translation.3.1.double"
WorldFileName "vrpend.wrl"
AutoView on
FigureProperties "{'Position', 'Name', 'Viewpoint', 'CameraBound'"
", 'CameraDirection', 'CameraPosition', 'CameraUpVector', 'ZoomFactor', 'Antia"
"liasing', 'Headlight', 'Lighting', 'NavPanel', 'StatusBar', 'ToolBar', 'Textu"
"res', 'Transparency', 'Wireframe', 'NavZones', 'NavMode', 'NavSpeed', 'Record"
"2DCompressMethod', 'Record2DCompressQuality', 'Record2D', 'Record2DFileName';"
" [-3.2000000000000000e+004 -3.1974000000000000e+004 1.0240000000000000e+003 "
" 5.8200000000000000e+002], 'Inverted Pendulum', 'Pseudo orthographic view', '"
"on', [0.0000000000000000e+000 0.0000000000000000e+000 -1.0000000000000000e+0"
"00], [0.0000000000000000e+000 0.0000000000000000e+000 0.0000000000000000e+0"
"00], [0.0000000000000000e+000 1.0000000000000000e+000 0.0000000000000000e+0"
"00], [1.0000000000000000e+000], 'off', 'on', 'on', 'halfbar', 'on', 'on', 'on"
"', 'on', 'off', 'off', 'examine', 'normal', 'auto', [7.5000000000000000e+001]"
", 'off', '%f_anim_%n.avi'} "
}
Line {
SrcBlock "Sum4"
SrcPort 1
DstBlock "Pendulum 2D"
DstPort 1
}
Line {
SrcBlock "2-dimensional\nAngle\nController"
SrcPort 1
Points [-60, 0]
DstBlock "Sum4"
DstPort 2
}
Line {
SrcBlock "2-dimensional\nPosition\nController"
SrcPort 1
Points [30, 0]
DstBlock "Sum4"
DstPort 1
}
Line {
SrcBlock "Sum2"
SrcPort 1
DstBlock "2-dimensional\nPosition\nController"
DstPort 1
}
Line {
SrcBlock "Pendulum 2D"
SrcPort 2
Points [0, 0; 30, 0]
Branch {
Points [0, 55]
DstBlock "2-dimensional\nAngle\nController"
DstPort 1
}
Branch {
Points [0, -140]
DstBlock "Pole angle 3D\ntransformation"
DstPort 1
}
}
Line {
SrcBlock "Pendulum 2D"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
Points [0, -50; -250, 0]
Branch {
DstBlock "Sum2"
DstPort 1
}
Branch {
Points [0, -80]
DstBlock "Coordinates 3D\ntransformation"
DstPort 2
}
}
Branch {
Points [145, 0; 0, 50]
DstBlock "Trajectory\nGraph"
DstPort 1
}
}
Line {
SrcBlock "Trajectory\nGraph"
SrcPort 1
Points [50, 0; 0, 95; -525, 0; 0, -145]
Branch {
DstBlock "Sum2"
DstPort 2
}
Branch {
Points [-25, 0; 0, -165]
DstBlock "Coordinates 3D\ntransformation"
DstPort 1
}
}
Line {
SrcBlock "Random\nNumber"
SrcPort 1
DstBlock "Trajectory\nGraph"
DstPort 2
}
Line {
SrcBlock "Coordinates 3D\ntransformation"
SrcPort 2
Points [80, 0; 0, 80]
DstBlock "VR Sink"
DstPort 4
}
Line {
SrcBlock "Coordinates 3D\ntransformation"
SrcPort 1
DstBlock "VR Sink"
DstPort 1
}
Line {
SrcBlock "Pole angle 3D\ntransformation"
SrcPort 1
DstBlock "VR Sink"
DstPort 2
}
Line {
SrcBlock "Pole angle 3D\ntransformation"
SrcPort 2
Points [10, 0; 0, 10]
DstBlock "VR Sink"
DstPort 3
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -