usrp-users@lists.ettus.com

Discussion and technical support related to USRP, UHD, RFNoC

View all threads

how to use set_rx_agc in .py file

E
Ekko
Wed, May 25, 2016 4:45 PM

hello all
i want to enable the agc function of B210,and i see the
http://files.ettus.com/manual/classuhd_1_1usrp_1_1multi__usrp.html#abdab1f6c3775a9071b15c9805f866486

and i want to use this in tunnel.py ,but there is no way to accomplish this,
ao i want to ask is ther another way to enable agc in .py file

thank you

--Ekko

hello all i want to enable the agc function of B210,and i see the http://files.ettus.com/manual/classuhd_1_1usrp_1_1multi__usrp.html#abdab1f6c3775a9071b15c9805f866486 and i want to use this in tunnel.py ,but there is no way to accomplish this, ao i want to ask is ther another way to enable agc in .py file thank you --Ekko
MM
Marcus Müller
Wed, May 25, 2016 5:25 PM

Dear Ekko,

Indeed, GNU Radio's gr-uhd doesn't currently expose the set_rx_agc
functionality.
So, without modification of GNU Radio, this is not possible so far.

Another question: are you sure you want to use AGC with tunnel.py?

Two things:

  • I think it's time we started to move away from tunnel.py, especially
    from the OFDM tunnel.py. It's bad, especially compared to the OFDM
    examples rx_ofdm.grc and tx_ofdm.grc. Attaching a UDP source/sink to
    those examples and using these much better OFDM implementations is
    absolutely what you want to do. I don't think GNU Radio will have
    tunnel.py for a long time. To put this more extremely: In my private
    opinion, tunnel.py should not be used, under no circumstances, anymore.
  • AGC with bursts must go wrong, unless you know very well how the
    attack time of the AGC and the bursts relate, and incorporate an AGC
    gain ramp-down compensation into your receiver structure. This might
    be possible with the channel state estimators in the more modern
    examples I mentioned above, but it would still mean a considerable
    effort. It's really impossible to use tunnel.py with AGCs – there's
    no way to react to changing amplitude in the middle of a packet. And
    exactly that is what's happening when you use AGC
  • an "untamed" AGC in cooperation with OFDM will also be a bad idea –
    see PAPR considerations. That's one of the reasons why an OFDM
    receiver is challenging hardware-wise: you'll need quite some
    dynamic range, for the signal itself. Now, either you have a fast
    AGC, that reacts already within the beginning of a cyclic prefix,
    but that would then necessarily lead to a multiplication with the
    fast control loop step response in time domain (== strong variation
    of distortion in the post-FFT OFDM symbol), which will lead to an
    ugly channel state distortion, not to mention that you'll also
    increase the likelihood of nonlinearity/clipping in an extreme PAPR
    case, and will make the equalizer work much worse, or you've got a
    slow AGC that only kicks in after a significant part of the first
    OFDM symbol of a frame has been received and is strongly limited in
    maximum gain, which is not much better than having a software-side
    feedback loop. In fact, for USRPs that support gain-setting via
    timed commands, the software-side feedback loop could just adjust
    the gain in time for the Nth OFDM symbol, so that you don't change
    gain in the middle of a symbol. That'll make it possible that the
    channel estimate done on the early part of the OFDM symbol is valid
    throughout the symbol.

Best regards,
Marcus
On 25.05.2016 18:45, Ekko via USRP-users wrote:

hello all
i want to enable the agc function of B210,and i see the
http://files.ettus.com/manual/classuhd_1_1usrp_1_1multi__usrp.html#abdab1f6c3775a9071b15c9805f866486

and i want to use this in tunnel.py ,but there is no way to accomplish
this,
ao i want to ask is ther another way to enable agc in .py file

thank you

--Ekko


USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

Dear Ekko, Indeed, GNU Radio's gr-uhd doesn't currently expose the set_rx_agc functionality. So, without modification of GNU Radio, this is not possible so far. Another question: are you *sure* you want to use AGC with tunnel.py? Two things: * I think it's time we started to move away from tunnel.py, especially from the OFDM tunnel.py. It's bad, especially compared to the OFDM examples rx_ofdm.grc and tx_ofdm.grc. Attaching a UDP source/sink to those examples and using these much better OFDM implementations is absolutely what you want to do. I don't think GNU Radio will have tunnel.py for a long time. To put this more extremely: In my private opinion, tunnel.py should not be used, under no circumstances, anymore. * AGC with bursts must go wrong, unless you know *very* well how the attack time of the AGC and the bursts relate, and incorporate an AGC gain ramp-down compensation into your receiver structure. This might be possible with the channel state estimators in the more modern examples I mentioned above, but it would still mean a considerable effort. It's really impossible to use tunnel.py with AGCs – there's no way to react to changing amplitude in the middle of a packet. And exactly that is what's happening when you use AGC * an "untamed" AGC in cooperation with OFDM will also be a bad idea – see PAPR considerations. That's one of the reasons why an OFDM receiver is challenging hardware-wise: you'll need quite some dynamic range, for the signal itself. Now, either you have a fast AGC, that reacts already within the beginning of a cyclic prefix, but that would then necessarily lead to a multiplication with the fast control loop step response in time domain (== strong variation of distortion in the post-FFT OFDM symbol), which will lead to an ugly channel state distortion, not to mention that you'll also increase the likelihood of nonlinearity/clipping in an extreme PAPR case, and will make the equalizer work much worse, or you've got a slow AGC that only kicks in after a significant part of the first OFDM symbol of a frame has been received and is strongly limited in maximum gain, which is not much better than having a software-side feedback loop. In fact, for USRPs that support gain-setting via timed commands, the software-side feedback loop could just adjust the gain in time for the Nth OFDM symbol, so that you don't change gain in the middle of a symbol. That'll make it possible that the channel estimate done on the early part of the OFDM symbol is valid throughout the symbol. Best regards, Marcus On 25.05.2016 18:45, Ekko via USRP-users wrote: > hello all > i want to enable the agc function of B210,and i see the > http://files.ettus.com/manual/classuhd_1_1usrp_1_1multi__usrp.html#abdab1f6c3775a9071b15c9805f866486 > > and i want to use this in tunnel.py ,but there is no way to accomplish > this, > ao i want to ask is ther another way to enable agc in .py file > > > > > thank you > > --Ekko > > > _______________________________________________ > USRP-users mailing list > USRP-users@lists.ettus.com > http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com