0

I'm trying to modulate a carrier of Fc=10 KHz with a sinusoidal message of Fm = 200 Hz (from 0 to 1 in time-domain)

The sampling rate Fs=1 KHz.

This is my code:

fs=1000;    % sampling freq.
ts=1/fs;
t= 0 : ts : 1;   % time axis
N=length(t);

%signal
fsignal=200;   % message signal freq.
y=sin(2*pi*fsignal*t);
f= -fs/2 : fs/N : fs/2 - fs/N;   % freq. axis
Y=fftshift(fft(y));
subplot(211); plot(f,abs(Y));

Till this point, no problem. Now, for the carrier signal:

%carrier:
fc = 10000;
carrier = cos(2*pi*fc*t);
CARRIER=fftshift(fft(carrier));
subplot(212); plot(f,abs(CARRIER));

Message- Carrier

It's required now to multiply the carrier and message in time-domain. But the carrier isn't correct. The problem rises from the fact that Fs << Fc

That's why I get wrong F.T for the carrier.

How to fix this please?

N.B: This just an example I used to understand the situation. The real problem I'm trying to solve contains wav audio file (Fs=44.1 KHz) and the Carrier Freq (Fc=100 KHz). So, Fs << Fc and I can't do anything about it.

Thanks,

DarkLight
  • 141
  • 1
  • 9

1 Answers1

0

If you are trying to plot the spectrum after modulation, you should set the sample freq fs = 2*(fc + fsignal). See Nyquist I theorem.

Maybe you are trying to see the spectrum around carrier? Without high sampling? You can use zoom-fft and use Nyquist II theorem

bni i
  • 103
  • 7