📄 rf_bb_1.mdl
字号:
X0 "0"
OutPortSampleTime "-1"
}
Block {
BlockType "S-Function"
FunctionName "system"
SFunctionModules "''"
PortCounts "[]"
}
Block {
BlockType StateSpace
A "1"
B "1"
C "1"
D "1"
X0 "0"
AbsoluteTolerance "auto"
Realization "auto"
}
Block {
BlockType SubSystem
ShowPortLabels on
Permissions "ReadWrite"
PermitHierarchicalResolution "All"
SystemSampleTime "-1"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
Block {
BlockType Switch
Criteria "u2 >= Threshold"
Threshold "0"
InputSameDT on
OutDataTypeMode "Inherit via internal rule"
RndMeth "Floor"
SaturateOnIntegerOverflow on
ZeroCross on
SampleTime "-1"
}
Block {
BlockType Terminator
}
Block {
BlockType UniformRandomNumber
Minimum "-1"
Maximum "1"
Seed "0"
SampleTime "-1"
VectorParams1D on
}
Block {
BlockType ZeroOrderHold
SampleTime "1"
}
}
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 "rf_bb_1"
Location [46, 91, 699, 359]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "111"
ReportName "simulink-default.rpt"
Block {
BlockType SubSystem
Name "Base Band Transfer Function"
Description "Spectrum Analyzer"
Ports [2, 3]
Position [195, 88, 350, 172]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskPromptString "Bandwidth|FFT Length (power of 2)|Averaging Fac"
"tor (>=1)"
MaskStyleString "edit,edit,edit"
MaskTunableValueString "on,on,on"
MaskCallbackString "||"
MaskEnableString "on,on,on"
MaskVisibilityString "on,on,on"
MaskToolTipString "on,on,on"
MaskVarAliasString ",,"
MaskVariables "BW=@1;NFFT=@2;Avg_fac=@3;"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "5e6|1024|100"
MaskTabNameString ",,"
System {
Name "Base Band Transfer Function"
Location [251, 197, 855, 491]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "Reference "
Position [35, 52, 75, 68]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "Response"
Position [30, 137, 70, 153]
Port "2"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType SubSystem
Name "Transfer Function"
Ports [2, 2]
Position [340, 39, 435, 161]
BackgroundColor "gray"
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskPromptString "FFT length (power of 2):|Spectral Averaging"
" Factor (>=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 "NFFT|Avg_fac|100/1.28|on"
MaskTabNameString ",,,"
System {
Name "Transfer Function"
Location [8, 82, 1249, 438]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "IN"
Position [15, 48, 45, 62]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "OUT"
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-NF"
"FT*pcnt/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 "DataTag0"
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 "DataTag1"
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 Filt"
"er"
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 Filt"
"er"
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
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "Phase Unwrap"
Location [195, 140, 1245, 427]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "IN"
Position [40, 73, 70, 87]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Constant
Name "Constant"
Position [35, 200, 65, 230]
Value "fliplr([ceil(NFFT*pcnt/200)+1:floor"
"(NFFT*pcnt/100) 1:ceil(NFFT*pcnt/200)]); "
}
Block {
BlockType SubSystem
Name "Embedded\nMATLAB Function1"
Ports [1, 1]
Position [605, 67, 675, 113]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
Array {
Type "Handle"
Dimension 0
PropName "AvailSigsLoadSave"
}
MaskType "Stateflow"
MaskDescription "Embedded MATLAB block"
MaskDisplay "disp('center_sub');"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque off
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Embedded\nMATLAB Function1"
Location [257, 457, 812, 717]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "u"
Position [20, 101, 40, 119]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Demux
Name " Demux "
Ports [1, 1]
Position [270, 160, 320, 200]
Outputs "1"
}
Block {
BlockType "S-Function"
Name " SFunction "
Tag "Stateflow S-Function rf_bb_1 4"
Ports [1, 2]
Position [180, 100, 230, 160]
FunctionName "sf_sfun"
PortCounts "[1 2]"
Port {
PortNumber 2
Name "y"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
ShowSigGenPortName on
}
}
Block {
BlockType Terminator
Name " Terminator "
Position [460, 171, 480, 189]
}
Block {
BlockType Outport
Name "y"
Position [460, 101, 480, 119]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock " SFunction "
SrcPort 1
Points [0, 65]
DstBlock " Demux "
DstPort 1
}
Line {
SrcBlock " Demux "
SrcPort 1
DstBlock " Terminator "
DstPort 1
}
Line {
SrcBlock "u"
SrcPort 1
DstBlock " SFunction "
DstPort 1
}
Line {
Name "y"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 2
DstBlock "y"
DstPort 1
}
}
}
Block {
BlockType FrameConversion
Name "Frame Conversion"
Position [300, 70, 355, 110]
OutFrame "Frame based"
}
Block {
BlockType FrameConversion
Name "Frame Conversion2"
Position [505, 70, 560, 110]
OutFrame "Sample based"
}
Block {
BlockType Reference
Name "Unwrap"
Ports [1, 1]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -