Generating an emergency signal#

Learning goals
  • Understand how we process signals in the frequency domain

  • Explain typical modulation and coding methods

  • Analyze a link budget for a given digital communication link

Introductory problem

After found out the lost signal and find the solution for transmitting the temperature information as an analog signal very silly. This is a waste of bandwidth! you think.

You should design and implement a prototype of a system that sends regularly temperature data. Questions to think about:

  • What will be the range of the signals?

  • Which and how much data should be sent per device?

  • What are the bandwidth requirements?

  • How many devices do we expect on the field? Is interference an issue?

  • What happens if a data packet is lost?

  • Which frequency range are we going to use?

  • Which communication protocols can we use?

  • Where will be the data received and where will it be forwarded and stored?

Preparation#

Preparation could take 2 hours.


In-class activities#

Transmitting an analog signal#

Let us start simple by feeding the signal directly to the SDR.

Tip

If you are in a class and do not want to avoid interfering other students, use the loopback cable as follows:

_images/pluto-loopback-cable.jpg

Run the following graph with your SDR.

_images/transceiver_analog.svg

Fig. 3 Flow graph with frequency spectrum and waterfall diagram. gnuradio/transceiver_analog.grc. You also have to download gnuradio/temperature.wav.#

Two type of PlutoSDR blocks are included. PlutoSDR Sink uses the native libiio library and Soapy PlutoSDR sink uses SoapySDR. SoapySDR uses libiio and is an abstraction layer for various SDR devices.

Exercise 6

  1. What does the flow graph do?

  2. What does Float To Complex do?

  3. What does Rational Resampler do?

  4. What does Complex to Mag do?

  5. Run the flow graph and change wav_gain, tx_gain and rx_gain. What happens?

  6. Optional: Is the RF signal that is transmitted by the antenna an AM signal? For the detailed formula of AM refer to the \(y(t)\) shown here.

Exercise 7

Now, try with antennas:

  1. First try to receive the signal you transmit. How do wav_gain, tx_gain and rx_gain affect the signal you hear?

  2. Put your device closer to the neighbor’s device. Do you observe any interference? If yes:

    • where do you see the interference?

    • how can you reduce the interference?

  3. Optional: Try to create a one-way communication with your neighbor by deactivating one of the tx or rx blocks both on your and your neighbor’s side. Put the devices side by side. Pick the minimum gain values which is sufficient for communication. Now, replace the antenna with a longer one. What do you observe?

Details of AM is out of the scope of this course. If you are interested, refer to this video by Tall Paul.

Exercise 8

Disable the PlutoSDR blocks and replace emulate their functionality with other (non-device) blocks.

Hint

Use a Frequency Shift component.

Transmitting a digital signal#

Run the following flow graph:

_images/temperature_modulation_digital.svg

Fig. 4 Flow graph that transmits receives encoded temperature signals using digital modulation. gnuradio/temperature_modulation_digital.grc.#

  1. What does Noise Source do? How is this kind of noise called?

  2. What does a Constellation Sink visualize?

  3. What do you notice in the constellation diagrams when you increase noise_percent?

  4. Bottom right Time Sink has three inputs. What do they visualize?

  5. Change the modulation technique to QPSK by:

    • disabling one and activating another Constellation object.

    • also change bits_per_symbol to an appropriate value.

    • optional: change the delay so that you don’t get any error.

  6. Which property of the system changes if you change the modulation technique?

Packet-based communication#

In computer networking, we typically enclose the data that we want to transmit in a packet. The following flow graph:

  1. Generates data with a number of bytes

  2. Generates a signature for the data called CRC (cyclic redundancy check)

  3. Assembles the following in a packet in order:

    1. Header – called access code in the flow graph (4 bytes)

    2. the length of the transmitted data in bytes (two bytes); repeated two times (2 * 2 bytes = 4)

    3. data

    4. CRC (4 bytes)

  4. Modulates the packet bits

  5. Demodulates and extracts bits again

  6. Searches for the header, if it is found, it extracts the length and reads length bytes.

  7. Checks CRC. If correct, then prints the the content to the terminal.

_images/packet_based_communication.svg

Fig. 5 Flow graph that represents packet-based communication. gnuradio/packet_based_communication.grc.#

Download and run the flow graph. You should see two time sinks.

  1. Both time sinks show different packet_len: ...s. Do these numbers make sense to you?

  2. What could be the advantage of

    • a header (access code)?

    • CRC?