📄 math_filter_rab.mdl
字号:
Criteria "u2 >= Threshold"
Threshold "0"
InputSameDT on
OutDataTypeMode "Inherit via internal rule"
RndMeth "Floor"
SaturateOnIntegerOverflow on
ZeroCross on
SampleTime "-1"
}
Block {
BlockType Terminator
}
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
}
LineDefaults {
FontName "Helvetica"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "math_filter_rab"
Location [53, 95, 732, 458]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Reference
Name "Bandpass RF Filter"
Ports [1, 1]
Position [130, 132, 195, 188]
SourceBlock "rfmathmodels1/Bandpass RF Filter"
SourceType "Bandpass RF Filter"
ShowPortLabels on
method "Chebyshev I"
filttype "Bandpass"
N "3"
flo "72e6"
fhi "78e6"
Rp "1"
Rs "10"
MaxLength "32"
Fc "75e6"
Ts "1e-7"
Port {
PortNumber 1
Name "3rd order"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
ShowSigGenPortName on
}
}
Block {
BlockType Reference
Name "Bandpass RF Filter1"
Ports [1, 1]
Position [130, 237, 195, 293]
SourceBlock "rfmathmodels1/Bandpass RF Filter"
SourceType "Bandpass RF Filter"
ShowPortLabels on
method "Chebyshev I"
filttype "Bandpass"
N "5"
flo "72e6"
fhi "78e6"
Rp "1"
Rs "10"
MaxLength "32"
Fc "75e6"
Ts "1e-7"
Port {
PortNumber 1
Name "5th order"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
ShowSigGenPortName on
}
}
Block {
BlockType Reference
Name "Complex Filter Magnitude in dB"
Ports [1]
Position [555, 130, 590, 180]
SourceBlock "dspsnks4/Vector\nScope"
SourceType "Vector Scope"
ScopeProperties on
Domain "Frequency"
HorizSpan "1"
DisplayProperties off
AxisGrid on
Memory off
FrameNumber on
AxisLegend off
AxisZoom off
OpenScopeAtSimStart on
OpenScopeImmediately off
FigPos "[75 330 372 236]"
AxisProperties off
XUnits "Hertz"
XRange "[-Fs/2...Fs/2]"
InheritXIncr on
XIncr "2*Fs"
XLabel "Time"
YUnits "dB"
YMin "-41.9701824263749"
YMax "2.51133153984128"
YLabel "dB"
LineProperties off
LineColors "[0 0 1]|[1 0 0]"
ShowPortLabels off
}
Block {
BlockType Reference
Name "Complex Filter Phase in Degrees"
Ports [1]
Position [590, 190, 625, 240]
SourceBlock "dspsnks4/Vector\nScope"
SourceType "Vector Scope"
ScopeProperties on
Domain "Frequency"
HorizSpan "1"
DisplayProperties off
AxisGrid on
Memory off
FrameNumber on
AxisLegend off
AxisZoom off
OpenScopeAtSimStart on
OpenScopeImmediately off
FigPos "[457 331 372 236]"
AxisProperties off
XUnits "Hertz"
XRange "[-Fs/2...Fs/2]"
InheritXIncr on
XIncr "1"
XLabel "Frequency"
YUnits "Magnitude"
YMin "-12540.2136509701"
YMax "12378.9930792327"
YLabel "Phase in Degrees"
LineProperties off
LineColors "[0 0 1]|[1 0 0]"
ShowPortLabels off
}
Block {
BlockType SubSystem
Name "Mathematical Filters"
Ports []
Position [285, 254, 345, 294]
BackgroundColor "cyan"
DropShadow on
ShowName off
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskDisplay "disp('Info')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Mathematical Filters"
Location [448, 94, 913, 398]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Annotation {
Name "Mathematical Filters"
Position [221, 24]
FontName "Arial"
FontSize 14
}
Annotation {
Name "This model compares two Chebyshev I filters"
" of order 3 and 5\nwith a passband ripple of 1dB implemented using \nBandpass"
" RF filters from the Mathematical sub-library."
Position [226, 67]
FontName "Arial"
FontSize 14
}
Annotation {
Name "Filter specifications:\nCenter frequency = "
"75MHz\nLower passband edge frequency = 72MHz\nUpper passband edge frequency "
"= 78MHz\nHence, bandwidth of the filter at -1dB = (78-72) =6MHz"
Position [220, 144]
FontName "Arial"
FontSize 14
}
Annotation {
Name "The frequency response of the 5th order fil"
"ter has five ripples and\nthe frequency response of the 3rd order filter has "
"three ripples\nas expected. Also, observe that the roll-off of the 5th order "
"filter \nis steeper compared to the roll-off of the 3rd order filter.\n "
Position [235, 251]
FontName "Arial"
FontSize 14
}
}
}
Block {
BlockType Reference
Name "Matrix\nConcatenation"
Ports [2, 1]
Position [290, 94, 345, 136]
SourceBlock "simulink/Math\nOperations/Matrix\nConcatenation"
SourceType "Matrix Concatenation"
numInports "2"
catMethod "Horizontal"
}
Block {
BlockType Reference
Name "Matrix\nConcatenation2"
Ports [2, 1]
Position [285, 194, 340, 236]
ShowName off
SourceBlock "simulink/Math\nOperations/Matrix\nConcatenation"
SourceType "Matrix Concatenation"
numInports "2"
catMethod "Horizontal"
}
Block {
BlockType Reference
Name "Random\nSource"
Ports [0, 1]
Position [40, 196, 75, 234]
UserDataPersistent on
UserData "DataTag0"
Diagnostics "AllowInheritedTsInSrc"
SourceBlock "dspsrcs4/Random\nSource"
SourceType "Random Source"
SrcType "Gaussian"
NormMethod "Ziggurat"
CltLength "12"
MinVal "0"
MaxVal "1"
MeanVal "0"
VarVal "1"
RepMode "Not repeatable"
rawSeed "1"
IsInherit off
SampMode "Discrete"
SampTime "1e-7"
SampFrame "256"
DataType "Double"
OutComplex "Complex"
}
Block {
BlockType SubSystem
Name "Transfer Function "
Ports [2, 2]
Position [385, 124, 480, 246]
BackgroundColor "gray"
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskPromptString "FFT length (power of 2):|Spectral Averaging Fac"
"tor (>=1):|Percentage of Alias Free Data (<=100)|Unwrap Phase"
MaskStyleString "edit,edit,edit,checkbox"
MaskTunableValueString "on,on,on,on"
MaskCallbackString "|||"
MaskEnableString "on,on,on,on"
MaskVisibilityString "on,on,on,on"
MaskToolTipString "on,on,on,on"
MaskVarAliasString ",,,"
MaskVariables "NFFT=@1;Navg=@2;pcnt=@3;unwrap_flag=@4;"
MaskDisplay "disp('Transfer Function \\n Estimation')"
MaskIconFrame on
MaskIconOpaque off
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "1024|100|100|on"
MaskTabNameString ",,,"
System {
Name "Transfer Function "
Location [10, 78, 1247, 418]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "Reference"
Position [15, 48, 45, 62]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "Response"
Position [15, 128, 45, 142]
Port "2"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Reference
Name "Buffer"
Ports [1, 1]
Position [70, 30, 120, 80]
ShowName off
SourceBlock "dspbuff3/Buffer"
SourceType "Buffer"
N "NFFT"
V "NFFT/2"
ic "0"
}
Block {
BlockType Reference
Name "Buffer1"
Ports [1, 1]
Position [75, 110, 125, 160]
ShowName off
SourceBlock "dspbuff3/Buffer"
SourceType "Buffer"
N "NFFT"
V "NFFT/2"
ic "0"
}
Block {
BlockType Constant
Name "Complex Range"
Position [270, 175, 300, 205]
Value "[1:round(NFFT*pcnt/200),round(1+NFFT-NFFT*p"
"cnt/200):NFFT];"
}
Block {
BlockType ComplexToMagnitudeAngle
Name "Complex to\nMagnitude-Angle"
Ports [1, 1]
Position [870, 120, 900, 150]
Output "Angle"
}
Block {
BlockType Reference
Name "Downsample1"
Ports [1, 1]
Position [325, 38, 360, 72]
ShowName off
SourceBlock "dspsigops/Downsample"
SourceType "Downsample"
N "2"
phase "0"
ic "0"
smode "Allow multirate"
fmode "Maintain input frame rate"
}
Block {
BlockType Reference
Name "Downsample2"
Ports [1, 1]
Position [325, 118, 360, 152]
ShowName off
SourceBlock "dspsigops/Downsample"
SourceType "Downsample"
N "2"
phase "0"
ic "0"
smode "Allow multirate"
fmode "Maintain input frame rate"
}
Block {
BlockType Reference
Name "FFT"
Ports [1, 1]
Position [265, 38, 305, 72]
ShowName off
DialogController "dspDDGCreate"
DialogControllerArgs "DataTag1"
SourceBlock "dspxfrm3/FFT"
SourceType "FFT"
CompMethod "Table lookup"
TableOpt "Speed"
BitRevOrder off
additionalParams off
SkipNorm off
allowOverrides on
firstCoeffMode "Specify word length"
firstCoeffWordLength "16"
firstCoeffFracLength "15"
outputMode "Same as input"
outputWordLength "16"
outputFracLength "15"
accumMode "Inherit via internal rule"
accumWordLength "32"
accumFracLength "30"
prodOutputMode "Inherit via internal rule"
prodOutputWordLength "32"
prodOutputFracLength "30"
roundingMode "Floor"
overflowMode off
LockScale off
}
Block {
BlockType Reference
Name "FFT1"
Ports [1, 1]
Position [265, 118, 305, 152]
ShowName off
DialogController "dspDDGCreate"
DialogControllerArgs "DataTag2"
SourceBlock "dspxfrm3/FFT"
SourceType "FFT"
CompMethod "Table lookup"
TableOpt "Speed"
BitRevOrder off
additionalParams off
SkipNorm off
allowOverrides on
firstCoeffMode "User-defined"
firstCoeffWordLength "16"
firstCoeffFracLength "15"
outputMode "Same as input"
outputWordLength "16"
outputFracLength "15"
accumMode "Inherit via internal rule"
accumWordLength "32"
accumFracLength "30"
prodOutputMode "Inherit via internal rule"
prodOutputWordLength "32"
prodOutputFracLength "30"
roundingMode "Floor"
overflowMode off
LockScale off
}
Block {
BlockType Reference
Name "Filter1"
Ports [1, 1]
Position [675, 43, 745, 87]
ShowName off
SourceBlock "dsparch3/Direct-Form II\nTranspose Filter"
SourceType "Direct-Form II Transpose Filter"
num "1"
den "[Navg -(Navg-1)]"
ic "eps"
}
Block {
BlockType Reference
Name "Filter2"
Ports [1, 1]
Position [675, 118, 745, 162]
ShowName off
SourceBlock "dsparch3/Direct-Form II\nTranspose Filter"
SourceType "Direct-Form II Transpose Filter"
num "1"
den "[Navg -(Navg-1)]"
ic "eps"
}
Block {
BlockType Gain
Name "Gain"
Position [1105, 185, 1135, 215]
Gain "180/pi"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Math
Name "Magnitude\nSquared"
Ports [1, 1]
Position [610, 50, 640, 80]
ShowName off
Operator "magnitude^2"
}
Block {
BlockType Math
Name "Math\nFunction"
Ports [1, 1]
Position [555, 95, 585, 125]
Orientation "down"
NamePlacement "alternate"
ShowName off
Operator "conj"
}
Block {
BlockType Math
Name "Math\nFunction1"
Ports [1, 1]
Position [965, 60, 995, 90]
ShowName off
Operator "magnitude^2"
}
Block {
BlockType SubSystem
Name "Phase Unwrap"
Ports [1, 1]
Position [960, 105, 1000, 165]
TreatAsAtomicUnit off
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -