ale.mdl
来自「用dsp解压mp3程序的算法」· MDL 代码 · 共 678 行 · 第 1/2 页
MDL
678 行
Position [180, 152, 225, 188]
ShowName off
SourceBlock "dspsigops/Integer Delay"
SourceType "Integer Delay"
delay "1"
ic "0"
reset_popup "None"
}
Block {
BlockType Reference
Name "LMS\nAdaptive Filter"
Ports [2, 2]
Position [255, 156, 340, 214]
SourceBlock "dspadpt3/LMS\nAdaptive Filter"
SourceType "LMS Adaptive Filter"
n "16"
mu "0.01"
ic "0.0"
leakage "1.0"
normalized off
Adapt off
RstPort "None"
Port {
PortNumber 1
Name "Prediction"
PropagatedSignals "y[k]"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
}
Block {
BlockType Reference
Name "Predictor\nCoefficients"
Ports [1]
Position [420, 190, 455, 240]
SourceBlock "dspsnks4/Vector\nScope"
SourceType "Vector Scope"
ScopeProperties on
Domain "User-defined"
HorizSpan "1"
DisplayProperties off
AxisGrid on
Memory off
FrameNumber on
AxisLegend off
AxisZoom on
OpenScopeAtSimStart on
OpenScopeImmediately off
FigPos "[222 254 343 297]"
AxisProperties off
XUnits "Hertz"
XRange "[0...Fs/2]"
InheritXIncr off
XIncr "1"
XLabel "Samples"
YUnits "dB"
YMin "-0.861208728230937"
YMax "0.622960150362009"
YLabel "Amplitude"
LineProperties off
}
Block {
BlockType Reference
Name "Random\nSource"
Ports [0, 1]
Position [20, 186, 55, 224]
UserDataPersistent on
UserData "DataTag0"
Diagnostics "AllowInheritedTsInSrc"
SourceBlock "dspsrcs4/Random\nSource"
SourceType "Random Source"
SrcType "Gaussian"
NormMethod "Sum of uniform values"
CltLength "12"
Min "0"
Max "1"
Mean "0"
Var "0.1"
RepMode "Not repeatable"
Seed "1"
Inherit off
SampMode "Discrete"
SampTime "1/8000"
SampFrame "1"
DataType "Double"
OutComplex "Real"
}
Block {
BlockType Scope
Name "Results"
Ports [3]
Position [445, 84, 480, 136]
ShowName off
Location [458, 149, 800, 532]
Open off
NumInputPorts "3"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
axes3 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
axes2 ""
axes3 ""
}
TimeRange "0.1"
YMin "-2~-2~-2"
YMax "2~2~2"
DataFormat "Array"
SampleInput on
SampleTime "1/8000"
}
Block {
BlockType SubSystem
Name "Simulation Notes"
Ports []
Position [130, 244, 189, 287]
BackgroundColor "cyan"
DropShadow on
TreatAsAtomicUnit off
MaskDisplay "disp('Notes')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Simulation Notes"
Location [2, 74, 1014, 724]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Annotation {
Name "Adaptive Line Enhancer\n\nThis example show"
"s the ability of the LMS algorithm\nto adaptively clean up the noisy sine wav"
"e.\n\nThe noisy input is passed through a delay unit which\ndecorrelates the "
"noisy signal and enhances the sinewave.\nThe adaptive filter output contains "
"a cleaner sinewave. "
Position [192, 69]
FontName "Arial"
FontSize 14
}
}
}
Block {
BlockType Reference
Name "Sine Wave"
Ports [0, 1]
Position [40, 93, 70, 127]
SourceBlock "dspsrcs4/Sine Wave"
SourceType "Sine Wave"
Amplitude "1"
Frequency "200"
Phase "0"
SampleMode "Discrete"
OutComplex "Real"
CompMethod "Trigonometric fcn"
TableSize "Speed"
SampleTime "1/8000"
SamplesPerFrame "1"
additionalParams off
dataType "double"
wordLen "16"
udDataType "sfix(16)"
fracBitsMode "User-defined"
numFracBits "14"
ResetState "Restart at time zero"
}
Block {
BlockType Sum
Name "Sum3"
Ports [2, 1]
Position [340, 95, 370, 125]
ShowName off
IconShape "round"
Inputs "|+-"
Port {
PortNumber 1
Name "Prediction\nerror"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "1"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
}
Block {
BlockType Sum
Name "Sum4"
Ports [2, 1]
Position [105, 155, 135, 185]
ShowName off
IconShape "round"
Port {
PortNumber 1
Name "Input signal"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "1"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
}
Line {
Name "Input signal"
SrcBlock "Sum4"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
DstBlock "Integer Delay"
DstPort 1
}
Branch {
Points [0, -65]
Branch {
Points [0, 5]
DstBlock "Sum3"
DstPort 1
}
Branch {
Points [0, -30; 275, 0]
DstBlock "Results"
DstPort 1
}
}
}
Line {
Labels [0, 0]
SrcBlock "Random\nSource"
SrcPort 1
Points [60, 0]
DstBlock "Sum4"
DstPort 2
}
Line {
SrcBlock "LMS\nAdaptive Filter"
SrcPort 2
DstBlock "Flip"
DstPort 1
}
Line {
SrcBlock "Integer Delay"
SrcPort 1
DstBlock "LMS\nAdaptive Filter"
DstPort 1
}
Line {
SrcBlock "Sine Wave"
SrcPort 1
Points [45, 0]
DstBlock "Sum4"
DstPort 1
}
Line {
Name "Prediction"
Labels [0, 0]
SrcBlock "LMS\nAdaptive Filter"
SrcPort 1
Points [0, 0; 10, 0]
Branch {
DstBlock "Sum3"
DstPort 2
}
Branch {
Labels [1, 0]
Points [75, 0]
DstBlock "Results"
DstPort 3
}
}
Line {
Name "Prediction\nerror"
Labels [0, 0]
SrcBlock "Sum3"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
Points [0, -25; -150, 0]
DstBlock "LMS\nAdaptive Filter"
DstPort 2
}
Branch {
DstBlock "Results"
DstPort 2
}
}
Line {
SrcBlock "Flip"
SrcPort 1
DstBlock "Predictor\nCoefficients"
DstPort 1
}
Annotation {
Name "LMS Adaptive Linear Prediction"
Position [291, 21]
FontName "MS Sans Serif"
FontSize 14
FontWeight "bold"
}
}
}
MatData {
NumRecords 1
DataRecord {
Tag DataTag0
Data " %)30 . \\ 8 ( @ % "
"\" $ ! 0 % 0 \"0 $ 2 4V5E9 4V5E9$9L86< "
" #@ $ & \" 0 !0 @ ! !0 $ ! H"
" Q #, -@ U #$ #@ % & \" 0 !0 @ ! #0 "
" $ ! !H !$ &\\ 3@!O '0 4P!A '8 90!3 &4 90!D "
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?