Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Digital Signal Processing. The Scientist and Engineers Guide. Steven W. Smith

.pdf
Скачиваний:
169
Добавлен:
02.05.2014
Размер:
7 Мб
Скачать
☆

Chapter 13Continuous Signal Processing

247

 

a

 

 

a

 

 

 

 

 

 

x(t)

c

Linear

y(t)

b

c

 

System

 

 

 

b

 

 

 

time (t)

 

 

time(t)

 

FIGURE 13-2

Convolution viewed from the input side. The input signal, x(t) , is divided into narrow segments, each acting as an impulse to the system. The output signal, y (t), is the sum of the resulting scaled and shifted impulse responses. This illustration shows how three points in the input signal contribute to the output signal.

Greek tau). This makes x (t) and h (t) become x (J)and h (J), respectively. This change of variable names is needed because t is already being used to represent the point in the output signal being calculated. The next step is to flip the impulse response left-for-right, turning it into h (& J). Shifting the flipped impulse response to the location t, results in the expression becoming h(t& J) . The input signal is then weighted by the flipped and shifted impulse response by multiplying the two, i.e., x (J) h (t& J) . The value of the output signal is then found by integrating this weighted input signal from negative to positive infinity, as described by Eq. 13-1.

If you have trouble understanding how this works, go back and review the same concepts for discrete signals in Chapter 6. Figure 13-3 is just another way of describing the convolution machine in Fig. 6-8. The only difference is that integrals are being used instead of summations. Treat this as an extension of what you already know, not something new.

An example will illustrate how continuous convolution is used in real world problems and the mathematics required. Figure 13-4 shows a simple continuous linear system: an electronic low-pass filter composed of a single resistor and a single capacitor. As shown in the figure, an impulse entering this system produces an output that quickly jumps to some value, and then exponentially decays toward zero. In other words, the impulse response of this simple electronic circuit is a one-sided exponential. Mathematically, the

h(t-J) t

x(J) x(J)

 

 

 

t

Linear

 

y(t)

 

?

System

 

 

 

 

time (J)

time(t)

FIGURE 13-3

Convolution viewed from the output side. Each value in the output signal is influenced by many points from the input signal. In this figure, the output signal at time t is being calculated. The input signal, x (J), is weighted (multiplied) by the flipped and shifted impulse response, given by h ( t&J) . Integrating the weighted input signal produces the value of the output point, y (t)

248

The Scientist and Engineer's Guide to Digital Signal Processing

 

*(t)

h(t)

Amplitude

2

1

0 -1 0 1 2 3

Time

R

C

2

Amplitude

1

 

 

 

 

 

 

 

 

 

 

0

 

 

 

 

 

-1

0

1

2

3

Time

FIGURE 13-4

Example of a continuous linear system. This electronic circuit is a low-pass filter composed of a single resistor and capacitor. The impulse response of this system is a one-sided exponential.

impulse response of this system is broken into two sections, each represented by an equation:

h (t )

'

0

for t < 0

h (t )

'

"e &" t

for t $ 0

where " ' 1/RC (R is in ohms, C is in farads, and t is in seconds). Just as in the discrete case, the continuous impulse response contains complete information about the system, that is, how it will react to all possible signals. To pursue this example further, Fig. 13-5 shows a square pulse entering the system, mathematically expressed by:

x (t )

'

1

for 0 # t # 1

x (t )

'

0

otherwise

Since both the input signal and the impulse response are completely known as mathematical expressions, the output signal, y (t), can be calculated by evaluating the convolution integral of Eq. 13-1. This is complicated by the fact that both signals are defined by regions rather than a single

Amplitude

x(t)

2

1

0 -1 0 1 2 3

Time

Amplitude

 

 

h(t)

 

 

 

 

 

y(t)

 

 

2

 

 

 

 

Amplitude

2

 

 

 

 

1

 

 

 

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

0

 

 

 

 

 

0

 

 

 

 

-1

0

1

2

3

 

-1

0

1

2

3

 

 

Time

 

 

 

 

 

Time

 

 

FIGURE 13-5

Example of continuous convolution. This figure illustrates a square pulse entering an RC low-pass filter (Fig. 13-4). The square pulse is convolved with the system's impulse response to produce the output.

 

 

Chapter 13Continuous Signal Processing

249

a. No overlap

 

 

