📄 sparam_2.mdl
字号:
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
Block {
BlockType Sum
IconShape "rectangular"
Inputs "++"
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Terminator
}
Block {
BlockType TransferFcn
Numerator "[1]"
Denominator "[1 2 1]"
AbsoluteTolerance "auto"
Realization "auto"
}
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 "sparam_2"
Location [19, 101, 1002, 515]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "yellow"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "90"
ReportName "simulink-default.rpt"
Block {
BlockType SubSystem
Name "Base Band Transfer Function1"
Description "Spectrum Analyzer"
Ports [2, 1]
Position [65, 125, 215, 180]
AncestorBlock "rab_favorites/Base Band Transfer Function1"
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskPromptString "Bandwidth"
MaskStyleString "edit"
MaskTunableValueString "on"
MaskEnableString "on"
MaskVisibilityString "on"
MaskToolTipString "on"
MaskVariables "BW=@1;"
MaskDisplay "fprintf('Baseband Xfer Function Est. \\n BW=%"
"7.2f MHz', BW)"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "750"
Port {
PortNumber 1
Name "a1"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
ShowSigGenPortName on
}
System {
Name "Base Band Transfer Function1"
Location [35, 566, 917, 784]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "Reference "
Position [45, 52, 85, 68]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "Response"
Position [40, 137, 80, 153]
Port "2"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Reference
Name "Magnitude in dB"
Ports [1]
Position [510, 60, 545, 110]
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 "[33 296 372 236]"
AxisProperties off
XUnits "Hertz"
XRange "[0...Fs/2]"
InheritXIncr on
XIncr "2*Fs"
XLabel "Time"
YUnits "dB"
YMin "-20"
YMax "30"
YLabel "dB"
LineProperties off
ShowPortLabels off
}
Block {
BlockType Reference
Name "Phase in Degrees"
Ports [1]
Position [510, 135, 545, 185]
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 "[489 288 372 236]"
AxisProperties off
XUnits "Hertz"
XRange "[0...Fs/2]"
InheritXIncr on
XIncr "1"
XLabel "Frequency"
YUnits "Magnitude"
YMin "-1000"
YMax "0"
YLabel "Amplitude"
LineProperties off
ShowPortLabels off
}
Block {
BlockType SubSystem
Name "Transfer Function"
Ports [2, 2]
Position [315, 70, 425, 130]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskPromptString "FFT length:|Number of spectral averages:"
MaskStyleString "edit,edit"
MaskTunableValueString "on,on"
MaskCallbackString "|"
MaskEnableString "on,on"
MaskVisibilityString "on,on"
MaskToolTipString "on,on"
MaskVarAliasString ","
MaskVariables "NFFT=@1;Navg=@2;"
MaskDisplay "disp('Compute\\nTransfer\\nFunction')"
MaskIconFrame on
MaskIconOpaque off
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "512|100"
MaskTabNameString ","
System {
Name "Transfer Function"
Location [35, 144, 1148, 374]
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 [70, 110, 120, 160]
ShowName off
SourceBlock "dspbuff3/Buffer"
SourceType "Buffer"
N "NFFT"
V "NFFT/2"
ic "0"
}
Block {
BlockType ComplexToMagnitudeAngle
Name "Complex to\nMagnitude-Angle"
Ports [1, 1]
Position [695, 110, 725, 140]
Output "Angle"
}
Block {
BlockType Reference
Name "Downsample"
Ports [1, 1]
Position [620, 48, 655, 82]
ShowName off
SourceBlock "dspsigops/Downsample"
SourceType "Downsample"
N "2"
phase "0"
ic "0"
smode "Allow multirate"
fmode "Maintain input frame rate"
}
Block {
BlockType SubSystem
Name "Embedded\nMATLAB Function"
Ports [1, 1]
Position [755, 101, 835, 149]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskType "Stateflow"
MaskDescription "Embedded MATLAB block"
MaskDisplay "disp('unwrapper');"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque off
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Embedded\nMATLAB Function"
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 sparam_2 1"
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 {
Name "y"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 2
DstBlock "y"
DstPort 1
}
Line {
SrcBlock "u"
SrcPort 1
DstBlock " SFunction "
DstPort 1
}
Line {
SrcBlock " Demux "
SrcPort 1
DstBlock " Terminator "
DstPort 1
}
Line {
SrcBlock " SFunction "
SrcPort 1
Points [0, 65]
DstBlock " Demux "
DstPort 1
}
}
}
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 [450, 33, 520, 77]
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 [450, 108, 520, 152]
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 FrameConversion
Name "Frame Conversion1"
Position [865, 45, 920, 85]
ShowName off
OutFrame "Frame based"
}
Block {
BlockType FrameConversion
Name "Frame Conversion3"
Position [865, 105, 920, 145]
OutFrame "Frame based"
}
Block {
BlockType Gain
Name "Gain"
Position [960, 110, 990, 140]
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 [385, 40, 415, 70]
ShowName off
Operator "magnitude^2"
}
Block {
BlockType Math
Name "Math\nFunction"
Ports [1, 1]
Position [330, 75, 360, 105]
Orientation "down"
NamePlacement "alternate"
ShowName off
Operator "conj"
}
Block {
BlockType Math
Name "Math\nFunction1"
Ports [1, 1]
Position [945, 50, 975, 80]
ShowName off
Operator "magnitude^2"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [375, 111, 420, 144]
ShowName off
RndMeth "Floor"
}
Block {
BlockType Product
Name "Product2"
Ports [2, 1]
Position [565, 49, 590, 76]
ShowName off
Inputs "/*"
RndMeth "Floor"
}
Block {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -