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

📄 tceps2c2.m

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

%     Finished composite block ['C-map QASK',13,'demod baseband/QADM',13,'baseband3'].

set_param([sys,'/',['C-map QASK',13,'demod baseband/QADM',13,'baseband3']],...
		'ForeGround',4,...
		'hide name',0,...
		'position',[70,53,150,97])


%     Subsystem  ['C-map QASK',13,'demod baseband/QASK',13,'circle-demap'].

new_system([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap']])
set_param([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap']],'Location',[96,182,645,417])

add_block('built-in/Zero-Order Hold',[sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap/Zero-Order',13,'Hold']])
set_param([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap/Zero-Order',13,'Hold']],...
		'ForeGround',2,...
		'Sample time','td',...
		'position',[120,29,155,61])

add_block('built-in/Inport',[sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap/real']])
set_param([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap/real']],...
		'position',[45,35,65,55])

add_block('built-in/Inport',[sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap/imag']])
set_param([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap/imag']],...
		'Port','2',...
		'position',[45,120,65,140])

add_block('built-in/Zero-Order Hold',[sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap/Zero-Order',13,'Hold1']])
set_param([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap/Zero-Order',13,'Hold1']],...
		'ForeGround',4,...
		'Sample time','td',...
		'position',[120,114,155,146])

add_block('built-in/Sum',[sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap/Sum1']])
set_param([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap/Sum1']],...
		'ForeGround',2,...
		'inputs','+-',...
		'position',[230,38,250,67])

add_block('built-in/Sum',[sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap/Sum6']])
set_param([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap/Sum6']],...
		'ForeGround',4,...
		'inputs','+-',...
		'position',[230,123,250,152])

add_block('built-in/Product',[sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap/Product']])
set_param([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap/Product']],...
		'position',[300,45,325,65])

add_block('built-in/Product',[sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap/Product1']])
set_param([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap/Product1']],...
		'position',[300,130,325,150])

add_block('built-in/Sum',[sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap/Sum2']])
set_param([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap/Sum2']],...
		'position',[370,78,390,107])

add_block('built-in/S-Function',[sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap/Minimum1']])
set_param([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap/Minimum1']],...
		'function name','arymimai',...
		'parameters','''min''',...
		'position',[415,85,475,105])

add_block('built-in/Outport',[sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap/out_1']])
set_param([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap/out_1']],...
		'position',[495,85,515,105])

add_block('built-in/Constant',[sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap/real_pt']])
set_param([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap/real_pt']],...
		'BackGround',3,...
		'Value','y1',...
		'position',[170,84,195,106])

add_block('built-in/Constant',[sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap/imag_pt']])
set_param([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap/imag_pt']],...
		'BackGround',5,...
		'Value','y2',...
		'position',[165,169,190,191])
add_line([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap']],[70,45;115,45])
add_line([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap']],[70,130;115,130])
add_line([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap']],[200,95;205,95;205,60;225,60])
add_line([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap']],[160,45;225,45])
add_line([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap']],[160,130;225,130])
add_line([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap']],[195,180;205,180;205,145;225,145])
add_line([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap']],[255,55;270,55;270,50;295,50])
add_line([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap']],[270,55;270,60;295,60])
add_line([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap']],[255,140;270,140;270,135;295,135])
add_line([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap']],[270,140;270,145;295,145])
add_line([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap']],[330,55;340,55;340,85;365,85])
add_line([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap']],[330,140;340,140;340,100;365,100])
add_line([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap']],[395,95;410,95])
add_line([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap']],[480,95;490,95])
set_param([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap']],...
		'Mask Display','QASK\nC-demap',...
		'Mask Type','QASK C-demap')
set_param([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap']],...
		'Mask Dialogue','Reverse the QASK map. Input in-phase\nand quadrature components from the\ntwo inputs. Output demapped signal.|Number of symbols on each circle NIC::|Radii for each circle RIC:|Phase shift on each circle PIC (rad):|Symbol interval and offset (sec):')
set_param([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap']],...
		'Mask Translate','N=@1;A=@2;P=@3;td=@4;y1=apkconst(N,A,P);y2=imag(y1);y1=real(y1);')
set_param([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap']],...
		'Mask Help','This block demaps a QASK mapped signal using circle constellation. You can place this block after a QAM demodulation block. The circle constellation is defined in NIC, RIC, and PIC. The symbol interval can be a two elements vector with the first element being offset. The default offset is zero. Use function MODMAP to view the constellation.')
set_param([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap']],...
		'Mask Entries','NIR\/AIR\/PIR\/td\/')


%     Finished composite block ['C-map QASK',13,'demod baseband/QASK',13,'circle-demap'].

set_param([sys,'/',['C-map QASK',13,'demod baseband/QASK',13,'circle-demap']],...
		'hide name',0,...
		'position',[175,53,255,97])
add_line([sys,'/',['C-map QASK',13,'demod baseband']],[155,65;170,65])
add_line([sys,'/',['C-map QASK',13,'demod baseband']],[155,85;170,85])
add_line([sys,'/',['C-map QASK',13,'demod baseband']],[35,75;65,75])
add_line([sys,'/',['C-map QASK',13,'demod baseband']],[260,75;280,75])
set_param([sys,'/',['C-map QASK',13,'demod baseband']],...
		'Mask Display','plot(0,0,100,100,x,y,u,v);C-QASK',...
		'Mask Type','Baseband C-QASK demodulation')
set_param([sys,'/',['C-map QASK',13,'demod baseband']],...
		'Mask Dialogue','Demodulate the complex envelope of a QASK modulated signal. The QASK circle conste-\nllation is defined by NIC, RIC, and PIC.|Number of symbols in each circle (NIC):|Radii in each circle (RIC):|Phase shift in each circle (PIC, rad):|Symbol interval (sec):|Lowpass filter [num; den] (a 2 x n matrix):|Sampling time (sec):')
set_param([sys,'/',['C-map QASK',13,'demod baseband']],...
		'Mask Translate','NIR=@1;AIR=@2;PIR=@3;td=@4;num=@5;ts=@6;Ph=0;den=num(2,:);num=num(1,:);[x,y]=moduicon(6);[u,v]=cmplxicn(0,50,get_param(gcb,''orientation''));')
set_param([sys,'/',['C-map QASK',13,'demod baseband']],...
		'Mask Help','This block demodulates the complex envelope of a QASK modulated signal with circle constellation. The vector lengths of numbers on each circle, radii on each circle, and phase on each circle should be the same. Use function DMODCE to view the constellation of the signal distribution. The default initial phase is zero. To specify non-default parameters, ungroup this block to assign parameters.')
set_param([sys,'/',['C-map QASK',13,'demod baseband']],...
		'Mask Entries','NIR\/AIR\/PIR\/[td td-ts]\/[num;den]\/ts\/')


%     Finished composite block ['C-map QASK',13,'demod baseband'].

set_param([sys,'/',['C-map QASK',13,'demod baseband']],...
		'hide name',0,...
		'position',[365,88,445,132])


%     Subsystem  ['ASK Mo//Dem',13,'demo1'].

new_system([sys,'/',['ASK Mo//Dem',13,'demo1']])
set_param([sys,'/',['ASK Mo//Dem',13,'demo1']],'Location',[175,552,335,697])
set_param([sys,'/',['ASK Mo//Dem',13,'demo1']],...
		'Mask Display','View\nconstellation',...
		'Mask Dialogue','eval(''modmap(''''qask/cir'''',[6 12 18 24 30 38],[1 1.93 2.88 3.83 4.78 6.05],[0 0 0 0 0 0])'')')


%     Finished composite block ['ASK Mo//Dem',13,'demo1'].

set_param([sys,'/',['ASK Mo//Dem',13,'demo1']],...
		'BackGround',7,...
		'hide name',0,...
		'position',[490,18,570,62])


%     Subsystem  ['Uniform noise',13,'generator'].

new_system([sys,'/',['Uniform noise',13,'generator']])
set_param([sys,'/',['Uniform noise',13,'generator']],'Location',[420,594,637,734])

add_block('built-in/Outport',[sys,'/',['Uniform noise',13,'generator/out_1']])
set_param([sys,'/',['Uniform noise',13,'generator/out_1']],...
		'position',[165,65,185,85])

add_block('built-in/S-Function',[sys,'/',['Uniform noise',13,'generator/Uniform',13,'noise']])
set_param([sys,'/',['Uniform noise',13,'generator/Uniform',13,'noise']],...
		'function name','surandom',...
		'parameters','seed,up,low',...
		'position',[65,55,135,95])
add_line([sys,'/',['Uniform noise',13,'generator']],[140,75;160,75])
set_param([sys,'/',['Uniform noise',13,'generator']],...
		'Mask Display','plot(0,0,100,100,x,y);Uniform',...
		'Mask Type','Uniform noise generator')
set_param([sys,'/',['Uniform noise',13,'generator']],...
		'Mask Dialogue','Generate uniformly distributed noise\nbetween the upper and lower bounds.|Noise lower bound:|Noise upper bound:|Seed:')
set_param([sys,'/',['Uniform noise',13,'generator']],...
		'Mask Translate','seed=@3;up=@2;low=@1;[x,y]=srcsicon(3);')
set_param([sys,'/',['Uniform noise',13,'generator']],...
		'Mask Help','This block generates a uniformly distributed noise between the given lower and upper bounds. The output size is the same as the vector length of the seed. The upper bound and lower bound can be scalar or vectors with their lengths the same as the length for the seed. The vector length of upper bound must be the same as length of lower bound.')
set_param([sys,'/',['Uniform noise',13,'generator']],...
		'Mask Entries','[-0.5 -0.5 0]\/[0.5 0.5 0.8]\/[1243 432412 25343]\/')


%     Finished composite block ['Uniform noise',13,'generator'].

set_param([sys,'/',['Uniform noise',13,'generator']],...
		'hide name',0,...
		'position',[60,93,140,137])
add_line(sys,[145,115;165,115])
add_line(sys,[225,60;230,60;230,95;250,95])
add_line(sys,[450,110;480,110])
add_line(sys,[90,60;135,60])
add_line(sys,[105,60;105,15;470,15;480,90])
add_line(sys,[340,110;360,110])
add_line(sys,[215,105;250,105])
add_line(sys,[215,115;250,115])
add_line(sys,[215,125;250,125])

drawnow

% Return any arguments.
if (nargin | nargout)
	% Must use feval here to access system in memory
	if (nargin > 3)
		if (flag == 0)
			eval(['[ret,x0,str,ts,xts]=',sys,'(t,x,u,flag);'])
		else
			eval(['ret =', sys,'(t,x,u,flag);'])
		end
	else
		[ret,x0,str,ts,xts] = feval(sys);
	end
else
	drawnow % Flash up the model and execute load callback
end

⌨️ 快捷键说明

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