📄 tstpll.m
字号:
'x0','init',...
'position',[210,75,260,105])
add_block('built-in/Fcn',[sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator/module']])
set_param([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator/module']],...
'Expr','rem(u[1],modu)',...
'position',[235,29,325,51])
add_block('built-in/Reset Integrator',[sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator/Reset',13,'integrator']])
set_param([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator/Reset',13,'integrator']],...
'position',[110,19,150,51])
add_block('built-in/Constant',[sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator/one']])
set_param([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator/one']],...
'orientation',3,...
'move name',0,...
'position',[70,55,90,75])
add_block('built-in/Sum',[sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator/Sum']])
set_param([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator/Sum']],...
'position',[195,30,215,50])
add_block('built-in/Outport',[sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator/out_1']])
set_param([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator/out_1']],...
'position',[370,30,390,50])
add_line([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator']],[205,90;180,90;190,45])
add_line([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator']],[155,35;190,35])
add_line([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator']],[220,40;230,40])
add_line([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator']],[60,25;105,25])
add_line([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator']],[80,50;80,35;105,35])
add_line([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator']],[330,40;365,40])
add_line([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator']],[340,40;340,90;265,90])
set_param([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator']],...
'Mask Display','Mod\nint',...
'Mask Type','Module Integrator')
set_param([sys,'/',['Linearized baseband',13,'model for PLL/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,'/',['Linearized baseband',13,'model for PLL/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,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator']],...
'Mask Entries','1\/0\/')
% Finished composite block ['Linearized baseband',13,'model for PLL/Module',13,'integrator'].
set_param([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator']],...
'position',[65,17,115,53])
add_block('built-in/Outport',[sys,'/',['Linearized baseband',13,'model for PLL/Estimated',13,'phase']])
set_param([sys,'/',['Linearized baseband',13,'model for PLL/Estimated',13,'phase']],...
'position',[580,30,600,50])
% Subsystem ['Linearized baseband',13,'model for PLL/Module',13,'integrator1'].
new_system([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator1']])
set_param([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator1']],'Location',[196,490,621,627])
add_block('built-in/Outport',[sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator1/out_1']])
set_param([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator1/out_1']],...
'position',[370,30,390,50])
add_block('built-in/Sum',[sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator1/Sum']])
set_param([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator1/Sum']],...
'position',[195,30,215,50])
add_block('built-in/Constant',[sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator1/one']])
set_param([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator1/one']],...
'orientation',3,...
'move name',0,...
'position',[70,55,90,75])
add_block('built-in/Reset Integrator',[sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator1/Reset',13,'integrator']])
set_param([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator1/Reset',13,'integrator']],...
'position',[110,19,150,51])
add_block('built-in/Fcn',[sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator1/module']])
set_param([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator1/module']],...
'Expr','rem(u[1],modu)',...
'position',[235,29,325,51])
add_block('built-in/Memory',[sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator1/Memory']])
set_param([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator1/Memory']],...
'orientation',2,...
'x0','init',...
'position',[210,75,260,105])
add_block('built-in/Inport',[sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator1/in_1']])
set_param([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator1/in_1']],...
'position',[35,15,55,35])
add_line([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator1']],[330,40;365,40])
add_line([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator1']],[340,40;340,90;265,90])
add_line([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator1']],[80,50;80,35;105,35])
add_line([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator1']],[60,25;105,25])
add_line([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator1']],[220,40;230,40])
add_line([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator1']],[155,35;190,35])
add_line([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator1']],[205,90;180,90;190,45])
set_param([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator1']],...
'Mask Display','Mod\nint',...
'Mask Type','Module Integrator')
set_param([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator1']],...
'Mask Dialogue','Module the given number when state exceed limit|Module bound:|Initial value:',...
'Mask Translate','init=@2; modu=@1;')
set_param([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator1']],...
'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,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator1']],...
'Mask Entries','1\/0\/')
% Finished composite block ['Linearized baseband',13,'model for PLL/Module',13,'integrator1'].
set_param([sys,'/',['Linearized baseband',13,'model for PLL/Module',13,'integrator1']],...
'orientation',2,...
'position',[330,90,380,130])
add_block('built-in/Inport',[sys,'/',['Linearized baseband',13,'model for PLL/in_1']])
set_param([sys,'/',['Linearized baseband',13,'model for PLL/in_1']],...
'position',[15,25,35,45])
add_block('built-in/Transfer Fcn',[sys,'/',['Linearized baseband',13,'model for PLL/Filter']])
set_param([sys,'/',['Linearized baseband',13,'model for PLL/Filter']],...
'Numerator','Fn',...
'Denominator','Fd',...
'position',[420,21,470,59])
add_block('built-in/Gain',[sys,'/',['Linearized baseband',13,'model for PLL/Gain3']])
set_param([sys,'/',['Linearized baseband',13,'model for PLL/Gain3']],...
'Gain','G',...
'position',[520,27,545,53])
add_line([sys,'/',['Linearized baseband',13,'model for PLL']],[40,35;60,35])
add_line([sys,'/',['Linearized baseband',13,'model for PLL']],[475,40;505,40;505,110;385,110])
add_line([sys,'/',['Linearized baseband',13,'model for PLL']],[250,110;190,110;190,45;215,45])
add_line([sys,'/',['Linearized baseband',13,'model for PLL']],[180,35;215,35])
add_line([sys,'/',['Linearized baseband',13,'model for PLL']],[375,40;415,40])
add_line([sys,'/',['Linearized baseband',13,'model for PLL']],[550,40;575,40])
add_line([sys,'/',['Linearized baseband',13,'model for PLL']],[120,35;135,35])
add_line([sys,'/',['Linearized baseband',13,'model for PLL']],[325,110;295,110])
add_line([sys,'/',['Linearized baseband',13,'model for PLL']],[505,40;515,40])
add_line([sys,'/',['Linearized baseband',13,'model for PLL']],[245,40;320,40])
set_param([sys,'/',['Linearized baseband',13,'model for PLL']],...
'Mask Display','Linearized\nbaseband\nPLL',...
'Mask Type','Linearized baseband PLL model')
set_param([sys,'/',['Linearized baseband',13,'model for PLL']],...
'Mask Dialogue','Output the phase shifting of the input\nsignal from the oscillation frequency.|Lowpass filter numerator:|Lowpass filter denominator:|Oscillation frequency (Hz):|Oscillation amplitude:|Gain at the output:')
set_param([sys,'/',['Linearized baseband',13,'model for PLL']],...
'Mask Translate','Fn=@1;Fd=@2;Fc=@3;pi2=2*pi;Kc=@4/2;G=@5;')
set_param([sys,'/',['Linearized baseband',13,'model for PLL']],...
'Mask Help','This block detects the phase shifting of the input signal. The input to this block is an oscillation signal with possible phase shifting. The block detects the phase shifting value using PLL technique. Design the lowpass filter to pass the phase changing signal and to eliminate the oscillation signal.')
set_param([sys,'/',['Linearized baseband',13,'model for PLL']],...
'Mask Entries','[3.0002, 0, 40002]\/[1, 67.46, 2270.9, 40002]\/100/2/pi\/1\/2\/')
% Finished composite block ['Linearized baseband',13,'model for PLL'].
set_param([sys,'/',['Linearized baseband',13,'model for PLL']],...
'ForeGround',2,...
'hide name',0,...
'position',[270,328,350,372])
% Subsystem ['Baseband model',13,'for PLL'].
new_system([sys,'/',['Baseband model',13,'for PLL']])
set_param([sys,'/',['Baseband model',13,'for PLL']],'Location',[372,67,987,246])
add_block('built-in/Gain',[sys,'/',['Baseband model',13,'for PLL/Gain1']])
set_param([sys,'/',['Baseband model',13,'for PLL/Gain1']],...
'Gain','pi2',...
'position',[145,13,175,47])
add_block('built-in/Gain',[sys,'/',['Baseband model',13,'for PLL/Gain']])
set_param([sys,'/',['Baseband model',13,'for PLL/Gain']],...
'orientation',2,...
'Gain','pi2',...
'position',[260,88,290,122])
add_block('built-in/Transfer Fcn',[sys,'/',['Baseband model',13,'for PLL/Filter']])
set_param([sys,'/',['Baseband model',13,'for PLL/Filter']],...
'Numerator','Fn',...
'Denominator','Fd',...
'position',[420,16,470,54])
add_block('built-in/Inport',[sys,'/',['Baseband model',13,'for PLL/in_1']])
set_param([sys,'/',['Baseband model',13,'for PLL/in_1']],...
'position',[15,20,35,40])
% Subsystem ['Baseband model',13,'for PLL/Module',13,'integrator1'].
new_system([sys,'/',['Baseband model',13,'for PLL/Module',13,'integrator1']])
set_param([sys,'/',['Baseband model',13,'for PLL/Module',13,'integrator1']],'Location',[196,490,621,627])
add_block('built-in/Inport',[sys,'/',['Baseband model',13,'for PLL/Module',13,'integrator1/in_1']])
set_param([sys,'/',['Baseband model',13,'for PLL/Module',13,'integrator1/in_1']],...
'position',[35,15,55,35])
add_block('built-in/Memory',[sys,'/',['Baseband model',13,'for PLL/Module',13,'integrator1/Memory']])
set_param([sys,'/',['Baseband model',13,'for PLL/Module',13,'integrator1/Memory']],...
'orientation',2,...
'x0','init',...
'position',[210,75,260,105])
add_block('built-in/Fcn',[sys,'/',['Baseband model',13,'for PLL/Module',13,'integrator1/module']])
set_param([sys,'/',['Baseband model',13,'for PLL/Module',13,'integrator1/module']],...
'Expr','rem(u[1],modu)',...
'position',[235,29,325,51])
add_block('built-in/Reset Integrator',[sys,'/',['Baseband model',13,'for PLL/Module',13,'integrator1/Reset',13,'integrator']])
set_param([sys,'/',['Baseband model',13,'for PLL/Module',13,'integrator1/Reset',13,'integrator']],...
'position',[110,19,150,51])
add_block('built-in/Constant',[sys,'/',['Baseband model',13,'for PLL/Module',13,'integrator1/one']])
set_param([sys,'/',['Baseband model',13,'for PLL/Module',13,'integrator1/one']],...
'orientation',3,...
'move name',0,...
'position',[70,55,90,75])
add_block('built-in/Sum',[sys,'/',['Baseband model',13,'for PLL/Module',13,'integrator1/Sum']])
set_param([sys,'/',['Baseband model',13,'for PLL/Module',13,'integrator1/Sum']],...
'position',[195,30,215,50])
add_bl
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -