[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] DBSRX coherent problem (Phase Noise)
From: |
tom_wgs |
Subject: |
Re: [Discuss-gnuradio] DBSRX coherent problem (Phase Noise) |
Date: |
Fri, 12 Nov 2010 11:23:31 -0800 (PST) |
Steven Clark-2 wrote:
>
>>
>> The second image shows the plot of the two real components of the same
>> 128
>> samples.
>> The phase shift is so large it is visible in the plot. I
>> I noticed that the tuned frequency is about 12 kHz off target, but this
>> is
>> within the expected spec. of the system.
>>
>>
>> http://old.nabble.com/file/p30200932/Real-RXa_Real_RXb.jpg
>>
>>
>>
> Can you copy and paste the section of code where you issue tuning commands
> to your daughtercards? This looks similar to something I was seeing
> earlier,
> with 2 WBX cards, which was due to a mistype in my tuning commands.
>
> -Steven
>
> below is a snippet of the code that sets up the usrp and the functions
> that set freq and gain.
>
> //snippet
>
> mux = 0x00003210;
> d_which = 0;
> fpga_filename="std_2rxhb_2tx_dig.rbf";
> d_usrp_s = usrp_make_source_s(d_which, d_decim,
> 2, mux, 0, 0, 0,
>
> fpga_filename.c_str());
> d_usrp_s->set_nchannels(2);
> d_spec = str_to_subdev("A:0");
> d_spec2 = str_to_subdev("B:0");
> d_subdev = d_usrp_s->selected_subdev(d_spec);
> d_subdev2 = d_usrp_s->selected_subdev(d_spec2);
>
> // Set Gain
> float gain_min = d_subdev->gain_min();
> float gain_max = d_subdev->gain_max();
> if(d_gain == -1) {
> d_gain = (gain_min + gain_max)/2.0;
> }
>
> // Set the USRP/dboard Gain
> usrp_phaser_gain(d_gain);
> // Set the USRP/dboard frequency
> usrp_phaser_tune(freq);
>
> d_my_gpio = wgs_gpio_make_stream_ss();
> connect(d_src, 0, d_my_gpio, 0);
>
>
>
> int usrp_phaser::usrp_phaser_tune( double freq)
> {
> usrp_tune_result r;
> bool ok;
> char tmp_str[256];
>
> ok = d_usrp_s->tune(0, d_subdev, freq, &r);
> if(!ok)
> {
> sprintf (tmp_str, "Could not set frequency for (%s).\n",
> d_subdev->side_and_name().c_str());
> printf("%s", tmp_str);
> return(1);
> }
> else
> {
> printf("Tune Results: DC-Freq=%g, DDC-Freq=%g,Residual=%g,
> Inverted+=%d\n",
> r.baseband_freq,r.dxc_freq,r.residual_freq,r.inverted);
> }
>
> // Set the USRP/dboard 2 frequency
> ok = d_usrp_s->tune(1, d_subdev2, freq, &r);
> if(!ok)
> {
> sprintf (tmp_str, "Could not set frequency for (%s).\n",
> d_subdev2->side_and_name().c_str());
> printf("%s", tmp_str);
> return(1);
> }
> else
> {
> printf("Tune Results: DC-Freq=%g, DDC-Freq=%g,Residual=%g,
> Inverted+=%d\n",
> r.baseband_freq,r.dxc_freq,r.residual_freq,r.inverted);
> }
> return(0);
> }
>
> int usrp_phaser::usrp_phaser_gain( int gain )
> {
> usrp_tune_result r;
> bool ok;
>
> // Set the USRP/dboard 1 gain
> ok = d_subdev->set_gain(gain);
> if(!ok)
> {
> sprintf (tmp_str, "Could not set gain (%d) for (%s).\n",
> gain, d_subdev->side_and_name().c_str());
> printf("%s", tmp_str);
> return(1);
> }
> else
> {
> printf("Gain A set to %d\n", gain);
> }
>
> // Set the USRP/dboard 2 gain
> ok = d_subdev2->set_gain(gain);
> if(!ok)
> {
> sprintf (tmp_str, "Could not set gain (%d) for (%s).\n",
> gain, d_subdev2->side_and_name().c_str());
> printf("%s", tmp_str);
> return(1);
> }
> else
> {
> printf("Gain B set to %d\n", gain);
> }
> return(0);
> }
>
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
>
--
View this message in context:
http://old.nabble.com/DBSRX-coherent-problem-%28Phase-Noise%29-tp30200932p30202545.html
Sent from the GnuRadio mailing list archive at Nabble.com.