📄 com_cemo.m
字号:
add_line([sys,'/',['PDM',13,'baseband']],[420,140;420,160;270,160])
set_param([sys,'/',['PDM',13,'baseband']],...
'Mask Display','plot(0,0,100,100,x,y,u,v);PDM',...
'Mask Type','PLL PDM CE')
set_param([sys,'/',['PDM',13,'baseband']],...
'Mask Dialogue','Demodulate the complex envelope of a\nPM modulated signal.|VCO initial phase (rad):|Lowpass filter numerator:|Lowpass filter denominator:|Sample time (sec):')
set_param([sys,'/',['PDM',13,'baseband']],...
'Mask Translate','Ph=@1;num=@2;den=@3;ts=@4;pi2=2*pi;[x,y]=moduicon(4);[u,v]=cmplxicn(0,50,get_param(gcb,''orientation''));')
set_param([sys,'/',['PDM',13,'baseband']],...
'Mask Help','This block demodulates the complex envelope of a PM modulated signal. This block uses a phase-locked loop with a multiplier phase detector.')
set_param([sys,'/',['PDM',13,'baseband']],...
'Mask Entries','0\/[4.57 9.14 4.57]*.01\/[1 -1.3108 .4936]\/.01\/')
% Finished composite block ['PDM',13,'baseband'].
set_param([sys,'/',['PDM',13,'baseband']],...
'position',[180,273,260,317])
% Subsystem ['ADM with carrier',13,'baseband'].
new_system([sys,'/',['ADM with carrier',13,'baseband']])
set_param([sys,'/',['ADM with carrier',13,'baseband']],'Location',[468,490,803,640])
% Subsystem ['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE'].
new_system([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE']],'Location',[103,111,653,332])
add_block('built-in/Outport',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/out_1']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/out_1']],...
'position',[495,15,515,35])
add_block('built-in/Product',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Product1']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Product1']],...
'orientation',2,...
'position',[400,90,435,110])
add_block('built-in/Filter',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Filter2']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Filter2']],...
'orientation',2,...
'Numerator','num',...
'Denominator','den',...
'Sample time','ts',...
'position',[310,80,370,120])
add_block('built-in/Filter',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Filter']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Filter']],...
'Numerator','num',...
'Denominator','den',...
'Sample time','ts',...
'position',[270,6,325,44])
% Subsystem ['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply'].
new_system([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply']],'Location',[297,318,980,694])
add_block('built-in/Inport',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/Complex',13,'input 2']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/Complex',13,'input 2']],...
'Port','2',...
'position',[25,205,45,225])
add_block('built-in/Demux',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/Split1']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/Split1']],...
'outputs','2',...
'Mask Display','Complex to\nReal/Imag',...
'Mask Type','Complex to Real/Imag')
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/Split1']],...
'Mask Dialogue','Real and imaginary components of complex vector.')
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/Split1']],...
'Mask Help','The Complex to Real/Imag block decomposes a complex vector into its real and imaginary components using a Demux block. The real part is directed to output 1, and the imaginary to output 2.')
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/Split1']],...
'position',[80,194,155,236])
add_block('built-in/Inport',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/Complex',13,'input 1']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/Complex',13,'input 1']],...
'position',[35,90,55,110])
add_block('built-in/Demux',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/Split']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/Split']],...
'outputs','2',...
'Mask Display','Complex to\nReal/Imag',...
'Mask Type','Complex to Real/Imag')
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/Split']],...
'Mask Dialogue','Real and imaginary components of complex vector.')
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/Split']],...
'Mask Help','The Complex to Real/Imag block decomposes a complex vector into its real and imaginary components using a Demux block. The real part is directed to output 1, and the imaginary to output 2.')
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/Split']],...
'position',[85,79,160,121])
add_block('built-in/Note',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/R = Real',13,'I = Imaginary']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/R = Real',13,'I = Imaginary']],...
'position',[55,0,60,5])
add_block('built-in/Note',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/I_out']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/I_out']],...
'position',[450,286,455,291])
add_block('built-in/Note',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/R_out']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/R_out']],...
'position',[450,95,455,100])
add_block('built-in/Sum',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/Sum1']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/Sum1']],...
'position',[380,280,400,300])
add_block('built-in/Product',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/Product2']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/Product2']],...
'position',[305,298,335,322])
add_block('built-in/Product',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/Product3']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/Product3']],...
'position',[305,253,335,277])
add_block('built-in/Sum',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/Sum']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/Sum']],...
'inputs','+-',...
'position',[380,110,400,130])
add_block('built-in/Product',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/Product1']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/Product1']],...
'position',[305,143,335,167])
add_block('built-in/Product',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/Product']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/Product']],...
'position',[305,83,335,107])
add_block('built-in/Note',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/R2']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/R2']],...
'position',[190,185,195,190])
add_block('built-in/Note',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/R1']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/R1']],...
'position',[195,65,200,70])
add_block('built-in/Note',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/I1']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/I1']],...
'position',[198,108,203,113])
add_block('built-in/Outport',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/Imag']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/Imag']],...
'Port','2',...
'position',[485,280,505,300])
add_block('built-in/Outport',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/Real']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/Real']],...
'position',[495,110,515,130])
add_block('built-in/Note',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/I2']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/I2']],...
'position',[170,225,175,230])
add_block('built-in/Gain',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/Conjugate']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply/Conjugate']],...
'Gain','-1',...
'position',[190,210,230,240])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply']],[340,310;350,310;350,295;375,295])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply']],[340,265;350,265;350,285;375,285])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply']],[165,110;250,110;250,150;300,150])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply']],[255,150;255,315;300,315])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply']],[160,205;275,205;275,100;300,100])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply']],[275,205;275,305;300,305])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply']],[165,90;300,90])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply']],[243,90;243,260;300,260])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply']],[340,155;350,155;350,125;375,125])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply']],[340,95;350,95;350,115;375,115])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply']],[50,215;75,215])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply']],[60,100;80,100])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply']],[405,290;480,290])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply']],[405,120;490,120])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply']],[160,225;185,225])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply']],[235,225;260,225;260,160;300,160])
add_line([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply']],[260,225;260,270;300,270])
% Finished composite block ['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply'].
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/Cmplx-in',13,'Re//Im-out',13,'Multiply']],...
'orientation',2,...
'position',[50,70,125,110])
add_block('built-in/Inport',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/in_1']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/in_1']],...
'orientation',2,...
'position',[165,70,185,90])
% Subsystem ['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/FM CE//VCO'].
new_system([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/FM CE//VCO']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/FM CE//VCO']],'Location',[114,165,727,312])
add_block('built-in/Inport',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/FM CE//VCO/in_1']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/FM CE//VCO/in_1']],...
'position',[35,25,55,45])
add_block('built-in/Gain',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/FM CE//VCO/Sensitivity']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/FM CE//VCO/Sensitivity']],...
'Gain','Kc',...
'position',[80,21,120,49])
add_block('built-in/Fcn',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/FM CE//VCO/cos']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/FM CE//VCO/cos']],...
'Expr','cos(u)',...
'position',[270,21,325,49])
add_block('built-in/Fcn',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/FM CE//VCO/sin']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/FM CE//VCO/sin']],...
'Expr','sin(u)',...
'position',[270,81,325,109])
add_block('built-in/Mux',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/FM CE//VCO/Mux']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/FM CE//VCO/Mux']],...
'inputs','2',...
'position',[355,26,390,59])
add_block('built-in/Gain',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/FM CE//VCO/Sensitivity1']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/FM CE//VCO/Sensitivity1']],...
'Gain','Ac',...
'position',[420,31,460,59])
add_block('built-in/Outport',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/FM CE//VCO/out_1']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/FM CE//VCO/out_1']],...
'position',[490,35,510,55])
% Subsystem ['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/FM CE//VCO/Dis module',13,'integrator'].
new_system([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/FM CE//VCO/Dis module',13,'integrator']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/FM CE//VCO/Dis module',13,'integrator']],'Location',[40,403,515,507])
add_block('built-in/Outport',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/FM CE//VCO/Dis module',13,'integrator/out_1']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/FM CE//VCO/Dis module',13,'integrator/out_1']],...
'position',[445,30,465,50])
add_block('built-in/Unit Delay',[sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/FM CE//VCO/Dis module',13,'integrator/Unit Delay']])
set_param([sys,'/',['ADM with carrier',13,'baseband/Costas DSB-ADM',13,'CE/FM CE//VCO/Dis module',13,'integrator/Unit Delay']],...
'Sample time','ts',...
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -