📄 kalman.mdl
字号:
SrcPort 1
DstBlock " SFunction "
DstPort 2
}
Line {
Name "out"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 3
DstBlock "out"
DstPort 1
}
Line {
SrcBlock "sine"
SrcPort 1
DstBlock " SFunction "
DstPort 1
}
Line {
Name "x_out"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 2
DstBlock "x_out"
DstPort 1
}
Line {
SrcBlock " SFunction "
SrcPort 1
Points [0, 105]
DstBlock " Demux "
DstPort 1
}
Line {
SrcBlock " Demux "
SrcPort 1
DstBlock " Terminator "
DstPort 1
}
}
}
Line {
Labels [4, 0]
SrcBlock "kalman filter "
SrcPort 2
Points [5, 0; 0, -35; 25, 0]
DstBlock "Mux2"
DstPort 2
}
Line {
SrcBlock "key"
SrcPort 1
Points [165, 0]
DstBlock "kalman filter "
DstPort 3
}
Line {
SrcBlock "YES"
SrcPort 1
Points [0, 0]
DstBlock "key"
DstPort 1
}
Line {
SrcBlock "NO"
SrcPort 1
Points [0, 0]
DstBlock "key"
DstPort 2
}
Line {
SrcBlock "Add"
SrcPort 1
Points [0, 0]
DstBlock "position_X"
DstPort 1
}
Line {
SrcBlock "Band-Limited\nWhite Noise"
SrcPort 1
DstBlock "Rate Transition"
DstPort 1
}
Line {
SrcBlock "Rate Transition"
SrcPort 1
Points [0, -40]
DstBlock "Add"
DstPort 2
}
Line {
SrcBlock "Pulse\nGenerator"
SrcPort 1
Points [0, 0; 140, 0]
Branch {
DstBlock "position_X"
DstPort trigger
}
Branch {
Points [85, 0; 0, 170]
DstBlock "position_Y"
DstPort trigger
}
}
Line {
SrcBlock "kalman filter "
SrcPort 3
Points [5, 0; 0, -60]
DstBlock "Mux2"
DstPort 3
}
Line {
SrcBlock "Band-Limited\nWhite Noise1"
SrcPort 1
DstBlock "Rate Transition1"
DstPort 1
}
Line {
SrcBlock "position_X"
SrcPort 1
Points [40, 0]
DstBlock "kalman filter "
DstPort 1
}
Line {
SrcBlock "kalman filter "
SrcPort 1
Points [5, 0; 0, -225]
DstBlock "Display"
DstPort 1
}
Line {
SrcBlock "Mux2"
SrcPort 1
DstBlock "Scope"
DstPort 1
}
Line {
SrcBlock "position_Y"
SrcPort 1
Points [0, -5; 25, 0]
Branch {
DstBlock "kalman filter "
DstPort 2
}
Branch {
Points [0, -120; 35, 0; 0, -40]
DstBlock "Mux2"
DstPort 1
}
}
Line {
SrcBlock "Rate Transition1"
SrcPort 1
Points [10, 0; 0, -50]
DstBlock "Add1"
DstPort 2
}
Line {
SrcBlock "Add1"
SrcPort 1
DstBlock "position_Y"
DstPort 1
}
Line {
SrcBlock "Ramp"
SrcPort 1
Points [0, 55]
DstBlock "Embedded\nMATLAB Function"
DstPort 1
}
Line {
SrcBlock "Embedded\nMATLAB Function"
SrcPort 1
Points [5, 0; 0, 20]
DstBlock "Add"
DstPort 1
}
Line {
SrcBlock "Ramp1"
SrcPort 1
DstBlock "Embedded\nMATLAB Function1"
DstPort 1
}
Line {
SrcBlock "Embedded\nMATLAB Function1"
SrcPort 1
Points [20, 0]
DstBlock "Add1"
DstPort 1
}
}
}
# Finite State Machines
#
# Stateflow Version 6.2 (R14SP2) dated Aug 4 2005, 10:13:39
#
#
Stateflow {
machine {
id 1
name "One_pulse1"
created "15-Oct-2001 17:10:46"
isLibrary 0
firstTarget 62
debug {
}
sfVersion 62014000
sfDemoChecksum [3508057438 1989481186 3692020490 3862480517]
}
chart {
id 2
name "position_X"
windowPosition [18.75 -288.75 954 676.5]
viewLimits [3.485 503.35 0 351.635]
zoomFactor 0.549
screen [1 1 1280 1024 1.333333333333333]
firstTransition 7
firstJunction 5
viewObj 2
machine 1
subviewS {
zoomFactor 0.99
}
decomposition CLUSTER_CHART
firstEvent 12
firstData 13
chartFileNumber 1
disableImplicitCasting 1
}
junction {
id 3
position [295.795 204.3225 7]
chart 2
linkNode [2 6 0]
subviewer 2
type CONNECTIVE_JUNCTION
}
junction {
id 4
position [283.0325 102.7163 7]
chart 2
linkNode [2 5 6]
subviewer 2
type CONNECTIVE_JUNCTION
}
junction {
id 5
position [46.6088 102.7163 7]
chart 2
linkNode [2 0 4]
subviewer 2
type CONNECTIVE_JUNCTION
}
junction {
id 6
position [460.2262 102.7163 7]
chart 2
linkNode [2 4 3]
subviewer 2
type CONNECTIVE_JUNCTION
}
transition {
id 7
labelString "{tick++;}"
labelPosition [50.22 36.179 44.447 14.383]
fontSize 12
src {
intersection [0 0 1 0 46.6088 21.7474 0 0]
}
dst {
id 5
intersection [0 0 -1 -1 46.6088 95.7163 0 0]
}
midPoint [46.6088 56.0791]
chart 2
linkNode [2 0 10]
dataLimits [44.209 49.009 21.747 95.716]
subviewer 2
drawStyle SMART
slide {
midPointSticky 1
}
executionOrder 1
}
transition {
id 8
labelString "{out=100;}"
labelPosition [288.585 141.818 55.559 14.383]
fontSize 12
src {
id 4
intersection [0 0.1246 0.9922 -1 283.9049 109.6617 0 0]
}
dst {
id 3
intersection [0 -0.1246 -0.9922 -1 294.9227 197.3771 0 0]
}
midPoint [289.1223 151.1988]
chart 2
linkNode [2 9 0]
dataLimits [283.905 296.307 109.662 197.377]
subviewer 2
drawStyle SMART
executionOrder 2
}
transition {
id 9
labelPosition [191.592 161.866 7.408 14.383]
fontSize 12
src {
id 5
intersection [0 0.926 0.3776 -1 53.0907 105.3593 0 0]
}
dst {
id 3
intersection [0 -0.926 -0.3776 -1 289.3132 201.6796 0 0]
}
midPoint [172.3919 154.0046]
chart 2
linkNode [2 11 8]
dataLimits [53.091 289.313 105.359 201.68]
subviewer 2
drawStyle SMART
executionOrder 2
}
transition {
id 10
labelString "[tick>=144] {tick=0; x_out=sine;}"
labelPosition [71.947 90.022 183.14 14.383]
fontSize 12
src {
id 5
intersection [0 1 0 -1 53.6088 102.7163 0 0]
}
dst {
id 4
intersection [0 -1 0 -1 276.0325 102.7163 0 0]
}
midPoint [165.3952 102.7163]
chart 2
linkNode [2 7 11]
dataLimits [53.609 276.033 100.316 105.116]
subviewer 2
drawStyle SMART
executionOrder 1
}
transition {
id 11
labelString "[out==100]{out=0;}"
labelPosition [324.225 92.07 99.184 14.383]
fontSize 12
src {
id 4
intersection [0 1 0 -1 290.0325 102.7163 0 0]
}
dst {
id 6
intersection [0 -1 0 -1 453.2262 102.7163 0 0]
}
midPoint [370.9164 102.7163]
chart 2
linkNode [2 10 9]
dataLimits [290.033 453.226 100.316 105.116]
subviewer 2
drawStyle SMART
executionOrder 1
}
event {
id 12
name "event"
linkNode [2 0 0]
scope INPUT_EVENT
trigger RISING_EDGE_EVENT
machine 1
}
data {
id 13
name "x_out"
linkNode [2 0 14]
scope OUTPUT_DATA
machine 1
props {
type {
primitive SF_DOUBLE_TYPE
isSigned 1
wordLength "16"
}
}
dataType "double"
}
data {
id 14
name "tick"
linkNode [2 13 15]
scope LOCAL_DATA
machine 1
props {
type {
primitive SF_DOUBLE_TYPE
isSigned 1
wordLength "16"
}
}
dataType "double"
}
data {
id 15
name "sequence"
linkNode [2 14 16]
scope LOCAL_DATA
machine 1
props {
type {
primitive SF_DOUBLE_TYPE
isSigned 1
wordLength "16"
}
}
dataType "double"
}
data {
id 16
name "sine"
linkNode [2 15 17]
scope INPUT_DATA
machine 1
props {
type {
primitive SF_DOUBLE_TYPE
isSigned 1
wordLength "16"
}
}
dataType "double"
}
data {
id 17
name "out"
linkNode [2 16 0]
scope OUTPUT_DATA
machine 1
props {
type {
primitive SF_DOUBLE_TYPE
isSigned 1
wordLength "16"
}
}
dataType "double"
}
instance {
id 18
name "position_X"
machine 1
chart 2
}
chart {
id 19
name "kalman filter "
windowPosition [253.631 356.325 200.25 189.75]
viewLimits [0 156.75 0 153.75]
screen [1 1 1152 864 1.333333333333333]
treeNode [0 20 0 0]
firstTransition 22
firstJunction 21
viewObj 19
machine 1
decomposition CLUSTER_CHART
type EML_CHART
firstData 23
chartFileNumber 2
disableImplicitCasting 1
eml {
name "kalkman"
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -