# ELP 311 Communication Engineering Lab
## Lab-3 : Modelling of DSB-SC signal
**By: Gurusha Juneja**
**Entry Number: 2019EE10480**
## Aim
To modulate and demodulate DSB-SC signal for different values of modulating index using MATLAB.
## Theory
DSB-SC is an amplitude modulation scheme in which only side bands are transmitted and we intentionally suppressed the carrier because there is no information present in the carrier and its transmission results in loss of power. This results in improving power efficiency.
Consider a message signal, $𝑚(𝑡)=𝐸_𝑚 𝑐𝑜𝑠(𝜇𝑡)$ and carrier signal $𝑐(𝑡)=𝐸_𝑐𝑐𝑜𝑠(𝜔𝑡)$. Then a double sideband suppressed carrier signal DSBSC represent by x(t)is defined as their product: $𝑥(𝑡)=𝑐(𝑡).𝑚(𝑡)=𝐸_𝑐𝑐𝑜𝑠(𝜔𝑡).𝐸_𝑚𝑐𝑜𝑠(𝜇𝑡)$ .Where carrier frequency is much larger than message frequency $𝜔≫𝜇$.
$𝑥(𝑡)=\frac{𝐸_𝑐𝐸_𝑚}{2}cos((𝜔+𝜇)𝑡)+\frac{𝐸_𝑐𝐸_𝑚}{2}cos((𝜔−𝜇)𝑡)$
$𝑥(𝑡)=\frac{𝐸}{2} cos((𝜔+𝜇)𝑡)+\frac{𝐸}{2}cos((𝜔−𝜇)𝑡)$
Here,$𝐸=𝐸_𝑐𝐸_𝑚$ it shows that the product is represented by two new signals, one on the sum frequency (𝜔+𝜇), and one on the difference frequency (𝜔−𝜇).
Using the product demodulator the original message signal can be extracted from
DSBSC modulated signal. Here, the carrier signal is synchronized with frequency to the carrier of DSBSC signal to detect the message signal. However, the carrier signal is derived from the
received signal itself using carrier acquisition circuit termed as PLL.In this process, the message signal can be extracted from DSBSC wave by multiplying it with a carrier, having the same frequency and the phase of the carrier used in DSBSC modulation. The resulting signal is then passed through a Low Pass Filter. Output of this filter is the desired message signal.
## Procedure
- 1: Use initial command in MATLAB script to clear all previous data.
- 2: Define the input variable and constant
- 3: Write the mathematical expression of carrier, message then generate the DSB-SC signal
- 4: Visualization of carrier, message and DSB-SC signal
- 5: Spectrum analysis of carrier, message and DSB-SC signal
- 6: DSB-SC Demodulation using product modulator followed by LPF
<div style="page-break-after: always;"></div>
## Inference
From the observations. we draw the following inferences:
- The carrier is supressed and power consumed by carrier in AM modulation is equally distributed in the two side bands.
- 100% modulation can be seen in the modulated signal.
- As we can see from the modulated plots, there is a phase reversal whan the message signal amplitude goes to zero
- Carrier amplitude was expected to be at $\frac{A_m}{m}$, which was exactly equal to the experimental value
- The modulated signal was a product of carrier and modulating signal, hence two components at $\omega-\mu$ and $\omega+\mu$ were expected which can be seen in the plot. There are two frequency components, hence the bandwidth is $2\mu$, which is double the bandwidth of the modulating signal.
- Seeing the frequency plot, we observe that the message signal has frequency components around 10 Hz, whereas the modulated signal has frequency components around 1MHz. From theory we know that the frequency response of a DSB-SC signal contains two frequency components ar frequencies $\omega-\mu$ and $\omega+\mu$. In this case $\omega=1MHz$ and $\mu = 10Hz$, hence we observe only a single line at 1MHz, due to lack of resolution, but we see that the magnitude of there two frequency components is quarter the value of $E$.
- Theoretically, we should observe that the magnitude of the two components of frequency should be quater that of the product of $E_mE_c$. Here $E=E_cE_m=1*\frac{1}{m}=\frac{1}{m}$. We can observe from the plots, the magnitude of the modulated signal frequency plot is $\frac{1}{4m}$. Which is expected theoretically.
- The amplitude of two frequency components is E/4. Hence the power in the two sidebands is $\frac{E^2}{32}+\frac{E^2}{32}=\frac{E^2}{16}$. The amplitude of carrier signal is E/2, hence energy in it is $\frac{E^2}{8}$ which is double the energy in the modulated signal, hence the transmission efficiency is 50%.
- The modulated signal was multiplied with the carrier to obtain the first demodulated signal. Frequency of this first demodulated signal was half the modulated signal. the moduled signal was of the form:
\begin{aligned}
C (cos(\omega+\mu) + cos(\omega-\mu))\\
\end{aligned}
Multiplying this with the carrier wave we get:
\begin{aligned}
K (cos(\omega+\mu) cos(\omega)+ cos(\omega-\mu) cos(\omega))\\
=2K(cos(\omega +\frac{\mu}{2}) + cos(\frac{\mu}{2}) + cos(\omega-\frac{\mu}{2}) + cos(\frac{\mu}{2}))\\
\end{aligned}
Where C and K are some constants. Here we can see three components. One of low frequency, and two of high frequency. Hence, we get the demodulated signal, whose bandwidth is the same as that of modulating signal.
- Passing this signal to a low pass filter, we can obtain the original signal, but the demodulated signal is not a sharp bounded signal this is because the filters do not have a sharp cut off, hence they allow frequencies that are not required, this causes the extra frequencies observed in the final demodulated signal.
- We can see in th plots, as we increase the value of m, we observe a decrease in the carrier power. Hence values of m>1 should be avoided.
## Conclusion
From the above inferences, we conclude the following things:-
- Transmission efficiency of DSB-SC is higher as compared to 33% in case of AM.
- The demodulated signal does not contain only a single frequency but a spectrum of frequencies.
Hence while it is a good method of modulation in terms of power, but it is not a very good method for the demodulation of a signal.
## Matlab Code
```
m=1.2;
fc=1e6; % Carrier frequency
fm=10; % Message frequency
fs=4.25*fc;
t=0:1/fs:1;
Am=1;% Amplitude of message signal
Ac=Am/m; % Amplitude of carrier signal
message=Am.*sin(2*pi*fm*t);
carrier=Ac.*sin(2*pi*fc*t);
DSB_SC=carrier.*message;
%modulating signal
figure(1)
subplot(3,1,1);
plot(t,message);
title('Message Signal');
xlabel('time (sec)');
ylabel('Message Amplitude (volt)');
%carrier signal
figure(1)
subplot(3,1,2);
plot(t,carrier);
title('Carrier Signal');
xlabel('time (sec)');
ylabel('Carrier Amplitude (volt)');
%DSBSC signal
figure(1)
subplot(3,1,3);
plot(t,DSB_SC);
title('DSB-SC Signal');
xlabel('time (sec)');
ylabel('DSB-SC Amplitude (volt)');
%fft of carrier
lc=length(carrier);
f=linspace(-fs/2,fs/2,lc);
carrierf=fft(carrier,lc);
carrierF=fftshift(carrierf);
carrierM=abs(carrierF)/lc;
figure(2)
subplot(311);
plot(f,carrierM);
xlabel('frequency(Hz)');
ylabel('Carrier Magnitude');
title('Carrier Signal Frequency Response');
xlim([-1.5e6,1.5e6]);
%fft of message
lc=length(message);
f=linspace(-fs/2,fs/2,lc);
messagef=fft(message,lc);
messageF=fftshift(messagef);
messageM=abs(messageF)/lc;
figure(2)
subplot(312);
plot(f,messageM);
xlabel('frequency(Hz)');
ylabel('Message Magnitude');
title('Message Signal Frequency Response');
xlim([-50,50]);
%fft of DSBSC
lc=length(DSB_SC);
f=linspace(-fs/2,fs/2,lc);
Df=fft(DSB_SC,lc);
DF=fftshift(Df);
DM=abs(DF)/lc;
figure(2)
subplot(313);
plot(f,DM);
xlabel('frequency(Hz)');
ylabel('DSBSC Magnitude');
title('DSB-SC Signal Frequency Response');
xlim([-3e6,3e6]);
%Demodulated Signal
Dem_signal=DSB_SC.*carrier;
figure(3)
subplot(2,1,1);
plot(t,Dem_signal);
title('Demodulated Signal');
xlabel('time (sec)');
ylabel('Demodulated Signal Amplitude (volt)');
% LPF Design
Wp = 15/500;
Ws = 150/500;
[n,Wn] = buttord(Wp,Ws,0.1,5);
[a,b] = butter(n,Wn);
%Recovered Signal
Rec_signal=filter(a,b,Dem_signal);
figure(3)
subplot(2,1,2);
plot(t,Rec_signal);
title('Recieved Signal From LPF');
xlabel('time (sec)');
ylabel('Recieved Signal Amplitude (volt)');
```