USRP Software Radio

cancel
Showing results for 
Search instead for 
Did you mean: 

Gain control in NI-USRP Simple Streaming project

Hello, 

 

Is it possible to control gain in dB in NI-USRP simple streaming project? 

I can't see it on the front panel of Rx Streaming (Host).vi. 

 

Regards, 

Ivan 

0 Kudos
Message 1 of 7
(3,915 Views)

Ivan,

 

I went through the subvis and found that based on your selection for Reference level will set your Gain. So, set your reference level a little about the max input power you expect, and that will set the gain.

 

Hope this helps!

0 Kudos
Message 2 of 7
(3,899 Views)

Thanks that certainly helps. I went down the hierarchy and noticed it myself. It seems to be done in Configure Signal (Common).vi. The value of Configure Signal Mode input is set to "Level". Then there is a library file called Calculate Gain Setting.vi. Unfortunately I can't open it so I still don't understand how the conversion from reference level to gain works. 

 

On the front panel of the top level VI, when I increase the reference level above zero there is no change on the power spectrum graph. 

When I go below zero the input signal stays the same but the noise floor starts dropping. It appears that until about reference level = -20 dBm 

the relation is linear but below -20 dBm it goes non-linear. So it's not clear to me how it works. The USRP that I am using (2944R) should have 37.5 dB of gain on the receive side. 

0 Kudos
Message 3 of 7
(3,895 Views)

You will want to set your reference level close to your signal to lower the noise floor. If you go too low that it will actually overload the ADC causing non-linearity to occur. This might be what you are seeing, but can you send me screenshots of what you are seeing so I might be able to get a better insight?

0 Kudos
Message 4 of 7
(3,889 Views)

Ok I think I understand now what the conversion from the reference level to the gain value is about.

The gain is set so that the expected maximum input level appears close to the top of the ADC scale.

In this way the ADC range is used efficiently. 

 

I would still prefer to be able to set the gain manually in this project even though that means I need

to understand better the hardware architecture of the USRP.  

0 Kudos
Message 5 of 7
(3,887 Views)

Yes, you are correct. And I believe you can manually set the gain with the configure gain.vi, or is this not working as expected with you?

0 Kudos
Message 6 of 7
(3,884 Views)

I haven't tried it yet. I still want to use it within Simple streaming project but without making too much mess of the original code. 

0 Kudos
Message 7 of 7
(3,879 Views)