📄 two_tone_lna.mdl
字号:
"nCheckbox');|||dspblkbfftscope2('dynamic','DisplayProperties');|||||||dspblkb"
"fftscope2('dynamic','OpenScope');||dspblkbfftscope2('dynamic','AxisProperties"
"');|||dspblkbfftscope2('dynamic','InheritXIncr');|||||||dspblkbfftscope2('dyn"
"amic','LineProperties');||||"
MaskEnableString "on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
",on,on,on,on,on,on,off,on,on,on,on,on,on,on,on,on,on"
MaskVisibilityString "on,off,off,on,off,off,on,off,on,on,off,off,off,"
"off,off,off,off,off,on,off,off,off,off,off,off,off,off,off,on,off,off,off,off"
MaskToolTipString "on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
",on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
MaskVarAliasString ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"
MaskVariables "ScopeProperties=&1;Domain=@2;HorizSpan=@3;UseBu"
"ffer=&4;BufferSize=@5;Overlap=@6;inpFftLenInherit=@7;FFTlength=@8;numAvg=@9;D"
"isplayProperties=&10;AxisGrid=&11;Memory=&12;FrameNumber=&13;AxisLegend=&14;A"
"xisZoom=&15;OpenScopeAtSimStart=&16;OpenScopeImmediately=&17;FigPos=@18;AxisP"
"roperties=&19;XUnits=@20;XRange=@21;InheritXIncr=&22;XIncr=@23;XLabel=&24;YUn"
"its=@25;YMin=@26;YMax=@27;YLabel=&28;LineProperties=&29;LineDisables=&30;Line"
"Styles=&31;LineMarkers=&32;LineColors=&33;"
MaskInitialization "[x,y,str] = dspblkbfftscope2('icon');\ns = dspb"
"lkbfftscope2('init');"
MaskDisplay "plot(x,y); text(14,20,str);\n"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "on|Frequency|1|off|128|64|off|128|2|off|on|off|"
"on|off|off|on|off|get(0,'defaultfigureposition')|off|Hertz|[-Fs/2...Fs/2]|on|"
"1.0|Samples|dB|-160|40|Magnitude, dB|off|||x|"
MaskTabNameString ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"
System {
Name "Modified\nSpectrum\nScope\nBoxcar"
Location [388, 484, 878, 627]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 53, 55, 67]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Gain
Name "Calibration Gain"
Position [135, 45, 165, 75]
AttributesFormatString "%<Gain>"
Gain "sqrt(1000/samp_frame/Z0) % 1000 mW per W"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType DataTypeConversion
Name "Data Type Conversion"
Position [305, 46, 360, 74]
ShowName off
OutDataTypeMode "double"
}
Block {
BlockType "M-S-Function"
Name "Frame Scope"
Ports [1]
Position [510, 46, 590, 74]
CopyFcn ";"
MFile "sdspfscope2"
Parameters "2"
MaskType "Frame Scope"
MaskDescription "Level-2 M-file S-function for frame scope."
MaskHelp "web(dspbhelp);"
MaskDisplay "disp('Frame\\nScope')"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Block {
BlockType SubSystem
Name "Optional\nBuffering"
Ports [1, 1]
Position [225, 38, 275, 82]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskType "Replaceable Contents"
MaskDescription "Configurable subsystem holding blocks which"
" may be replaced by virtual short-circuits (muxes) when not needed."
MaskHelp "\n"
MaskPromptString "Relative name of blocks to replace:|Simulin"
"k path to each source block:|Parameter/value pairs to each block:|Replace wit"
"h short-circuit:"
MaskStyleString "edit,edit,edit,edit"
MaskTunableValueString "off,off,off,off"
MaskCallbackString "|||"
MaskEnableString "on,on,on,on"
MaskVisibilityString "on,on,on,on"
MaskToolTipString "on,on,on,on"
MaskVarAliasString ",,,"
MaskVariables "oname=&1;osrc=&2;oargs=@3;replace=@4;"
MaskInitialization "opts.name = oname; opts.src = osrc; opts.ar"
"gs = oargs;\ndspskipblk(gcb,opts,replace);\n"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "Buffer|dspbuff3/Buffer|{'N','BufferSize','V"
"','Overlap','ic','0'}|strcmp(UseBuffer,'off')"
MaskTabNameString ",,,"
System {
Name "Optional\nBuffering"
Location [112, 787, 368, 881]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In"
Position [25, 38, 55, 52]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Mux
Name "Buffer"
Ports [1, 1]
Position [80, 20, 130, 70]
Inputs "1"
}
Block {
BlockType Outport
Name "Out"
Position [160, 38, 190, 52]
IconDisplay "Port number"
BusOutputAsStruct off
InitialOutput "0"
}
Line {
SrcBlock "Buffer"
SrcPort 1
DstBlock "Out"
DstPort 1
}
Line {
SrcBlock "In"
SrcPort 1
DstBlock "Buffer"
DstPort 1
}
}
}
Block {
BlockType Reference
Name "Periodogram"
Ports [1, 1]
Position [390, 34, 470, 86]
SourceBlock "dspspect3/Periodogram"
SourceType "Periodogram"
ShowPortLabels on
wintype "Boxcar"
Rs "50"
beta "5"
winsamp "Periodic"
inheritFFT on
fftsize "FFTlength"
navg "numAvg"
}
Block {
BlockType Outport
Name "Out"
Position [530, 158, 560, 172]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Periodogram"
SrcPort 1
Points [0, 0; 10, 0]
Branch {
DstBlock "Frame Scope"
DstPort 1
}
Branch {
Points [0, 105]
DstBlock "Out"
DstPort 1
}
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Calibration Gain"
DstPort 1
}
Line {
SrcBlock "Optional\nBuffering"
SrcPort 1
DstBlock "Data Type Conversion"
DstPort 1
}
Line {
SrcBlock "Data Type Conversion"
SrcPort 1
DstBlock "Periodogram"
DstPort 1
}
Line {
SrcBlock "Calibration Gain"
SrcPort 1
DstBlock "Optional\nBuffering"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Peak detect to Workspace"
Ports [1]
Position [665, 26, 705, 64]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "Peak detect to Workspace"
Location [512, 160, 922, 407]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In"
Position [25, 25, 55, 40]
Orientation "down"
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Selector
Name "0 Hz intermod tone"
Ports [1, 1]
Position [120, 41, 160, 79]
InputPortWidth "samp_frame"
}
Block {
BlockType Reference
Name "Abs Maximum"
Ports [1, 2]
Position [160, 135, 215, 175]
DialogController "dspDDGCreate"
DialogControllerArgs "DataTag4"
SourceBlock "dspstat3/Maximum"
SourceType "Maximum"
fcn "Value and Index"
reset "None"
additionalParams off
allowOverrides on
accumMode "Same as product output"
accumWordLength "32"
accumFracLength "30"
prodOutputMode "Same as input"
prodOutputWordLength "32"
prodOutputFracLength "30"
roundingMode "Floor"
overflowMode off
LockScale off
}
Block {
BlockType ToWorkspace
Name "To Workspace"
Position [325, 45, 385, 75]
VariableName "intermod"
MaxDataPoints "1"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace1"
Position [275, 130, 335, 160]
VariableName "peak"
MaxDataPoints "1"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace2"
Position [285, 190, 345, 220]
VariableName "peak_index"
MaxDataPoints "1"
SampleTime "-1"
SaveFormat "Array"
}
Line {
SrcBlock "In"
SrcPort 1
Points [0, 0; 0, 15]
Branch {
DstBlock "0 Hz intermod tone"
DstPort 1
}
Branch {
Points [0, 95]
DstBlock "Abs Maximum"
DstPort 1
}
}
Line {
SrcBlock "0 Hz intermod tone"
SrcPort 1
DstBlock "To Workspace"
DstPort 1
}
Line {
SrcBlock "Abs Maximum"
SrcPort 1
DstBlock "To Workspace1"
DstPort 1
}
Line {
SrcBlock "Abs Maximum"
SrcPort 2
Points [25, 0; 0, 40]
DstBlock "To Workspace2"
DstPort 1
}
}
}
Block {
BlockType Reference
Name "Sine Wave"
Ports [0, 1]
Position [15, 23, 60, 67]
AttributesFormatString "Amplitude = %<Amplitude>"
SourceBlock "dspsrcs4/Sine Wave"
SourceType "Sine Wave"
Amplitude "ampl"
Frequency "0.125/t_s"
Phase "rand(1,1)*2*pi"
SampleMode "Discrete"
OutComplex "Complex"
CompMethod "Trigonometric fcn"
TableSize "Speed"
SampleTime "t_s"
SamplesPerFrame "samp_frame"
additionalParams off
allowOverrides on
dataType "double"
wordLen "16"
udDataType "sfix(16)"
fracBitsMode "Best precision"
numFracBits "15"
ResetState "Restart at time zero"
}
Block {
BlockType Reference
Name "Sine Wave1"
Ports [0, 1]
Position [20, 118, 65, 162]
AttributesFormatString "Amplitude = %<Amplitude>"
SourceBlock "dspsrcs4/Sine Wave"
SourceType "Sine Wave"
Amplitude "ampl"
Frequency "0.0625/t_s"
Phase "rand(1,1)*2*pi"
SampleMode "Discrete"
OutComplex "Complex"
CompMethod "Trigonometric fcn"
TableSize "Speed"
SampleTime "t_s"
SamplesPerFrame "samp_frame"
additionalParams off
allowOverrides on
dataType "double"
wordLen "16"
udDataType "sfix(16)"
fracBitsMode "Best precision"
numFracBits "15"
ResetState "Restart at time zero"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [90, 35, 110, 55]
ShowName off
IconShape "round"
Inputs "|++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Display
Name "dBm"
Ports [1]
Position [415, 165, 505, 195]
Format "bank"
Decimation "1"
}
Block {
BlockType Display
Name "dBm1"
Ports [1]
Position [705, 185, 795, 215]
Format "bank"
Decimation "1"
}
Line {
SrcBlock "Sine Wave"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Sine Wave1"
SrcPort 1
Points [30, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
Points [0, 135]
DstBlock "Amp to dBm"
DstPort 1
}
Branch {
DstBlock "Amplifier"
DstPort 1
}
}
Line {
SrcBlock "Amplifier"
SrcPort 1
Points [195, 0]
Branch {
Points [0, 155]
DstBlock "Amp to dBm1"
DstPort 1
}
Branch {
DstBlock "Modified\nSpectrum\nScope\nBoxcar"
DstPort 1
}
}
Line {
SrcBlock "Amp to dBm"
SrcPort 1
DstBlock "dBm"
DstPort 1
}
Line {
SrcBlock "Amp to dBm1"
SrcPort 1
DstBlock "dBm1"
DstPort 1
}
Line {
SrcBlock "Modified\nSpectrum\nScope\nBoxcar"
SrcPort 1
DstBlock "Peak detect to Workspace"
DstPort 1
}
}
}
MatData {
NumRecords 5
DataRecord {
Tag DataTag4
Data " %)30 . : 8 ( 0 % "
"\" $ ! 0 . . 8 ( ! % \" $ "
"& 0 0 !@ $UI;DUA> "
}
DataRecord {
Tag DataTag3
Data " %)30 . 8 8 ( 0 % "
"\" $ ! 0 . , 8 ( ! % \" $ "
"$ 0 0 0 365A;@"
}
DataRecord {
Tag DataTag2
Data " %)30 . 8 8 ( 0 % "
"\" $ ! 0 . , 8 ( ! % \" $ "
"$ 0 0 0 365A;@"
}
DataRecord {
Tag DataTag1
Data " %)30 . 8 8 ( 0 % "
"\" $ ! 0 . , 8 ( ! % \" $ "
"$ 0 0 0 365A;@"
}
DataRecord {
Tag DataTag0
Data " %)30 . 8 8 ( 0 % "
"\" $ ! 0 . , 8 ( ! % \" $ "
"$ 0 0 0 365A;@"
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -