DSPRelated.com
Forums

Frequency offset compensation for 802.15.4 (ZigBee-MSK)

Started by tarikkazaz October 2, 2015
Hi all,

I am working on implementation of zigbee device on FPGA. Till now I have
made Tx which is compatible with commercial devices. Also I have Rx which
is working with my own Tx, but does not work with commercial devices.
Major reason why my receiver can not decode signals from commercial
devices is frequency offset. So far I tried to apply zero crossing
approach to decode signal, but that does not help
(http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1615158&url=http%3A%2F%2Fieeexplore.ieee.org%2Fxpls%2Fabs_all.jsp%3Farnumber%3D1615158).
Previously I have been doing correlation of known chips with received
signal (on that way I was able to decode signals from my own Tx). 

Because now I am planning to start with implementation of frequency offset
compensation for my receiver, I would like to get advice.  Which estimator
do you suggest me to use? Or maybe I could use some simplified method, as
zigbee has known preamble of 256 chips, which is 128 chips in I branch,
and 128 chips in Q branch. Sampling rate of my ADC is 64Msps, and I was
doing down sapling to 4Msps.

Thank you in advance,


---------------------------------------
Posted through http://www.DSPRelated.com
On Fri, 02 Oct 2015 07:16:27 -0500, tarikkazaz wrote:

> Hi all, > > I am working on implementation of zigbee device on FPGA. Till now I have > made Tx which is compatible with commercial devices. Also I have Rx > which is working with my own Tx, but does not work with commercial > devices. > Major reason why my receiver can not decode signals from commercial > devices is frequency offset. So far I tried to apply zero crossing > approach to decode signal, but that does not help > (http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1615158&url=http%
3A%2F%2Fieeexplore.ieee.org%2Fxpls%2Fabs_all.jsp%3Farnumber%3D1615158).
> Previously I have been doing correlation of known chips with received > signal (on that way I was able to decode signals from my own Tx). > > Because now I am planning to start with implementation of frequency > offset compensation for my receiver, I would like to get advice. Which > estimator do you suggest me to use? Or maybe I could use some simplified > method, as zigbee has known preamble of 256 chips, which is 128 chips in > I branch, > and 128 chips in Q branch. Sampling rate of my ADC is 64Msps, and I was > doing down sapling to 4Msps.
Not enough detail, and all the references to specifications landed on paywalls. Have you done a literature search on carrier synchronization for ZigBee? Presumably the designers of the specification purposely made synchronization easy. In general, when there's a preamble it's made to be easy to detect even if you're not quite exactly synchronized, and to synchronize to. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Tim Wescott  <seemywebsite@myfooter.really> wrote:

>Not enough detail, and all the references to specifications landed on >paywalls. > >Have you done a literature search on carrier synchronization for ZigBee? >Presumably the designers of the specification purposely made >synchronization easy. > >In general, when there's a preamble it's made to be easy to detect even >if you're not quite exactly synchronized, and to synchronize to.
I agree. In similar systems that I've done, measuring the time between zero crossings (e.g. a zero crossing at the beginning of the preamble, and a zero crossing at the end of the preamble) has worked for me. But if you're trying to get this design to be Zigbee-compliant, you have a lot of work ahead of you. If you're just trying to get it to function, much less work. Steve
"tarikkazaz" <50642@DSPRelated> writes:

> Hi all, > > I am working on implementation of zigbee device on FPGA. Till now I have > made Tx which is compatible with commercial devices. Also I have Rx which > is working with my own Tx, but does not work with commercial devices. > Major reason why my receiver can not decode signals from commercial > devices is frequency offset. So far I tried to apply zero crossing > approach to decode signal, but that does not help > (http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1615158&url=http%3A%2F%2Fieeexplore.ieee.org%2Fxpls%2Fabs_all.jsp%3Farnumber%3D1615158). > Previously I have been doing correlation of known chips with received > signal (on that way I was able to decode signals from my own Tx). > > Because now I am planning to start with implementation of frequency offset > compensation for my receiver, I would like to get advice. Which estimator > do you suggest me to use? Or maybe I could use some simplified method, as > zigbee has known preamble of 256 chips, which is 128 chips in I branch, > and 128 chips in Q branch. Sampling rate of my ADC is 64Msps, and I was > doing down sapling to 4Msps.
Hi, MSK is FM, right? Why not compute the phase of the IQ stream over some computationally-convenient block and then simply do a least-squares fit of a straight line? The slope of that line is then your frequency offset. This assumes there is an even number of ones and zeros. And the longer the block, the better the estimate via averaging. I would think this could at least give you a coarse frequency offset estimation. -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
Randy Yates <yates@digitalsignallabs.com> writes:
> [...] > The slope of that line is then your frequency offset.
Woops. Not the slope, but the angle of that line with the positive x-axis. It also just occurred to me that this may be too complex for an FPGA implementation, although I haven't thought that through much. -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
>On Fri, 02 Oct 2015 07:16:27 -0500, tarikkazaz wrote: > >> Hi all, >> >> I am working on implementation of zigbee device on FPGA. Till now I
have
>> made Tx which is compatible with commercial devices. Also I have Rx >> which is working with my own Tx, but does not work with commercial >> devices. >> Major reason why my receiver can not decode signals from commercial >> devices is frequency offset. So far I tried to apply zero crossing >> approach to decode signal, but that does not help >> (http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber15158&url=http% >3A%2F%2Fieeexplore.ieee.org%2Fxpls%2Fabs_all.jsp%3Farnumber%3D1615158). >> Previously I have been doing correlation of known chips with received >> signal (on that way I was able to decode signals from my own Tx). >> >> Because now I am planning to start with implementation of frequency >> offset compensation for my receiver, I would like to get advice.
Which
>> estimator do you suggest me to use? Or maybe I could use some
simplified
>> method, as zigbee has known preamble of 256 chips, which is 128 chips
in
>> I branch, >> and 128 chips in Q branch. Sampling rate of my ADC is 64Msps, and I
was
>> doing down sapling to 4Msps. > >Not enough detail, and all the references to specifications landed on >paywalls. > >Have you done a literature search on carrier synchronization for ZigBee?
>Presumably the designers of the specification purposely made >synchronization easy. > >In general, when there's a preamble it's made to be easy to detect even >if you're not quite exactly synchronized, and to synchronize to. > >-- > >Tim Wescott >Wescott Design Services >http://www.wescottdesign.com
Hi, I agree I made mistake with reference. To correct myself here is link with collection of references https://www.dropbox.com/sh/vdhx6zgsmkj1cl4/AACQinDzrgD5biQSe4e0U6vTa?dl=0 --------------------------------------- Posted through http://www.DSPRelated.com
On Sat, 03 Oct 2015 07:54:15 -0400, Randy Yates
<yates@digitalsignallabs.com> wrote:

>"tarikkazaz" <50642@DSPRelated> writes: > >> Hi all, >> >> I am working on implementation of zigbee device on FPGA. Till now I have >> made Tx which is compatible with commercial devices. Also I have Rx which >> is working with my own Tx, but does not work with commercial devices. >> Major reason why my receiver can not decode signals from commercial >> devices is frequency offset. So far I tried to apply zero crossing >> approach to decode signal, but that does not help >> (http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1615158&url=http%3A%2F%2Fieeexplore.ieee.org%2Fxpls%2Fabs_all.jsp%3Farnumber%3D1615158). >> Previously I have been doing correlation of known chips with received >> signal (on that way I was able to decode signals from my own Tx). >> >> Because now I am planning to start with implementation of frequency offset >> compensation for my receiver, I would like to get advice. Which estimator >> do you suggest me to use? Or maybe I could use some simplified method, as >> zigbee has known preamble of 256 chips, which is 128 chips in I branch, >> and 128 chips in Q branch. Sampling rate of my ADC is 64Msps, and I was >> doing down sapling to 4Msps. > >Hi, > >MSK is FM, right?
No, MSK is not FM. It is essentially OQPSK with crappy filtering.
>Why not compute the phase of the IQ stream over some >computationally-convenient block and then simply do a least-squares fit >of a straight line? The slope of that line is then your frequency >offset. This assumes there is an even number of ones and zeros. And the >longer the block, the better the estimate via averaging. > >I would think this could at least give you a coarse frequency offset >estimation. >-- >Randy Yates >Digital Signal Labs >http://www.digitalsignallabs.com
Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
On Fri, 02 Oct 2015 07:16:27 -0500, "tarikkazaz" <50642@DSPRelated>
wrote:

