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

📄 tddmmfsk.m

📁 数字通信第四版原书的例程
💻 M
📖 第 1 页 / 共 4 页
字号:
add_block('built-in/Outport',[sys,'/',['Coherent',13,'MFSK demod/out_1']])
set_param([sys,'/',['Coherent',13,'MFSK demod/out_1']],...
		'hide name',0,...
		'position',[360,40,380,60])

add_block('built-in/Inport',[sys,'/',['Coherent',13,'MFSK demod/in_1']])
set_param([sys,'/',['Coherent',13,'MFSK demod/in_1']],...
		'hide name',0,...
		'position',[30,40,50,60])
add_line([sys,'/',['Coherent',13,'MFSK demod']],[185,50;220,50])
add_line([sys,'/',['Coherent',13,'MFSK demod']],[55,50;95,50])
add_line([sys,'/',['Coherent',13,'MFSK demod']],[310,50;355,50])
set_param([sys,'/',['Coherent',13,'MFSK demod']],...
		'Mask Display','plot(0,0,100,100,x,y);Cohe MFSK',...
		'Mask Type','Passband MFSK demodulation')
set_param([sys,'/',['Coherent',13,'MFSK demod']],...
		'Mask Dialogue','Demodulate a MFSK modulated signal\nusing coherent demodulation method.|M-ary number (output digits in range [0, M-1]):|Tone space (Hz):|Symbol interval (sec):|Carrier frequency (Hz):|Initial phase (rad):|Sample time (sec):')
set_param([sys,'/',['Coherent',13,'MFSK demod']],...
		'Mask Translate','M=@1;Fc=@4;Ph=@5;Ton=@2;td=@3;ts=@6;[x,y]=moduicon(8);')
set_param([sys,'/',['Coherent',13,'MFSK demod']],...
		'Mask Help','This block demodulates a MFSK modulated signal using coherent method. The coherent demodulation method is phase sensitive. The tone space is the frequency distance between two consecutive digit after the modulation. The inputs are integers 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,'/',['Coherent',13,'MFSK demod']],...
		'Mask Entries','M\/M/td/5\/td\/100\/0\/ts\/')


%     Finished composite block ['Coherent',13,'MFSK demod'].

set_param([sys,'/',['Coherent',13,'MFSK demod']],...
		'hide name',0,...
		'position',[420,63,500,107])

add_block('built-in/Mux',[sys,'/','Mux1'])
set_param([sys,'/','Mux1'],...
		'hide name',0,...
		'inputs','2',...
		'position',[545,72,580,123])


%     Subsystem  'Error rate1'.

new_system([sys,'/','Error rate1'])
set_param([sys,'/','Error rate1'],'Location',[255,368,509,510])

add_block('built-in/Inport',[sys,'/','Error rate1/in_2'])
set_param([sys,'/','Error rate1/in_2'],...
		'Port','2',...
		'position',[15,60,35,80])

add_block('built-in/Inport',[sys,'/','Error rate1/in_1'])
set_param([sys,'/','Error rate1/in_1'],...
		'position',[15,45,35,65])

add_block('built-in/Mux',[sys,'/','Error rate1/Mux'])
set_param([sys,'/','Error rate1/Mux'],...
		'inputs','2',...
		'position',[65,46,100,79])

add_block('built-in/S-Function',[sys,'/','Error rate1/S-function'])
set_param([sys,'/','Error rate1/S-function'],...
		'function name','sbiterr',...
		'parameters','num_lin, K, TDelay, Sample',...
		'position',[130,52,195,78])
add_line([sys,'/','Error rate1'],[40,70;60,70])
add_line([sys,'/','Error rate1'],[40,55;60,55])
add_line([sys,'/','Error rate1'],[105,65;125,65])
set_param([sys,'/','Error rate1'],...
		'Mask Display','Error\nmeter',...
		'Mask Type','Symbol/bit error counter')
set_param([sys,'/','Error rate1'],...
		'Mask Dialogue','Use the input data from the 1st port as the reference signal to detect the number of errors and error rate of the 2nd port inputted signal.|Bit per symbol:|Number of digits on display:|Delay between input (1st port) and output (2nd port):|Sampling time (sec):')
set_param([sys,'/','Error rate1'],...
		'Mask Translate','K=@1;num_lin=@2;TDelay=@3;Sample=@4;')
set_param([sys,'/','Error rate1'],...
		'Mask Help','The signal from the first port must be a scalar. The second input port can be a vector with a same-time delay to the input signal. The comparison happens only at the sampling point.')
set_param([sys,'/','Error rate1'],...
		'Mask Entries','3\/20\/td\/td\/')


%     Finished composite block 'Error rate1'.

set_param([sys,'/','Error rate1'],...
		'hide name',0,...
		'position',[610,68,690,112])


%     Subsystem  ['Noncoherent',13,'MFSK demod'].

new_system([sys,'/',['Noncoherent',13,'MFSK demod']])
set_param([sys,'/',['Noncoherent',13,'MFSK demod']],'Location',[547,283,1004,466])


%     Subsystem  ['Noncoherent',13,'MFSK demod/Min//max index1'].

