Let us consider the filtering of a finite length sequence x(n), 0 ≤ n ≤ N − 1 of length N . Given a finite length impulse response h(n), we investigate the relationship between the output and input of an LSI system. As the finite length sequence is defined only for the interval between 0 and N − 1, let us consider how to exploit this fact by defining functional values at other undefined sample points for modeling certain real-world input conditions or for satisfying certain constraints in computation. The observation window (the interval for the output response) is also the other flexibility in designing this computational model. In the following subsections we discuss the different types of extended definition of the finite length sequence and the corresponding computation for obtaining the output response from the system.
3.3.1 Extension by Zero Padding
This is the usual notion of a finite length sequence by considering x(n) = 0 for n ≥ N and n < 0. In this case, given an impulse response h(n), the linear convolution as given in Eq. (3.4) is applicable. The corresponding CMP holds in the z-transform [100] domain in this case, which is stated in the following theorem.
Theorem 3.2 Let the z-transform of x(n) and h(n) be X(Z) and H(Z), re-spectively. In that case, the z-transform of y(n) = x⋆h(n) is obtained as
Y (Z) = H(Z)X(Z), (3.6)
where Y (Z) is the z-transform of y(n).
3.3.1.1 Linear Convolution Matrix
Let us consider a type of FIR filter with an impulse response h(n), 0 ≤ n ≤ L − 1 of length L. It is observed that the output response of this filter has a length of N +L−1 given the input of length N. Accordingly, by considering the observation window between 0 and N + L − 1, the input–output relationship is expressed by the following matrix representation. In this case, as before, a finite length sequence is represented by a column vector.
In the above example, we have considered L to be less than N . Given a finite length filter response h(n), we obtain the linear convolution matrix (denoted as Hl(N +L−1)×N) in Eq. (3.7). The dimension of this matrix is (N +L−1)×N.
Due to the linear and distributive property of DCTs, we express Eq. (3.7) in the transform domain as follows:
DCT (y) = DCT (Hl(N +L−1)×N)DCT (x), (3.9) where DCT (.) denotes the appropriate DCT (in 1-D or 2-D with proper di-mensionality of a vector or matrix), and y and x denote the output and input column vectors, respectively.
3.3.2 Periodic Extension
The periodic extension of x(n) with a period N implies that x(N + n) = x(n). In this case, a filter with impulse response with the same periodicity N generates an output with the periodicity N . With this property, we also consider the periodic extension of an FIR filter with a response h(n), 0 ≤ n ≤ N − 1 of length N. By keeping the observation window between 0 and N − 1, the output of this system is obtained by the circular convolution as discussed in the previous chapter. The operator for this operation is denoted in this text as ⊛, and the operation is shown below.
y(n) = x(n) ⊛ h(n) = It has been discussed in the previous chapter that the convolution–
multiplication property for the circular convolution holds in the discrete Fourier transform space. This is restated here in the following theorem.
Theorem 3.3 Let DFT of x(n) and h(n) be bx(k) and bh(k), respectively. In that case, the DFT of y(n) = x(n) ⊛ h(n) is obtained as
b
y(k) = bh(k)bx(k), (3.11)
where by(k) is the DFT of y(n).
3.3.2.1 Circular Convolution Matrix
As in the case of linear convolution we express the computation of circular convolution with a convolution matrix (say, HcN ×N) in the following form.
From Eq. ( 3.3) we find that the N -point DFT matrix diagonalizes the circular convolution matrix. Hence, the basis vectors of the corresponding DFT become the eigenvectors [55], and the DFT coefficients of h(n) are the eigen-values [55] of this convolution matrix. Due to the linear and distributive property of DCTs, a relationship similar to Eq. (3.9) also holds here. But it is less efficient to compute with DCT coefficients in this form than that with DFT coefficients.
3.3.2.2 Linear Convolution Performed through Circular Convolu-tion
As linear convolution is the requirement for processing an input sequence with an FIR filter, it is of interest to adapt the circular convolution operation to perform similar task. In this case, given an impulse response h(n) of length L and an input sequence x(n) of length N , the sequence is padded with adequate number of trailing zeroes to both these sequences so that their length becomes equal. The circular convolution of these zero-padded sequences provides a result similar to that is obtained by the linear convolution of x(n) and h(n).
In the previous subsection we have observed that the length of the output for linear convolution under this circumstance becomes N + L − 1. Hence, in this case, the number of trailing zeroes to be added for h(n) and x(n) should be at least N − 1 and L − 1, respectively. With this extension, the circular convolution between them (both of length N +L−1) produces the same output sequence. Hence, we require N + L − 1-point DFT to perform the equivalent operation in the frequency domain.
3.3.3 Antiperiodic Extension
In an antiperiodic extension, x(n) is defined outside the interval between 0 and N − 1 as x(N + n) = −x(n), where N is the period of antiperiodicity. The extended signal has the strict periodicity of 2N . In this case, if a finite impulse response h(n), 0 ≤ n ≤ N − 1 is extended antiperiodically in the same way, its convolution with the extended x(n) produces an output with the same (N ) antiperiodicity. By keeping the observation window restricted between 0 and N − 1, the convolution expression is expressed in the following form.
y(n) = x(n) s h(n) = Xn m=0
x(m)h(n−m)−
N −1X
m=n+1
x(m)h(n−m+N). (3.14)
This type of convolution is called skew circular convolution and is denoted by the operator s. In this case, the CMP is true for odd frequency discrete Fourier transform (OFDFT) (see Section 2.2.2 of Chapter 2), which is restated in the following form.
Theorem 3.4 Let bx1
2,0(k) and bh1
2,0(k) be the OFDFTs of x(n) and h(n), respectively. The OFDFT of their skew circular convolved output y(n) = x(n)sh(n) is obtained by the following expression.
b y1
2,0(k) = bh1
2,0(k)bx1
2,0(k), (3.15)
where by1
2,0(k) is the OFDFT of y(n).
3.3.3.1 Skew Circular Convolution Matrix
As before, we also express the convolution operation with the help of matrix operations and denote the corresponding convolution matrix as HsN ×N. The convolution matrix takes the following form:
HsN ×N =
The skew circular convolution matrix is obtained from the circular convolution matrix by negating its elements above the main diagonal.
3.3.3.2 Circular Convolution as a Series of Skew Circular Convo-lution
In [110] it is shown that circular convolution is performed by a series of skew circular convolution by partitioning the sequence at each stage and, sub-sequently, the output is obtained as a concatenation of results from individual partitions. Let us consider the partitioning of the input sequence x(n) of length N into two N2 halves x1(n), 0 ≤ n ≤ N2 − 1, and x2(n),N2 ≤ n ≤ N − 1. Now, Eq. (3.12) is rewritten in the following form.
y1 and y1 and y2 are subcolumn vectors corresponding to two halves of the output response. Eq. (3.17) is also written in the following form:
y1 = 12(A + B)(x1+ x2) +12(A − B)(x1− x2),
y2 = 12(A + B)(x1+ x2) −12(A − B)(x1− x2). (3.18) It can be shown that 12(A + B) and 12(A − B) are circular convolution and skew-circular convolution matrices, respectively. This process is iterated by partitioning y1 in the same way till we get a trivial circular convolution ma-trix (of dimension 2 × 2). In [110], an efficient computation of skew circular convolution of a real sequence is described by using the generalized DFT.
3.3.4 Symmetric Extension
In Section 2.2.3.1 of chapter 2, we have discussed the different types of sym-metric extension of a finite sequence and their implications in definitions of various discrete trigonometric transforms such as type-I to type-IV even and odd DCT s as well as DSTs. We have also listed several CMPs as applicable
Table 3.1: Convolution–multiplication properties for symmetrically extended sequences involving type-II even DCT and type-II even DST
Symmetric extensions Ranges of Convolution–multiplication
h(n) x(n) h(n) x(n) y(n) = property
e x(n) ⊛ eh(n)
WSWS HSHS 0 → N 0 → N − 1 0 → N − 1 C2e(y(n)) =√
2N C1e(h(n))C2e (x(n)) WSWS HAHA 0 → N 0 → N − 1 0 → N − 1 S2e(y(n)) =√
2N C1e(h(n))S2e(x(n)) WAWA HSHS 1 → N 0 → N − 1 0 → N − 1 S2e(y(n)) =√
2N S1e(h(n))C2e (x(n)) WAWA HAHA 1 → N 0 → N − 1 0 → N − 1 −C2e(y(n)) =√
2N S1e(h(n))S2e (x(n))
to different pairs of symmetrically extended sequences. In this chapter we ob-serve the structure and properties of convolution matrices for various pairs of symmetrically extended sequences. Later on we explore their applicability in designing algorithms for filtering in the block DCT domain. In our discussion we restrict our attention to those convolution–multiplication properties that involve either a type-II even DCT or a type-II even DST. The corresponding types of extensions and their CMPs are shown in Table 3.1. In the table, the output sequence y(n) is computed as the circular convolution of the extended sequences obtained from x(n) (denoted by ex(n)) and h(n) (denoted by eh(n)), respectively. The type of corresponding extensions are also shown in respec-tive entries of the table. We use here same notations for representing different types of even DCTs and DSTs as used in the previous chapter (Section 2.2.3.3 of Chapter 2).
3.3.4.1 Symmetric Convolution Matrices
Let us study the structure of the convolution matrices for the cases mentioned in Table 3.1. Let us represent the corresponding convolution matrix with the notation Ha,b such that a ∈ {W A, W S} and b ∈ {HA, HS} for perform-ing convolution between h(n) and x(n) by extendperform-ing them accordperform-ing to the symmetry (or antisymmetry) a and b at their both ends, respectively. The dimension of Ha,b is N × N, such that
y = Ha,bx, (3.19)
where y and x are column vectors of length N for the output and input, respectively.
In [79] it has been shown that Ha,bs can be expressed as linear combination of the following matrices. Let us denote these matrices as H1, H2, H3, and
H4. They are given below.
Finally, Ha,bs are expressed by foregoing matrices as follows:
HW S,HS = (H1+ H3) + (H2+ H4), However, the former is a symmetric matrix and the latter is an antisymmetric one. Similarly, H2+ H4and H2− H4are symmetric and antisymmetric Han-kel matrices,2 respectively. From the convolution–multiplication properties,
1Elements along diagonals of a Toeplitz matrix are of the same values.
2Elements along off-diagonals of a Hankel matrix are of the same values.
diagonalizations of these matrices are expressed by the following equation.
HW S,HS = CTD(√
2N {C1eh}N −10 )C, HW A,HS = STD1(√
2N {S1eh}N −11 )C, HW S,HA = STD(√
2N {C1eh}N1)S, HW A,HA = −CTD−1(√
2N {S1eh}N −11 )S.
(3.25)
where C and S are the type-II even DCT and DST matrices, respectively.
Similarly, C1eand S1eare the respective type-I even DCT and DST matrices.
D(x) denotes the diagonalization of a column vector x of length N into a diagonal matrix of N ×N whose diagonal element at ith row is x(i). Similarly, Dm(.) denotes a square matrix generated from its input column vector such that its mth off-diagonal elements3are formed from it. Finally, {x}qp denotes the column vector formed from x from its pth element to the qth one.
3.3.4.2 Linear Convolution through Symmetric Convolution Symmetric convolution can also be used to perform the linear convolution of a sequence x(n) of length N with an impulse response h(n) of length L. However, h(n) should have points of symmetry or antisymmetry so that one half of it (or part of it) generates the complete sequence through symmetric extensions.
Types of symmetric extensions at its two ends (of the selected part) as well as the chosen symmetric extensions of the input signal determine the type of convolution to be performed eventually. Under the context of CMPs involving only type-II even DCT and DST (see Table 3.1), impulse responses should have a form such that symmetric extension of type Whole-sample Symmetric, and Whole-sample Symmetric (WSWS), or Whole-sample Antisymmetric, and Whole-sample Antisymmetric (WAWA) generates it fully. Such an example is shown inFigure 3.1(a) and (b). In this case, the WSWS extension applied to the right half of Figure 3.1(a) (i.e., Figure 3.1(b) itself) generates itself.
Hence, for performing equivalent linear convolution, we need to pad zeroes to the input sequence (say, as shown in Figure 3.1(c)) not only to its end but also to its beginning. Given the length of the impulse response as L, we require L+12 number of zeroes to be added at both its ends. Similarly, for the WAWA type of extension to the right half of an impulse response (and thus generating the full response through this extension), it requires L−12 number of zeroes to be added at both ends of the input data for obtaining the same result of a linear convolution. We present here inTable 3.2from [95] the full list of number of zeroes required to be added at both ends for every type of symmetric extension. Depending on the type of convolution, which is again determined by the types of symmetric extensions to the filter response as well as to the input sequence, we should apply the appropriate convolution–
3The mth off-diagonal is formed by the (i, j)th elements of the matrix such that j−i = m.
An element x(k) of the vector x is inserted into the kth appearance of a matrix-location satisfying the above property while scanning its rows and columns from left to right and top to bottom.
(a) (b)
(c) (d)
Figure 3.1: (a) Impulse response, (b) right-half response, (c) input sequence, and (d) zero-padded input sequence.
multiplication property (seeTable 3.1). In this computation, we have to take care of the boundary conditions of the input data and adapt it accordingly before applying the transformations. The preceding and trailing zeroes of input data provide the equivalent condition of a finite length sequence for a linear convolution. However, this may not be ideal for a block-based computation.
We elaborate on this in the next section.
Table 3.2: Number of zeroes required to be added at both ends for every type of symmetric extensions
Left end Right end symmetry
symmetry WS WA HS HA
WS L+1
2 L−1
2 L−1
2 L−1
2
WA L+1
2 L−1
2 L−1
2 L−1
2
HS L
2 L
2 −1 L
2 L
2
HA L
2 L
2 −1 L
2 L
2