Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

AM Help regarding DSB SC & DSB FC

25 views
Skip to first unread message

Md. Nazmus Sakib

unread,
Aug 31, 2010, 10:23:09 AM8/31/10
to
Hello. I am new in matlab simulation.
I want to generate the below signal:

x(t)={ t+1, 0<=t<1
-t+2, 1<=t<=2
5, Otherwise
}

& after generating need to amplitude modulate (both DSB-SC & DSB-LC) with 100Hz carrier.

Can any body give me example for generate & modulate the signal? Urgent please.

Thanks.
Nazmus.

Daniel Goerke

unread,
Aug 31, 2010, 11:07:10 AM8/31/10
to

Hi,

for me it looks like it makes much more sence for at least 10kHz, but
you can figure that out as well as the number of discretization points
to use...
Try this:


pi=3.14;
nCarrierFrequency=10000;

t=0:0.001:4.999;
x=zeros(1,5000);


for counter=1:5000
if (t(counter)>=0 && t(counter)<1)
x(counter)=t(counter)+1;
elseif (t(counter)>=1 && t(counter)<2)
x(counter)=-t(counter)+2;
else
x(counter)=5;
end
end

carrier(:,1)=cos(2*pi*nCarrierFrequency*t(1,:));
signal=carrier.*x';

figure();
plot(t, x);

figure();
plot(t, carrier);

figure();
plot(t, signal);

Md. Nazmus Sakib

unread,
Aug 31, 2010, 2:47:18 PM8/31/10
to
Daniel Goerke <daniel...@gmx.net> wrote in message <i5j5qs$9ch$4...@news-cypress.fernuni-hagen.de>...


Thank you very much. Its a nice code.
I have also generated the signal x(t) using linespace, that's a poor solution I know.
Some more query please . . .

here the modulation happens at the line,
signal=carrier.*x'; its DSB-SC I think.

Could u please tell me some more functions,
1. DSB-FC of x(t)
2. power content of the modulated signal
3. spectrum of the modulated signal &
4. power spectral density of the modulated signal

I can do the plot, just want to know the functions. Actually I am very new.
Thanks.

Nazmus.

Daniel Goerke

unread,
Aug 31, 2010, 4:00:23 PM8/31/10
to

Hi Nazmus,

I actually don't know exactly about the equations you should use for
DSB-FC and DSB-SC. Im not so much involved in AM, sorry...
You could have a look to the Matlab Central, since some people may have
already coded somethink to do your job.

To calculate the power content, you could use trapz to integrate your
curve and find the area which should correspond to the power.

To calculate the frequency specturm you can use abs(fft(signal)) to get
the real valued frequency spectrum of your signal.

Regards,
Daniel

Md. Nazmus Sakib

unread,
Sep 1, 2010, 3:57:24 AM9/1/10
to
Daniel Goerke <daniel...@gmx.net> wrote in message <i5jn0m$9ch$5...@news-cypress.fernuni-hagen.de>...


Hi Daniel.
Thanks my code is done. I have used FFT & PSD function for feq spectra & power spectral density.

-Nazmus

rayzour

unread,
Nov 13, 2012, 4:39:55 PM11/13/12
to
hello there im really new in matlab programming i need a help to make this. i need to write a matlab program that show Double Side Band Suppress Carrier AM (DSBSC-AM) with a carrier frequency fc = 200Hz and modulating frequency fm = 2Hz.
> Plot AM signal vs time
>Spectrum vs frequency

i hope u can response as soon as possible sir i really need help on this..ty :D


0 new messages