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

📄 tstpll.m

📁 数字通信第四版原书的例程
💻 M
📖 第 1 页 / 共 5 页
字号:
set_param([sys,'/',['Voltage-controlled',13,'oscillator/Module',13,'Integrator/one']],...
		'orientation',3,...
		'move name',0,...
		'position',[70,55,90,75])

add_block('built-in/Sum',[sys,'/',['Voltage-controlled',13,'oscillator/Module',13,'Integrator/Sum']])
set_param([sys,'/',['Voltage-controlled',13,'oscillator/Module',13,'Integrator/Sum']],...
		'position',[195,30,215,50])

add_block('built-in/Outport',[sys,'/',['Voltage-controlled',13,'oscillator/Module',13,'Integrator/out_1']])
set_param([sys,'/',['Voltage-controlled',13,'oscillator/Module',13,'Integrator/out_1']],...
		'position',[370,30,390,50])
add_line([sys,'/',['Voltage-controlled',13,'oscillator/Module',13,'Integrator']],[205,90;180,90;190,45])
add_line([sys,'/',['Voltage-controlled',13,'oscillator/Module',13,'Integrator']],[155,35;190,35])
add_line([sys,'/',['Voltage-controlled',13,'oscillator/Module',13,'Integrator']],[220,40;230,40])
add_line([sys,'/',['Voltage-controlled',13,'oscillator/Module',13,'Integrator']],[60,25;105,25])
add_line([sys,'/',['Voltage-controlled',13,'oscillator/Module',13,'Integrator']],[80,50;80,35;105,35])
add_line([sys,'/',['Voltage-controlled',13,'oscillator/Module',13,'Integrator']],[330,40;365,40])
add_line([sys,'/',['Voltage-controlled',13,'oscillator/Module',13,'Integrator']],[340,40;340,90;265,90])
set_param([sys,'/',['Voltage-controlled',13,'oscillator/Module',13,'Integrator']],...
		'Mask Display','Mod\nint',...
		'Mask Type','Module Integrator')
set_param([sys,'/',['Voltage-controlled',13,'oscillator/Module',13,'Integrator']],...
		'Mask Dialogue','Module the given number when state exceed limit|Module bound:|Initial value:',...
		'Mask Translate','init=@2; modu=@1;')
set_param([sys,'/',['Voltage-controlled',13,'oscillator/Module',13,'Integrator']],...
		'Mask Help','The absolute value of this integrator will not exceed the specified module bound. The state value is set to be zero when the module bound is reached. This block can only be used for scale value calculation.')
set_param([sys,'/',['Voltage-controlled',13,'oscillator/Module',13,'Integrator']],...
		'Mask Entries','1\/0\/')


%     Finished composite block ['Voltage-controlled',13,'oscillator/Module',13,'Integrator'].

set_param([sys,'/',['Voltage-controlled',13,'oscillator/Module',13,'Integrator']],...
		'position',[210,24,265,56])

add_block('built-in/Fcn',[sys,'/',['Voltage-controlled',13,'oscillator/sin']])
set_param([sys,'/',['Voltage-controlled',13,'oscillator/sin']],...
		'Expr','Ac*sin(u[1]*pi2+Ph)',...
		'position',[285,25,410,55])
add_line([sys,'/',['Voltage-controlled',13,'oscillator']],[415,40;420,40])
add_line([sys,'/',['Voltage-controlled',13,'oscillator']],[270,40;280,40])
add_line([sys,'/',['Voltage-controlled',13,'oscillator']],[190,40;205,40])
add_line([sys,'/',['Voltage-controlled',13,'oscillator']],[120,95;140,95;140,45;160,45])
add_line([sys,'/',['Voltage-controlled',13,'oscillator']],[125,35;160,35])
add_line([sys,'/',['Voltage-controlled',13,'oscillator']],[60,35;75,35])
set_param([sys,'/',['Voltage-controlled',13,'oscillator']],...
		'Mask Display','VCO',...
		'Mask Type','Voltage-controlled oscillator')
set_param([sys,'/',['Voltage-controlled',13,'oscillator']],...
		'Mask Dialogue','The frequency of the output signal\nchanges with the input signal.|Output amplitude:|Oscillation frequency (Hz):|Input sensitivity:|Initial phase (rad):')
set_param([sys,'/',['Voltage-controlled',13,'oscillator']],...
		'Mask Translate','Ac=@1;Fc=@2;Kc=@3;Ph=@4;pi2=2*pi;')
set_param([sys,'/',['Voltage-controlled',13,'oscillator']],...
		'Mask Help','This block causes the frequency of the sinusoidal oscillation signal to change with the input signal voltage. The input sensitivity is the preamplifier added to the input signal.')
set_param([sys,'/',['Voltage-controlled',13,'oscillator']],...
		'Mask Entries','1\/100/2/pi\/1\/0\/')


%     Finished composite block ['Voltage-controlled',13,'oscillator'].

