3.2 USEFUL SIGNAL [OPERATIONS](#page-9-0)
← Back to LINEAR SYSTEMS AND SIGNALS Overview
3.2 USEFUL SIGNAL OPERATIONS
Signal operations for shifting, and scaling, as discussed for continuous-time signals also apply, with some modifications, to discrete-time signals.
SHIFTING
Consider a signal x[n] (Fig. 3.4a) and the same signal delayed (right-shifted) by 5 units (Fig. 3.4b), which we shall denote by xs[n]. † Using the argument employed for a similar operation in continuous-time signals (Sec. 1.2), we obtain
Therefore, to shift a sequence by M units (M integer), we replace n with n − M. Thus x[n − M] represents x[n] shifted by M units. If M is positive, the shift is to the right (delay). If M is negative, the shift is to the left (advance). Accordingly, x[n − 5] is x[n] delayed (right-shifted) by 5 units, and x[n+5] is x[n] advanced (left-shifted) by 5 units.
† The terms “delay” and “advance” are meaningful only when the independent variable is time. For other independent variables, such as frequency or distance, it is more appropriate to refer to the “right shift” and “left shift” of a sequence.
Figure 3.4 Shifting and time reversal of a signal.
DR ILL 3.2 Left-Shift Operation
Show that x[n] in Fig. 3.4a left-shifted by 3 units can be expressed as 0.729(0.9)n for 0 ≤ n ≤ 7, and zero otherwise. Sketch the shifted signal.
DR ILL 3.3 Right-Shift Operation
Show that x[−k − n] can be obtained from x[n] by first right-shifting x[n] by k units and then time-reversing this shifted signal.
TIME REVERSAL
To time-reverse x[n] in Fig. 3.4a, we rotate x[n] about the vertical axis to obtain the time-reversed signal xr[n] shown in Fig. 3.4c. Using the argument employed for a similar operation in continuous-time signals (Sec. 1.2), we obtain
Therefore, to time-reverse a signal, we replace n with −n so that x[−n] is the time-reversed x[n]. For example, if x[n] = (0.9)n for 3 ≤ n ≤ 10, then xr[n] = (0.9)−n for 3 ≤ −n ≤ 10; that is, −3 ≥ n ≥ −10, as shown in Fig. 3.4c.
The origin n = 0 is the anchor point, which remains unchanged under time-reversal operation because at n = 0, x[n] = x[−n] = x[0]. Note that while the reversal of x[n] about the vertical axis is x[−n], the reversal of x[n] about the horizontal axis is −x[n].
EXAMPLE 3.2 Time Reversal and Shifting
In the convolution operation, discussed later, we need to find the function x[k −n] from x[n].
This can be done in two steps: (i) time-reverse the signal x[n] to obtain x[−n]; (ii) now, right-shift x[−n] by k. Recall that right-shifting is accomplished by replacing n with n − k. Hence, right-shifting x[−n] by k units is x[−(n − k)] = x[k − n]. Figure 3.4d shows x[5 − n], obtained this way. We first time-reverse x[n] to obtain x[−n] in Fig. 3.4c. Next, we shift x[−n] by k = 5 to obtain x[k −n] = x[5−n], as shown in Fig. 3.4d.
In this particular example, the order of the two operations employed is interchangeable. We can first left-shift x[k] to obtain x[n + 5]. Next, we time-reverse x[n + 5] to obtain x[−n + 5] = x[5 − n]. The reader is encouraged to verify that this procedure yields the same result, as in Fig. 3.4d.
DR ILL 3.4 Time Reversal
Sketch the signal x[n] = e−0.5*n* for −3 ≤ n ≤ 2, and zero otherwise. Sketch the corresponding time-reversed signal and show that it can be expressed as xr[n] = e0.5*n* for −2 ≤ n ≤ 3.
SAMPLING RATE ALTERATION: DOWNSAMPLING, UPSAMPLING, AND INTERPOLATION
Alteration of the sampling rate is somewhat similar to time-scaling in continuous-time signals. Consider a signal x[n] compressed by factor M. Compressing a signal x[n] by factor M yields xd[n] given by
Because of the restriction that discrete-time signals are defined only for integer values of the argument, we must restrict M to integer values. The values of x[Mn] at n = 0, 1, 2, 3,… are x[0], x[M], x[2M], x[3M], … . This means x[Mn] selects every Mth sample of x[n] and deletes all the samples in between. It reduces the number of samples by factor M. If x[n] is obtained by sampling a continuous-time signal, this operation implies reducing the sampling rate by factor M. For this reason, this operation is commonly called downsampling. Figure 3.5a shows a signal x[n] and Fig. 3.5b shows the signal x[2n], which is obtained by deleting odd-numbered samples of x[n]. †
In the continuous-time case, time compression merely speeds up the signal without loss of any data. In contrast, downsampling x[n] generally causes loss of data. Under certain conditions—for example, if x[n] is the result of oversampling some continuous-time signal—then xd[n] may still retain the complete information about x[n].
An interpolated signal is generated in two steps; first, we expand x[n] by an integer factor L to obtain the expanded signal xe[n], as
To understand this expression, consider a simple case of expanding x[n] by a factor 2 (L = 2). When n is odd, n/2 is noninteger, and xe[n] = 0. That is, xe[1] = xe[3] = xe[5],… are all zero, as depicted in Fig. 3.5c. Moreover, n/2 is integer for even n, and the values of xe[n] = x[n/2] for n = 0, 2, 4, 6,…, are x[0], x[1], x[2], x[3], … , as shown in Fig. 3.5c. In general, for n = 0, 1, 2,…, xe[n] is given by the sequence
Thus, the sampling rate of xe[n] is L times that of x[n]. Hence, this operation is commonly called upsampling. The upsampled signal xe[n] contains all the data of x[n], although in an expanded form.
In the expanded signal in Fig. 3.5c, the missing (zero-valued) odd-numbered samples can be reconstructed from the non-zero-valued samples by using some suitable interpolation formula. Figure 3.5d shows such an interpolated signal xi[n], where the missing samples are constructed by using an interpolating filter. The optimum interpolating filter is usually an ideal lowpass
† Odd-numbered samples of x[n] can be retained (and even-numbered samples deleted) by using the transformation xd[n] = x[2n+1].
Figure 3.5 Compression (downsampling) and expansion (upsampling, interpolation) of a signal.
filter, which is realizable only approximately. In practice, we may use an interpolation that is nonoptimum but realizable. The process of filtering to interpolate the zero-valued samples is called interpolation. Since the interpolated data are computed from the existing data, interpolation does not result in gain of information. While further discussion of interpolation is beyond our scope, Drill 3.5 and Prob. 3.11-10 introduce the idea of linear interpolation.
DR ILL 3.5 Expansion and Interpolation
A signal x[n] is expanded by factor 2 to obtain signal x[n/2]. The odd-numbered samples (n odd) in this signal have zero value. Show that the linearly interpolated odd-numbered samples are given by xi[n] = (1/2){x[n−1] +x[n+1]}.