Discrete Convolution and the Discrete Fourier Transform Discrete Convolution First of all we need to introduce what we might call the wraparound convention Because the complex numbers w j e i πj N have the property w j±n w j, which readily extends to w j+mn w j for any integer m, and since in the discrete Fourier context we represent all N-dimensional vectors as linear combinations of the Fourier vectors W k whose components are w kj, we make the convention that for any vector Z E N with components z k, k,,,n, if we write z k with k lying outside the range through N whatismeantisz k+mn where m is the unique integer such that k + mn does lie in this range Thus, for example, if N 8 and we write z,whatwemeanisz + 8 z This convention may initially seem rather strange and arbitrary but, in fact, it is quite essential for effective use of and computation with the discrete Fourier transform Now suppose we have two real or complex vectors in E N : Z (z z z N ) t, Y (y y y N ) t The discrete convolution of these two vectors is another vector, which we denote by Z Y, defined componentwise by (Z Y ) k N j z k j y j, k,,, In making this definition we have to take into account the fact that if j > k the index k j will be negative According to the convention just introduced, what is meant instead of z k j is z k j+n Setting l k j we can see that (Z Y ) k N j z k j y j k N+ lk z l y k l N l y k l z l (Y Z) k,
the second inequality again following from the wraparound convention As a consequence we conclude that discrete convolution is commutative: Z Y Y Z Now we compute some discrete convolutions Example If Z ( ) t, then for any Y we have (Z Y ) k N j z k j y j y k because z k j when k j and equals when k j Thus the vector Z as shown here plays the role of the convolution identity Example If Z ( ) t, then for any Y we have (Z Y ) k N and thus with Z as shown j z k j y j N j y j s Y Z Y (s Y s Y s Y ) t (s Y )Z In particular, Z Z NZ in this case Example Let for N 5andlet Z ( ) t Y ( ) t for the same value of N; let us suppose the two s are in positions k and k + In this case we can verify that Z Y has the form Z Y ( 4 4 4 ) t ; the effect of the convolution is to blur the two distinct s into the extended pattern shown
Just as the importance of the Laplace transform derives in large part from its behavior with respect to convolution of functions on [, ), the significance of the discrete Fourier transform also largely derives from its relationship to discrete convolution Theorem For any two N-dimensional complex vectors Z and Y we have F(Z Y )N F(Z) F(Y ) where the product F(Z) F(Y ) indicates the vector obtained with component by component multiplication; ie, (F(Z) F(Y )) k (F(Z)) k (F(Y )) k, the right hand side being the ordinary numerical product of complex numbers Proof We compute F(Z Y ) k N N j w kj (Z Y ) j N N j w kj ( N l z j l y l ) N N (setting m j l) N N l N j N l N l w kl y l ( N w k(j l) z j l w kl y l j w kl y l ( N l m l w k(j l) z j l ) (taking the wrap-around effect into account) N ( N N l w kl y l )( N w km z m ) N m w km z m ) N (F(Y )) k (F(Z)) k (F(Y ) F(Z)) k,
which completes the proof Convolution Equations A (discrete) convolution equation is an equation of the form A Y B, wherea and B are known vectors in E N and Y is the vector in E N to be determined Such an equation is simply a linear algebraic equation of a special type If we define the N N matrix A a a N a N a a a a N a a a a a a N a N a N a whose first column is A and whose subsequent columns are rotations of A, one can easily see that the convolution product A Y is the same as the matrix-vector product A Y and the convolution equation takes the form A Y B Then we have the following Proposition The convolution equation A Y B is solvable for arbitrary B E N (equivalently, the matrix A is nonsingular, so that A exists) if and only if the discrete Fourier transform of A has no zero components; ie, (F(A)) k, k,,,, N, From A Y B we obtain, taking the discrete Fourier trans- Proof form, F(A Y )F(B) Using the result from Section on the discrete Fourier transform of a convolution product, this becomes N F(A) F(Y )F(B) Looking at the k-th component on each side we have N (F(A)) k (F(Y )) k (F(B)) k, k,,,, N 4
If (F(A)) k foranyk then it is clear that the corresponding component, (F(B)) k,off(b) must also be zero and the convolution equation cannot be solved for arbitrary vectors B On the other hand, if all of the components of F(A) are different from zero, we simply divide to obtain (F(Y )) k (F(B)) k N (F(A)) k We will write this vectorially as F(Y ) F(B) F(A), N where the symbol will be used to indicate component by component division of the first vector by the second Then, applying the inverse transform, we have Y F ( F(B) F(A)) N This completes the proof of the proposition Solving Discrete Convolution Equations Example We consider the convolution equation in R 4 : Y The discrete Fourier transform solution method involves application of the discrete Fourier transform to both sides of this equation and use of the property F(A Y )N F(A) F(Y ) First of all, we have F(A) 4 i i i i 4 5 5
In this case none of the components of F(A) are zero so the solution process is a straightforward one Computing F(B) 4 i i i i + i i, and letting Z F(Y ), we have the equation F(A Y )4F(A) Z 5 z z z z + i i This is solved readily to give Z + i i Then, applying the inverse transform, we have Y F (Z) i i i i + i i The fact that the solution Y turns out to be the same as the original right hand side B is a coincidence particular to this example Example In this example the solution process is complicated by the fact that one of the components of F(A) turns out to be zero The convolution equation in question is 6 Y d 4 d 4 + d B + db, 6
where d is a parameter, initially undetermined Here we have F(A) 4 i i i i 6 i +i ; FB 4 i i i i 4 ; FB 4 i i i i 4 i 4 4 i 4 Since the transform is linear, letting Z F(Y ), we have 4 i +i z z z z + d 4 i 4 4 i 4 From examination of the component on both sides it is clear that we have to take d for consistency Then z is arbitrary and we have ( 8i) z i z 5 i 68 ; 8 z + z 8 ; ( +8i) z + i z 5+i 68 Then Y i i i i z 5 i 68 8 5+i 68 z + 7 6 9 6 6 6 6 7
Our next example shows that the discrete Fourier transform can be applied to solve, at least approximately, certain problems of classical mechanics The example also shows that zero components of F(A) are not just an inconvenience but may correspond to degrees of freedom in the solution of the convolution equation A Y B which we would quite naturally expect to find Example 4 A cable is strung between two vertical supporting structures of equal height and is displaced from the horizontal due to the effect of gravity acting on the cable Letting < x< be the parametrization in the horizontal direction and letting y(x) denote the vertical displacement of the cable, we have τ d y dx gρ(x), < x<, where τ is the tension in the cable, g is the gravitational constant and ρ(x) is the cable mass per unit length It is not difficult to solve this problem analytically but we will carry out an approximate solution as an example of application of Fourier solution of discrete convolution equations We discretize the problem by dividing the interval [, ) into N subintervals [x k,x k ),k,,, N, ofequallengthh and we replace N the unknown displacement function y(x) byann-dimensional vector Y [y,y,, y N ] T representing approximate displacements at the points x k Since the supports at the endpoints are of equal height we can identify y with y N as we need to do in discrete Fourier analysis (In effect, we are assuming a periodic structure consisting of supports of equal height placed one unit apart with identical cables suspended between each adjacent pair of them) We replace the second derivative operator by the standard second order divided difference approximation d y dx (x k) y k+ y k + y k h and we discretize the gravitational force to g k gρ(x k )atthepoints x k,k,,,, N Then we let B be the vector whose components 8
are { g b k s gρ() s, k, g k gρ(x k ), k,,, N, where s is the force exerted by the supporting structure Then we have τn A Y B A Y τn B, where A ( ) T, the omitted terms all being zero Taking the discrete Fourier transform and using the convolution property of the transform we have NF(A) F(Y ) τn F(B) F(Y ) k F(B) k, F(A) τn k F(A) k In this case, because + ( ) +, the component F(A) For consistency, then, we also must have F(B) But this last component is just g s + N k g k, so we conclude that we must have s N k which is just the statement that the magnitude of the supporting force s should be the sum of the magnitudes of he gravitational forces - very much to be expected from the principles of statics Having made this choice, the component F(Y ) N the average value of the vertical displacements, is arbitrary But this is to be expected because we have not specified the height of the supporting structures g k, N For our computational treatment of this problem we will take τ, g, N 6 and we will suppose that ρ(x) {, < x< 5 4, 5 6 9 k 6, w k, < x< 6 6 < x<,
This gives B ( s 4 4 4 4 4 4 ) The supporting force s is selected so the sum of the components of B is zero, ie, s 4 We used MATLAB R to compute C F ( 56 B) ; because of the choice of s the first component of this discrete Fourier transform is zero There is little point in providing the whole list of the components of C here We also computed F(A); the first component is again zero and all other components are non-zero We thus let F(Y ), F(Y ) k F( 56 B) k 6 F(A) k, k,,, 5 At this point all components of F(Y ) have been determined except the first Thus we can write F(Y ) F(Y )+r ( ) t, where r is yet to be determined Then Y Y + r F (( ) t ) Y + r 6 ( )t It turns out in this example that Y ( 67 5 87 84 65 775 9 7 68 54 98 555 89 46 96 544 ) t We suppose the height of the supporting posts is Then we set r 6 67 78 to realize the value as the first component of Y To display the right hand supporting post we introduce a new component y 6 y and we plot the result in Figure
Figure 8 6 > y 4 4 6 8 > x Supported Cable as Constructed Using Discrete Fourier Transform