📄 adnsce_kalm.mdl
字号:
SourceType "Digital Filter"
TypePopup "IIR (all poles)"
IIRFiltStruct "Direct form II transposed"
AllPoleFiltStruct "Direct form transposed"
FIRFiltStruct "Direct form"
CoeffSource "Specify via dialog"
NumCoeffs "[1 2]"
DenCoeffs "[1 -a]"
BiQuadCoeffs "[1 0.3 0.4 1 0.1 0.2]"
LatticeCoeffs "[0.2 0.4]"
denIgnore "on"
FiltPerSampPopup "One filter per frame"
IC "0"
ICnum "0"
ICden "0"
}
Block {
BlockType Reference
Name "Digital FIR Filter"
Ports [2, 1]
Position [215, 20, 300, 60]
SourceBlock "dsparch4/Digital Filter"
SourceType "Digital Filter"
TypePopup "FIR (all zeros)"
IIRFiltStruct "Direct form II transposed"
AllPoleFiltStruct "Direct form"
FIRFiltStruct "Direct form transposed"
CoeffSource "Input port(s)"
NumCoeffs "[1 2]"
DenCoeffs "[1 0.1]"
BiQuadCoeffs "[1 0.3 0.4 1 0.1 0.2]"
LatticeCoeffs "[0.2 0.4]"
denIgnore "on"
FiltPerSampPopup "One filter per sample"
IC "0"
ICnum "0"
ICden "0"
}
Block {
BlockType Reference
Name "Random \nTaps"
Ports [0, 1]
Position [40, 90, 70, 120]
SourceBlock "simulink/Sources/Band-Limited\nWhite Noise"
SourceType "Continuous White Noise."
Cov "ones(N,1)"
Ts "Ts"
seed "rand(N,1)*1000"
VectorParams1D "on"
}
Block {
BlockType Outport
Name "Filter\nOutput"
Position [330, 30, 350, 50]
InitialOutput "0"
}
Block {
BlockType Outport
Name "Tap\nWeights"
Position [330, 95, 350, 115]
Port "2"
InitialOutput "0"
}
Line {
SrcBlock "Input\nSignal"
SrcPort 1
DstBlock "Digital FIR Filter"
DstPort 1
}
Line {
SrcBlock "Digital FIR Filter"
SrcPort 1
DstBlock "Filter\nOutput"
DstPort 1
}
Line {
SrcBlock "Random \nTaps"
SrcPort 1
DstBlock "Average\nCoefficients\nTranspose Filter"
DstPort 1
}
Line {
SrcBlock "Average\nCoefficients\nTranspose Filter"
SrcPort 1
Points [20, 0]
Branch {
DstBlock "Tap\nWeights"
DstPort 1
}
Branch {
Points [0, -55]
DstBlock "Digital FIR Filter"
DstPort 2
}
}
}
}
Block {
BlockType SubSystem
Name "Plot Weights"
Ports [2]
Position [395, 106, 440, 144]
ShowName off
ShowPortLabels off
TreatAsAtomicUnit off
MaskDisplay "disp('Plot\\nWeights')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Plot Weights"
Location [582, 680, 1032, 840]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "in_1"
Position [65, 25, 85, 45]
}
Block {
BlockType Inport
Name "in_2"
Position [65, 65, 85, 85]
Port "2"
}
Block {
BlockType Constant
Name "Constant"
Position [5, 108, 125, 132]
Value "reshape([1:5;6:10],10,1)"
}
Block {
BlockType Demux
Name "Demux"
Ports [1, 5]
Position [260, 37, 265, 103]
BackgroundColor "black"
ShowName off
Outputs "5"
Port {
PortNumber 1
Name "Tap 1"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
Port {
PortNumber 2
Name "Tap 2"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
Port {
PortNumber 3
Name "Tap 3"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
Port {
PortNumber 4
Name "Tap 4"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
Port {
PortNumber 5
Name "Tap 5"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [115, 15, 120, 95]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Reference
Name "Permute\nMatrix"
Ports [2, 1]
Position [155, 43, 235, 92]
SourceBlock "dspmtrx3/Permute\nMatrix"
SourceType "Permute Matrix"
mode "Rows"
ZeroOneIdxMode "One-based"
errmode "Clip Index"
checkDims "off"
}
Block {
BlockType Scope
Name "Scope"
Ports [5]
Position [325, 36, 360, 104]
Location [502, 71, 902, 713]
Open on
NumInputPorts "5"
ZoomMode "xonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
axes3 "%<SignalLabel>"
axes4 "%<SignalLabel>"
axes5 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
axes2 ""
axes3 ""
axes4 ""
axes5 ""
}
TimeRange "300"
YMin "-10~-10~-10~-10~-10"
YMax "10~10~10~10~10"
DataFormat "Structure"
SampleInput on
}
Line {
Name "Tap 5"
Labels [0, 1]
SrcBlock "Demux"
SrcPort 5
DstBlock "Scope"
DstPort 5
}
Line {
SrcBlock "in_1"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "in_2"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Permute\nMatrix"
DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [0, -40]
DstBlock "Permute\nMatrix"
DstPort 2
}
Line {
SrcBlock "Permute\nMatrix"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
Line {
Name "Tap 1"
Labels [0, 1]
SrcBlock "Demux"
SrcPort 1
DstBlock "Scope"
DstPort 1
}
Line {
Name "Tap 4"
Labels [0, 1]
SrcBlock "Demux"
SrcPort 4
DstBlock "Scope"
DstPort 4
}
Line {
Name "Tap 3"
Labels [0, 1]
SrcBlock "Demux"
SrcPort 3
DstBlock "Scope"
DstPort 3
}
Line {
Name "Tap 2"
Labels [0, 1]
SrcBlock "Demux"
SrcPort 2
DstBlock "Scope"
DstPort 2
}
}
}
Block {
BlockType Reference
Name "Source"
Ports [0, 1]
Position [30, 90, 60, 120]
SourceBlock "simulink/Sources/Band-Limited\nWhite Noise"
SourceType "Continuous White Noise."
Cov "[0.1]"
Ts "1"
seed "[23341]"
VectorParams1D on
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [305, 80, 325, 100]
Orientation "down"
NamePlacement "alternate"
ShowName off
IconShape "round"
Inputs "++|"
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [305, 135, 325, 155]
Orientation "left"
NamePlacement "alternate"
ShowName off
IconShape "round"
Inputs "+-|"
}
Line {
SrcBlock "Channel\nNoise"
SrcPort 1
Points [0, 10]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Nonstationary\nChannel"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Source"
SrcPort 1
Points [25, 0]
Branch {
Points [0, 90]
DstBlock "Kalman\nAdaptive Filter"
DstPort 1
}
Branch {
DstBlock "Nonstationary\nChannel"
DstPort 1
}
}
Line {
Name "Actual\nfilter"
Labels [-1, 1]
SrcBlock "Nonstationary\nChannel"
SrcPort 2
DstBlock "Plot Weights"
DstPort 1
}
Line {
SrcBlock "Kalman\nAdaptive Filter"
SrcPort 1
Points [105, 0]
DstBlock "Sum2"
DstPort 2
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Sum2"
DstPort 1
}
Line {
SrcBlock "Sum2"
SrcPort 1
Points [-170, 0]
DstBlock "Kalman\nAdaptive Filter"
DstPort 2
}
Line {
Labels [0, 0]
SrcBlock "Kalman\nAdaptive Filter"
SrcPort 2
DstBlock "Flip"
DstPort 1
}
Line {
Name "Estimated\nfilter"
Labels [2, 1]
SrcBlock "Flip"
SrcPort 1
Points [45, 0]
DstBlock "Plot Weights"
DstPort 2
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -