📄 ch6example8.mdl
字号:
SaveName "ScopeData1"
DataFormat "StructureWithTime"
}
Block {
BlockType SignalGenerator
Name "Signal\nGenerator"
Position [25, 30, 55, 60]
Frequency "200"
}
Block {
BlockType SubSystem
Name "Subsystem\nPCM编码器"
Ports [1, 1]
Position [155, 14, 205, 76]
TreatAsAtomicUnit off
System {
Name "Subsystem\nPCM编码器"
Location [97, 295, 632, 471]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 85, 55, 99]
}
Block {
BlockType Abs
Name "Abs"
Position [140, 74, 165, 106]
}
Block {
BlockType Gain
Name "Gain"
Position [240, 74, 280, 106]
Gain "127"
}
Block {
BlockType Reference
Name "Integer to Bit\nConverter"
Ports [1, 1]
Position [350, 69, 430, 111]
FontSize 10
SourceBlock "commutil2/Integer to Bit\nConverter"
SourceType "Integer to Bit Converter"
nbits "7"
}
Block {
BlockType Lookup
Name "Look-Up\nTable"
Position [180, 69, 220, 111]
FontSize 10
InputValues "[-1,-1/2,-1/4,-1/8,-1/16,-1/32,-1/64,-1/128"
",0,1/128,1/64,1/32,1/16,1/8,1/4,1/2,1]"
OutputValues "[-1:1/8:1]"
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [450, 61, 455, 99]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Quantizer
Name "Quantizer"
Position [300, 75, 330, 105]
QuantizationInterval "1"
}
Block {
BlockType Relay
Name "Relay"
Position [140, 25, 170, 55]
}
Block {
BlockType Saturate
Name "Saturation"
Position [80, 75, 110, 105]
UpperLimit "1"
LowerLimit "-1"
}
Block {
BlockType Outport
Name "Out1"
Position [480, 75, 510, 89]
}
Line {
SrcBlock "Look-Up\nTable"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
Line {
SrcBlock "Quantizer"
SrcPort 1
DstBlock "Integer to Bit\nConverter"
DstPort 1
}
Line {
SrcBlock "Gain"
SrcPort 1
DstBlock "Quantizer"
DstPort 1
}
Line {
SrcBlock "Abs"
SrcPort 1
DstBlock "Look-Up\nTable"
DstPort 1
}
Line {
SrcBlock "Relay"
SrcPort 1
Points [260, 0]
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Integer to Bit\nConverter"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Saturation"
SrcPort 1
Points [0, 0; 5, 0]
Branch {
Points [5, 0]
DstBlock "Abs"
DstPort 1
}
Branch {
Points [0, -50]
DstBlock "Relay"
DstPort 1
}
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Saturation"
DstPort 1
}
Annotation {
Name "0到127内整数\n7bit A/D"
Position [391, 151]
}
Annotation {
Name "[-1,1]限幅器"
Position [91, 124]
}
Annotation {
Name "极性码"
Position [281, 34]
}
Annotation {
Name "13折线压缩"
Position [199, 142]
}
Annotation {
Name "量化间距为1"
Position [316, 132]
}
}
}
Block {
BlockType SubSystem
Name "Subsystem\nPCM解码器"
Ports [1, 1]
Position [610, 15, 660, 75]
TreatAsAtomicUnit off
Port {
PortNumber 1
Name "解码输出"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
System {
Name "Subsystem\nPCM解码器"
Location [197, 300, 742, 499]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 80, 55, 94]
}
Block {
BlockType Reference
Name "Bit to Integer\nConverter"
Ports [1, 1]
Position [155, 93, 235, 137]
FontSize 10
SourceBlock "commutil2/Bit to Integer\nConverter"
SourceType "Bit to Integer Converter"
nbits "7"
}
Block {
BlockType Demux
Name "Demux"
Ports [1, 8]
Position [80, 39, 85, 131]
BackgroundColor "black"
ShowName off
Outputs "8"
}
Block {
BlockType Gain
Name "Gain1"
Position [255, 97, 310, 133]
Gain "1/127"
}
Block {
BlockType Lookup
Name "Look-Up\nTable1"
Position [335, 95, 385, 135]
InputValues "[0:1/8:1]"
OutputValues "[0,1/128,1/64,1/32,1/16,1/8,1/4,1/2,1]"
}
Block {
BlockType Mux
Name "Mux"
Ports [7, 1]
Position [120, 50, 125, 130]
ShowName off
Inputs "7"
DisplayOption "bar"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [420, 91, 465, 124]
InputSameDT off
}
Block {
BlockType Relay
Name "Relay"
Position [195, 25, 225, 55]
OnSwitchValue "0.5"
OffSwitchValue "0.5"
OffOutputValue "-1"
}
Block {
BlockType Outport
Name "Out1"
Position [490, 105, 520, 119]
}
Line {
SrcBlock "Bit to Integer\nConverter"
SrcPort 1
DstBlock "Gain1"
DstPort 1
}
Line {
SrcBlock "Look-Up\nTable1"
SrcPort 1
DstBlock "Product"
DstPort 2
}
Line {
SrcBlock "Relay"
SrcPort 1
Points [175, 0]
DstBlock "Product"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
Points [0, 25]
DstBlock "Bit to Integer\nConverter"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 1
Points [15, 0; 0, -10]
DstBlock "Relay"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 2
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 3
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Demux"
SrcPort 8
DstBlock "Mux"
DstPort 7
}
Line {
SrcBlock "Demux"
SrcPort 7
DstBlock "Mux"
DstPort 6
}
Line {
SrcBlock "Demux"
SrcPort 6
DstBlock "Mux"
DstPort 5
}
Line {
SrcBlock "Demux"
SrcPort 5
DstBlock "Mux"
DstPort 4
}
Line {
SrcBlock "Demux"
SrcPort 4
DstBlock "Mux"
DstPort 3
}
Line {
SrcBlock "Gain1"
SrcPort 1
DstBlock "Look-Up\nTable1"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
Line {
SrcBlock "Product"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Annotation {
Name "极性解码"
Position [282, 28]
}
Annotation {
Name "7Bit D/A"
Position [195, 174]
}
Annotation {
Name "减小样值范围"
Position [280, 158]
}
}
}
Block {
BlockType ZeroOrderHold
Name "Zero-Order\nHold"
Position [80, 26, 115, 64]
SampleTime "1/8000"
Port {
PortNumber 1
Name "原信号"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
}
Line {
SrcBlock "Signal\nGenerator"
SrcPort 1
DstBlock "Zero-Order\nHold"
DstPort 1
}
Line {
SrcBlock "Subsystem\nPCM编码器"
SrcPort 1
DstBlock "Frame Status\nConversion"
DstPort 1
}
Line {
Name "原信号"
Labels [0, 0]
SrcBlock "Zero-Order\nHold"
SrcPort 1
Points [0, 0; 5, 0]
Branch {
DstBlock "Subsystem\nPCM编码器"
DstPort 1
}
Branch {
Labels [2, 0]
Points [0, 115; 585, 0]
DstBlock "Scope"
DstPort 2
}
}
Line {
Name "解码输出"
Labels [0, 0]
SrcBlock "Subsystem\nPCM解码器"
SrcPort 1
DstBlock "Scope"
DstPort 1
}
Line {
SrcBlock "Frame Status\nConversion"
SrcPort 1
DstBlock "Buffer"
DstPort 1
}
Line {
SrcBlock "Buffer1"
SrcPort 1
DstBlock "Reshape"
DstPort 1
}
Line {
SrcBlock "Reshape"
SrcPort 1
DstBlock "Subsystem\nPCM解码器"
DstPort 1
}
Line {
Name "PCM"
Labels [0, 0]
SrcBlock "Buffer"
SrcPort 1
Points [30, 0]
Branch {
DstBlock "Binary Symmetric\nChannel"
DstPort 1
}
Branch {
Points [0, 80]
DstBlock "Scope1"
DstPort 2
}
}
Line {
SrcBlock "Binary Symmetric\nChannel"
SrcPort 1
Points [10, 0; 0, 10]
DstBlock "Buffer1"
DstPort 1
}
Line {
Name "误码"
Labels [3, 0]
SrcBlock "Binary Symmetric\nChannel"
SrcPort 2
Points [5, 0; 0, 55]
DstBlock "Scope1"
DstPort 1
}
Annotation {
Name "PCM传输模型\n文件名:ch6example8.mdl"
Position [249, 135]
DropShadow on
FontName "Arial"
FontSize 12
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -