Software Defined Radio Thanasis Korakis University of Thessaly [email protected] In this lecture ● What is SDR? ● A look inside a software radio ● What do you need to know to develop on SDR platform? What is SDR? ● A number of definitions can be found in literature. ● Software-defined radio (SDR) is a radio communication system where components that have been typically implemented in hardware (e.g. mixers, filters, amplifiers, modulators/demodulators, detectors, etc.) are instead implemented by means of software on a personal computer or embedded system. Source: http://en.wikipedia.org/wiki/Software-defined_radio Use in industry ● Pro: Software radios can be upgraded to new communication protocols over the air Image: NVIDIA Tegra 4i chip with “soft modem” SDR Use in industry ● Con: Life of mobile handsets is anyways short; hardware is obsolete before software ● Con: SDR chips are more expensive than single-purpose ASICs for mass market So, in practice: SDR seen more often in base stations than mobile handsets Use in research ● Pro: SDR devices are cheaper than singlepurpose ASICs for one-time prototypes ● Pro: Fast testing of new designs ● Pro: Use the same hardware for multiple designs Use in research ● Pro: You can do everything in software ● Con: You have to do everything in software Ideal SDR Image source: http://electronicdesign.com/communications/elusive-software-defined-radio Real SDR Image source: http://electronicdesign.com/communications/elusive-software-defined-radio Actual SDR The Ettus N210 / NI 2920 is a popular USRP (Universal Software Radio Peripheral) device RF frontend Functions of RF hardware (RX) ● Analog to digital conversion ● Signal downconversion to baseband ● Real signal into complex (I and Q components ● Filtering ● Decimation ● Send to host over Ethernet Not functions of RF hardware ● ● ● ● No signal detection No synchronization No equalization No demodulation What do you need to know to develop on SDR platform? ● There is no particular programming language ● Typically we separate programming to: ○ low level functions programming (C++) ○ compose blocks programming (Python - XML) Practical Hardware Limitations People often approach USRP with the attitude: “I can implement anything on this platform!” Then they go to USRP mailing lists and ask “Why doesn’t any of this work the way I expect it to?” Practical Hardware Limitations Development on SDR platform requires basic understanding of ● Platform limitations ● Hardware impairments (more in the lab) What is the bandwidth of my USRP? Answer: Minimum of ADC sampling rate, RF daughterboard (analog), FPGA processing, and host bandwidth ● ● Example: A system that uses a USRP N200/N210 with a 1 GigE interface, a fully host-based application that requires 16-bit samples, and a 40 MHz daughterboard will provide a useable bandwidth of ~20 MHz. The limit is set by the host interface – 1 GigE can stream up to 25 MS/s, which translates to ~20 MHz of usable bandwidth. Example: A system that uses a USRP X300/X310 with a 1 GigE interface for command/control, full FPGA processing of the rx/tx steams, and a 120 MHz daughterboard may provide usable bandwidth up to 120 MHz. The FPGA can process samples at 200 MS/s. The daughterboard is the limiting factor. [Source: http://www.ettus.com/kb/detail/usrp-bandwidth] Why don’t I get the sampling rate I asked for? ● Interpolation/decimation must be integer {4,..,512} ● Minimum sample rate is 0.1953 MHz 100 MHz / ? = 8 MHz 100 MHz / 13 = 7.692 MHz Why can’t I do more processing on my host? (Answer: processing depends on your host’s CPU power) The UHD driver prints informational output ● ‘O’ = overrun. PC not consuming samples as fast as the USRP is producing them. ● ‘U’ = underrun. PC not producing samples as fast the USRP is consuming them Why can’t I do more processing on my host? Note the underruns! Why is my signal off-center? Why is my signal off-center? ● Frequency offset on both sides of transmission due to crystal oscillator ● varies from one USRP to the next, temperature, frequency, vibrations, orientation of crystal relative to Earth’s gravity… Example: ● TX at 2.5GHz ● N210 LO is a 100 MHz VCXO rated at 2.5PPM ● Max error: 2.5 x 100 000 000 / 1 000 000 = 250 Hz ● Multiplier: 2.5 GHz /100 MHz LO = 25 ● Frequency offset: 250 Hz x 25 = 6.25 kHz (In practice: often more) Why is my signal off-center? Why does increasing amplitude cause more bit errors? Why does increasing amplitude cause more bit errors? ● Overflow ADC and/or DAC ● Drive amplifier (RX and/or TX) into nonlinear region Programming USRP Well-known softwares: ● UHD (Universal Hardware Driver) ● GNU Radio ● Iris UHD Manageme nt of USRP using C++ GNU Radio GNU Radio Creating functionalities (blocks) with C++ GNU Radio Visualizing blocks and connections GNU Radio Management of USRP using Python Iris Management of USRP using XML In the lab ● Why does my spectrum “droop” at the edges? ● Why is there always a spike in middle of my FFT? ● Why do I see “phantom signals” on my FFT?
© Copyright 2024