📄 ofdm_12.mdl
字号:
ShowPortLabels "FromPortIcon"
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
Value "0"
SampleMode "Discrete"
discreteOutput "Sample-based (interpret vectors as 1-D)"
continuousOutput "Sample-based"
sampTime "inf"
framePeriod "inf"
additionalParams on
allowOverrides on
dataType "Inherit via back propagation"
isSigned on
wordLen "16"
udDataType "sfix(16)"
fracBitsMode "Best precision"
numFracBits "15"
InterpretAs1D "on"
Ts "inf"
FramebasedOutput "off"
}
Block {
BlockType SubSystem
Name "Discrete-Time\nNCO"
Ports [1, 1]
Position [505, 443, 585, 487]
Orientation "left"
BackgroundColor "cyan"
FontName "Arial"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskType "Discrete-Time VCO"
MaskDescription "Generate a discrete-time output signal whose frequency changes in response to the amplitude variations of the input signal. The input signal must be a scalar."
MaskHelp "helpview(commbhelp)"
MaskPromptString "Output amplitude:|Oscillation frequency (Hz):|Input sensitivity:|Initial phase (rad):|Sample time:"
MaskStyleString "edit,edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on,on"
MaskCallbackString "||||"
MaskEnableString "on,on,on,on,on"
MaskVisibilityString "on,on,on,on,on"
MaskToolTipString "on,on,on,on,on"
MaskVarAliasString ",,,,"
MaskVariables "Ac=@1;Fc=@2;Kc=@3;Ph=@4;ts=@5;"
MaskInitialization "if ((length(Ac)~=1) | (length(Fc)~=1) | (length(Kc)~=1) | (length(Ph)~=1) | (length(ts)~=1) |(length(Ph)~=1))error('Mask parameters must be scalar values.');end;\npi2=2*pi;"
MaskDisplay "disp('Discrete-Time\\nNCO (rab)')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "1|0|1|0|2/F_nco"
MaskTabNameString ",,,,"
System {
Name "Discrete-Time\nNCO"
Location [117, 251, 1041, 466]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "in_1"
Position [40, 45, 60, 65]
ShowName off
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Reference
Name "Discrete\nConstant1"
Ports [0, 1]
Position [205, 59, 255, 91]
ShowName off
SourceBlock "dspsrcs4/DSP\nConstant"
SourceType "DSP Constant"
ShowPortLabels "FromPortIcon"
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
Value "Fc*pi2*ts"
SampleMode "Discrete"
discreteOutput "Sample-based (interpret vectors as 1-D)"
continuousOutput "Sample-based"
sampTime "ts"
framePeriod "ts"
additionalParams on
allowOverrides on
dataType "Inherit via back propagation"
isSigned on
wordLen "16"
udDataType "sfix(16)"
fracBitsMode "Best precision"
numFracBits "15"
InterpretAs1D "on"
Ts "ts"
FramebasedOutput "off"
}
Block {
BlockType Reference
Name "Discrete\nConstant2"
Ports [0, 1]
Position [300, 120, 340, 140]
ShowName off
SourceBlock "dspsrcs4/DSP\nConstant"
SourceType "DSP Constant"
ShowPortLabels "FromPortIcon"
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
Value "pi2"
SampleMode "Discrete"
discreteOutput "Sample-based (interpret vectors as 1-D)"
continuousOutput "Sample-based"
sampTime "ts"
framePeriod "ts"
additionalParams on
allowOverrides on
dataType "Inherit via back propagation"
isSigned on
wordLen "16"
udDataType "sfix(16)"
fracBitsMode "Best precision"
numFracBits "15"
InterpretAs1D "on"
Ts "ts"
FramebasedOutput "off"
}
Block {
BlockType Math
Name "Math\nFunction"
Ports [2, 1]
Position [385, 67, 415, 98]
Operator "mod"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType RealImagToComplex
Name "Real-Imag to\nComplex"
Ports [2, 1]
Position [705, 93, 735, 122]
}
Block {
BlockType Gain
Name "Sensitivity"
Position [100, 32, 175, 78]
ShowName off
Gain "Kc*pi2*ts"
ParameterDataType "sfix(16)"
ParameterScaling "2^0"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Gain
Name "Sensitivity2"
Position [765, 89, 820, 131]
ShowName off
Gain "Ac"
ParameterDataType "sfix(16)"
ParameterScaling "2^0"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Sum
Name "Sum1"
Ports [3, 1]
Position [305, 45, 330, 105]
ShowName off
Inputs "+++"
CollapseMode "All dimensions"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Trigonometry
Name "Trigonometric\nFunction"
Ports [1, 1]
Position [585, 72, 630, 98]
ShowName off
Operator "cos"
}
Block {
BlockType Trigonometry
Name "Trigonometric\nFunction1"
Ports [1, 1]
Position [585, 117, 630, 143]
ShowName off
}
Block {
BlockType UnitDelay
Name "Unit Delay"
Position [475, 75, 525, 95]
ShowName off
X0 "Ph"
SampleTime "ts"
}
Block {
BlockType Outport
Name "out_1"
Position [855, 100, 875, 120]
ShowName off
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
InitialOutput "0"
}
Line {
SrcBlock "Discrete\nConstant1"
SrcPort 1
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "Sensitivity2"
SrcPort 1
DstBlock "out_1"
DstPort 1
}
Line {
SrcBlock "Trigonometric\nFunction"
SrcPort 1
Points [45, 0; 0, 15]
DstBlock "Real-Imag to\nComplex"
DstPort 1
}
Line {
SrcBlock "Unit Delay"
SrcPort 1
Points [20, 0]
Branch {
Points [0, 45]
Branch {
Points [0, 50; -280, 0; 0, -85]
DstBlock "Sum1"
DstPort 3
}
Branch {
DstBlock "Trigonometric\nFunction1"
DstPort 1
}
}
Branch {
DstBlock "Trigonometric\nFunction"
DstPort 1
}
}
Line {
SrcBlock "Sensitivity"
SrcPort 1
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "in_1"
SrcPort 1
DstBlock "Sensitivity"
DstPort 1
}
Line {
SrcBlock "Math\nFunction"
SrcPort 1
DstBlock "Unit Delay"
DstPort 1
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "Math\nFunction"
DstPort 1
}
Line {
SrcBlock "Discrete\nConstant2"
SrcPort 1
Points [25, 0]
DstBlock "Math\nFunction"
DstPort 2
}
Line {
SrcBlock "Trigonometric\nFunction1"
SrcPort 1
Points [45, 0; 0, -15]
DstBlock "Real-Imag to\nComplex"
DstPort 2
}
Line {
SrcBlock "Real-Imag to\nComplex"
SrcPort 1
DstBlock "Sensitivity2"
DstPort 1
}
Annotation {
Name "Amplitude"
Position [787, 143]
}
Annotation {
Name "Phase Accumulator\nModulus"
Position [322, 159]
}
Annotation {
Name "Center Freq"
Position [226, 101]
}
Annotation {
Name "VCO Sensitivity"
Position [111, 83]
}
Annotation {
Name "initial condx=Ph"
Position [497, 104]
}
}
}
Block {
BlockType Reference
Name "Downsample"
Ports [1, 1]
Position [710, 418, 745, 452]
SourceBlock "dspsigops/Downsample"
SourceType "Downsample"
N "D/2"
phase "0"
ic "0"
smode "Allow multirate"
fmode "Maintain input frame size"
}
Block {
BlockType SubSystem
Name "Farrow Variable Delay"
Ports [3, 1]
Position [500, 344, 600, 416]
Orientation "left"
BackgroundColor "cyan"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
System {
Name "Farrow Variable Delay"
Location [359, 107, 901, 270]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "Xin"
Position [35, 93, 65, 107]
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Inport
Name "Mu"
Position [40, 63, 70, 77]
NamePlacement "alternate"
Port "2"
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Inport
Name "Strobe"
Position [35, 18, 65, 32]
NamePlacement "alternate"
Port "3"
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType SubSystem
Name "Calculate Filter"
Ports [2, 1, 1]
Position [275, 54, 375, 116]
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
System {
Name "Calculate Filter"
Location [230, 174, 637, 378]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 28, 55, 42]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "In2"
Position [20, 63, 50, 77]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType EnablePort
Name "Enable"
Ports []
Position [270, 100, 290, 120]
}
Block {
BlockType Gain
Name "Filter coefficients"
Position [100, 45, 165, 95]
Gain "fliplr([b3;b2;b1;b0])"
Multiplication "Matrix(K*u)"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -