Post Go back to editing

Chirp Signal on Pluto for FMCW Radar

Category: Hardware
Product Number: ADALM PLUTO

Hello, I'm working to build FMCW radar by using Pluto and Python. I've tried to run chirp signal in cycling, but with my code it send only small message (small pack) and stop sending. I'm think problem with buffer, but how to fix my problem I don't know. May anybody help me?

import numpy as np
import adi
import time


sample_rate = 10e6
freq_center = 2.5e9 
duration = 1 
bandwidth = 2e6 


t = np.linspace(0, duration, int(sample_rate * duration), endpoint=False)
chirp_signal = np.exp(1j * 2 * np.pi * (freq_center * t + 0.5 * bandwidth * t**2 / duration))


sdr = adi.Pluto("ip:192.168.2.1")
sdr.tx_rf_bandwidth = int(bandwidth) 
sdr.tx_lo = int(freq_center)
sdr.tx_cyclic_buffer = True 
sdr.tx_hardwaregain = -10 
sdr.sample_rate = int(sample_rate) 


sdr.tx(chirp_signal)


try:
while True:
time.sleep(1)
except KeyboardInterrupt:
print("killed by user")


sdr.tx_destroy_buffer()
sdr.tx_enabled_channels = [0]