• 大小: 990B
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-01-05
  • 语言: 其他
  • 标签: pll  

资源简介

dpll设计代码及基本原理,深入理解锁相环的工作原理,并提供代码

资源截图

代码片段和文件信息

% PLL illustration
clear all;
close all;
% define initial phase offset and incoming Cw frequency and Sampling frequency
theta = pi/3;
f=1000;
fs=100000;
% Create the real and imaginary parts of a Cw non-modulated Carrier to be tracked.
k=1:1:1000;
delf=f/20;
Signal=exp(j*(2*pi*k*(f+delf)/fs+theta))+0.01*(rand(11000)+j*rand(11000));
% initilize PLL Loop
phi_hat(1)=30;
e(1)=0;
phd_output(1)=0;
nco(1)=0
% define Loop filter parameters
kp=0.15; % Proportional constant
ki=0.1; % Integrator constant
% PLL implementation
for n=2:length(Signal)
nco(n)=conj(exp(j*(2*pi*n*f/fs+phi_hat(n-1)))); % Compute nCO
phd_output(n)=imag(Signal(n)*nco(n)); % Complex multiply nCO x input
e(n)=e(n-1)+(kp+ki)*phd_output(n)-ki*phd_output(n-1); % Filter integrator
some(n)=(kp+ki)*phd_output

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1436  2005-09-09 17:13  DPLL.m

     文件        218  2007-01-22 19:53  www.pudn.com.txt

----------- ---------  ---------- -----  ----

                 1654                    2


评论

共有 条评论