Using SDR# to drive the SDRplay RSP

Post information or questions regarding SDRplay products here
CaptainNemo
Posts: 146
Joined: Mon Jan 05, 2015 1:22 pm
Location: Genoa - Italy

Re: Using SDR# to drive the SDRplay RSP

to do wrong to none -- "Shannon" I meant "Nyquist-Shannon"

jon
Posts: 369
Joined: Tue Jan 06, 2015 10:48 am

Re: Using SDR# to drive the SDRplay RSP

we'll get back to you soon

TyTanYGraig
Posts: 14
Joined: Wed Jan 07, 2015 1:58 pm

Re: Using SDR# to drive the SDRplay RSP

Hi CaptainNemo and all, let me give you my inputs on these questions:

>>>Q:
When should I use IF mode greater than zero? Can you tell something about?

In Zero IF mode, you will tend to be more vulnerable to any residual DC offsets and possibly flicker noise. You will always have some level of DC offset in zero IF mode and if there is a slight frequency error, this might become audible as a SSB tone. Some programmes such as SDR# have algorithms to remove the DC offset and in my understanding this is done simply by 'averaging' the signal in I and Q over a fairly long period of time to estimate the level of DC and then subtracting this estimated level. This process is equivalent to a 'high pass filter and as such, it puts a small 'hole' in the spectrum. The size of hole depends on how long the averaging is done for, but if it is say 1 second, then you will have roughly 1 Hz wide 'hole' in the spectrum. The longer the averaging time, the smaller the hole, but the more memory the correction algorithm requires.

The big advantage of Zero IF mode is that there is no image problem unlike when you use an IF, where there will always be some level of image response. If you have a strong interferer at the image frequency, then this might be a problem, but you can always switch to a different IF frequency, which puts the image at a different frequency. Of course in any IF mode, really should use a filter bandwidth << 2x the IF frequency. So I would not recommend using 8 MHz bandwidth setting with a 450 KHz or the band-pass response will give no rejection of the DC offset and this will appear as a CW interferer at an offset equal to the IF frequency from your wanted signal.

I personally prefer to stick to Zero IF mode and I have not personally found either DC offsets or flicker noise to be a problem with the RSP. Indeed, I have not really been able to detect and noticeable levels of flicker noise whatsoever. If you are concerned about either DC offsets or 1/f noise, then use one of the supported IF modes.

What are the relationships of this option with the ACG option in SDR#?
Which is the best setting for this two "ACG" checkboxes?

I understand from SDRplay ACG documentation:
let's assume HF (3-30MHz)
LNA GR 0 or 19dB - MIX GR 0 or 24dB - IF GR 0 to 59dB
overall GR range 0 - 102dB
if I set "LNA GR Threshold" to 0 LNA will be always OFF
if I set "LNA GR Threshold" to 102 LNA will be always ON
Right?

Practically speaking, you are correct, although I cannot seem to set a LNA GR threshold of > 100 and I am not sure why. I suspect that this does not matter in reality as you cannot have a GR value of greater than 83 dB without the LNA gain being turned down. I believe in HF mode that the LNA gain steps are in fact 6 dB and so as long as the LNA GR Threshold is > 96, then the LNA will always be at maximum gain.

> Q:
Suppose I set IF bw 1.5MHz and SR 1.5MHz.
According to "Shannon" SR should be 2xBW. I suppose this means the SR is
1.5 on I channel and 1.5 on Q channel so Shannon is "OK". Right?
Then suppose I set IF bw 1.5MHz and SR 3.0MHz. What difference should I notice
on my FFT? And what if I double again, SR = 6.0MHz and again to SR 12.0?

If you are in Zero IF mode, then 1.5 MHz bandwidth is 750 KHz in I and Q and so a SR of 1.5 MHz does NOT breach the Nyquist criterion. If you are using an IF of say 2.048 MHz, then it will as the upper corner frequency of the filter will at (2.048 + 0.75) MHz and so you would need a minimum sample rate 5.596 MHz to avoid serious alaising.

It is important to realise that the IF bandwidth refers to the 'corner frequency' of the IF filter and as such there will still be noise and signal above this corner frequency. So even sampling at 2x the corner frequency, you risk aliasing from noise and interferers. For example, if you set the filter to 1.5 MHz (750 KHz low pass in I and Q) and have a strong interferer at 0.8 MHz from the centre of your spectrum, the filter will only provide a small level of rejection of this signal and what is left will alias into the filter bandwidth as a result of the sampling process. The filter is a 5th order Chebyschev response, so it does roll very sharply. So for example, if you increase the sample rate to say 3 MHz, then the Nyquist frequency is now 1.5 MHz away from the centre of your spectrum and so there will be no alaising for anything below this. The filter will now be giving a lot of rejection at this frequency and so you will me MUCH less vulnerable to aliasing degrading the signal that you are trying to monitor.

The level I see on the SDR# FFT is a "power"? In other words the FFT is a plot
of power as function of frequency?
So, let say "Setpoint" is -15, means when somewhere in the FFT display
a signal reach -15dbfs this trigger sdrplay's ACG?

I am not too sure about the SDR# display, but power relates to RMS voltage and not peak. The peak signal will be greater than this. So for example, with an OFDM signal such as DAB, the ratio between peak and RMS is around 10 dB. If you have many different signals, the peak to average ratio of the composite signal could be quite high. If you set the setpoint to -15dBfs, then this simply means that the total RMS voltage will be 15 dB below the ADC full scale. Peak signals could be close to full scale, but that might not occur every often as the true peaks only occur when all of the signals are momentarily at their peak voltage. It's a bit like 'all of the planets lining up'

CaptainNemo
Posts: 146
Joined: Mon Jan 05, 2015 1:22 pm
Location: Genoa - Italy

Re: Using SDR# to drive the SDRplay RSP

Thank you TyTanYGraig.
Your answer is very detailed and I will study it carefully in the w.e.
Bye

CaptainNemo
Posts: 146
Joined: Mon Jan 05, 2015 1:22 pm
Location: Genoa - Italy

Re: Using SDR# to drive the SDRplay RSP

Thanks in advance to all can contribute...

Is time for a little polemic... This kind of technical discussion are very important for us "user" to grow
in the understanding of SDRplay. This theoric "side" of the hobby is even more important (here starts the little polemic) since
it is the only way to do experiments... actually if you try to experiment different parameter setting with sdrplay + sdrplay plugin v1.3
for sd# you often find yourself in a "loop" of programs error and the last resource is to re-install everything...
I was trying to set the LNA GR threshold (as suggested in this forum) and even if I clic [load default] I can't rid of
a mir_sdr_init error (mir_sdr_aliasingerror).

Forgive me... I know, I'm only an old grouch...

CaptainNemo
Posts: 146
Joined: Mon Jan 05, 2015 1:22 pm
Location: Genoa - Italy

Re: Using SDR# to drive the SDRplay RSP

I spent a couple of hours experimenting various settings.
Now I can understand some of the things TyTanYGraig wrote in his post.

I'm rather frustrated and a little tired since changing parameter (even 1 step at time) lead sooner or later to a program error...
and also to strange (not expected) behaviours...
I ask sdrplay team to review and carefully test the plugin before releasing the next version

Now, some detail about my test.

I set Enable tuner AGC to yes (check) and play with setpoint.
After TyTanYGraig enlighting the behaviour is clear enough (Great! TNX!)
Maybe a proper name could be "AGC ADC setpoint", but it's a matter of opinion.

LNA GR Threshold =======================================
I set Enable tuner AGC to no (uncheck) since I want manually and gradually see what happen
(I suppose the behaviour is the same with Enable tuner AGC YES).
Some basic point. GR ranges from 0 to 102. LNA GR thrsld 0 to 100(?!? see below).
I started with LNA GR = 45 and GR=40 ===>>> LNA on - MIX on - IF GR 40
Raising the GR untill I reach 44 ===>>> LNA on - MIX on - IF GR 44
then GR 45 ===>>> LNA off (24dB) - MIX on - IF GR 21
Clear. TNX TyTanYGraig

Now set LNA GR T =59 as suggested and same expected behaviour.
GR 45 ===>>> LNA on - MIX on - IF GR 45
GR 58 ===>>> LNA on - MIX on - IF GR 58
GR 59 ===>>> LNA off (24dB) - MIX on - IF GR 35
GR 82 ===>>> LNA off (24dB) - MIX on - IF GR 58
GR 83 ===>>> LNA off (24dB) - MIX off (19dB) - IF GR 40

Now set LNA GR T =75 (it is allowed)
Raise GR till 63 ===>>> LNA on - MIX on - IF GR 63
GR = 64 ===>>> LNA on - MIX on - IF GR 64 but the audio jump to high level (so the display)
until you reach
GR 75 ===>>> LNA off (24dB) - MIX on - IF GR 51 (now the audio jump down to expected level)
and then
GR 83 ===>>> LNA off (24dB) - MIX off (19dB) - IF GR 40 all right.

I suppose it is better to limit LNA GR Thrsld to 59 to avoid this strange behaviour.
----------------------------------

If someone want to try, just a suggestion,
change in GR (manual or auto) algorythm will test what is the LNA GR Threshold before turn on/off LNA
(not vice-versa as far I can see in manual mode: If gain reduction has turned off LNA, and then you raise LNA Thr, this will not turn on LNA). So set LNA GR T first and then work on GR.

BYE.

jon
Posts: 369
Joined: Tue Jan 06, 2015 10:48 am

Re: Using SDR# to drive the SDRplay RSP

Hi Captain Nemo, the SDRplay team are taking note...your inputs and other emails on related topics are very useful. We aim for a release in early March - sorry it seems to take so long but we will get there.

TyTanYGraig
Posts: 14
Joined: Wed Jan 07, 2015 1:58 pm

Re: Using SDR# to drive the SDRplay RSP

Hi Captain Nemo,

Now set LNA GR T =75 (it is allowed)
Raise GR till 63 ===>>> LNA on - MIX on - IF GR 63
GR = 64 ===>>> LNA on - MIX on - IF GR 64 but the audio jump to high level (so the display)
until you reach
GR 75 ===>>> LNA off (24dB) - MIX on - IF GR 51 (now the audio jump down to expected level)
and then
GR 83 ===>>> LNA off (24dB) - MIX off (19dB) - IF GR 40 all right.

I suppose it is better to limit LNA GR Thrsld to 59 to avoid this strange behaviour.

This sounds like a bug to me. I believe the maximum IF gain reduction that is possible is 59 dB. It seems as though either the plugin or the API will not allow the mixer gain to be reduced until the LNA gain has already been reduced. If you set the LNA GR Threshold to greater than 59 dB, one the total gain setting goes above 59 dB, the S/W tries to set the IF gain to an impossible level (59 dB is the maximum - I read it somewhere).

Let's see what the SDRplay team come back with on this.

CaptainNemo
Posts: 146
Joined: Mon Jan 05, 2015 1:22 pm
Location: Genoa - Italy

Re: Using SDR# to drive the SDRplay RSP

Tnx Jon, tnx TyTanYGraig, and all the contributor to this forum.
I believe Jon and sdrplay team want to get the maximum from this young product. We are well positioned for that.

Please take note also of this. Sometime (not always) the relationship of IF BW dropdownlist values and SR dropdownlist values is strange.
I mean, if I set IF BW = 200khz (IF MODE ZERO), sometimes the SR allows values down to 800khz and sometime not.

So, IN GENERAL, for the next release of SDR# plugin
a--bug fixing: please review and test all the dropdown values and their relationships, verify that [Load Default] will load default for all parameter
so that it will be a "lifeline"; possibly, don't allow a GUI setting to crash the program.
b--important enhancements:
-- -- as discussed before take care of scaling the bw (at the filter "corner") to the available space on fft display (according to me a new, independend Scaling parameter, saved along other pluging parm, will be the best)
c--nice to have
-- -- add an option to minimize the plugin showing only the values, not the schematic
d-- despite me being insistent... take your time!
bye

sdrplay
Posts: 808
Joined: Wed Jan 07, 2015 7:58 am

Re: Using SDR# to drive the SDRplay RSP

Hi CaptainNemo,

Thanks for your info on the LNA threshold. We will be updating the API in light of this and we'll also study your other recommendations.

Best regards,

SDRplay