Page 1 of 1

SDRplay RSP1 gain control

Posted: Sun Jan 01, 2017 10:32 pm
by jpsa
I'm been trying to understand how gain control works when using SDR Console V3 with an SDRplay RSP1. I *think* the following is what's going on, but I'd welcome confirmation!

The RSP gain can be controlled in either 'normal' (mir_sdr_SetGr), or 'alternate' (mir_sdr_SetGrAltMode) mode[1]. The latter allows explicit (rather than automatic) control of whether the LNA is switched on. I deduce that SDR Console uses 'alternate' mode, from the fact that it offers explicit control over the LNA through its UI.

There are a couple of confusing factors here...

Firstly, the LNA in question is *not* that shown on the RSP's Conceptual Block Diagram[2], but rather is one of the several LNAs internal to the MSi001 device[3]. Which of these internal LNAs is used depends on the frequency band in use - I guess that probably accounts for the LNA component of the gain having a value which depends on the frequency band.

Secondly, the Automatic Gain Control Reference Note[4] only describes 'normal' mode. In 'alternate' mode the LNA is switched explicitly, rather than automatically, and the RSP API chooses a blend of just the mixer and baseband gains to make up the requested gain reduction, which is then applied *in addition* to any reduction due to switching off the LNA.

Have I got that right?

[1] http://www.sdrplay.com/docs/SDRplay_SDR ... cation.pdf
[2] http://www.sdrplay.com/docs/SDRplay_Con ... m_r1p1.pdf
[3] http://www.sdrplay.com/docs/SDRplay_RSP ... s_r2p3.pdf
[4] http://www.sdrplay.com/docs/SDRplay_AGC ... e_r2p2.pdf

Re: SDRplay RSP1 gain control

Posted: Tue Jan 03, 2017 10:23 am
by sdrplay
Yes apart from the LNA GR is "absorbed" in the IF GR when the LNA is switched on/off to avoid huge jumps in gain.

Best regards,

SDRplay Support

Re: SDRplay RSP1 gain control

Posted: Tue Jan 03, 2017 1:41 pm
by jpsa
Thank you! A couple of follow on questions, though...

I can't see the behaviour you describe in the SetGrAltMode gain reduction tables. Take a requested gain reduction of 50 dB in the 'up to band 4/5' table as an example: the table says I get a gain reduction of 74 dB with the LNA off, and 50 dB with it on, a jump of 24 dB. I don't see the LNA's GR being absorbed in either the BB or mixer. Am I misunderstanding this table? Or are you saying that this absorption is coded in SDR Console, rather than being intrinsic to the API/RSP1 ?

Secondly, now I look at the gain tables more closely, I'm puzzled that the total gain reduction sometimes exceeds the sum of the three component (BB, Mixer, LNA) GRs. This is the case in the 'up to band 4/5' table, for requested reductions of 1 dB to 18 dB, with the LNA on. For each of these, the total system GR is shown as 19 dB. Where does the 'missing' gain reduction come from?

Cheers,
John

Re: SDRplay RSP1 gain control

Posted: Tue Jan 03, 2017 2:26 pm
by F1BJB
Yes there is a strange thing with the LNA button on RSP1
It works definitely better with it on Long and Medium Wave .
That is rather unexpected but once you know it that is OK.
On VHF /UHF it improves SNR as expected.
On a crowded FM band it introduce intermodulation but that is normal too.

Re: SDRplay RSP1 gain control

Posted: Tue Jan 03, 2017 4:12 pm
by sdrplay
jpsa wrote:Thank you! A couple of follow on questions, though...

I can't see the behaviour you describe in the SetGrAltMode gain reduction tables. Take a requested gain reduction of 50 dB in the 'up to band 4/5' table as an example: the table says I get a gain reduction of 74 dB with the LNA off, and 50 dB with it on, a jump of 24 dB. I don't see the LNA's GR being absorbed in either the BB or mixer. Am I misunderstanding this table? Or are you saying that this absorption is coded in SDR Console, rather than being intrinsic to the API/RSP1 ?

Secondly, now I look at the gain tables more closely, I'm puzzled that the total gain reduction sometimes exceeds the sum of the three component (BB, Mixer, LNA) GRs. This is the case in the 'up to band 4/5' table, for requested reductions of 1 dB to 18 dB, with the LNA on. For each of these, the total system GR is shown as 19 dB. Where does the 'missing' gain reduction come from?

Cheers,
John
That's what we do - I can't speak for other SDR application authors.

The top 20dB of GR (0-19) aren't really applicable in most general SDR applications so we limit the normal IF GR range to 20-59 - the new API allows you to go beyond that if you need to for your specific software development.

Best regards,

SDRplay Support

Re: SDRplay RSP1 gain control

Posted: Tue Jan 03, 2017 7:44 pm
by jpsa
That's what we do - I can't speak for other SDR application authors.
Where 'we' means SDRuno, I assume?

Thanks again!

Re: SDRplay RSP1 gain control

Posted: Tue Jan 03, 2017 8:08 pm
by Tech_Support
Yes, but also in the API/ExtIO plugin.

Sincerely

SDRplay Tech_Support

Re: SDRplay RSP1 gain control

Posted: Tue Jan 03, 2017 10:50 pm
by jpsa
In that case I still don't understand what you're saying! Perhaps I'm being thick, but my reading of the API documentation and gain reduction tables says that if, for a band 1/2/3 frequency, I call SetGrAltMode(50,FALSE,...), I get

BB GR=50, Mixer GR=0, LNA GR=24 -> System GR=74

If I then turn the LNA on by calling SetGrAltMode(50,TRUE,...)

BB GR=50, Mixer GR=0, LNA GR=0 -> System GR=50

In what sense does the API implement '...the LNA GR is "absorbed" in the IF GR when the LNA is switched on/off to avoid huge jumps in gain.'?

Cheers,
John

[edit... see next post!]

Re: SDRplay RSP1 gain control

Posted: Tue Jan 03, 2017 11:18 pm
by jpsa
Oh... I've just read more carefully and realised the gRidx parameter is in-out. So when I make the second call

gRidx = 50
SetGrAltMode(&gRidx,TRUE,...)

what actually happens is that gRidx is returned as 74, and the resulting RSP setup is

BB GR=74, Mixer GR=0, LNA GR=0 -> System GR=74

I.e. the same System GR as before. Have I got it right now?

Cheers,
John