⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 com_moce.m

📁 数字通信第四版原书的例程
💻 M
📖 第 1 页 / 共 5 页
字号:

%     Finished composite block ['MASK demod',13,'baseband'].

set_param([sys,'/',['MASK demod',13,'baseband']],...
		'position',[175,53,255,97])


%     Subsystem  ['MPSK demod',13,'baseband'].

new_system([sys,'/',['MPSK demod',13,'baseband']])
set_param([sys,'/',['MPSK demod',13,'baseband']],'Location',[4,554,405,737])

add_block('built-in/Outport',[sys,'/',['MPSK demod',13,'baseband/out_1']])
set_param([sys,'/',['MPSK demod',13,'baseband/out_1']],...
		'position',[295,65,315,85])

add_block('built-in/Inport',[sys,'/',['MPSK demod',13,'baseband/in_1']])
set_param([sys,'/',['MPSK demod',13,'baseband/in_1']],...
		'position',[10,65,30,85])


%     Subsystem  ['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband'].

new_system([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband']])
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband']],'Location',[102,505,735,711])

add_block('built-in/Constant',[sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Initial phase']])
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Initial phase']],...
		'Value','Ph',...
		'position',[100,93,120,117])

add_block('built-in/Sum',[sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Sum3']])
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Sum3']],...
		'position',[535,105,555,125])

add_block('built-in/Inport',[sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/in_1']])
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/in_1']],...
		'position',[175,30,195,50])

add_block('built-in/S-Function',[sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Scheduled',13,'reset-int2']])
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Scheduled',13,'reset-int2']],...
		'function name','schdint',...
		'parameters','td, ts, limit',...
		'Mask Display','Schdld\nreset-int')
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Scheduled',13,'reset-int2']],...
		'Mask Type','Scheduled reset integration.')
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Scheduled',13,'reset-int2']],...
		'Mask Dialogue','Reset the state to be zero(s) at the scheduled reset point.|Scheduled reset time inteval and offset:|Sample time and offset:|Modulo bound:')
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Scheduled',13,'reset-int2']],...
		'Mask Translate','td=@1;ts=@2;limit=@3;')
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Scheduled',13,'reset-int2']],...
		'Mask Help','This block resets the state(s) to be zero(s) at the begining of reset time inteval. The reset inteval can be a two elements vector with the second element being offset.')
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Scheduled',13,'reset-int2']],...
		'Mask Entries','td\/ts\/Inf\/',...
		'position',[420,114,480,156])

add_block('built-in/Product',[sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Product3']])
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Product3']],...
		'position',[355,116,380,149])

add_block('built-in/S-Function',[sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Array sin']])
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Array sin']],...
		'ForeGround',4,...
		'function name','arysin',...
		'parameters','''sin''',...
		'position',[230,130,280,150])

add_block('built-in/Outport',[sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/out_1']])
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/out_1']],...
		'position',[585,105,605,125])

add_block('built-in/S-Function',[sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Array cos']])
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Array cos']],...
		'ForeGround',3,...
		'function name','arysin',...
		'parameters','''cos''',...
		'position',[230,85,280,105])

add_block('built-in/Demux',[sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Demux']])
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Demux']],...
		'ForeGround',2,...
		'outputs','2',...
		'position',[235,20,275,55])

add_block('built-in/Product',[sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Product']])
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Product']],...
		'position',[355,21,380,54])

add_block('built-in/S-Function',[sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Scheduled',13,'reset-int1']])
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Scheduled',13,'reset-int1']],...
		'function name','schdint',...
		'parameters','td, ts, limit',...
		'Mask Display','Schdld\nreset-int')
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Scheduled',13,'reset-int1']],...
		'Mask Type','Scheduled reset integration.')
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Scheduled',13,'reset-int1']],...
		'Mask Dialogue','Reset the state to be zero(s) at the scheduled reset point.|Scheduled reset time inteval and offset:|Sample time and offset:|Modulo bound:')
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Scheduled',13,'reset-int1']],...
		'Mask Translate','td=@1;ts=@2;limit=@3;')
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Scheduled',13,'reset-int1']],...
		'Mask Help','This block resets the state(s) to be zero(s) at the begining of reset time inteval. The reset inteval can be a two elements vector with the second element being offset.')
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Scheduled',13,'reset-int1']],...
		'Mask Entries','td\/ts\/Inf\/',...
		'position',[420,19,480,61])

add_block('built-in/Sum',[sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Sum1']])
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Sum1']],...
		'position',[165,75,190,115])

add_block('built-in/Constant',[sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Shift key']])
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband/Shift key']],...
		'Value','sft',...
		'position',[40,63,60,87])
add_line([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband']],[65,75;95,75;95,85;160,85])
add_line([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband']],[125,105;160,105])
add_line([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband']],[195,95;225,95])
add_line([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband']],[205,95;205,140;225,140])
add_line([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband']],[280,30;350,30])
add_line([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband']],[285,95;320,95;320,45;350,45])
add_line([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband']],[560,115;580,115])
add_line([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband']],[485,135;510,135;510,120;530,120])
add_line([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband']],[485,40;510,40;510,110;530,110])
add_line([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband']],[385,40;415,40])
add_line([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband']],[385,135;415,135])
add_line([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband']],[285,140;350,140])
add_line([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband']],[280,45;310,45;310,125;350,125])
add_line([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband']],[200,40;230,40])
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband']],...
		'Mask Display','plot(0,0,100,100,u,v);  MPSK corr',...
		'Mask Type','Baseband MPSK correlationA')
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband']],...
		'Mask Dialogue','Compute Baseband MPSK correlation. Take\nMPSK CE modulated signal. Output a vector of correlation result.|M-ary number (integer in range [0, M-1]):|Symbol interval and offset (sec):|Initial phase (rad):|Sample time (sec):')
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband']],...
		'Mask Translate','pi2=2*pi;N=@1;sft=[0:N-1]*pi2/N;td=@2;Ph=@3;ts=@4;[u,v]=cmplxicn(0,50,get_param(gcb,''orientation''));')
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband']],...
		'Mask Help','This block calculates the correlation value of the input signal with a vector of sinusoidal signals. These sinusoidal signals have their phase shift the same as that of PM modulated signal of possible resulting digits. The output is an M length vector. The MPSK demodulation result is the index of the largest output, using the Min/max demap block. The input of this block is complex signal.')
set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband']],...
		'Mask Entries','M\/td\/Ph\/ts\/')


%     Finished composite block ['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband'].

set_param([sys,'/',['MPSK demod',13,'baseband/MPSK demod',13,'corr baseband']],...
		'position',[60,53,140,97])


%     Subsystem  ['MPSK demod',13,'baseband/Min//max index2'].

new_system([sys,'/',['MPSK demod',13,'baseband/Min//max index2']])
set_param([sys,'/',['MPSK demod',13,'baseband/Min//max index2']],'Location',[192,461,623,564])

add_block('built-in/S-Function',[sys,'/',['MPSK demod',13,'baseband/Min//max index2/Maximum']])
set_param([sys,'/',['MPSK demod',13,'baseband/Min//max index2/Maximum']],...
		'function name','arymimai',...
		'parameters','mima',...
		'position',[240,20,320,40])

add_block('built-in/Outport',[sys,'/',['MPSK demod',13,'baseband/Min//max index2/out_1']])
set_param([sys,'/',['MPSK demod',13,'baseband/Min//max index2/out_1']],...
		'position',[335,20,355,40])

add_block('built-in/Zero-Order Hold',[sys,'/',['MPSK demod',13,'baseband/Min//max index2/Zero-Order',13,'Hold']])
set_param([sys,'/',['MPSK demod',13,'baseband/Min//max index2/Zero-Order',13,'Hold']],...
		'Sample time','td',...
		'position',[165,14,200,46])

add_block('built-in/Inport',[sys,'/',['MPSK demod',13,'baseband/Min//max index2/in_1']])
set_param([sys,'/',['MPSK demod',13,'baseband/Min//max index2/in_1']],...
		'position',[65,20,85,40])
add_line([sys,'/',['MPSK demod',13,'baseband/Min//max index2']],[205,30;235,30])
add_line([sys,'/',['MPSK demod',13,'baseband/Min//max index2']],[325,30;330,30])
add_line([sys,'/',['MPSK demod',13,'baseband/Min//max index2']],[90,30;160,30])
set_param([sys,'/',['MPSK demod',13,'baseband/Min//max index2']],...
		'Mask Display','Min/Max\ndemap',...
		'Mask Type','Maximum/minimum index.')
set_param([sys,'/',['MPSK demod',13,'baseband/Min//max index2']],...
		'Mask Dialogue','Choose the index of the input vector with\nmax/min value at sampling point. Hold the\nvalue for the rest of the period.|Symbol interval (sec):|''max'' or ''min'':')
set_param([sys,'/',['MPSK demod',13,'baseband/Min//max index2']],...
		'Mask Translate','td=@1;mima=@2;')
set_param([sys,'/',['MPSK demod',13,'baseband/Min//max index2']],...
		'Mask Help','This block outputs the index of the vector element that has the maximum or minimum value in the input vector. The computation starts at the sampling time point. The block holds the value for the rest of the interval.')
set_param([sys,'/',['MPSK demod',13,'baseband/Min//max index2']],...
		'Mask Entries','td\/''max''\/')


%     Finished composite block ['MPSK demod',13,'baseband/Min//max index2'].

set_param([sys,'/',['MPSK demod',13,'baseband/Min//max index2']],...
		'ForeGround',4,...
		'position',[180,53,260,97])
add_line([sys,'/',['MPSK demod',13,'baseband']],[265,75;290,75])
add_line([sys,'/',['MPSK demod',13,'baseband']],[35,75;55,75])
add_line([sys,'/',['MPSK demod',13,'baseband']],[145,75;175,75])
set_param([sys,'/',['MPSK demod',13,'baseband']],...
		'Mask Display','plot(0,0,100,100,x,y,u,v);MPSK',...
		'Mask Type','Baseband MPSK demodulation')
set_param([sys,'/',['MPSK demod',13,'baseband']],...
		'Mask Dialogue','Demodulate the complex envelope of a\nMPSK modulated signal.|M-ary number (integer in range [0, M-1]):|Symbol interval and offset (sec):|Initial phase (rad):|Sample time (sec):')
set_param([sys,'/',['MPSK demod',13,'baseband']],...
		'Mask Translate','M=@1;Ph=@3;td=@2;ts=@4;[x,y]=moduicon(8);[u,v]=cmplxicn(0,50,get_param(gcb,''orientation''));')
set_param([sys,'/',['MPSK demod',13,'baseband']],...
		'Mask Help','This block outputs the complex envelope of a MPSK modulated signal using correlation method. The output signal are digits in the range [0, M-1], where M is the M-ary number. When the symbol interval is a two-element vector, the second element is the offset (default 0).')
set_param([sys,'/',['MPSK demod',13,'baseband']],...
		'Mask Entries','16\/.2\/0\/.01\/')


%     Finished composite block ['MPSK demod',13,'baseband'].

set_param([sys,'/',['MPSK demod',13,'baseband']],...
		'position',[175,428,255,472])


%     Subsystem  ['MPSK mod',13,'baseband'].

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -