ver the past decade, the rapid expansion of digital communication technologies has been simply astounding. Internet, a word and concept once familiar only to technologists and the scientific community, has permeated every aspect of people's daily lives. It is quite difficult to find any individual in a modern society that has not been touched by new communication technologies ranging from cellular phones to Bluetooth. This book examines the basic principles of communication by electric signals. Before modern times, messages were carried by runners, carrier pigeons, lights, and fires. These schemes were adequate for the distances and "data rates" of the age. In most parts of the world, these modes of communication have been superseded by electrical communication systems,* which can transmit signals over much longer distances (even to distant planets and galaxies) and at the speed of light. Electrical communication is dependable and economical; communication technologies improve productivity and energy conservation. Increasingly, business meetings are conducted through teleconferences, saving the time and energy formerly expended on travel. Ubiquitous communication allows real-time management and coordination of project participants from around the globe. E-mail is rapidly replacing the more costly and slower "snail mails." E-commerce has also drastically reduced some costs and delays associated with marketing, while customers are also much better informed about new products and product information. Traditional media outlets such as television, radio, and newspapers have been rapidly evolving in the past few years to cope with, and better utilize, the new communication and networking technologies. The goal of this textbook is to provide the fundamental technical knowledge needed by next-generation communication engineers and technologists for designing even better communication systems of the future.
Figure 1.1
Some examples of communications systems.
Wireless computers
Wire-line network
merely learning the operations of those existing systems they have studied; More importantly, they can acquire the basic knowledge needed to design and analyze new systems never encountered in a textbook. To begin, it is essential to establish a typical communication system model as shown in Fig. 1.2. The key components of a communication system are as follows. The source originates a message, such as a human voice, a television picture, an e-mail message, or data. If the data is nonelectric (e.g., human voice, e-mail text, television video), it must be converted by an input transducer into an electric waveform referred to as the baseband signal or message signal through physical devices such as a microphone, a computer keyboard, or a CCD camera. The transmitter modifies the baseband signal for efficient transmission. The transmitter may consist of one or more subsystems: an A/D converter, an encoder, and a modulator. Similarly, the receiver may consist of a demodulator, a decoder, and a D/A converter.
Figure 1.2
Communication system.
Input message
Input signal
The channel is a medium of choice that can convey the electric signals at the transmitter output over a distance. A typical channel can be a pair of twisted copper wires (telephone and DSL), coaxial cable (television and internet), an optical fiber, or a radio link. Additionally, a channel can also be a point-to-point connection in a mesh of interconnected channels that form a communication network. The receiver reprocesses the signal received from the channel by reversing the signal modifications made at the transmitter and removing the distortions made by the channel. The receiver output is fed to the output transducer, which converts the electric signal to its original formthe message. The destination is the unit to which the message is communicated. A channel is a physical medium that behaves partly like a filter that generally attenuates the signal and distorts the transmitted waveforms. The signal attenuation increases with the length of the channel, varying from a few percent for short distances to orders of magnitude in interplanetary communications. Signal waveforms are distorted because of physical phenomena such as frequency-dependent gains, multipath effects, and Doppler shift. For example, a frequency-selective channel causes different amounts of attenuation and phase shift to different frequency components of the signal. A square pulse is rounded or "spread out" during transmission over a low-pass channel. These types of distortion, called linear distortion, can be partly corrected at the receiver by an equalizer with gain and phase characteristics complementary to those of the channel. Channels may also cause nonlinear distortion through attenuation that varies with the signal amplitude. Such distortions can also be partly corrected by a complementary equalizer at the receiver. Channel distortions, if known, can also be precompensated by transmitters by applying channel-dependent predistortions. In a practical environment, signals passing through communication channels not only experience channel distortions but also are corrupted along the path by undesirable interferences and disturbances lumped under the broad term noise. These interfering signals are random and are unpredictable from sources both external and internal. External noise includes interference signals transmitted on nearby channels, human-made noise generated by faulty contact switches of electrical equipment, automobile ignition radiation, fluorescent lights or natural noise from lightning, microwave ovens, and cellphone emissions, as well as electric storms and solar and intergalactic radiation. With proper care in system design, external noise can be minimized or even eliminated in some cases. Internal noise results from thermal motion of charged particles in conductors, random emission, and diffusion or recombination of charged carriers in electronic devices. Proper care can reduce the effect of internal noise but can never eliminate it. Noise is one of the underlying factors that limit the rate of telecommunications. Thus in practical communication systems, the channel distorts the signal, and noise accumulates along the path. Worse yet, the signal strength decreases while the noise level remains
steady regardless of the distance from the transmitter. Thus, the signal quality is continuously worsening along the length of the channel. Amplification of the received signal to make up for the attenuation is to no avail because the noise will be amplified by the same proportion, and the quality remains, at best, unchanged.* These are the key challenges that we must face in designing modern communication systems.
,4/2
(a)
-A/2
(b)
(c)
(d)
A/2 (Fig 1.3a). In an M-ary case, M distinct electrical pulses (or waveforms) are used; each of the M pulses represents one of the M possible symbols. Once transmitted, the receiver must extract the message from a distorted and noisy signal at the channel output. Message extraction is often easier from digital signals than from analog signals because the digital decision must belong to the finite-sized alphabet. Consider a binary case: two symbols are encoded as rectangular pulses of amplitudes A/2 and A/2. The only decision at the receiver is to select between two possible pulses received; the fine details of the pulse shape are not an issue. A finite alphabet leads to noise and interference immunity. The receiver's decision can be made with reasonable certainty even if the pulses have suffered modest distortion and noise (Fig. 1.3). The digital message in Fig. 1.3a is distorted by the channel, as shown in Fig. 1.3b. Yet, if the distortion is not too large, we can recover the data without error because we need make only a simple binary decision: Is the received pulse positive or negative? Figure 1.3c shows the same data with channel distortion and noise. Here again, the data can be recovered correctly as long as the distortion and the noise are within limits. In contrast, the waveform shape itself in an analog message carries the needed information, and even a slight distortion or interference in the waveform will show up in the received signal. Clearly, a digital communication system is more rugged than an analog communication system in the sense that it can better withstand noise and distortion (as long as they are within a limit).
INTRODUCTION
Thus, it is impossible to avoid in-band accumulation of noise and distortion along the path. As a result, the distortion and the noise interference can accumulate over the entire transmission path as a signal traverses through the network. To compound the problem, the signal is attenuated continuously over the transmission path. Thus, with increasing distance the signal becomes weaker, whereas the distortion and the noise accumulate more. Ultimately, the signal, overwhelmed by the distortion and noise, is buried beyond recognition. Amplification is of little help, since it enhances both the signal and the noise equally. Consequently, the distance over which an analog message can be successfully received is limited by the first transmitter power. Despite these limitations, analog communication was used widely and successfully in the past for short- to medium-range communications. Nowadays, because of the advent of optical fiber communications and the dramatic cost reduction achieved in the fabrication of high-speed digital circuitry and digital storage devices, almost all new communication systems being installed are digital. But some old analog communication facilities are still in use, including those for AM and FM radio broadcasting.
m(rt
K
< \
\ -2mpf
~M
-nip
However, the sample values are still not digital because they lie in a continuous dynamic range. Here, the second step of quantization comes to rescue. Through quantization, each sample is approximated, or "rounded off," to the nearest quantized level, as shown in Fig. 1.4. As human perception has only limited accuracy, quantization with sufficient granularity does not compromise the signal quality. If amplitudes of the message signal m(t) lie in the range (mp, mp), the quantizer partitions the signal range into L intervals. Each sample amplitude is approximated by the midpoint of the interval in which the sample value falls. Each sample is now represented by one of the L numbers. The information is thus digitized. Hence, after the two steps of sampling and quantizing, the analog-to-digital (A/D) conversion is completed. The quantized signal is an approximation of the original one. We can improve the accuracy of the quantized signal to any desired level by increasing the number of levels L. For intelligibility of voice signals, for example, L = 8 or 16 is sufficient. For commercial use, L = 32 is a minimum, and for telephone communication, L= 128 or 256 is commonly used. Atypical distorted binary signal with noise acquired over the channel is shown in Fig. 1.3. If A is sufficiently large in comparison to typical noise amplitudes, the receiver can still correctly distinguish between the two pulses. The pulse amplitude is typically 5 to 10 times the rms noise amplitude. For such a high signal-to-noise ratio (SNR) the probability of error at the receiver is less than 10~6; that is, on the average, the receiver will make fewer than one error per million pulses. The effect of random channel noise and distortion is thus practically eliminated. Hence, when analog signals are transmitted by digital means, some error, or uncertainty, in the received signal can be caused by quantization, in addition to channel noise and interferences. By increasing L, we can reduce to any desired amount the uncertainty, or error, caused by quantization. At the same time, because of the use of regenerative repeaters, we can transmit signals over a much longer distance than would have been possible for the analog signal. As will be seen later in this text, the price for all these benefits of digital communication is paid in terms of increased processing complexity and bandwidth of transmission.
Example of PCM
encoding.
Digit
Binary equivalent
0000
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110
1111
The binary case is of great practical importance because of its simplicity and ease of detection. Much of today's digital communication is binary.* Although PCM was invented by P. M. Rainey in 1926 and rediscovered by A. H. Reeves in 1939, it was not until the early 1960s that the Bell System installed the first communication link using PCM for digital voice transmission. The cost and size of vacuum tube circuits were the chief impediments to the use of PCM in the early days before the discovery of semiconductor devices. It was the transistor that made PCM practicable. From all these discussions on PCM, we arrive at a rather interesting (and to certain extent not obvious) conclusionthat every possible communication can be carried on with a minimum of two symbols. Thus, merely by using a proper sequence of a wink of the eye, one can convey any message, be it a conversation, a book, a movie, or an opera. Every possible detail (such as various shades of colors of the objects and tones of the voice, etc.) that is reproducible on a movie screen or on the high-definition color television can be conveyed with no less accuracy, merely by winks of an eye.^
* An intermediate case exists where we use four basic pulses (quaternary pulses) of amplitudes A/2 and 3/4/2. A sequence of two quaternary pulses can form 4 x 4 = 16 distinct levels of values. ' Of course, to convey the information in a movie or a television program in real time, the winking would have to be at an inhumanly high speed. For example, the HDTV signal is represented by 19 million bits (winks) per second.
.-
to increase Ps, or one may reduce Ps if one is given bigger B. The rigorous proof of this will be provided in Chapter 14. In short, the two primary communication resources are the bandwidth and the transmitted power. In a given communication channel, one resource may be more valuable than the other, and the communication scheme should be designed accordingly. A typical telephone channel, for example, has a limited bandwidth (3 kHz), but the power is less restrictive. On the other hand, in space vehicles, huge bandwidth is available but the power is severely limited. Hence, the communication solutions in the two cases are radically different.
(1.1)
Here the channel capacity C is the upper bound on the rate of information transmission per second. In other words, C is the maximum number of bits that can be transmitted per second with a probability of error arbitrarily close to zero; that is, the transmission is as accurate as one desires. The capacity only points out this possibility, however; it does not specify how it is to be realized. Moreover, it is impossible to transmit at a rate higher than this without incurring errors. Shannon's equation clearly brings out the limitation on the rate of communication imposed by B and SNR. If there is no noise on the channel (assuming SNR = oo), then the capacity C would be oo, and communication rate could be arbitrarily high. We could then transmit any amount of information in the world over one noiseless channel. This can be readily verified. If noise were zero, there would be no uncertainty in the received pulse amplitude, and the receiver would be able to detect any pulse amplitude without error. The minimum pulse amplitude separation can be arbitrarily small, and for any given pulse, we have an infinite number of fine levels available. We can assign one level to every possible message. Because an infinite number of levels are available, it is possible to assign one level to any conceivable message. Cataloging such a code may not be practical, but that is beside the point. Rather, the point is that if the noise is zero, communication ceases to be a problem, at least theoretically. Implementation of such a scheme would be difficult because of the requirement of generation and detection of pulses of precise amplitudes. Such practical difficulties would then set a limit on the rate of communication. It should be remembered that Shannon's result, which represents the upper limit on the rate of communication over a channel, would be achievable only with a system of monstrous and impractical complexity, and with a time delay in reception approaching infinity. Practical systems operate at rates below the Shannon rate.
11
In conclusion, Shannon's capacity equation demonstrates qualitatively the basic role played by B and SNR in limiting the performance of a communication system. These two parameters then represent the ultimate limitation on the rate of communication. The possibility of resource exchange between these two basic parameters is also demonstrated by the Shannon equation. As a practical example of trading SNR for bandwidth B, consider the scenario in which we meet a soft-spoken man who speaks a little bit too fast for us to fully understand. This means that as listeners, our bandwidth B is too low and therefore, the capacity C is not high enough to accommodate the rapidly spoken sentences. However, if the man can speak louder (increasing power and hence the SNR), we are likely to understand him much better without changing anything else. This example illustrates the concept of resource exchange between SNR and B. Note, however, that this is not a one-to-one trade. Doubling the speaker volume allows the speaker to talk a little faster, but not twice as fast. This unequal trade effect is fully captured by Shannon's equation [Eq. (1.1)], where doubling the SNR cannot always compensate the loss of B by 50%.
Figure 1.6
Modulation: (a) carrier; (b) modulating (baseband) signal; (c) amplitudemodulated wave; (d) frequencymodulated
m(f)
(b)
(d)
letting the baseband signal hitch a ride on a high-frequency sinusoid (carrier). The carrier and the baseband signal may also be compared to a stone and a piece of paper. If we wish to throw a piece of paper, it cannot go too far by itself. But if it is wrapped around a stone (a carrier), it can be thrown over a longer distance.
13
range. If the various carriers are chosen sufficiently far apart in frequency, the spectra of the modulated signals (known as TV channels) will not overlap and thus will not interfere with each other. At the receiver (TV set), a tunable bandpass filter can select the desired station or TV channel for viewing. This method of transmitting several signals simultaneously, over nonoverlapping frequency bands, is known as frequency division multiplexing (FDM). A similar approach is also used in AM and FM radio broadcasting. Here the bandwidth of the channel is shared by various signals without any overlapping. Another method of multiplexing several signals is known as time division multiplexing (TDM). This method is suitable when a signal is in the form of a pulse train (as in PCM). When the pulses are made narrower, the spaces left between pulses of one user signal are used for pulses from other signals. Thus, in effect, the transmission time is shared by a number of signals by interleaving the pulse trains of various signals in a specified order. At the receiver, the pulse trains corresponding to various signals are separated.
1.4.3 Demodulation
Once multiple modulated signals have arrived at the receiver, the desired signal must be detected and recovered into its original baseband form. Note that because of FDM, the first stage of a demodulator typically requires a tunable bandpass filter so that the receiver can select the modulated signal at a predetermined frequency band specified by the transmission station or channel. Once a particular modulated signal has been isolated, the demodulator will then need to convert the carrier variation of amplitude, frequency, or phase, back into the baseband signal voltage. For the three basic modulation schemes of AM, FM, and PM, the corresponding demodulators must be designed such that the detector output voltage varies in proportion to the input modulated signal's amplitude, frequency, and phase, respectively. Once circuits with such response characteristics have been implemented, the demodulators can downconvert the modulated (RF) signals back into the baseband signals that represent the original source message, be it audio, video, or data.
15
It may appear paradoxical that in source coding we would remove redundancy, only to add more redundancy at the subsequent error correction coding. To explain why this is sensible, consider the removal of all redundancy in English through source coding. This would shorten the message by 50% (for bandwidth saving). However, for error correction, we may restore some systematic redundancy, except that this well-designed redundancy is only half as long as what was removed by source coding while still providing the same amount of error protection. It is therefore clear that a good combination of source coding and error correction coding can remove inefficient redundancy without sacrificing error correction. In fact, a very popular problem in this field is the persistent pursuit of joint source-channel coding that can maximally remove signal redundancy without losing error correction. How redundancy can enable error correction can be seen with an example: to transmit samples with L = 16 quantizing levels, we may use a group of four binary pulses, as shown in Fig. 1.5. In this coding scheme, no redundancy exists. If an error occurs in the reception of even one of the pulses, the receiver will produce a wrong value. Here we may use redundancy to eliminate the effect of possible errors caused by channel noise or imperfections. Thus, if we add to each code word one more pulse of such polarity as to make the number of positive pulses even, we have a code that can detect a single error in any place. Thus, to the code word 0001 we add a fifth pulse, of positive polarity, to make a new code word, 00011. Now the number of positive pulses is 2 (even). If a single error occurs in any position, this parity will be violated. The receiver knows that an error has been made and can request retransmission of the message. This is a very simple coding scheme. It can only detect an error; it cannot locate or correct it. Moreover, it cannot detect an even number of errors. By introducing more redundancy, it is possible not only to detect but also to correct errors. For example, for L = 16, it can be shown that properly adding three pulses will not only detect but also correct a single error occurring at any location. Details on the subject of error correcting codes will be discussed in Chapter 15.
16
INTRODUCTION
10 km apart. (A semaphore looked like a large human figure with signal flags in both hands.) A receiving semaphore operator would transcribe visually, often with the aid of a telescope, and then relay the message from his tower to the next, and so on. This visual telegraph became the government telecommunication system in France and spread to other countries, including the United States. The semaphore telegraph was eventually eclipsed by electric telegraphy. Today, only a few remaining streets and landmarks with the name "Telegraph Hill" remind us of the place of this system in history. Still, visual communications (via Aldis lamps, ship flags, and heliographs) remained an important part of maritime communications well into the twentieth century. These early telecommunication systems are optical systems based on visual receivers. Thus, they can cover only line-of-sight distance, and human operators are required to decode the signals. An important event that changed the history of telecommunication occurred in 1820, when Hans Christian Oersted of Denmark discovered the interaction between electricity and magnetism.2 Michael Faraday made the next crucial discovery, which changed the history of both electricity and telecommunications, when he found that electric current can be induced on a conductor by a changing magnetic field. Thus, electricity generation became possible by magnetic field motion. Moreover, the transmission of electric signals became possible by varying an electromagnetic field to induce current change in a distant circuit. The amazing aspect of Faraday's discovery on current induction is that it provides the foundation for wireless telecommunication over distances without line-of-sight, and more importantly, it shows how to generate electricity as an energy source to power such systems. The invention of the electric telegraph soon followed, and the world entered the modern electric telecommunication era. Modern communication systems have come a long way from their infancy. Since it would be difficult to detail all the historical events that mark the recent development of telecommunication, we shall instead use Table 1.1 to chronicle some of the most notable events in the development of modern communication systems. Since our focus is on electrical telecommunication, we shall refrain from reviewing the equally long history of optical (fiber) communications. It is remarkable that all the early telecommunication systems are symbol-based digital systems. It was not until Alexander Graham Bell's invention of the telephone system that analog live signals were transmitted. Live signals can be instantly heard or seen by the receiving users. The Bell invention that marks the beginning of a new (analog communication) era is therefore a major milestone in the history of telecommunications. Figure 1.7 shows a copy of an illustration from Bell's groundbreaking 1876 telephone patent. Scientific historians often hail this invention as the most valuable patent ever issued in history. The invention of telephone systems also marks the beginning of the analog communication era and live signal transmission. On an exciting but separate path, wireless communication began in 1887, when Heinrich Hertz first demonstrated a way to detect the presence of electromagnetic waves. French scientist Edouard Branly, English physicist Oliver Lodge, and Russian inventor Alexander Popov all made important contributions to the development of radio receivers. Another important contributor to this area was the Croatian-born genius Nikola Tesla. Building upon earlier experiments and inventions, Italian scientist and inventor Guglielmo Marconi developed a wireless telegraphy system in 1895 for which he shared the Nobel Prize in Physics in 1909. Marconi's wireless telegraphy marked a historical event of commercial wireless communications. Soon, the marriage of the inventions of Bell and Marconi allowed analog audio signals to go wireless, thanks to amplitude modulation (AM) technology. Quality music transmission via FM radio
17
1820 1831 1830-32 1837 1864 1866 1876 1878 1887 1896 1901 1906 1907 1915 1920 1921 1925 1928 1935 1941 1947 1948 1949 1950 1953 1958 1960 1962 1962 1968-9 1971 1973 1978 1984 1989 1991 1993 1993 1996 1997 1998 1999 2000 2003
First experiment of electric current causing magnetism (by Hans C. Oersted) Discovery of induced current from electromagnetic radiation (by Michael Faraday) Birth of telegraph (credited to Joseph Henry and Pavel Schilling) Invention of Morse code by Samuel F. B. Morse Theory of electromagnetic waves developed by James C. Maxwell First transatlantic telegraph cable in operation Invention of telephone by Alexander G. Bell First telephone exchange in New Haven, Connecticut Detection of electromagnetic waves by Heinrich Hertz Wireless telegraphy (radio telegraphy) patented by Guglielmo Marconi First transatlantic radio telegraph transmission by Marconi First amplitude modulation radio broadcasting (by Reginald A. Fessenden) Regular transatlantic radio telegraph service First transcontinental telephone service First commercial AM radio stations Mobile radio adopted by Detroit Police Department First television system demonstration (by Charles F. Jenkins) First television station W3XK in the United States First FM radio demonstration (by Edwin H. Armstrong) NTSC black and white television standard First commercial FM radio service Cellular concept first proposed at Bell Labs First major information theory paper published by Claude E. Shannon Invention of transistor by William Shockley, Walter Brattain, and John Bardeen The construction of Golay code for 3 (or fewer) bit error correction Hamming codes constructed for simple error corrections NTSC color television standard Integrated circuit proposed by Jack Kilby (Texas Instruments) Construction of the powerful Reed-Solomon error correcting codes First computer telephone modem developed: Bell Dataphone 103A (300 bit/s) Low-density parity check error correcting codes proposed by Robert G. Gallager First error correction encoders on board NASA space missions (Pioneer IX and Mariner VI) First wireless computer network: AlohaNet First portable cellular telephone demonstration to the U.S. Federal Communications Commission, by Motorola First mobile cellular trial by AT&T First handheld (analog) AMPS cellular phone service by Motorola Development of DSL modems for high-speed computer connections First (digital) GSM cellular service launched (Finland) First wireless local area network (LAN) developed (AT&T-NCR) Digital ATSC standard established Turbo codes proposed by Berrou, Glavieux, and Thitimajshima First commercial CDMA (IS-95) cellular service launched First HDTV broadcasting IEEE 802.11 (b) wireless LAN standard Large-scope commercial ADSL deployment IEEE 802.11 a wireless LAN standard First 3G cellular service launched IEEE 802.1 Ig wireless LAN standard
18
INTRODUCTION
2 SheetsSheet 1 A. G. BELL. TELEGRAPHY A. G. BELL. TELEGRAPHY Patented March 7. 1876.
Fig. 1.
Figure 1.7
Illustration from Bell's U.S. Patent NO. 174.465.
A
No. 174,465.
No. 174,465 issued March 7 , 1876. (From the U.S. Patent and Trademark Office.)
*+B
A
dcdcdcJc -"- -
"g'2_
B A+B
Fig. 3.
S A+B
A -
Fig. 4.
a e~<L^a o e^L^d
R flXTX, j .XTX o e~^L^a o e~^
r/TW A f A ^ ,/A,
\jy<! e**f*5 7! "e\\m a <.^a--a y c ^7
T7
,A / Vy
Fig- 7-
Rj. 5.
broadcast was first demonstrated by American inventor Major Edwin H. Armstrong. Armstrong's FM demonstration in 1935 took place at an IEEE meeting in New York's Empire State Building. A historic year for both communications and electronics was 1948, the year that witnessed the rebirth of digital communications and the invention of semiconductor transistors. The rebirth of digital communications is owing to the originality and brilliance of Claude E. Shannon, widely known as the father of modern digital communication and information theory. In two seminal articles published in 1948, he first established the fundamental concept of channel capacity and its relation to information transmission rate. Deriving the channel capacity of several important models, Shannon3 proved that as long as the information is transmitted through a channel at a rate below the channel capacity, error-free communications can be possible. Given noisy channels, Shannon showed the existence of good codes that can make the probability of transmission error arbitrarily small. This noisy channel coding theorem gave rise to the modern field of error correcting codes. Coincidentally, the invention of the first transistor in the same year (by Bill Shockley, Walter Brattain, and John Bardeen) paved the way to the design and implementation of more compact, more powerful, and less noisy circuits to put Shannon's theorems into practical use. The launch of Mariner IX Mars orbiter in March of 1971 was the first NASA mission officially equipped with error correcting codes, which reliably transmitted photos taken from Mars. Today, we are in an era of digital and multimedia communications, marked by the widespread applications of computer networking and cellular phones. The first telephone modem for home computer connection to a mainframe was developed by AT&T Bell Labs in 1962. It uses an acoustic coupler to interface with a regular telephone handset. The acoustic coupler converts the local computer data into audible tones and uses the regular telephone microphone
References
19
to transmit the tones over telephone lines. The coupler receives the mainframe computer data via the telephone headphone and converts them into bits for the local computer terminal, typically at rates below 300 bit/s. Rapid advances in integrated circuits (first credited to Jack Kilby in 1958) and digital communication technology dramatically increased the link rate to 56 kbit/s by the 1990s. By 2000, wireless local area network (WLAN) modems were developed to connect computers at speed up to 11 Mbit/s. These commercial WLAN modems, the size of a credit card, were first standardized as IEEE 802. lib. Technological advances also dramatically reshaped the cellular systems. While the cellular concept was developed in 1947 at Bell Labs, commercial systems were not available until 1983. The "mobile" phones of the 1980s were bulky and expensive, mainly used for business. The world's first cellular phone, developed by Motorola in 1983 and known as DynaTAC 8000X, weighed 28 ounces, earning the nickname of "brick" and costing $3995. These analog phones are basically two-way FM radios for voice only. Today, a cellphone is truly a multimedia, multifunctional device that is useful not only for voice communication but also can send and receive e-mail, access websites, and display videos. Cellular devices are now very small, weighing no more than a few ounces. Unlike in the past, cellular phones are now for the masses. In fact, Europe now has more cellphones than people. In Africa, 13% of the adult population now owns a cellular phone. Throughout history, the progress of human civilization has been inseparable from technological advances in telecommunications. Telecommunications played a key role in almost every major historical event. It is not an exaggeration to state that telecommunications helped shape the very world we live in today and will continue to define our future. It is therefore the authors' hope that this text can help stimulate the interest of many students in telecommunication technologies. By providing the fundamental principles of modern digital and analog communication systems, the authors hope to provide a solid foundation for the training of future generations of communication scientists and engineers.
REFERENCES
1. M. G. Murray, "Aimable Air/Sea Rescue Signal Mirrors," The Bent ofTau Beta Pi, pp. 29-32, Fall
2004.
2. B. Bunch and A. Hellemans, Eds., The History of Science and Technology: A Browser's Guide to the Great Discoveries, Inventions, and the People Who Made Them from the Dawn of Time to Today, Houghton Mifflin, Boston, 2004. 3. C. E. Shannon, "A Mathematical Theory of Communications," Bell Syst. Tech. J. parti: pp. 379-423; part II: 623-656, July 1948. 4. S. Lin and D. J. Costello Jr., Error Control Coding, 2nd ed., Prentice Hall, Upper Saddle River, NJ,
2004.
n this chapter we discuss certain basic signal concepts. Signals are processed by systems. We shall start by explaining the terms signals and systems.
Signals
A signal, as the term implies, is a set of information or data. Examples include a telephone or a television signal, the monthly sales figure of a corporation, and the daily closing prices of a stock market (e.g., the Dow Jones averages). In all these examples, the signals are functions of the independent variable time. When an electric charge is distributed over a surface, however, the signal is the charge density, a function of space rather than time. In this book we deal almost exclusively with signals that are functions of time. The discussion, however, applies equally well to other independent variables.
Systems
Signals may be processed further by systems, which may modify them or extract an additional information from them. For example, an antiaircraft missile launcher may want to know the future location of a hostile moving target, which is being tracked by radar. From the radar signal, he knows the past location and velocity of the target. By properly processing the radar signal (the input), he can approximately estimate the future location of the target. Thus, a system is an entity that processes a set of signals (inputs) to yield another set of signals (outputs). A system may be made up of physical components, as in electrical, mechanical, or hydraulic systems (hardware realization), or it may be an algorithm that computes an output from an input signal (software realization).
i u oiyriui
and height is a reasonable measure of the size of a person. If we wish to be little more precise, we can average this product over the entire length of the person. If we make a simplifying assumption that the shape of a person is a cylinder of radius r, which varies with the height h of the person, then a reasonable measure of the size of a person of height H is his volume V given by
2 I V = 71 f" r1 (h)dh
JO
Signal Energy
Arguing in this manner, we may consider the area under a signal g(t) as a possible measure of its size, since it takes into account of not only the amplitude, but also the duration. However, this will be a defective measure because if g(t) was a large signal, its positive and negative areas might cancel each other, wrongly indicating a signal of small size. This difficulty can be corrected by defining the signal size as the area under g2(t), which is always positive. We call this measure the signal energy Eg, defined (for a real signal) as
Eg =
This definition can be generalized to a complex valued signal g(t) as
E, =
(2.1)
(2.2)
There are also other possible measures of signal size, such as the area under \g(t)\. The energy measure, however, is not only more tractable mathematically, it is also more meaningful (as shown later) in the sense that it is indicative of the energy that can be extracted from the signal.
Signal Power
The signal energy must be finite for it to be a meaningful measure of signal size. A necessary condition for the energy to be finite is that the signal amplitude must > 0 as \t\ > co (Fig. 2. la). Otherwise the integral in Eq. (2.1) will not converge. If the amplitude of g(t) does not > 0 as \t > oo (Fig. 2.1b), the signal energy is infinite. A more meaningful measure of the signal size in such a case would be the time average of the
Figure 2.1
Examples of signals: (a) signal with finite energy; (b) signal with finite power.
(a)
22
^s.
areal signal)
r
1 Pe = lim -
82(t)dt
(2.3)
J-T/2
Observe that the signal power Pg is the time average (mean) of the signal amplitude square, that is, the mean squared value of g(t). Indeed, the square root of Pg is the familiar rms (root-mean-square) value of g(t). The mean of an entity averaged over a large time interval approaching infinity exists if the entity is either periodic or has a statistical regularity. If such a condition is not satisfied, the average may not exist. For instance, a ramp signal g(t) = t increases indefinitely as \t\ approaches infinity, and neither the energy, nor the power exists for this signal.
Comments
It should be stressed that "signal energy" and "signal power" are inherent characteristic values of a signal. They have nothing to do with the consumption of the signal by any load. Signal energy and signal power are used to measure the signal strength or size. For instance, if we approximate a signal g(t) by another signal z(t), the approximation error is thus e(t) =g(t) z(t). The energy (or power) of e(t) is a convenient indicator of the approximation accuracy. It provides us with a quantitative measure of determining the closeness of the approximation. It also allows us to determine whether one approximation is better than another. During transmission over a channel in a communication system, message signals are corrupted by unwanted signals (noise). The quality of the received signal is judged by the relative sizes of the desired signal and the unwanted signal (noise). In this case the ratio of the message signal and noise signal powers (the ratio of signal to noise power) is a good indication of the received signal quality.
Example 2.1
Determine the suitable measures of the signals in Fig. 2.2. The signal in Fig. 2.2a approaches 0 as \t\ > oo. Therefore, the suitable measure for this signal is its energy Eg given by
oo
/0
/*c
/ -oo
g2(t)dt=
(2)2dt+ I
J-\
JO
23
(a)
- 1 0
>-
The signal in Fig. 2.2b does not approach 0 as \t\ -> oo. However, it is periodic, and therefore its power exists. We can use Eq. (2.3) to determine its power. For periodic signals, we can simplify the procedure by observing that a periodic signal repeats regularly each period (2 seconds in this case). Therefore, averaging g2(?) over an infinitely large interval is equivalent to averaging it over one period (2 seconds in this case). Thus
-J/./*-5/.,
Recall that the signal power is the square of its rms value. Therefore, the rms value of this signal is l/-\/3.
1 f}
1 /"'
Example 2.2
Determine the power and rrns_alue-Qf^ "TaT^gO) = C~cos (coot + 6) (b) g(t) = C\ cos (c) #(/) = Dei'0*'
cos
(a) This is a periodic signal with period TO = 2n/u>Q. The suitable measure of its size is power. Because it is a periodic signal, we may compute its power by averaging its energy over one period 2n/(t>o. However, for the sake of generality, we shall solve this problem by averaging over infinitely large time interval using Eq. (2.3).
r/2 / = lim r-*oo 7 J-7-/2 cos2 (a>0f + 0)dt= lim / / [1 + cos (2w<)t + 29)] dt
r/2
-r/2
dt + lim : //
c2lrT/2
27* J_r/2
The first term on the right-hand side equals C2/2, while the second term is zero because the integral appearing in this term represents the area under a sinusoid over a very large time interval T with T > oo. This area is at most equal to the area of half the cycle because of cancellations of the positive and negative areas of a sinusoid. The second term
24
is this area multiplied by C 2 /2T with T > oo. Clearly this term is zero, and
p8=
(2.5a)
This shows a well-known fact that a sinusoid of amplitude C has a power C 2 /2 regardless of its angular frequency O>Q (wo ^ 0) and its phase 9. The rms value is C/V2. If the signal frequency is zero (dc or a constant signal of amplitude t"J, the readercan show that the power is C2. (b) In this case
T/2
T/2
+
lim
-r/2
cos
cos
Observe that the first and the second integrals on the right-hand side are the powers of the two sinusoids, which are C\2/2 and C 2 2 /2 as found in part (a). We now show that the third term on the right-hand side is zero if a>\ ^ o>2.
lim
2CiC2 [T/2
I
COS
cos
J-T/2
= lim r->oo
7"
6*1
I-T/2
,r/2 - / cos
J-T/2
Consequently,
(2.5b)
and the rms value is ^(C\2 + C 2 2 )/2. We can readily extend this result to any sum of sinusoids with distinct angular frequencies u>n (a>n j^= 0). In other words, if
g(t) =
cos
2.2 Classification of Signals where none of the sinusoids have identical frequencies, then Pg = -'^_/ Cn2 n=\
25
(2.5c)
(c) In this case the signal is complex valued, and we use Eq. (2.4) to compute the power. Thus,
1 fT'2 Pg = lim /
r--oo T
.,
J-T/2
Recall that |<>r| = 1 so that IDe^'l2 = \D\2, and Pg= lim Its rms value is |D|.
1 f-772 ' / \D\2dt = \D\2
J-T/2 '-772
(2.5d)
7^00 T
Comment: In part (b), we have shown that the power of the sum of two sinusoids is equal to the sum of the powers of the sinusoids. It may appear that the power of g\ (f) +g2(0 is simply Pg[ + Pg2. Be cautioned against such a generalization! All we have proved here is that this is true if the two signals g\ (?) and gi(t) happen to be sinusoids. It is not true in general! In fact, it is not true even for the sinusoids if the two sinusoids are of the same frequency. We shall show later (Sec. 2.5.4) that only under a certain condition, called the orthogonality condition, is the power (or energy) of g i ( t ) + g2(?) equal to the sum of the powers (or energies) of g \ ( t ) andg 2 (0-
26
Figure 2.3
(a) Continuous time and (b) discrete time signals.
(a)
12 10 8 6 4 7 0 _2 -4 -6 -8
Annualized U.S. GDP quarterly percentage growth
8
Mil
-10
(b)
2.2 Classification of Signals Figure 2.4 Examples of signals: (a) analog and continuous time; (b) digital and continuous time; (c) analog and discrete time; (d) digital and discrete time.
27
(a)
(hi
g(l)
till
Figure 2.5 Periodic signal of period TO.
1 Lf 1 11 1 111 1 "
(d)
g(t)=g(t
for all f
(2.6)
The smallest value of TO that satisfies the periodicity condition (2.6) is the period of g ( t ) . The signal in Fig. 2.2b is a periodic signal with period of 2. Naturally, a signal is aperiodic if it is not periodic. The signal in Fig. 2.2a is aperiodic. By definition, a periodic signal g(t) remains unchanged when time-shifted by one period. This means that a periodic signal must start at t = oo because if it starts at some finite instant, say, t = 0, the time-shifted signal g(t + TQ) will start at t = To and g(t + TO) is no longer the same as g(t). Therefore, a periodic signal, by definition, must start from -oo and continue forever, as shown in Fig. 2.5. Observe that a periodic signal shifted by an integral multiple of TQ remains unchanged. Therefore, g(t) may also be considered to be a periodic signal with period m/b, where m is any integer. However, by definition, the period is the smallest interval that satisfies periodicity condition (2.6). Therefore, TO is the period.
Jc
\g(t)\2dt <oo
(2.7)
Similarly, a signal with a finite and nonzero power (mean square value) is a power signal. In other words, a signal is a power signal if
i
fT/2
0 < lim
~* co
rim
\g(t)\~dt < oo
(2-8)
The signals in Fig. 2.2a and b are examples of energy and power signals, respectively. Observe that power is the time average of the energy. Since the averaging is over an infinitely large interval, a signal with finite energy has zero power, and a signal with finite power has infinite energy. Therefore, a signal cannot both be an energy signal and a power signal. If it is one, it cannot be the other. On the other hand, certain signals with infinite power are neither energy nor power signals. The ramp signal is one example.
Comments
Every signal observed in real life is an energy signal. A power signal, on the other hand, must have an infinite duration. Otherwise its power, which is its average energy (averaged over an infinitely large interval) will not approach a (nonzero) limit. Obviously it is impossible to generate a true power signal in practice because such a signal would have infinite duration and infinite energy. Also because of periodic repetition, periodic signals for which the area under |g(/)|2 over one period is finite are power signals; however, not all power signals are periodic.
29
g(t)
(a)
(b)
g(t+T)
(c)
(2.9)
or
= g(t - T)
(2.10)
Therefore, to time-shift a signal by T, we replace / with t T. Thus, g(f T) represents g(t) time-shifted by T seconds. If T is positive, the shift is to the right (delay). If T is negative, the shift is to the left (advance). Thus, g(t 2) is g(t) delayed (right-shifted) by 2 seconds, and g(t + 2) is g(t) advanced (left-shifted) by 2 seconds.
and = (20
(2.12)
30
Figure 2.7
Time scaling a signal.
(a)
(b)
(c)
Observe that because g(t) = 0 at t = T\ and TI, the same thing must happen in <(/) at half these values. Therefore, </>(?) = 0 at t = T\/2 and 72/2, as shown in Fig. 2.7b. If g(t) were recorded on a tape and played back at twice the normal recording speed, we would obtain g(2t). In general, if g(t) is compressed in time by a factor a (a > 1), the resulting signal (j)(t) is given by
= g(at)
(2.13)
We can use a similar argument to show that g(t) expanded (slowed down) in time by a factor a (a > 1) is given by (2-14) Figure 2.7c shows g(t/2), which is g(t) expanded in time by a factor of 2. Note that the signal remains anchored at t = 0 during scaling operation (expanding or compressing). In other words, the signal at t = 0 remains unchanged. This is because g(t) = g(at) = g(0) at t = 0. In summary, to time-scale a signal by a factor a, we replace t with at. If a > 1, the scaling is compression, and if a < 1, the scaling is expansion. Example 2.3 Consider the signals g(t) and z(t) in Fig. 2.8a and b, respectively. Sketch (a) g(3t) and (b) z(t/2). (a)g(3?) is g(t) compressed by a factor of 3. This means that the values of g(t) at t = 6, 12, 15, and 24 occur in g(3t) at the instants t = 2, 4, 5, and 8 respectively, as shown in Fig. 2.8c. (b) z(t/2) is z(t) expanded (slowed down) by a factor of 2. The values of z(t) at t = 1, 1, and 3 occur in z(t/2) at instants 2, 2, and 6 respectively, as shown in Fig. 2.8d.
Jl
g(t)
l'
0.5
z(0
0 -1
15
24
"
1 (b)
/-
(a)
g(30
'(T)
-6
(c)
0.5
-2
(d)
(-t) = g(t)
and
(2.15) Therefore, to time-invert a signal we replace t with t such that the time inversion of g(t) yields g(t). Consequently, the mirror image of g(t) about the vertical axis is g(t). Recall also that the mirror image of g(t) about the horizontal axis is g(/)-
Example 2.4
The instants 1 and 5 in g(t) are mapped into instants 1 and 5 in g(t). If g(t) e'/2, then g(t) = e~1/2. The signal g ( t ) is shown in Fig. 2.10b.
32
(a)
) = g(-t)
-5
(a)
-7 -5
-3
(b)
7 ' -
5(0
2 2
(a)
(b)
S(t) = 0
(2.16) (2.17)
5(0 dt = 1
We can visualize an impulse as a tall, narrow rectangular pulse of unit area, as shown in Fig. 2.11. The width of this rectangular pulse is a very small value e; its height is a very large value 1/6 in the limit as e -> 0. The unit impulse therefore can be regarded as a rectangular pulse with a width that has become infinitesimally small, a height that has become infinitely
33
large, and an overall area that remains constant at unity.* Thus, S(t) = 0 everywhere except at t = 0, where it is, strictly speaking, undefined. For this reason a unit impulse is graphically represented by the spearlike symbol in Fig. 2.1 la.
fOO
/ -OO
(2.19a)
J OO
provided 0(0 is continuous at t = T. This result means that the area under the product of a function with an impulse S(t) is equal to the value of that function at the instant where the unit impulse is located. This property is very important and useful, and is known as the sampling (or sifting) property of the unit impulse. Depending on the value of T and the integration limit, the impulse function may or may not be within the integration limit. Thus, it follows that
/' Ja
/'
Ja
\4>(T) I 0
(2.19b)
34
Figure 2.12
(a) Unit step function (/). (b) Causal exponential
u(t)
(a)
t>0 t <0
(2.20)
If we want a signal to start at t = 0 (so that it has a value of zero for t < 0), we need only multiply the signal by u(t). A signal that starts after t = 0 is called a causal signal. In other words, g(t) is a causal signal if
8(t) = 0
<0
The signal e "' represents an exponential that starts at t = -oo. If we want this signal to start at t = 0 (the causal form), it can be described as e~a'u(t) (Fig. 2.12b). From Fig. 2.1 Ib, we observe that the area from oo to t under the limiting form of 8(t) is zero if t < 0 and unity if t > 0. Consequently,
f S(T)dT=\ J -oo
t <0 t>0
(2.21 a)
= (*)
du *="
(2.21b)
b-a N -1
35
As the number of time instants N increases, the sampled signal vector g will grow. Eventually, as N -* oo, the signal values would form a vector g with infinitely long dimension. Because -> 0, the signal vector g would transform into the continuous time signal g(t) defined over the interval [a, b\. In other words,
lim g = g(t) t e [a, b]
Af--oo
This relationship clearly shows that continuous time signals are straightforward generalizations of finite dimension vectors. Thus, basic definitions and operations in a vector space can be applied to continuous time signals as well. We now highlight this connection between the finite dimension vector space and the continuous time signal space. We shall denote all vectors by boldface type. For example, x is a certain vector with magnitude or length ||x||. A vector has magnitude and direction. In a vector space, we can define the inner (dot or scalar) product of two real-valued vectors g and x as
x> =
||x||cos
(2.22)
where 0 is the angle between vectors g and x. Using this definition we can express ||x||, the length (norm) of a vector x as
= <x, x>
(2.23)
However, this does not describe a unique way to decompose g in terms of x and e. Figure 2.14 shows two of the infinite other possibilities. From Fig. 2.14a and b, we have =c 2 x
(2.25)
36
C.X
(a)
(b)
The question is: Which is the "best" decomposition? The concept of optimality depends on what we wish to accomplish by decomposing g into two components. In each of these three representations, g is given in terms of x plus another vector called the error vector. If our goal is to approximate g by ex (Fig. 2.13)
g ~ g = ex
(2.26)
then the error in this approximation is the (difference) vector e= g ex. Similarly, the errors in approximations in Fig. 2.14a and b are ej and 62. What is unique about the approximation in Fig. 2.13 is that its error vector is the shortest (with smallest magnitude or norm). We can now define mathematically the component (or projection) of a vector g along vector x to be ex, where c is chosen to minimize the magnitude of the error vector e = g - ex. Geometrically, the magnitude of the component of g along x is ||g|| cos 0, which is also equal to c||x||. Therefore
c||x|| = ||g||cos0
Based on the definition of inner product between two vectors, multiplying both sides by ||x|| yields
= ||g||||x||cos#=<g, x>
and
c=
, x>
, x>
IMI-
, x>
(2.27)
From Fig. 2.13, it is apparent that when g and x are perpendicular, or orthogonal, then g has a zero component along x; consequently, c = 0. Keeping an eye on Eq. (2.27), we therefore define g and x to be orthogonal if the inner (scalar or dot) product of the two vectors is zero, that is, if
, x> = 0
(2.28)
g(t) ~ cx(t)
t\<t <
(2.29)
37
e(t) =
\g(t) - cx(t)
0
h <t <t2
otherwise
(2.30)
For "best approximation," we need to minimize the error signal, that is, minimize its norm. Minimum signal norm corresponds to minimum energy Ee over the interval [t\, tj\ given by
Ee = /
Jti
r2
e2
[g(t) - cx(t)Y dt
Note that the right-hand side is a definite integral with t as the dummy variable. Hence Ee is a function of the parameter c (not t) and Ee is minimum for some choice of c. To minimize Ee, a necessary condition is dEe =0 ~dc~
or
(2.31)
dc [_
J,
dc
x2(t)dt\ = 0
-2 /
and
g(t)x(t) dt + 2c
Jti
' x2(t) dt = 0
g(t)x(t)dt
(2.32)
g(t) ~
then the optimum value of c that minimizes the energy of the error signal in this approximation is given by Eq. (2.32). Taking our clue from vectors, we say that a signal g(t) contains a component cx(t), where c is given by Eq. (2.32). As in vector space, cx(t) is the projection of g(t) on x(t). Consistent with the vector space terminologies, we say that if the component of a signal g(t) of the form x(t) is zero (that is, c = 0), the signals g(t) and x(t) are orthogonal over the interval [t\, t2\.
38
In other words, with respect to real-valued signals, two signals x(t) and g(t) are orthogonal when there is zero contribution from one signal to the other (i.e., when c = 0). Thus, x(t) and g (t) are orthogonal if and only if
(2.33)
Based on the illustration between vectors in Fig. 2.14, two signals are orthogonal if and only their inner product is zero. This relationship indicates that the integral of Eq. (2.33) is closely related to the concept of inner product between vectors. Indeed, compared to the standard definition of inner product of two A'-dimensional vectors g and x
< g, X >= 2_,Sixi
i=l
the integration of Eq. (2.33) has an almost identical form. We therefore define the inner product of two (real-valued) signals g(t) and x(t) over a time interval [t\, t?] as (2.34) Recall from algebraic geometry that the square of a vector length ||x||2 is equal to <x, x>. Keeping this concept in mind and continuing to draw the analogy to vector analysis, we define the norm of a signal g(t) as - J<g(t), g(t): (2.35)
which is the square root of the signal energy in the time interval. It is therefore clear that the norm of a signal is analogous to the length of a finite-dimensional vector. More generally, the signals may not be merely defined over a continuous segment [t\, t2\* Example 2.5 For the square signal g(t) shown in Fig. 2.15 find the component in g(t) of the form sin t. In other words, approximate g(t) in terms of sin t: g(t) ~ csin t 0 < t < 2n
such that the energy of the error signal is minimum. In this case
x(t) = sin t
and
sin (/) dt = n
* Indeed, the signal space under consideration may be over a set of time segments represented simply by . For such a more general space of signals, the inner product is defined as an integral over the time domain 0
(2.36)
Given the inner product definition, the signal norm ||g(f)|| = V < g ( t ) , g(t) > and the signal space can be defined for any time domain signals.
39
-!
(-smt)dt\ = -
(2.37)
* [JO
JIT
Therefore
g(t) ~ - sin t
7T
(2.38)
represents the best approximation of g(t) by the function sin t, which will minimize the error signal energy. This sinusoidal component of g(t} is shown shaded in Fig. 2.15. As in vector space, we say that the square function g(t) shown in Fig. 2.15 has a component of signal sin t with magnitude of 4/jr.
where g(t) and x(t) are complex functions of t. In general, both the coefficient c and the error e(t) = g(t) - cx(t) (2.40)
are complex. Recall that the energy Ex of the complex signal x(t) over an interval [t\, t2\ is
>*=!Jh;
Jh jf
x(t)\2dt
For the best approximation, we need to choose c that minimizes Ee, the energy of the error signal e(t) given by
\g(t)-cx(t)\2dt
(2.41)
40
SIGNALS AND SIGNAL SPACE Recall also that \u + v|2 = (u + V)(M* + v*) = |w| 2 + v| 2 + u*v + uv* (2.42)
After some manipulation, we can use this result to express the integral Ee in Eq. (2.41) as
g(t)x*(t)dt
CjEy
- f g(t)x*(t)dt
V&L
Since the first two terms on the right-hand side are independent of c, it is clear that Ee is minimized by choosing c such that the third term is zero. This yields the optimum coefficient c= g(t)x*(t)dt (2.43)
In light of the foregoing result, we need to redefine orthogonality for the complex case as follows: complex functions (signals) x \ ( t ) and^2(f) are orthogonal over an interval (t < t \ 5/2) as long as [2xi(t)4(t)dt = Jt,
or
r Jt,
g(t)x*(t)dt
(2.44)
In fact, either equality suffices. This is a general definition of orthogonality, which reduces to Eq. (2.33) when the functions are real. Similarly, the definition of inner product for complex signals over a time domain 0 can be modified as
), x(t)> = /
J[t:te&}
(2.45)
1/2
(2.46)
This is in fact the famous Pythagorean theorem. We have a similar result for signals. The energy of the sum of two orthogonal signals is equal to the sum of the energies of the two signals. Thus, if signals x(t) and y(t) are orthogonal over an interval [t\, t 2 ], and if z(t) = x(t) +y(t), then
t'x T
(2.47)
41
We now prove this result for complex signals, of which real signals are a special case. From Eq. (2.42) it follows that r \x(t) + y(t)\2dt = I Jt\ Jtt x(t)\2dt+ I Jt\ \y(t)\2dt + f x(t)y*(t)dt + f * x*(t)y(t)dt Ji] Jtt \y(t)\2dt
(2.48)
The last equality follows from the fact that because of orthogonality, the two integrals of the cross products x(t)y*(t) and x*(t)y(t) are zero. This result can be extended to sum of any number of mutually orthogonal signals.
x>
(2.49)
We can readily verify that this measure is independent of the lengths of g and x. This similarity measure p is known as the correlation coefficient. Observe that
-I < P < 1
(2.50)
Thus, the magnitude of p is never greater than unity. If the two vectors ^re aligned, the similarity is maximum (p = 1). Two vectors aligned in opposite directions have the maximum dissimilarity (p = 1). If the two vectors are orthogonal, the similarity is zero. We use the same argument in denning a similarity index (the correlation coefficient) for signals. For convenience, we shall consider the signals over the entire time interval from oo to oo. To establish a similarity index independent of energies (sizes) of g(t) and x(t), we must normalize c by normalizing the two signals to have unit energies. Thus, the appropriate similarity index p analogous to Eq. (2.49) is given by
P =
g(t)x(t)dt
(2.51)
42
Observe that multiplying either g (?) or x(t) by any constant has no effect on this index. Thus, it is independent of the size (energies) of g(t) and x(t). By using the Cauchy-Schwarz inequality (proved in Appendix B), * one can show that the magnitude of p is never greater than 1:
-1 <P< 1
(2.52)
Example 2.6
Find the correlation coefficient p between the pulsex(t) and the pulses #,-(/), / = 1, 2, 3, 4, 5, and 6 shown in Fig. 2.16. We shall compute p using Eq. (2.51) for each of the six cases. Let us first compute the energies of all the signals.
r5 r5 = I x2(t)dt = I dt = Jo Jo
In the same way we find Eg] = 5, Eg2 = 1.25, and g, = 5. Also to determine Eg4 and Eg5, we determine the energy E of e~atu(t) over the interval t = 0 to T: E= j (e~a')2dt = I e~2atdt=(l - e'2aT) Jo Jo 2a
* The Cauchy-Schwarz inequality states that for two real energy signals g(t) and x(t), (/^ g(t)x(t) dn < EgEx with equality if and only if x(t) = Kg(t), where K is an arbitrary constant. There is also similar inequality for complex signals.
-2
43
Si
#2 '
3W
'
^ 5 1
' >
t>
(0)
/ >
5 W
0
(d)
W
o Cfl
*5<
1
sin 2m
~~ 0 / -*
| 5 0
V\<^^^
t - 5
A
5
1 /I l\ l\ l\
\l\l\j\l\j
'"""
(e)
(0
(g)
For g 4 (r), a = 1/5 and T = 5. Therefore, ^4 = 2.1617. For gs(t), a = 1 and T = oo. Therefore, Eg, = 0.5. The energy of Egf> is given by
/
= 1 sin2 2 1
Jo
= 2.5
From Eq. (2.51), the correlation coefficients for six cases are found to be
5)dt =
(-l)dt = -l
(4)
V(2.1617)(5) Jo
?-'/5J? = '
(5)
Comments on the Results from Example 2.6 Because gi(t) = x(t), the two signals have the maximum possible similarity, and p = 1. However, the signal g^(t) also shows maximum possible similarity with p = 1. This is because we have defined p to measure the similarity of the waveshapes, and is independent
44
of amplitude (strength) of the signals compared. The signal g2(t) is identical to x(t) in shape; only the amplitude (strength) is different. Hence p = 1. The signal g$(t), on the other hand, | has the maximum possible dissimilarity with x(t) because it is equal to x(t). For #4(0, P = 0.961, implying a high degree of similarity with x(t). This is reasonable because g4(t) is very similar to x(t) over the duration of x(t) (for 0 < t < 5). Just by inspection, we notice that the variations or changes in both x(t) and g$(t) are at similar rates. Such is not the case with gs(t), where we notice that variations in gs(t) are generally at a higher rate than those in x(t). There is still a considerable degree of similarity; both signals always remain positive and show no oscillations. Both signals have zero or negligible strength beyond? = 5. Thus, g$ (t) is similar to x(t), but not as similar as g^(t). This is why p = 0.628 forgs(t). The signal g&(t) is orthogonal to x(t), so that p = 0. This appears to indicate that the dissimilarity in this case is not as strong as that of gj(t), for which / > = ! . This may seem odd because g$(t) appears more similar to x(t), than does g(,(t). The dissimilarity between x(t) and gi(t) is of the nature of opposite characteristics; in a way they are very similar. but in opposite directions. On the other hand, x(t) and g(,(t) are dissimilar because they go their own ways irrespective of each other signal's variation; it is of the nature of their being strangers to each other. Hence the dissimilarity of gt,(t) to x(t) rates lower than that Of 3(0Sec. 2.10 provides a MATLAB exercise that numerically computes the correlation coefficients [sign_cor.m]
z(t) =
(2-54)
where a represents the target reflection and attenuation loss, to represents the round-trip propagation delay, which equals twice the target distance divided by the speed of electromagnetic wave, and w(t) captures all the noise and interferences. The key to target detection is the orthogonality between w(t) and g(t to), that is,
t\ < to <
(2.55)
45
Thus, to detect whether a target is present, a correlation can be computed between z(t) and a delayed pulse signal g(t - to)
r* Jt\
_ JutJ7>
aEp
0
(2.56)
Here Ep is the pulse energy. Given the orthogonality between w(t) and g(t to), the target detection problem can be reduced to a thresholding problem in Eq. (2.56) to determine whether the correlation is aEp or 0 by applying a magnitude threshold. Note that when to is unknown, a bank of N correlators, each using a different delay T,,
z(t)g*(t-Ti)dt
i=
(2.57)
may be applied to allow the receiver to identify the peak correlation at the correct delay TJ = ?oAlternatively, a correlation function can be used (as in the next section). A similar situation exists in digital communication when we are required to detect the presence of one of the two known waveforms in the presence of noise. Consider the case of binary communication, where two known waveforms are received in a random sequence. Each time we receive a pulse, our task is to determine which of the two (known) waveforms has been received. To make the detection easier, we must make the two pulses as dissimilar as possible. This means we should select one pulse to be the negative of the other pulse. This gives the highest dissimilarity (p= I). This scheme is sometimes called the antipodal scheme. We can also use orthogonal pulses that result in p 0. In practice both these options are used, although antipodal is the best in terms of distinguishability between the two pulses. Let us consider the antipodal scheme in which the two pulses are p(t) and p(t). The correlation coefficient p of these pulses is 1. Assume no noise or any other imperfections in the transmission. The receiver consists of a correlator that computes the correlation coefficient between p(t) and the received pulse. If p is 1, we decide that p(t) is received, and if p is 1, we decide that p(t) is received. Because of the maximum possible dissimilarity between the two pulses, detection is easier. In practice, however, there are several imperfections. There is always an unwanted signal (noise) superimposed on the received pulses. Moreover, during transmission, pulses are distorted and dispersed (spread out) in time. Consequently, the correlation coefficient is no more 1, but has a smaller magnitude, thus reducing their distinguishability. We use a threshold detector, which decides that if p is positive, the received pulse is p(t), and if p is negative, the received pulse is -p(t). Suppose, for example, that p(t) has been transmitted. In the ideal case, correlation of this pulse at the receiver would be 1, the maximum possible. Now because of noise and pulse distortion, p is less than 1. In some extreme situation, noise and pulse overlapping (spreading) make this pulse so dissimilar to p(t) that p is a negative amount. In such a case the threshold detector decides that p(t) has been received, thus causing a detection error. In the same way, if p(t) is transmitted, channel noise and pulse distortion could cause a positive correlation, resulting in a detection error. Our task is to make sure that the transmitted pulses have sufficient energy to ensure that the damage caused by noise and other imperfections remains within a limit, with the result that the error probability is below some acceptable bound. In the ideal case, the margin provided by the correlation p for distinguishing the two pulses is 2 (from 1 to -1, and vice versa). Noise and channel distortion reduce this margin. That is why it is important to start with as large a margin as possible. This explains why the antipodal scheme has the best
46
performance in terms of guarding against channel noise and pulse distortion. For other reasons, however, as mentioned earlier, schemes such as an orthogonal scheme, where p = 0, are also used even when they provide a smaller margin (from 0 to 1, and vice versa) in distinguishing the pulses. A quantitative discussion of correlation in digital signal detection is presented in Chapter 11. In later chapters we shall discuss pulse dispersion and pulse distortion during transmission, as well as the calculation of error probability in the presence of noise.
/ -oo
Z(t)g*(t)dt =
(2.58)
Thus, the correlation is zero because the pulses are disjoint (nonoverlapping in time). The integral in Eq. (2.58) will yield zero value even when the pulses are identical but with relative time shift. To avoid this difficulty, we compare the received pulse z(t) with the transmitted pulse g(t) shifted by r. If for some value of T there is a strong correlation, we not only will detect the presence of the pulse but we also will detect the relative time shift of z(t) with respect to g(t). For this reason, instead of using the integral on the right-hand side of Eq. (2.58) we use the modified integral i/^gW, the cross-correlation function of two complex signals g(t) and z(f) defined by
Z(t)g*(t-T)dt
r L
r)g*(t)dt
(2.59)
Therefore, V f zg( r ) is an indication of similarity (correlation) of g(t) with z(t) advanced (leftshifted) by r seconds.
It measures the similarity of the signal g(t) with its own displaced version. In Chapter 3, we shall show that the autocorrelation function provides valuable spectral information about the signal.
47
(a)
g(t)
1
-(t-T)
t -*
Z0
r~^~~^
T
T+\
w
t -*
+ c2X2)
or equivalently
g=
+e
Building on our earlier geometrical argument, it is clear from Fig. 2.18 that the length of error vector e is minimum when it is perpendicular to the (x\, x2) plane, and when cjxi and c2x2 are the projections (components) of g on xi and x2, respectively. Therefore, the constants c\ and c2 are given by formula in Eq. (2.27). Now let us determine the best approximation to g in terms of all the three mutually orthogonal vectors \\, x2, and x3:
+C 2 X 2 +C 3 X 3
(2.61)
48
Figure 2.18 shows that a unique choice of c\, ci, and cj exists, for which Eq. (2.61) is no longer an approximation but an equality:
g = C\X\
03X3
In this case, c\x\,C2\2, and 3X3 are the projections (components) of g on xi,X2, and xs, respectively. Note that the approximation error e is now zero when g is approximated in terms of three mutually orthogonal vectors: \\ , X2, and X3. This is because g is a three-dimensional vector, and the vectors xi, \2, and X3 represent a complete set of orthogonal vectors in threedimensional space. Completeness here means that it is impossible in this space to find any other vector X4, which is orthogonal to all the three vectors xi,X2, and x3. Any vector in this space can therefore be represented (with zero error) in terms of these three vectors. Such vectors are known as basis vectors, and the set of vectors is known as a complete orthogonal basis of this vector space. If a set of vectors (x,} is not complete, then the approximation error will generally not be zero. For example, in the three-dimensional case just discussed, it is generally not possible to represent a vector g in terms of only two basis vectors without an error. The choice of basis vectors is not unique. In fact, each set of basis vectors corresponds to a particular choice of coordinate system. Thus, a three-dimensional vector g may be represented in many different ways, depending on the coordinate system used. To summarize, if a set of vectors {x, } is mutually orthogonal, that is, if
0
m =n
and if this basis set is complete, a vector g in this space can be expressed as
g = ClXl +C2X2+C3X3
(2.62)
(2.63a)
i = 1,2,3
(2.63b)
49
m^n m=n
(2.64)
If all signal energies are equal En \, then the set is normalized and is called an orthonormal set. An orthogonal set can always be normalized by dividing xn (t) by \/^ for all . Now, consider the problem of approximating a signal g(t) over the by a set of TV mutually orthogonal signalsx\(t),x 2 (t), ...,xN(t):
g(t) ~ C\Xl(t) + C2X2(t) +
N
CNXN(t)
(2.65a) (2.65b)
n=\
It can be shown that Ee, the energy of the error signal e(t) in this approximation is minimized if we choose
g(t)x*(t)dt
Jt&
I
,
\\xn(t)\
dt n=\,2,...,N (2.66)
J/60
= TT / 8(t)xn(t)dt
t-n J0
Moreover, if the orthogonal set is complete, then the error energy Ee > 0, and the representation in (2.65) is no longer an approximation, but an equality. More precisely, let the TV-term approximation error be defined by
eN(t) = g(t) -
t e 0 (2.67)
If the orthogonal basis is complete, then the error signal energy converges to zero, that is,
lim
(2.68)
Although strictly in a mathematical sense, a signal may not converge to zero even though its energy does. This is because a signal may be nonzero at some isolated points.* Still, for all practical purposes, signals are continuous for all t, and the equality (2.68) states that the error signal has zero energy as N -> oo. Thus, for N -> oo, the equality (2.65) can be loosely
* Known as a measure-zero set
50
written as
g(t)
CnXn(t)
(2.69)
n=]
where the coefficients cn are given by Eq. (2.66). Because the error signal energy approaches zero, it follows that the energy of g(t) is now equal to the sum of the energies of its orthogonal components. The series on the right-hand side of Eq. (2.69) is called the generalized Fourier series of g(t) with respect to the set (xn(t)}. When the set {xn(t)} is such that the error energy EN -> 0 as N oo for every member of some particular signal class, we say that the set {xn(t)} is complete on {t : 0} for that class of g(t), and the set [xn(t)} is called a set of basis functions or basis signals. In particular, the class of (finite) energy signals over 0 is denoted as L2{&}.
(2.70)
This important result goes by the name of Parseval's theorem. Recall that the signal energy (area under the squared value of a signal) is analogous to the square of the length of a vector in the vector-signal analogy. In vector space we know that the square of the length of a vector is equal to the sum of the squares of the lengths of its orthogonal components. Parseval's theorem (2.70) is the statement of this fact as applied to signals.
51
A sinusoid of angular frequency ncoo is called the nth harmonic of the sinusoid of angular frequency coo when n is an integer. Naturally the sinusoidal frequency/o (in hertz) is related to its angular frequency coo via
COO = 27T/0
These terms offer different conveniences and are equivalent. We note that coo and 2nfy are equally commonly used in practice. Neither offers any distinct advantages. For this reason, we will be using cooand/o interchangeably in this book according to the convenience of the particular problem in question. The sinusoid of angular frequency coo serves as an anchor in this set, called the fundamental tone of which all the remaining terms are harmonics. Note that the constant term 1 is the zeroth harmonic in this set because cos (0 x coot) = 1. We can show that this set is orthogonal over any interval of duration TO = 2jt/a>o, which is the period of the fundamental. This follows from the equations (proved in Appendix A):
r I cos nco0t cos mcootdt = f I sin ncoot sin truant at
n ^m
TO (2.72a) (2.72b)
JTO
/TO
and
/ -0
(2.72c)
The notation fT means "integral over an interval from t t\ to t\ + TO for any value of t\." These equations show that the set (2.71) is orthogonal over any contiguous interval of duration TQ. This is the trigonometric set, which can be shown to be a complete set.3'4 Therefore, we can express a signal g (t) by a trigonometric Fourier series over any interval of duration TO seconds as g(t) = GO + <?i cos a>ot + 2 cos + b\ sin a>ot + bi sin 2a>ot
or
t\ < t < t\ + T0
(2.73a)
t\ < t < t] + TO
(2.73b)
52
MO = 2^/o = ?b
and
/0 = ?b
(2.74)
We can use Eq. (2.66) to determine the Fourier coefficients OQ, an, and bn. Thus
i an
/ Jti =
ft , J
cos
The integral in the denominator of Eq. (2.75) as seen from Eq. (2.72a) (with m = ri) is To/2 when n 0. Moreover, for n = 0, the denominator is TQ. Hence
g(t)dt
and
(2.76a)
a,, =
g(t)cos n2jrfQt dt
n =1,2,3,... (2.76b)
b =^f To J,,
g(t)sm
2 f'1 = To 7,i
g(t)sin n2jif0tdt
n= 1,2,3,... (2.76c)
We note that the trigonometric Fourier series of Eq. (2.73) applies to both real and complex periodic signals.
an cos
where
bn sin
= Cn cos
On)
(2.77)
/ 2 i L 2 Cn = Vn +
(2.78a) (2.78b)
2.8 Trigonometric Fourier Series For consistency we denote the dc term ao by CQ, that is, C0 = a0
53
(2.78c)
From the identity (2.77), the trigonometric Fourier series in Eq. (2.73) can be expressed in the compact form of the trigonometric Fourier series as
oo
g(t) = CQ + ^Cttcos(n2jrfot
n=l
+ 8n)
?i < t < ?i + T0
(2.79)
where the coefficients Cn and 9,, are computed from an and bn by using Eq. (2.78). Equation (2.76a) shows that ao (or Co) is the average value of g(t) (averaged over one period). This value can often be determined by direct inspection of g ( t ) . Example 2.7 Find the compact trigonometric Fourier series for the exponential e~'/2 shown in Fig. 2.19a over the interval 0 < t < n. Because we are required to represent g(t) by the trigonometric Fourier series over the interval 0 < t < n, TO = n, and the fundamental angular frequency and the fundamental frequency are
In 0 = = 2 rad/s TQ
and
1 1 /0 = = T0 it
respectively. Therefore
a
g(t) = ao + >
n=\
0 < t <n
2 r r
I6n2
x Jo
l + 16n2
54
Figure 2.19 (a, b) Periodic signal and (c, d) its Fourier spectra.
271
I
te,,
0.244 '--...
0.125
i t _j_^
10
(c)
(d)
-71/2
To find the compact Fourier series, we use Eq. (2.78) to find its coefficients, as C0 = GO = 0.504 Cn = Ja* + b% = 0.504. 64n2 16/z2)2
16n2)2
= 0.504 (2.80)
>
^1
an
- ) = tair'(-4n) = -tan" 1 4n
The amplitude and phases of the dc and the first seven harmonics are computed from Eq. (2.80) and displayed in Table 2.1. We can use these numerical values to express g(t) in the compact trigonometric Fourier series as
g ( t ) = (1.504 + 0-504
^ VI + 162
cos (Int. - t a n ~ 4 n )
0 < t < Tt
(2.81a)
= 0.504 + 0.244 cos (It - 75.96) + 0.125 cos (4t - 82.87) + 0.084 cos (6r - 85.24) + 0.063 cos (8f - 86.42) + 0<t<n (2.81b)
55
Cn 9n
0.125 -82.87
0.084 -85.24
0.063 -86.42
0.0504 -87.14
0.042 -87.61
0.036 -87.95
for all t
and
<p(t + To) = C0 + ^ Cn cos [n2nf0(t + T0) + 9n]
n=\
oo
71=1
OO
= Co + y^ Cn cos (
71=1
= <p(t)
for all f
(2.82)
This shows that the trigonometric Fourier series is a periodic function of period TO (the period of its fundamental). For instance, <p(t), the Fourier series on the right-hand side of Eq. (2.81b) is aperiodic function in which the segment of g ( t ) in Fig. 2.19a over the interval (0 < t < TT) repeats periodically every n seconds as shown in Fig. 2.19b.* Thus, when we represent a signal g ( t ) by the trigonometric Fourier series over a certain interval of duration TO, the function g ( t ) and its Fourier series <p(t) need be equal only over that interval of TO seconds. Outside this interval, the Fourier series repeats periodically with period TO. Now if the function g ( t ) were itself to be periodic with period TO, then a Fourier series representing g ( t ) over an interval TO will also represent g(t) for all t (not just over the interval TO). Moreover, such a periodic signal g ( t ) can be generated by a periodic repetition of any of its segment of duration TO. Therefore, the trigonometric Fourier series representing a segment of g(t) of duration TO starting at any instant represents g(t) for all t. This means in computing the coefficients OQ, an, and bn, we may use any value for t\ in Eq. (2.76). In other
* In reality, the series convergence at the points of discontinuity shows about 9% overshoot (Gibbs phenomenon).
56
words, we may perform this integration over any interval of TO. Thus, the Fourier coefficients of a series representing a periodic signal g(t) (for all t) can be expressed as
o
= -5- JT / TO
n= 1,2,3,...
(2.83c)
where fT means that the integration is performed over any interval of TO seconds.
JTO
57
This is known as the weak Dirichlet condition. If a function g(t) satisfies the weak Dirichlet condition, the existence of a Fourier series is guaranteed, but the series may not converge at every point. For example, if a function g(t) is infinite at some point, then obviously the series representing the function will be nonconvergent at that point. Similarly, if a function has an infinite number of maxima and minima in one period, then the function contains an appreciable amount of the infinite frequency component and the higher coefficients in the series do not decay rapidly, so that the series will not converge rapidly or uniformly. Thus, for a convergent Fourier series, in addition to condition (2.84), we require that 2. The function g(t) can have only a finite number of maxima and minima in one period, and it may have only a finite number of finite discontinuities in one period. These two conditions are known as the strong Dirichlet conditions. We note here that any periodic waveform that can be generated in a laboratory satisfies strong Dirichlet conditions and hence possesses a convergent Fourier series. Thus, a physical possibility of a periodic waveform is a valid and sufficient condition for the existence of a convergent series.
Example 2.8
Find the compact trigonometric Fourier series for the periodic square wave w(t) shown in Fig. 2.20a, and sketch its amplitude and phase spectra. The Fourier series is w(?) = GO + / Qn cos n2jrfot + bn sin n
n=l
Figure 2.20
(a) Square pulse periodic signal and (b) its Fourier spectrum.
(a)
1.
c,,
0.5
(
--""
""--
--....J
...
(b)
2..
, 4
To
(0 *
2 1 -'" T~"*'"
58
= /
w(t)dt
In the foregoing equation, we may integrate w(t) over any interval of duration TO- In this particular case, the signal period is TO = 2it. Thus,
= I
Thus, it is simpler to use MO to represent the Fourier series. Figure 2.20a shows that the best choice for a region of integration is from To/2 to To/2. Because w(t) = 1 only over ( -^-, -^) and w(t) = 0 over the remaining segment,
(2.85a)
TO J-T0/4 2
We could have found OQ, the average value of w(t), to be 0.5 merely by inspection of w(t) in Fig. 2.20a. Also,
2 fT'4
2 . (mt\
Jm
-^r
(2.85b)
71=3,7,11,15,...
2
=
fT0/4 (2.85c)
--
1 2 / = - H I cos t
1 cos 3t + - cos 5t
cos It +
Observe that bn = 0 and all the sine terms are zero. Only the cosine terms appear in the trigonometric series. The series is therefore already in the compact form except that the amplitudes of alternating harmonics are negative. Now by definition, amplitudes Cn are positive [see Eq. (2.78a)]. The negative sign can be accommodated by a phase of TT
2.8 Trigonometric Fourier Series radians. This can be seen from the trigonometric identity*
cos x cos (x TT)
59
Using this fact, we can express the series in Eq. (2.86) as w(t) = - H cos a)Qt + - cos (3a>ot JT) + - cos 5a>ot 2 TT [_ 3 5 + - cos (7<w0? - n) + - cos 9u>ot H ---This is the desired form of the compact trigonometric Fourier series. The amplitudes are
n even -dd
-n
We could plot amplitude and phase spectra using these values. We can, however, simplify our task in this special case if we allow amplitude Cn to take on negative values. If this is allowed, we do not need a phase of TT to account for the sign. This means that the phases of all components are zero, and we can discard the phase spectrum and manage with only the amplitude spectrum, as shown in Fig. 2.20b. Observe that there is no loss of information in doing so and that the amplitude spectrum in Fig. 2.20b has the complete information about the Fourier series in (2.86). Therefore, whenever all sine terms vanish (bn = 0), it is convenient to allow Cn to take on negative values. This permits the spectral information to be conveyed by a single spectrumthe amplitude spectrum. Because Cn can be positive as well as negative, the spectrum is called the amplitude spectrum rather than the magnitude spectrum. Another useful function that is related to the periodic square wave is the the bipolar square wave w0(t) shown in Fig. 2.21. We encounter this signal in switching applications.
W0(
')
-TO
1.
TO
2T0
t-
* Because cos (x jr) = - cos x, we could have chosen the phase n or n. In fact, cos (x NJT) = cos x for any odd integral value of N. Therefore, the phase can be chosen as Nx where N is any convenient odd integer.
*l
60
Note that w0(t) is basically w(t) minus its dc component. It is easy to see that
w0(t) = 2[w(0 - 0.5]
n \
(2.87)
Comparison of Eq. (2.87) with Eq. (2.86) shows that the Fourier components of w0(t) are identical to those of w(t) [Eq. (2.86)] in every respect except for doubling the amplitudes and loss of dc.
Example 2.9
Find the trigonometric Fourier series and sketch the corresponding spectra for the periodic impulse train STO(I) shown in Fig. 2.22a. The trigonometric Fourier series for STO (?) is given by STo(t) = C0 + y^Cn cos (n2nfQt + 9n) We first compute CIQ, an and bn:
To/2
u>0 = Jo
S(t) dt =
-To/2
T0
an = /
C o/2
TO J-T0/2
Figure 2.22 (a) Impulse train and (b) its Fourier spectrum.
g(t) =
i>
5 (0 i
- ^ ii
i(
\
0
1
r
- 2T0
TO
1[
(a)
2 76
T0
'-
2
T
G,
1
TO
(b)
i00
2 j)()
3a)o
4( j)0
5(Oo
60J()
0)^-
61
This result follows from the sampling property (2.19a) of the impulse function. Similarly, by using the sampling property of the impulse, we obtain
O pTo/2
To
1 + 2 y cos n2jifyt
n=\
(2.88)
Figure 2.22b shows the amplitude spectrum. The phase spectrum is zero.
^(m-n)^! ^ _ I 0
JTQ
JTO
' [To
m n m =n
(2.89)
Moreover, this set is a complete set.3'4 From Eqs. (2.66) and (2.69), it follows that a signal g (/) can be expressed over an interval of TO second(s) as an exponential Fourier series
_ g(t) =
"sr
n=oo
oo
jna>0r
(2.90)
oo
62
' dt
(2.91)
The exponential Fourier series is basically another form of the trigonometric Fourier series. Each sinusoid of frequency/ can be expressed as a sum of two exponentials, e/2^ and e~y2jr^. As a result, the exponential Fourier series consists of components of the form ^"27r/o< wim n varying from oo to oo. The exponential Fourier series in Eq. (2.90) is periodic with period TQ. To see its close connection with the trigonometric series, we shall rederive the exponential Fourier series from the trigonometric Fourier series. A sinusoid in the trigonometric series can be expressed as a sum of two exponentials by using Euler's formula:
Ca cos
9,,) =
(2.92) where
D - *-'nt? '-'n c fJ
j.
/)
"
(2.93)
Recall that g(t) is given by g(t) = C0 + T Cn cos (n2nf0t + 8n) Use of Eq. (2.92) in the foregoing equation (and letting Co = DO) yields
g(t) =
= D0 +
which is precisely equivalent to Eq. (2.90) derived earlier. Equation (2.93) shows the close connection between the coefficients of the trigonometric and the exponential Fourier series. Observe the compactness of expressions (2.90) and (2.91) and compare them with expressions corresponding to the trigonometric Fourier series. These two equations demonstrate very clearly the principal virtue of the exponential Fourier series. First, the form of the series is more compact. Second, the mathematical expression for deriving the coefficients of the series is also compact. It is much more convenient to handle the exponential series than the trigonometric one. In system analysis also, the exponential form proves more convenient than the trigonometric form. For these reason we shall use exponential (rather than trigonometric) representation of signals in the rest of the book.
63
Example 2.10 Find the exponential Fourier series for the signal in Fig. 2.19b (Example 2.7). In this case, TO it, 2nfo 2n/To = 2, and
<p(t) =
= i r e-'/ > dt
-1
(2.94)
= <>* TTM
= 0.504 I 1 +
1 +74
(2.95a)
,/4r
1 +78
1
e>2t +
1
1
1 +7'12
,-j6t
1-74
1-78
1 -7-12
(2.95b)
Observe that the coefficients Dn are complex. Moreover, Dn and D_ n are conjugates as expected [see Eq. (2.93)].
64
(2.96a) (2.96b)
ZD,, = On
and
Thus,
Dn = \Dn\e Je"
and
)_ = \Dn\e^"
(2.97)
Note that \Dn\ are the amplitudes (magnitudes) and ZDn are the angles of various exponential components. From Eq. (2.96) it follows that the amplitude spectrum (\Dn\ vs./) is an even function off and the angle spectrum (ZD,, vs./) is an odd function off when g(t) is a real signal. For the series in Example 2.10 [see Eq. (2.93)], for instance, D0 = 0.504
/>, =
1+J4 0.504
= 0.122<?^'75-96 =>|D,| = 0.122, Z>, = -75.96 = 0.122e/'75'96 ==> |D_i| = 0.122, Z)_i = 75.96
and
0.504 D2 = -:^ = 0.0625^'82-87 =$\D2\ = 0.0625, Z>2 = -82.87 D-2 = = 0.0625e/82'87 ==> |Z>_2| = 0.0625, ZD_2 = 82.87
and so on. Note that > and /?_ are conjugates, as expected [see Eq. (2.96)]. Figure 2.23 shows the frequency spectra (amplitude and angle) of the exponential Fourier series for the periodic signal <p(t) in Fig. 2.19b. We notice some interesting features of these spectra. First, the spectra exist for positive as well as negative values off (the frequency). Second, the amplitude spectrum is an even function off and the angle spectrum is an odd function off. Finally, we see a close connection between these spectra and the spectra of the corresponding trigonometric Fourier series for <p(t) (Fig. 2.19c and d). Equation (2.96a) shows the connection between the trigonometric spectra (Cn and #) with exponential spectra (\Dn\ and ZDn). The dc components DO and Co are identical in both spectra. Moreover, the exponential amplitude spectrum \Dn \ is half of the trigonometric amplitude spectrum Cn for n > 1. The exponential angle spectrum ZDn is identical to the trigonometric phase spectrum 6n for n > 0. We can therefore produce the exponential spectra merely by inspection of trigonometric spectra, and vice versa.
65
0.504 i
[A,
0.122 T
0.0625
.
-10
T
-6
I
-4
I
-2
T
10
A,
(b)
-10 -8 -6 -4 -2
10
of a negative frequency fo can be expressed, by borrowing o>o = 2jr/n, as cos ( a>ot + 9) = cos (o>o? 0) This clearly shows that the frequency of a sinusoid cos ( <wrj? + 6) is |o>ol, which is a positive quantity. The common ideas that a frequency must be positive comes from the traditional notion that frequency is associated with a real-valued sinusoid (such as a sine or a cosine). In reality, the concept of frequency for a real-valued sinusoid describes only the rate of the sinusoidal variation, without concern for the direction of the variation. This is because realvalued sinusoidal signals do NOT contain information on the direction of its variation. The concept of negative frequency is meaningful only when we are considering complex sinusoids for which the rate and the direction of variation are meaningful. Observe that
This relationship clearly shows that positive or negative coo both lead to periodic variation of the same rate. However, the resulting complex signals are NOT the same. Because \ both e+Mif and e~JW(>t are unit length complex variables that can be shown on the complex plane. We illustrate the two exponential sinusoids as unit length complex variables that are varying with time t in Fig. 2.24. Thus, the rotation rate for both exponentials e^100' is |o>o|. It is clear that for positive frequency, the exponential sinusoid rotates counterclockwise, whereas for negative frequency, the exponential sinusoid rotates clockwise. This illustrates the actual meaning of negative frequency. There exists a good analogy between positive/negative frequency and positive and negative velocity. Just as people are reluctant to use negative velocity in describing a moving object, they are equally unwilling to accept the notion of "negative" frequency. However, once we understand that negative velocity simply refers to both the negative direction and the actual speed of a moving object, negative velocity makes perfect sense. Likewise, negative frequency does NOT describe the rate of periodic variation of a sine or a cosine. It describes the direction of rotation of a unit length exponential sinusoid and its rate of revolution.
66
Figure 2.24 (a) Unit length complex variable with positive frequency (rotating counterclockwise) and (b) unit length complex variable with negative frequency (rotating clockwise).
Re
/I
/s
e~j<ao'
;l
,\
.\
Another way of looking at the situation is to say that exponential spectra are a graphical representation of coefficients Dn as a function off. Existence of the spectrum at f = nfo is merely an indication that an exponential component e~^ fl exists in the series. We know that a sinusoid of frequency nu)Q can be expressed in terms of a pair of exponentials e>na)t and e~->na}ot [Eq. (2.92)]. That both sine and cosine consist of positive- and negative-frequency exponential sinusoidal components clearly indicates that we are NOT at all able to use o>o alone to describe the direction of their periodic variations. Indeed, both sine and cosine functions of frequency <wo consist of two equal-sized exponential sinusoids of frequency o>o. Thus, the frequency of sine or cosine is the absolute value of their two component frequencies and denotes only the rate of the sinusoidal variations. Example 2.11 Find the exponential Fourier series for the periodic square wave w(t) shown in Fig. 2.20a.
W (r)=
Dne>n27TfQt
where
1
To
2
dt
I1 ffTo/4 = -- I
TO J1
_.-_,^,, .
-/n27r/07b/4 _
-jn2nfoT0 L 2 /27r/07b\ 1 /TTN sin - = sin mi \ 2/ n27r/07b V 4 ) In this case Dn is real. Consequently, we can do without the phase or angle plot if we plot Dn versus/ instead of the amplitude spectrum (\Dn\ vs./) as shown in Fig. 2.25. Compare this spectrum with the trigonometric spectrum in Fig. 2.20b. Observe that DO = Co and \Dn\ = |D_ n | = Cn/2, as expected.
i
Figure 2.25 Exponential Fourier spectrum of the square pulse periodic signal.
0.5
67
, Dn
-7
-9
-3
-1
I \ /
-i\L/
371 *
Example 2.12 Find the exponential Fourier series and sketch the corresponding spectra for the impulse train <5r0(?) shown in Fig. 2.26a. The exponential Fourier series is given by
/o =
(2.98)
where Dn - I 8To(t)e~jn27rf0'dt TO JTO Choosing the interval of integration (=i, ^f) and recognizing that over this interval 8To(t) = S(t), we write
1 Dn =
-To/2
r T-o/2
In this integral, the impulse is located at t = 0. From the sampling property of the impulse function, the integral on the right-hand side is the value of g-./n27r/o' at t = 0 (where the impulse is located). Therefore
TO
(2.99)
and
5 ro (r) = (2.100)
Equation (2.100) shows that the exponential spectrum is uniform (Dn = l/7b) for all the frequencies, as shown in Fig. 2.26. The spectrum, being real, requires only the amplitude
68
plot. All phases are zero. Compare this spectrum with the trigonometric spectrum shown in Fig. 2.22b. The dc components are identical, and the exponential spectrum amplitudes are half of those in the trigonometric spectrum for all/ > 0.
Figure 2.26
(a) Impulse train and (b) its exponential Fourier spectrum.
1
g(f) = 8To(t)
I
k
1 k
I
(a)
-2?o
-To
Dn
TO
27b
3r0
t^
(b)
-4o)o ~3coo -2 2o)0 3coo 4(00 5(00
g(t)=Do+
69
Comment: Parseval's theorem occurs in many different forms, such as in Eqs. (2.70), (2.101), and (2.102a). Yet another form is found in the next chapter for nonperiodic signals. Although these forms appear different, they all state the same principle: that is, the square of the length of a vector equals the sum of the squares of its orthogonal components. The form (2.70) applies to energy signals, the form (2.101) applies to periodic signals represented by the trigonometric Fourier series, and the form (2.102a) applies to periodic signals represented by the exponential Fourier series.
% (file name: ustep.m) % The unit step function is a function of time v t'. % Usage y = ustep(t) % % ustep (t) = 0 if t < 0 % ustep(t) = 1 , if t >= 1 % % t - must be real-valued and can be a vector or a matrix % function y=ustep(t) y = (t> = 0) ; end
% (file name: rect.m) % The rectangular function is a function of time 't'. Usage y = rect(t) t - must be real-valued and can be a vector or a matrix
70
Figure 2.27
Graphing a
signal.
-2
-1.5
-1
-. 05
rect(t) = 1, rect(t) = 0,
% (file name: triangl.m) % The triangle function is a function of time 't'. % % triangl(t) = l-|t|, if triangl(t) = 0, if |t| < 1 |t| > 1
% Usage y = triangl(t) % t - must be real-valued and can be a vector or a matrix % function y=triangl(t) y = (1-abs (t)) .* (t> = -l) . * (t<l) ; end We now show how to use MATLAB to generate a simple signal plot through an example program siggraf . m. In this example, we construct and plot a signal y(t) = exp (t) sin (6nt}u(t + 1) The resulting figure is shown in Fig. 2.27.
% (file name: siggraf.m) % To graph a signal, the first step is to determine % the x-axis and the y-axis to plot % We can first decide the length of x-axis to plot t=[-2:0.01:3]; % "t" is from -2 to 3 in 0.01 increment % Then evaluate the signal over the range of "t" to plot
2.10MATLAB Exercises
71
y=exp(-t).*sin(10*pi*t).*ustep(t+l); figure(1); figl=plot(t,y); % plot t vs y in figure 1 set(figl,'Linewidth',2); % choose a wider line-width xlabel('\it t'); % use italic 't' to label x-axis ylabel('{\bf y}({\it t })'); % use boldface %y' to label y-axis title ('{\bf y}_{\rm time domain}'); % can use subscript
Signal Operations
Some useful signal operations introduced in Sec. 2.3 can be implemented and illustrated by means of MATLAB. We provide the example program sigtransf . m to demonstrate the basic operations. First, we generate a segment of an exponentially decaying function
We then apply time scaling and time shifting to generate new signals yi(t)=y(2t) y2(t)=y(t + 2)
Finally, time scaling, time inversion, and time shifting are all utilized to generate a new signal y3(t)=y(2-2t) The original signal y(t) and its transformations are all given in Fig. 2.28.
(file name sigtransf.m) To apply a transform time-domain transformation on a signal y=g(t), simply redefine the x-axis a signal, the first step is to determine the x-axis and the y-axis to plot We can first decide the range of 't' for g(t) t= [-3 :0.002 :5] ; % "t" is from -3 to 5 in 0.002 increment Then evaluate the signal over the range of "t" to plot y=exp(-abs(t)/4).*(ustep(t)-ustep(t-4)); Form the corresponding signal vector y=g(t) = exp(-t) sin(10*pi*t) [u(t)-u(t-4)] figure(1); subplot(221);figO=plot(t,y); % plot y vs t in subfigure 1 set(figO,'Linewidth',2); % choose a wider line-width xlabel('\it t'); % use italic v t' to label x-axis ylabel('{\bf y}({\it t })'); % use boldface 'y' to label y-axis
72
Figure 2.28
Examples of basic signal operations.
0.5
0.5 0
-0.5
-0.5
0 t
y(2-2t)
1.5 1
0.5
. 0.5 0
-0.5
-2
0
t
-0.5
0 f 2
title('original signal y(t)'); Now we evaluate the dilated signal tl=t*2; % Scale in time Form the corresponding signal vector yl=exp(-abs(tl)/4).*(ustep(tl)-ustep(tl-4)); figure(1); subplot(222);figl=plot(t,yl); % plot y vs t in subfigure 2 set (f igl, 'Linewidth' , 2) ,% choose a wider line-width use italic 't' to label x-axis xlabel ('\it t' ) ; ylabel('{\bf y_l}({\it t } ; % use boldface 'y' to label y-axis title('time scaling y(2t)' Now we evaluate the dilated signal t2=t+2; % shift in time Form the corresponding signal vector y2=exp(-abs(t2)/4).*(ustep(t2)-ustep(t2-4)); figure (1) ,subplot(223);fig2=plot(t,y2); % plot y vs t in subfigure 2 set(fig2,'Linewidth',2)/ % choose a wider line-width xlabelC\it t'); % use italic 't' to label x-axis ylabel('{\bf y_2}({\it t } ' ; % use boldface )) 'y' to label y-axis title('time shifting y(t+2)');
2.10MATLAB Exercises
73
Now we evaluate the dilated signal t3=2-t*2; % time-reversal+Scale in time Form the corresponding signal vector y3=exp(-abs(t3)/4).*(ustep(t3)-ustep(t3-4)); figure(1) ; subplot(224);fig3=plot(t,y3); % plot y vs t in subfigure 2 set(fig3,'Linewidth',2); % choose a wider line-width xlabel('\it t'); % use italic 't' to label x-axis ylabel('{\bf y_3}({\it t })'); % use boldface 'y' to label y-axis title( v y(2-2t)'); subplot(221); subplot(222); subplot(223); subplot(224); axis([-3 axis([-3 axis([-3 axis([-3 5 5 5 5 -.5 -.5 -.5 -.5 1.5]); 1.5]); 1.5]); 1.5]); grid; grid; grid; grid;
% % % %
(file name: PfuncEx.m) This example generates a periodic signal, plots the signal and evaluates the averages signal power in y_power and signal energy in 1 period T : y_energyT echo of f ; clear ; elf ; % To generate a periodic signal g_T(t) , % we can first decide the signal within the period of 'T' for g(t) Dt=0.002; % Time interval (to sample the signal) T=6; % period=T M=3 ; % To generate 2M periods of the signal t= [0 :Dt :T-Dt] ; %"t" goes for one period [0, T] in Dt increment % Then evaluate the signal over the range of "T" y=exp (-abs (t) /2) . *sin(2*pi*t) .* (ustep (t) -ustep (t-4) ) ; % Multiple periods can now be generated. time= [] ; y_periodic= [] ; for i=-M:M-l, time= [time i*T+t] ; y_periodic= [y_periodic y] ; end figure (1) ; fy=plot (time, y_periodic) ;
74
Figure 2.29
Generating a periodic signal.
set(fy,'Linewidth',2);xlabel('?'); echo on Compute average power y_power=sum(y_periodic*y_periodic')*Dt/(max(time)-min(time) ) Compute signal energy in I period T y_energyT=sum(y.*conj(y))*Dt The program generates a figure of periodic signal in Fig. 2.29 and numerical answers: y_power =
0.0813
y_energyT = 0.4878
Signal Correlation
The concept of signal correlation introduced in Sec. 2.6 can be implemented directly by using a MATLAB program. In the next computer example, the program s ign_cor. m evaluates the signal correlation coefficients between x(t) and signals g\ (t), g2(t), ... , g$(t). The program first generates Fig. 2.30, which illustrates the six signals in the time domain.
% (file name: sign_cor.m) clear % To generate 6 signals x(t), g_l(t), ... g_5(t); % of Example 2.6 % we can first decide the signal within the period of 'T' for g(t) Dt=0.01; % time increment Dt
2.10MATLAB Exercises
Figure 2.30
Signals from Example 2.6.
1
75
1
0.5
? -0.5
?. tw
0
-0.5
:
2 t
1 L
4
S
=<:
n
-0.5
-1
i 0
c)
1
0.5
2
t
1
0.5 0.5
I D
0
-0.5
-1 2 4
-0.5
-1 2 4
':
-0.5
-1 2 4
T=6.0; % time duration = T t= [-l:Dt:T]; %"t" goes between [-1, T] in Dt increment % Then evaluate the signal over the range of 't" to plot x=ustep(t)-ustep(t-5); gl=0.5*(ustep(t)-ustep(t-5)); g2=-(ustep(t)-ustep(t-5)); g3 = exp(-t/5) .*(ustep(t)-ustep (t-5)) ; g4=exp(-t) .* (ustep (t)-ustep(t-5)) ; g5=sin(2*pi*t).*(ustep(t)-ustep(t-5)); subplot(231); sigl=plot(t,x,'k'); xlabel (' t') ; ylabel (' x ( t) ' ) ; Label axis set(sigl,'Linewidth',2); % change linewidth axis([-.5 6 -1.2 1.2]); grid % set plot range subplot(232); sig2=plot(t,gl,'k xlabel ('/'); ylabel(' g_1(t) ' ) ; set(s ig2, 'Linewidth',2) ; axis([-.5 6 -1.2 1.2]); grid subplot(233); sig3=plot(t,g2,'k xlabel('*'); ylabel(' g_2(/)'); set(sig3,'Linewidth',2); axis([-.5 6 -1.2 1.2]); grid subplot(234); sig4=plot(t,g3 'k') ; xlabel(' t') ; ylabel(' g_3(t ) ' set(sig4,'Linewidth',2); axis([-.5 6 -1.2 1.2]); grid subplot(235); sig5=plot(t,g4 xlabel (';'); ylabel(' g_4( / ) ' set (sig5, 'Linewidth' ,2) ;grid axis([-.5 6 -1.2 1.2]);
Viel mehr als nur Dokumente.
Entdecken, was Scribd alles zu bieten hat, inklusive Bücher und Hörbücher von großen Verlagen.
Jederzeit kündbar.