Starting from:
$35

$29

Assignment 8 Solution

Introduction

So far you have learned about all the parts required to build a simple but functional receiver which reverts the e ects of the wireless channel and recovers the distorted data. All the channel and timing e ects have been generated with MATLAB code. Hence all the observed e ects have been kind of a self-ful lling prophecy.

Now we want to check whether our transmission assumptions have been any good and test the receiver with a real transmission. We will do this by using an acoustic link.














Acoustic channel

The audible spectrum of humans spans from about 20 Hz to 20 kHz (depending on the age and the number of attended rock concerts). The range that is usable for our acoustic transmissions is further limited by the operating range of the audio hardware. This parameter is called frequency response. For cheap equipment usually only a lower and an upper limit are available, for expensive audio equipment the manufacturer provides very detailed information about it.

Acoustic waves propagate with a speed of about c = 340 m=s in air. Following the fundamental relation :

= fc

we get wave lengths between    20 Hz  = 17 m and  20 kHz  = 1:7 cm.  For a typical carrier
frequency of 4 kHz we get a wavelength of    4 kHz = 8:5 cm.

Acoustic transmission has several advantages over RF communication. The most important one is that you can hear the transmitted signal and partly debug it with your ears. Nevertheless the similarity to radio waves is large enough to get an insight on the fundamental challenges of wireless communication.
Assignment 8
2



Hardware

Each group receives a set of hardware from us. It consists of:
    • 1x analog microphone

1x set of USB speakers

We use low-cost generic computer components for our project. Such devices have usually a frequency range from around 100 Hz to 15 kHz. But be cautious: the performance of these devices over the speci ed frequency range is not at. The behaviour can signi cantly change depending on your carrier frequency.

Sampling rate

You have to choose a sampling rate for the audio subsystem. The minimal requirement of the sampling frequency for our system is:

fs >= 2  (fc + B)

where fc is the carrier frequency and B is the signal bandwidth. But this is a theoretical value that would require perfect lters. Usually the sampling frequency should ful ll:

fs >> 2  (fc + B)

Not all sampling rates are supported by all soundcards. Typical sampling rates for audio applications are 44100 Hz (CD), 48000 Hz and 96000 Hz. We will use 48000 Hz as default.

Passband transmission

Because it is not possible to transmit complex baseband signals directly over the real-valued audio-channel, we have to leave the baseband (BB) domain and perform the transmission in passband (PB).

You need to pick a suitable carrier frequency fc. The range of possible values is limited by the sampling frequency, the signal bandwidth and the frequency response of your hardware. For a sampling rate fs = 48000Hz a carrier frequency of fc = 4000Hz is a good starting point, but you can also try fc = 6000Hz and fc = 12000Hz.

The process of transforming the baseband signal into a passband signal is done with a mixer and is called upconversion. We use a direct conversion scheme, which means that we mix our signal directly with the carrier frequency.


sP B[t] = <fsBB[t]  ej2 fctg

    • <fsBB[t]  (cos(2 fct) + jsin(2 fct)g

= <fsBB[t]g cos(2 fct) =f sBB[t]g sin(2 fct)
Assignment 8
3



The received signal rP B[t] must be converted back to the baseband. This is achieved by mixing it again with the carrier frequency.


rdc[t] = rP B[t]  e j2 fct

    • 12 sBB + 12 (<fsBBg =f sBBg)  e 4 fct


In the noiseless case we get the original baseband signal distorted by some unwanted byproducts at twice the carrier frequency. Those can be removed by means of a low-pass lter.

r~BB[t] = 2  LPfrdc[t]g

We will provide you a suitable low-pass    lter lowpass.m on moodle.


Transmitter speci cation

Information bits

To ensure that our assumptions regarding the demapping and the decoding are ful lled, we use uniform distributed random bits as information bits. Choose the number of information bits such that you have a payload of 1000 symbols. For the Monte-Carlo simulations of the BER you have to simulate a su cient number of payload blocks in order to ensure reliable results.

Modulation

Your transmission system should support BPSK and QPSK modulation of the payload. Symbol power should be normalized to 1.

Framing

To detect the beginning of the data stream use a pseudo-random sequence in front of your payload. The preamble should be 100 symbols long and BPSK modulated.

TX Pulse

Use a root raised cosine pulse with a lterlength of 20 symbol periods and a roll-o factor of 0.22 for the transmit lter.


Receiver Speci cation

Build the best causal receiver you can. :)


MATLAB audio functions

There are multiple ways to facilitate the audio I/O with MATLAB. During our test we noticed that the built-in audioplayer functions from MATLAB can be unreliable. That’s why we provide you a framework le (audiotrans.m) that contains 2 di erent methods to do

Assignment 8
4




the audio playback and recording, matlab and native. For MATLAB 2014 and on, the native mode is no longer supported; in this case use the matlab mode. For older verions of MATLAB, the native mode is generally more robust.

Tasks

Use the provided audiotrans.m audio le as framework. It takes care of audio transmission and recording. Try to stay within the given structure. The data processing should be done in the tx() and the rx() function. The tx function we provide generates a single tone only. It can be used to verify whether transmission and reception works at all.

    1. First implement the up and down conversion. Find a baseband signal that generates an unmodulated carrier wave (a continous sine). Check whether the received and down converted signal matches your expectations. (Note: You can verify the correctness of the transmission by ear.)

    2. Build a transmission system according to the speci cations given above for the acoustic

channel. You can reuse code from the exercises. Start with a very slow symbol rate of fsym = 100.

    3. Plot the BER for a symbol rate beetween 100 and 2000. Explain what you observe regarding the matched- ltered pulses.

    4. Introduce a frequency o set at the down-conversion. Describe the resulting problem. How can it be solved? How much frequency o set can your system handle?

Hints

    1. Use enough bits for your BER plots. than the BER you want to justify. consider the result reliable.

Usually you should have simulated 10x more bits this means there should be at least 10 errors to

    2. Always ensure a fair comparison. Be aware of what you compare regarding energy and bandwidth.

    3. If you have too much interference from others groups coordinate your carrier frequency with your neighboring cells.

    4. Try to identify which kind of distortion is relevant in your current setup. You don’t need to solve problems that are not relevant.

    5. We provide you the waveplot.m function. This can be used to visualize your received signal.
    6. MATLABˆ plots:

The plot() function supports di erent color and line styles. See help plot for the details. You can use this to display multiple datasets in the same graph (see hold command).

Assignmentˆ 8
5




Make sure that you plot complex numbers correctly and don’t discard any relevant information. Depending on your application you have to decide whether to plot as

    • and =, magnitude and phase or scatter graph.

Label the axis and lines of your plots correctly (see legend, xlabel, ylabel).

Always plot the bit error rate axis logarithmic. A correct grid setting can improve the readability.


Historical Note

The thing you are implementing during this exercise is in fact an acoustic coupler. Such devices were used in the 80ies to connect computers over the public telephone network. They had to be physically attached to a telephone handset, because you were not allowed to modify your telephone or plugin your self-built modem. One such device is displayed at the museum-Bolo in the INF building.


















Wikipedia/Rama/CeCILL

The original acoustic coupler used to transmit at a rate of 300 bits per second.


Hand In Instructions

Please submit your solution to moodle by 2020-11-20.

More products