📄 linearpll.sce.txt
字号:
//25 May 2005, 5 June 2005
//linear PLL analysis
//set figure_style new
//
k0=500;
[pols,gain]=zpbutt(1,2*%pi*20);
s=poly(0,'s');
//H=gain/real(poly(pols,'s'));
denbutt=real(poly(pols,'s'));
den=denbutt;
//azero=(1+s/(2*%pi*100));
s1 = syslin('c',gain,den);
s2 = syslin('c',k0,s);
olsys=s1*s2;
sys = (1/s)*(s1/.s2); //(1/s) makes frequency as input
ts1=[0:0.0001:0.2];
f1=scf(1);clf(f1,'reset');
plot2d(ts1,csim('step',ts1,sys));
xgrid();
xtitle('Step Response Using csim', 'Time(s)', 'Voltage (V)');
f2=scf(2);clf(f2,'reset');
bode(olsys,1,1000);
xgrid();
//xtitle('Bode Plot', 'Time(s)', 'Voltage (V)');
//chdir('C:\wattle\courses\Electronics4\PLL');
//change directory to where this file and pllcosout.txt are kept
if 3 > 2 then //change 1 to 3 to plot the output data.
[plldata]=read('pllcosout.txt',-1,2,'(e10.3,1x,e10.3)');
f3=scf(3);clf(f3,'reset');
plot2d(plldata(:,1),plldata(:,2));
xgrid();
xtitle('Step Change in Frequency (Scicos pll.cos)', 'Time(s)', 'Voltage (V)');
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -