usrp-users@lists.ettus.com

Discussion and technical support related to USRP, UHD, RFNoC

View all threads

Power decrease and phase coherence in USRP 2945

PD
Pisonero-Fuentes David (Becario)
Wed, Dec 2, 2020 9:04 AM

Hi.

We have developed a project using the USRP 2945 and UHD libraries to estimate a signal's direction of arrival.

In this project, the four channels of the USRP 2945 are connected through a power splitter to a function generator, and the local oscillators in the back are connected following the user guides (LO OUT 1 IF 2 connected to LO IN 0 IF 2, and LO OUT 1 IF 1 connected to LO IN 0 IF 1).

However, it seems that, when we tune some frequencies, 400 MHz for instance, we observe a huge decrease in power in channels 1 and 3 (50 dB).

Taking into account that, by eliminating the set_command_time instruction in the setting tune frequency function, this problem disappears, we suspect that this may be caused by time synchronization. Although, if we do this, 90 and 180 degrees phase offsets start appearing when we tune several frequencies.

Does anyone know what might be happening? I think the relevant code is below:

Thank you for your time.

Regards.

// SDR configuration
usrp->set_time_unknown_pps(uhd::time_spec_t());

usrp->set_rx_lo_export_enabled(true,uhd::usrp::multi_usrp::ALL_LOS,2); // 2
usrp->set_rx_lo_source("internal",uhd::usrp::multi_usrp::ALL_LOS,2);  // 2
usrp->set_rx_lo_source("companion",uhd::usrp::multi_usrp::ALL_LOS,3);   // 3
usrp->set_rx_lo_source("external",uhd::usrp::multi_usrp::ALL_LOS,0); // 0
usrp->set_rx_lo_source("external",uhd::usrp::multi_usrp::ALL_LOS,1); // 1

usrp->clear_command_time();
usrp->set_command_time(usrp->get_time_now()+uhd::time_spec_t(0.1));

uhd::tune_request_t tune_request(freq_);

tune_request.dsp_freq_policy = uhd::tune_request_t::POLICY_MANUAL;

for (int i = 0; i < CHANNELS; i++) {

    usrp->set_rx_rate(rate_, i);
    usrp->set_rx_freq(tune_request, i);
    usrp->set_rx_gain(gain_, i);
    usrp->set_rx_bandwidth(bandwidth_, i);

}

std::this_thread::sleep_for(std::chrono::milliseconds(110));

usrp->clear_command_time();

// A method to tune frequencies

bool Acquirer_SDR::sdr_set_tune_frequency(usrp_2945* radio, float freq, int channels) {

bool success = true;
std::cout << "Setting tune frequency: " << freq << std::endl;
radio->usrp->clear_command_time();
radio->usrp->set_command_time(radio->usrp->get_time_now()+uhd::time_spec_t(0.1));
uhd::tune_request_t tune(freq);

tune.dsp_freq_policy = uhd::tune_request_t::POLICY_MANUAL;

for (int i = 0; i < channels; ++i) {
    std::cout << " Ch" << i << " ";
    radio->usrp->set_rx_freq(tune, i);
    std::cout << radio->usrp->get_rx_freq(i);
    if (std::abs(radio->usrp->get_rx_freq(i) - freq) > MAX_PRECISION){
        std::cout << " ERR";
        success = false;
    }
    else{
        radio->freq_ = freq;
        std::cout << " OK";
    }
}
std::cout << "\n";
std::this_thread::sleep_for(std::chrono::milliseconds(110));
radio->usrp->clear_command_time();
return success;

}

Hi. We have developed a project using the USRP 2945 and UHD libraries to estimate a signal's direction of arrival. In this project, the four channels of the USRP 2945 are connected through a power splitter to a function generator, and the local oscillators in the back are connected following the user guides (LO OUT 1 IF 2 connected to LO IN 0 IF 2, and LO OUT 1 IF 1 connected to LO IN 0 IF 1). However, it seems that, when we tune some frequencies, 400 MHz for instance, we observe a huge decrease in power in channels 1 and 3 (50 dB). Taking into account that, by eliminating the set_command_time instruction in the setting tune frequency function, this problem disappears, we suspect that this may be caused by time synchronization. Although, if we do this, 90 and 180 degrees phase offsets start appearing when we tune several frequencies. Does anyone know what might be happening? I think the relevant code is below: Thank you for your time. Regards. // SDR configuration usrp->set_time_unknown_pps(uhd::time_spec_t()); usrp->set_rx_lo_export_enabled(true,uhd::usrp::multi_usrp::ALL_LOS,2); // 2 usrp->set_rx_lo_source("internal",uhd::usrp::multi_usrp::ALL_LOS,2); // 2 usrp->set_rx_lo_source("companion",uhd::usrp::multi_usrp::ALL_LOS,3); // 3 usrp->set_rx_lo_source("external",uhd::usrp::multi_usrp::ALL_LOS,0); // 0 usrp->set_rx_lo_source("external",uhd::usrp::multi_usrp::ALL_LOS,1); // 1 usrp->clear_command_time(); usrp->set_command_time(usrp->get_time_now()+uhd::time_spec_t(0.1)); uhd::tune_request_t tune_request(freq_); tune_request.dsp_freq_policy = uhd::tune_request_t::POLICY_MANUAL; for (int i = 0; i < CHANNELS; i++) { usrp->set_rx_rate(rate_, i); usrp->set_rx_freq(tune_request, i); usrp->set_rx_gain(gain_, i); usrp->set_rx_bandwidth(bandwidth_, i); } std::this_thread::sleep_for(std::chrono::milliseconds(110)); usrp->clear_command_time(); // A method to tune frequencies bool Acquirer_SDR::sdr_set_tune_frequency(usrp_2945* radio, float freq, int channels) { bool success = true; std::cout << "Setting tune frequency: " << freq << std::endl; radio->usrp->clear_command_time(); radio->usrp->set_command_time(radio->usrp->get_time_now()+uhd::time_spec_t(0.1)); uhd::tune_request_t tune(freq); tune.dsp_freq_policy = uhd::tune_request_t::POLICY_MANUAL; for (int i = 0; i < channels; ++i) { std::cout << " Ch" << i << " "; radio->usrp->set_rx_freq(tune, i); std::cout << radio->usrp->get_rx_freq(i); if (std::abs(radio->usrp->get_rx_freq(i) - freq) > MAX_PRECISION){ std::cout << " ERR"; success = false; } else{ radio->freq_ = freq; std::cout << " OK"; } } std::cout << "\n"; std::this_thread::sleep_for(std::chrono::milliseconds(110)); radio->usrp->clear_command_time(); return success; }