Comms - Laboratory Experiment 2
Comms - Laboratory Experiment 2
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
I. Objective/s
• To generate and demodulate frequency shift keyed (FSK) signal using
MATLAB.
II. Theory
• Generation of FSK
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
• 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.
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.
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.