Chapter 4: Communication Protocols and Modulation
4.1 Baseband Data Format and Protocol
Let’s first take a look at what information we may want to transfer to the other side. This is important in determining what bandwidth the system needs.
Change-of-state source data
Many short-range systems only have to relay information about the state of a contact. This is true of the security system of Figure 4-2 where an infrared motion detector notifies the control panel when motion is detected. Another example is the push-button transmitter, which may be used as a panic button or as a way to activate and deactivate the control system, or a wireless smoke detector, which gives advance warning of an impending fire. There are also what are often referred to as “technical” alarms—gas detectors, water level detectors, and low and high temperature detectors—whose function is to give notice of an abnormal situation.
4
C H A P T E R
Figure 4-1: Radio Communication Link Diagram
Figure 4-2: Security System
SOURCE DATA
ENCODER RF MODULATOR
AND AMPLIFIER
RF DOWNCONVERTER AND DETECTOR DECODER
RECONSTRUCTED DATA
TRANSMITTER
RECEIVER
MOTION DETECTOR
ARM/DISARM CONTROL
PANIC BUTTON
CENTRAL STATION CONTROL PANEL
RECEIVER
SIREN
All these examples are characterized as very low-bandwidth informa- tion sources. Change of state occurs relatively rarely, and when it does, we usually don’t care if knowledge of the event is signaled tens or even hundreds of milliseconds after it occurs. Thus, required information bandwidth is very low—several hertz.
It would be possible to maintain this very low bandwidth by using the source data to turn on and off the transmitter at the same rate the informa- tion occurs, making a very simple communication link. This is not a practical approach, however, since the receiver could easily mistake random noise on the radio channel for a legitimate signal and thereby announce an intrusion, or a fire, when none occurred. Such false alarms are highly undesirable, so the simple on/off information of the transmitter must be coded to be sure it can’t be misinterpreted at the receiver.
This is the purpose of the encoder shown in Figure 4-1. This block creates a group of bits, assembled into a frame, to make sure the receiver will not mistake a false occurrence for a real one. Figure 4-3 is an example of a message frame. The example has four fields. The first field is a preamble with start bit, which conditions the receiver for the transfer of information and tells it when the message begins. The next field is an identifying address. This address is unique to the transmitter and its purpose is to notify the receiver from where, or from what unit, the mes- sage is coming. The data field follows, which may indicate what type of event is being signaled, followed, in some protocols, by a parity bit or bits to allow the receiver to determine whether the message was received correctly.
Figure 4-3: Message Frame
1 0 1 0 1 1 0 1 0 0 0 1 1 0 0 1 1 0 0 0 1 0
PREAMBLE ADDRESS
DATA
PARITY
Address Field
The number of bits in the address field depends on the number of different transmitters there may be in the system. Often the number of possibilities is far greater than this, to prevent confusion with neighboring, independent systems and to prevent the statistically possible chance that random noise will duplicate the address. The number of possible addresses in the code is 2L1, where L1 is the length of the message field. In many simple security systems the address field is determined by dip switches set by the user. Commonly, eight to ten dip switch positions are available, giving 256 to 1024 address possibilities. In other systems, the address field, or device identity number, is a code number set in the unit micro- controller during manufacture. This code number is longer than that produced by dip switches, and may be 16 to 24 bits long, having 65,536 to 16,777,216 different codes. The longer codes greatly reduce the chances that a neighboring system or random event will cause a false alarm. On the other hand, the probability of detection is lower with the longer code because of the higher probability of error. This means that
a larger signal-to-noise ratio is required for a given probability of detection.
In all cases, the receiver must be set up to recognize transmitters in its own system. In the case of dip-switch addressing, a dip switch in the receiver is set to the same address as in the transmitter. When several transmitters are used with the same receiver, all transmitters must have the same identification address as that set in the receiver. In order for each individual transmitter to be recognized, a subfield of two to four extra dip switch positions can be used for this differentiation. When a built-in individual fixed identity is used instead of dip switches, the receiver must be taught to recognize the identification numbers of all the transmitters used in the system; this is done at the time of installation. Several common ways of accomplishing this are:
(a) Wireless “learn” mode. During a special installation procedure, the receiver stores the addresses of each of the transmitters which are caused to transmit during this mode;
(b) Infrared transmission. Infrared emitters and detectors on the transmitter and receiver, respectively, transfer the address information;
(c) Direct key-in. Each transmitter is labeled with its individual ad- dress, which is then keyed into the receiver or control panel by the system installer;
(d) Wired learn mode. A short cable temporarily connected between the receiver and transmitter is used when performing the initial address recognition procedure during installation.
Advantages and disadvantages of the two addressing systems Dip switch
s e g a t n a v d
A Disadvantages
s r e t t i m s n a r t f o r e b m u n d e t i m i l n U
. r e v i e c e r a h t i w d e s u e b n a c
s e s a e r c n i s t i b f o r e b m u n d e t i m i L
m o r f e c n e r e f r e t n i d n a s m r a l a e s l a f
. s m e t s y s t n e c a j d a y l l a i c r e m m o c h t i w d e s u e b n a C
d n a s r e d o c n e a t a d e l b a l i a v a
. s r e d o c e d
g n i d o c r o f d e n e p o e b t s u m e c i v e D
. n o i t a l l a t s n i g n i r u d e
b n a c r e v i e c e r r o r e t t i m s n a r T
g n i d o c e r t u o h t i w d e c a l p e r y l i s a e
. l a n i m r e t e t i s o p p o e h t
e r a m e t s y s a n i s e c i v e d e l p i t l u M
e l p m i s t s o m n i e l b a h s i u g n i t s i d t o n
. s m e t s y s
o t e l b a r e n l u v e r a s m e t s y s l o r t n o C
e h t e c n i s n o i t a r e p o d e z i r o h t u a n u
y b d e t a c i l p u d e b n a c e d o c s s e r d d a
. r o r r e d n a l a i r t
Internal fixed code identity
s e g a t n a v d
A Disadvantages
s e c u d e r s t i b e d o c f o r e b m u n e g r a L
. s m r a l a e s l a f f o y t i l i b i s s o p
f o y t i l i b a b o r p s e c u d e r e d o c r e g n o L
. n o i t c e t e d t
u o h t i w p u t e s e b n a c m e t s y S
. r e t t i m s n a r t g n i n e p o
r e v i e c e r r o r e t t i m s n a r t g n i c a l p e R
g n i n r a e l e d o c e h t g n i o d e r s e v l o v n i
. e r u d e c o r p y l l a u d i v i d n i s i r e t t i m s n a r t h c a E
. r e v i e c e r y b d e z i n g o c e r
n a c s r e t t i m n a r t f o r e b m u n d e t i m i L
. r e v i e c e r h c a e h t i w d e s u e b
d e t a c i d e d a h t i w d e s u e b t s u M
d e s u e b t o n n a C . r e l l o r t n o c o r c i m
d n a s r e d o c n e d r a d n a t s h t i w
. s r e d o c e d
Code-hopping addressing
While using a large number of bits in the address field reduces the possibility of false identification of a signal, there is still a chance of purposeful duplication of a transmitter code to gain access to a controlled entry. Wireless push buttons are used widely for access control to vehicles and buildings. Radio receivers exist, popularly called “code grabbers,”
which receive the transmitted entry signals and allow retransmitting them for fraudulent access to a protected vehicle or other site. To counter this possibility, addressing techniques were developed that cause the code to change every time the push button is pressed, so that even if the transmis- sion is intercepted and recorded, its repetition by a would-be intruder will not activate the receiver, which is now expecting a different code. This method is variously called code rotation, code hopping, or rolling code addressing. In order to make it virtually impossible for a would-be in- truder to guess or try various combinations to arrive at the correct code, a relatively large number of address bits are used. In some devices, 36-bit addresses are employed, giving a total of over 68 billion possible codes.
In order for the system to work, the transmitter and receiver must be synchronized. That is, once the receiver has accepted a particular trans- mission, it must know what the next transmitted address will be. The addresses cannot be sequential, since that would make it too easy for the intruder to break the system. Also, it is possible that the user might press the push button to make a transmission but the receiver may not receive it, due to interference or the fact that the transmitter is too far away. This could even happen several times, further unsynchronizing the transmitter and the receiver. All of the code-hopping systems are designed to prevent such unsynchronization.
Following is a simplified description of how code hopping works, aided by Figure 4-4.
Both the receiver and the transmitter use a common algorithm to generate a pseudorandom sequence of addresses. This algorithm works by manipulating the address bits in a certain fashion. Thus, starting at a known address, both sides of the link will create the same next address.
For demonstration purposes, Figure 4-4 shows the same sequence of two- digit decimal numbers at the transmitting side and the receiving side. The solid transmitter arrow points to the present transmitter address and the solid receiver arrow points to the expected receiver address. After trans-
Figure 4-4: Code Hopping 57
24 53 18 36 44 TRANSMITTER
57 24 53 18 36 44 RECEIVER
TRIAL 1 TRIAL 2 TRIAL 3
mission and reception, both transmitter and receiver calculate their next addresses, which will be the same. The arrows are synchronized to point to the same address during a system set-up procedure. As long as the receiver doesn’t miss a transmission, there is no problem, since each side will calculate an identical next address. However, if one or more transmis- sions are missed by the receiver, when it finally does receive a message, its expected address will not match the received address. In this case it will perform its algorithm again to create a new address and will try to match it. If the addresses still don’t match, a new address is calculated until either the addresses match or a given number of trials have been made with no success. At this point, the transmitter and receiver are
unsynchronized and the original setup procedure has to be repeated to realign the transmitter and receiver addresses.
The number of trials permitted by the receiver may typically be between 64 and 256. If this number is too high, the possibility of compromising the system is greater (although with a 36-bit address a very large number of trials would be needed for this) and with too few trials, the frequency of inconvenient resynchronization would be greater. Note that a large number of trials takes a lot of time for computations and may cause a significant delay in response.
Several companies make rolling code components, among them Microchip, Texas Instruments, and National Semiconductor.
Data Field
The next part of the message frame is the data field. Its number of bits depends on how many pieces of information the transmitter may send to the receiver. For example, the motion detector may transmit three types of information: motion detection, tamper detection, or low battery.
Parity Bit Field
The last field is for error detection bits, or parity bits. As discussed later, some protocols have inherent error detection features so the last field is not needed.
Baseband Data Rate
Once we have determined the data frame, we can decide on the appro- priate baseband data rate. For the security system example, this rate will usually be several hundred hertz up to a maximum of a couple of kilo- hertz. Since a rapid response is not needed, a frame can be repeated several times to be more certain it will get through. Frame repetition is needed in systems where space diversity is used in the receiver. In these systems, two separate antennas are periodically switched to improve the probability of reception. If signal nulling occurs at one antenna because of the multipath phenomena, the other antenna will produce a stronger signal, which can be correctly decoded. Thus, a message frame must be sent more often to give it a chance to be received after unsuccessful reception by one of the antennas.
Supervision
Another characteristic of digital event systems is the need for link supervision. Security systems and other event systems, including medical emergency systems, are one-way links. They consist of several transmit- ters and one receiver. As mentioned above, these systems transmit relatively rarely, only when there is an alarm or possibly a low-battery condition. If a transmitter ceases to operate, due to a component failure, for example, or if there is an abnormal continuing interference on the radio channel, the fact that the link has been broken will go undetected. In the case of a security system, the installation will be unprotected, possibly, until a routine system inspection is carried out. In a wired system, such a possibility is usually covered by a normally energized relay connected through closed contacts to a control panel. If a fault occurs in the device, the relay becomes unenergized and the panel detects the opening of the contacts. Similarly, cutting the connecting wires will also be detected by the panel. Thus, the advantages of a wireless system are compromised by the lower confidence level accompanying its operation.
Many security systems minimize the risk of undetected transmitter failure by sending a supervisory signal to the receiver at a regular interval.
The receiver expects to receive a signal during this interval and can emit a supervisory alarm if the signal is not received. The supervisory signal
must be identified as such by the receiver so as not to be mistaken for an alarm.
The duration of the supervisory interval is determined by several factors:
■ Devices certified under FCC Part 15 paragraph 15.231, which applies to most wireless security devices in North America, may not send regular transmissions more frequently than one per hour.
■ The more frequently regular supervision transmissions are made, the shorter the battery life of the device.
■ Frequent supervisory transmissions when there are many transmit- ters in the system raise the probability of a collision with an alarm signal, which may cause the alarm not to get through to the re- ceiver.
■ The more frequent the supervisory transmissions, the higher the confidence level of the system.
While it is advantageous to notify the system operator at the earliest sign of transmitter malfunction, frequent supervision raises the possibility that a fault might be reported when it doesn’t exist. Thus, most security systems determine that a number of consecutive missing supervisory transmissions must be detected before an alarm is given. A system which specifies security emissions once every hour, for example, may wait for eight missing supervisory transmissions, or eight hours, before a supervi- sory alarm is announced. Clearly, the greater the consequences of lack of alarm detection due to a transmitter failure, the shorter the supervision interval must be.
Continuous digital data
In other systems flowing digital data must be transmitted in real time and the original source data rate will determine the baseband data rate. This is the case in wireless LANs and wireless peripheral-connecting devices.
The data is arranged in message frames, which contain fields needed for correct transportation of the data from one side to the other, in addition to the data itself.
An example of a frame used in synchronous data link control (SDLC) is shown in Figure 4-5. It consists of beginning and ending bytes that delimit the frame in the message, address and control fields, a data field of undefined length, and check bits or parity bits for letting the receiver check whether the frame was correctly received. If it is, the receiver sends a short acknowledgment and the transmitter can continue with the next frame. If no acknowledgment is received, the transmitter repeats the message again and again until it is received. This is called an ARQ (auto- matic repeat query) protocol. In high-noise environments, such as
encountered on radio channels, the repeated transmissions can signifi- cantly slow down the message throughput.
More common today is to use a forward error control (FEC) protocol.
In this case, there is enough information in the parity bits to allow the receiver to correct a small number of errors in the message so that it will not have to request retransmission. Although more parity bits are needed for error correction than for error detection alone, the throughput is greatly increased when using FEC on noisy channels.
In all cases, we see that extra bits must be included in a message to insure proper transmission, and the consequently longer frames require a higher transmission rate than what would be needed for the source data alone. This message overhead must be considered in determining the required bit rate on the channel, the type of digital modulation, and conse- quently the bandwidth.
Figure 4-5: Synchronous Data Link Control Frame
BEGINNING FLAG - 8 BITS
ADDRESS - 8 BITS
INFORMATION - ANY NO. OF BITS
ERROR DETECTION - 16 BITS
ENDING FLAG - 8 BITS CONTROL - 8
BITS
Analog transmission
Analog transmission devices, such as wireless microphones, also have a baseband bandwidth determined by the data source. A high-quality wire- less microphone may be required to pass 50 to 15,000 Hz, whereas an analog wireless telephone needs only 100 to 3000 Hz. In this case deter- mining the channel bandwidth is more straightforward than in the digital case, although the bandwidth depends on whether AM or FM modulation is used. In most short-range radio applications, FM is preferred—narrow- band FM for voice communications and wide-band FM for quality voice and music transmission.