In GNU Radio

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 12

COMMUNICATION LAB (EE352)

GROUP 14
DHANA RAM – 12140560

GAURAV -12140700

MANCHI VIKRANTH – 12141010

AIM: To Send and Receive Sine Wave Signals From


USRP Device Using -
1) GNU-RADIO
2) python code simulation

1) GNU-RADIO -
We are using “gnuradio – companion”

For transmission:

Signal source - to send sine wave of centered frequency (900 MHZ) and gain of 40

QT GUI SINK -In GNU Radio, a Qt GUI sink is often used for visualizing and interacting with
signals in real-time. When working with the transmission of a sine wave or any other signal, a Qt
GUI sink provides a graphical interface to display the signal waveform, spectrum, or other
relevant information. This can be particularly useful for debugging, analysis, and monitoring
purposes.

For QT GUI Sink - centered frequency (900 MHZ), update rate -10,

Bandwidth(32khz)
USRP SINK - In GNU Radio, the USRP (Universal Software Radio Peripheral) Sink block is
often used to transmit signals including sine waves. USRP is a hardware radio identification
device (SDR) that allows you to connect your computer to a radio frequency (RF) network. The
USRP Sink block is specifically designed to connect to USRP devices for electronic
communication.

For usrp sink – RF(centered - frequency (900 MHZ) and gain (40) and bandwidht (32k))
For Receiving -

USRP Source -

In GNU Radio, the USRP (Universal Software Radio Peripheral) block is often used to receive
signals in Software Defined Radio (SDR) applications. The USRP space block interacts with
Ettus Research's USRP kit, which is particularly widely used in the SDR community.

For USRP Source - (centered frequency - (900 MHZ), Gain value (40), Bandwidth -(32k))

QT GUI SINK -

In GNU Radio, the term "Qt GUI Sink" refers to a graphical user interface (GUI) sink block that
uses the Qt framework for creating a graphical representation of signal data. In the context of
receiving a sine wave in GNU Radio, the Qt GUI Sink is used to visualize the received signal in
a graphical form.

For QT GUI SINK- (centered frequency - (900 MHZ) Bandwidth -(32k))


Result (GNU Radio)
i)Transmission –
## The input signal is not appeared in the frequency domain graph although the receiving
part is showing a clear-cut graph of sine wave .
ii) Receiving -

2) Python code simulation -

Code for Transmission -

import uhd
import numpy as np

import matplotlib.pyplot as plt

def initialize_usrp():

return uhd.usrp.MultiUSRP()

def send_waveform(usrp, samples, duration, center_freq, sample_rate, gain):

usrp.send_waveform(samples, duration, center_freq, sample_rate, [0], gain)

def generate_sine_wave():

x = np.linspace(0, 5, 1000)

y = np.sin(2 * np.pi * x) + 1j * np.cos(2 * np.pi * x)

return y

def transmit_signal(usrp, samples, duration, center_freq, sample_rate, gain):

send_waveform(usrp, samples, duration, center_freq, sample_rate, gain)

def generate_bits():

return np.random.randint(0, 2, 1000)

usrp = initialize_usrp()

center_freq = 900e6

sample_rate = 10e6

gain = 50

samples = generate_sine_wave()

transmit_signal(usrp, samples, 60, center_freq, sample_rate, gain)


Code for receiving -
import uhd

import matplotlib.pyplot as plt

import numpy as np

# detect device

usrp = uhd.usrp.MultiUSRP()

# Configure capture

t = 10.0

fadq = 10e6 # sampling freq

fcenter = 900e6 # center freq

gain = 50 # gain

nsamples = int(t*fadq)

tVector = np.linspace(0,t,nsamples)

samples = usrp.recv_num_samps(nsamples, fcenter, fadq, [0], gain)

print(len(samples[0]))

print(type(samples))

print((np.abs(samples[0]))**2)

plt.plot(tVector, (np.abs(samples[0]))**2)

plt.show()
Result -

Observation Summary:
Transmitting Sine Wave:

In together the GNU Radio flowgraph and Python law imitation, the broadcast of a sine wave
was favorable.
The range display and period-rule plot habitual the closeness of the communicated signal.

Receiving Sine Wave:

The received signal shown anticipated traits, but differences were noticed.
A commonness compensate 'tween the transmitted and taken signals was conspicuous in together
setups.
Time-Domain Comparison:

The time rule plots in together GNU Radio and Python displayed the impact of channel
belongings and hardware disadvantages.
Phase shifts and size differences were clear in the taken signal.

Consistency Across Platforms:

Results from the GNU Radio flowgraph and Python rule imitation were regular, validating the
experiment's effects, although there is a slight variation in transmitting wave.
Both floors told akin currents insufficiency compensate and signal quality.

Verification of Transmission:

The experiment favorably illustrated the strength to please and sustain wave in shape of sine
curve signals utilizing a USRP device.
Verification was obtained through ocular check of graphical likenesses and period-rule
corresponding.

Practical Considerations:

The experiment emphasize the practical concerns guide fittings flaws, channel belongings, and
potential cacophony all the while signal transmission.
In conclusion, the experiment supported valuable intuitions into the process of shipping and
taking signals utilizing a USRP tool. The noticed frequency counterbalance, development shifts,
and alternatives in signal traits help a better understanding of the authentic-planet implications of
high frequency ideas.

In the above experiment , as we can see that by applying frequency 900mhz with gain of 40 , we
also got noise in the receiving part while doing experiment as you can see in graph .

But overall it’s a good experiment in which we transmitted and received signals and with python
and gnu radio using usrp device .
THE END!

You might also like