b. Partial overlap

c. Full overlap

 

 

(t < 0)

 

 

 

(0 # t # 1)

 

(t > 1)

 

 

t

 

 

 

 

 

t

 

 

t

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

1

0

1

0

1

J

 

J

 

J

 

FIGURE 13-6

Calculating a convolution by segments. Since many continuous signals are defined by regions, the convolution calculation must be performed region-by-region. In this example, calculation of the output signal is broken into three sections: (a) no overlap, (b) partial overlap, and (c) total overlap, of the input signal and the shiftedflipped impulse response.

mathematical expression. This is very common in continuous signal processing. It is usually essential to draw a picture of how the two signals shift over each other for various values of t. In this example, Fig. 13-6a shows that the two signals do not overlap at all for t < 0 . This means that the product of the two signals is zero at all locations along the J axis, and the resulting output signal is:

y (t ) ' 0

for t < 0

A second case is illustrated in (b), where t is between 0 and 1. Here the two signals partially overlap, resulting in their product having nonzero values between J ' 0 and J ' t . Since this is the only nonzero region, it is the only section where the integral needs to be evaluated. This provides the output signal for 0 # t #1 , given by:

4

y (t )

' m x (J) h (t & J) d J

(start with Eq. 13-1)

 

& 4

 

 

t

 

y (t )

' m1@ "e & "( t& J) d J

(plug in the signals)

 

0

 

 

t

 

y (t ) ' e

y (t ) ' e

& "t

[ e

"J

] /

(evaluate the integral)

 

 

 

 

 

 

0

 

& "t

[ e "t

& 1 ]

(reduce)

y (t ) ' 1 & e & "t

for 0 # t # 1

250

The Scientist and Engineer's Guide to Digital Signal Processing

Figure (c) shows the calculation for the third section of the output signal, where t > 1. Here the overlap occurs between J ' 0 and J ' 1 , making the calculation the same as for the second segment, except a change to the limits of integration:

 

 

1

 

 

 

 

 

y (t )

' m1@ "e & "( t& J) d J

(plug into Eq. 13-1)

 

 

0

 

 

 

 

 

 

 

 

 

 

 

1

 

y (t )

'

e

& "t

[ e

"J

] /

(evaluate the integral)

 

 

 

 

 

 

 

 

0

 

y (t )

' [ e "& 1 ] e & "t

for t > 1

The waveform in each of these three segments should agree with your knowledge of electronics: (1) The output signal must be zero until the input signal becomes nonzero. That is, the first segment is given by y (t ) ' 0 for t < 0 . (2) When the step occurs, the RC circuit exponentially increases to match the input, according to the equation: y (t ) ' 1 & e & " t . (3) When the input is returned to zero, the output exponentially decays toward zero, given by the equation: y (t ) ' ke & " t (where k ' e "& 1 , the voltage on the capacitor just before the discharge was started).

More intricate waveforms can be handled in the same way, although the mathematical complexity can rapidly become unmanageable. When faced with a nasty continuous convolution problem, you need to spend significant time evaluating strategies for solving the problem. If you start blindly evaluating integrals you are likely to end up with a mathematical mess. A common strategy is to break one of the signals into simpler additive components that can be individually convolved. Using the principles of linearity, the resulting waveforms can be added to find the answer to the original problem.

Figure 13-7 shows another strategy: modify one of the signals in some linear way, perform the convolution, and then undo the original modification. In this example the modification is the derivative, and it is undone by taking the integral. The derivative of a unit amplitude square pulse is two impulses, the first with an area of one, and the second with an area of negative one. To understand this, think about the opposite process of taking the integral of the two impulses. As you integrate past the first impulse, the integral rapidly increases from zero to one, i.e., a step function. After passing the negative impulse, the integral of the signal rapidly returns from one back to zero, completing the square pulse.

Taking the derivative simplifies this problem because convolution is easy when one of the signals is composed of impulses. Each of the two impulses in x )(t ) contributes a scaled and shifted version of the impulse response to

 

Chapter 13Continuous Signal Processing

251

x(t)

h(t)

y(t)

Amplitude

2

1

0

-1 0 1 2 3

Time

Amplitude

2

1

0

-1 0 1 2 3

Time

Amplitude

2

1

0

-1 0 1 2 3

Time

d/dt

 

 

xN(t)

 

 

 

 

h(t)

 

 

2

 

 

 

 

2

 

 

 

 

1

 

 

 

 

1

 

 

 

 

Amplitude -1

 

 

 

 

Amplitude-1

 

 

 

 

0

 

 

 

 

0

 

 

 

 

-2

 

 

 

 

-2

 

 

 

 

-1

0

1

2

3

-1

0

1

2

3

 

 

Time

 

 

 

 

Time

 

 

 

 

I

 

 

 

yN(t)

 

 

2

 

 

 

 

1

 

 

 

 

Amplitude-1

 

 

 

 

0

 

 

 

 

-2

 

 

 

 

-1

0

1

2

3

 

 

Time

 

 

FIGURE 13-7

A strategy for convolving signals. Convolution problems can often be simplified by clever use of the rules governing linear systems. In this example, the convolution of two signals is simplified by taking the derivative of one of them. After performing the convolution, the derivative is undone by taking the integral.

the derivative of the output signal, y )(t). That is, by inspection it is known that: y )(t ) ' h (t ) & h (t& 1). The output signal, y (t ) , can then be found by plugging in the exact equation for h (t ) , and integrating the expression.

A slight nuisance in this procedure is that the DC value of the input signal is lost when the derivative is taken. This can result in an error in the DC value of the calculated output signal. The mathematics reflects this as the arbitrary constant that can be added during the integration. There is no systematic way of identifying this error, but it can usually be corrected by inspection of the problem. For instance, there is no DC error in the example of Fig. 13-7. This is known because the calculated output signal has the correct DC value when t becomes very large. If an error is present in a particular problem, an appropriate DC term is manually added to the output signal to complete the calculation.

This method also works for signals that can be reduced to impulses by taking the derivative multiple times. In the jargon of the field, these signals are called piecewise polynomials. After the convolution, the initial operation of multiple derivatives is undone by taking multiple integrals. The only catch is that the lost DC value must be found at each stage by finding the correct constant of integration.

252

The Scientist and Engineer's Guide to Digital Signal Processing

Before starting a difficult continuous convolution problem, there is another approach that you should consider. Ask yourself the question: Is a mathematical expression really needed for the output signal, or is a graph of the waveform sufficient? If a graph is adequate, you may be better off to handle the problem with discrete techniques. That is, approximate the continuous signals by samples that can be directly convolved by a computer program. While not as mathematically pure, it can be much easier.

The Fourier Transform

The Fourier Transform for continuous signals is divided into two categories, one for signals that are periodic, and one for signals that are aperiodic. Periodic signals use a version of the Fourier Transform called the Fourier Series, and are discussed in the next section. The Fourier Transform used with aperiodic signals is simply called the Fourier Transform. This chapter describes these Fourier techniques using only real mathematics, just as the last several chapters have done for discrete signals. The more powerful use of complex mathematics will be reserved for Chapter 31.

Figure 13-8 shows an example of a continuous aperiodic signal and its frequency spectrum. The time domain signal extends from negative infinity to positive infinity, while each of the frequency domain signals extends from zero to positive infinity. This frequency spectrum is shown in rectangular form (real and imaginary parts); however, the polar form (magnitude and phase) is also used with continuous signals. Just as in the discrete case, the synthesis equation describes a recipe for constructing the time domain signal using the data in the frequency domain. In mathematical form:

 

% 4

 

x (t ) '

1

m Re X (T) cos (Tt )

& Im X (T) sin(Tt ) d T

B

 

0

 

EQUATION 13-2

The Fourier transform synthesis equation. In this equation, x(t) is the time domain signal being synthesized, and Re X(T) & Im X(T) are the real and imaginary parts of the frequency spectrum, respectively.

In words, the time domain signal is formed by adding (with the use of an integral) an infinite number of scaled sine and cosine waves. The real part of the frequency domain consists of the scaling factors for the cosine waves, while the imaginary part consists of the scaling factors for the sine waves. Just as with discrete signals, the synthesis equation is usually written with negative sine waves. Although the negative sign has no significance in this discussion, it is necessary to make the notation compatible with the complex mathematics described in Chapter 29. The key point to remember is that some authors put this negative sign in the equation, while others do not. Also notice that frequency is represented by the symbol, T, a lower case

Chapter 13Continuous Signal Processing

253

Time Domain

 

