GRC FM Tutorial
GRC FM Tutorial
Lesson 3
Review of theory.
You can build the above exponential very easily in GRC and generate fm
Phase modulation
Let us first explore Phase modulation.
The QT range
block controls
the variable
phi. Set its
value to change
between -pi
and pi.
We will send the constant signal to a phase modulation block and see how the I and
Q values change as we vary phase.
You can set sensitivity to phi. Look at the data type colors.
Instead of sensitivity you can vary input and obtain a rotating phasor.
The constellation
diagram looks as
shown below. Vary
the phase and see
how I and Q
changes.
We will experiment with the above flow graph. Change the constant input source to
a signal source.
Vary the phase and see the change of phasor in constellation output
Try changing the signal source to triangular or square and try to explain the
diagram.
Frequency modulation.
We will implement
We have constructed the first part above of the above equation using phase mod
block above. Multiply the above with a phasor with frequency fc.
Complex sine and Complex cosine signals are nothing but phasors.
Implement the following flow graph and verify.
Closely examine the phase of I and Q in both cases above.
Look at the various QT widgets. We can control fm,fc and Beta with them.
Complex to real extracts the real part.
Carefully look at the colors of various outputs. The complex ones are shown in
blue and real ones are shown as saffron. The output of the above flow graph is
shown below.
Change the signal source waveform type and see the waveforms.
Next add a file sink block and save the output to a file. The file can grow very huge.
( be careful)
Record the fm data for 1 minute . Locate the file and examine the content using od
command. ( od is available on terminal)
FM Receiver
( Please look up the theory part and how to manipulate samples in z domain)
This can be implemented as shown below.
Now let us build an actual FM receiver which accepts signals from RTL SDR dongle
The RTL SDR source will provide I and Q signals from the FM station. We can
directly recover the message using a conjugate multiplier and delay as shown
above.
Complex to arg takes in a complex stream and outputs each complex value's arg
(a.k.a. arctan, The output is a float.
FM with WBFM demodulation block
GNU radio provides a wide band fm receiver block which you can directly uses.
See the flow graph below. It used 2Mhz sampling rate a rational re sampler
converts the samples to 500khz . The demodulated out put is again re sampled to
suit the audio sink which works at 48khz