Professional Documents
Culture Documents
PROJECT REPORT
Amplitude Modulation – Single Sideband Signal Generation
Using TMS320C5515 eZDSPTM USB Stick
Table of Contents
I) Table of Contents ..................................................... 1
1) MODULATION ............................................. 3
V) Implementation ....................................................... 10
1) 1) MATLAB .................................................... 10
Abstract
This project studies one variant of Amplitude
Modulation: Single Sideband (SSB) Modulation. In
this report, we will discover the concept of
amplitude modulation, double sideband and single
sideband signals and their applications. We will
then build a demonstration of SSB modulation using
Matlab and TMS320C5515 eZDSPTM USB Stick
Development Tool. The underlying theories used to
build this demonstration are also explained in
details.
Introduction
1) MODULATION
In electronics and telecommunications, modulation is the process of varying one or more
properties of a periodic waveform, called the carrier signal (high frequency signal), with a
modulating signal (low frequency signal) that typically contains information to be
transmitted.
There are 2 kinds of modulation: digital and analog. In our group project, we only concern
about continuous wave analog modulation. Common analog modulation techniques are:
Amplitude modulation (AM) (here the amplitude of the carrier signal is varied in
accordance to the instantaneous amplitude of the modulating signal)
o Double-sideband modulation (DSB)
o Single-sideband modulation (SSB, or SSB-AM)
o Vestigial sideband modulation (VSB, or VSB-AM)
o Quadrature amplitude modulation (QAM)
Angle modulation
o Frequency modulation (FM)
o Phase modulation (PM)
Bandwidth is wasted by having two identical side-bands on either side of the carrier
The efficiency is limited to 33% to prevent distortion in the receiver when
demodulating.
The carrier signal is present even if nothing is being transmitted
By eliminating the duplicated side-band and carrier from transmission, the bandwidth has
been reduced by half. By reducing the bandwidth transmitted, you may put double the
number of channels (or stations) in the same frequency band.
Because the carrier if also filtered out, there is no transmission unless information is being
sent. This is useful if you are trying to be covert. The efficiency is also improved
considerably. In theory, since you are only transmitting side-band information then the
efficiency is 100 %. In practice, including losses in the circuitry and antenna, a more typical
efficiency would be 80 -> 95 %.
To make the SSB system work, every receiver must now contain its own carrier oscillator.
An oscillator that can cover the range of all possible frequencies in your band and be stable
does not come cheaply. Therefore, SSB systems are usually limited to things that already
are expensive and/or costly or situations where the improved performance is essential (like
the military).
Related theories
1) FAST FOURIER TRANSFORM (FFT)
In summary, the Fast Fourier Transform (FFT) is an algorithm to compute the Discrete
Fourier Transform (DFT) and its inverse. A Fourier transform converts time (or space) to
frequency and vice versa; an FFT rapidly computes such transformations by factorizing the
DFT matrix into a product of sparse (mostly zero) factors.
2) HILBERT TRANSFORM
In AC circuit theory we use complex exponentials to represent real sinusoidally varying
quantities with the understanding that the real part of the complex exponential gives the
physical quantity of interest. The analytic signal of a real function plays the same role for
more general waveforms. Given a real function f(t) with Fourier transform , the analytic
signal fa(t) is defined by
This is just the inverse Fourier transform of the positive frequency part of F(w). The Fourier
transform of fa(t) is given by
The Hilbert transform of f(t) is defined to be the imaginary part of fa(t) and is denoted by
Thus
be two complex-valued signals associated with g(t). The significance of these two signals
can be seen from their Fourier transforms. We have
Thus g+(t) has spectral components (equal to those of g(t)) at positive frequencies only, i.e.,
g+(t) has a right-sided spectrum. Similarly, g−(t) has spectral components (equal to those of
g(t)) at negative frequencies only and hence has a left-sided spectrum. These spectra are
illustrated in the following figure
It is now straightforward to express upper- and lower-sideband signals in terms of g+(t) and
g−(t). Let g(t) be the modulating signal, assumed bandlimited to W Hz, and let fc > W be the
carrier frequency. In the frequency domain, the upper sideband signal is given by
Thus we see that single-sideband modulation can be regarded and implemented as a form
of quadrature amplitude modulation (QAM), with the modulating signal g(t) placed in the
in-phase channel and the Hilbert transform of g(t) (or its negative) placed in the quadrature
channel. A block diagram illustrating this approach is given in the following figure
Implementation
1) MATLAB
In Matlab, we used another approach to the model presented above. This second method
uses Hilbert Transformer and Spectral Shifter and can be used interchangeably with the
first method. Later on when implement SSB modulation on TMS320C5515 eZDSPTM USB
Stick we will use the first method. This is to show the flexibility of implementing SSB
modulation, i.e. different models can be used depending on resources and tastes.
Note that this simple mathematical transformation returns the same final result as the first
method, yet now we have a different way to obtain it:
% Target frequencies
Fm = 400; % base frequency
Fc = 4000; % carrier frequency
Fs = 48e3; % sampling frequency
% Number of samples
NFFT = 4096;
set(gca,'XLim',Xlim,'YLim',Ylim)
set(gcf,'Color','white');
/*
* Copyright 2010 by Spectrum Digital Incorporated.
* All rights reserved. Property of Spectrum Digital Incorporated.
*/
/*
* AIC3204 Tone
*
*/
#include "stdio.h"
#include "usbstk5515.h"
extern Int16 AIC3204_rset( Uint16 regnum, Uint16 regval);
#define XmitL 0x10
#define XmitR 0x20
#define Fs 48000
#define Fa 500
#define Fc 4000
#define PI 3.141592654
#include "math.h"
/* ------------------------------------------------------------------------ *
* *
* AIC3204 Tone *
* Output a 1 kHz tone through the HEADPHONE jack *
* *
* ------------------------------------------------------------------------ */
Int16 aic3204_tone_headphone( )
{
double* signal;
short ptsig1[480];
short ptsig2[480];
int x;
int nsample = 480;
/* Configure AIC3204 */
AIC3204_rset( 0, 0 ); // Select page 0
AIC3204_rset( 1, 1 ); // Reset codec
AIC3204_rset( 0, 1 ); // Select page 1
AIC3204_rset( 1, 8 ); // Disable crude AVDD generation from DVDD
AIC3204_rset( 2, 1 ); // Enable Analog Blocks, use LDO power
AIC3204_rset( 0, 0 );
/* PLL and Clocks config and Power Up */
AIC3204_rset( 27, 0x0d ); // BCLK and WCLK are set as o/p; AIC3204(Master)
AIC3204_rset( 28, 0x00 ); // Data ofset = 0
AIC3204_rset( 4, 3 ); // PLL setting: PLLCLK <- MCLK, CODEC_CLKIN <-PLL
CLK
AIC3204_rset( 6, 7 ); // PLL setting: J=7
AIC3204_rset( 7, 0x06 ); // PLL setting: HI_BYTE(D=1680)
AIC3204_rset( 8, 0x90 ); // PLL setting: LO_BYTE(D=1680)
AIC3204_rset( 30, 0x88 ); // For 32 bit clocks per frame in Master mode ONLY
// BCLK=DAC_CLK/N =(12288000/8) = 1.536MHz = 32*fs
AIC3204_rset( 5, 0x91 ); // PLL setting: Power up PLL, P=1 and R=1
AIC3204_rset( 13, 0 ); // Hi_Byte(DOSR) for DOSR = 128 decimal or 0x0080
DAC oversamppling
AIC3204_rset( 14, 0x80 ); // Lo_Byte(DOSR) for DOSR = 128 decimal or 0x0080
AIC3204_rset( 20, 0x80 ); // AOSR for AOSR = 128 decimal or 0x0080 for
decimation filters 1 to 6
AIC3204_rset( 11, 0x82 ); // Power up NDAC and set NDAC value to 2
AIC3204_rset( 12, 0x87 ); // Power up MDAC and set MDAC value to 7
AIC3204_rset( 18, 0x87 ); // Power up NADC and set NADC value to 7
AIC3204_rset( 19, 0x82 ); // Power up MADC and set MADC value to 2
/* DAC ROUTING and Power Up */
AIC3204_rset( 0, 1 ); // Select page 1
AIC3204_rset( 0x0c, 8 ); // LDAC AFIR routed to HPL
AIC3204_rset( 0x0d, 8 ); // RDAC AFIR routed to HPR
AIC3204_rset( 0, 0 ); // Select page 0
AIC3204_rset( 64, 2 ); // Left vol=right vol
AIC3204_rset( 65, 0); // Left DAC gain to 0dB VOL; Right tracks Left
AIC3204_rset( 63, 0xd4 ); // Power up left,right data paths and set channel
AIC3204_rset( 0, 1 ); // Select page 1
AIC3204_rset( 0x10, 0x00 );// Unmute HPL , 0dB gain
AIC3204_rset( 0x11, 0x00 );// Unmute HPR , 0dB gain
AIC3204_rset( 9, 0x30 ); // Power up HPL,HPR
AIC3204_rset( 0, 0 ); // Select page 0
USBSTK5515_wait( 100 ); // wait
/* ADC ROUTING and Power Up */
AIC3204_rset( 0, 1 ); // Select page 1
AIC3204_rset( 0x34, 0x30 );// STEREO 1 Jack
// IN2_L to LADC_P through 40 kohm
AIC3204_rset( 0x37, 0x30 );// IN2_R to RADC_P through 40 kohmm
AIC3204_rset( 0x36, 3 ); // CM_1 (common mode) to LADC_M through 40 kohm
AIC3204_rset( 0x39, 0xc0 );// CM_1 (common mode) to RADC_M through 40 kohm
AIC3204_rset( 0x3b, 0 ); // MIC_PGA_L unmute
AIC3204_rset( 0x3c, 0 ); // MIC_PGA_R unmute
AIC3204_rset( 0, 0 ); // Select page 0
AIC3204_rset( 0x51, 0xc0 );// Powerup Left and Right ADC
AIC3204_rset( 0x52, 0 ); // Unmute Left and Right ADC
AIC3204_rset( 0, 0 );
USBSTK5515_wait( 200 ); // Wait
/* I2S settings */
I2S0_SRGR = 0x0;
I2S0_CR = 0x8010; // 16-bit word, slave, enable I2C
I2S0_ICMR = 0x3f; // Enable interrupts
/* Play Tone */
for ( i = 0 ; i < 1000 ; i++ )
{
for ( j = 0 ; j < 1000 ; j++ )
{
for ( sample = 0 ; sample < nsample ; sample++ )
{
//DSB
// I2S0_W0_MSW_W = (ptsig1[sample]) ; // 16 bit left channel
transmit audio data
// I2S0_W1_MSW_W = (ptsig1[sample]) ; // 16 bit right channel
transmit audio data
//X
// I2S0_W0_MSW_W = (ptsig2[sample]) ; // 16 bit left channel
transmit audio data
// I2S0_W1_MSW_W = (ptsig2[sample]) ; // 16 bit right channel
transmit audio data
//SSB
I2S0_W0_MSW_W = (ptsig3[sample]) ; // 16 bit left channel
transmit audio data
I2S0_W1_MSW_W = (ptsig3[sample]) ; // 16 bit right channel
transmit audio data
}
}
}
/* Disable I2S */
I2S0_CR = 0x00;
return 0;
}
Conclusion
In this project, we successfully built the demonstration of AM-SSB modulation on both Matlab and
TMS320C5515 eZDSPTM USB Stick. This helps us to have a deeper insight of AM-SSB in application
and to understand the underlying theories leading to this method of broadcasting signals.
References
[1] S.M. Tan, Chapter 5: The Hilbert transform and linear modulation theory, Linear
Systems, The University of Auckland, retrieved on April 28th 2014
[2] Frank R. Kschischang, The Hilbert Transform, University of Toronto, October 22, 2006,
retrieved on April 28th 2014
Illustrating images of C5515 eZDSP USB Stick Development Tool are taken from
http://www.ti.com/tool/tmdx5515ezdsp.
All source codes in this report are taken from the usbstk5515_v1 library associated with C5515
eZDSP USB Stick Development Tool, provided by Spectrum Digital Inc..