📄 viterbi_ber_hil.mdl
字号:
SrcBlock "Data Type Conversion"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Saturation1"
SrcPort 1
DstBlock "Rounding\nFunction"
DstPort 1
}
Line {
SrcBlock "Gain4"
SrcPort 1
DstBlock "Saturation1"
DstPort 1
}
Line {
SrcBlock "Complex to\nReal-Imag1"
SrcPort 1
DstBlock "Gain4"
DstPort 1
}
}
}
Block {
BlockType ToWorkspace
Name "To Workspace"
Position [370, 360, 480, 390]
DropShadow on
VariableName "ber__n_errors__n_bits"
MaxDataPoints "1"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType SubSystem
Name "To_Viterbi_Decoder"
Ports [1, 1]
Position [690, 538, 775, 592]
Orientation "left"
DropShadow on
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "To_Viterbi_Decoder"
Location [604, 637, 909, 739]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [250, 43, 280, 57]
Orientation "left"
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Reference
Name "Buffer"
Ports [1, 1]
Position [175, 25, 225, 75]
Orientation "left"
SourceBlock "dspbuff3/Buffer"
SourceType "Buffer"
N "2"
V "0"
ic "0"
}
Block {
BlockType Reference
Name "Convert 1-D to 2-D"
Ports [1, 1]
Position [80, 39, 125, 61]
Orientation "left"
SourceBlock "dspsigattribs/Convert 1-D to 2-D"
SourceType "Convert 1-D to 2-D"
ShowPortLabels off
M "1"
N "2"
frameBasedOut off
}
Block {
BlockType Outport
Name "Out1"
Position [25, 43, 55, 57]
Orientation "left"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Buffer"
SrcPort 1
DstBlock "Convert 1-D to 2-D"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
Points [0, 0]
DstBlock "Buffer"
DstPort 1
}
Line {
SrcBlock "Convert 1-D to 2-D"
SrcPort 1
Points [0, 0]
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "To_frame_for_puncturing"
Ports [1, 1]
Position [325, 95, 400, 145]
DropShadow on
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "To_frame_for_puncturing"
Location [281, 371, 656, 473]
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, 43, 55, 57]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Reference
Name "Buffer"
Ports [1, 1]
Position [80, 25, 130, 75]
SourceBlock "dspbuff3/Buffer"
SourceType "Buffer"
N "max(size(CA))"
V "0"
ic "0"
}
Block {
BlockType Reference
Name "Convert 2-D to 1-D"
Ports [1, 1]
Position [265, 29, 295, 71]
SourceBlock "dspsigattribs/Convert 2-D to 1-D"
SourceType "Convert 2-D to 1-D"
ShowPortLabels off
}
Block {
BlockType Reference
Name "Transpose"
Ports [1, 1]
Position [165, 30, 220, 70]
SourceBlock "dspmtrx3/Transpose"
SourceType "Transpose"
Hermitian off
overflowFlag on
}
Block {
BlockType Outport
Name "Out1"
Position [320, 43, 350, 57]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Buffer"
SrcPort 1
Points [0, 0]
DstBlock "Transpose"
DstPort 1
}
Line {
SrcBlock "Transpose"
SrcPort 1
DstBlock "Convert 2-D to 1-D"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
Points [0, 0]
DstBlock "Buffer"
DstPort 1
}
Line {
SrcBlock "Convert 2-D to 1-D"
SrcPort 1
Points [0, 0]
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "background1"
Ports []
Position [143, 231, 641, 421]
Orientation "left"
BackgroundColor "[0.929412, 0.913725, 0.572549]"
DropShadow on
ShowName off
ShowPortLabels off
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskDisplay "disp('')\n\n"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "background1"
Location [602, 355, 797, 437]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
}
}
Block {
BlockType SubSystem
Name "background2"
Ports []
Position [143, 70, 823, 201]
Orientation "left"
BackgroundColor "[0.984314, 0.709804, 0.666667]"
DropShadow on
ShowName off
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskDisplay "disp('')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "background2"
Location [602, 355, 797, 437]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
}
}
Block {
BlockType SubSystem
Name "background3"
Ports []
Position [148, 445, 976, 659]
Orientation "left"
BackgroundColor "[0.623529, 0.874510, 0.862745]"
DropShadow on
ShowName off
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskDisplay "disp('')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "background3"
Location [602, 355, 797, 437]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
}
}
Line {
SrcBlock "Convolutional \nEncoder"
SrcPort 1
DstBlock "To_frame_for_puncturing"
DstPort 1
}
Line {
SrcBlock "Bernoulli Random\nBinary Generator"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
DstBlock "Convolutional \nEncoder"
DstPort 1
}
Branch {
Points [0, 135]
DstBlock "Integer Delay"
DstPort 1
}
}
Line {
SrcBlock "BPSK\nModulator\nBaseband"
SrcPort 1
Points [225, 0]
DstBlock "AWGN\nChannel"
DstPort 1
}
Line {
SrcBlock "Puncture"
SrcPort 1
DstBlock "Frame Conversion"
DstPort 1
}
Line {
SrcBlock "Integer Delay"
SrcPort 1
Points [0, 0; 5, 0]
Branch {
DstBlock "MegaCore out vs reference"
DstPort 1
}
Branch {
Points [0, 75]
DstBlock "Error Rate Calculation"
DstPort 1
}
}
Line {
SrcBlock "Error Rate Calculation"
SrcPort 1
Points [0, 0; 5, 0]
Branch {
DstBlock "To Workspace"
DstPort 1
}
Branch {
DstBlock "Display"
DstPort 1
}
}
Line {
SrcBlock "HIL"
SrcPort 1
DstBlock "Decoded_bit"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 1
Points [0, 0]
DstBlock "Sample_1"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 2
Points [0, 0]
DstBlock "Sample_2"
DstPort 1
}
Line {
SrcBlock "Decoded_bit"
SrcPort 1
Points [-25, 0; 0, -190]
Branch {
DstBlock "Error Rate Calculation"
DstPort 2
}
Branch {
Points [0, -65]
DstBlock "MegaCore out vs reference"
DstPort 2
}
}
Line {
SrcBlock "Depuncturing"
SrcPort 1
Points [0, 0]
DstBlock "To_Viterbi_Decoder"
DstPort 1
}
Line {
SrcBlock "To_frame_for_puncturing"
SrcPort 1
DstBlock "Puncture"
DstPort 1
}
Line {
SrcBlock "Frame Conversion"
SrcPort 1
DstBlock "BPSK\nModulator\nBaseband"
DstPort 1
}
Line {
SrcBlock "To_Viterbi_Decoder"
SrcPort 1
Points [0, 0]
DstBlock "Demux"
DstPort 1
}
Line {
SrcBlock "Soft Output\nDemodulator"
SrcPort 1
DstBlock "Depuncturing"
DstPort 1
}
Line {
SrcBlock "Pattern_CA"
SrcPort 1
DstBlock "HIL"
DstPort 1
}
Line {
SrcBlock "Pattern_CB"
SrcPort 1
DstBlock "HIL"
DstPort 3
}
Line {
SrcBlock "Signal From\nWorkspace"
SrcPort 1
DstBlock "Pattern_CA"
DstPort 1
}
Line {
SrcBlock "Signal From\nWorkspace1"
SrcPort 1
DstBlock "Pattern_CB"
DstPort 1
}
Line {
SrcBlock "Sample_2"
SrcPort 1
DstBlock "HIL"
DstPort 4
}
Line {
SrcBlock "Sample_1"
SrcPort 1
DstBlock "HIL"
DstPort 2
}
Line {
SrcBlock "AWGN\nChannel"
SrcPort 1
Points [0, 195]
DstBlock "Soft Output\nDemodulator"
DstPort 1
}
Annotation {
Name "Soft-Decision Viterbi Decodng with Puncturing"
Position [175, 28]
DropShadow on
FontName "Arial"
FontSize 12
FontWeight "bold"
}
Annotation {
Name "Transmitter"
Position [743, 217]
HorizontalAlignment "left"
FontName "Arial"
FontSize 14
FontWeight "bold"
}
Annotation {
Name "BER Calculation\n"
Position [648, 422]
HorizontalAlignment "left"
FontName "Arial"
FontSize 14
FontWeight "bold"
}
Annotation {
Name "Receiver"
Position [918, 672]
HorizontalAlignment "left"
FontName "Arial"
FontSize 14
FontWeight "bold"
}
}
}
# Finite State Machines
#
# Stateflow Version 6.2 (R14SP2) dated Jan 27 2005, 19:24:42
#
#
Stateflow {
machine {
id 1
name "Viterbi_BER_HIL"
created "15-Dec-2004 12:28:42"
isLibrary 0
firstTarget 2
sfVersion 62014000
}
target {
id 2
name "sfun"
description "Default Simulink S-Function Target."
machine 1
linkNode [1 0 0]
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -