Continue to Site

# help me in this code plz

Status
Not open for further replies.

#### Nosheen

##### Member level 1
hi,
i m attaching my code kindly help me sample this modulated signal
consisting of four channels each at carriers 400,1000,1600 and
2600HZ respectively.

see also the time domain envelope of the composite signal being AM
modulated at these four carriers and the fourier spectrum...

how can i implement sample rate variation to extract these four
channels??? (impulse train sampling is prefferable)

kindly, ample me atleast the very first channel such that its
carrier reduces to zero(or low frequency) and i can simply extract
it using a LOW PASS FILTER...(Bandpass sampling theorem is helpful)

*****code attached*******

fm=100; wm=100*2*pi;
Fc1=1000; wc1=1000*2*pi;
Fs1=4000; ws1=4000*2*pi;

Fc2=1600; wc2=1600*2*pi;
Fs2=6400; ws2=6400*2*pi;

Fc3=400; wc3=400*2*pi;
Fs3=1600; ws3=1600*2*pi;

Fc4=2600; wc4=2600*2*pi;
Fs4=10400; ws4=10400*2*pi;

t=[1:200]/Fs2;
vc=1;
m=1;

Vam1=vc*(sin(wc1*t)+0.5*m*cos((wc1-wm)*t)-0.5*m*cos((wc1+wm)*t));
Vam2=vc*(sin(wc2*t)+0.5*m*cos((wc2-wm)*t)-0.5*m*cos((wc2+wm)*t));
Vam3=vc*(sin(wc3*t)+0.5*m*cos((wc3-wm)*t)-0.5*m*cos((wc3+wm)*t));
Vam4=vc*(sin(wc4*t)+0.5*m*cos((wc4-wm)*t)-0.5*m*cos((wc4+wm)*t));

Vam=Vam1+Vam2+Vam3+Vam4;
figure
plot(Vam)
z=fft(Vam);
z=abs(z(1length(z)/2)+1));
frq=[0:length(z)-1]*Fs2/length(z)/2;
figure
plot(frq,z)
grid
figure

t = 0:.00025:1; % Time vector

y = decimate(Vam,4);
%%View the original and decimated signals:
stem(Vam(1:200)), axis([0 200 -4 4]) % Original signal
title('Original Signal')
figure
stem(y(1:30)) % Decimated signal
title('Decimated Signal')

URGENT HELP IS REQUIRED PLZZZZZZZZZZZ