Discussion:
Maximum sampling frequency questions.
Malcolm Robb
2014-09-10 22:50:18 UTC
Permalink
Hu,
I'm currently sampling a 2Mhz digital data stream at 2MHz, so obviously I'm suffering quite badly from Nyquist issues. Ideally I'd like to sample at either 4Mhz, or better still 8Mhz. I understand that theoretically I can set the dongle to sample at 3.2Mhz, but that data loss is virtually inevitable. The highest reliable sample rate is 2.4Mhz. So my questions are:

1) What is the cause of the data loss? - is it in the dongle, or in the PC chipset, or in the PC driver/DLL software?

2) Has anyone tried increasing the crystal frequency in the dongle - i.e. overclocking it? Suppose I change the 28.8Mhz for a (28.8 * (4.0 / 2.4)) = 48Mhz one, will that allow me to sample at 4Mhz by using the settings for 3.4Mhz? Obviously there in no gaurantee that the RTL2832 will work at all if you overclock by too much.

Cheers
Malcolm
Kevin Reid
2014-09-10 23:26:41 UTC
Permalink
On Sep 10, 2014, at 15:50, Malcolm Robb <***@btconnect.com> wrote:

> I'm currently sampling a 2Mhz digital data stream at 2MHz, so obviously I'm suffering quite badly from Nyquist issues. Ideally I'd like to sample at either 4Mhz, or better still 8Mhz. I understand that theoretically I can set the [RTL2832] dongle to sample at 3.2Mhz, but that data loss is virtually inevitable.

The RTL2832 gives you *complex* (I/Q) samples. This does not exactly change the Nyquist limit of 1 MHz (for a 2 MHz sample rate), but it makes it be *plus or minus* 1 MHz, or 2 MHz in total.

If you have a digital radio signal which occupies 2 MHz of bandwidth, you *should* be able to receive it with a RTL dongle, given that:
- the signal is strong enough
- you are using the 2.4 MHz sample rate, not 2.0 (filters aren't perfect, especially not these ones, so you need some margin above Nyquist)
- there is no DC offset (i.e. not E4000 tuner), or you have corrected it, or it doesn't matter for the modulation in question

Perhaps you could tell us more about what signal you're trying to receive, and what software you're currently using?

(I don't have any answers for the other questions in your message.)

--
Kevin Reid <http://switchb.org/kpreid/>
Malcolm Robb
2014-09-11 08:33:13 UTC
Permalink
It's ADSB/ModeS. I'm partly responsible for dump1090. The 'bit rate' is 2Mhz, and the RF center is 1090Mhz.

There are several issues with the current sampling at 2Mhz, the main ones being....
1) The Bandwidth is +/- 1Mhz, but some aircraft are a long way off the center 1090 Mhz frequency so are missed because they are out of band. A higher sampling frequency results in a wider bandwidth so would pull in more signals.
2) Nyquist means that you get nasty beating effects as signals drift in and out of phase with the sampling clock.

I had considered sampling at 3Mhz which would help both the above, but the loss of samples would be the deal breaker. At 2.4Mhz, the maths is a bit nasty for not a lot of improvement. The cheap and easy solution would be to change the crystal to a faster one, if the RTL chip can stand the over clocking. If the data loss is at the PC end, then this is unlikely to help. However, if the data loss is at the dongle end, then overclocking should linearly increase all the 2.4Mhz parameters without data loss, again assuming the RTL chip can take the overclocking.

Cheers
Malcolm
________________________________________
From: Kevin Reid [***@gmail.com] on behalf of Kevin Reid [***@switchb.org]
Sent: 11 September 2014 00:26
To: Malcolm Robb
Cc: osmocom-***@lists.osmocom.org
Subject: Re: Maximum sampling frequency questions.

On Sep 10, 2014, at 15:50, Malcolm Robb <***@btconnect.com> wrote:

> I'm currently sampling a 2Mhz digital data stream at 2MHz, so obviously I'm suffering quite badly from Nyquist issues. Ideally I'd like to sample at either 4Mhz, or better still 8Mhz. I understand that theoretically I can set the [RTL2832] dongle to sample at 3.2Mhz, but that data loss is virtually inevitable.

The RTL2832 gives you *complex* (I/Q) samples. This does not exactly change the Nyquist limit of 1 MHz (for a 2 MHz sample rate), but it makes it be *plus or minus* 1 MHz, or 2 MHz in total.

If you have a digital radio signal which occupies 2 MHz of bandwidth, you *should* be able to receive it with a RTL dongle, given that:
- the signal is strong enough
- you are using the 2.4 MHz sample rate, not 2.0 (filters aren't perfect, especially not these ones, so you need some margin above Nyquist)
- there is no DC offset (i.e. not E4000 tuner), or you have corrected it, or it doesn't matter for the modulation in question

Perhaps you could tell us more about what signal you're trying to receive, and what software you're currently using?

(I don't have any answers for the other questions in your message.)

--
Kevin Reid <http://switchb.org/kpreid/>
Adam Nielsen
2014-09-11 09:35:43 UTC
Permalink
> The Bandwidth is +/- 1Mhz, but some aircraft are a
> long way off the center 1090 Mhz frequency so are missed because they
> are out of band. A higher sampling frequency results in a wider
> bandwidth so would pull in more signals.

Not really what you're after, but would running two or even three
dongles off-centre allow you to pick up everything?

Cheers,
Adam.
Kevin Reid
2014-09-11 14:17:52 UTC
Permalink
On Sep 11, 2014, at 1:33, Malcolm Robb <***@btconnect.com> wrote:

> It's ADSB/ModeS. I'm partly responsible for dump1090. The 'bit rate' is 2Mhz, and the RF center is 1090Mhz.
>
> There are several issues with the current sampling at 2Mhz, the main ones being....
> 1) The Bandwidth is +/- 1Mhz, but some aircraft are a long way off the center 1090 Mhz frequency so are missed because they are out of band. A higher sampling frequency results in a wider bandwidth so would pull in more signals.
> 2) Nyquist means that you get nasty beating effects as signals drift in and out of phase with the sampling clock.
>
> I had considered sampling at 3Mhz which would help both the above, but the loss of samples would be the deal breaker. At 2.4Mhz, the maths is a bit nasty for not a lot of improvement.

I'm pretty sure that the proper solution to both of these problems you list (beating and conversion from 2.4MHz) is to use an algorithm designed to to recover the original bit-clock. Unfortunately, I haven't myself got the knowledge of digital (de)modulation techniques to be more concrete, but I know standard such algorithms exist and don't require the input sample rate to exactly match the bit rate.

> The cheap and easy solution would be to change the crystal to a faster one, if the RTL chip can stand the over clocking.

Easy as a one-off, but then every potential user would have to modify their device.

--
Kevin Reid <http://switchb.org/kpreid/>
Jay Salsburg
2014-09-12 06:44:29 UTC
Permalink
Reclocking a Dongle would lead to some problems. The RTL-SDR Libraries are
based on the Command and Control parameters programmed in the Dongle's
EEPROM. If someone with the Time and Instruments to do this would share
these new changes (unless it has been done already), it would probably lead
to new discoveries. The RTL2832U chip is not that well documented, at least
as far as I know, so to get the Dongle to behave predictably, the Dongle's
EEPROM would need re-flashing with new Firmware. Tunability higher in
frequency is probably not as attractive as Tunability down into the Short
Wave. The digital filters in the tuner are probably not designed to be
shifted up or down however.

Go to this page for a solution to decoding ADSB, the Certificate for this
site is broken so be aggressive and plow through the warnings.
https://www.cgran.org/wiki/gr-air-modes


Jay Salsburg

-----Original Message-----
From: osmocom-sdr-***@lists.osmocom.org
[mailto:osmocom-sdr-***@lists.osmocom.org] On Behalf Of Kevin Reid
Sent: Thursday, September 11, 2014 9:18 AM
To: Malcolm Robb
Cc: osmocom-***@lists.osmocom.org
Subject: Re: Maximum sampling frequency questions.

On Sep 11, 2014, at 1:33, Malcolm Robb <***@btconnect.com> wrote:

> It's ADSB/ModeS. I'm partly responsible for dump1090. The 'bit rate' is
2Mhz, and the RF center is 1090Mhz.
>
> There are several issues with the current sampling at 2Mhz, the main ones
being....
> 1) The Bandwidth is +/- 1Mhz, but some aircraft are a long way off the
center 1090 Mhz frequency so are missed because they are out of band. A
higher sampling frequency results in a wider bandwidth so would pull in more
signals.
> 2) Nyquist means that you get nasty beating effects as signals drift in
and out of phase with the sampling clock.
>
> I had considered sampling at 3Mhz which would help both the above, but the
loss of samples would be the deal breaker. At 2.4Mhz, the maths is a bit
nasty for not a lot of improvement.

I'm pretty sure that the proper solution to both of these problems you list
(beating and conversion from 2.4MHz) is to use an algorithm designed to to
recover the original bit-clock. Unfortunately, I haven't myself got the
knowledge of digital (de)modulation techniques to be more concrete, but I
know standard such algorithms exist and don't require the input sample rate
to exactly match the bit rate.

> The cheap and easy solution would be to change the crystal to a faster
one, if the RTL chip can stand the over clocking.

Easy as a one-off, but then every potential user would have to modify their
device.

--
Kevin Reid <http://switchb.org/kpreid/>


-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3485 / Virus Database: 4015/8198 - Release Date: 09/11/14
Salvatore Sanfilippo
2014-09-12 07:26:53 UTC
Permalink
Malcolm Robb
2014-09-12 08:50:10 UTC
Permalink
Salvatore,
I have tried that, and it doesn't work very well whilst sampling at 2 Mhz because the bit rate is also 2 Mhz. You can't even reliably correct for phase based on the pre-amble, because it's 10100001010000. If you're spot on in phase, the 0's are analogue values ranging from 0 to limit, and the 1's are limit to +127. Limit depends on the signal strength, and is usually set to around 1/3rd average peak amplitude. If you happen to be exactly 90 degrees out in the sampling, the 1''s smear equally across two adjacent sample periods, so you get 11110001111000, where the 1's are half the true peak amplitude. If you sample exactly in phase then you get good signal level difference between the 0's and 1's. As the phase drifts the difference between a 1 and a 0 drops. Since you have to have a level detector somewhere to decide between a 0 and 1, at some point/phase the difference between a 0 and a 1 becomes indistinguishable. The stronger the signal, then the further off phase you can recover it, but there will always be a proportion of signals that cannot be - and I estimate that to be 30% at my location.

Sampling at 2.4Mhz does make things better, but at the expense of a lot of maths to recover the data bits.4Mhz would make the maths much easier. Plus as explained, the spec says 1090 +/- 3Mhz so really we want (at least) 6Mhz of bandwidth to be reasonably sure of squeezing out every last frame from the ether.6Mhz bandwidth means 12Mhz sample rate.

I did some tests last night, and you can set the dongle to 4Mhz sample rate if you tweak the RTLSDR source code (remove the checks for MAX_SAMPLE_RATE). I ran RTL_TEST, and it does drop data and a lot of it, so I'm going to investigate how/why/where data is dropped (at 3.2Mhz) next. I'm also going to try a different crystal in my dongle, but I suspect this will stop the USB working unless I can figure out how the USB clock is derived from the crystal. I hope that's a parameter in the EEPROM.
Cheers
Malcolm
________________________________________
From: Salvatore Sanfilippo [***@gmail.com]
Sent: 12 September 2014 08:26
To: Malcolm Robb
Cc: Kevin Reid; osmocom-***@lists.osmocom.org
Subject: Re: Maximum sampling frequency questions.

Hello Malcolm Robb,

currently I'm not actively working with dump1090 for lack of time (but
I fixed some network issues lately, that I think you already merged),
however what I was "about" to do when I was actively developing it,
was to compensate for the out of phase issue using the preamble levels
in order to estimate the phase shift and apply a correction. Because
the preamble is known, you can check what is the percentage of signal
that is mixed in the next sample, and because the preamble at some
point contains a large "silence" space, you can also estimate the
noise level more or less. All this together should allow you to
improve considerably the reception of out of phase signals.

Soon or later I'll try to do this if nobody does it before me, time permitting.

Cheers,
Salvatore

On Thu, Sep 11, 2014 at 10:33 AM, Malcolm Robb
<***@btconnect.com> wrote:
> It's ADSB/ModeS. I'm partly responsible for dump1090. The 'bit rate' is 2Mhz, and the RF center is 1090Mhz.
>
> There are several issues with the current sampling at 2Mhz, the main ones being....
> 1) The Bandwidth is +/- 1Mhz, but some aircraft are a long way off the center 1090 Mhz frequency so are missed because they are out of band. A higher sampling frequency results in a wider bandwidth so would pull in more signals.
> 2) Nyquist means that you get nasty beating effects as signals drift in and out of phase with the sampling clock.
>
> I had considered sampling at 3Mhz which would help both the above, but the loss of samples would be the deal breaker. At 2.4Mhz, the maths is a bit nasty for not a lot of improvement. The cheap and easy solution would be to change the crystal to a faster one, if the RTL chip can stand the over clocking. If the data loss is at the PC end, then this is unlikely to help. However, if the data loss is at the dongle end, then overclocking should linearly increase all the 2.4Mhz parameters without data loss, again assuming the RTL chip can take the overclocking.
>
> Cheers
> Malcolm
> ________________________________________
> From: Kevin Reid [***@gmail.com] on behalf of Kevin Reid [***@switchb.org]
> Sent: 11 September 2014 00:26
> To: Malcolm Robb
> Cc: osmocom-***@lists.osmocom.org
> Subject: Re: Maximum sampling frequency questions.
>
> On Sep 10, 2014, at 15:50, Malcolm Robb <***@btconnect.com> wrote:
>
>> I'm currently sampling a 2Mhz digital data stream at 2MHz, so obviously I'm suffering quite badly from Nyquist issues. Ideally I'd like to sample at either 4Mhz, or better still 8Mhz. I understand that theoretically I can set the [RTL2832] dongle to sample at 3.2Mhz, but that data loss is virtually inevitable.
>
> The RTL2832 gives you *complex* (I/Q) samples. This does not exactly change the Nyquist limit of 1 MHz (for a 2 MHz sample rate), but it makes it be *plus or minus* 1 MHz, or 2 MHz in total.
>
> If you have a digital radio signal which occupies 2 MHz of bandwidth, you *should* be able to receive it with a RTL dongle, given that:
> - the signal is strong enough
> - you are using the 2.4 MHz sample rate, not 2.0 (filters aren't perfect, especially not these ones, so you need some margin above Nyquist)
> - there is no DC offset (i.e. not E4000 tuner), or you have corrected it, or it doesn't matter for the modulation in question
>
> Perhaps you could tell us more about what signal you're trying to receive, and what software you're currently using?
>
> (I don't have any answers for the other questions in your message.)
>
> --
> Kevin Reid <http://switchb.org/kpreid/>
>
>



--
Salvatore 'antirez' Sanfilippo
open source developer - GoPivotal
http://invece.org

"One would never undertake such a thing if one were not driven on by
some demon whom one can neither resist nor understand."
— George Orwell
Salvatore Sanfilippo
2014-09-12 09:05:04 UTC
Permalink
On Fri, Sep 12, 2014 at 10:50 AM, Malcolm Robb
<***@btconnect.com> wrote:
> The stronger the signal, then the further off phase you can recover it, but there will always be a proportion of signals that cannot be - and I estimate that to be 30% at my location.

I agree with that, but currently dump1090, at least my code tree
(maybe you already improved your), is not able to take advantage of
corrections that are a lot simpler than the nearly-90 degrees out of
phase issue.
So at least doing this there is some margin for improvements...
About 2.4 Mhz, really it is a shame to waste a lot of CPU if the
improvement is small, a good thing about the current implementation is
that at least it is fast while far from perfect.

Another option could be to have the input of multiple dongles combined
maybe, since they have oscillators with random phases, what one
receives out of phase could be in phase in the other one. Not perfect
but still...

Salvatore

--
Salvatore 'antirez' Sanfilippo
open source developer - GoPivotal
http://invece.org

"One would never undertake such a thing if one were not driven on by
some demon whom one can neither resist nor understand."
— George Orwell
l***@lazygranch.com
2014-09-12 09:33:20 UTC
Permalink
‎http://www.radartutorial.eu/13.ssr/sr24.en.html
Isn't the bit rate 1mbps? The pulses are half a microsecond wide, but band limiting should fatten the ‎pulses. 

I don't think changing the crystal is a good plan, mostly because a large number of users‎ won't have the skills to do this.‎

The draft documents had a +-1MHz spec on the 1090MHz clock. I think the reason these dongles work so well is most transponders are on frequency. 

Even 1MHz is 917ppm.‎ It wouldn't be much of a challenge to do 100ppm over temp and vibration. 

I think the fact these dongles work so well in spite of the specs appearing to be marginal is most transmitters are very good.

If there was a tweak to do, I would like to tweak the clock a little to compensate for the drift of the crystal, i.e. keep the receiver centered. There is a program to measure the clock error based on LTE. 


  Original Message  
From: Malcolm Robb
Sent: Friday, September 12, 2014 2:03 AM
To: Salvatore Sanfilippo
Cc: osmocom-***@lists.osmocom.org
Subject: RE: Maximum sampling frequency questions.

Salvatore,
I have tried that, and it doesn't work very well whilst sampling at 2 Mhz because the bit rate is also 2 Mhz. You can't even reliably correct for phase based on the pre-amble, because it's 10100001010000. If you're spot on in phase, the 0's are analogue values ranging from 0 to limit, and the 1's are limit to +127. Limit depends on the signal strength, and is usually set to around 1/3rd average peak amplitude. If you happen to be exactly 90 degrees out in the sampling, the 1''s smear equally across two adjacent sample periods, so you get 11110001111000, where the 1's are half the true peak amplitude. If you sample exactly in phase then you get good signal level difference between the 0's and 1's. As the phase drifts the difference between a 1 and a 0 drops. Since you have to have a level detector somewhere to decide between a 0 and 1, at some point/phase the difference between a 0 and a 1 becomes indistinguishable. The stronger the signal, then the further off phase you can recover it, but there will always be a proportion of signals that cannot be - and I estimate that to be 30% at my location.

Sampling at 2.4Mhz does make things better, but at the expense of a lot of maths to recover the data bits.4Mhz would make the maths much easier. Plus as explained, the spec says 1090 +/- 3Mhz so really we want (at least) 6Mhz of bandwidth to be reasonably sure of squeezing out every last frame from the ether.6Mhz bandwidth means 12Mhz sample rate.

I did some tests last night, and you can set the dongle to 4Mhz sample rate if you tweak the RTLSDR source code (remove the checks for MAX_SAMPLE_RATE). I ran RTL_TEST, and it does drop data and a lot of it, so I'm going to investigate how/why/where data is dropped (at 3.2Mhz) next. I'm also going to try a different crystal in my dongle, but I suspect this will stop the USB working unless I can figure out how the USB clock is derived from the crystal. I hope that's a parameter in the EEPROM.
Cheers
Malcolm
________________________________________
From: Salvatore Sanfilippo [***@gmail.com]
Sent: 12 September 2014 08:26
To: Malcolm Robb
Cc: Kevin Reid; osmocom-***@lists.osmocom.org
Subject: Re: Maximum sampling frequency questions.

Hello Malcolm Robb,

currently I'm not actively working with dump1090 for lack of time (but
I fixed some network issues lately, that I think you already merged),
however what I was "about" to do when I was actively developing it,
was to compensate for the out of phase issue using the preamble levels
in order to estimate the phase shift and apply a correction. Because
the preamble is known, you can check what is the percentage of signal
that is mixed in the next sample, and because the preamble at some
point contains a large "silence" space, you can also estimate the
noise level more or less. All this together should allow you to
improve considerably the reception of out of phase signals.

Soon or later I'll try to do this if nobody does it before me, time permitting.

Cheers,
Salvatore

On Thu, Sep 11, 2014 at 10:33 AM, Malcolm Robb
<***@btconnect.com> wrote:
> It's ADSB/ModeS. I'm partly responsible for dump1090. The 'bit rate' is 2Mhz, and the RF center is 1090Mhz.
>
> There are several issues with the current sampling at 2Mhz, the main ones being....
> 1) The Bandwidth is +/- 1Mhz, but some aircraft are a long way off the center 1090 Mhz frequency so are missed because they are out of band. A higher sampling frequency results in a wider bandwidth so would pull in more signals.
> 2) Nyquist means that you get nasty beating effects as signals drift in and out of phase with the sampling clock.
>
> I had considered sampling at 3Mhz which would help both the above, but the loss of samples would be the deal breaker. At 2.4Mhz, the maths is a bit nasty for not a lot of improvement. The cheap and easy solution would be to change the crystal to a faster one, if the RTL chip can stand the over clocking. If the data loss is at the PC end, then this is unlikely to help. However, if the data loss is at the dongle end, then overclocking should linearly increase all the 2.4Mhz parameters without data loss, again assuming the RTL chip can take the overclocking.
>
> Cheers
> Malcolm
> ________________________________________
> From: Kevin Reid [***@gmail.com] on behalf of Kevin Reid [***@switchb.org]
> Sent: 11 September 2014 00:26
> To: Malcolm Robb
> Cc: osmocom-***@lists.osmocom.org
> Subject: Re: Maximum sampling frequency questions.
>
> On Sep 10, 2014, at 15:50, Malcolm Robb <***@btconnect.com> wrote:
>
>> I'm currently sampling a 2Mhz digital data stream at 2MHz, so obviously I'm suffering quite badly from Nyquist issues. Ideally I'd like to sample at either 4Mhz, or better still 8Mhz. I understand that theoretically I can set the [RTL2832] dongle to sample at 3.2Mhz, but that data loss is virtually inevitable.
>
> The RTL2832 gives you *complex* (I/Q) samples. This does not exactly change the Nyquist limit of 1 MHz (for a 2 MHz sample rate), but it makes it be *plus or minus* 1 MHz, or 2 MHz in total.
>
> If you have a digital radio signal which occupies 2 MHz of bandwidth, you *should* be able to receive it with a RTL dongle, given that:
> - the signal is strong enough
> - you are using the 2.4 MHz sample rate, not 2.0 (filters aren't perfect, especially not these ones, so you need some margin above Nyquist)
> - there is no DC offset (i.e. not E4000 tuner), or you have corrected it, or it doesn't matter for the modulation in question
>
> Perhaps you could tell us more about what signal you're trying to receive, and what software you're currently using?
>
> (I don't have any answers for the other questions in your message.)
>
> --
> Kevin Reid <http://switchb.org/kpreid/>
>
>



--
Salvatore 'antirez' Sanfilippo
open source developer - GoPivotal
http://invece.org

"One would never undertake such a thing if one were not driven on by
some demon whom one can neither resist nor understand."
— George Orwell‎

  Original Message  
From: Malcolm Robb
Sent: Friday, September 12, 2014 2:03 AM
To: Salvatore Sanfilippo
Cc: osmocom-***@lists.osmocom.org
Subject: RE: Maximum sampling frequency questions.

Salvatore,
I have tried that, and it doesn't work very well whilst sampling at 2 Mhz because the bit rate is also 2 Mhz. You can't even reliably correct for phase based on the pre-amble, because it's 10100001010000. If you're spot on in phase, the 0's are analogue values ranging from 0 to limit, and the 1's are limit to +127. Limit depends on the signal strength, and is usually set to around 1/3rd average peak amplitude. If you happen to be exactly 90 degrees out in the sampling, the 1''s smear equally across two adjacent sample periods, so you get 11110001111000, where the 1's are half the true peak amplitude. If you sample exactly in phase then you get good signal level difference between the 0's and 1's. As the phase drifts the difference between a 1 and a 0 drops. Since you have to have a level detector somewhere to decide between a 0 and 1, at some point/phase the difference between a 0 and a 1 becomes indistinguishable. The stronger the signal, then the further off phase you can recover it, but there will always be a proportion of signals that cannot be - and I estimate that to be 30% at my location.

Sampling at 2.4Mhz does make things better, but at the expense of a lot of maths to recover the data bits.4Mhz would make the maths much easier. Plus as explained, the spec says 1090 +/- 3Mhz so really we want (at least) 6Mhz of bandwidth to be reasonably sure of squeezing out every last frame from the ether.6Mhz bandwidth means 12Mhz sample rate.

I did some tests last night, and you can set the dongle to 4Mhz sample rate if you tweak the RTLSDR source code (remove the checks for MAX_SAMPLE_RATE). I ran RTL_TEST, and it does drop data and a lot of it, so I'm going to investigate how/why/where data is dropped (at 3.2Mhz) next. I'm also going to try a different crystal in my dongle, but I suspect this will stop the USB working unless I can figure out how the USB clock is derived from the crystal. I hope that's a parameter in the EEPROM.
Cheers
Malcolm
________________________________________
From: Salvatore Sanfilippo [***@gmail.com]
Sent: 12 September 2014 08:26
To: Malcolm Robb
Cc: Kevin Reid; osmocom-***@lists.osmocom.org
Subject: Re: Maximum sampling frequency questions.

Hello Malcolm Robb,

currently I'm not actively working with dump1090 for lack of time (but
I fixed some network issues lately, that I think you already merged),
however what I was "about" to do when I was actively developing it,
was to compensate for the out of phase issue using the preamble levels
in order to estimate the phase shift and apply a correction. Because
the preamble is known, you can check what is the percentage of signal
that is mixed in the next sample, and because the preamble at some
point contains a large "silence" space, you can also estimate the
noise level more or less. All this together should allow you to
improve considerably the reception of out of phase signals.

Soon or later I'll try to do this if nobody does it before me, time permitting.

Cheers,
Salvatore

On Thu, Sep 11, 2014 at 10:33 AM, Malcolm Robb
<***@btconnect.com> wrote:
> It's ADSB/ModeS. I'm partly responsible for dump1090. The 'bit rate' is 2Mhz, and the RF center is 1090Mhz.
>
> There are several issues with the current sampling at 2Mhz, the main ones being....
> 1) The Bandwidth is +/- 1Mhz, but some aircraft are a long way off the center 1090 Mhz frequency so are missed because they are out of band. A higher sampling frequency results in a wider bandwidth so would pull in more signals.
> 2) Nyquist means that you get nasty beating effects as signals drift in and out of phase with the sampling clock.
>
> I had considered sampling at 3Mhz which would help both the above, but the loss of samples would be the deal breaker. At 2.4Mhz, the maths is a bit nasty for not a lot of improvement. The cheap and easy solution would be to change the crystal to a faster one, if the RTL chip can stand the over clocking. If the data loss is at the PC end, then this is unlikely to help. However, if the data loss is at the dongle end, then overclocking should linearly increase all the 2.4Mhz parameters without data loss, again assuming the RTL chip can take the overclocking.
>
> Cheers
> Malcolm
> ________________________________________
> From: Kevin Reid [***@gmail.com] on behalf of Kevin Reid [***@switchb.org]
> Sent: 11 September 2014 00:26
> To: Malcolm Robb
> Cc: osmocom-***@lists.osmocom.org
> Subject: Re: Maximum sampling frequency questions.
>
> On Sep 10, 2014, at 15:50, Malcolm Robb <***@btconnect.com> wrote:
>
>> I'm currently sampling a 2Mhz digital data stream at 2MHz, so obviously I'm suffering quite badly from Nyquist issues. Ideally I'd like to sample at either 4Mhz, or better still 8Mhz. I understand that theoretically I can set the [RTL2832] dongle to sample at 3.2Mhz, but that data loss is virtually inevitable.
>
> The RTL2832 gives you *complex* (I/Q) samples. This does not exactly change the Nyquist limit of 1 MHz (for a 2 MHz sample rate), but it makes it be *plus or minus* 1 MHz, or 2 MHz in total.
>
> If you have a digital radio signal which occupies 2 MHz of bandwidth, you *should* be able to receive it with a RTL dongle, given that:
> - the signal is strong enough
> - you are using the 2.4 MHz sample rate, not 2.0 (filters aren't perfect, especially not these ones, so you need some margin above Nyquist)
> - there is no DC offset (i.e. not E4000 tuner), or you have corrected it, or it doesn't matter for the modulation in question
>
> Perhaps you could tell us more about what signal you're trying to receive, and what software you're currently using?
>
> (I don't have any answers for the other questions in your message.)
>
> --
> Kevin Reid <http://switchb.org/kpreid/>
>
>



--
Salvatore 'antirez' Sanfilippo
open source developer - GoPivotal
http://invece.org

"One would never undertake such a thing if one were not driven on by
some demon whom one can neither resist nor understand."
— George Orwell
Malcolm Robb
2014-09-12 10:22:24 UTC
Permalink
RE: Isn't the bit rate 1mbps? The pulses are half a microsecond wide, but band limiting should fatten the ‎pulses.

The bit rate is indeed 1Mbps, but the bits are manchester encoded, so are encoded "01" for a 0 and "10" for a 1. Therefore to recover the 1 mbps data bits you need (at least) twice as many samples.

RE: I don't think changing the crystal is a good plan, mostly because a large number of users‎ won't have the skills to do this.‎

I'm not advocating large numbers of users do this. It's for experimentation.

RE: The draft documents had a +-1MHz spec on the 1090MHz clock. I think the reason these dongles work so well is most transponders are on frequency. Even 1MHz is 917ppm.‎ It wouldn't be much of a challenge to do 100ppm over temp and vibration. I think the fact these dongles work so well in spite of the specs appearing to be marginal is most transmitters are very good.

I've no idea why some aircraft are so far off, but the fact is they are. It was brought to my attention when Jet-2 B-757 G-LSAC passed in 'stealth mode' over me regularly. When I re-tuned to 1090.75Mhz, it was sucessfully decoded. This implies it is perhaps 500Khz high - so well within spec, but outside the bandwidth receivable by the dongle when tuned to 1090.00. Perhaps G-LSAC uses an L-C oscillator rather then a crystal in it's wirelesses :-)

RE: If there was a tweak to do, I would like to tweak the clock a little to compensate for the drift of the crystal, i.e. keep the receiver centered. There is a program to measure the clock error based on LTE.

Yes done that mine is +62 ppm at the moment. The solution IMHO is an oven controlled oscillator module ( rather than a TCXO) , but if I'm going to change to one of those, then I may as well go to 48Mhz at the same time - if it'll work.

________________________________________
From: ***@lazygranch.com [***@lazygranch.com]
Sent: 12 September 2014 10:33
To: Malcolm Robb; Salvatore Sanfilippo
Cc: osmocom-***@lists.osmocom.org
Subject: Re: Maximum sampling frequency questions.

‎http://www.radartutorial.eu/13.ssr/sr24.en.html
Isn't the bit rate 1mbps? The pulses are half a microsecond wide, but band limiting should fatten the ‎pulses.

I don't think changing the crystal is a good plan, mostly because a large number of users‎ won't have the skills to do this.‎

The draft documents had a +-1MHz spec on the 1090MHz clock. I think the reason these dongles work so well is most transponders are on frequency.

Even 1MHz is 917ppm.‎ It wouldn't be much of a challenge to do 100ppm over temp and vibration.

I think the fact these dongles work so well in spite of the specs appearing to be marginal is most transmitters are very good.

If there was a tweak to do, I would like to tweak the clock a little to compensate for the drift of the crystal, i.e. keep the receiver centered. There is a program to measure the clock error based on LTE.


Original Message
From: Malcolm Robb
Sent: Friday, September 12, 2014 2:03 AM
To: Salvatore Sanfilippo
Cc: osmocom-***@lists.osmocom.org
Subject: RE: Maximum sampling frequency questions.

Salvatore,
I have tried that, and it doesn't work very well whilst sampling at 2 Mhz because the bit rate is also 2 Mhz. You can't even reliably correct for phase based on the pre-amble, because it's 10100001010000. If you're spot on in phase, the 0's are analogue values ranging from 0 to limit, and the 1's are limit to +127. Limit depends on the signal strength, and is usually set to around 1/3rd average peak amplitude. If you happen to be exactly 90 degrees out in the sampling, the 1''s smear equally across two adjacent sample periods, so you get 11110001111000, where the 1's are half the true peak amplitude. If you sample exactly in phase then you get good signal level difference between the 0's and 1's. As the phase drifts the difference between a 1 and a 0 drops. Since you have to have a level detector somewhere to decide between a 0 and 1, at some point/phase the difference between a 0 and a 1 becomes indistinguishable. The stronger the signal, then the further off phase you can recover it, but there will always be a proportion of signals that cannot be - and I estimate that to be 30% at my location.

Sampling at 2.4Mhz does make things better, but at the expense of a lot of maths to recover the data bits.4Mhz would make the maths much easier. Plus as explained, the spec says 1090 +/- 3Mhz so really we want (at least) 6Mhz of bandwidth to be reasonably sure of squeezing out every last frame from the ether.6Mhz bandwidth means 12Mhz sample rate.

I did some tests last night, and you can set the dongle to 4Mhz sample rate if you tweak the RTLSDR source code (remove the checks for MAX_SAMPLE_RATE). I ran RTL_TEST, and it does drop data and a lot of it, so I'm going to investigate how/why/where data is dropped (at 3.2Mhz) next. I'm also going to try a different crystal in my dongle, but I suspect this will stop the USB working unless I can figure out how the USB clock is derived from the crystal. I hope that's a parameter in the EEPROM.
Cheers
Malcolm
________________________________________
From: Salvatore Sanfilippo [***@gmail.com]
Sent: 12 September 2014 08:26
To: Malcolm Robb
Cc: Kevin Reid; osmocom-***@lists.osmocom.org
Subject: Re: Maximum sampling frequency questions.

Hello Malcolm Robb,

currently I'm not actively working with dump1090 for lack of time (but
I fixed some network issues lately, that I think you already merged),
however what I was "about" to do when I was actively developing it,
was to compensate for the out of phase issue using the preamble levels
in order to estimate the phase shift and apply a correction. Because
the preamble is known, you can check what is the percentage of signal
that is mixed in the next sample, and because the preamble at some
point contains a large "silence" space, you can also estimate the
noise level more or less. All this together should allow you to
improve considerably the reception of out of phase signals.

Soon or later I'll try to do this if nobody does it before me, time permitting.

Cheers,
Salvatore

On Thu, Sep 11, 2014 at 10:33 AM, Malcolm Robb
<***@btconnect.com> wrote:
> It's ADSB/ModeS. I'm partly responsible for dump1090. The 'bit rate' is 2Mhz, and the RF center is 1090Mhz.
>
> There are several issues with the current sampling at 2Mhz, the main ones being....
> 1) The Bandwidth is +/- 1Mhz, but some aircraft are a long way off the center 1090 Mhz frequency so are missed because they are out of band. A higher sampling frequency results in a wider bandwidth so would pull in more signals.
> 2) Nyquist means that you get nasty beating effects as signals drift in and out of phase with the sampling clock.
>
> I had considered sampling at 3Mhz which would help both the above, but the loss of samples would be the deal breaker. At 2.4Mhz, the maths is a bit nasty for not a lot of improvement. The cheap and easy solution would be to change the crystal to a faster one, if the RTL chip can stand the over clocking. If the data loss is at the PC end, then this is unlikely to help. However, if the data loss is at the dongle end, then overclocking should linearly increase all the 2.4Mhz parameters without data loss, again assuming the RTL chip can take the overclocking.
>
> Cheers
> Malcolm
> ________________________________________
> From: Kevin Reid [***@gmail.com] on behalf of Kevin Reid [***@switchb.org]
> Sent: 11 September 2014 00:26
> To: Malcolm Robb
> Cc: osmocom-***@lists.osmocom.org
> Subject: Re: Maximum sampling frequency questions.
>
> On Sep 10, 2014, at 15:50, Malcolm Robb <***@btconnect.com> wrote:
>
>> I'm currently sampling a 2Mhz digital data stream at 2MHz, so obviously I'm suffering quite badly from Nyquist issues. Ideally I'd like to sample at either 4Mhz, or better still 8Mhz. I understand that theoretically I can set the [RTL2832] dongle to sample at 3.2Mhz, but that data loss is virtually inevitable.
>
> The RTL2832 gives you *complex* (I/Q) samples. This does not exactly change the Nyquist limit of 1 MHz (for a 2 MHz sample rate), but it makes it be *plus or minus* 1 MHz, or 2 MHz in total.
>
> If you have a digital radio signal which occupies 2 MHz of bandwidth, you *should* be able to receive it with a RTL dongle, given that:
> - the signal is strong enough
> - you are using the 2.4 MHz sample rate, not 2.0 (filters aren't perfect, especially not these ones, so you need some margin above Nyquist)
> - there is no DC offset (i.e. not E4000 tuner), or you have corrected it, or it doesn't matter for the modulation in question
>
> Perhaps you could tell us more about what signal you're trying to receive, and what software you're currently using?
>
> (I don't have any answers for the other questions in your message.)
>
> --
> Kevin Reid <http://switchb.org/kpreid/>
>
>



--
Salvatore 'antirez' Sanfilippo
open source developer - GoPivotal
http://invece.org

"One would never undertake such a thing if one were not driven on by
some demon whom one can neither resist nor understand."
— George Orwell‎

Original Message
From: Malcolm Robb
Sent: Friday, September 12, 2014 2:03 AM
To: Salvatore Sanfilippo
Cc: osmocom-***@lists.osmocom.org
Subject: RE: Maximum sampling frequency questions.

Salvatore,
I have tried that, and it doesn't work very well whilst sampling at 2 Mhz because the bit rate is also 2 Mhz. You can't even reliably correct for phase based on the pre-amble, because it's 10100001010000. If you're spot on in phase, the 0's are analogue values ranging from 0 to limit, and the 1's are limit to +127. Limit depends on the signal strength, and is usually set to around 1/3rd average peak amplitude. If you happen to be exactly 90 degrees out in the sampling, the 1''s smear equally across two adjacent sample periods, so you get 11110001111000, where the 1's are half the true peak amplitude. If you sample exactly in phase then you get good signal level difference between the 0's and 1's. As the phase drifts the difference between a 1 and a 0 drops. Since you have to have a level detector somewhere to decide between a 0 and 1, at some point/phase the difference between a 0 and a 1 becomes indistinguishable. The stronger the signal, then the further off phase you can recover it, but there will always be a proportion of signals that cannot be - and I estimate that to be 30% at my location.

Sampling at 2.4Mhz does make things better, but at the expense of a lot of maths to recover the data bits.4Mhz would make the maths much easier. Plus as explained, the spec says 1090 +/- 3Mhz so really we want (at least) 6Mhz of bandwidth to be reasonably sure of squeezing out every last frame from the ether.6Mhz bandwidth means 12Mhz sample rate.

I did some tests last night, and you can set the dongle to 4Mhz sample rate if you tweak the RTLSDR source code (remove the checks for MAX_SAMPLE_RATE). I ran RTL_TEST, and it does drop data and a lot of it, so I'm going to investigate how/why/where data is dropped (at 3.2Mhz) next. I'm also going to try a different crystal in my dongle, but I suspect this will stop the USB working unless I can figure out how the USB clock is derived from the crystal. I hope that's a parameter in the EEPROM.
Cheers
Malcolm
________________________________________
From: Salvatore Sanfilippo [***@gmail.com]
Sent: 12 September 2014 08:26
To: Malcolm Robb
Cc: Kevin Reid; osmocom-***@lists.osmocom.org
Subject: Re: Maximum sampling frequency questions.

Hello Malcolm Robb,

currently I'm not actively working with dump1090 for lack of time (but
I fixed some network issues lately, that I think you already merged),
however what I was "about" to do when I was actively developing it,
was to compensate for the out of phase issue using the preamble levels
in order to estimate the phase shift and apply a correction. Because
the preamble is known, you can check what is the percentage of signal
that is mixed in the next sample, and because the preamble at some
point contains a large "silence" space, you can also estimate the
noise level more or less. All this together should allow you to
improve considerably the reception of out of phase signals.

Soon or later I'll try to do this if nobody does it before me, time permitting.

Cheers,
Salvatore

On Thu, Sep 11, 2014 at 10:33 AM, Malcolm Robb
<***@btconnect.com> wrote:
> It's ADSB/ModeS. I'm partly responsible for dump1090. The 'bit rate' is 2Mhz, and the RF center is 1090Mhz.
>
> There are several issues with the current sampling at 2Mhz, the main ones being....
> 1) The Bandwidth is +/- 1Mhz, but some aircraft are a long way off the center 1090 Mhz frequency so are missed because they are out of band. A higher sampling frequency results in a wider bandwidth so would pull in more signals.
> 2) Nyquist means that you get nasty beating effects as signals drift in and out of phase with the sampling clock.
>
> I had considered sampling at 3Mhz which would help both the above, but the loss of samples would be the deal breaker. At 2.4Mhz, the maths is a bit nasty for not a lot of improvement. The cheap and easy solution would be to change the crystal to a faster one, if the RTL chip can stand the over clocking. If the data loss is at the PC end, then this is unlikely to help. However, if the data loss is at the dongle end, then overclocking should linearly increase all the 2.4Mhz parameters without data loss, again assuming the RTL chip can take the overclocking.
>
> Cheers
> Malcolm
> ________________________________________
> From: Kevin Reid [***@gmail.com] on behalf of Kevin Reid [***@switchb.org]
> Sent: 11 September 2014 00:26
> To: Malcolm Robb
> Cc: osmocom-***@lists.osmocom.org
> Subject: Re: Maximum sampling frequency questions.
>
> On Sep 10, 2014, at 15:50, Malcolm Robb <***@btconnect.com> wrote:
>
>> I'm currently sampling a 2Mhz digital data stream at 2MHz, so obviously I'm suffering quite badly from Nyquist issues. Ideally I'd like to sample at either 4Mhz, or better still 8Mhz. I understand that theoretically I can set the [RTL2832] dongle to sample at 3.2Mhz, but that data loss is virtually inevitable.
>
> The RTL2832 gives you *complex* (I/Q) samples. This does not exactly change the Nyquist limit of 1 MHz (for a 2 MHz sample rate), but it makes it be *plus or minus* 1 MHz, or 2 MHz in total.
>
> If you have a digital radio signal which occupies 2 MHz of bandwidth, you *should* be able to receive it with a RTL dongle, given that:
> - the signal is strong enough
> - you are using the 2.4 MHz sample rate, not 2.0 (filters aren't perfect, especially not these ones, so you need some margin above Nyquist)
> - there is no DC offset (i.e. not E4000 tuner), or you have corrected it, or it doesn't matter for the modulation in question
>
> Perhaps you could tell us more about what signal you're trying to receive, and what software you're currently using?
>
> (I don't have any answers for the other questions in your message.)
>
> --
> Kevin Reid <http://switchb.org/kpreid/>
>
>



--
Salvatore 'antirez' Sanfilippo
open source developer - GoPivotal
http://invece.org

"One would never undertake such a thing if one were not driven on by
some demon whom one can neither resist nor understand."
— George Orwell
Oliver Jowett
2014-09-12 11:06:38 UTC
Permalink
On 12 September 2014 11:22, Malcolm Robb <***@btconnect.com> wrote:

> I've no idea why some aircraft are so far off, but the fact is they are. It was brought to my attention when Jet-2 B-757 G-LSAC passed in 'stealth mode' over me regularly. When I re-tuned to 1090.75Mhz, it was sucessfully decoded. This implies it is perhaps 500Khz high - so well within spec, but outside the bandwidth receivable by the dongle when tuned to 1090.00. Perhaps G-LSAC uses an L-C oscillator rather then a crystal in it's wirelesses :-)

Since the messages are being retransmitted regularly, maybe just
frequency hopping +/- a few hundred kHz around 1090 would help?

Oliver
l***@lazygranch.com
2014-09-12 17:25:08 UTC
Permalink
Re:
Yes done that mine is +62 ppm at the moment. The solution IMHO is an oven controlled oscillator module ( rather than a TCXO) , but if I'm going to change to one of those, then I may as well go to 48Mhz at the same time - if it'll work.

If you set up the software to periodically ensure a frequency reference such as LTE and periodically adjust the error, it will be as good as using an ovenized xtal.

Where in dump1090 do I set a compensation?


  Original Message  
Oliver Jowett
2014-09-13 11:28:45 UTC
Permalink
On 12 September 2014 18:25, <***@lazygranch.com> wrote:
> Re:
> Yes done that mine is +62 ppm at the moment. The solution IMHO is an oven controlled oscillator module ( rather than a TCXO) , but if I'm going to change to one of those, then I may as well go to 48Mhz at the same time - if it'll work.
>
> If you set up the software to periodically ensure a frequency reference such as LTE and periodically adjust the error, it will be as good as using an ovenized xtal.
>
> Where in dump1090 do I set a compensation?

--ppm command line option

That said, my experience has been that once you have the initial
adjustment in place the stability over time isn't too bad - even if
it's been sitting in the sun all morning, mine only changes from
+47ppm to +51ppm or so - so automatic periodic recalibration is
probably overkill.

Oliver
Ralph A. Schmid, dk5ras
2014-09-15 10:31:45 UTC
Permalink
Not very far from truth, for old transponders, but I really whought with
mode-s those old transmitters should be scrapped now. Obviously not :)

The older transponder designs often incorporated a tube that was a kind of
high power oscillator, built into a precise cavity and tuned to 1090 MHz
with a fine threaded screw, then a fat blob of sealing paint to secure it,
that's all. So, yes, basically a LC oscillator.

> Perhaps G-LSAC uses an L-C oscillator rather then a crystal in it's
wirelesses :-)

Yep :) Perhaps some older designs were modular, the transmitter stayed the
one from the seventies, just a new coder was attached?!

Ralph.
Ralph A. Schmid, dk5ras
2014-09-15 08:45:41 UTC
Permalink
> Hi,
>
> > I think the fact these dongles work so well in spite of the specs
> > appearing to be marginal is most transmitters are very good.
>
> Yes, here in Europe the free running tube power oscillator transponders
> seem to have vanished with need for mode-s and such. So it really seems
> that nowadays crystal controlled transponders are the standard, and the
> frequencies are quite stable.
>
> My observations in the waterfall diagram with a bladeRF SDR near NUE
> airport showed no noticeable frequency issues.
>
> Ralph.
Alexander Kurpiers
2014-09-12 09:56:58 UTC
Permalink
On 09/12/2014 10:50 AM, Malcolm Robb wrote:
> Salvatore,
> I have tried that, and it doesn't work very well whilst sampling at 2 Mhz because the bit rate is also 2 Mhz. You can't even reliably correct for phase based on the pre-amble, because it's 10100001010000. If you're spot on in phase, the 0's are analogue values ranging from 0 to limit, and the 1's are limit to +127. Limit depends on the signal strength, and is usually set to around 1/3rd average peak amplitude. If you happen to be exactly 90 degrees out in the sampling, the 1''s smear equally across two adjacent sample periods, so you get 11110001111000, where the 1's are half the true peak amplitude. If you sample exactly in phase then you get good signal level difference between the 0's and 1's. As the phase drifts the difference between a 1 and a 0 drops. Since you have to have a level detector somewhere to decide between a 0 and 1, at some point/phase the difference between a 0 and a 1 becomes indistinguishable. The stronger the signal, then the further off phase you can recover it, but there will always be a proportion of signals that cannot be - and I estimate that to be 30% at my location.
>
>
Correct me if I'm wrong, but usually you recover the phase (e.g. by
comparing against the pre-amble) and then you turn I/Q so that
information is only e.g in I. That's one (complex) multiplication.


