trying to reduce dc offset with low if modes, api differences
-
- Posts: 9
- Joined: Wed Mar 15, 2017 7:39 pm
trying to reduce dc offset with low if modes, api differences
I'm currently developing sdrplay rsp2 code using the older version 2.13 API. I'm having some difficulties with the DC offset wiping out a narrow signal (with and without correction), so I'm trying to use low if modes to eliminate the offset. Alternatively, I could tune off from center but I'm trying the low IF modes first. There are four configurations that work with low IF mode according to the API docs:
I've tried the first three so far, here are average spectra saved from my code. Oddly I'm still getting the center dc spike, despite using mir_sdr_DCoffsetIQimbalanceControl(1, 1):
I would like to use the third mode, but I'm confused by the spike on the right. What is causing it? I see the same low if spike in HDSDR, which I believe uses the same v2 api via extio:
Oddly, it doesn't have any DC spike. I'm not sure if they're doing any extra tricks to eliminate the spike, such as subtracting the average I/Q from each sample.
In SDRUno, I'm not given as much control over the low if modes. I can only select "IF MODE: LIF", but not the sample rate which is fixed to 2 MSPS. I'm assuming this comes from the new V3 API which I have not yet explored.
So I guess I have two questions. Should I switch to the V3 API to get cleaner low IF mode output, and are there any other tricks for avoiding or eliminating DC offset?
I've tried the first three so far, here are average spectra saved from my code. Oddly I'm still getting the center dc spike, despite using mir_sdr_DCoffsetIQimbalanceControl(1, 1):
I would like to use the third mode, but I'm confused by the spike on the right. What is causing it? I see the same low if spike in HDSDR, which I believe uses the same v2 api via extio:
Oddly, it doesn't have any DC spike. I'm not sure if they're doing any extra tricks to eliminate the spike, such as subtracting the average I/Q from each sample.
In SDRUno, I'm not given as much control over the low if modes. I can only select "IF MODE: LIF", but not the sample rate which is fixed to 2 MSPS. I'm assuming this comes from the new V3 API which I have not yet explored.
So I guess I have two questions. Should I switch to the V3 API to get cleaner low IF mode output, and are there any other tricks for avoiding or eliminating DC offset?
Last edited by bobasaurus on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason
Reason: No reason
- Allen Jordan, NOAA software/electrical engineer
-
- Posts: 9
- Joined: Wed Mar 15, 2017 7:39 pm
Re: trying to reduce dc offset with low if modes, api differences
The SDRUno low if spectrum also has no DC spike:
Again, I don't know if this is due to the DC offset being removed during the FFT pre-processing, or if there is no DC offset spike because of the low IF mode.
Again, I don't know if this is due to the DC offset being removed during the FFT pre-processing, or if there is no DC offset spike because of the low IF mode.
Reason: No reason
- Allen Jordan, NOAA software/electrical engineer
Re: trying to reduce dc offset with low if modes, api differences
There is always a DC spike, the IF mode determines where the spike appears. In Zero IF mode, the DC spike is at the LO frequency (0 Hz offset). Software is used to remove the spike which can also remove any signal at the LO frequency (which is why you need to apply an offset between the LO and VFO frequencies in Zero IF mode for signals with the center carrier such as AM)
Low IF mode has a DC spike at the IF frequency - you can see in the 3rd image that the DC spike is at 450 kHz offset from the LO frequency.
The API 3.x works differently with Low IF mode - it's easier to use. An input sample rate of 6 MHz will deliver a 2 MHz final sample rate IQ stream with an IF of 1.62 MHz. Decimation can then be used if a lower final sample rate is required.
Hope that helps,
Best regards,
SDRplay Support
Low IF mode has a DC spike at the IF frequency - you can see in the 3rd image that the DC spike is at 450 kHz offset from the LO frequency.
The API 3.x works differently with Low IF mode - it's easier to use. An input sample rate of 6 MHz will deliver a 2 MHz final sample rate IQ stream with an IF of 1.62 MHz. Decimation can then be used if a lower final sample rate is required.
Hope that helps,
Best regards,
SDRplay Support
Reason: No reason
-
- Posts: 9
- Joined: Wed Mar 15, 2017 7:39 pm
Re: trying to reduce dc offset with low if modes, api differences
Thanks for the information, that explains the spike in the third spectrum... the smaller bandwidth of the first two spectra wasn't large enough to show this spike.
Any idea why I'm getting a narrow center spike on each one? This never shows up in commercial software, but I always see it when calculating average FFTs myself.
I'm intrigued by the new API, I might give it a try. I have to marshall the C calls into C# though, which is proving tricky for some of the new API enums and functions.
Any idea why I'm getting a narrow center spike on each one? This never shows up in commercial software, but I always see it when calculating average FFTs myself.
I'm intrigued by the new API, I might give it a try. I have to marshall the C calls into C# though, which is proving tricky for some of the new API enums and functions.
Reason: No reason
- Allen Jordan, NOAA software/electrical engineer
Re: trying to reduce dc offset with low if modes, api differences
In the IQ stream, the centre will be at the beginning of the data, so I would check that you have the right number of points, etc. - I would also try other frequencies to see if you get the same result.
Best regards,
SDRplay Support
Best regards,
SDRplay Support
Reason: No reason