>Hi all, > >I am working on implementation of zigbee device on FPGA. Till now I have >made Tx which is compatible with commercial devices. Also I have Rx which >is working with my own Tx, but does not work with commercial devices. >Major reason why my receiver can not decode signals from commercial >devices is frequency offset. So far I tried to apply zero crossing >approach to decode signal, but that does not help >(http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1615158&url=http%3A%2F%2Fieeexplore.ieee.org%2Fxpls%2Fabs_all.jsp%3Farnumber%3D1615158). >Previously I have been doing correlation of known chips with received >signal (on that way I was able to decode signals from my own Tx). > >Because now I am planning to start with implementation of frequency offset >compensation for my receiver, I would like to get advice. Which estimator >do you suggest me to use? Or maybe I could use some simplified method, as >zigbee has known preamble of 256 chips, which is 128 chips in I branch, >and 128 chips in Q branch. Sampling rate of my ADC is 64Msps, and I was >doing down sapling to 4Msps. > >Thank you in advance,
Do you have a phase recovery loop? How far off does the frequency need to be before you can no longer demodulate it? There are a number of ways to detect and remove frequency offset, depending on your tolerance for complexity and how much offset is expected. Since the preamble is a fixed sequence, you can run a cross-correlator on the repeating parts of the preamble (the nybbles, or even just the chip sequences), and compare the phase differences between the correlation peaks. This will also give you timing and phase estimates, which you need, anyway. i.e., it's a good way to do it. Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
>On Fri, 02 Oct 2015 07:16:27 -0500, "tarikkazaz" <50642@DSPRelated> >wrote: > >>Hi all, >> >>I am working on implementation of zigbee device on FPGA. Till now I
have
>>made Tx which is compatible with commercial devices. Also I have Rx
which
>>is working with my own Tx, but does not work with commercial devices. >>Major reason why my receiver can not decode signals from commercial >>devices is frequency offset. So far I tried to apply zero crossing >>approach to decode signal, but that does not help >>(http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber15158&url=http%3A%2F%2Fieeexplore.ieee.org%2Fxpls%2Fabs_all.jsp%3Farnumber%3D1615158). >>Previously I have been doing correlation of known chips with received >>signal (on that way I was able to decode signals from my own Tx). >> >>Because now I am planning to start with implementation of frequency
offset
>>compensation for my receiver, I would like to get advice. Which
estimator
>>do you suggest me to use? Or maybe I could use some simplified method,
as
>>zigbee has known preamble of 256 chips, which is 128 chips in I branch, >>and 128 chips in Q branch. Sampling rate of my ADC is 64Msps, and I was >>doing down sapling to 4Msps. >> >>Thank you in advance, > >Do you have a phase recovery loop? How far off does the frequency >need to be before you can no longer demodulate it? > >There are a number of ways to detect and remove frequency offset, >depending on your tolerance for complexity and how much offset is >expected. Since the preamble is a fixed sequence, you can run a >cross-correlator on the repeating parts of the preamble (the nybbles, >or even just the chip sequences), and compare the phase differences >between the correlation peaks. This will also give you timing and >phase estimates, which you need, anyway. i.e., it's a good way to do >it. > > >Eric Jacobsen >Anchor Hill Communications >http://www.anchorhill.com
Hi Eric, I will try to follow your advice, will try to test algorithm in matlab. Maybe I will have few questions afterwards. P.S. I should handle up to +-200KHz frequency offset. Thank you. --------------------------------------- Posted through http://www.DSPRelated.com
eric.jacobsen@ieee.org (Eric Jacobsen) writes:

> On Sat, 03 Oct 2015 07:54:15 -0400, Randy Yates > <yates@digitalsignallabs.com> wrote: > >>"tarikkazaz" <50642@DSPRelated> writes: >> >>> Hi all, >>> >>> I am working on implementation of zigbee device on FPGA. Till now I have >>> made Tx which is compatible with commercial devices. Also I have Rx which >>> is working with my own Tx, but does not work with commercial devices. >>> Major reason why my receiver can not decode signals from commercial >>> devices is frequency offset. So far I tried to apply zero crossing >>> approach to decode signal, but that does not help >>> (http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1615158&url=http%3A%2F%2Fieeexplore.ieee.org%2Fxpls%2Fabs_all.jsp%3Farnumber%3D1615158). >>> Previously I have been doing correlation of known chips with received >>> signal (on that way I was able to decode signals from my own Tx). >>> >>> Because now I am planning to start with implementation of frequency offset >>> compensation for my receiver, I would like to get advice. Which estimator >>> do you suggest me to use? Or maybe I could use some simplified method, as >>> zigbee has known preamble of 256 chips, which is 128 chips in I branch, >>> and 128 chips in Q branch. Sampling rate of my ADC is 64Msps, and I was >>> doing down sapling to 4Msps. >> >>Hi, >> >>MSK is FM, right? > > No, MSK is not FM.
I don't believe this is correct, Eric. MSK is a special limiting case of FSK (the minimum frequency separation of FSK), and FSK is frequency-shift keying, which is a form of FM. Thus by transitive logic, MSK is a form of FM. If this is not correct, point out my error. -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com