8

 

 

 

 

 

 

 

 

 

 

 

 

a. x(t)

 

 

 

 

 

 

 

 

 

4

 

 

 

 

 

 

 

 

 

 

Amplitude

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

-4

 

 

 

 

 

 

 

 

 

 

 

-8

 

 

 

 

 

 

 

 

 

 

 

-50

-40

-30

-20

-10

0

10

20

30

40

50

Time (milliseconds)

Frequency Domain

 

100

 

 

 

 

 

 

 

 

80

b. Re X(T)

 

 

 

 

 

 

 

 

 

 

 

 

 

Amplitude

60

 

 

 

 

 

 

 

40

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

20

 

 

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

0

20

40

60

80

100

120

140

Frequency (hertz)

 

100

 

 

 

 

 

 

 

 

80

c. Im X(T)

 

 

 

 

 

 

 

 

 

 

 

 

 

Amplitude

60

 

 

 

 

 

 

 

40

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

20

 

 

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

0

20

40

60

80

100

120

140

Frequency (hertz)

FIGURE 13-8

Example of the Fourier Transform. The time domain signal, x(t ), extends from negative to positive infinity. The frequency domain is composed of a real part, Re X(T) , and an imaginary part, Im X(T), each extending from zero to positive infinity. The frequency axis in this illustration is labeled in cycles per second (hertz). To convert to natural frequency, multiply the numbers on the frequency axis by 2B.

Greek omega. As you recall, this notation is called the natural frequency, and has the units of radians per second. That is, T' 2Bf , where f is the frequency in cycles per second (hertz). The natural frequency notation is favored by mathematicians and others doing signal processing by solving equations, because there are usually fewer symbols to write.

The analysis equations for continuous signals follow the same strategy as the discrete case: correlation with sine and cosine waves. The equations are:

EQUATION 13-3

The Fourier transform analysis equations. In this equation, Re X(T) & Im X(T) are the real and imaginary parts of the frequency spectrum, respectively, and x(t) is the time domain signal being analyzed.

 

% 4

Re X (T) '

m x (t ) cos (Tt ) d t

 

& 4

 

% 4

Im X (T) '

& m x (t ) sin(Tt ) d t

& 4

254

The Scientist and Engineer's Guide to Digital Signal Processing

As an example of using the analysis equations, we will find the frequency response of the RC low-pass filter. This is done by taking the Fourier transform of its impulse response, previously shown in Fig. 13-4, and described by:

h (t ) ' 0

h (t ) ' "e

 

for t < 0

& " t

for t $ 0

The frequency response is found by plugging the impulse response into the analysis equations. First, the real part:

 

% 4

 

Re H (T) '

 

mh (t ) cos (Tt ) d t

 

& 4

 

 

% 4

 

Re H (T) '

 

m "e & " t cos (Tt ) d t

 

0

 

 

 

"e & " t

Re H (T) '

 

 

[ & " cos (Tt )

 

 

 

 

"2 % T2

(start with Eq. 13-3)

(plug in the signal)

 

 

% 4

 

%

Tsin(Tt ) ]

/

(evaluate)

 

 

 

 

0

 

"2

Re H (T) '

"2 % T2

Using this same approach, the imaginary part of the frequency response is calculated to be:

& T"

Im H (T) '

"2 % T2

Just as with discrete signals, the rectangular representation of the frequency domain is great for mathematical manipulation, but difficult for human understanding. The situation can be remedied by converting into polar notation with the standard relations: Mag H (T) ' [ Re H (T)2 % Im H (T)2 ]½ and Phase H(T) ' arctan [ Re H(T) / Im H(T)] . Working through the algebra

Chapter 13Continuous Signal Processing

255

provides the frequency response of the RC low-pass filter as magnitude and phase (i.e., polar form):

"

Mag H (T) '

