wireless communication with gnu sdr. a simplified wireless communication scheme

12
Wireless Communication with GNU SDR

Upload: albert-perry

Post on 01-Jan-2016

228 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Wireless Communication with GNU SDR. A simplified wireless communication scheme

Wireless Communication with GNU SDR

Page 2: Wireless Communication with GNU SDR. A simplified wireless communication scheme

A simplified wireless communication scheme

Page 3: Wireless Communication with GNU SDR. A simplified wireless communication scheme

GNU Software Defined Radio

• Basically, the idea is to generate the baseband waveform in the computer and send it to the USRP.

• The USRP converts the digital waveform into analog waveform and send it out.

• The receiver does the reverse.

Page 4: Wireless Communication with GNU SDR. A simplified wireless communication scheme

The code for a simple BPSK transmitter and receiver

• http://www.cs.fsu.edu/~zzhang/CIS5930_Spring_2009_files/tea1.py• Basically, the signal processing functions are implemented in C++ as ``signal

processing blocks.’’ The blocks can be considered as equivalent to hardware chips with inputs and outputs, and a black box which process the inputs into outputs.

• The signal processing blocks are connected in Python.• You will have a signal source and a signal sink.

Page 5: Wireless Communication with GNU SDR. A simplified wireless communication scheme

The sender

• Signal Source. Basically a series of bytes– self.bytes_src1 = gr.vector_source_b(array1, True)

• Turn bytes into k-bit vectors– self.bytes2chunks =

gr.packed_to_unpacked_bb(self.bits_per_symbol(), gr.GR_MSB_FIRST)

• Turn k-bits into symbols:– self.chunks2symbols =

gr.chunks_to_symbols_bc(psk.constellation[2])

Page 6: Wireless Communication with GNU SDR. A simplified wireless communication scheme

The sender

• The low pass filter:– self.rrc_filter =

gr.interp_fir_filter_ccf(self._samples_per_symbol, self.rrc_taps)

• Then send it to the signal sink. That’s it!– fg.connect(self.bytes_src1, self.bytes2chunks,

self.chunks2symbols, self.rrc_filter, self.amp, self.u)

• For debugging, you can also connect the output of any signal processing block to a file sink, and play it

Page 7: Wireless Communication with GNU SDR. A simplified wireless communication scheme

The Receiver

• First, there is signal source – self.u (USRP)• Then, pass it to amplifier, channel filter, then to

rrc_filter, then to the gr.mpsk_receiver_cc, which turns the received baseband signal into bits (it’s actually symbols that can be immediately converted to bits)self.receiver=gr.mpsk_receiver_cc(arity, 0,

self._costas_alpha, self._costas_beta, fmin, fmax, self._mu, self._gain_mu, omega, gain_omega, _def_omega_relative_limit)

Page 8: Wireless Communication with GNU SDR. A simplified wireless communication scheme

The baseband waveform

• Check the linux machine…

Page 9: Wireless Communication with GNU SDR. A simplified wireless communication scheme

Complex representations

• You have to get used to representing the received signal as complex numbers.

• That is, r(t) =Re(t) + jIm(t).• Why?• Because if you will multiply the r(t) with both cos(2\

pi ft) and sin(2\pi ft), and both will be sent to a LPF. The one corresponding to cos(2\pi ft) is regarded as the real part and the one corresponding to sin(2\pi ft) is regarded as the imaginary part.

Page 10: Wireless Communication with GNU SDR. A simplified wireless communication scheme

Complex representations

• Suppose the sender sends I(t)cos(2 \pi ft). It can be considered as I(t)cos(2 \pi ft) + 0 sin(2 \pi ft).

• Suppose the phase difference between the sender and the receiver is \phi. So, the receiver will get I(t)cos(\phi) in one branch and I(t)sin(\phi) in the other branch (you can verify it). It’s therefore natural to regard the two signals as the real and the imaginary component of signal I(t) e^{j\phi}.

Page 11: Wireless Communication with GNU SDR. A simplified wireless communication scheme

Frequency representation

• You must also get used to the frequency representation of the time domain signal.

• Time domain: cos(2\pi ft). To specify it, you have to specify its value at every time instant.

• Frequency domain: a cosine wave with frequency f. That’s it.

• They are basically different languages talking about exactly the same thing.

Page 12: Wireless Communication with GNU SDR. A simplified wireless communication scheme

Frequency

• As mentioned last time, the received signal can be regarded as the summation of sine waves at various frequencies. – F(w) = \int_{-\infty}^{\infty} f(t) e^{-jwt} dt.– f(t) = \int_{-\infty}^{\infty} F(w) e^{jwt} dw.

• Example.– f(t) = cos(w_0 t). F(w) = \infty (w=w_0, -w_0), and

0 in all other values.– http://www.analyzemath.com/trigonometry/trigonometric_formulas.html