📄 kalman.mdl
字号:
slope "1"
start "0"
X0 "0"
VectorParams1D on
}
Block {
BlockType RateTransition
Name "Rate Transition"
Position [95, 224, 135, 266]
}
Block {
BlockType RateTransition
Name "Rate Transition1"
Position [90, 399, 130, 441]
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [630, 249, 660, 281]
Floating off
Location [325, 194, 1133, 809]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
TimeRange "32"
YMin "-50"
YMax "50"
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType Sin
Name "Sine Wave1"
Ports [0, 1]
Position [60, 45, 90, 75]
SineType "Time based"
Amplitude "40"
Frequency "pi/8"
Phase "pi"
SampleTime "0"
}
Block {
BlockType Sin
Name "Sine Wave2"
Ports [0, 1]
Position [125, 25, 155, 55]
SineType "Time based"
Amplitude "40"
Frequency "pi/8"
Phase "pi/2"
SampleTime "0"
}
Block {
BlockType Constant
Name "YES"
Position [105, 465, 135, 495]
}
Block {
BlockType SubSystem
Name "kalman filter "
Ports [4, 3]
Position [420, 244, 535, 461]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
Array {
Type "Handle"
Dimension 0
PropName "AvailSigsLoadSave"
}
MaskHideContents off
MaskType "Stateflow"
MaskDescription "Embedded MATLAB block"
MaskDisplay "disp('kalkman');"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque off
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "kalman filter "
Location [257, 457, 812, 717]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "xi"
Position [20, 101, 40, 119]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "yi"
Position [20, 136, 40, 154]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "mask"
Position [20, 171, 40, 189]
Port "3"
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "nis"
Position [20, 206, 40, 224]
Port "4"
IconDisplay "Port number"
}
Block {
BlockType Demux
Name " Demux "
Ports [1, 1]
Position [270, 220, 320, 260]
Outputs "1"
}
Block {
BlockType "S-Function"
Name " SFunction "
Tag "Stateflow S-Function One_pulse1 2"
Ports [4, 4]
Position [180, 100, 230, 220]
FunctionName "sf_sfun"
PortCounts "[4 4]"
Port {
PortNumber 2
Name "xout"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
Port {
PortNumber 3
Name "xo"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
Port {
PortNumber 4
Name "off"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Terminator
Name " Terminator "
Position [460, 231, 480, 249]
}
Block {
BlockType Outport
Name "xout"
Position [460, 101, 480, 119]
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "xo"
Position [460, 136, 480, 154]
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "off"
Position [460, 171, 480, 189]
Port "3"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock " SFunction "
SrcPort 1
Points [0, 125]
DstBlock " Demux "
DstPort 1
}
Line {
SrcBlock " Demux "
SrcPort 1
DstBlock " Terminator "
DstPort 1
}
Line {
SrcBlock "xi"
SrcPort 1
Points [120, 0]
DstBlock " SFunction "
DstPort 1
}
Line {
Name "xout"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 2
DstBlock "xout"
DstPort 1
}
Line {
SrcBlock "yi"
SrcPort 1
DstBlock " SFunction "
DstPort 2
}
Line {
SrcBlock "mask"
SrcPort 1
DstBlock " SFunction "
DstPort 3
}
Line {
Name "xo"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 3
DstBlock "xo"
DstPort 1
}
Line {
Name "off"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 4
DstBlock "off"
DstPort 1
}
Line {
SrcBlock "nis"
SrcPort 1
DstBlock " SFunction "
DstPort 4
}
}
}
Block {
BlockType Reference
Name "key"
Ports [2, 1]
Position [205, 472, 235, 508]
SourceBlock "simulink/Signal\nRouting/Manual Switch"
SourceType "Manual Switch"
ShowPortLabels on
sw "0"
action "0"
}
Block {
BlockType SubSystem
Name "position_X"
Ports [1, 2, 0, 1]
Position [240, 132, 360, 263]
TreatAsAtomicUnit on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
Array {
Type "Handle"
Dimension 0
PropName "AvailSigsLoadSave"
}
MaskHideContents off
MaskType "Stateflow"
MaskDescription "Stateflow diagram"
MaskDisplay "plot(sf('Private','sfblk','xIcon'),sf('Private'"
",'sfblk','yIcon'));text(0.5,0,sf('Private', 'sfblk', 'tIcon'),'HorizontalAl',"
"'Center','VerticalAl','Bottom');"
MaskSelfModifiable on
MaskIconFrame off
MaskIconOpaque off
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "position_X"
Location [257, 457, 812, 717]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "sine"
Position [20, 101, 40, 119]
IconDisplay "Port number"
}
Block {
BlockType TriggerPort
Name "event"
Ports [0, 1]
Position [20, 136, 40, 154]
ShowOutputPort on
}
Block {
BlockType Demux
Name " Demux "
Ports [1, 1]
Position [270, 205, 320, 245]
Outputs "1"
}
Block {
BlockType "S-Function"
Name " SFunction "
Tag "Stateflow S-Function One_pulse1 1"
Ports [2, 3]
Position [180, 104, 230, 206]
FunctionName "sf_sfun"
PortCounts "[2 3]"
Port {
PortNumber 2
Name "x_out"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
Port {
PortNumber 3
Name "out"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Terminator
Name " Terminator "
Position [460, 216, 480, 234]
}
Block {
BlockType Outport
Name "x_out"
Position [460, 101, 480, 119]
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "out"
Position [460, 136, 480, 154]
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock " Demux "
SrcPort 1
DstBlock " Terminator "
DstPort 1
}
Line {
SrcBlock " SFunction "
SrcPort 1
Points [0, 105]
DstBlock " Demux "
DstPort 1
}
Line {
Name "x_out"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 2
DstBlock "x_out"
DstPort 1
}
Line {
SrcBlock "sine"
SrcPort 1
DstBlock " SFunction "
DstPort 1
}
Line {
Name "out"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 3
DstBlock "out"
DstPort 1
}
Line {
SrcBlock "event"
SrcPort 1
DstBlock " SFunction "
DstPort 2
}
}
}
Block {
BlockType SubSystem
Name "position_Y"
Ports [1, 2, 0, 1]
Position [240, 297, 360, 428]
TreatAsAtomicUnit on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
Array {
Type "Handle"
Dimension 0
PropName "AvailSigsLoadSave"
}
MaskHideContents off
MaskType "Stateflow"
MaskDescription "Stateflow diagram"
MaskDisplay "plot(sf('Private','sfblk','xIcon'),sf('Private'"
",'sfblk','yIcon'));text(0.5,0,sf('Private', 'sfblk', 'tIcon'),'HorizontalAl',"
"'Center','VerticalAl','Bottom');"
MaskSelfModifiable on
MaskIconFrame off
MaskIconOpaque off
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "position_Y"
Location [257, 457, 812, 717]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "sine"
Position [20, 101, 40, 119]
IconDisplay "Port number"
}
Block {
BlockType TriggerPort
Name "event"
Ports [0, 1]
Position [20, 136, 40, 154]
ShowOutputPort on
}
Block {
BlockType Demux
Name " Demux "
Ports [1, 1]
Position [270, 205, 320, 245]
Outputs "1"
}
Block {
BlockType "S-Function"
Name " SFunction "
Tag "Stateflow S-Function One_pulse1 4"
Ports [2, 3]
Position [180, 104, 230, 206]
FunctionName "sf_sfun"
PortCounts "[2 3]"
Port {
PortNumber 2
Name "x_out"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
Port {
PortNumber 3
Name "out"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Terminator
Name " Terminator "
Position [460, 216, 480, 234]
}
Block {
BlockType Outport
Name "x_out"
Position [460, 101, 480, 119]
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "out"
Position [460, 136, 480, 154]
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "event"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -