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