set_param([sys,'/',['Voltage-controlled',13,'oscillator']],...
		'ForeGround',5,...
		'hide name',0,...
		'position',[100,113,180,157])


%     Subsystem  'Subsystem'.

new_system([sys,'/','Subsystem'])
set_param([sys,'/','Subsystem'],'Location',[361,463,1004,745])

add_block('built-in/Note',[sys,'/','Subsystem/This test file is to test Phase-Locked Loops.'])
set_param([sys,'/','Subsystem/This test file is to test Phase-Locked Loops.'],...
		'position',[180,25,185,30])

add_block('built-in/Note',[sys,'/',['Subsystem/The yellow signal is the inputed signal to be modulated. The signal is modulated by a frequency',13,'modulator. The modulated signal is demodulated using PLL.                                                   ']])
set_param([sys,'/',['Subsystem/The yellow signal is the inputed signal to be modulated. The signal is modulated by a frequency',13,'modulator. The modulated signal is demodulated using PLL.                                                   ']],...
		'ForeGround',5)
set_param([sys,'/',['Subsystem/The yellow signal is the inputed signal to be modulated. The signal is modulated by a frequency',13,'modulator. The modulated signal is demodulated using PLL.                                                   ']],...
		'position',[330,45,335,50])

add_block('built-in/Note',[sys,'/',['Subsystem/The baseband PLL model and linearized baseband model is used to simulate the input//output',13,'transfer function of a FM-PLL pair. The models are used to design the PLL filters.                 ']])
set_param([sys,'/',['Subsystem/The baseband PLL model and linearized baseband model is used to simulate the input//output',13,'transfer function of a FM-PLL pair. The models are used to design the PLL filters.                 ']],...
		'ForeGround',4)
set_param([sys,'/',['Subsystem/The baseband PLL model and linearized baseband model is used to simulate the input//output',13,'transfer function of a FM-PLL pair. The models are used to design the PLL filters.                 ']],...
		'position',[325,185,330,190])

add_block('built-in/Note',[sys,'/',['Subsystem/The lowpass filter is designed using: [num,den]=pllfilt(100//2//pi,3,''2cheby'')']])
set_param([sys,'/',['Subsystem/The lowpass filter is designed using: [num,den]=pllfilt(100//2//pi,3,''2cheby'')']],...
		'ForeGround',3,...
		'position',[275,225,280,230])

add_block('built-in/Note',[sys,'/',['Subsystem/There are two different kind of PLL implemented in this toolbox:',13,'PLL using multiplier as phase detector;      ',13,'PLL using charge pump as phase detector.']])
set_param([sys,'/',['Subsystem/There are two different kind of PLL implemented in this toolbox:',13,'PLL using multiplier as phase detector;      ',13,'PLL using charge pump as phase detector.']],...
		'ForeGround',6,...
		'BackGround',6)
set_param([sys,'/',['Subsystem/There are two different kind of PLL implemented in this toolbox:',13,'PLL using multiplier as phase detector;      ',13,'PLL using charge pump as phase detector.']],...
		'position',[240,85,245,90])

add_block('built-in/Note',[sys,'/',['Subsystem/It can be seen that the demodulated signal has a time delay comparing to the',13,'original signal. This is because of the delay of the low pass filter. To view the',13,'delay cause by  LPF, we have placed the filter output as one of the observing signal. ']])
set_param([sys,'/',['Subsystem/It can be seen that the demodulated signal has a time delay comparing to the',13,'original signal. This is because of the delay of the low pass filter. To view the',13,'delay cause by  LPF, we have placed the filter output as one of the observing signal. ']],...
		'position',[305,135,310,140])
set_param([sys,'/','Subsystem'],...
		'Mask Display','?')


%     Finished composite block 'Subsystem'.

set_param([sys,'/','Subsystem'],...
		'hide name',0,...
		'Drop Shadow',4,...
		'position',[515,306,545,342])


%     Subsystem  'VCO out'.

new_system([sys,'/','VCO out'])
set_param([sys,'/','VCO out'],'Location',[0,59,274,252])

add_block('built-in/S-Function',[sys,'/',['VCO out/S-function',13,'M-file which plots',13,'lines',13,'']])
set_param([sys,'/',['VCO out/S-function',13,'M-file which plots',13,'lines',13,'']],...
		'function name','sfuny',...
		'parameters','ax, color,dt',...
		'position',[130,55,180,75])

add_block('built-in/Inport',[sys,'/','VCO out/x'])
set_param([sys,'/','VCO out/x'],...
		'position',[65,55,85,75])
add_line([sys,'/','VCO out'],[90,65;125,65])
set_param([sys,'/','VCO out'],...
		'Mask Display','plot(0,0,100,100,[90,10,10,10,90,90,10],[65,65,90,40,40,90,90],[90,78,69,54,40,31,25,10],[77,60,48,46,56,75,81,84])',...
		'Mask Type','Graph scope.')
