Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Pm demodulation using phase locked loop

Status
Not open for further replies.

FFFPLL

Newbie level 2
Joined
Oct 31, 2011
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,303
Hello everyone!!! I have a problem. I would like to perform phase demodulation using PLL. I have some matlab code that do that in the case of FM. Here is the code:
%This m-file demonstrates a PLL which tracks and demodulates an FM carrier.
clear all;
close all;
f=1000;%Carrier frequency
fs=100000;%Sample frequency
N=5000;%Number of samples
Ts=1/fs;
t=(0:Ts:(N*Ts)- Ts);
%Create the message signal
f1=100;%Modulating frequency
msg=sin(2*pi*f1*t);
kf=.0628;%Modulation index
%Create the real and imaginary parts of a CW modulated carrier to be tracked.
%Signal=exp(1j*(2*pi*f*t+kf*msg));%Modulated carrier
Signal=exp(1j*(2*pi*f*t+2*pi*kf*cumsum(msg)));%Modulated carrier
Signal1=exp(1j*(2*pi*f*t));%Unmodulated carrier

%Initilize PLL Loop
phi_hat(1)=30;
e(1)=0;
phd_output(1)=0;
vco(1)=0;

%Define Loop Filter parameters(Sets damping)
kp=0.15; %Proportional constant
ki=0.1; %Integrator constant

%PLL implementation
for n=2:length(Signal)
vco(n)=conj(exp(1j*(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
end;


I would like to modify this code to perform Phase demodulation. Does anyone can help me? Moreover,
does anyone know how to design the dimension of the different parameters like the phase detector gain,
the vco gain etc..

Thank you very much!
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top