0% found this document useful (0 votes)
412 views12 pages

Frequency Modulation in Simulink: Communications 1 Laboratory

This document describes an activity using Simulink to simulate frequency modulation (FM). The activity involves: 1) Creating a Simulink model to modulate a carrier signal with a modulating signal using different modulation indices. 2) Exporting the modulated and modulating signals to analyze their frequency spectra using MATLAB. 3) Analyzing the frequency spectra reveals the modulating signal contains one frequency, while the FM signal contains the carrier frequency plus/minus the modulating frequency due to FM. 4) Measuring the period of the FM signal at peaks/troughs of the modulating signal allows calculating the modulation index from the frequency deviation, validating the preset index.

Uploaded by

rekcah
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)
412 views12 pages

Frequency Modulation in Simulink: Communications 1 Laboratory

This document describes an activity using Simulink to simulate frequency modulation (FM). The activity involves: 1) Creating a Simulink model to modulate a carrier signal with a modulating signal using different modulation indices. 2) Exporting the modulated and modulating signals to analyze their frequency spectra using MATLAB. 3) Analyzing the frequency spectra reveals the modulating signal contains one frequency, while the FM signal contains the carrier frequency plus/minus the modulating frequency due to FM. 4) Measuring the period of the FM signal at peaks/troughs of the modulating signal allows calculating the modulation index from the frequency deviation, validating the preset index.

Uploaded by

rekcah
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/ 12

Communications 1 Laboratory

ACTIVITY 7

FREQUENCY MODULATION IN SIMULINK

Introduction:

To be able to transmit using a radio broadcasting antenna with a limited bandwidth, an


audio signal must be modulated. Frequency modulation is one of the most popular modulation
techniques used in audio radio broadcasting.

Frequency modulation is a technique wherein the frequency of the carrier signal is varied
using the variation in the instantaneous values of the modulating signal.

Mathematically, if the modulating signal is represented by a single sinusoid

𝑚(𝑡) = 𝑉𝑚 cos(2𝜋 𝑓𝑚 𝑡),

and the carrier signal is represented by another sinusoid

𝑐(𝑡) = 𝑉𝑐 sin(2𝜋 𝑓𝑐 𝑡),

the frequency modulated signal can be represented by the expression


𝑡
𝑚𝑖 𝑓𝑚
𝐹(𝑡) = 𝑉𝑐 sin [2𝜋 ∫ ( 𝑓𝑐 + 𝑚(𝜏)𝑑𝜏)]
𝑉𝑚
−∞

where 𝑚𝑖 = modulation index

It can be implemented by using the block diagram shown below.

For a single-tone (single frequency) modulating signal, the expression can be reduced to

𝐹(𝑡) = 𝑉𝑐 sin[2𝜋𝑓𝑐 𝑡 + 𝑚𝑖 sin(2𝜋 𝑓𝑚 𝑡)]

There are various ways in which an FM signal can be generated electronically using
amplifiers, oscillators, and filters. For this activity, you are going to synthesize an AM signal using
mathematical operations like addition, integration, amplification (amplitude scaling) and trigonometric
function.
Procedure:

Part I: Synthesizing an FM Modulator

1. Create the block diagram shown below on a New Blank Model.

2. Show all block names. To show the Block Name, right click on the block and then click
Format, select Show Block Name and then set it to On.

3. Rename the highlighted blocks.

4. We are going to simulate a frequency modulator with 𝑚(𝑡) = 0.5 sin (2𝜋 2𝑡) and
𝑐(𝑡) = (1) sin(2𝜋 20𝑡) using a modulation index of 𝑚𝑖 = 5.00. Click on each of the block
and set the following parameters.

Sine Wave (Modulating Signal):


Sine Type: Time based
Time (t): Use simulation time
Amplitude: 0.5
Bias: 0
Frequency (rad/sec) 2*pi*2
Phase (rad): 0
Sample Time: 0.001
Gain (Modulation Index):

Gain: 5

Gain1 (fm/Vm):
Gain: 2/0.5

Constant (Carrier Frequency):


Constant Value: 20

Gain2 (2*pi):
Gain: 2*pi

5. Set the Stop Time to 3 seconds and then Run the simulation.

6. Double click on the Scope. Copy the figure (Ctrl+C) and paste it inside the box shown
below.

7. Describe the waveform?


______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
Part II: Exporting Simulation Data to Matlab Workspace / Frequency Spectra of an FM Signal

8. Add To Workspace Blocks to the block diagram. A To Workspace Block imports simulation
data to Matlab Workspace.

9. By default, the variable names of the To Workspace Blocks are simout and simout1
respectively. Rename the To Workspace Blocks variable names to fm and m respectively. To
rename variables, double click on each block and type the new variable names.

10. Set the Stop Time to 3 seconds and then Run the simulation.

11. Go to Matlab Command Window. Create variables m and fm.

12. Go to Matlab Workspace. You will see three variables created. The variable out is the data
exported from Simulink.
13. Double-click on the three-variables. Matlab will open a variable viewer similar to a
spreadsheet viewer (Excel). Click on the highlighted (red) items.

