CH13
CH13
Continuous signal processing is a parallel field to DSP, and most of the techniques are nearly
identical. For example, both DSP and continuous signal processing are based on linearity,
decomposition, convolution and Fourier analysis. Since continuous signals cannot be directly
represented in digital computers, don't expect to find computer programs in this chapter.
Continuous signal processing is based on mathematics; signals are represented as equations, and
systems change one equation into another. Just as the digital computer is the primary tool used
in DSP, calculus is the primary tool used in continuous signal processing. These techniques have
been used for centuries, long before computers were developed.
A thought experiment will show how this works. Imagine an electronic circuit
composed of linear components, such as resistors, capacitors and inductors.
Connected to the input is a signal generator that produces various shapes of
short pulses. The output of the circuit is connected to an oscilloscope,
displaying the waveform produced by the circuit in response to each input
pulse. The question we want to answer is: how is the shape of the output
pulse related to the characteristics of the input pulse? To simplify the
investigation, we will only use input pulses that are much shorter than the
output. For instance, if the system responds in milliseconds, we might use input
pulses only a few microseconds in length.
243
244 The Scientist and Engineer's Guide to Digital Signal Processing
Input signals that are brief enough to have these three properties are called
impulses. In other words, an impulse is any signal that is entirely zero
except for a short blip of arbitrary shape. For example, an impulse to a
microwave transmitter may have to be in the picosecond range because the
electronics responds in nanoseconds. In comparison, a volcano that erupts
for years may be a perfectly good impulse to geological changes that take
millennia.
Since the delta function is defined to be infinitesimally narrow and have a fixed
area, the amplitude is implied to be infinite. Don't let this bother you; it is
completely unimportant. Since the amplitude is part of the shape of the
impulse, you will never encounter a problem where the amplitude makes any
difference, infinite or not. The delta function is a mathematical construct, not
a real world signal. Signals in the real world that act as delta functions will
always have a finite duration and amplitude.
Just as in the discrete case, the continuous delta function is given the
mathematical symbol: * ( ) . Likewise, the output of a continuous system in
response to a delta function is called the impulse response, and is often
denoted by: h ( ) . Notice that parentheses, ( ), are used to denote continuous
signals, as compared to brackets, [ ], for discrete signals. This notation is
used in this book and elsewhere in DSP, but isn't universal. Impulses are
displayed in graphs as vertical arrows (see Fig. 13-1d), with the length of the
arrow indicating the area of the impulse.
To better understand real world impulses, look into the night sky at a planet
and a star, for instance, Mars and Sirius. Both appear about the same
brightness and size to the unaided eye. The reason for this similarity is not
Chapter 13- Continuous Signal Processing 245
a. Linear
System
Linear
b. System
Linear
c System
* (t) Linear
d. System
FIGURE 13-1
The continuous delta function. If the input to a linear system is brief compared to the resulting
output, the shape of the output depends only on the characteristics of the system, and not the shape
of the input. Such short input signals are called impulses. Figures a,b & c illustrate example input
signals that are impulses for this particular system. The term delta function is used to describe a
normalized impulse, i.e., one that occurs at t ' 0 and has an area of one. The mathematical symbols
for the delta function are shown in (d), a vertical arrow and *(t) .
These objects look the same because they are small enough to be impulses to
the human visual system. The perceived shape is the impulse response of the
eye, not the actual image of the star or planet. This becomes obvious when the
two objects are viewed through a small telescope; Mars appears as a dim disk,
while Sirius still appears as a bright impulse. This is also the reason that stars
twinkle while planets do not. The image of a star is small enough that it can
be briefly blocked by particles or turbulence in the atmosphere, whereas the
larger image of the planet is much less affected.
246 The Scientist and Engineer's Guide to Digital Signal Processing
Convolution
Just as with discrete signals, the convolution of continuous signals can be
viewed from the input signal, or the output signal. The input side
viewpoint is the best conceptual description of how convolution operates.
In comparison, the output side viewpoint describes the mathematics that
must be used. These descriptions are virtually identical to those presented
in Chapter 6 for discrete signals.
Figure 13-2 shows how convolution is viewed from the input side. An input
signal, x (t) , is passed through a system characterized by an impulse response,
h (t) , to produce an output signal, y (t) . This can be written in the familiar
mathematical equation, y (t) ' x(t) th (t) . The input signal is divided into
narrow columns, each short enough to act as an impulse to the system. In
other words, the input signal is decomposed into an infinite number of scaled
and shifted delta functions. Each of these impulses produces a scaled and
shifted version of the impulse response in the output signal. The final output
signal is then equal to the combined effect, i.e., the sum of all of the individual
responses.
For this scheme to work, the width of the columns must be much shorter
than the response of the system. Of course, mathematicians take this to the
extreme by making the input segments infinitesimally narrow, turning the
situation into a calculus problem. In this manner, the input viewpoint
describes how a single point (or narrow region) in the input signal affects
a larger portion of output signal.
In comparison, the output viewpoint examines how a single point in the output
signal is determined by the various values from the input signal. Just as with
discrete signals, each instantaneous value in the output signal is affected by a
section of the input signal, weighted by the impulse response flipped
left-for-right. In the discrete case, the signals are multiplied and summed. In
the continuous case, the signals are multiplied and integrated. In equation
form:
%4
m
EQUATION 13-1
The convolution integral. This equation y(t ) ' x(J) h (t & J) dJ
defines the meaning of: y (t ) ' x (t )t h (t ) .
&4
This equation is called the convolution integral, and is the twin of the
convolution sum (Eq. 6-1) used with discrete signals. Figure 13-3 shows how
this equation can be understood. The goal is to find an expression for
calculating the value of the output signal at an arbitrary time, t. The first
step is to change the independent variable used to move through the input
signal and the impulse response. That is, we replace t with J (a lower case
Chapter 13- Continuous Signal Processing 247
a a
x(t) c
Linear y(t) c
System b
b
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.
h(t-J) t 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)
2 2
R
Amplitude
Amplitude
1 1
C
0 0
-1 0 1 2 3 -1 0 1 2 3
Time 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:
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
Amplitude
1 1 1
0 0 0
-1 0 1 2 3 -1 0 1 2 3 -1 0 1 2 3
Time 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 13- Continuous Signal Processing 249
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 shifted-
flipped impulse response.
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:
m
y(t ) ' x(J) h (t & J) dJ (start with Eq. 13-1)
&4
m
y(t ) ' 1@ "e & "( t& J) d J (plug in the signals)
0
t
/
& "t "J
y(t ) ' e [e ] (evaluate the integral)
0
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
m
y(t ) ' 1@ "e & "( t& J) d J (plug into Eq. 13-1)
0
1
/
y(t ) ' e & " t [ e "J ] (evaluate the integral)
0
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.
Amplitude
Amplitude
1 1 1
0 0 0
-1 0 1 2 3 -1 0 1 2 3 -1 0 1 2 3
Time Time Time
d/dt I
xN(t) h(t) yN(t)
2 2 2
1 1 1
Amplitude
Amplitude
Amplitude
0 0 0
-1 -1 -1
-2 -2 -2
-1 0 1 2 3 -1 0 1 2 3 -1 0 1 2 3
Time Time 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
%4
Bm
1
x (t ) ' Re X (T) cos (T t ) & Im X (T) sin(T t ) dT
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 13- Continuous Signal Processing 253
Amplitude
60
8 40
a. x(t)
4 20
Amplitude
0
0 0 20 40 60 80 100 120 140
Frequency (hertz)
-4 100
c. Im X(T)
-8 80
-50 -40 -30 -20 -10 0 10 20 30 40 50
Time (milliseconds)
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:
%4
m
EQUATION 13-3 Re X (T) ' x(t ) cos (T t ) d t
The Fourier transform analysis equations. In &4
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 %4
m
domain signal being analyzed.
Im X (T) ' & x(t ) sin(T t ) d t
&4
254 The Scientist and Engineer's Guide to Digital Signal Processing
The frequency response is found by plugging the impulse response into the
analysis equations. First, the real part:
%4
m
Re H(T) ' h (t ) cos (T t ) dt (start with Eq. 13-3)
&4
%4
m
Re H(T) ' "e & " t cos (T t ) dt (plug in the signal)
%4
"e & " t
/
Re H (T) ' [ & " cos (T t ) % T sin(T t ) ] (evaluate)
"2 % T2 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
"
Mag H (T) '
[ " % T2 ] 1/2
2
T
Phase H (T) ' arctan &
"
Figure 13-9 shows graphs of these curves for a cutoff frequency of 1000 hertz
(i.e., " ' 2B1000 ).
1.2 1.6
a. Magnitude 1.2 b. Phase
1.0
0.8
0.8 Phase (radians)
0.4
Amplitude
0.6 0.0
-0.4
0.4
-0.8
0.2
-1.2
0.0 -1.6
0 1000 2000 3000 4000 5000 6000 0 1000 2000 3000 4000 5000 6000
Frequency (hertz) 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.
not existing. The important point is that they do not contribute to forming the
time domain signal.
n'1 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 a n and b n coefficients hold the
amplitudes of the cosine and sine waves, respectively.
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:
T /2 T /2
2Btn
T m T m
1 2
a0 ' x (t ) d t an ' x(t ) cos dt
T
& T /2 & T /2
EQUATION 13-5
Fourier series analysis equations. In these equations, x(t) is T /2
&2 2Btn
T m
the time domain signal being decomposed, a0 is the DC
component, an & bn hold the amplitudes of the cosine and
bn ' x(t ) sin dt
sine waves, respectively, and T is the period of the signal,
T
& T /2
i.e., the reciprocal of the fundamental frequency.
Chapter 13- Continuous Signal Processing 257
b. Square A a0 ' 0
2A nB
an ' sin
A nB 2
bn ' 0
0
t=0 0 f 2f 3f 4f 5f 6f (all even harmonics are zero)
c. Triangle A a0 ' 0
4A
an '
A (nB)2
bn ' 0
0
t=0 0 f 2f 3f 4f 5f 6f (all even harmonics are zero)
d. Sawtooth A a0 ' 0
an ' 0
A A
bn '
nB
0
t=0 0 f 2f 3f 4f 5f 6f
e. Rectified A a0 ' 2 A /B
&4A
A an '
B(4n 2& 1)
bn ' 0
0
t=0 0 f 2f 3f 4f 5f 6f
f. Cosine wave A
a1 ' A
A
(all other coefficients are zero)
0
t=0 0 f 2f 3f 4f 5f 6f
FIGURE 13-10
Examples of the Fourier series. Six common time domain waveforms are shown, along with the equations to
calculate their "a" and "b" coefficients.
258 The Scientist and Engineer's Guide to Digital Signal Processing
-T/2 T/2
-k/2 k/2
A
Amplitude
0
-3T -2T -T 0 T 2T 3T
Time
FIGURE 13-11
Example of calculating a Fourier series. This is a pulse train with a duty cycle of d = k/T. The
Fourier series coefficients are calculated by correlating the waveform with cosine and sine waves
over any full period. In this example, the period from -T/2 to T/2 is used.
The duty cycle of the waveform (the fraction of time that the pulse is "high")
is thus given by d ' k/T . The Fourier series coefficients can be found by
evaluating Eq. 13-5. First, we will find the DC component, a0 :
T/2
T m
1
a0 ' x (t ) d t (start with Eq. 13-5)
& T/2
k/2
T m
1
a0 ' A dt (plug in the signal)
& k/2
Ak
a0 ' (evaluate the integral)
T
This result should make intuitive sense; the DC component is simply the
average value of the signal. A similar analysis provides the "a" coefficients:
Chapter 13- Continuous Signal Processing 259
T /2
T m
2 2Bt n
an ' x(t ) cos dt (start with Eq. 13-4)
T
& T /2
k /2
m
2 2Bt n
an ' A cos dt (plug in the signal)
T T
& k /2
k /2
/
2A T 2Bt n
an ' sin (evaluate the integral)
T 2Bn T & k /2
2A (reduce)
an ' sin(Bn d )
nB
The "b" coefficients are calculated in this same way; however, they all turn out
to be zero. In other words, this waveform can be constructed using only cosine
waves, with no sine waves being needed.
The "a" and "b" coefficients will change if the time domain waveform is
shifted left or right. For instance, the "b" coefficients in this example will be
zero only if one of the pulses is centered on t ' 0 . Think about it this way.
If the waveform is even (i.e., symmetrical around t ' 0 ), it will be composed
solely of even sinusoids, that is, cosine waves. This makes all of the "b"
coefficients equal to zero. If the waveform if odd (i.e., symmetrical but
opposite in sign around t ' 0 ), it will be composed of odd sinusoids, i.e., sine
waves. This results in the "a" coefficients being zero. If the coefficients are
converted to polar notation (say, M n and 2n coefficients), a shift in the time
domain leaves the magnitude unchanged, but adds a linear component to the
phase.
transmitter operating at this frequency. High stability calls for the circuit to
be crystal controlled. That is, the frequency of the oscillator is determined by
a resonating quartz crystal that is a part of the circuit. The problem is, quartz
crystals only work to about 10 MHz. The solution is to build a crystal
controlled oscillator operating somewhere between 1 and 10 MHz, and then
multiply the frequency to whatever you need. This is accomplished by
distorting the sine wave, such as by clipping the peaks with a diode, or running
the waveform through a squaring circuit. The harmonics in the distorted
waveform are then isolated with band-pass filters. This allows the frequency
to be doubled, tripled, or multiplied by even higher integers numbers. The
most common technique is to use sequential stages of doublers and triplers to
generate the required frequency multiplication, rather than just a single stage.
The Fourier series is important to this type of design because it describes the
amplitude of the multiplied signal, depending on the type of distortion and
harmonic selected.
1.0 DC 0.20000
1 kHz 0.37420
0.5 2 kHz 0.30273
3 kHz 0.20182
0.0 4 kHz 0.09355
5 kHz 0.00000
-0.5 6 kHz -0.06237
0 1 2 3 4 7 kHz -0.08649
Time (milliseconds) 8 kHz -0.07568
9 kHz -0.04158
10 kHz 0.00000
11 kHz 0.03402
FIGURE 13-12 12 kHz 0.05046
Example of Fourier series synthesis. The waveform !
being constructed is a pulse train at 1 kHz, an 123 kHz 0.00492
amplitude of one volt, and a duty cycle of 0.2 (as 124 kHz 0.00302
illustrated in Fig. 13-11). This table shows the 125 kHz 0.00000
amplitude of the harmonics, while the graph shows 126 kHz -0.00297
the reconstructed waveform using only the first !
fourteen harmonics. 803 kHz 0.00075
804 kHz 0.00046
805 kHz 0.00000
806 kHz -0.00046