• Review the theory of AM receivers using complex signals section 3.2.

  • Click on the link below to download the data file used in this section. Save it in a location that you can access later. This file was created using a USRP receiver.

  • Start GRC as was done in the previous tutorials. If GRC is already open, simply create a new flowgraph by selecting File->New.

In this step we will expand the frequency scale on the FFT display so that you can view the signals with greater resolution. Recall from the previous tutorial that the span of the frequency axis is determined by the sample rate (256 kHz for this file). While we cannot change the original data, we can resample it to either increase or decrease the sample rate. We will decrease the sample rate by using decimation. Modify the flow graph as follows:

The next step is to demodulate the signal. In the case of AM, the baseband signal is the envelope or the magnitude of the modulated waveform. GNU Radio contains a Complex to Mag block (in the Type Converters category) that can be used for this purpose. Again, the use of complex signal representation will be dealt with in depth in the future.

  • Insert the Complex to Mag block between the Low Pass Filter and the Throttle .

    • Note that the titles of some of the blocks are now red and the Execute Flow Graph icon is dimmed. This indicates an error. Prior to adding this block, all of the block inputs and outputs were complex values. However, the output of the Complex to Mag block is Float (a real number). Thus, any blocks following this block should be Type: Float. Modify the Throttle and WX GUI FFT Sink accordingly.

  • Execute the flow graph. You should now observe the spectrum of the baseband signal in the FFT Sink. Note that since the input data type to the FFT Sink is Float, only the positive frequency spectrum is displayed.

The next step is to listen to this demodulated waveform to confirm that it is in fact receiving the baseband signal.

The volume adjustment can be automated with an Automatic Gain Control (AGC) block. This block works by sampling its own output and adjusting its gain to keep the average output at a particular level.

  • Insert the AGC block (found under Level Controls) between the Low Pass Filter and the Complex to Mag block. The AGC will adjust the gain so that the sample values are always in a suitable range for the audio hardware. Leave the parameters at their default values.

  • You can now remove the Multiply Const and volume slider. Test the receiver again. Adjust the volume to a comfortable level using the computer's volume control on the first station you hear. Now tune up and down the band and notice that you no longer need to adjust the volume, but the noise level increases for weaker stations. The radio functions the same as a hardware radio.