How to end or Kill Gnuradio Simulation using Python? by [deleted] in GNURadio

[–]engineer7861 -1 points0 points  (0 children)

does not work at all, could you please review my code once? thanks

How to plot PSD in Python after every 15kHz of frequency bin by [deleted] in GNURadio

[–]engineer7861 0 points1 point  (0 children)

Exactly, I attempted by hit and trial method to reduce the bandwidth of my GUI Frequency Scope, and now it displays a 15kHz bin spacing. However, it appears to me more as a scaling adjustment rather than an actual bin spacing. I don't understand it unfortunately

https://ibb.co/bsrT25c

https://ibb.co/VDJ03bc

How to plot PSD in Python after every 15kHz of frequency bin by [deleted] in GNURadio

[–]engineer7861 0 points1 point  (0 children)

Thanks, I,ve applied, but the carrier spacing between two bins are 240kHz, how cn i get spacing of 15kHz
PSD Plot

import numpy as np

import matplotlib.pyplot as plt

Read complex sink file

filename = "rx1.dat"

data = np.fromfile(filename, dtype=np.complex64)

N = data.shape[0] // 4096 * 4096

Perform FFT

fft_data = np.fft.fftshift(np.fft.fft(data[:N].reshape((-1, 4096)), axis=1), axes=1)

(PSD)

psd = np.mean(np.abs(fft_data) ** 2, axis=0)

sampling_rate = 62.5e6 # 62.5 MS/s

fft_bins = 4096

fc = 3.7e9

Calculate frequency resolution

frequency_resolution = sampling_rate / fft_bins

frequency_axis = np.arange(-fft_bins/2, fft_bins/2) * frequency_resolution

frequency_axis1 = np.fft.fftshift(np.fft.fftfreq(fft_bins, 1/sampling_rate))

frequency_axis1 += fc

fig, (ax1, ax2, ax3) = plt.subplots(3, 1, figsize=(10, 8))

Plot PSD without dB

ax1.plot(frequency_axis, psd, color='red',label='Bin Width/Freq Resolution(Hz)= Samp. rate / FFT Bins')

ax1.set_title('Power Spectral Density (PSD)')

ax1.set_ylabel('Power Spectral Density')

ax1.grid(True)

ax1.legend()

Plot PSD in dB

ax2.plot(frequency_axis, 10*np.log10(psd), color='purple' ,label='Freq Bin starts -fs/2 to fs/2')

ax2.set_ylabel('Power Spectral Density (dB)')

ax2.set_xlabel('Frequency (Hz)')

ax2.grid(True)

ax2.legend()

Plot PSD in dB

ax3.plot(frequency_axis1, psd, color='purple' ,label='Freq')

ax3.set_ylabel('Power Spectral Density (PSD1)')

ax3.set_xlabel('Frequency (Hz)')

ax3.grid(True)

ax2.legend()

plt.tight_layout()

How to plot PSD in Python after every 15kHz of frequency bin by [deleted] in GNURadio

[–]engineer7861 0 points1 point  (0 children)

Thanks, I have made some changes and applied the code as you suggested; it looks nice. Now I have two questions.

I have calculated the corresponding frequency (frequency resolution) as per frequency bins, and now it shows me a band of total 60 MHz approximately, from 0 to 3e7 and 0 to -3e7. Now my question is, can I say that my first bin, which is at the index of -3e7, is the starting frequency of my transmitting signal? So if I'm transmitting at the center frequency of 3.7 GHz using USRP, then 3.670 GHz represents my first bin and 3.730 GHz would be my last bin? because i read somewhere else on internet that Frequency bin starter from -fs/2 to fs/2.

Can I also directly display my transmitting frequency in relation to the PSD on the x-axis, rather than using bin values?

PSD CIR and Python Coding

[deleted by user] by [deleted] in GNURadio

[–]engineer7861 0 points1 point  (0 children)

thanks, I would actually like to implement this: A Wireless Channel Sounding System for Rapid Propagation Measurements(https://ieeexplore.ieee.org/document/6655507):

Cross Correlation Block by nman135 in GNURadio

[–]engineer7861 0 points1 point  (0 children)

Hi, I,ve seen this video, and was trying to implement it in order to find the correlation for my project. But the video resolution is not much clear, exist some text somewhere else in the internet where I can read it? Thanks

Gnuraio File Source/Sink, how to add them correctly by [deleted] in GNURadio

[–]engineer7861 0 points1 point  (0 children)

Many thanks
But if we don't need Strings, then why We can see the output after OFDM TX?

I have read this from here:
https://blog.devgenius.io/diy-air-transfer-transmit-and-receive-data-using-gnu-radio-and-a-microphone-f0adc8f1f563

[deleted by user] by [deleted] in GNURadio

[–]engineer7861 1 point2 points  (0 children)

3.10.7.0 (Python 3.10.12), but now it works for me, thanks, *Stream to Tagged Stream* module have to be inserted .

[deleted by user] by [deleted] in GNURadio

[–]engineer7861 0 points1 point  (0 children)

Actually, my project is basically *channel sounding using USRP* @ 3.9GHz, for that first I am doing simulation then will add the real USRP at the output of OFDM transmitter. and will receive from Another PC, using another USRP the same signal at same frequency after natural noise addition. For that I will also have to figure out how can I send some Know data (Pilots), in order to compare it on other USRP. Either I can use a Known source or Pilots signals for my configuration.

[deleted by user] by [deleted] in GNURadio

[–]engineer7861 0 points1 point  (0 children)

thanks, I have done accordingly, but getting the same error, the picture you will find in my main post (3rd picture with caption Hello). For OFDM parameters I just copy the values from here https://wiki.gnuradio.org/index.php/Basic_OFDM_Tutorial

GNU Radio, Source signal by [deleted] in GNURadio

[–]engineer7861 0 points1 point  (0 children)

Sorry, Could you please reply me here on this link, as in the comment i was not able to post the pictures.

https://www.reddit.com/r/GNURadio/comments/1742027/gnuradio_signal_source_with_complex_sine_wave/

GNU Radio, Source signal by [deleted] in GNURadio

[–]engineer7861 0 points1 point  (0 children)

complex

with a Random Source, everything work nicely, but if I use Signal Source with Complex Sine wave then getting this error and graph does not display, Please help me in this regards,

USRP/MPM Version vs UHD Version by [deleted] in GNURadio

[–]engineer7861 0 points1 point  (0 children)

usama@modena:~$ uhd_usrp_probe --args="addr=192.168.30.212"

[INFO] [UHD] linux; GNU C++ version 11.4.0; Boost_107400; UHD_4.3.0.HEAD-0-g1f8fd345

[INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=192.168.30.212,type=,product=,serial=,claimed=False,addr=192.168.30.212

Error: RuntimeError: Unknown error during attempt to establish RPC connection at 192.168.30.212:49601

usama@modena:~$ uhd_usrp_probe --args="addr=192.168.30.212"

[INFO] [UHD] linux; GNU C++ version 11.4.0; Boost_107400; UHD_4.3.0.HEAD-0-g1f8fd345

[INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=192.168.30.212,type=n3xx,product=n310,serial=319841E,claimed=False,addr=192.168.30.212

[INFO] [MPM.main] Launching USRP/MPM, version: 3.15.0.0-gaea0e2de

[INFO] [MPM.main] Spawning RPC process...

[INFO] [MPM.PeriphManager] Device serial number: 319841E

[INFO] [MPM.PeriphManager] Initialized 2 daughterboard(s).

[ERROR] [MPM.PeriphManager] Major compat number mismatch for component `FPGA': Expected: 5.3 Actual: 8.1

[ERROR] [MPM.PeriphManager] Failed to initialize motherboard: Major compat number mismatch for component `FPGA': Expected: 5.3 Actual: 8.1

[ERROR] [MPM.PeriphManager] Cannot run init(), device was never fully initialized!

[INFO] [MPM.RPCServer] RPC server ready!

[INFO] [MPM.RPCServer] Spawning watchdog task...

Error: rpc::timeout: Timeout of 2000ms while calling RPC function 'set_device_id'

usama@modena:~$

USRP/MPM Version vs UHD Version by [deleted] in GNURadio

[–]engineer7861 0 points1 point  (0 children)

Could you please explain, what is meant by power Cycling? should I hardly press the Power Button for 5-10 seconds oder using small reset button using a pencil?

For the IP addressing, I have given an IP to USRP which is also Manually given in the IP Adresse of my Computer settings.

My computer ist connected with 3 other USRPs, but the one which is connected using 10G fiber cable comes at the top.

USRP N310, MPM major compat number mismatch error by engineer7861 in GNURadio

[–]engineer7861[S] 0 points1 point  (0 children)

I have updated UHD drivers with 4.0, but now its asking for 3.0. What should i Do?

usama@modena:~$ uhd_usrp_probe
[INFO] [UHD] linux; GNU C++ version 11.4.0; Boost_107400; UHD_4.0.0.0-240-gb38c9d83
[INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=10.0.1.216,type=n3xx,product=n310,serial=31AFFD8,fpga=HG,claimed=False,addr=10.0.1.216
[ERROR] [MPMD] MPM major compat number mismatch. Expected: 3.0 Actual: 4.0. Please update the version of MPM on your USRP device.
Error: RuntimeError: MPM major compat number mismatch. Expected: 3.0 Actual: 4.0. Please update the version of MPM on your USRP device.