Thursday, March 28, 2013

Contemplating Privacy and Radio Communications 3

First, let's pause for a quick summary of the first two parts.  Radio communications is extremely useful, but inherently not private.  Once a signal is launched from your antenna it expands in all directions and can potentially be heard by anyone who can put together (or buy) a receiver.  Two ways of addressing the privacy concerns are to make the signal harder to detect, and to hide the contents of the message in some way, either encoding it in common language that doesn't mean what it says, or encrypting it in a way that's essentially impossible to break.  Simple ways to make a signal harder to find include to reduce power to the bare minimum needed, use brief messages, turn off radios when not in use, and to use a continually changing set of frequencies, in a relatively unused part of the spectrum. Finally, this is somewhat academic because while some of these techniques (such as reducing transmitter power, or using other frequencies) are encouraged, others (such as encryption) are illegal. 

What other technical means are there to ensure that only an intended recipient could get the message?  An obvious one is to not use radios.  Use wire, or optical fiber.  The equally obvious disadvantage is inflexibility.  First, the users have to be in located where the wire is.  Second, if the wire is found it can either be cut, or more dangerously, it can be tapped (yes, fiber optics can be tapped).

A way to decrease the power even further is to ask whether it's possible to get information out of a weaker, noisier signal, a lower SNR.  This has been researched for much of the last hundred years of radio, and it's quite possible to do that.  I have to go over some background before I get to signals below the noise.

A necessary detour here is into information and bandwidth.  Even people who are relatively new to communications probably have an idea about bandwidth - it's what you're buying when you buy a fast internet pipe.  The universe is put together in such a way that to send more information either takes more time or more bandwidth.  That tells us that time and bandwidth are inversely related - if you were online in the days of 56k dial-up modems (or 28k, or... or if you're still on dial-up) you'll remember how long it took to download a jpeg. 

But what do we mean by information?  Among the most useful pieces of mathematical theory to be developed in the last century is Claude Shannon's information theory.  Information theory starts with a concept that's so simple it's stupid: if I tell you something you already know, I haven't conveyed any information.  I like to use the example that if I come in from going to the mailbox some day in August, and I say, "it's hot out there", I've conveyed no information.  You know it's hot because you know it's August and this is Florida.  What conveys information is telling you something you don't know: to radio signals that means changes in state.  

A lot of very useful thoughts come out of that simple idea.  Let's say I put a radio signal on the air.  No modulation, no voice, music, nothing - what's called a carrier.  The only information I've conveyed is the presence of that signal.  That's not necessarily useless: I could be telling you "I made it to the destination". The world's superpowers have used a signal like this for nuclear submarines.  The signal being there tells them the homeland hasn't been vaporized so there's no reason to launch their nuclear doomsday weapons.  A digital way of looking at it is that I've conveyed one bit of information.  Friends from the Three Letter Agencies will tell you it's possible to encode more information with a single carrier, the time of day can have meaning.  The exact frequency could mean something.  We could agree in advance that one frequency means "everything is ok" and the other means "mission failed".

Shannon tells us that the way to get optimum information transmission is make changes in the signal.  The simplest way to add information to the carrier is to turn it on and off.  On Off Keying (OOK) can be Morse code, or it can be a custom code - some cars' remote door lock systems use OOK.  Adding information to the signal - modulating it - increases its bandwidth.  In a Morse code system, the bandwidth is usually considered to be about 5 Hz for every Word Per Minute (WPM) of code speed, so a 20 WPM signal occupies 100 Hz, while a perfect carrier has virtually zero bandwidth.  Think how long a sheet of text would take to send at 20 WPM, what used to be considered an expert's speed.  Voice conveys more information but, of course, occupies more bandwidth. 

Over the years, radio experimenters have developed a broad set of techniques to modulate a radio signal.  Any characteristic of a signal can be controlled or modulated from OOK to control of amplitude with the information or Amplitude Modulation (AM), control of the frequency or Frequency Modulation (FM), Phase Modulation (PM) and probably the most common systems today are Phase Shift modulated (called Phase Shift Keying or PSK, in general).  In most of those systems, the bandwidth used is the minimum required for the information to be transmitted. 

An interesting aspect of modulation is that some improvement in SNR can be obtained by using more bandwidth than the signal requires.  Broadcast FM radio achieves process gain by using rather wide bandwidths - any signal level higher than the threshold gives more SNR than a narrowband modulation would. 

Putting the idea of process gain together with that of LPI/LPE design, we've found advantages to using much more bandwidth than the data requires.  This is called Spread Spectrum or SS.  A few weeks ago, I posted about how actress and mathematician Hedy Lamarr developed a way of hiding radio transmissions based on changing the channels between a submarine and a torpedo.  Most workers consider her patent the invention of FHSS or Frequency Hopping Spread Spectrum, the simplest form of SS. What makes it impressive is that you can't just change channel whenever you feel like it - what if you're in the middle of a command to the torpedo?  The hop rate has to be slower than the modulation rate, and likely synchronized to it, or the modulation gets lost.  She had to understand that. 

Most systems, like the WiFi systems found everywhere, are a form of Direct Sequence Spread Spectrum, DSSS.  The idea is straight from Shannon.  To convey information, we have to change some aspect of the transmit signal.  What changes state the most?  Noise.  The most information is sent in a given time when the signal is most like noise  In DSSS, the modulation is a digital data stream which is then multiplied by a pseudorandom number to make it more noise-like (more transitions).  The pseudorandom number is usually generated in a circuit consisting of a sequence of logic elements, so it's also called pseudonoise or PN sequence.  This multiplication can make the spectrum as wide as we'd like it.  Why would we want to?  It becomes harder to jam.  Spread spectrum takes the information (blue) and spreads it out over a wider chunk of spectrum, like this (yellow is the resulting spectrum which gets transmitted) :
The wider spectrum has a lower peak power because all of the transmitter power gets spread over the wider chunk of spectrum.  At the receiver, this power can be below the thermal noise in that bandwidth, which makes good on my promise to tell you about modulation that can work with lower SNRs.  The receiver has the task of synchronizing itself to the received data, a process called correlation.  When it does so, it turns that wide pedestal of data back into the narrow modulation the transmitter started with.  In the process something interesting happens to a jammer (shown in red, here).  The jammer gets de-correlated and spreads out, reducing its power, making it less effective.    
This requires a more complex receiver.  When you think about it, the whole point of this is making the transmitted signal harder to detect.  We also make it harder for us to detect our own signal.  
   
This is a lot for one reading.  Next we'll get into some digital modulation modes that are easy to get started in. 


3 comments:

  1. Good info! Keep it coming.
    Any thoughts on using a radio based modem to push short PGP based text messages via UHF/VHF? Hypothetically of course....

    ReplyDelete
    Replies
    1. Been going there all along. Check out the next post, part 4.

      Delete
  2. Hm-m-m...
    Getting very interesting :)

    (Having to be logged in to WP is sometimes a pain -hence "Anonymous")

    Q

    ReplyDelete