[ "2 % T2 ]1/2

Phase H (T) ' arctan & T

"

Figure 13-9 shows graphs of these curves for a cutoff frequency of 1000 hertz (i.e., "' 2B1000 ).

 

1.2

 

 

 

 

 

 

 

 

a. Magnitude

 

 

 

 

 

1.0

 

 

 

 

 

 

Amplitude

0.8

 

 

 

 

 

 

0.6

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0.4

 

 

 

 

 

 

 

0.2

 

 

 

 

 

 

 

0.0

 

 

 

 

 

 

 

0

1000

2000

3000

4000

5000

6000

Frequency (hertz)

 

1.6

 

 

 

 

 

 

 

1.2

b. Phase

 

 

 

 

 

 

 

 

 

 

 

(radians)

0.8

 

 

 

 

 

 

0.4

 

 

 

 

 

 

 

 

 

 

 

 

 

Phase

0.0

 

 

 

 

 

 

-0.4

 

 

 

 

 

 

 

 

 

 

 

 

 

 

-0.8

 

 

 

 

 

 

 

-1.2

 

 

 

 

 

 

 

-1.6

 

 

 

 

 

 

 

0

1000

2000

3000

4000

5000

6000

Frequency (hertz)

FIGURE 13-9

Frequency response of an RC low-pass filter. These curves were derived by calculating the Fourier transform of the impulse response, and then converting to polar form.

The Fourier Series

This brings us to the last member of the Fourier transform family: the Fourier series. The time domain signal used in the Fourier series is periodic and continuous. Figure 13-10 shows several examples of continuous waveforms that repeat themselves from negative to positive infinity. Chapter 11 showed that periodic signals have a frequency spectrum consisting of harmonics. For instance, if the time domain repeats at 1000 hertz (a period of 1 millisecond), the frequency spectrum will contain a first harmonic at 1000 hertz, a second harmonic at 2000 hertz, a third harmonic at 3000 hertz, and so forth. The first harmonic, i.e., the frequency that the time domain repeats itself, is also called the fundamental frequency. This means that the frequency spectrum can be viewed in two ways: (1) the frequency spectrum is continuous, but zero at all frequencies except the harmonics, or (2) the frequency spectrum is discrete, and only defined at the harmonic frequencies. In other words, the frequencies between the harmonics can be thought of as having a value of zero, or simply

256 The Scientist and Engineer's Guide to Digital Signal Processing

not existing. The important point is that they do not contribute to forming the time domain signal.

The Fourier series synthesis equation creates a continuous periodic signal with a fundamental frequency, f, by adding scaled cosine and sine waves with frequencies: f, 2f, 3f, 4f, etc. The amplitudes of the cosine waves are held in the variables: a1, a2, a3, a4, etc., while the amplitudes of the sine waves are held in: b1, b2, b3, b4, and so on. In other words, the "a" and "b" coefficients are the real and imaginary parts of the frequency spectrum, respectively. In addition, the coefficient a0 is used to hold the DC value of the time domain waveform. This can be viewed as the amplitude of a cosine wave with zero frequency (a constant value). Sometimes a0 is grouped with the other "a" coefficients, but it is often handled separately because it requires special calculations. There is no b0 coefficient since a sine wave of zero frequency has a constant value of zero, and would be quite useless. The synthesis equation is written:

4

x (t ) ' a0 % j an cos (2Bf t n)

n ' 1

EQUATION 13-4

The Fourier series synthesis equation. Any periodic signal, x(t) , can be reconstructed from sine and cosine waves with frequencies that are multiples of the fundamental, f. The an and bn coefficients hold the amplitudes of the cosine and sine waves, respectively.

4

& j bn sin(2Bf t n)

n ' 1

The corresponding analysis equations for the Fourier series are usually written in terms of the period of the waveform, denoted by T, rather than the fundamental frequency, f (where f ' 1/T ). Since the time domain signal is periodic, the sine and cosine wave correlation only needs to be evaluated over a single period, i.e., & T /2 to T /2 , 0 to T, -T to 0, etc. Selecting different limits makes the mathematics different, but the final answer is always the same. The Fourier series analysis equations are:

 

 

1

T /2

 

a0

'

m

x (t ) d t

 

T

 

 

 

& T /2

EQUATION 13-5

Fourier series analysis equations. In these equations, x(t) is the time domain signal being decomposed, a0 is the DC component, an & bn hold the amplitudes of the cosine and sine waves, respectively, and T is the period of the signal, i.e., the reciprocal of the fundamental frequency.

 

 

2

T /2

 

2 Bt n

 

an

'

m

x (t ) cos

d t

T

T

 

 

 

 

 

 

 

& T /2

 

 

 

 

 

 

T /2

 

2 Bt n

 

bn

 

& 2

x (t ) sin

 

'

T

m

T

d t

& T /2

Соседние файлы в предмете Электроника