📄 c6_pllpre.m
字号:
clear all
disp('')
fdel=input('Enter the size of the frequency step in Hertz > ');
fn=input('Enter the loop natural frequency in Hertz > ');
lambda=input('Enter lambda, the relative pole offset> ');
disp('')
disp('Accept default values:')
disp('zeta=1/sqrt(2),')
disp('fs=200*fn, and')
disp('tstop=1')
dtype=input('Enter y for yes or n for no > ','s');
if dtype == 'y'
zeta = 1/sqrt(2);
fs = 200*fn;
tstop=1;
else
zeta = input('Enter zeta, the loop damping factor > ');
fs = input('Enter the sampling frequency in Hertz > ');
tstop=input('Enter tstop, the simulation runtime > ');
end
npts=fs*tstop+1;
t = (0:(npts-1))/fs;
nsettle=fix(npts/10);
tsettle=nsettle/fs;
fin=[zeros(1,nsettle),fdel*ones(1,npts-nsettle)];
phin=[zeros(1,nsettle),2*pi*fdel*t(1:(npts-nsettle))];
disp('')
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -