📄 san_psk1.mdl
字号:
SrcBlock "Step1"
SrcPort 1
Points [40, 0]
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "Data Type Conversion"
SrcPort 1
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "Output1"
DstPort 1
}
Line {
SrcBlock "Data Type Conversion1"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Output"
DstPort 1
}
Line {
SrcBlock "Step"
SrcPort 1
Points [45, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Clock"
SrcPort 1
DstBlock "Saturation"
DstPort 1
}
Line {
SrcBlock "Saturation"
SrcPort 1
DstBlock "J-K\nFlip-Flop1"
DstPort 2
}
Annotation {
Name "FREQUENCY DIVIDE BY TOW"
Position [127, 247]
UseDisplayTextAsClickCallback off
}
}
}
Block {
BlockType Gain
Name "Gain"
Position [230, 45, 260, 75]
Gain "4"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain2"
Position [505, 40, 535, 70]
Gain "2"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Reference
Name "LPF at 4kHz"
Ports [1, 1]
Position [395, 27, 460, 83]
SourceBlock "dsparch4/Analog\nFilter Design"
SourceType "Analog Filter Design"
method "Butterworth"
filttype "Lowpass"
N "4"
Wlo "4000*2*pi"
Whi "4100"
Rp "2"
Rs "40"
}
Block {
BlockType Product
Name "Squarer"
Ports [2, 1]
Position [80, 42, 110, 73]
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Outport
Name "Out1"
Position [555, 48, 585, 62]
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "Out2"
Position [340, 68, 370, 82]
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "Out3"
Position [260, 168, 290, 182]
Port "3"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Squarer"
SrcPort 1
DstBlock "BPF at 8kHz"
DstPort 1
}
Line {
SrcBlock "BPF at 8kHz"
SrcPort 1
Points [5, 0]
Branch {
DstBlock "Gain"
DstPort 1
}
Branch {
Points [0, 115]
DstBlock "Out3"
DstPort 1
}
}
Line {
SrcBlock "LPF at 4kHz"
SrcPort 1
DstBlock "Gain2"
DstPort 1
}
Line {
SrcBlock "Gain"
SrcPort 1
DstBlock "Divide by 2"
DstPort 1
}
Line {
SrcBlock "Divide by 2"
SrcPort 1
Points [5, 0; 0, 10]
DstBlock "LPF at 4kHz"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
Points [0, 0; 10, 0]
Branch {
Points [0, -10]
DstBlock "Squarer"
DstPort 1
}
Branch {
Points [0, 5]
DstBlock "Squarer"
DstPort 2
}
}
Line {
SrcBlock "Gain2"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Divide by 2"
SrcPort 2
Points [0, 0]
DstBlock "Out2"
DstPort 1
}
}
}
Block {
BlockType Constant
Name "Constant"
Position [585, 140, 615, 170]
Value "0"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType Gain
Name "Gain1"
Position [140, 115, 170, 145]
Gain "2"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain3"
Position [560, 165, 590, 195]
Gain "10"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Reference
Name "LPF at 4kHz1"
Ports [1, 1]
Position [475, 152, 540, 208]
SourceBlock "dsparch4/Analog\nFilter Design"
SourceType "Analog Filter Design"
method "Butterworth"
filttype "Lowpass"
N "4"
Wlo "4000"
Whi "8100"
Rp "2"
Rs "40"
}
Block {
BlockType Product
Name "Multiplier"
Ports [2, 1]
Position [420, 162, 450, 193]
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Reference
Name "PN Sequence\nGenerator"
Ports [0, 1]
Position [15, 158, 95, 202]
SourceBlock "commseqgen2/PN Sequence\nGenerator"
SourceType "PN Sequence Generator"
poly "[1 0 0 0 0 1 1]"
ini_sta "[0 0 0 0 0 1]"
shift "-1"
Ts "1/1000"
frameBased off
sampPerFrame "1"
reset off
outDataType "double"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [210, 32, 240, 63]
InputSameDT off
OutDataTypeMode "double"
SaturateOnIntegerOverflow off
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator"
Position [650, 157, 680, 188]
Operator "<"
InputSameDT off
LogicOutDataTypeMode "Boolean"
}
Block {
BlockType Scope
Name "Scope"
Ports [5]
Position [700, 294, 740, 376]
Floating off
Location [13, 177, 1019, 758]
Open off
NumInputPorts "5"
ZoomMode "xonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
axes3 "%<SignalLabel>"
axes4 "%<SignalLabel>"
axes5 "%<SignalLabel>"
}
TimeRange "0.05"
YMin "-1~-1~-1~0~-1"
YMax "1~1~1~1~1"
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType Reference
Name "Sine Wave"
Ports [0, 1]
Position [60, 18, 105, 62]
SourceBlock "dspsrcs4/Sine Wave"
SourceType "Sine Wave"
Amplitude "1"
Frequency "4000"
Phase "0"
SampleMode "Discrete"
OutComplex "Real"
CompMethod "Trigonometric fcn"
TableSize "Speed"
SampleTime "1/100000"
SamplesPerFrame "1"
additionalParams off
allowOverrides on
dataType "double"
wordLen "16"
udDataType "sfix(16)"
fracBitsMode "Best precision"
numFracBits "15"
ResetState "Restart at time zero"
}
Block {
BlockType Step
Name "Step"
Position [25, 95, 55, 125]
Time "1/300"
Before "-.5"
After "-.5"
SampleTime "0"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [105, 120, 125, 140]
ShowName off
IconShape "round"
Inputs "|++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Terminator
Name "Terminator"
Position [620, 45, 640, 65]
}
Block {
BlockType Terminator
Name "Terminator1"
Position [620, 80, 640, 100]
}
Line {
SrcBlock "Gain1"
SrcPort 1
Points [0, -75; 15, 0]
Branch {
DstBlock "Product"
DstPort 2
}
Branch {
Points [0, 280]
DstBlock "Scope"
DstPort 3
}
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Gain1"
DstPort 1
}
Line {
SrcBlock "Step"
SrcPort 1
Points [20, 0; 0, 20]
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "PN Sequence\nGenerator"
SrcPort 1
Points [15, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Multiplier"
SrcPort 1
DstBlock "LPF at 4kHz1"
DstPort 1
}
Line {
SrcBlock "LPF at 4kHz1"
SrcPort 1
DstBlock "Gain3"
DstPort 1
}
Line {
SrcBlock "Gain3"
SrcPort 1
DstBlock "Relational\nOperator"
DstPort 2
}
Line {
SrcBlock "Carrier recovery"
SrcPort 1
Points [195, 0; 0, 90; -360, 0; 0, 45]
Branch {
DstBlock "Multiplier"
DstPort 1
}
Branch {
Points [0, 150]
DstBlock "Scope"
DstPort 2
}
}
Line {
SrcBlock "AWGN\nChannel"
SrcPort 1
DstBlock "Carrier recovery"
DstPort 1
}
Line {
SrcBlock "Sine Wave"
SrcPort 1
Points [50, 0]
Branch {
DstBlock "Product"
DstPort 1
}
Branch {
Points [0, 265]
DstBlock "Scope"
DstPort 1
}
}
Line {
SrcBlock "Carrier recovery"
SrcPort 2
DstBlock "Terminator"
DstPort 1
}
Line {
SrcBlock "Carrier recovery"
SrcPort 3
Points [25, 0; 0, 15]
DstBlock "Terminator1"
DstPort 1
}
Line {
SrcBlock "Product"
SrcPort 1
Points [50, 0; 0, 5]
Branch {
DstBlock "AWGN\nChannel"
DstPort 1
}
Branch {
Points [0, 130]
Branch {
DstBlock "Multiplier"
DstPort 2
}
Branch {
Points [0, 180]
DstBlock "Scope"
DstPort 5
}
}
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [5, 0; 0, 10]
DstBlock "Relational\nOperator"
DstPort 1
}
Line {
SrcBlock "Relational\nOperator"
SrcPort 1
Points [45, 0; 0, 70; -80, 0; 0, 105]
DstBlock "Scope"
DstPort 4
}
Annotation {
Name "PSK modulation and demodulation with carrier re"
"covery\nSantosh Shah, The LNMIIT, Jaipur\nsantosh.jnt@gmail.com"
Position [422, 372]
ForegroundColor "blue"
BackgroundColor "green"
UseDisplayTextAsClickCallback off
FontSize 14
}
}
}
# Finite State Machines
#
# Stateflow Version 6.5 (R2006b) dated Aug 8 2006, 21:09:58
#
#
Stateflow {
machine {
id 1
name "san_psk1"
created "25-Nov-2005 15:26:12"
isLibrary 0
firstTarget 2
sfVersion 65014000
}
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 + -