1
\$\begingroup\$

We are implementing a 2.4 GHz RF link using a TI CC2541 chip (http://www.ti.com/product/cc2541) and we are new to RF design. We want a robust, low-bandwidth, low-latency link. We were thinking of using DSSS and GFSK.

It does not appear to implement hardware-based DSSS. Will I still get the same benefits of DSSS if I perform the sequencing in software? (i.e, I could transform 1 => 0011110000101011 and 0 into 0111010000110011 and then transmit the transformed sequence) Will I still achieve interference rejection? It seems that someone could simply transmit 10101010... on my frequency at a higher power and jam my signal before it gets to the demodulator. It seems to me that the spectrum reconstruction has to occur in an analog stage.

Can someone explain why or why not the software-based would work? If it won't work, what's different about the hardware-based system. If it does, what's the mathematics behind it?

\$\endgroup\$
1
  • \$\begingroup\$ A software based DSSS scheme with the CC2541 will not work, it will not reject undefined symbols (Hence no processing gain), and the larger packets will increase your PER. Also, frequency modulation schemes will require much higher bandwidth than PSK at such bitrates. You can however, implement FHSS with the CC2541. \$\endgroup\$
    – Lior Bilia
    Commented Feb 15, 2014 at 15:32

1 Answer 1

2
\$\begingroup\$

I am not an expert in the field, but I don't think you can do DSSS in software (with this chip). DSSS despreading requires the analog values of the received carrier as they add and subtract linearly with multiple stations transmitting simultaneously. If you can't get access to the analog level of the received carrier, you can't apply the math with the key to recover your data. Even if your GFSK receiver saturates at 1 or -1, you still need the mid-level 0 value on reception as part of the data to be used with your key to de-spread it. (As an example where it can be done, take a look at Software Defined Radios, these devices can sample the full-width spectrum and thus have the entire analog signal in a digital form, and can do DSSS; many GPS receivers are done this way)

As for someone transmitting and jamming you, if they transmit a high power on a single channel that will not affect your spread-spectrum data stream, but if they transmit spread-spectrum at a higher power, it will just add or subtract with your own carrier and your data can be recovered.

If they transmit (at any power level) and don't have your PN key, they will be essentially ignored by the despreader. I'll demonstrate this below. But if the bad guy is using high enough spread-spectrum power to overload your receiver, then you will likely be stuck, and not much can be done about it anyways.

Let's use a simple example.. we have a PN generator that creates the following bitstream: 001111000010101101110100001100 and we use 6 of these bits from the stream per 1 data bit. The 6 bits are called chips so as not to confuse them with data bits. So 1 bit is 6 chips and the chip rate is 6x the data rate. We'll use the bits like this: 001111 000010 101101 110100 001100

To send the data sequence = {0,1,1,0,1}, it would be spread with an XOR of the chips from the PN generator:

0 ⊕ 001111 = 110000  = [ 1  1 -1 -1 -1 -1 ]  ( bit 0 )
1 ⊕ 000010 = 000010  = [-1 -1 -1 -1  1 -1 ]  ( bit 1 )
1 ⊕ 101101 = 101101  = [ 1 -1  1  1 -1  1 ]  ( bit 2 )
0 ⊕ 110100 = 001011  = [-1 -1  1 -1  1  1 ]  ( bit 3 )
1 ⊕ 001100 = 001100  = [-1 -1  1  1 -1 -1 ]  ( bit 4 )

if the bad guy also transmits a spread sequence of 01010101.... then it will be sent like this:

[ -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 ... ]

and no matter how it aligns with your sequence, your sequence can be recovered. Your carrier and the bad guy's carrier will add or subtract linearly, the data can be recovered after doing the inner product and normalizing the values. Continuing with your example:

0: [ 1  1 -1 -1 -1 -1 ]  ( your data bit 0 )
+: [ 1 -1  1 -1  1 -1 ]  ( the bad guy trying to overwrite you )
=: [ 2  0  0 -2  0 -2 ]  ( what your receiver sees )

If you take what your receiver sees, and apply the inner product with your key for bit 0, which is 001111 or [-1 -1 1 1 1 1] you get this:

bit 0 = [ 2  0  0 -2  0 -2 ] * [-1 -1  1  1  1  1] = (-2+0+0-2+0-2) = -6 => -1 => 0

I'll do the second bit with 2 bad guys trying to overwrite you:

1: [-1 -1 -1 -1  1 -1 ]  ( your data bit 1 )
+: [ 1 -1  1 -1  1 -1 ]  ( the bad guy trying to overwrite you )
+: [-1  1  1 -1 -1  1 ]  ( second bad guy ! ) 
=: [-1 -1  1 -3  1 -1 ]  ( what your receiver sees )

Again, take what your receiver sees and apply the inner product with the key for bit 1, which is 000010, or [-1 -1 -1 -1 1 -1]:

bit 1 = [-1 -1  1 -3  1 -1 ] * [-1 -1 -1 -1  1 -1] = (1+1-1+3+1+1) = 6 => 1 => 1 

So bit \$0\$ is recovered as \$0\$, bit \$1\$ is recovered as \$1\$, even with the bad guys trying to overwrite the data stream. This is the essence of DSSS, and I'll leave the rest of the data as an exercise. It is quite immune to interference. However, for you to do this in software you can see that you need to have access to the analog values of the carrier level, like [-2,+3, 0 ...] and not just the bits.

This chip only gives access to the demodulated GFSK bitstream, which is not enough information. As pointed out in the comments, it can be done in software if you have access to the full bandwidth data.

\$\endgroup\$
3
  • \$\begingroup\$ I don't know why you say you need a 3-state output from the receiver. Binary receivers work just fine. So do software-only receivers, as long as you capture the full bandwidth of the spread signal (which a CC2541 won't do). \$\endgroup\$
    – Dave Tweed
    Commented Feb 15, 2014 at 15:57
  • \$\begingroup\$ do you mean the I/Q signals? yes, if you got access directly to the I/Q ADC output data stream at full bandwidth you could recover it all. I think that is in line with what I was saying, that you can't just use the GFSK recovered datastream, which is a bit stream. If you just had a bit stream you could not apply the de-spreading math. However, if you had the I/Q at full bandwidth then you essentially have all the "analog" data as I said, but in digital form \$\endgroup\$
    – Brian Onn
    Commented Feb 15, 2014 at 16:03
  • \$\begingroup\$ @DaveTweed I edited the answer hopefully to make it clearer.. thanks! \$\endgroup\$
    – Brian Onn
    Commented Feb 15, 2014 at 16:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.