Basic Concepts
DATA FUNCTIONS AND TRANSFORMS
To mathematicians, the term function can take on a wide range of meanings. In signal processing, most functions fall into two categories: waveforms, images, or other data; and entities that operate on waveforms, images, or other data (Hubbard, 1998). The latter group can be further divided into functions that modify the data, and functions used to analyze or probe the data. For example, the basic filters described inChapter 4use functions (the filter coefficients) that modify the spectral content of a waveform while the Fourier Transform detailed inChapter 3uses functions (harmonically related sinusoids) to analyze the spec-tral content of a waveform. Functions that modify data are also termed opera-tions or transformaopera-tions.
Since most signal processing operations are implemented using digital electronics, functions are represented in discrete form as a sequence of numbers:
x(n)= [x(1),x(2),x(3), . . . ,x(N)] (5)
Discrete data functions (waveforms or images) are usually obtained through analog-to-digital conversion or other data input, while analysis or modifying functions are generated within the computer or are part of the computer pro-gram. (The consequences of converting a continuous time function into a dis-crete representation are described in the section below on sampling theory.)
In some applications, it is advantageous to think of a function (of whatever type) not just as a sequence, or array, of numbers, but as a vector. In this conceptu-alization, x(n) is a single vector defined by a single point, the endpoint of the vector, in N-dimensional space, Figure 2.3.This somewhat curious and highly mathematical concept has the advantage of unifying some signal processing operations and fits well with matrix methods. It is difficult for most people to imagine higher-dimensional spaces and even harder to present them graphically, so operations and functions in higher-dimensional space are usually described in 2 or 3 dimensions, and the extension to higher dimensional space is left to the imagination of the reader. (This task can sometimes be difficult for non-mathematicians: try and imagine a data sequence of even a 32-point array repre-sented as a single vector in 32-dimensional space!)
A transform can be thought of as a re-mapping of the original data into a function that provides more information than the original.* The Fourier Trans-form described in Chapter 3 is a classic example as it converts the original time
*Some definitions would be more restrictive and require that a transform be bilateral; that is, it must be possible to recover the original signal from the transformed data. We will use the looser definition and reserve the term bilateral transform to describe reversible transformations.
FIGURE 2.3 The data sequence x(n)= [1.5,2.5,2] represented as a vector in three-dimensional space.
data into frequency information which often provides greater insight into the nature and/or origin of the signal. Many of the transforms described in this text are achieved by comparing the signal of interest with some sort of probing function. This comparison takes the form of a correlation (produced by multipli-cation) that is averaged (or integrated) over the duration of the waveform, or some portion of the waveform:
X(m)=
∫
−∞∞ x(t) fm(t) dt (7)where x(t) is the waveform being analyzed, fm(t) is the probing function and m is some variable of the probing function, often specifying a particular member in a family of similar functions. For example, in the Fourier Transform fm(t) is a family of harmonically related sinusoids and m specifies the frequency of an
individual sinusoid in that family (e.g., sin(mft)). A family of probing functions is also termed a basis. For discrete functions, a probing function consists of a sequence of values, or vector, and the integral becomes summation over a finite range:
X(m)=
∑
Nn=1
x(n)fm(n) (8)
where x(n) is the discrete waveform and fm(n) is a discrete version of the family of probing functions. This equation assumes the probe and waveform functions are the same length. Other possibilities are explored below.
When either x(t) or fm(t) are of infinite length, they must be truncated in some fashion to fit within the confines of limited memory storage. In addition, if the length of the probing function, fm(n), is shorter than the waveform, x(n), then x(n) must be shortened in some way. The length of either function can be shortened by simple truncation or by multiplying the function by yet another function that has zero value beyond the desired length. A function used to shorten another function is termed a window function, and its action is shown in Figure 2.4. Note that simple truncation can be viewed as multiplying the function by a rectangular window, a function whose value is one for the portion of the function that is retained, and zero elsewhere. The consequences of this artificial shortening will depend on the specific window function used. Conse-quences of data windowing are discussed in Chapter 3under the heading Win-dow Functions. If a winWin-dow function is used, Eq. (8) becomes:
X(m)=
∑
Nn=1
x(n) fm(n) W(n) (9)
where W(n) is the window function. In the Fourier Transform, the length of W(n) is usually set to be the same as the available length of the waveform, x(n), but in other applications it can be shorter than the waveform. If W(n) is a rectan-gular function, then W(n)=1 over the length of the summation (1 ≤ n ≤ N), and it is usually omitted from the equation. The rectangular window is implemented implicitly by the summation limits.
If the probing function is of finite length (in mathematical terms such a function is said to have finite support) and this length is shorter than the wave-form, then it might be appropriate to translate or slide it over the signal and perform the comparison (correlation, or multiplication) at various relative posi-tions between the waveform and probing function. In the example shown in Figure 2.5, a single probing function is shown (representing a single family member), and a single output function is produced. In general, the output would be a family of functions, or a two-variable function, where one variable corre-sponds to the relative position between the two functions and the other to the
FIGURE2.4 A waveform (upper plot) is multiplied by a window function (middle plot) to create a truncated version (lower plot) of the original waveform. The win-dow function is shown in the middle plot. This particular winwin-dow function is called the Kaiser Window, one of many popular window functions.
specific family member. This sliding comparison is similar to convolution de-scribed in the next section, and is given in discrete form by the equation:
X(m,k)=
∑
Nn=1
x(n) fm(n− k) (10)
where the variable k indicates the relative position between the two functions and m is the family member as in the above equations. This approach will be used in the filters described inChapter 4and in the Continuous Wavelet Trans-form described in Chapter 7. A variation of this approach can be used for long—or even infinite—probing functions, provided the probing function itself is shortened by windowing to a length that is less than the waveform. Then the shortened probing function can be translated across the waveform in the same manner as a probing function that is naturally short. The equation for this condi-tion becomes:
FIGURE 2.5 The probing function slides over the waveform of interest (upper panel) and at each position generates the summed, or averaged, product of the two functions (lower panel), as in Eq. (10). In this example, the probing function is one member of the “Mexican Hat” family (seeChapter 7)and the waveform is a sinusoid that increases its frequency linearly over time (known as a chirp.) The summed product (lower panel), also known as the scalar product, shows the rela-tive correlation between the waveform and the probing function as it slides across the waveform. Note that this relative correlation varies sinusoidally as the phase between the two functions varies, but reaches a maximum around 2.5 sec, the time when the waveform is most like the probing function.
X(m,k)=
∑
Nn=1
x(n) [W(n− k) fm(n)] (11)
where fm(n) is a longer function that is shortened by the sliding window function, (W(n − k), and the variables m and k have the same meaning as in Eq. (10).
This is the approach taken in the Short-Term Fourier Transform described in Chapter 6.
All of the discrete equations above, Eqs. (7) to (11), have one thing in common: they all feature the multiplication of two (or sometimes three) func-tions and the summation of the product over some finite interval. Returning to the vector conceptualization for data sequences mentioned above (see Figure 2.3),this multiplication and summation is the same as scalar product of the two vectors.*
The scalar product is defined as:
Scalar product of a & b≡ 〈a,b〉 =冋aaa⯗12n册冋bbb⯗2n1册
= a1b1+ a2b2+ . . . + anbn (12) Note that the scalar product results in a single number (i.e., a scalar), not a vector. The scalar product can also be defined in terms of the magnitude of the two vectors and the angle between them:
Scalar product of a and b≡ 〈a,b〉 = *a* *b* cos θ (13) whereθ is the angle between the two vectors. If the two vectors are perpendicu-lar to one another, i.e., they are orthogonal, thenθ = 90°, and their salar product will be zero. Eq. (13) demonstrates that the scalar product between waveform and probe function is mathematically the same as a projection of the waveform vector onto the probing function vector (after normalizing by probe vector length). When the probing function consists of a family of functions, then the scalar product operations in Eqs. (7)–(11) can be thought of as projecting the waveform vector onto vectors representing the various family members. In this vector-based conceptualization, the probing function family, or basis, can be thought of as the axes of a coordinate system. This is the motivation behind the development of probing functions that have family members that are orthogonal,
*The scalar product is also termed the inner product, the standard inner product, or the dot product.
or orthonormal:† the scalar product computations (or projections) can be done on each axes (i.e., on each family member) independently of the others.