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.

frequency demodulation using pll

Status
Not open for further replies.

santosh_vjit

Newbie level 4
Joined
Jan 23, 2008
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,330
int_m(i+1)=int_m(i)+m(i)*ts

hi to all ..............
im doing my project in frequency demodualtion using pll our project has been strucked as we are not able to correct the error in this program we r getting frequency modulated wave same as carrier wave i request u all to solve my program i will be thankful if u provide any other example i would be workin on it.................



% Signal generation
t0 = .15; % signal duration
ts = 0.0005; % sampling interval
fc = 200; % carrier frequency
kf = 50; % modulation index
fs = 1/ts; % sampling frequency
t = [0:ts:t0]; % time vector
df = 0.25; % required frequency resolution
c = cos(2*pi*fc*t); % carrier signal
m = [2*ones(1,t0/(3*ts)),-2*ones(1,t0/(3*ts)),zeros(1,t0/(3*ts)+1)];

% Frequency modulation
int_m(1) = 0;
for (i = 1 : length(t)-1) % integral of m
int_m(i+1) = int_m(i) + m(i)*ts;
end
u = cos(2*pi*fc*t + 2*pi*kf*int_m); % modulated signal
figure
subplot (3,1,1)
plot (m(1:300))
TITLE ('Modulating Signal')
grid on;
subplot (3,1,2)
plot (c(1:300))
TITLE ('Carrier Signal')
grid on;
subplot (3,1,3)
plot (u(1:300))
TITLE ('Frequency Modulated Signal')
grid on;

% Frequency demodulation
t = [0:ts:ts*(length(u)-1)]; % finding phase of modulated signal
x = hilbert(u);
z = x.*exp(-j*2*pi*250*t);
phi = angle(z);

phi = unwrap(phi); % restoring original phase
dem = (1/(2*pi*kf))*(diff(phi)/ts); % demodulated signal

figure
subplot (3,1,1)
plot (c(1:300))
TITLE ('Carrier Signal')
grid on;
subplot (3,1,2)
plot (u(1:300))
TITLE ('Frequency Modulated Signal')
grid on;
subplot (3,1,3)
dem = smooth(dem,7) + 1;
plot (dem(1:300))
axis ([0 300 -2 2]);
TITLE ('De-Modulated Signal')
grid on;
end
 

hi,

you are saying that your modulated signal is the same as the carrier signal. this means that the frequency of the modulated signal isn't actually varying, instead it's always the same as the carrier frequency, and so the modulated signal is the same as the carrier signal. i'll give u an explanation:

in your formula:

u = cos(2*pi*fc*t + 2*pi*kf*int_m); % modulated signal

as you know the instantaneous frequency is the derivative of (2*pi*fc*t + 2*pi*kf*int_m) which means wi= 2*pi*fc* + 2*pi*kf *m, and this is the way the frequency should vary. in your case it seems that int_m is a constant, and so the whole term 2*pi*kf*int_m is a constant and its derivative is zero. and so wi=2*pi*fc always, which means that the frequency will not vary.

i guess that your problem is in the integration of the signal, make sure that you are integrating the signal correctly. plot it to see that you are getting it correctly.

note: i think that you don't have to multiply by 2*pi in the term 2*pi*kf*int_m, since kf is by definition in rad/s/v..

best regards
 

sir i will be correcting tht mistake and i will try sir thank u sir......................
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top