new_system([sys,'/',['Noncoherent',13,'MFSK demod/Min//max index1']])
set_param([sys,'/',['Noncoherent',13,'MFSK demod/Min//max index1']],'Location',[192,461,623,564])

add_block('built-in/Inport',[sys,'/',['Noncoherent',13,'MFSK demod/Min//max index1/in_1']])
set_param([sys,'/',['Noncoherent',13,'MFSK demod/Min//max index1/in_1']],...
		'position',[65,20,85,40])

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

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

add_block('built-in/S-Function',[sys,'/',['Noncoherent',13,'MFSK demod/Min//max index1/Maximum']])
set_param([sys,'/',['Noncoherent',13,'MFSK demod/Min//max index1/Maximum']],...
		'function name','arymimai',...
		'parameters','mima',...
		'position',[240,20,320,40])
add_line([sys,'/',['Noncoherent',13,'MFSK demod/Min//max index1']],[90,30;160,30])
add_line([sys,'/',['Noncoherent',13,'MFSK demod/Min//max index1']],[325,30;330,30])
add_line([sys,'/',['Noncoherent',13,'MFSK demod/Min//max index1']],[205,30;235,30])
set_param([sys,'/',['Noncoherent',13,'MFSK demod/Min//max index1']],...
		'Mask Display','Min/Max\ndemap',...
		'Mask Type','Maximum/minimum index.')
set_param([sys,'/',['Noncoherent',13,'MFSK demod/Min//max index1']],...
		'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,'/',['Noncoherent',13,'MFSK demod/Min//max index1']],...
		'Mask Translate','td=@1;mima=@2;')
set_param([sys,'/',['Noncoherent',13,'MFSK demod/Min//max index1']],...
		'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,'/',['Noncoherent',13,'MFSK demod/Min//max index1']],...
		'Mask Entries','td\/''max''\/')


%     Finished composite block ['Noncoherent',13,'MFSK demod/Min//max index1'].

set_param([sys,'/',['Noncoherent',13,'MFSK demod/Min//max index1']],...
		'position',[230,68,310,112])


%     Subsystem  ['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband'].

new_system([sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband']])
set_param([sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband']],'Location',[10,2228368,850,2228643])

add_block('built-in/Outport',[sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/out_1']])
set_param([sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/out_1']],...
		'position',[825,85,845,105])

add_block('built-in/Inport',[sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/in_1']])
set_param([sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/in_1']],...
		'position',[490,75,510,95])

add_block('built-in/Sum',[sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/Sum3']])
set_param([sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/Sum3']],...
		'position',[385,113,405,142])

add_block('built-in/Mux',[sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/Mux']])
set_param([sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/Mux']],...
		'inputs','[N N]',...
		'position',[425,78,455,122])

add_block('built-in/S-Function',[sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/Array sin']])
set_param([sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/Array sin']],...
		'function name','arysin',...
		'parameters','''cos''',...
		'position',[470,90,520,110])

add_block('built-in/Product',[sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/Product']])
set_param([sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/Product']],...
		'position',[540,76,565,109])

add_block('built-in/Constant',[sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/Initial phase1']])
set_param([sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/Initial phase1']],...
		'Value','Ph',...
		'position',[335,153,355,177])

add_block('built-in/Product',[sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/Product1']])
set_param([sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/Product1']],...
		'position',[675,76,700,109])

add_block('built-in/Demux',[sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/Demux']])
set_param([sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/Demux']],...
		'outputs','[N N]',...
		'position',[720,75,760,110])

add_block('built-in/Sum',[sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/Sum4']])
set_param([sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/Sum4']],...
		'position',[785,78,805,107])

add_block('built-in/S-Function',[sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/Scheduled',13,'reset-int1']])
set_param([sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/Scheduled',13,'reset-int1']],...
		'function name','schdint',...
		'parameters','td, ts, limit',...
		'Mask Display','Schdld\nreset-int')
set_param([sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/Scheduled',13,'reset-int1']],...
		'Mask Type','Scheduled reset integration.')
set_param([sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/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,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/Scheduled',13,'reset-int1']],...
		'Mask Translate','td=@1;ts=@2;limit=@3;')
set_param([sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/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,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/Scheduled',13,'reset-int1']],...
		'Mask Entries','td\/ts\/Inf\/',...
		'position',[580,74,640,116])

add_block('built-in/Sum',[sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/Sum2']])
set_param([sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/Sum2']],...
		'inputs','+-',...
		'position',[265,155,290,190])

add_block('built-in/Clock',[sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/Clock']])
set_param([sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/Clock']],...
		'position',[95,155,115,175])

add_block('built-in/Gain',[sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/Gain']])
set_param([sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/Gain']],...
		'Gain','Fc',...
		'position',[145,155,165,175])

add_block('built-in/Zero-Order Hold',[sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/Zero-Order',13,'Hold']])
set_param([sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/Zero-Order',13,'Hold']],...
		'Sample time','td',...
		'position',[195,179,230,211])

add_block('built-in/Constant',[sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/Initial phase']])
set_param([sys,'/',['Noncoherent',13,'MFSK demod/Non-coh MFSK dm',13,'corr passband/Initial phase']],...
		'Value','Ph',...

⌨️ 快捷键说明

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