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));
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 FT for the carrier.
How to fix this please?
NB: 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,
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.