📄 mod_demo.mdl
字号:
BlockType ComplexToRealImag
Output "Real and imag"
SampleTime "-1"
}
Block {
BlockType Constant
Value "1"
VectorParams1D on
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
}
Block {
BlockType DataTypeConversion
OutDataTypeMode "Inherit via back propagation"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
ConvertRealWorld "Real World Value (RWV)"
RndMeth "Zero"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Demux
Outputs "4"
DisplayOption "none"
BusSelectionMode off
}
Block {
BlockType DiscretePulseGenerator
PulseType "Sample based"
TimeSource "Use simulation time"
Amplitude "1"
Period "2"
PulseWidth "1"
PhaseDelay "0"
SampleTime "1"
VectorParams1D on
}
Block {
BlockType Inport
Port "1"
UseBusObject off
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
LatchByDelayingOutsideSignal off
LatchByCopyingInsideSignal off
Interpolate on
}
Block {
BlockType "M-S-Function"
FunctionName "mlfile"
}
Block {
BlockType Outport
Port "1"
UseBusObject off
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Product
Inputs "2"
Multiplication "Element-wise(.*)"
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Zero"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Scope
ModelBased off
TickLabels "OneTimeTick"
ZoomMode "on"
Grid "on"
TimeRange "auto"
YMin "-5"
YMax "5"
SaveToWorkspace off
SaveName "ScopeData"
LimitDataPoints on
MaxDataPoints "5000"
Decimation "1"
SampleInput off
SampleTime "-1"
}
Block {
BlockType "S-Function"
FunctionName "system"
SFunctionModules "''"
PortCounts "[]"
}
Block {
BlockType Sin
SineType "Time based"
TimeSource "Use simulation time"
Amplitude "1"
Bias "0"
Frequency "1"
Phase "0"
Samples "10"
Offset "0"
SampleTime "-1"
VectorParams1D on
}
Block {
BlockType SubSystem
ShowPortLabels on
Permissions "ReadWrite"
PermitHierarchicalResolution "All"
SystemSampleTime "-1"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
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 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 "mod_demo"
Location [604, 400, 1185, 939]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType ComplexToRealImag
Name " "
Ports [1, 2]
Position [315, 367, 365, 398]
Output "Real and imag"
}
Block {
BlockType Reference
Name "DQPSK\nModulator\nBaseband"
Ports [1, 1]
Position [185, 306, 260, 354]
SourceBlock "commdigbbndpm3/DQPSK\nModulator\nBaseband"
SourceType "DQPSK Modulator Baseband"
ShowPortLabels on
InType "Bit"
Enc "Gray"
Ph "0"
outDtype "double"
}
Block {
BlockType Demux
Name "Demux"
Ports [1, 2]
Position [405, 33, 410, 62]
BackgroundColor "black"
ShowName off
Outputs "2"
DisplayOption "bar"
}
Block {
BlockType Reference
Name "Discrete-Time\nScatter Plot\nScope"
Tag "ScatterPlot"
Ports [1]
Position [395, 429, 470, 481]
Diagnostics "AllowInheritedTsInSrc"
SourceBlock "commsink2/Discrete-Time\nScatter Plot\nScope"
SourceType "Discrete-Time Scatter Plot Scope"
ShowPortLabels on
sampPerSymb "1"
offsetEye "0"
numTraces "40"
numNewFrames "10"
LineMarkers "*"
LineColors "r"
fading off
render on
AxisGrid on
xMin "-1.5"
xMax "1.5"
yMin "-1.5"
yMax "1.5"
inphaseLabel "In-phase Amplitude"
quadratureLabel "Quadrature Amplitude"
openScopeAtSimStart on
FrameNumber on
FigPos "[360 362 560 560]"
figTitle "Scatter Plot"
numLinesMax "8"
block_type_ "scatter"
}
Block {
BlockType Reference
Name "M-PSK\nModulator\nBaseband"
Ports [1, 1]
Position [185, 84, 260, 136]
SourceBlock "commdigbbndpm3/M-PSK\nModulator\nBaseband"
SourceType "M-PSK Modulator Baseband"
M "4"
InType "Bit"
Enc "Gray"
Ph "0"
outDtype "double"
}
Block {
BlockType Reference
Name "Rectangular QAM\nModulator\nBaseband"
Ports [1, 1]
Position [185, 194, 260, 246]
SourceBlock "commdigbbndam3/Rectangular QAM\nModulator\nBase"
"band"
SourceType "Rectangular QAM Modulator Baseband"
M "4"
InType "Bit"
Enc "Gray"
PowType "Min. distance between symbols"
MinDist "2"
AvgPow "1"
PeakPow "1"
Ph "0"
outDtype "double"
}
Block {
BlockType Reference
Name "Sampled read\nfrom wksp"
Ports [0, 1]
Position [30, 88, 110, 132]
SourceBlock "commsource/Sampled read\nfrom wksp"
SourceType "Sampled read from workspace"
ShowPortLabels on
X "a"
td "1"
cyc off
}
Block {
BlockType ZeroOrderHold
Name "T/4"
Position [315, 436, 350, 474]
SampleTime "T"
}
Block {
BlockType Scope
Name "Time\nScope1"
Ports [2]
Position [435, 367, 465, 398]
Floating off
Location [580, 208, 1275, 893]
Open off
NumInputPorts "2"
ZoomMode "xonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
}
YMin "-5~-5"
YMax "5~5"
DataFormat "Structure"
MaxDataPoints "100000"
SampleTime "0"
}
Block {
BlockType Scope
Name "Time\nScope2"
Ports [5]
Position [435, 30, 470, 110]
Floating off
Location [660, 124, 1274, 905]
Open on
NumInputPorts "5"
ZoomMode "yonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
axes3 "%<SignalLabel>"
axes4 "%<SignalLabel>"
axes5 "%<SignalLabel>"
}
TimeRange "4"
YMin "-1~-1~-2~-4~-2"
YMax "2~2~2~4~2"
SaveName "ScopeData2"
DataFormat "Structure"
MaxDataPoints "100000"
SampleTime "0"
}
Block {
BlockType SubSystem
Name "Up Convert"
Ports [1, 1]
Position [310, 301, 360, 359]
NamePlacement "alternate"
FontName "Arial"
TreatAsAtomicUnit on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "Up Convert"
Location [471, 581, 1231, 877]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In"
Position [215, 108, 245, 122]
IconDisplay "Port number"
}
Block {
BlockType ComplexToRealImag
Name " "
Ports [1, 2]
Position [290, 97, 340, 128]
Output "Real and imag"
}
Block {
BlockType Product
Name " "
Ports [2, 1]
Position [480, 41, 525, 74]
RndMeth "Floor"
}
Block {
BlockType Product
Name " "
Ports [2, 1]
Position [485, 166, 530, 199]
RndMeth "Floor"
}
Block {
BlockType Sin
Name "I "
Ports [0, 1]
Position [405, 90, 435, 120]
Orientation "up"
SineType "Time based"
Frequency "2*pi*Fc"
Phase "pi/2"
SampleTime "T/1000"
}
Block {
BlockType Sin
Name "Q"
Ports [0, 1]
Position [405, 120, 435, 150]
Orientation "down"
SineType "Time based"
Frequency "2*pi*Fc"
SampleTime "T/1000"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [580, 89, 615, 131]
ShowName off
Inputs "+-"
}
Block {
BlockType Outport
Name "Out"
Position [650, 103, 680, 117]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "In"
SrcPort 1
Points [0, 0]
DstBlock " "
DstPort 1
}
Line {
SrcBlock "I "
SrcPort 1
Points [0, -20]
DstBlock " "
DstPort 2
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -