0% found this document useful (0 votes)
214 views8 pages

SSB Modulation Experiment with MATLAB

The document describes an experiment on SSB modulation using MATLAB coding. The objective is to understand SSB modulation theory and develop a MATLAB code to generate SSB signals. The experiment involves generating message, carrier and modulated SSB signals in time and frequency domains. MATLAB code is provided to implement SSB modulation without and with built-in functions. Results and discussions are presented.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
214 views8 pages

SSB Modulation Experiment with MATLAB

The document describes an experiment on SSB modulation using MATLAB coding. The objective is to understand SSB modulation theory and develop a MATLAB code to generate SSB signals. The experiment involves generating message, carrier and modulated SSB signals in time and frequency domains. MATLAB code is provided to implement SSB modulation without and with built-in functions. Results and discussions are presented.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Experiment No.

: 02
Name of the Experiment: SSB Modulation using MATLAB Coding

Objective:
1. To understand the operation theory of double sideband suppressed carrier (SSB)
modulation.
2. To understand the waveforms and frequency spectrum of SSB.
3. To develop the MATLAB Code of SSB modulation.
Learning Outcome: After completing this experiment the students will be able to:
1. Learn about working principle of a complete Single Sideband modulator.
2. Explain the output waveforms & frequency spectrum of SSB modulated signal.
Theory:
Write a theory according to the discussion in the class
MATLAB Code:
Without using the built in MATLAB function
clc;
close all;
clear all;

fs = 1000000; %sampling frequency


Ts = 1/fs; %sampling period
N = 10000; %length of the signal
t = (0:N-1)*Ts; %time vector
fm = 1000; %frequency of message signal (Hz)
Tm = 1/fm; %time period of message signal
fc = 10000; %frequency of carrier signal (Hz)
Tc = 1/fc; %time period of carrier signal

m = sin(2*pi*fm*t)'; %message signal


c = sin(2*pi*fc*t)'; %carrier signal

m_h = delayseq(m,Tm/4,fs); % 90 degree phase delayed message signal


c_h = delayseq(c, Tc/4, fs); % 90 degree phase delayed carrier signal

figure(1) % message signal


subplot(2,1,1)
plot(t,m)
subplot(2,1,2)
plot(t,m_h)

dsb_in = m.*c; %DSB-SC signal in phase


dsb_90 = m_h.*c_h;%DSB-SC signal 90 degree phase shifted

SSB_sig = dsb_in + dsb_90;

figure(2) %time-domain representation of the signals

subplot(4,1,1)
plot(t,m)
xlabel('time (s)')
ylabel('amplitude of m(t)')

subplot(4,1,2)
plot(t,c)
xlabel('time (s)')
ylabel('amplitude of carrier')
subplot(4,1,3)
plot(t,dsb_in)
xlabel('time (s)')
ylabel('amplitude of DSB-SC')

subplot(4,1,4)
plot(t,SSB_sig)
axis([0 .01 -2 2])
xlabel('time (s)')
ylabel('amplitude of SSB')

mess = fft(m);
carr = fft(c);
dsb = fft(dsb_in);
ssb = fft(SSB_sig);

mess_spec = fftshift(mess); %zero centered fft of message signal


carr_spec = fftshift(carr); %zero centered fft of carrier signal
dsb_spec = fftshift(dsb); %zero centered fft of DSB-SC signal
SSB_spec = fftshift(ssb); %zero centered fft of SSB signal

mess_mag_spec = abs(mess_spec)/N; %magnitude spectrum of message signal


carr_mag_spec = abs(carr_spec)/N; %magnitude spectrum of carrier signal
dsb_mag_spec = abs(dsb_spec)/N; %magnitude spectrum of DSB-SC signal
ssb_mag_spec = abs(SSB_spec)/N;%magnitude spectrum of SSB signal

f_Hz = ((-N/2):(N/2-1))*(fs/N); %frequency axis range in Hz


figure(3) %frequency-domain representation of the signals

subplot(4,1,1)
plot(f_Hz, mess_mag_spec)
axis([-12000 12000 0 0.5])
title('Magnitude of message signal vs frequency')
xlabel('frequency (Hz)')
ylabel('magnitude')

subplot(4,1,2)
plot(f_Hz, carr_mag_spec)
xlabel('frequency (Hz)')
ylabel('magnitude')
title('Magnitude of carrier signal vs frequency')
axis([-12000 12000 0 0.5])

subplot(4,1,3)
plot(f_Hz, dsb_mag_spec)
xlabel('frequency (Hz)')
ylabel('magnitude')
title('Magnitude of DSB-SC signal vs frequency')
axis([-12000 12000 0 0.5])

subplot(4,1,4)
plot(f_Hz, ssb_mag_spec)
xlabel('frequency (Hz)')
ylabel('magnitude')
title('Magnitude of SSB signal vs frequency')
axis([-12000 12000 0 0.5])

Using the built in MATLAB function


clc;
close all;
clear all;

fs = 1000000; %sampling frequency


T = 1/fs; %sampling period
N = 10000; %length of the signal
t = (0:N-1)*T; %time vector
fm = 1000; %frequency of message signal (Hz)
fc = 10000; %frequency of carrier signal (Hz)

m = sin(2*pi*fm*t); %message signal


c = sin(2*pi*fc*t); %carrier signal

m_size = size(m);
c_size = size(c);

dsb_sig = m.*c; %DSB-SC signal


SSB_sig = ssbmod(m,fc,fs);

figure(1) %time-domain representation of the signals

subplot(4,1,1)
plot(t,m)
xlabel('time (s)')
ylabel('amplitude of m(t)')

subplot(4,1,2)
plot(t,c)
xlabel('time (s)')
ylabel('amplitude of carrier')

subplot(4,1,3)
plot(t,dsb_sig)
xlabel('time (s)')
ylabel('amplitude of DSB-SC')

subplot(4,1,4)
plot(t,SSB_sig)
axis([0 .01 -1 1])
xlabel('time (s)')
ylabel('amplitude of SSB')

mess = fft(m);
carr = fft(c);
dsb = fft(dsb_sig);
ssb = fft(SSB_sig);

mess_spec = fftshift(mess); %zero centered fft of message signal


carr_spec = fftshift(carr); %zero centered fft of carrier signal
dsb_spec = fftshift(dsb); %zero centered fft of DSB-SC signal
SSB_spec = fftshift(ssb);

mess_mag_spec = abs(mess_spec)/N; %magnitude spectrum of message signal


carr_mag_spec = abs(carr_spec)/N; %magnitude spectrum of carrier signal
dsb_mag_spec = abs(dsb_spec)/N; %magnitude spectrum of DSB-SC signal
ssb_mag_spec = abs(SSB_spec)/N;

f_Hz = ((-N/2):(N/2-1))*(fs/N); %frequency axis range in Hz

figure(2) %frequency-domain representation of the signals

subplot(4,1,1)
plot(f_Hz, mess_mag_spec)
axis([-12000 12000 0 0.5])
title('Magnitude of message signal vs frequency')
xlabel('frequency (Hz)')
ylabel('magnitude')

subplot(4,1,2)
plot(f_Hz, carr_mag_spec)
xlabel('frequency (Hz)')
ylabel('magnitude')
title('Magnitude of carrier signal vs frequency')
axis([-12000 12000 0 0.5])

subplot(4,1,3)
plot(f_Hz, dsb_mag_spec)
xlabel('frequency (Hz)')
ylabel('magnitude')
title('Magnitude of DSB-SC signal vs frequency')
axis([-12000 12000 0 0.5])

subplot(4,1,4)
plot(f_Hz, ssb_mag_spec)
xlabel('frequency (Hz)')
ylabel('magnitude')
title('Magnitude of SSB signal vs frequency')
axis([-12000 12000 0 0.5])

Results:

Discussion:

Student Task:
1. Write a MATLAB code on the given task during the class.
2. Collect the images of waveforms/spectrum.
3. Explain the waveforms/spectrum

Common questions

Powered by AI

MATLAB facilitates the educational process by providing an interactive platform where theoretical concepts of SSB modulation can be visualized and experimented with instantly. Through coding, students can manipulate parameters to see real-time results, enhancing their understanding of how these parameters affect the signal behavior. This active learning supports comprehension of abstract concepts, such as sideband suppression and frequency domain analysis, by bringing theoretical waves and spectra into a tangible, visual format. Such computational tools empower students to hypothesize, validate models, and develop problem-solving skills crucial for modern engineering tasks .

In the time domain, the SSB wave appears to have reduced amplitude variations compared to the DSB-SC wave because it lacks one of the sidebands. This can lead to a more consistent amplitude envelope in the SSB signal. MATLAB plots show these differences when examining the subplot outcomes, where the SSB wave displays a cleaner and more defined waveform compared to the DSB-SC wave, which contains additional components from the presence of both sidebands .

The use of the delay sequence capability in MATLAB is crucial for generating a 90-degree phase shift in both the message and carrier signals, which is essential for the proper generation of an SSB signal. By creating a phase shift in the message signal (`m_h`) and the carrier signal (`c_h`), one can produce the quadrature components necessary for isolating a single sideband. The SSB signal is then synthesized by combining these phase-shifted components, effectively suppressing one of the sidebands .

The computational steps taken in the MATLAB script to transition from time-domain signals to their frequency-domain representations include the following: First, the FFT of the time-domain signals is computed using `fft`, which results in a frequency spectrum containing symmetric components due to the real-valued nature of time-domain signals. Next, `fftshift` is applied to center these profile components around zero frequency, creating a symmetrical plot. Finally, the magnitude spectrum is calculated by taking the absolute value and normalizing it by the signal length `N`. These steps create a clear representation of the signal's frequency characteristic .

Visualizing the frequency domain representation of an SSB modulated signal involves computing the Fast Fourier Transform (FFT) of the signal and then applying a zero-centered frequency shift using `fftshift`. This is observed in the MATLAB script where `ssb = fft(SSB_sig)` followed by `SSB_spec = fftshift(ssb)`. Plotting the magnitude spectrum (`abs(SSB_spec)/N`) against the frequency axis (`f_Hz`) provides a clear visualization of the signal's spectral components, showing the concentration of energy in one sideband only .

Understanding waveforms and frequency spectra is critically important for engineering students as it develops their ability to analyze and design modulation schemes like SSB efficiently. A deep grasp of waveforms helps in predicting the behavior of modulated signals in both time and frequency domains, which is essential for designing communication systems with optimal bandwidth and power efficiency. Moreover, frequency spectra visualization aids students in diagnosing spectral issues, understanding sideband suppression mechanisms, and improving systems for real-world applications. These competencies are foundational for telecom, broadcasting, and advanced communication technologies .

The fundamental difference between DSB-SC and SSB modulation lies in the sidebands that are transmitted. In DSB-SC, both upper and lower sidebands are present around the suppressed carrier frequency, which results in more bandwidth usage. SSB modulation, however, transmits only one sideband—either the upper or the lower—thus conserving bandwidth. This is manifested in their frequency spectra, where DSB-SC shows spectral components at both positive and negative frequencies around the carrier, while SSB shows components at only one of these frequencies .

The `fft` function computes the Fast Fourier Transform of a signal, converting it from the time domain to the frequency domain, to analyze its frequency components. `fftshift` then rearranges these components to center them around zero frequency. This zero-centering is useful for interpretation as it aligns the frequency spectrum symmetrically around the origin, which is particularly helpful for visualizing modulation effects such as those seen in SSB signals .

SSB modulation is considered more efficient compared to DSB-SC modulation because it requires only half the bandwidth of DSB-SC by transmitting only one sideband while suppressing the other along with the carrier. This efficiency means less power is required for transmission, and the bandwidth conserved can be used to transmit more channels or improve the quality of the transmitted signals. Moreover, in terms of spectrum utilization, SSB allows for more channels within a given frequency allocation .

The key parameters used in MATLAB for modeling SSB modulation are the sampling frequency (`fs`), the frequency of the message signal (`fm`), and the carrier frequency (`fc`). The sampling frequency dictates the resolution and the ability to accurately represent the signals in the digital domain. The frequencies of the message and carrier signals (`fm` and `fc`) are crucial as they determine the position of the sidebands in the frequency domain and are essential for ensuring correct modulation and demodulation of the signal .

You might also like