Forums

Approaching QAM256 demodulation

Started by haxorcize November 4, 2011
Hi!

I am trying to write a demodulator for a 6MHZ-wide QAM256 signal.
I have captured a sample file with the aid of a USRP, and I carry on the
rest in Matlab.

[Question regarding sampling frequency]:
I get max 8MS/s from the USRP (although the spec says it should support
16MS/s - I can't seem to get that for some reason).
It seems like I should take >12MS/s to avoid aliasing for a 6MHz signal,
but I've read somewhere that if I take I&Q samples, it can count like two
samples. Is it true? Will 8MS/s be sufficient to properly work with a 6MHz
wide signal?

[Question regarding demodulator design]:
The channel contains MPEG2-TS frames, and they contain an sync byte
(=0x47).
I thought I could use this for symbol timing recovery with correlation.
(a) Do you know it's good enough?
(b) Is it possible to do symbol timing recovery with correlation before I
corrected carrier freq/phase offsets?
(c) Suppose I do have to fix carrier freq/phase offsets - will a costas
loop be okay?

Thank you in advance,
Gadi.

On Nov 4, 5:24&#2013266080;am, "haxorcize" <haxorcize@n_o_s_p_a_m.gmail.com>
wrote:
> Hi! > > I am trying to write a demodulator for a 6MHZ-wide QAM256 signal. > I have captured a sample file with the aid of a USRP, and I carry on the > rest in Matlab. > > [Question regarding sampling frequency]: > I get max 8MS/s from the USRP (although the spec says it should support > 16MS/s - I can't seem to get that for some reason). > It seems like I should take >12MS/s to avoid aliasing for a 6MHz signal, > but I've read somewhere that if I take I&Q samples, it can count like two > samples. Is it true? Will 8MS/s be sufficient to properly work with a 6MHz > wide signal? > > [Question regarding demodulator design]: > The channel contains MPEG2-TS frames, and they contain an sync byte > (=0x47). > I thought I could use this for symbol timing recovery with correlation. > (a) Do you know it's good enough? > (b) Is it possible to do symbol timing recovery with correlation before I > corrected carrier freq/phase offsets? > (c) Suppose I do have to fix carrier freq/phase offsets - will a costas > loop be okay? > > Thank you in advance, > Gadi.
8 Msps should be a sufficient complex sample rate for the 6 MHz signal. The answers to your other questions are "it depends". How you proceed depends on, among other things, the initial error in frequency and timing as well as SNR. I hope you aren't using the internal crystal on the USRP, it sucks. John
"haxorcize" <haxorcize@n_o_s_p_a_m.gmail.com> wrote in message 
news:ZJadnWnx_LjMMi7TnZ2dnUVZ_uydnZ2d@giganews.com...
> Hi! > > I am trying to write a demodulator for a 6MHZ-wide QAM256 signal. > I have captured a sample file with the aid of a USRP, and I carry on the > rest in Matlab. > > [Question regarding sampling frequency]: > I get max 8MS/s from the USRP (although the spec says it should support > 16MS/s - I can't seem to get that for some reason). > It seems like I should take >12MS/s to avoid aliasing for a 6MHz signal, > but I've read somewhere that if I take I&Q samples, it can count like two > samples. Is it true? Will 8MS/s be sufficient to properly work with a 6MHz > wide signal? > > [Question regarding demodulator design]: > The channel contains MPEG2-TS frames, and they contain an sync byte > (=0x47). > I thought I could use this for symbol timing recovery with correlation. > (a) Do you know it's good enough? > (b) Is it possible to do symbol timing recovery with correlation before I > corrected carrier freq/phase offsets? > (c) Suppose I do have to fix carrier freq/phase offsets - will a costas > loop be okay?
Small question: are You doing DVB-T2 demodulator? There are way much more upper layers until You'll get pure TS.
On Fri, 04 Nov 2011 04:24:33 -0500, haxorcize wrote:

> Hi! > > I am trying to write a demodulator for a 6MHZ-wide QAM256 signal. I have > captured a sample file with the aid of a USRP, and I carry on the rest > in Matlab. > > [Question regarding sampling frequency]: I get max 8MS/s from the USRP > (although the spec says it should support 16MS/s - I can't seem to get > that for some reason). It seems like I should take >12MS/s to avoid > aliasing for a 6MHz signal, but I've read somewhere that if I take I&Q > samples, it can count like two samples. Is it true? Will 8MS/s be > sufficient to properly work with a 6MHz wide signal?
You need to collect _independent_ samples at over twice the signal bandwidth; they don't have to be evenly spaced, or the same thing, etc. Since I and Q channels are independent (and useful), that counts. I don't know of any systems that collect anything other than just straight, or I and Q, but I'm sure that someone has tried.
> [Question regarding demodulator design]: The channel contains MPEG2-TS > frames, and they contain an sync byte (=0x47). > I thought I could use this for symbol timing recovery with correlation. > (a) Do you know it's good enough? > (b) Is it possible to do symbol timing recovery with correlation before > I corrected carrier freq/phase offsets? (c) Suppose I do have to fix > carrier freq/phase offsets - will a costas loop be okay?
I've never tried QAM256, so take this with a grain of salt: I don't think you can use your sync byte for symbol timing recovery -- it is, after all, just one point in the constellation; if you haven't locked on the carrier and the bit timing, then how can you capture that byte? Study your signal specification. I'd be surprised if they're not helping you out somehow with some sort of a periodic training or sync sequence (no 8-symbol bursts of 0xff, 0x00, 0xff?, for example?). Whether or not they do, some sort of data-directed synchronization (e.g. Costas) is probably the way to go. Have you done a literature search? What did it find? If this is part of a specific service, then look for books on the subject -- sometimes that's your best bet for pointers of this sort. -- www.wescottdesign.com
>On Nov 4, 5:24=A0am, "haxorcize" <haxorcize@n_o_s_p_a_m.gmail.com> >wrote: >> Hi! >> >> I am trying to write a demodulator for a 6MHZ-wide QAM256 signal. >> I have captured a sample file with the aid of a USRP, and I carry on
the
>> rest in Matlab. >> >> [Question regarding sampling frequency]: >> I get max 8MS/s from the USRP (although the spec says it should support >> 16MS/s - I can't seem to get that for some reason). >> It seems like I should take >12MS/s to avoid aliasing for a 6MHz
signal,
>> but I've read somewhere that if I take I&Q samples, it can count like
two
>> samples. Is it true? Will 8MS/s be sufficient to properly work with a
6MH=
>z >> wide signal? >> >> [Question regarding demodulator design]: >> The channel contains MPEG2-TS frames, and they contain an sync byte >> (=3D0x47). >> I thought I could use this for symbol timing recovery with correlation. >> (a) Do you know it's good enough? >> (b) Is it possible to do symbol timing recovery with correlation before
I
>> corrected carrier freq/phase offsets? >> (c) Suppose I do have to fix carrier freq/phase offsets - will a costas >> loop be okay? >> >> Thank you in advance, >> Gadi. > >8 Msps should be a sufficient complex sample rate for the 6 MHz >signal. >The answers to your other questions are "it depends". How you proceed >depends on, among other things, the initial error in frequency and >timing as well as SNR. I hope you aren't using the internal crystal on >the USRP, it sucks. > >John >
Hi! I've connected my USRP to the cable-tv coaxial cable at my appartment. The cable modem nearby which is also connected to the same cable has a pretty high(?) SNR (40db or so). About the crystal - using the USRP automatically means I'm using the crystal? I have a WBX daughterboard. Downconvertion to IF on the WBX uses that same crystal?
>"haxorcize" <haxorcize@n_o_s_p_a_m.gmail.com> wrote in message >news:ZJadnWnx_LjMMi7TnZ2dnUVZ_uydnZ2d@giganews.com... >> Hi! >> >> I am trying to write a demodulator for a 6MHZ-wide QAM256 signal. >> I have captured a sample file with the aid of a USRP, and I carry on
the
>> rest in Matlab. >> >> [Question regarding sampling frequency]: >> I get max 8MS/s from the USRP (although the spec says it should support >> 16MS/s - I can't seem to get that for some reason). >> It seems like I should take >12MS/s to avoid aliasing for a 6MHz
signal,
>> but I've read somewhere that if I take I&Q samples, it can count like
two
>> samples. Is it true? Will 8MS/s be sufficient to properly work with a
6MHz
>> wide signal? >> >> [Question regarding demodulator design]: >> The channel contains MPEG2-TS frames, and they contain an sync byte >> (=0x47). >> I thought I could use this for symbol timing recovery with correlation. >> (a) Do you know it's good enough? >> (b) Is it possible to do symbol timing recovery with correlation before
I
>> corrected carrier freq/phase offsets? >> (c) Suppose I do have to fix carrier freq/phase offsets - will a costas >> loop be okay? > > >Small question: are You doing DVB-T2 demodulator? There are way much more
>upper layers until You'll get pure TS. > > >
No, I'm trying to write a DVB-C demodulator.
On 11/4/2011 5:24 AM, haxorcize wrote:
> Hi! > > I am trying to write a demodulator for a 6MHZ-wide QAM256 signal. > I have captured a sample file with the aid of a USRP, and I carry on the > rest in Matlab.
Be clear about this. Is the interesting part of the signal 6 MHz, or the whole signal? Signals that are outside the band of interest will create aliases if the sampler can see them. Jerry -- Engineering is the art of making what you want from things you can get.
>On 11/4/2011 5:24 AM, haxorcize wrote: >> Hi! >> >> I am trying to write a demodulator for a 6MHZ-wide QAM256 signal. >> I have captured a sample file with the aid of a USRP, and I carry on
the
>> rest in Matlab. > >Be clear about this. Is the interesting part of the signal 6 MHz, or the >whole signal? Signals that are outside the band of interest will create >aliases if the sampler can see them. > >Jerry >-- >Engineering is the art of making what you want from things you can get. >
The interesting part. That's the bandwidth of a single downstream MPEG channel. Every 6MHz there's a new channel.
>On Fri, 04 Nov 2011 04:24:33 -0500, haxorcize wrote: > >> Hi! >> >> I am trying to write a demodulator for a 6MHZ-wide QAM256 signal. I
have
>> captured a sample file with the aid of a USRP, and I carry on the rest >> in Matlab. >> >> [Question regarding sampling frequency]: I get max 8MS/s from the USRP >> (although the spec says it should support 16MS/s - I can't seem to get >> that for some reason). It seems like I should take >12MS/s to avoid >> aliasing for a 6MHz signal, but I've read somewhere that if I take I&Q >> samples, it can count like two samples. Is it true? Will 8MS/s be >> sufficient to properly work with a 6MHz wide signal? > >You need to collect _independent_ samples at over twice the signal >bandwidth; they don't have to be evenly spaced, or the same thing, etc. >Since I and Q channels are independent (and useful), that counts. I >don't know of any systems that collect anything other than just straight,
>or I and Q, but I'm sure that someone has tried. > >> [Question regarding demodulator design]: The channel contains MPEG2-TS >> frames, and they contain an sync byte (=0x47). >> I thought I could use this for symbol timing recovery with correlation. >> (a) Do you know it's good enough? >> (b) Is it possible to do symbol timing recovery with correlation before >> I corrected carrier freq/phase offsets? (c) Suppose I do have to fix >> carrier freq/phase offsets - will a costas loop be okay? > >I've never tried QAM256, so take this with a grain of salt: > >I don't think you can use your sync byte for symbol timing recovery -- it
>is, after all, just one point in the constellation; if you haven't locked
>on the carrier and the bit timing, then how can you capture that byte? > >Study your signal specification. I'd be surprised if they're not helping
>you out somehow with some sort of a periodic training or sync sequence >(no 8-symbol bursts of 0xff, 0x00, 0xff?, for example?). Whether or not >they do, some sort of data-directed synchronization (e.g. Costas) is >probably the way to go. > >Have you done a literature search? What did it find? If this is part of
>a specific service, then look for books on the subject -- sometimes >that's your best bet for pointers of this sort. > >-- >www.wescottdesign.com >
I am trying to demodulate DVB-C (DOCSIS/HDTV over cables). The packets in this stream are 188 bytes long. What you said about syncing on this single byte is indeed hard since it's a single symbol - but I just thought that this byte repeats itself every 188 symbols. What if I adjust my symbol timing offset based on this every-188-symbols repetition, and when I feel like it's stable I got the offset for all the symbols. I have to admit it doesn't sound solid. I am looking for literature on cable modems to see how they work. Thanks.
On Fri, 04 Nov 2011 15:27:50 -0500, haxorcize wrote:

>>On 11/4/2011 5:24 AM, haxorcize wrote: >>> Hi! >>> >>> I am trying to write a demodulator for a 6MHZ-wide QAM256 signal. I >>> have captured a sample file with the aid of a USRP, and I carry on > the >>> rest in Matlab. >> >>Be clear about this. Is the interesting part of the signal 6 MHz, or the >>whole signal? Signals that are outside the band of interest will create >>aliases if the sampler can see them. >> >>Jerry >>-- >>Engineering is the art of making what you want from things you can get. >> >> > The interesting part. > That's the bandwidth of a single downstream MPEG channel. Every 6MHz > there's a new channel.
Are you getting a channel that has all the other channels filtered out, or are you getting a channel that comes complete with scrud at the edges? You can't just sample based on your signal's content - you have to sample such that your signal after aliasing and filtering is clear. This may help: http://www.wescottdesign.com/articles/Sampling/sampling.pdf -- www.wescottdesign.com