Regards,

Alexander
Ralph A. Schmid, dk5ras
2014-09-15 08:37:54 UTC
Permalink
Doesn't it derive the USB clock from the 28.8 MHz crystal? In this case you
are out, USB needs the correct frequency to work.

Ralph.


> -----Original Message-----
> From: osmocom-sdr-***@lists.osmocom.org [mailto:osmocom-sdr-
> ***@lists.osmocom.org] On Behalf Of Malcolm Robb
> Sent: Thursday, September 11, 2014 10:33 AM
> To: Kevin Reid
> Cc: osmocom-***@lists.osmocom.org
> Subject: RE: Maximum sampling frequency questions.
>
> It's ADSB/ModeS. I'm partly responsible for dump1090. The 'bit rate' is
2Mhz,
> and the RF center is 1090Mhz.
>
> There are several issues with the current sampling at 2Mhz, the main ones
> being....
> 1) The Bandwidth is +/- 1Mhz, but some aircraft are a long way off the
center
> 1090 Mhz frequency so are missed because they are out of band. A higher
> sampling frequency results in a wider bandwidth so would pull in more
> signals.
> 2) Nyquist means that you get nasty beating effects as signals drift in
and out
> of phase with the sampling clock.
>
> I had considered sampling at 3Mhz which would help both the above, but the
> loss of samples would be the deal breaker. At 2.4Mhz, the maths is a bit
> nasty for not a lot of improvement. The cheap and easy solution would be
to
> change the crystal to a faster one, if the RTL chip can stand the over
clocking.
> If the data loss is at the PC end, then this is unlikely to help. However,
if the
> data loss is at the dongle end, then overclocking should linearly increase
all
> the 2.4Mhz parameters without data loss, again assuming the RTL chip can
> take the overclocking.
>
> Cheers
> Malcolm
> ________________________________________
> From: Kevin Reid [***@gmail.com] on behalf of Kevin Reid
> [***@switchb.org]
> Sent: 11 September 2014 00:26
> To: Malcolm Robb
> Cc: osmocom-***@lists.osmocom.org
> Subject: Re: Maximum sampling frequency questions.
>
> On Sep 10, 2014, at 15:50, Malcolm Robb <***@btconnect.com>
> wrote:
>
> > I'm currently sampling a 2Mhz digital data stream at 2MHz, so obviously
I'm
> suffering quite badly from Nyquist issues. Ideally I'd like to sample at
either
> 4Mhz, or better still 8Mhz. I understand that theoretically I can set the
> [RTL2832] dongle to sample at 3.2Mhz, but that data loss is virtually
> inevitable.
>
> The RTL2832 gives you *complex* (I/Q) samples. This does not exactly
> change the Nyquist limit of 1 MHz (for a 2 MHz sample rate), but it makes
it
> be *plus or minus* 1 MHz, or 2 MHz in total.
>
> If you have a digital radio signal which occupies 2 MHz of bandwidth, you
> *should* be able to receive it with a RTL dongle, given that:
> - the signal is strong enough
> - you are using the 2.4 MHz sample rate, not 2.0 (filters aren't perfect,
> especially not these ones, so you need some margin above Nyquist)
> - there is no DC offset (i.e. not E4000 tuner), or you have corrected it,
or it
> doesn't matter for the modulation in question
>
> Perhaps you could tell us more about what signal you're trying to receive,
> and what software you're currently using?
>
> (I don't have any answers for the other questions in your message.)
>
> --
> Kevin Reid <http://switchb.org/kpreid/>
>
Malcolm Robb
2014-09-15 11:00:04 UTC
Permalink
Yes, but high speed USB runs at 480Mbits/s, so there must be a DFS/PLL in the RTL chip to generate this clock from the 28.8 Mhz xtal. The multiplier (16.666) may be hard programmed, or it may be contained in the EEPROM. If it's in the EEPROM, then it can be changed. I thought I'd seen reference in a data sheet somewhere to a 25Mhz crystal option, so as long as it's not my memory playing tricks the multiplier must be programmable somehow.
Cheers
Malcolm
________________________________________
From: Ralph A. Schmid, dk5ras [***@schmid.xxx]
Sent: 15 September 2014 09:37
To: Malcolm Robb; 'Kevin Reid'
Cc: osmocom-***@lists.osmocom.org
Subject: RE: Maximum sampling frequency questions.

Doesn't it derive the USB clock from the 28.8 MHz crystal? In this case you
are out, USB needs the correct frequency to work.

Ralph.
Jiří Pinkava
2014-09-11 13:41:08 UTC
Permalink
Dne 10.9.2014 22:50, Malcolm Robb napsal(a):
> Hu,
> I'm currently sampling a 2Mhz digital data stream at 2MHz, so obviously I'm suffering quite badly from Nyquist issues. Ideally I'd like to sample at either 4Mhz, or better still 8Mhz. I understand that theoretically I can set the dongle to sample at 3.2Mhz, but that data loss is virtually inevitable. The highest reliable sample rate is 2.4Mhz. So my questions are:
>
> 1) What is the cause of the data loss? - is it in the dongle, or in the PC chipset, or in the PC driver/DLL software?
>
> 2) Has anyone tried increasing the crystal frequency in the dongle - i.e. overclocking it? Suppose I change the 28.8Mhz for a (28.8 * (4.0 / 2.4)) = 48Mhz one, will that allow me to sample at 4Mhz by using the settings for 3.4Mhz? Obviously there in no gaurantee that the RTL2832 will work at all if you overclock by too much.
You cannot overclock it, because you will overclock also USB (which will
not work).

>
> Cheers
> Malcolm
lists
2014-09-11 18:48:44 UTC
Permalink
Here is the spec on the transmitter:
--------------------------------------------------------------------------
From: "Subject: TSO-C74c, AIRBORNE ATC TRANSPONDER EQUIPMENT"


2.10 Reply Transmission Frequency. The center
frequency of the reply transmission must be 1090 ±3
MHz.

Note that you need some BW for the modulated signal, which is PPM at
1mbps.
------------------------------------------------------------------------------

--------------------------------------------------------
From "The Report of an Investigation into the
Characteristics, Operation and Protection
Requirements of Civil Aeronautical and Civil
Maritime Radar Systems"


3.1.1.3.2.2
Airborne systems
The airborne transmitters have a specified output power of 24 ± 3 dBW
for commercial aircraft, and 18.5 dBW for light aircraft, whilst
replying on a frequency of 1090 ± 3 MHz (as specified in Annexe 10 of
the International Civil Aviation Organisation (ICAO) international
specifications). However, in a study conducted recently in the USA, it
was found that over 3% of commercial aircraft and over 9% of light
aircraft failed the transmitter frequency limits .
------------------------------------------------------

Now this all gets tricky because while the transmitters that exceed the
3MHz limit have been measured, they are supposed to be calibrated. For
ATC, rather than simply not recognize the planes out of spec, they
build the hardware to handle +-5MHz. Basically failure is not an
option. But for us hobbyists, I suppose meeting the 3MHz limit would
be nice. But using 2 or 3 dongles would mean a power splitter would be
needed, or use 2 or 3 antennas.
Continue reading on narkive:
Loading...