0% found this document useful (0 votes)
2 views

Lab 14B

The document outlines an experiment on Amplitude Modulation (AM) using MATLAB software, detailing the theory, implementation, and procedure for creating an AM project. It explains the definition of AM, the conditions for successful modulation, and provides step-by-step instructions for coding and compiling the project in CCS. Additionally, it includes guidelines for plotting the time and frequency domain representations of the carrier wave, information-bearing signal, and the amplitude-modulated signal.

Uploaded by

Fiza Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Lab 14B

The document outlines an experiment on Amplitude Modulation (AM) using MATLAB software, detailing the theory, implementation, and procedure for creating an AM project. It explains the definition of AM, the conditions for successful modulation, and provides step-by-step instructions for coding and compiling the project in CCS. Additionally, it includes guidelines for plotting the time and frequency domain representations of the carrier wave, information-bearing signal, and the amplitude-modulated signal.

Uploaded by

Fiza Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Experiment # 14

Title: Amplitude Modulation (AM)


Equipment Required: Personal computer (PC) with windows operating system
and MATLAB software
Objective:
The objective of this lab is to illustrate an amplitude modulation (AM) scheme

Definition:
Amplitude modulation is define as a process in which the amplitude of the carrier
wave c(t) is varied about a mean value, linearly with the message signal m(t)

Theory:
Consider a sinusoidal carrier wave c(t) defined by
c (t )= A c cos(2 πf c t )
Where Ac is the carrier amplitude and fc is the carrier frequency.
The amplitude-modulated (AM) wave is described as a function of time as follow
s(t )= A c [ 1+k a m(t )]cos(2 πf c t ) (1)
Where m(t) is the message and ka is a constant called amplitude sensitivity of the
modulator responsible for generation of the modulated signal s(t)
In amplitude modulation, information pertaining to the message signal m(t)
resides solely in the envelope, which is defined as the amplitude of the modulated wave
s(t)-that is, A c [1+k a m(t )] . From this expression, we observe that the envelope of s(t) has
essentially the same shape as the message signal m(t) provided that two conditions are
satisfied:
1. The amplitude of k a m(t ) is always less than unity; that is,

|k a m(t )|<1 for all t

This condition is illustrated in Fig. 1(b); it ensures that the function 1 + kam(t) is
always positive. When the amplitude sensitivity ka of the modulator is large enough to
make |k a m(t )|>1 for any t, the carrier wave become over modulated, resulting in carrier
phase reversals whenever the factor 1+k a m(t ) crosses zero. The modulated wave then
exhibits envelope distortion, as in Fig. 1(c).
2. The carrier frequency fc is much greater than the highest frequency component W
of the message signal m( t ),that is
f c >>W
We call W the message bandwidth. If the condition of above equation is not
satisfied, an envelope cannot be visualized (and therefore detected) satisfactorily

Fig.1. illustration of the amplitude modulation process. (a) message signal m(t).
(b) Am wave for |k a m(t )|<1 for all t (c). AM wave for |k a m(t )|>1 for some t

Implementation of Amplitude Modulation in CCS:


The buffer baseband contains 20 points and represents a baseband cosine signal
with a frequency of f = Fs/20 = 400Hz. The buffer carrier contains 4 points and
represents a carrier signal with a frequency of f = Fs/(number points per cycle) =
8000/4=2kHz. The output equation shows the baseband signal being modulated by the
carrier signal. The variable amp is used to vary the modulation. The polling-driven C
source program AM.c implements this project.
The amplitude of information signal varies between +1000 and -1000, to make
|k a m(t )|<1
|k a 1000|<1
1
|k a|<
1000 , ka should be less then .001
The output consists of the 2-kHz carrier signal and two sideband signals. The
sideband signals are at the frequency of the carrier signal + or - the frequency of the
sideband signal, or at 1600 and 2400Hz.

Procedure:
1. To create the project file. Select Project  New. Type AM for the project name.
This project file is saved in the folder AM (within D:\program files\
myprojects).

2. To add files to the project. Select Project  Add Files to Project. Look in the
folder support, Files of type C Source Files. Double-click on the C source file
C6713dskinit.c to add it to the project. Click on the “+” symbol to the left of the
Project Files window within CCS to expand and verify that this C source file has
been added to the project.
3. Repeat step 2, use the pull-down menu for Files of type, and select ASM Source
Files. Double-click on the assembly source vector file vectors_poll.asm to add it
to the project. Repeat again and select Files of type: Linker Command File, and
add C6713dsk.cmd to the project.
4. To add the library support files to the project. Repeat the previous step, but
select files of type: Object and Library Files.
I. Look in D:\program files\c6000\cgtools\lib and select the
run-time support library file rts6700.lib (which supports the C67x
architecture) to add to the project.
II. Continue this process to add the BSL file dsk6713bsl.lib located in D:\
program files \c6000\dsk6713\lib,
III. The chip support library (CSL) file csl6713.lib located in D:\program
files \c6000\csl\lib.
5. Select File  New  Source File. This will open CCS editor, type the following
program in it and save it with name AM.C
Amplitude modulation program (AM.c).
//AM.c AM using table for carrier and baseband signals
#include "C:\CCStudio_v3.1\C6000\dsk6713\include\DSK6713_AIC23.h"
//codec-dsk support file
Uint32 fs=DSK6713_AIC23_FREQ_8KHZ; //set sampling rate
float amp = .0001;
short baseband[200]; //index for modulation
short output_buffer[200];
short carrier[200];
void main()
{
short k;
short baseband[200]={1000,951,809,587,309,0,-309,-587,-809,-951,-1000,-951,-809,-587,-
309,0,309,587,809,951,
1000,951,809,587,309,0,-309,-587,-809,-951,-1000,-951,-809,-587,-309 ,0,309,587,809,
951,
1000,951,809,587,309,0,-309,-587,-809,-951,-1000,-951,-809,-587,-
309,0,309,587,809,951,
1000,951,809,587,309,0,-309,-587,-809,-951,-1000,-951,-809,-587,-
309,0,309,587,809,951,
1000,951,809,587,309,0,-309,-587,-809,-951,-1000,-951,-809,-587,-
309,0,309,587,809,951,
1000,951,809,587,309,0,-309,-587,-809,-951,-1000,-951,-809,-587,-
309,0,309,587,809,951,
1000,951,809,587,309,0,-309,-587,-809,-951,-1000,-951,-809,-587,-
309,0,309,587,809,951,
1000,951,809,587,309,0,-309,-587,-809,-951,-1000,-951,-809,-587,-
309,0,309,587,809,951,
1000,951,809,587,309,0,-309,-587,-809,-951,-1000,-951,-809,-587,-
309,0,309,587,809,951,
1000,951,809,587,309,0,-309,-587,-809,-951,-1000,-951,-809,-587,-
309,0,309,587,809,951};
//400-Hz baseband
short carrier[200]={1000,0,-1000,0, 1000,0,-1000,0,
1000,0,-1000,0, 1000,0,-1000,0,
1000,0,-1000,0, 1000,0,-1000,0,
1000,0,-1000,0, 1000,0,-1000,0,
1000,0,-1000,0, 1000,0,-1000,0,
1000,0,-1000,0, 1000,0,-1000,0,
1000,0,-1000,0, 1000,0,-1000,0,
1000,0,-1000,0, 1000,0,-1000,0,
1000,0,-1000,0, 1000,0,-1000,0,
1000,0,-1000,0, 1000,0,-1000,0,
1000,0,-1000,0, 1000,0,-1000,0,
1000,0,-1000,0, 1000,0,-1000,0,
1000,0,-1000,0, 1000,0,-1000,0,
1000,0,-1000,0, 1000,0,-1000,0,
1000,0,-1000,0, 1000,0,-1000,0,
1000,0,-1000,0, 1000,0,-1000,0,
1000,0,-1000,0, 1000,0,-1000,0,
1000,0,-1000,0, 1000,0,-1000,0,
1000,0,-1000,0, 1000,0,-1000,0,
1000,0,-1000,0, 1000,0,-1000,0,
1000,0,-1000,0, 1000,0,-1000,0,
1000,0,-1000,0, 1000,0,-1000,0,
1000,0,-1000,0, 1000,0,-1000,0,
1000,0,-1000,0, 1000,0,-1000,0,
1000,0,-1000,0};//2-kHz carrier

comm_poll(); //init DSK, codec, McBSP


while(1) //infinite loop
{
for (k=0; k<200; k++)
{
output_buffer[k]= carrier[k]*(1+amp*baseband[k]);
}
}
}
_______________________________________________________________________________________________________________

6. Compiler Option
Select Project  Build Options. Figure 1.4a shows the CCS window Build
Options for the compiler.
I. Select the following for the compiler option with Basic (for Category):
a) c671x{-mv6710} (for Target Version),
b) Full Symbolic Debug (for Generate Debug Info),
c) Speed most critical (for Opt Speed vs. Size),
d) None (for Opt Level and Program Level Opt).
II. Select the Preprocessor Category and type for Define Symbols{d}:
CHIP_6713
III. Select the Files Category and type for Obj Directory(-fr) D:\Program
files\My Projects\AM\Debug
IV. Select the Advanced Category and select for Memory Models Far
7. Linker Option
Click on Linker (from CCS Build Options).The output filename AM.out defaults
to the name of the .pjt filename, and Run-time Autoinitialization defaults for
Autoinit Model. The -c option is used to initialize variables at run time, and the -o
option is used to name the linked executable output file AM.out. Press OK
8. Building and Running the Project
I. Select Project  Rebuild All or press the toolbar with the three down
arrows . This creates an executable file AM.out that can be loaded into
the C6713 processor and run. Note that the commands for compiling,
assembling, and linking are performed with the Build option. A log file
cc_build_Debug.log is created that shows the files that are compiled and
assembled, along with the compiler options selected. It also lists the support
functions that are used.
II. Select File  Load Program in order to load AM.out by clicking on it (CCS
includes an option to load the program automatically after a build). It should
be in the folder AM\Debug. Select Debug  Run or use the toolbar with the
“running man.”
9. Plotting with CCS
Select View  GraphTime/Frequency.
I. Carrier wave plots
 Time-domain plot
Change the Graph Property Dialog so that the options in Figure 2 are
selected for a time-domain plot (use the pull-down menu when
appropriate).The starting address of the output buffer is carrier. The other
options can be left as default. Figure 3 shows a time-domain plot of the
sinusoidal signal within CCS.
 Frequency-domain plot
Figure 2.b shows CCS’s Graph Property Display for a frequency-domain
plot. Choose a fast Fourier transform (FFT) order so that the frame size is
2order. Press OK and verify that the FFT magnitude plot is as shown in
Figure 3. The spike at 2000 Hz represents the frequency of the sinusoidal
carrier wave generated.

(a)
(b)
Figure 2 CCS Graph Property Dialog for carrier wave (a) for time-
domain plot; (b) for frequency-domain plot.

Figure 3. CCS windows for carrier wave showing both time and frequency domain plots
of a generated 2kHz sine wave

II. Information bearing signal plots


 Time-domain plot
Same as in previous step but change the starting address of the output
buffer to baseband. The other options can be left as default.
 Frequency-domain plot
Choose a fast Fourier transform (FFT) order so that the frame size is
2order. Press OK. The spike at 400 Hz represents the frequency of the
information bearing signal.

Figure 4. CCS windows for information bearing signal showing both time and frequency
domain plots of a generated 400Hz sine wave
III. Amplitude modulated signal plots
 Time-domain plot
Same as in previous step but change the starting address of the output
buffer to output_buffer. The other options can be left as default.
 Frequency-domain plot
Choose a fast Fourier transform (FFT) order so that the frame size is 2 order.
Press OK. The spike at 2000Hz represents the frequency of the carrier
signal. The spikes at 1600Hz and 2400Hz represent the fc-fm and fc+fm (ie
2000-400 and 2000+400)

Figure 5. CCS windows for Amplitude Modulated signal showing both time and
frequency domain plots
Reference:
(1) Introduction to Analog and Digital Communication (Simon Haykin, Michael
Moher)

You might also like