📄 ask_mod.mdl
字号:
ReportName "simulink-default.rpt"
Block {
BlockType Scope
Name "ASK"
Ports [4]
Position [910, 110, 965, 205]
Location [856, 52, 1275, 761]
Open on
NumInputPorts "4"
TickLabels "on"
List {
ListType AxesTitles
axes1 "PN_code"
axes2 "Carrier_V1"
axes3 "Carrier_V2"
axes4 "ASK_signal"
}
TimeRange "0.001"
YMin "-5~-5~-5~-5"
YMax "5~5~5~5"
DataFormat "StructureWithTime"
}
Block {
BlockType BusCreator
Name "Bus\nCreator"
Ports [2, 1]
Position [760, 254, 765, 336]
ShowName off
DialogController "Simulink.DDGSource_Bus"
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType SubSystem
Name "Embedded\nMATLAB Function"
Ports [3, 1]
Position [385, 262, 570, 368]
BackgroundColor "[0.752941, 0.752941, 0.752941]"
DropShadow on
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
Array {
Type "Handle"
Dimension 0
PropName "AvailSigsLoadSave"
}
MaskType "Stateflow"
MaskDescription "Embedded MATLAB block"
MaskDisplay "disp('ASK');"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque off
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Embedded\nMATLAB Function"
Location [257, 457, 812, 717]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "Data_in"
Position [20, 101, 40, 119]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "no_shift"
Position [20, 136, 40, 154]
Port "2"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "shift"
Position [20, 171, 40, 189]
Port "3"
IconDisplay "Port number"
LatchInput off
}
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 ASK_mod 2"
Ports [3, 2]
Position [180, 100, 230, 180]
FunctionName "sf_sfun"
PortCounts "[3 2]"
Port {
PortNumber 2
Name "out"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
ShowSigGenPortName on
}
}
Block {
BlockType Terminator
Name " Terminator "
Position [460, 191, 480, 209]
}
Block {
BlockType Outport
Name "out"
Position [460, 101, 480, 119]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock " SFunction "
SrcPort 1
Points [0, 80]
DstBlock " Demux "
DstPort 1
}
Line {
SrcBlock " Demux "
SrcPort 1
DstBlock " Terminator "
DstPort 1
}
Line {
SrcBlock "Data_in"
SrcPort 1
DstBlock " SFunction "
DstPort 1
}
Line {
Name "out"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 2
DstBlock "out"
DstPort 1
}
Line {
SrcBlock "no_shift"
SrcPort 1
Points [120, 0]
DstBlock " SFunction "
DstPort 2
}
Line {
SrcBlock "shift"
SrcPort 1
DstBlock " SFunction "
DstPort 3
}
}
}
Block {
BlockType Gain
Name "Gain"
Position [690, 260, 720, 290]
Gain "3"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Reference
Name "PN Sequence\nGenerator"
Ports [0, 1]
Position [100, 118, 185, 202]
ForegroundColor "blue"
BackgroundColor "yellow"
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 "0"
Ts "1/25000"
frameBased off
sampPerFrame "1"
reset off
}
Block {
BlockType Sin
Name "Sine Low\n Voltage "
Ports [0, 1]
Position [105, 360, 165, 420]
BackgroundColor "orange"
SineType "Time based"
Amplitude "2"
Frequency "2*135000*pi"
Phase "pi/2"
SampleTime "1/2400000"
}
Block {
BlockType Sin
Name "Sine High \nvoltage "
Ports [0, 1]
Position [105, 261, 170, 309]
BackgroundColor "orange"
SineType "Time based"
Amplitude "3"
Frequency "2*135000*pi"
SampleTime "1/2400000"
}
Line {
SrcBlock "Sine High \nvoltage "
SrcPort 1
Points [0, 0; 60, 0]
Branch {
Points [0, 30]
DstBlock "Embedded\nMATLAB Function"
DstPort 2
}
Branch {
Points [0, -140]
DstBlock "ASK"
DstPort 2
}
}
Line {
Labels [1, 0]
SrcBlock "Sine Low\n Voltage "
SrcPort 1
Points [155, 0; 0, -40]
Branch {
DstBlock "Embedded\nMATLAB Function"
DstPort 3
}
Branch {
Points [0, -180]
DstBlock "ASK"
DstPort 3
}
}
Line {
SrcBlock "PN Sequence\nGenerator"
SrcPort 1
Points [0, 0; 60, 0]
Branch {
Points [0, 120]
DstBlock "Embedded\nMATLAB Function"
DstPort 1
}
Branch {
Points [415, 0]
Branch {
Points [0, 115]
DstBlock "Gain"
DstPort 1
}
Branch {
Points [0, -40]
DstBlock "ASK"
DstPort 1
}
}
}
Line {
SrcBlock "Bus\nCreator"
SrcPort 1
Points [15, 0; 0, -100]
DstBlock "ASK"
DstPort 4
}
Line {
SrcBlock "Embedded\nMATLAB Function"
SrcPort 1
DstBlock "Bus\nCreator"
DstPort 2
}
Line {
SrcBlock "Gain"
SrcPort 1
DstBlock "Bus\nCreator"
DstPort 1
}
Annotation {
Name "V1"
Position [209, 274]
}
Annotation {
Name "V2"
Position [215, 381]
}
Annotation {
Name "\n\n\n\n \n\n\n\n "
" \n\n\n\n \n\n \n "
" "
Position [474, 320]
BackgroundColor "darkGreen"
}
Annotation {
Name "PN_code"
Position [823, 112]
}
Annotation {
Name "Carrier_V1"
Position [833, 138]
}
Annotation {
Name "Carrier_V2"
Position [833, 161]
}
Annotation {
Name " ASK - Modulator "
Position [485, 200]
ForegroundColor "white"
BackgroundColor "darkGreen"
DropShadow on
FontName "Arial Rounded MT Bold"
FontSize 18
FontWeight "bold"
FontAngle "italic"
}
Annotation {
Name "Gihad Elamary - gihad.elamary1@ncl.ac.uk \n Dat"
"a: 26.07.2008"
Position [282, 582]
ForegroundColor "white"
BackgroundColor "gray"
DropShadow on
FontSize 14
}
Annotation {
Name "ASK_signal"
Position [834, 185]
}
}
}
# Finite State Machines
#
# Stateflow Version 6.0 (R14) dated Apr 30 2004, 06:19:14
#
#
Stateflow {
machine {
id 1
name "ASK_mod"
created "22-Jul-2008 20:25:11"
isLibrary 0
firstTarget 11
sfVersion 60014000.000006
}
chart {
id 2
name "Embedded\n"
"MATLAB Function"
windowPosition [281.813 355.875 200.25 189.75]
viewLimits [0 156.75 0 153.75]
screen [1 1 1280 800 1.333333333333333]
treeNode [0 3 0 0]
firstTransition 5
firstJunction 4
viewObj 2
machine 1
decomposition CLUSTER_CHART
type EML_CHART
firstData 6
chartFileNumber 2
disableImplicitCasting 1
eml {
name "ASK"
}
}
state {
id 3
labelString "eML_blk_kernel()"
position [18 64.5 118 66]
fontSize 12
chart 2
treeNode [2 0 0 0]
superState SUBCHART
subviewer 2
type FUNC_STATE
decomposition CLUSTER_STATE
eml {
isEML 1
script "function out=ASK(Data_in,no_shift,shift)\n"
" \n"
" if Data_in == 1 \n"
" out = no_shift\n"
" else \n"
" out = shift\n"
" end\n"
" "
editorLayout "100 M4x1[620 367 671 364]"
}
}
junction {
id 4
position [23.5747 49.5747 7]
chart 2
linkNode [2 0 0]
subviewer 2
type CONNECTIVE_JUNCTION
}
transition {
id 5
labelString "{eML_blk_kernel();}"
labelPosition [32.125 19.875 102.544 14.964]
fontSize 12
src {
intersection [0 0 1 0 23.5747 14.625 0 0]
}
dst {
id 4
intersection [7 0 -1 -1 23.5747 42.5747 0 0]
}
midPoint [23.5747 24.9468]
chart 2
linkNode [2 0 0]
dataLimits [21.175 25.975 14.625 42.575]
subviewer 2
drawStyle SMART
}
data {
id 6
name "Data_in"
linkNode [2 0 7]
scope INPUT_DATA
machine 1
dataType "inherited"
fixptType {
bias 0
slope 1
exponent 0
baseType SF_INT16_TYPE
lock 0
}
dlgFixptMode 0
props {
range {
minimum ""
maximum ""
}
array {
size "-1"
}
}
}
data {
id 7
name "out"
linkNode [2 6 8]
scope OUTPUT_DATA
machine 1
dataType "inherited"
fixptType {
bias 0
slope 1
exponent 0
baseType SF_INT16_TYPE
lock 0
}
dlgFixptMode 0
props {
range {
minimum ""
maximum ""
}
array {
size "-1"
}
}
}
data {
id 8
name "no_shift"
linkNode [2 7 9]
scope INPUT_DATA
machine 1
dataType "inherited"
fixptType {
bias 0
slope 1
exponent 0
baseType SF_INT16_TYPE
lock 0
}
dlgFixptMode 0
props {
range {
minimum ""
maximum ""
}
array {
size "-1"
}
}
}
data {
id 9
name "shift"
linkNode [2 8 0]
scope INPUT_DATA
machine 1
dataType "inherited"
fixptType {
bias 0
slope 1
exponent 0
baseType SF_INT16_TYPE
lock 0
}
dlgFixptMode 0
props {
range {
minimum ""
maximum ""
}
array {
size "-1"
}
}
}
instance {
id 10
name "Embedded\n"
"MATLAB Function"
machine 1
chart 2
}
target {
id 11
name "sfun"
description "Default Simulink S-Function Target."
machine 1
linkNode [1 0 0]
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -