📄 fh_demo.mdl
字号:
MaskHelp "IIR Butterworth band pass filter using MATL"
"AB's butter command."
MaskPromptString "Center frequency (0 to 1):|Bandwidth (0 to "
"1):|Order:|Sample time:"
MaskStyleString "edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on"
MaskCallbackString "|||"
MaskEnableString "on,on,on,on"
MaskVisibilityString "on,on,on,on"
MaskToolTipString "on,on,on,on"
MaskVarAliasString ",,,"
MaskInitialization "bw = @2/2; [a,b,c,d]=butter(@3,[@1-bw,@1+bw"
"] ); ts=@4; [num,den]=ss2tf(a,b,c,d,1); if (@3 <= 8), [a,b,c,d]=tf2ss(num,den"
"); end; h=freqz(num,den,64); "
MaskDisplay "plot(1:64,abs(h))"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "F4*ts*2|0.05|7|ts"
System {
Name "Butterworth\nIIR BP Filter6"
Location [410, 195, 910, 455]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [20, 80, 40, 100]
}
Block {
BlockType DiscreteStateSpace
Name "Butterworth\nIIR BP Filter6"
Position [90, 58, 160, 92]
ShowName off
A "a"
B "b"
C "c"
D "d"
SampleTime "ts"
}
Block {
BlockType Outport
Name "Out1"
Position [190, 80, 210, 100]
InitialOutput "0"
}
Line {
SrcBlock "Butterworth\nIIR BP Filter6"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Butterworth\nIIR BP Filter6"
DstPort 1
}
}
}
Block {
BlockType Reference
Name "DSB-SC-ADM\npassband"
Ports [1, 1]
Position [180, 33, 260, 77]
ShowName off
SourceBlock "com_cdmo/DSB-SC-ADM\npassband"
SourceType "Passband DSB-SC ADM"
MaskParam1 "F0"
MaskParam2 "num0"
MaskParam3 "den0"
MaskParam4 "0"
MaskParam5 "ts"
}
Block {
BlockType Reference
Name "DSB-SC-ADM\npassband1"
Ports [1, 1]
Position [180, 103, 260, 147]
ShowName off
SourceBlock "com_cdmo/DSB-SC-ADM\npassband"
SourceType "Passband DSB-SC ADM"
MaskParam1 "F2"
MaskParam2 "num2"
MaskParam3 "den2"
MaskParam4 "0"
MaskParam5 "ts"
}
Block {
BlockType Reference
Name "DSB-SC-ADM\npassband2"
Ports [1, 1]
Position [185, 173, 265, 217]
ShowName off
SourceBlock "com_cdmo/DSB-SC-ADM\npassband"
SourceType "Passband DSB-SC ADM"
MaskParam1 "F4"
MaskParam2 "num4"
MaskParam3 "den4"
MaskParam4 "0"
MaskParam5 "ts"
}
Block {
BlockType Mux
Name "Mux"
Ports [3, 1]
Position [305, 97, 340, 153]
ShowName off
Inputs "3"
}
Block {
BlockType Outport
Name "out_1"
Position [370, 115, 390, 135]
ShowName off
InitialOutput "0"
}
Line {
SrcBlock "in_1"
SrcPort 1
Points [10, 0]
Branch {
DstBlock "Butterworth\nIIR BP Filter4"
DstPort 1
}
Branch {
DstBlock "Butterworth\nIIR BP Filter6"
DstPort 1
}
Branch {
DstBlock "Butterworth\nIIR BP Filter5"
DstPort 1
}
}
Line {
SrcBlock "Butterworth\nIIR BP Filter5"
SrcPort 1
DstBlock "DSB-SC-ADM\npassband1"
DstPort 1
}
Line {
SrcBlock "Butterworth\nIIR BP Filter4"
SrcPort 1
DstBlock "DSB-SC-ADM\npassband"
DstPort 1
}
Line {
SrcBlock "Butterworth\nIIR BP Filter6"
SrcPort 1
DstBlock "DSB-SC-ADM\npassband2"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "out_1"
DstPort 1
}
Line {
SrcBlock "DSB-SC-ADM\npassband1"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "DSB-SC-ADM\npassband2"
SrcPort 1
Points [15, -50]
DstBlock "Mux"
DstPort 3
}
Line {
SrcBlock "DSB-SC-ADM\npassband"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Frequency division\nthree-signal mux"
Ports [1, 1]
Position [260, 66, 325, 114]
TreatAsAtomicUnit off
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "pixels"
System {
Name "Frequency division\nthree-signal mux"
Location [241, 180, 676, 390]
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 [20, 100, 40, 120]
ShowName off
}
Block {
BlockType SubSystem
Name "Butterworth\nIIR BP Filter1"
Ports [1, 1]
Position [235, 28, 305, 62]
ShowName off
TreatAsAtomicUnit off
MaskType "butter(BP)"
MaskDescription "Butterworth band pass filter.\n(Requires Si"
"gnal Processing Toolbox)"
MaskHelp "IIR Butterworth band pass filter using MATL"
"AB's butter command."
MaskPromptString "Center frequency (0 to 1):|Bandwidth (0 to "
"1):|Order:|Sample time:"
MaskStyleString "edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on"
MaskCallbackString "|||"
MaskEnableString "on,on,on,on"
MaskVisibilityString "on,on,on,on"
MaskToolTipString "on,on,on,on"
MaskVarAliasString ",,,"
MaskInitialization "bw = @2/2; [a,b,c,d]=butter(@3,[@1-bw,@1+bw"
"] ); ts=@4; [num,den]=ss2tf(a,b,c,d,1); if (@3 <= 8), [a,b,c,d]=tf2ss(num,den"
"); end; h=freqz(num,den,64); "
MaskDisplay "plot(1:64,abs(h))"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "F0*ts*2|0.05|7|ts"
System {
Name "Butterworth\nIIR BP Filter1"
Location [410, 195, 910, 455]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [20, 80, 40, 100]
}
Block {
BlockType DiscreteStateSpace
Name "Butterworth\nIIR BP Filter1"
Position [90, 58, 160, 92]
ShowName off
A "a"
B "b"
C "c"
D "d"
SampleTime "ts"
}
Block {
BlockType Outport
Name "Out1"
Position [190, 80, 210, 100]
InitialOutput "0"
}
Line {
SrcBlock "Butterworth\nIIR BP Filter1"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Butterworth\nIIR BP Filter1"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Butterworth\nIIR BP Filter2"
Ports [1, 1]
Position [235, 93, 305, 127]
ShowName off
TreatAsAtomicUnit off
MaskType "butter(BP)"
MaskDescription "Butterworth band pass filter.\n(Requires Si"
"gnal Processing Toolbox)"
MaskHelp "IIR Butterworth band pass filter using MATL"
"AB's butter command."
MaskPromptString "Center frequency (0 to 1):|Bandwidth (0 to "
"1):|Order:|Sample time:"
MaskStyleString "edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on"
MaskCallbackString "|||"
MaskEnableString "on,on,on,on"
MaskVisibilityString "on,on,on,on"
MaskToolTipString "on,on,on,on"
MaskVarAliasString ",,,"
MaskInitialization "bw = @2/2; [a,b,c,d]=butter(@3,[@1-bw,@1+bw"
"] ); ts=@4; [num,den]=ss2tf(a,b,c,d,1); if (@3 <= 8), [a,b,c,d]=tf2ss(num,den"
"); end; h=freqz(num,den,64); "
MaskDisplay "plot(1:64,abs(h))"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "F2*ts*2|0.05|7|ts"
System {
Name "Butterworth\nIIR BP Filter2"
Location [410, 195, 910, 455]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [20, 80, 40, 100]
}
Block {
BlockType DiscreteStateSpace
Name "Butterworth\nIIR BP Filter2"
Position [90, 58, 160, 92]
ShowName off
A "a"
B "b"
C "c"
D "d"
SampleTime "ts"
}
Block {
BlockType Outport
Name "Out1"
Position [190, 80, 210, 100]
InitialOutput "0"
}
Line {
SrcBlock "Butterworth\nIIR BP Filter2"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Butterworth\nIIR BP Filter2"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Butterworth\nIIR BP Filter3"
Ports [1, 1]
Position [235, 163, 305, 197]
ShowName off
TreatAsAtomicUnit off
MaskType "butter(BP)"
MaskDescription "Butterworth band pass filter.\n(Requires Si"
"gnal Processing Toolbox)"
MaskHelp "IIR Butterworth band pass filter using MATL"
"AB's butter command."
MaskPromptString "Center frequency (0 to 1):|Bandwidth (0 to "
"1):|Order:|Sample time:"
MaskStyleString "edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on"
MaskCallbackString "|||"
MaskEnableString "on,on,on,on"
MaskVisibilityString "on,on,on,on"
MaskToolTipString "on,on,on,on"
MaskVarAliasString ",,,"
MaskInitialization "bw = @2/2; [a,b,c,d]=butter(@3,[@1-bw,@1+bw"
"] ); ts=@4; [num,den]=ss2tf(a,b,c,d,1); if (@3 <= 8), [a,b,c,d]=tf2ss(num,den"
"); end; h=freqz(num,den,64); "
MaskDisplay "plot(1:64,abs(h))"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "F4*ts*2|0.05|7|ts"
System {
Name "Butterworth\nIIR BP Filter3"
Location [410, 195, 910, 455]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [20, 80, 40, 100]
}
Block {
BlockType DiscreteStateSpace
Name "Butterworth\nIIR BP Filter3"
Position [90, 58, 160, 92]
ShowName off
A "a"
B "b"
C "c"
D "d"
SampleTime "ts"
}
Block {
BlockType Outport
Name "Out1"
Position [190, 80, 210, 100]
InitialOutput "0"
}
Line {
SrcBlock "Butterworth\nIIR BP Filter3"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Butterworth\nIIR BP Filter3"
DstPort 1
}
}
}
Block {
BlockType Reference
Name "DSB-SC AM\npassband"
Ports [1, 1]
Position [125, 23, 205, 67]
ShowName off
SourceBlock "com_cdmo/DSB-SC AM\npassband"
SourceType "Passband DSB-SC AM"
MaskParam1 "F0"
MaskParam2 "0"
MaskParam3 "ts"
}
Block {
BlockType Reference
Name "DSB-SC AM\npassband1"
Ports [1, 1]
Position [125, 88, 205, 132]
ShowName off
SourceBlock "com_cdmo/DSB-SC AM\npassband"
SourceType "Passband DSB-SC AM"
MaskParam1 "F2"
MaskParam2 "0"
MaskParam3 "ts"
}
Block {
BlockType Reference
Name "DSB-SC AM\npassband2"
Ports [1, 1]
Position [125, 158, 205, 202]
ShowName off
SourceBlock "com_cdmo/DSB-SC AM\npassband"
SourceType "Passband DSB-SC AM"
MaskParam1 "F4"
MaskParam2 "0"
MaskParam3 "ts"
}
Block {
BlockType Demux
Name "Demux"
Ports [1, 3]
Position [55, 92, 95, 128]
ShowName off
Outputs "3"
}
Block {
BlockType Sum
Name "Sum"
Ports [3, 1]
Position [365, 92, 385, 128]
ShowName off
Inputs "+++"
}
Block {
BlockType Outport
Name "out_1"
Position [400, 100, 420, 120]
ShowName off
InitialOutput "0"
}
Line {
SrcBlock "DSB-SC AM\npassband"
SrcPort 1
DstBlock "Butterworth\nIIR BP Filter1"
DstPort 1
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -