Thank you very much for this simple PLL implementation. However, I noticed it uses both the real and imaginary parts of the Signal. In a physical implementation we only have access to the real part of the signal, right? So how can this be applied to a real, physical signal?
If you're interested in this submission, you might also like the new, free mixed-signal library available from here: http://www.mathworks.com/programs/mixed-signal/index.html
PLEASE SR I WOULD LIKE TO KNOW THE MEAN OF SOME VARIABLES:
phi_hat(1)=30;
e(1)=0;
phd_output(1)=0;
vco(n)=conj(exp(1i*(2*pi*n*f/fs+phi_hat(n-1))));%Compute VCO
phd_output(n)=imag(Signal(n)*vco(n));%Complex multiply VCO x Signal input
e(n)=e(n-1)+(kp+ki)*phd_output(n)-ki*phd_output(n-1);%Filter integrator
phi_hat(n)=phi_hat(n-1)+e(n);%Update VCO
ALSO I WOULD LIKE TO KNOW HERE I COULD FIND SOME BOOKS TO READ ABOUT PLL
THANKS
AC
Comment only