DSB-LC modulation
2 次查看(过去 30 天)
显示 更早的评论
Hi,
I want to modulate a signal (that comes from an audio file) using DSB-LC with a 20kHz carrier. However, I am not sure I am doing it right, as I expected a plot of my modulated signal different from what I've got. Below is my code and plot of the message and modulated signal, both in time domain.
Code:
% message signal from a audio file
[sample,freq] = audioread('male2.wav');
sample = sample(:,1);
[num, c] = size(amostra);
T = 1/freq;
t = 0:T:(num-1)*T;
Mp = max(sample);
% carrier
carrier= cos (20000*pi*t);
Ts = 1/(48*10^3); % period of sampling of the carrier
tp = 0:Ts:(num-1)*T;
% modulation index (given by μ = Mp/Ac). In this case, μ = 1
Ac = Mp/1;
modulated = (Ac + sample).*carrier';
plot (t, modulated);
Message signal (time domain):
Modulated signal (time domain)
I don't think the modulated signal should be like that. Right? I am supposed to do it for modulation indices of μ = 1, μ = 0.75 and μ = 0.5, but I am facing this problem right in the first case (μ = 1).
Any help will be appreciated. Thank you.
2 个评论
Star Strider
2016-10-23
It is not easy to understand what you are doing.
The best way to check the result is to do a Fourier transform, fft, or a power spectral density (see the documentation for pwelch) on your modulated signal. Your code intends produce a double-sideband transmitted-carrier signal, so you should have two symmetric sidebands on either side of your 20 kHz carrier.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Modulation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!