set_param([sys,'/','VCO out'],...
		'Mask Dialogue','Graph scope using MATLAB graph window.\nEnter plotting ranges and line type.|Time range:|y-min:|y-max:|Line type (rgbw-:*). Seperate each plot by ''/'':|Sample time:')
set_param([sys,'/','VCO out'],...
		'Mask Translate','color = @4; ax = [0, @1, @2, @3]; dt = @5;')
set_param([sys,'/','VCO out'],...
		'Mask Help','This block plots to the MATLAB graph window and can be used as an improved version of the Scope block. Look at the m-file sfuny.m to see how it works. This block can take scalar or vector input signal.')
set_param([sys,'/','VCO out'],...
		'Mask Entries','1\/-1.1\/1.2\/''y-/c-./m:/m*/ro/b+''\/0\/')


%     Finished composite block 'VCO out'.

set_param([sys,'/','VCO out'],...
		'position',[550,126,580,164])


%     Subsystem  'Phase shift'.

new_system([sys,'/','Phase shift'])
set_param([sys,'/','Phase shift'],'Location',[0,59,274,252])

add_block('built-in/Inport',[sys,'/','Phase shift/x'])
set_param([sys,'/','Phase shift/x'],...
		'position',[65,55,85,75])

add_block('built-in/S-Function',[sys,'/',['Phase shift/S-function',13,'M-file which plots',13,'lines',13,'']])
set_param([sys,'/',['Phase shift/S-function',13,'M-file which plots',13,'lines',13,'']],...
		'function name','sfuny',...
		'parameters','ax, color,dt',...
		'position',[130,55,180,75])
add_line([sys,'/','Phase shift'],[90,65;125,65])
set_param([sys,'/','Phase shift'],...
		'Mask Display','plot(0,0,100,100,[90,10,10,10,90,90,10],[65,65,90,40,40,90,90],[90,78,69,54,40,31,25,10],[77,60,48,46,56,75,81,84])',...
		'Mask Type','Graph scope.')
set_param([sys,'/','Phase shift'],...
		'Mask Dialogue','Graph scope using MATLAB graph window.\nEnter plotting ranges and line type.|Time range:|y-min:|y-max:|Line type (rgbw-:*). Seperate each plot by ''/'':|Sample time:')
set_param([sys,'/','Phase shift'],...
		'Mask Translate','color = @4; ax = [0, @1, @2, @3]; dt = @5;')
set_param([sys,'/','Phase shift'],...
		'Mask Help','This block plots to the MATLAB graph window and can be used as an improved version of the Scope block. Look at the m-file sfuny.m to see how it works. This block can take scalar or vector input signal.')
set_param([sys,'/','Phase shift'],...
		'Mask Entries','4\/-2\/2\/''y-/g--/c-./m:/b-/r:/b+''\/0.01\/')


%     Finished composite block 'Phase shift'.

set_param([sys,'/','Phase shift'],...
		'position',[550,26,580,64])

add_block('built-in/Note',[sys,'/','filter affect'])
set_param([sys,'/','filter affect'],...
		'ForeGround',3,...
		'position',[330,46,335,51])


%     Subsystem  ['Linearized baseband',13,'model for PLL'].

new_system([sys,'/',['Linearized baseband',13,'model for PLL']])
set_param([sys,'/',['Linearized baseband',13,'model for PLL']],'Location',[94,80,709,266])

add_block('built-in/Gain',[sys,'/',['Linearized baseband',13,'model for PLL/Gain1']])
set_param([sys,'/',['Linearized baseband',13,'model for PLL/Gain1']],...
		'Gain','pi2',...
		'position',[140,18,175,52])

add_block('built-in/Gain',[sys,'/',['Linearized baseband',13,'model for PLL/Gain']])
set_param([sys,'/',['Linearized baseband',13,'model for PLL/Gain']],...
		'orientation',2,...
		'Gain','pi2',...
		'position',[255,95,290,125])

add_block('built-in/Gain',[sys,'/',['Linearized baseband',13,'model for PLL/Gain2']])
set_param([sys,'/',['Linearized baseband',13,'model for PLL/Gain2']],...
		'Gain','Kc',...
		'position',[325,25,370,55])

add_block('built-in/Sum',[sys,'/',['Linearized baseband',13,'model for PLL/Sum']])
set_param([sys,'/',['Linearized baseband',13,'model for PLL/Sum']],...
		'inputs','+-',...
		'position',[220,30,240,50])


%     Subsystem  ['Linearized baseband',13,'model for PLL/Module',13,'integrator'].

new_system([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator']])
set_param([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator']],'Location',[196,490,621,627])

add_block('built-in/Inport',[sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator/in_1']])
set_param([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator/in_1']],...
		'position',[35,15,55,35])

add_block('built-in/Memory',[sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator/Memory']])
set_param([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator/Memory']],...
		'orientation',2,...

⌨️ 快捷键说明

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