📄 asknyqmf.mdl
字号:
}
Block {
BlockType Gain
Name "Gain"
Position [200, 55, 240, 85]
Gain "Kc"
}
Block {
BlockType Constant
Name "Gain diff"
Position [200, 126, 235, 154]
Value "Ac"
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [270, 93, 290, 117]
Inputs "+-"
}
Block {
BlockType ZeroOrderHold
Name "Zero-Order\nHold"
Position [120, 54, 155, 86]
SampleTime "td"
}
Block {
BlockType Outport
Name "out_1"
Position [335, 95, 355, 115]
}
Line {
SrcBlock "Gain"
SrcPort 1
Points [5, 0; 0, 30]
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "Gain diff"
SrcPort 1
Points [10, 0; 0, -30]
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "out_1"
DstPort 1
}
Line {
SrcBlock "in_1"
SrcPort 1
DstBlock "Zero-Order\nHold"
DstPort 1
}
Line {
SrcBlock "Zero-Order\nHold"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "4-ASK demap"
Ports [1, 1]
Position [870, 109, 940, 151]
TreatAsAtomicUnit off
MaskType "MASK demapping"
MaskDescription "Reverse the MASK mapping process\nConvert [-1 1"
"] analog signal to [0, M-1] symbols."
MaskHelp "This block demaps a MASK mapped signal back to "
"digit symbols. You can place this block after a amplitude demodulation block."
" The input of this block is an analog signal in the range [-1, 1]. The demodu"
"lation decides the closest integer fitting in [0,M-1] range. When the input s"
"ymbol interval is a two-elements vector, the second element is offset. The de"
"fault offset value is 0."
MaskPromptString "M-ary number (digit integers in ranger [0, M-1]"
"):|Output symbol interval and offset (sec):"
MaskStyleString "edit,edit"
MaskTunableValueString "on,on"
MaskCallbackString "|"
MaskEnableString "on,on"
MaskVisibilityString "on,on"
MaskToolTipString "on,on"
MaskVarAliasString ","
MaskVariables "N=@1;td=@2;"
MaskInitialization "Ac=1;sft=[0:N-1]*Ac*2/(N-1)-Ac;"
MaskDisplay "disp('MASK\\ndemapping')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "4|[1, .9]"
System {
Name "4-ASK demap"
Location [617, 158, 1115, 458]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "in_1"
Position [40, 30, 60, 50]
}
Block {
BlockType Abs
Name "Abs"
Position [245, 37, 280, 63]
}
Block {
BlockType "S-Function"
Name "Minimum"
Ports [1, 1]
Position [325, 40, 380, 60]
FunctionName "arymimai"
Parameters "'min'"
}
Block {
BlockType Constant
Name "Shift key"
Position [125, 88, 145, 112]
Value "sft"
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [190, 33, 210, 62]
Inputs "+-"
}
Block {
BlockType ZeroOrderHold
Name "Zero-Order\nHold"
Position [95, 24, 130, 56]
SampleTime "td"
}
Block {
BlockType Outport
Name "out_1"
Position [410, 40, 430, 60]
}
Line {
SrcBlock "in_1"
SrcPort 1
DstBlock "Zero-Order\nHold"
DstPort 1
}
Line {
SrcBlock "Abs"
SrcPort 1
DstBlock "Minimum"
DstPort 1
}
Line {
SrcBlock "Zero-Order\nHold"
SrcPort 1
DstBlock "Sum2"
DstPort 1
}
Line {
SrcBlock "Minimum"
SrcPort 1
DstBlock "out_1"
DstPort 1
}
Line {
SrcBlock "Shift key"
SrcPort 1
Points [15, 0; 0, -45]
DstBlock "Sum2"
DstPort 2
}
Line {
SrcBlock "Sum2"
SrcPort 1
DstBlock "Abs"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "4-ary source"
Ports [0, 2]
Position [40, 101, 70, 154]
ShowPortLabels off
TreatAsAtomicUnit off
System {
Name "4-ary source"
Location [122, 460, 659, 699]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType SubSystem
Name "Bits"
Ports [0, 1]
Position [25, 48, 85, 92]
ShowPortLabels off
TreatAsAtomicUnit off
MaskType "Read from workspace"
MaskDescription "Read from a workspace variable at\nsampling"
" time point."
MaskHelp "This block reads from a workspace variable "
"at a given sample time. The column number is the block output vector length. "
"When the simulation reaches the end of the variable (eof), the block will cyc"
"lically output from the first row of the variable or output zeros based on th"
"e repeat flag entree."
MaskPromptString "Variable (column_number=block_output_length"
"):|Data output sample time (sec):|Repeat flag (1: repeat read, 0: output zero"
"s after eof).|Initial output:"
MaskStyleString "edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on"
MaskCallbackString "|||"
MaskEnableString "on,on,on,on"
MaskVisibilityString "on,on,on,on"
MaskToolTipString "on,on,on,on"
MaskVarAliasString ",,,"
MaskInitialization "var=@1;td=@2;ts=td(1);if (length(td)>=2),of"
"f=td(2);else off=0;end;cyc=@3;ini=@4;[x,y]=srcsicon(7);"
MaskDisplay "plot(0,0,100,100,x,y);disp('Rd wksp')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "randint(2000,1,2)|.5|1|1"
System {
Name "Bits"
Location [355, 528, 737, 675]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType "S-Function"
Name "Message source"
Ports [1, 1]
Position [180, 53, 255, 97]
BackgroundColor "yellow"
FunctionName "trigwksp"
Parameters "var,thd,cyclFlag,ini"
MaskType "Read from workspace"
MaskDescription "The raising edge of input pulse trigger"
" the block output the next row from the workspace variable."
MaskHelp "This block reads the data from a worksp"
"ace variable. The output is refreshed at the raising edge of the input pulse."
MaskPromptString "Read the variable:|Threshold for the in"
"put pulse:|Cyclic read variable (1) or amend zeros (0).|Output before first t"
"rigger:"
MaskStyleString "edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on"
MaskCallbackString "|||"
MaskEnableString "on,on,on,on"
MaskVisibilityString "on,on,on,on"
MaskToolTipString "on,on,on,on"
MaskVarAliasString ",,,"
MaskInitialization "var=@1;thd=@2;cyclFlag=@3;ini=@4;"
MaskDisplay "disp('Triggered\\nread')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "var|.1|cyc|ini"
}
Block {
BlockType SubSystem
Name "Pulses deivide\nsame sample time1"
Ports [0, 1]
Position [50, 56, 110, 94]
ShowPortLabels off
TreatAsAtomicUnit off
MaskType "Pulse generator"
MaskDescription "Vector pulses with sample rate of each "
"pulse as Sample_time ./Divider. "
MaskHelp "This block generator a vector pulses. T"
"he output length is the same as the vector defined in \"Divider\". The ith el"
"ement of the output has the sample time Sample_time/Divider(i). All elements "
"in \"Divider\" must be integers."
MaskPromptString "Sample time (scalar, sec):|Divider (int"
"eger vector):|Offset (have same dimension as Divider:"
MaskStyleString "edit,edit,edit"
MaskTunableValueString "on,on,on"
MaskCallbackString "||"
MaskEnableString "on,on,on"
MaskVisibilityString "on,on,on"
MaskToolTipString "on,on,on"
MaskVarAliasString ",,"
MaskInitialization "samp_time=@1;out_divid=@2;offset=@3;"
MaskDisplay "disp('Vector\\nPulse')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "ts|1|off"
System {
Name "Pulses deivide\nsame sample time1"
Location [55, 192, 283, 286]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType "S-Function"
Name "S-function1"
Ports [0, 1]
Position [40, 31, 105, 59]
FunctionName "homopuls"
Parameters "samp_time, out_divid, offset"
}
Block {
BlockType Outport
Name "Outport"
Position [160, 35, 180, 55]
}
Line {
SrcBlock "S-function1"
SrcPort 1
DstBlock "Outport"
DstPort 1
}
}
}
Block {
BlockType Outport
Name "out_1"
Position [295, 65, 315, 85]
}
Line {
SrcBlock "Pulses deivide\nsame sample time1"
SrcPort 1
DstBlock "Message source"
DstPort 1
}
Line {
SrcBlock "Message source"
SrcPort 1
DstBlock "out_1"
DstPort 1
}
}
}
Block {
BlockType "S-Function"
Name "D/A "
Ports [1, 1]
Position [370, 128, 450, 172]
FunctionName "simbi2de"
Parameters "p"
MaskType "Base M vector to decimal integer"
MaskDescription "Convert base M integer with each\nposition "
"in the input vector into scalar decimal output."
MaskHelp "This block convert the base M vector into s"
"calar decimal integer output. Each element of the input vector is one positio"
"n of the digit of the base M integer. The 1st element in the input vector con"
"tains the 1's position. The 2nd element in the input vector contains the M's "
"position."
MaskPromptString "Input integer base M:"
MaskStyleString "edit"
MaskTunableValueString "on"
MaskEnableString "on"
MaskVisibilityString "on"
MaskToolTipString "on"
MaskInitialization "p=@1;"
MaskDisplay "disp('Vec to sca\\nconverter')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "2"
}
Block {
BlockType SubSystem
Name "Shift register"
Ports [2, 2]
Position [120, 133, 200, 177]
ShowPortLabels off
TreatAsAtomicUnit off
MaskType "Register-shift"
MaskDescription "The rising edge of the 2nd port pulse\ntrig"
"gers the block to input the 1st port data and to shift the register."
MaskHelp "This block stores the scalar input signal f"
"rom the 1st input port at the rising edge of the pulse from the 2nd port. The"
" 1st outport outputs a vector with its size the same as the \"Delay steps\" e"
"ntree of this block. The maximum delay is the register size of this block. Th"
"e second outport outputs a positive pulse when the register is\\nrefreshed."
MaskPromptString "Delay steps (output length is same as this "
"vector size):|Threshold in detecting the rising edge of the pulse:"
MaskStyleString "edit,edit"
MaskTunableValueString "on,on"
MaskCallbackString "|"
MaskEnableString "on,on"
MaskVisibilityString "on,on"
MaskToolTipString "on,on"
MaskVarAliasString ","
MaskInitialization "shft_out=@1;thrhld=@2;len_rg=length(@1);[v,"
"w]=trigicon(0,25,get_param(gcb,'orientation'),2);[x,y]=trigicon(1,75,get_para"
"m(gcb,'orientation'),2);"
MaskDisplay "plot(0,0,100,100,x,y,v,w);disp('Reg. shift'"
")"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "[2 1]|1"
System {
Name "Shift register"
Location [19, 610, 374, 740]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "in_1"
Position [30, 55, 50, 75]
}
Block {
BlockType Inport
Name "in_2"
Position [30, 70, 50, 90]
Port "2"
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -