Hello, Thanks for the reply!
However, I am unsure on what to do ( sorry, I am not a programming/USRP expert). Do you mean that I run the tx_bursts.cpp and then it will generate out an actual sample rate. So my code has to use the (usrp->get_tx_rate() ) value and use that value and feedback to my calculation posted below to calculate the chirp samples? What about the - -nsamp, is it the chirp samples? Do you have any code examples by any chance? Thank you in advance! From: Humphries, James R. [mailto:humphrie...@ornl.gov] Sent: Monday, 30 April 2018 10:06 PM To: Yeo Jin Kuang Alvin (IA) Cc: usrp-users@lists.ettus.com Subject: RE: UHD C++ Chirp Signal Hello, Sorry for the delay. Looks like you are on the right track, you could add the chirp to the wave table (I just added the chirp calculation during setup in the tx_bursts code). You'll want to do your setup of the USRP and then ask it what the actual sample rate is. ( usrp->get_tx_rate() ). Use that to calculate your delta t for chirp samples. -Trip From: Yeo Jin Kuang Alvin (IA) <yjink...@dso.org.sg<mailto:yjink...@dso.org.sg>> Sent: Thursday, April 26, 2018 2:05 AM To: Humphries, James R. <humphrie...@ornl.gov<mailto:humphrie...@ornl.gov>> Cc: usrp-users@lists.ettus.com<mailto:usrp-users@lists.ettus.com> Subject: RE: UHD C++ Chirp Signal Hello! 1. I've looked into the tx_bursts.cpp code and noticed there isn't any "wave-type " option, means I assume we have to generate our own signal out/in this code. Does it mean that if I were to generate the chirp, I have to use part of the code in tx_waveforms.cpp and type in the chirp's code into wavetable.hpp so that I am able to send it to the USRP B210 board. 1. If the chirp I would like to generate is 25 MHz with a BW of 20 MHz, with a transmission pulse width = 2us. Therefore, chirp rate = BW/Tp = 1 x 10^3 . I am planning to insert this code into the wavetable.hpp to generate the chirp: If (wave_type == "CHIRP") { double f_start = 15000000; double f_end = 35000000; double interval = 0.000002; double delta = 0; double t = 0; float PI = 3.142; for (size_t i = 0; i < wave_table_len; i++) { double delta = i / (float)wave_table_len; double t = interval * delta; double phase = 2 * PI * t * (f_start + (f_end - f_start) * delta / 2); real_wave_table[i] = std::sin(phase); } 1. The samples required for the chirp is N = tp/ts, correct me if I'm wrong. But is the ts or sampling frequency fs, the "- -rate" (outgoing samples to DAC) ? 1. I'm confused at "master_clock_rate" with the "- -rate", if I were to generate out the chirp mentioned above. What are the rates I have to set for this two? Thanks in advance! From: Humphries, James R. [mailto:humphrie...@ornl.gov] Sent: Wednesday, 25 April 2018 9:42 PM To: Yeo Jin Kuang Alvin (IA) Cc: usrp-users@lists.ettus.com<mailto:usrp-users@lists.ettus.com> Subject: RE: UHD C++ Chirp Signal Hello, One of the UHD examples is a good place to start. I generated chirp bursts a little while back using the tx_bursts example as a starting point. Most of what you need is already there, its just up to you to calculate the samples needed to generate the chirp and put them into the tx buffer. https://github.com/EttusResearch/uhd/blob/maint/host/examples/tx_bursts.cpp I'm happy to help if you have any specific questions on this. -Trip From: USRP-users <usrp-users-boun...@lists.ettus.com<mailto:usrp-users-boun...@lists.ettus.com>> On Behalf Of Yeo Jin Kuang Alvin (IA) via USRP-users Sent: Monday, April 23, 2018 10:53 PM To: usrp-users@lists.ettus.com<mailto:usrp-users@lists.ettus.com> Subject: [USRP-users] UHD C++ Chirp Signal Hi all, Does anyone know how to create a chirp signal using UHD C++? Are there any code examples and which files do I need? Thanks in advance!
_______________________________________________ USRP-users mailing list USRP-users@lists.ettus.com http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com