14. The variable viewer will show a two-column data for out.m and out.fm. The data on the
first column are the time samples and the data on the second column are the signal
instantaneous values.

15. Copy the content of out.m (Ctrl+A then Ctrl+C) to variable m (Ctrl+V).

16. Copy the content of out.fm (Ctrl+A then Ctrl+C) to variable fm (Ctrl+V).

17. Steps 15 and 16 exports the content of out.m to regular variables m and fm.
18. Open the M-File fmmapua.m. Run the script.
Fs=1000; %sampling frequency

% Create Frequency Vectors (0 to Fs)


f1=linspace(0,Fs,length(m(:,1)));
f2=linspace(0,Fs,length(fm(:,1)));

figure(1);
plot(m(:,1),m(:,2)); grid on;
xlabel('Time(sec)');
ylabel('Amplitude')
title('Modulating Signal')

figure(2);
plot(fm(:,1),fm(:,2)); grid on
xlabel('Time(sec)');
ylabel('Amplitude')
title('FM Signal')

figure(3)
M = abs(fft(m(:,2))/Fs);
stem(f1,M); grid on
xlabel('Frequency(Hz)');
ylabel('Amplitude')
title('Frequency Spectrum of the Modulating Signal')

figure(4)
M = abs(fft(fm(:,2))/Fs);
stem(f2,M); grid on
grid on
xlabel('Frequency(Hz)');
ylabel('Amplitude')
title('Frequency Spectrum of FM Signal')

19. The M-File plots the modulating signal and FM signal vs. time (Figure 1 and Figure 2). It
also takes the magnitude of the Fast-Fourier Transform (FFT) of the two signals and plots
them vs frequency (Figure 3 and Figure 4).

20. Copy Figure 1 and Figure 2 and paste it inside the boxes shown below. To copy the figure
click Edit and then click Copy Figure from the figure toolbar.
Figure 1

Figure 2
21. Maximize the Figure 3 window. Locate the Zoom In command on the upper right corner
of the figure.

22. Zoom In on the waveform until it shows 0 Hz to 10 Hz on the x-axis and 0 to 0.8 on the y-
axis. Copy the figure below.
Figure 3

23. Maximize the Figure 4 window. Zoom In on the waveform until it shows 0 Hz to 40 Hz on
the x-axis and 0 to 0.6 on the y-axis. Copy the figure below.
Figure 4
24. Describe the waveform in Figure 3. How many distinct frequency(ies) does the
modulating signal contains? Explain why?
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________

25. Describe the waveform in Figure 4. How many distinct frequency(ies) does the FM signal
contains? Explain why?
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________

Part III: Modulation Index

26. Using a multiplexer, view the Modulating Signal and FM signal waveforms
simultaneously.

27. Set the Stop Time to 3 seconds and then Run the simulation.
28. Double-click on the scope. Copy the figure (Ctrl+C) and paste it inside the box.
𝑚𝑖 = 5.00
29. On the graph, you will see the modulating signal and the FM signal on the same set of axes.
At the positive peak (maximum) of the modulating signal, the frequency of FM signal (A) is
high (period is small), while at the negative peak (minimum), the frequency of FM signal (B)
is low (period is large).

30. Zoom In on the portion of the waveform labeled A. Measure the time at zero crossings.

31. Zoom In on the portion of the waveform labeled B. Measure the time at zero crossings.

32. Tabulate your measurements and calculate the corresponding periods and frequencies at A
and B.
𝑇 1
𝑡1 𝑡2 = 𝑡2 − 𝑡1 𝑇 𝑓=
2 𝑇
A
B
𝑓𝐴 −𝑓𝑐
33. Calculate the modulation index using the formula 𝑚𝑖 = 𝑓𝑚
. Calculate the modulation
𝑓𝑐 −𝑓𝐵
index using the formula 𝑚𝑖 = 𝑓𝑚
where 𝑓𝑚 = 2 𝐻𝑧 and 𝑓𝑐 = 20 𝐻𝑧 are the modulating
frequency and the carrier frequency respectively. Compare the calculated values to the preset
values.
𝑓𝐴 − 𝑓𝑐 𝑓𝑐 − 𝑓𝐵
𝑚𝑖 𝑚𝑖 = . 𝑚𝑖 =
𝑓𝑚 𝑓𝑚
5.00
3.00
8.00

34. Repeat steps 27 to 33 using 𝑚𝑖 = 3.00. Tabulate your answers on the table below.
𝑇 1
𝑡1 𝑡2 = 𝑡2 − 𝑡1 𝑇 𝑓=
2 𝑇
A
B

35. Calculate the modulation index. Tabulate your answers on the table shown on step 33.

36. Copy the figure (Ctrl+C) and paste it inside the box.

𝑚𝑖 = 3.00
37. Repeat steps 27 to 33 using 𝑚𝑖 = 8.00. Tabulate your answers on the table below.
𝑇 1
𝑡1 𝑡2 = 𝑡2 − 𝑡1 𝑇 𝑓=
2 𝑇
A
B

38. Calculate the modulation index. Tabulate your answers on the table shown on Step 33.

39. Copy the figure (Ctrl+C) and paste it inside the box.

𝑚𝑖 = 8.00

You might also like