forked from nccgroup/RFTM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfm_receiver.html
127 lines (91 loc) · 5.99 KB
/
fm_receiver.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen">
<link rel="stylesheet" type="text/css" href="stylesheets/pygment_trac.css" media="screen">
<link rel="stylesheet" type="text/css" href="stylesheets/print.css" media="print">
<title>RF Testing Methodology by NCC Group</title>
</head>
<body>
<header>
<div class="container">
<h1>RF Testing Methodology</h1>
<h2>www.nccgroup.com</h2>
<section id="downloads">
<a href="https://github.com/nccgroup/RFTM/zipball/master" class="btn">Download as .zip</a>
<a href="https://github.com/nccgroup/RFTM/tarball/master" class="btn">Download as .tar.gz</a>
<a href="https://github.com/nccgroup/RFTM" class="btn btn-github"><span class="icon"></span>View on GitHub</a>
</section>
</div>
</header>
<div class="container">
<section id="main_content">
<h2>Developing a simple FM receiver step-by-step</h2>
<p>The instructions below will enable you to create a simple FM radio receiver. When you have finished it should look like this:
<p><img src="images/fm_flowgraph_new.png"></p>
<h3>Configure the GNU Radio environment</h3>
<p>When you first start GNU Radio Companion, you are presented with an "Options" block and a "Variable" block.
</p><p><b>Hint: When using GNU Radio Companion if you cannot find the block you are looking for in the right-hand pane, click on the magnifying glass in the menu bar and this will enable you to do a text search</b>
</p><p>The "Options" block allows you to enter parameters such as the Title, Author, Description and also allows you to decide if the GUI elements will use the WX or QT environments (WX is the default).
<p><img src="images/fm_top_block.png"></p>
</p><p><br />
In the "Variable" block set the sample rate to be 2e6 (2,000,000)
<p><img src="images/fm_samp_rate.png"></p>
</p>
<h3>Configure_the_receiver</h3>
<p>Depending on which SDR you have will depend on which options you set here. All of the main receivers can be controlled using the "osmocom Source". The "Device Arguments" settings for different SDRs can be found <a rel="nofollow" class="external text" href="http://sdr.osmocom.org/trac/wiki/GrOsmoSDR#Devicespecification">here</a>. However, if you are using an RTL-SDR, you can also just use the "RTL-SDR Source".
<p><img src="images/fm_rtlsdr_source.png"></p>
</p><p><br />
The sample rate will already be pre-populated with the "samp_rate" variable. Set "Ch0: Frequency" to be "freq" and then create a new variable called "freq" (you can copy and paste the other "Variable" block and then rename it) with a frequency in the Broadcast FM band e.g. Radio 4 in Cheltenham is 93.4MHz (93.4e6 in exponential notation)
<p><img src="images/fm_freq.png"></p>
</p><p><br />
Although you may need to increase the gains at a later stage if the signal is too weak, initially, use the following settings (for RTL-SDR):
</p>
<ul><li> Ch0: RF Gain - 50dB</li></ul>
<ul><li> Ch0: IF Gain - 20dB</li></ul>
<ul><li> Ch0: BB Gain - 20dB</li></ul>
<p>Leave everything else at the defaults.
</p><p>Select a "WX GUI FFT Sink" and connect it to the output of the receiver by clicking on the receiver output and then clicking on the "WX GUI FFT Sink" input - an arrow will link them together (if you want to unlink two blocks, click on the link and drag - it will disappear).
<p><img src="images/fm_fft_sink.png"></p>
</p><p><b>Note: By default the inputs and outputs are blue on these blocks, this denotes the type (blue = complex data, orange = float etc.) If the colours do not match on the connecters you are trying to connect together you will get a type-mismatch error and the arrow will go red.</b>
</p>
<h3>Filtering</h3>
<p>We now want to focus in on the signal of interest and filter out any other signals present in the baseband. Add a "Low Pass Filter" block and connect it to the output of the "SDR Source"
</p>
<ul><li> Set "FIR Type" to be "Complex->Complex (Decimating)"</li></ul>
<ul><li> Set "Decimation" to be 10 (we don't need to be processing quite so many samples per second so we reduce by a factor of 10)</li></ul>
<ul><li> Set "Cutoff Freq" to 75e3 - this is the maximum frequency (of the modulated signal) that we want to display</li></ul>
<ul><li> Set "Transition Width" to 25e3 - this is the bandwidth over which the filter will act i.e. the smaller the number the more aggressive the filter.</li></ul>
<p><img src="images/fm_filter.png"></p>
</p>
<h3>Resampling</h3>
<p>We now need to resample the signal by a non-integer factor (as we're aiming for the final sample rate at the speaker to be 48KHz).
</p><p>Add a "Rational Resampler" block and configure the settings as follows:
</p>
<ul><li> "Interpolation": 480000 - this will be the output sample rate</li></ul>
<ul><li> "Decimation": 200000 - this is the input sample rate</li></ul>
<p><img src="images/fm_resampler.png"></p>
</p>
<h3>Demodulating</h3>
<p>The demodulation scheme used is Wideband Frequency Modulation (WBFM), so add a "WBFM Receive" block with the following settings:
</p>
<ul><li>"Quadrature Rate": 480e3 (the sample rate at the output of the resampler)</li></ul>
<ul><li>"Audio Decimation": 10 (this reduces the sample rate further to 48KHz)</li></ul>
<p><img src="images/fm_wbfm_receive.png"></p>
</p>
<h3>Amplify the audio signal</h3>
<p>We should now have a demodulated audio signal, but it will need to be amplified.
</p><p>Add a "Multiply Const" block and set "Constant" initially to be "1" (this can be increased to increase the volume)
<p><img src="images/fm_const_block2.png"></p>
</p>
<h3>Audio output</h3>
<p>In order to be able to listen to the audio we need an output. Add an "Audio Sink" block and set the "Sample Rate" to 48KHz
<p><img src="images/fm_audio_sink.png"></p>
</p><p><br />
Your flow-graph should now be complete! (check it against the picture at the beginning of this tutorial).
</section>
</div>
</body>
</html>