Clear Filters
Clear Filters

DSB-LC modulation

2 views (last 30 days)
Arquelau
Arquelau on 23 Oct 2016
Commented: Arquelau on 23 Oct 2016
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 Comments
Star Strider
Star Strider on 23 Oct 2016
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.
Arquelau
Arquelau on 23 Oct 2016
Hi Star Strider,
By looking the spectra, it gets clearer that there is something wrong happening. This is the spectra, using fft:
Looks like what I am getting is only the carrier, with no message at all. Below is the spectra of my message:
So I am expecting this spectra to appear in 20kHz, and not this impulses that I am getting. Is it right?

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!