📄 kfgain.mdl
字号:
ParameterScalingMode "Best Precision: Matrix-wise"
ParameterScaling "[]"
OutMin "[]"
OutMax "[]"
OutDataTypeMode "Same as input"
OutDataType "fixdt(1,16,0)"
OutScaling "[]"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Outport
Port "1"
UseBusObject off
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
OutMin "[]"
OutMax "[]"
DataType "auto"
OutDataType "fixdt(1,16,0)"
OutScaling "[]"
SignalType "auto"
SamplingMode "auto"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Product
Inputs "2"
Multiplication "Element-wise(.*)"
CollapseMode "All dimensions"
CollapseDim "1"
InputSameDT on
OutMin "[]"
OutMax "[]"
OutDataTypeMode "Same as first input"
OutDataType "fixdt(1,16,0)"
OutScaling "[]"
LockScale off
RndMeth "Zero"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType SubSystem
ShowPortLabels "FromPortIcon"
Permissions "ReadWrite"
PermitHierarchicalResolution "All"
TreatAsAtomicUnit off
SystemSampleTime "-1"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
Block {
BlockType Sum
IconShape "rectangular"
Inputs "++"
CollapseMode "All dimensions"
CollapseDim "1"
InputSameDT on
OutMin "[]"
OutMax "[]"
OutDataTypeMode "Same as first input"
OutDataType "fixdt(1,16,0)"
OutScaling "[]"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType UnitDelay
X0 "0"
SampleTime "1"
StateMustResolveToSignalObject off
RTWStateStorageClass "Auto"
}
Block {
BlockType Constant
Value "1"
VectorParams1D on
SamplingMode "Sample based"
OutMin "[]"
OutMax "[]"
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "fixdt(1,16,0)"
ConRadixGroup "Use specified scaling"
OutScaling "[]"
SampleTime "inf"
FramePeriod "inf"
}
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "Arial"
FontSize 10
FontWeight "normal"
FontAngle "normal"
UseDisplayTextAsClickCallback off
}
LineDefaults {
FontName "Arial"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "KFgain"
Location [803, 261, 1339, 542]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType SubSystem
Name "filter gain"
Ports [0, 1]
Position [125, 32, 200, 118]
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskPromptString "P0|A|C|Q|R"
MaskStyleString "edit,edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on,on"
MaskCallbackString "||||"
MaskEnableString "on,on,on,on,on"
MaskVisibilityString "on,on,on,on,on"
MaskToolTipString "on,on,on,on,on"
MaskVarAliasString ",,,,"
MaskVariables "P0=@1;A=@2;C=@3;Q=@4;R=@5;"
MaskDisplay "disp(sprintf('Kalman\\n Filter\\n Gain'))"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "P1|A1|C1|Q1|R1"
MaskTabNameString ",,,,"
System {
Name "filter gain"
Location [269, 489, 913, 864]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Gain
Name "A'"
Position [155, 119, 195, 161]
Gain "A'"
Multiplication "Matrix(u*K)"
ParameterDataTypeMode "Inherit via internal rule"
ParameterDataType "sfix(16)"
ParameterScaling "2^0"
OutDataTypeMode "Inherit via internal rule"
OutDataType "sfix(16)"
OutScaling "2^0"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "A1"
Position [75, 119, 115, 161]
Gain "A"
Multiplication "Matrix(K*u)"
ParameterDataTypeMode "Inherit via internal rule"
ParameterDataType "sfix(16)"
ParameterScaling "2^0"
OutDataTypeMode "Inherit via internal rule"
OutDataType "sfix(16)"
OutScaling "2^0"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "C'"
Position [290, 119, 330, 161]
Gain "C'"
Multiplication "Matrix(u*K)"
ParameterDataTypeMode "Inherit via internal rule"
ParameterDataType "sfix(16)"
ParameterScaling "2^0"
OutDataTypeMode "Inherit via internal rule"
OutDataType "sfix(16)"
OutScaling "2^0"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "C1"
Position [370, 119, 410, 161]
Gain "C"
Multiplication "Matrix(K*u)"
ParameterDataTypeMode "Inherit via internal rule"
ParameterDataType "sfix(16)"
ParameterScaling "2^0"
OutDataTypeMode "Inherit via internal rule"
OutDataType "sfix(16)"
OutScaling "2^0"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "C2"
Position [385, 224, 425, 266]
Gain "C"
Multiplication "Matrix(K*u)"
ParameterDataTypeMode "Inherit via internal rule"
ParameterDataType "sfix(16)"
ParameterScaling "2^0"
OutDataTypeMode "Inherit via internal rule"
OutDataType "sfix(16)"
OutScaling "2^0"
SaturateOnIntegerOverflow off
}
Block {
BlockType Product
Name "Divide"
Ports [2, 1]
Position [515, 79, 545, 161]
Inputs "*/"
Multiplication "Matrix(*)"
CollapseMode "All dimensions"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutDataType "sfix(16)"
OutScaling "2^-10"
RndMeth "Floor"
SaturateOnIntegerOverflow off
}
Block {
BlockType Product
Name "Product1"
Ports [2, 1]
Position [330, 282, 360, 353]
Orientation "left"
NamePlacement "alternate"
ShowName off
Multiplication "Matrix(*)"
CollapseMode "All dimensions"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutDataType "sfix(16)"
OutScaling "2^0"
SaturateOnIntegerOverflow off
}
Block {
BlockType Constant
Name "Q"
Position [105, 70, 135, 100]
Value "Q"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Constant
Name "R"
Position [335, 170, 365, 200]
Value "R"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Sum
Name "Sum3"
Ports [2, 1]
Position [230, 130, 250, 150]
ShowName off
IconShape "round"
Inputs "++|"
CollapseMode "All dimensions"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutDataType "sfix(16)"
OutScaling "2^0"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum4"
Ports [2, 1]
Position [450, 130, 470, 150]
ShowName off
IconShape "round"
Inputs "|++"
CollapseMode "All dimensions"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutDataType "sfix(16)"
OutScaling "2^0"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum5"
Ports [2, 1]
Position [255, 310, 275, 330]
Orientation "left"
ShowName off
IconShape "round"
Inputs "+-|"
CollapseMode "All dimensions"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutDataType "sfix(16)"
OutScaling "2^0"
SaturateOnIntegerOverflow off
}
Block {
BlockType UnitDelay
Name "Unit Delay1"
Position [28, 205, 62, 240]
Orientation "up"
NamePlacement "alternate"
ShowName off
X0 "P0"
}
Block {
BlockType Outport
Name "k"
Position [590, 28, 620, 42]
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Line {
SrcBlock "A1"
SrcPort 1
DstBlock "A'"
DstPort 1
}
Line {
SrcBlock "A'"
SrcPort 1
DstBlock "Sum3"
DstPort 2
}
Line {
SrcBlock "Q"
SrcPort 1
Points [100, 0]
DstBlock "Sum3"
DstPort 1
}
Line {
SrcBlock "Sum3"
SrcPort 1
Points [10, 0]
Branch {
DstBlock "C'"
DstPort 1
}
Branch {
Points [0, 105]
Branch {
DstBlock "Sum5"
DstPort 1
}
Branch {
DstBlock "C2"
DstPort 1
}
}
}
Line {
SrcBlock "C'"
SrcPort 1
Points [10, 0]
Branch {
DstBlock "C1"
DstPort 1
}
Branch {
Points [0, -40]
DstBlock "Divide"
DstPort 1
}
}
Line {
SrcBlock "Divide"
SrcPort 1
Points [15, 0]
Branch {
Points [25, 0; 0, 180]
DstBlock "Product1"
DstPort 1
}
Branch {
Points [0, -85]
DstBlock "k"
DstPort 1
}
}
Line {
SrcBlock "Product1"
SrcPort 1
DstBlock "Sum5"
DstPort 2
}
Line {
SrcBlock "C1"
SrcPort 1
DstBlock "Sum4"
DstPort 1
}
Line {
SrcBlock "R"
SrcPort 1
Points [90, 0]
DstBlock "Sum4"
DstPort 2
}
Line {
SrcBlock "Sum4"
SrcPort 1
DstBlock "Divide"
DstPort 2
}
Line {
SrcBlock "Unit Delay1"
SrcPort 1
Points [0, -60]
DstBlock "A1"
DstPort 1
}
Line {
SrcBlock "Sum5"
SrcPort 1
Points [-205, 0]
DstBlock "Unit Delay1"
DstPort 1
}
Line {
SrcBlock "C2"
SrcPort 1
Points [20, 0; 0, 90]
DstBlock "Product1"
DstPort 2
}
Annotation {
Name "P"
Position [264, 127]
}
Annotation {
Name "PC'"
Position [342, 153]
}
Annotation {
Name "CPC'"
Position [424, 128]
}
Annotation {
Name "K"
Position [560, 288]
}
Annotation {
Name "CP"
Position [448, 236]
}
}
}
Block {
BlockType Outport
Name "Out1"
Position [280, 68, 310, 82]
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Line {
SrcBlock "filter gain"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -