untitled.m

来自「该程序描述了二阶锁相环的环路滤波器的设计和线性模型分析」· M 代码 · 共 24 行

M
24
字号
%Fri 27 May 2005
%pll filter design and linear analysis
%run it before NoClockpll but make sure af and bf are what's needed.
%the simulink file is NoClockpll
ko=200;
[bf,af]=butter(1,2*pi*20,'s');
if 1 > 2
w1=2*pi*30; w2=2*pi*40;
wn=2*pi*10; zeta=0.99;
af=conv(af,conv([1/w1 1],[1/w2 1]));
bf=conv(bf,[1/wn^2 2*zeta/wn 1]);
end;
figure(1); rlocus(bf,[af 0]);
figure(1);step(ko*bf,[[af 0] + ko*[0 bf]]);
xlabel('Time'); ylabel('Voltage (V)');
title('VCO Input Voltage (Linear Simulation)');
figure(2);rlocus(bf,[af 0]);

%code to plot the output from NoClockpll
if 1 > 2
figure(3);plot(Vout.time,Vout.signals.values);grid;
xlabel('Time (s)'); ylabel('Voltage (V)');
title('VCO Input Voltage (Nonlinear Simulation');
end

⌨️ 快捷键说明

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