Sunteți pe pagina 1din 9

TECHNOLOGICAL INSTITUTE OF THE PHILIPPINES

938 Aurora Boulevard Cubao, Quezon City

College of Engineering and Architecture


Electronics Engineering Department

Design of Experiment

Amplitude Shift Keying in MATLAB

Group Members:

Almazan, Dan Austin Brian B.


Lagadia, Dwenielle Moises R.
Miranda, Kenneth C.
Yabushita, Tetsunari I.

Course and Section:

ECE 502 EC51FC2

Engr. Daryl P. David


INSTRUCTOR
Design of Experiment
AMPLITUDE SHIFT KEYING IN MATLAB
Course: ECE 502 Experiment No.:
Group No.: Section: EC51FC2
Group Members: Almazan; Lagadia; Miranda; Yabushita Date Performed:
Date Submitted:
Instructor: Engr. Daryl David

1. Objective(s):
1. To be able to use MATLAB for simulating the ASK.
2. To write and interpret an ASK into a MATLAB script.
2. Intended Learning Outcomes (ILOs):
The students shall be able to:
2.1 Write a code to simulate amplitude shift keying
2.2 Describe the code and its output

3. Discussion:

AMPLITUDE SHIFT KEYING


In the process of digital communications, amplitude-shift keying (ASK) transforms a binary
information signal to directly modulate the amplitude of an analog carrier. For a binary message
sequence where there are two levels with one from those two basically has a value of zero. Amplitude-
shift keying is sometimes also called digital amplitude modulation (DAM).
Figure 1 depicts the source signals namely the carrier signal and the message signal (upper and
middle), respectively. These two were together with the ask signal (bottom).

Figure 1. ASK Signal


The generated ASK signal of any pair of Message Signal and Carrier Signal may also be determined
mathematically.
To get the desired message carrier signal
= sin
Where a = Amplitude
= analog carrier frequency (radians per second, 2 )
And for the message signal

= (2 ) +
2 2
Finally, after determining the values of the carrier and message signal, the amplitude-shift keyed
waveform is reduced to
=

4. Resources
Equipment:
Computer or Laptop
MATLAB Programming Software

5. Procedure

A script file or m-files is used in this experiment as shown on figure (number). Script files are mostly used
when operating on variables and it makes the code simpler on command window.
1. Open MATLAB, then click New Script on the home tab.

2. Type function_filename() to create a function to call the script file on the command window.

3. Now add the code below.


4. At first the script filename is default to Untitled. To rename the file, Save and rename it for
example DigiComm it must be on MATLAB Code files (*.m) file. This must be save on
Documents>MATLAB.

5. Go to the command window, the saved m-file should appear on the Current Folder, which is a
default located on Documents>MATLAB.

6. Now double click the m-file or right click then open. This will show the script file, this can be edited
when some errors were encountered when calling the function.
7. On the Command Window type the function name for example DigiComm. What is observed
after typing the function name?
- It is observed that the function input on the script let the user to specify any values on the
carrier signal frequency (fc) and the message signal frequency (fm).

8. Upon after entering the values of fc and fm, what is observed and what are the plotted outputs.
- A new window open named as Figure 1. It is observed that there are three plots, this includes
the carrier signal, message signal and the ASK Output.
Graph:

9. What does the t, c, and m, parameters represent? What do the ask=c.*m means.
- The t refers to the time signal given the formula, same on the c which is the carrier signal and
the m represent the message signal. The function of ask makes a formula used to combine
the two signals. The (.*) makes every range of time t on the message signal to be multiplied
to the carrier signal.

10. What happens when the range of time is change from 0.001 to 0.01? Graph the generated signal
seen on the plot.
- As observed the plot shows a longer range of time. It makes the frequency in each subplot to
be shown further but doesnt change the value of the set frequency.
Graph:

6. Observation:

As observed in this design of experiment for generating ASK output using MATLAB the carrier
signal and message signal frequency must be set first, this will identify the frequency of both signals (fc
and fm). Both of the frequencies must be set to kHz by multiplying the specified frequency by 1000 that is
set in the equation (c and m) for the carrier and message signal and both of the signal has a fix amplitude
of 2 (a=2) in the code. The equation for the carrier signal will show the carrier signal waveform with an
amplitude of 2 which is fixed also with the frequency that has been set, same as goes to the message
signal and also the time must be set the same for the range of the carrier, message and ASK signal.
Sinusoidal signal is used to generate carrier signal while in message signal it uses square wave as its
digital input. In order to obtain the ASK output waveform the carrier signal must be multiplied to the
message signal.
7. Interpretation:

The frequency must be set first after running the program by using the input command in
MATLAB it will allow the user to set the desired value or frequency of the signal. Setting the amplitude of
1
both signal into 2 (a=2) as shown in the code. Also for the range of the signal (time), using = then
0:1
setting the range of the signal to = (101000):0.001, it will display the range with respect to the
carrier, message and ASK signal.

In generating the carrier signal, sinusoidal waveform equation must be used which is
= sin(2 ) it will show a sine wave signal with a peak-to-peak amplitude of
. Now for the message signal as the digital input which is a square wave using the

equation = 2 square(2 ) + (2), in order for the square wave will only have
a positive amplitude which acts now as a digital data which is 1s and 0s.

Now when generating the ASK output, multiplying the carrier signal with the message signal =
, because there is 1s and 0s in the message signal, the 1s will
show the output for the carrier then for 0s there will be no signal after it has been multiplied, now ASK or
on and off keying will be generated.
8. Conclusion:

After the activity was accomplished, it can be concluded that:

Amplitude shift keying can be simulated in MATLAB script by using equations modeled after the
waveforms.

The code used in MATLAB was written in such a way to express the ASK precisely; having three
plots to show the carrier signal, the input messenger signal and the modulated output.

9. Questions and Problems:

1. Define ASK modulation. What happens to the carrier and message signal during the modulation?
- ASK is the simplest digital modulation technique, where a binary information signal directly
modulates the amplitude of the analog carrier signal. In ASK there are only two output
amplitudes possible. Hence, the carrier is either on or off. In ASK, the information or
message signal is digital and the amplitude of the carrier is varied proportional to the
information signal, thus creating a digitally modulated signal.

2. Explain the advantage of using a script file in MATLAB. What is the difference when it was being
done on the command window?
- Script files is an m-file, this is used for coding or making the code into simpler and more
organize combination of text and functions. It helps to minimize the code on the command
window and makes it easier to identify if there are any errors.

3. Make a MATLAB code that has an input 100Hz carrier signal (fc) and a 10kHz message signal
(fm) show the code on script file and command window, and the graph.
Code:

Command Window:

Graph:

10. Assessment (Rubric for Laboratory Performance):

S-ar putea să vă placă și