📄 qpskusingsimulink.htm
字号:
Name "Sine Wave Shift"
Ports [0, 1]
Position [25, 85, 55, 115]
SineType "Time based"
Frequency "2*50*pi"
Phase "pi"
Offset "-90"
SampleTime "1/2000"
}
Block {
BlockType Sin
Name "Sine Wave1"
Ports [0, 1]
Position [25, 25, 55, 55]
SineType "Time based"
Frequency "2*50*pi"
Phase "pi/2"
SampleTime "1/2000"
}
Block {
BlockType Outport
Name "Sine_no shift"
Position [80, 33, 110, 47]
IconDisplay "Port number"
}
Block {
BlockType Outport
Name "sine_ shift "
Position [80, 93, 110, 107]
Port "2"
IconDisplay "Port number"
}
Line {
SrcBlock "Sine Wave1"
SrcPort 1
DstBlock "Sine_no shift"
DstPort 1
}
Line {
SrcBlock "Sine Wave Shift"
SrcPort 1
DstBlock "sine_ shift "
DstPort 1
}
}
}
Block {
BlockType Outport
Name "90"
Position [125, 43, 155, 57]
IconDisplay "Port number"
}
Block {
BlockType Outport
Name "180"
Position [125, 83, 155, 97]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Outport
Name "270"
Position [135, 223, 165, 237]
Port "3"
IconDisplay "Port number"
}
Block {
BlockType Outport
Name "0"
Position [135, 263, 165, 277]
Port "4"
IconDisplay "Port number"
}
Line {
SrcBlock "Carrier signal - sine "
SrcPort 1
DstBlock "90"
DstPort 1
}
Line {
SrcBlock "Carrier signal - sine "
SrcPort 2
DstBlock "180"
DstPort 1
}
Line {
SrcBlock "Carrier signal - cosine"
SrcPort 1
DstBlock "270"
DstPort 1
}
Line {
SrcBlock "Carrier signal - cosine"
SrcPort 2
DstBlock "0"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Embedded\nMATLAB Function_Even"
Ports [3, 1]
Position [380, 311, 550, 429]
ForegroundColor "magenta"
PermitHierarchicalResolution "ExplicitOnly"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
Array {
Type "Handle"
Dimension 0
PropName "AvailSigsLoadSave"
}
MaskType "Stateflow"
MaskDescription "Embedded MATLAB block"
MaskDisplay "disp('QPSK_A');"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque off
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Embedded\nMATLAB Function_Even"
Location [257, 457, 812, 717]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "Q_in"
Position [20, 101, 40, 119]
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Inport
Name "No_shift"
Position [20, 136, 40, 154]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "Shift"
Position [20, 171, 40, 189]
Port "3"
IconDisplay "Port number"
}
Block {
BlockType Demux
Name " Demux "
Ports [1, 1]
Position [270, 180, 320, 220]
Outputs "1"
}
Block {
BlockType "S-Function"
Name " SFunction "
Tag "Stateflow S-Function bpsk 1"
Ports [3, 2]
Position [180, 100, 230, 180]
FunctionName "sf_sfun"
PortCounts "[3 2]"
EnableBusSupport on
Port {
PortNumber 2
Name "out_a"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Terminator
Name " Terminator "
Position [460, 191, 480, 209]
}
Block {
BlockType Outport
Name "out_a"
Position [460, 101, 480, 119]
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Line {
SrcBlock " SFunction "
SrcPort 1
Points [20, 0]
DstBlock " Demux "
DstPort 1
}
Line {
SrcBlock " Demux "
SrcPort 1
DstBlock " Terminator "
DstPort 1
}
Line {
SrcBlock "Q_in"
SrcPort 1
DstBlock " SFunction "
DstPort 1
}
Line {
SrcBlock "No_shift"
SrcPort 1
Points [120, 0]
DstBlock " SFunction "
DstPort 2
}
Line {
SrcBlock "Shift"
SrcPort 1
DstBlock " SFunction "
DstPort 3
}
Line {
Name "out_a"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 2
DstBlock "out_a"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Embedded\nMATLAB Function_Odd"
Ports [3, 1]
Position [375, 131, 545, 249]
ForegroundColor "magenta"
PermitHierarchicalResolution "ExplicitOnly"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
Array {
Type "Handle"
Dimension 0
PropName "AvailSigsLoadSave"
}
MaskType "Stateflow"
MaskDescription "Embedded MATLAB block"
MaskDisplay "disp('QPSK_A');"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque off
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Embedded\nMATLAB Function_Odd"
Location [257, 457, 812, 717]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.196850, 0.196850, 0.196850, 0.196850]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "I_in"
Position [20, 101, 40, 119]
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Inport
Name "No_shift"
Position [20, 136, 40, 154]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "Shift"
Position [20, 171, 40, 189]
Port "3"
IconDisplay "Port number"
}
Block {
BlockType Demux
Name " Demux "
Ports [1, 1]
Position [270, 180, 320, 220]
Outputs "1"
}
Block {
BlockType "S-Function"
Name " SFunction "
Tag "Stateflow S-Function bpsk 2"
Ports [3, 2]
Position [180, 100, 230, 180]
FunctionName "sf_sfun"
PortCounts "[3 2]"
EnableBusSupport on
Port {
PortNumber 2
Name "out_a"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Terminator
Name " Terminator "
Position [460, 191, 480, 209]
}
Block {
BlockType Outport
Name "out_a"
Position [460, 101, 480, 119]
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Line {
SrcBlock " SFunction "
SrcPort 1
Points [20, 0]
DstBlock " Demux "
DstPort 1
}
Line {
SrcBlock " Demux "
SrcPort 1
DstBlock " Terminator "
DstPort 1
}
Line {
SrcBlock "I_in"
SrcPort 1
DstBlock " SFunction "
DstPort 1
}
Line {
SrcBlock "No_shift"
SrcPort 1
Points [120, 0]
DstBlock " SFunction "
DstPort 2
}
Line {
SrcBlock "Shift"
SrcPort 1
DstBlock " SFunction "
DstPort 3
}
Line {
Name "out_a"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 2
DstBlock "out_a"
DstPort 1
}
}
}
Block {
BlockType Scope
Name "Scope"
Ports [3]
Position [990, 179, 1075, 301]
ForegroundColor "blue"
BackgroundColor "darkGreen"
DropShadow on
Floating off
Location [811, 51, 1275, 999]
Open on
NumInputPorts "3"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
axes3 "%<SignalLabel>"
}
YMin "-5~-5~-5"
YMax "5~5~5"
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType SubSystem
Name "Sum Ch_I , Ch_Q"
Ports [2, 1]
Position [635, 250, 735, 310]
BackgroundColor "lightBlue"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
System {
Name "Sum Ch_I , Ch_Q"
Location [162, 80, 542, 293]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "I_channel"
Position [20, 28, 50, 42]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "Q_channel"
Position [20, 175, 50, 190]
Orientation "up"
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Sum
Name "S1"
Ports [2, 1]
Position [180, 27, 195, 58]
ForegroundColor "blue"
Inputs "-+"
CollapseMode "All dimensions"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Sum
Name "S2"
Ports [2, 1]
Position [180, 132, 195, 163]
ForegroundColor "blue"
CollapseMode "All dimensions"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Sum
Name "S3"
Ports [2, 1]
Position [285, 72, 300, 103]
ForegroundColor "blue"
Inputs "-+"
CollapseMode "All dimensions"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Outport
Name "QPSK_out"
Position [325, 83, 355, 97]
IconDisplay "Port number"
}
Line {
SrcBlock "I_channel"
SrcPort 1
Points [45, 0]
Branch {
Points [0, 105]
DstBlock "S2"
DstPort 1
}
Branch {
DstBlock "S1"
DstPort 1
}
}
Line {
SrcBlock "Q_channel"
SrcPort 1
Points [0, -15; 5, 0]
Branch {
Points [0, -105]
DstBlock "S1"
DstPort 2
}
Branch {
DstBlock "S2"
DstPort 2
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -