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

Comms - Laboratory Experiment 2

This document describes a laboratory experiment on frequency shift keying (FSK) modulation and demodulation using MATLAB. It includes the objectives, theory of FSK, procedures for FSK modulation and demodulation algorithms using MATLAB code, results showing the generated graphs, a discussion on how FSK compares to amplitude shift keying, and a conclusion on the findings of the experiment.

Uploaded by

Charles Rosete
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)
36 views

Comms - Laboratory Experiment 2

This document describes a laboratory experiment on frequency shift keying (FSK) modulation and demodulation using MATLAB. It includes the objectives, theory of FSK, procedures for FSK modulation and demodulation algorithms using MATLAB code, results showing the generated graphs, a discussion on how FSK compares to amplitude shift keying, and a conclusion on the findings of the experiment.

Uploaded by

Charles Rosete
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
You are on page 1/ 16

TECHNOLOGICAL UNIVERSITY OF THE PHILIPPINES

COLLEGE OF ENGINEERING
ELECTRONICS AND COMMUNICATION ENGINEERING DEPARTMENT

PECEC-2L
LABORATORY EXERCISE #2
FREQUENCY SHIFT KEYING

SUBMITTED BY:
ROSETE, CHARLES L.

BSECE – 3B
TH/6-9 pm

SUBMITTED TO:
ENGR. CHERRY G. PASCION
INSTRUCTOR

DATE PERFORMED:
11/10/2022

DATE SUBMITTED:
11/24/2022
Laboratory Experiment No. 2

FREQUENCY SHIFT KEYING

I. Objective/s
• To generate and demodulate frequency shift keyed (FSK) signal using
MATLAB.

II. Theory
• Generation of FSK

Frequency-shift keying (FSK) is a frequency modulation scheme in which


digital information is transmitted through discrete frequency changes of a carrier
wave. The simplest FSK is binary FSK (BFSK). BFSK uses a pair of discrete
frequencies to transmit binary (0s and 1s) information. With this scheme, the "1" is
called the mark frequency and the "0" is called the space frequency.

In binary FSK system, symbol 1 & 0 are distinguished from each other by
transmitting one of the two sinusoidal waves that differ in frequency by a fixed
amount.
Si (t) = √2E/Tb cos 2πf1t 0≤ t ≤Tb
0 elsewhere
Where i=1, 2 & Eb=Transmitted energy/bit
Transmitted freq= ƒi = (nc+i)/Tb, and n = constant (integer), Tb = bit interval
Symbol 1 is represented by S1 (t)
Symbol 0 is represented by S0 (t)

• BFSK Transmitter

The input binary sequence is represented in its ON-OFF form, with symbol
1 represented by constant amplitude of √Eb with & symbol 0 represented by zero
volts. By using inverter in the lower channel, we in effect make sure that when
symbol 1is at the input, The two frequency f1& f2 are chosen to be equal integer
multiples of the bit rate 1/Tb.By summing the upper & lower channel outputs, we
get BFSK signal.
• BFSK Receiver

The receiver consists of two correlators with common inputs which are
supplied with locally generated coherent reference signals c1(t) and c2 (t).
The correlator outputs are then subtracted one from the other, and the
resulting difference x is compared with a threshold of zero volts. If x >0, the
receiver decides in favour of symbol 1 and if x <0, the receiver decides in favour
of symbol 0.

III. Procedures

• Algorithm
Initialization commands

FSK modulation
1. Generate two carriers signal.
2. Start FOR loop
3. Generate binary data, message signal and inverted message signal
4. Multiply carrier 1 with message signal and carrier 2 with inverted message
signal
5. Perform addition to get the FSK modulated signal
6. Plot message signal and FSK modulated signal.
7. End FOR loop.
8. Plot the binary data and carriers.

FSK demodulation
1. Start FOR loop
2. Perform correlation of FSK modulated signal with carrier 1 and carrier 2 to
get two decision variables x1 and x2.
3. Make decision on x = x1-x2 to get demodulated binary data. If x>0, choose
‘1’ else choose ‘0’.
4. Plot the demodulated binary data.
Program: FSK Modulation Program: FSK Demodulation

IV. Results
a. Show the graphs generated on the above code.
FSK MODULATION AND DEMODULATION
Do the following procedures for M-ary FSK
5. Go to Communications Blockset -> Channels sub-folder. Drag and drop AWGN
Channel module into the model window. Double-click on this module and make the
following settings:

• Initial seed to 37
• Mode to Signal-to-noise ratio (Eb/No)
• Eb/No (dB) to 10
• Number of bits per symbol to 4
• Input signal power (watts) to 1
• Symbol period(s) to 0.1

6. Go to Communications Blockset -> Modulation -> Digital Baseband Modulation ->


FM sub-folder. Drag and drop M-FSK Demodulator Baseband module into the workspace
window. Double-click on this module and make the following settings:

• M−ary number to 2
• Output type to Integer
• Symbol set ordering to Binary
• Frequency separation (Hz) to 6
• Samples per symbol to 100
• Output Data Type to double

7. Go to Communications Blockset -> Comm Sinks sub-folder. Drag and drop Error Rate
Calculation module into the model window.

8. Go to Simulink -> Sinks sub-folder. Drag and drop the Display module into the model
window. Drag the bottom edge of this inserted (Display module) icon to make the display big
enough for three entries.

9. Go to Communications Blockset -> Comm Sinks sub-folder. Drag and drop two
Discrete-Time Scatter Plot Scope modules into the model window. Double-click on this
module and make the following settings:

Plotting Properties
• Samples per symbol to 100
• Offset (samples) to 1
• Points displayed to 400
• New points per display to 100

Axes Properties
• X-axis minimum to -1.25
• X-axis maximum to 1.25
• Y-axis minimum to -1.25
• Y-axis maximum to 1.25

10. Go to Simulink -> Math Operations sub-folder. Drag and drop two Complex to
Real−Imag modules into the model window.

11. Go to Simulink -> Sinks sub-folder. Drag and drop two XY Graph modules into the
model window.

12. Go to Simulink -> Sinks sub-folder. Drag and drop two Scope modules into the model
window.

13. Go to Simulink Extras -> Additional Sinks sub-folder. Drag and drop two Power
Spectral Density modules into the model window.

14. Connect all the inserted modules as shown in Figure 1.

Figure 1: Simulink model for 2-FSK Transmission


15. Set the simulation parameters (Simulation -> Configuration Parameters) as follows:

• Start time to 0.0


• Stop time to 10.0
• Type to Variable-step
• Solver to discrete (no continuous states)
• Max. step size to auto

16. Run (Simulation -> Start) the simulation and observe and save all plots and values in
BER display.

17. Model and simulate again changing M-ary number of Random Integer Generator, M-FSK
Modulator Baseband and M-FSK Demodulator Baseband modules to 4, 8, 16, 32 and 64.

Simulink Model for 2-FSK Transmission


2-FSK Transmission Plots and Values
Simulink Model for 4-FSK Transmission

4-FSK Transmission Plots and Values


Simulink Model for 8-FSK Transmission

8-FSK Transmission Plots and Values


Simulink Model for 16-FSK Transmission

16-FSK Transmission Plots and Values


Simulink Model for 32-FSK Transmission

32-FSK Transmission Plots and Values


Simulink Model for 64-FSK Transmission

64-FSK Transmission Plots and Values


V. Discussion
• Based on the simulations and coded scripts, explain the process of FSK
compared to ASK..

- Based on the simulations and coded scripts, we can differentiate


the process of FSK and ASK such that FSK uses digital signal to
adjust the frequency of wave carrier and it is less susceptible to
noise while ASK adjusts the amplitude of sine-wave and the bit
values is assigned in amplitude levels that are discrete. And
according to edaboard.com, FSK has several advantages over ASK
due to the fact that the carrier has a constant amplitude. hence, its
immunity to non-linearities, immunity to rapid fading, immunity to
adjacent channel interference, and the ability to work in small SNR
environments due to the effect of exchanging SNR for bandwidth.

VI. Conclusion
- After conducting the experiment, I was able to conclude that
Frequency Shift Keying has several edges compared to Amplitude
Shift Keying and one of it is that FSK is less susceptible to noise
while ASK is more susceptible to noise although ASK is simple. I
was also able to conclude in the FSK modulation that the waves are
more compressed in a modulated FSK signal while after
demodulation, the graph comes back to the graph of the binary
data. And we also saw that aswe change the Modulation and
Demodulation modules from 2-FSK TO 4, 8, 16, 32, 64-FSK’s the
X Y Plot becomes thicker as the modules gets higher and there are
also some changes in the values.

You might also like