After completing this portion you should be able
After completing this portion, you should be able to manipulate the signal Using simple mathematical tools that make basic building blocks and should be able to explore their outputs
Tools: Building blocks: Multiply with a constant: Gain. Let the signal x[n] = [3. 2 41 36 -9. 5 0] The element shown by upward arrow in the string represent the signal at t = 0, The next element, delayed by Ts; thus occurs at t=Ts has an amplitude of 41, and the next delayed by 2 Ts has an amplitude 36 and so on. This input signal is passed through a constant multiplier; an amplifier; of gain A = 7/2, W 1 is the outcome when each element of the string x[n] is multiplied by A. W 1= Ax[n] = [ ].
Tools: shifting: can be implemented by a shift register. If the sampled signal x[n] = [ 3. 2 41 36 -9. 5 0] ; is delayed by Ts, the output is W 2= x[n-1] = [ ]. And if advanced, the output would be: W 3 = [ ]. Note that as the position of arrows shifts, Underlines shows zeros that are stuffed or padded.
Tools: addition If one signal is x[n] = [3. 2 41 36 -9. 5 0] ; and another is y[n] = [1. 7 – 0. 5 0 0. 8 1]. The addition is element wise W 4= x[n] + y[n]: W 4 = [ ]. Ex: [4 x[n] -10 y[n-1]] = [ ] Result: [ ]. Reds represent the position of elements at n= 0.
Tools: Multiplication If one signal is x[n] = [3. 2 41 36 -9. 5 0] ; and another is y[n] = [1. 7 – 0. 5 0 0. 8 1]. The element wise multiplication is W 4= x[n]. y[n]: W 5 = [ ]. It is dot-product / element to element multiplication.
Example_1: realization of h[n]= [1, 2, 3, 2] For input: x[n] = [3. 2 41 36 -9. 6 0] for n=0: 4; Calculate output y[n].
Method_1 to Solution of Example_1 [3. 2 41 36 -9. 6 0] x [1 2 3 2 ]. Y[n]= ________________ [ ]
Solution to example_1 soln: The solution lies in multiplying two polynomials: [a 0 x 0 + a 1 x 1 +……+an-1 xn-1 ]. [boxo + b 1 x 1 +……. . bm-1 xm-1]. The result is evaluated by tabular calculations of: [ao a 1 a 2 a 3] x [bo b 1 b 2 ] = a ob 2 a 1 b 2 a 2 b 2 a 3 b 2 a ob 1 a 1 b 1 a 2 b 1 a 3 b 1 x a ob o a 1 b o a 2 b o a 3 b o x x ______________________ coxo + c 1 x 1 + c 2 x 2 +c 3 x 3 + c 4 x 4 + c 5 x 5 has {m+n -1} terms and power {m+n-2}. This procedure of multiplication is termed as Linear Convolution or, Convolution.
Method_2 to Solution of Example_1 Alternative procedure is using the table 3. 2 41 36 -9. 6 0 1 3. 2 41 36 -9. 6 0 2 6. 4 82 72 -19. 2 0 3 9. 6 123 108 -28. 8 0 2 6. 4 82 0 72 -19. 2
Toeplitz Algorithm for linear convolution An algorithm to convert polynomials into a circulant matrix and multiply to yield linear convolution. The algorithm : • Since the terms after multiplication are: p = m+n-1, • therefore we need to convert any one of the polynomials into a (pxq) “circulant” matrix and • Another polynomial of length ‘q’ into a (q. X 1) matrix. • To begin, create a column vector of size p from the coefficients of any of the given polynomial and Pad zeros in the remaining cells. • Make second column of the circulant matrix by pasting the first column to right and shifting all the elements circularly one down.
Creating Toeplitz or Circulant matrix for linear convolution Continue the procedure till a (pxq) matrix is constituted. Likewise make another matrix M 2 = (q. X 1) from the coefficients of another polynomial. Multiply [M 1] and [M 2] to get [M ]; a (p x 1) matrix. The transpose of the result is the convolution. Alternatively we can use (pxp) (px 1) matrix also.
Method_3 for Example_1 • P= M+N-1 = 5 + 4 -1= 8. • One matrix is [8 x 4] another matrix is [4 x 1]
A general structure of a Digital filter y[n] + a 1 y[n-1] + a 2 y[n-2] = bo x[n] + b 1 x[n-1] + b 2 x[n-2]
Transfer function: z-transform y[n] + a 1 y[n-1] + a 2 y[n-2] = bo x[n] + b 1 x[n-1] + b 2 x[n-2] If all the components are linear and time invariant, the above equation can be rewritten as: The transfer function h[n] is given by: y[n] / x[n] = h[n] = In DSP Literature we use z-1 place of D,
Transfer function… x[n] h 1[n] h 2 [n] x[n] y[n] x[n] h 2 [n] * h 1[n] * h 2 [n] h 1[n] y[n] • In time domain, the resulting transfer function of cascaded block is the convolution of transfer functions of each block. h[n] = h 1[n] *h 2[n]. * is the sign of convolution. • In Z-domain; H[z] = H 1[z] H 2[z]…. y[n]
Transfer function… h 1[n] x[n] y[n] x[n] h 1[n] + h 2[n] The transfer function of blocks connected in parallel is given by their sum. h[n] = h 1[n] + h 2[n]+…. H[z] = H 1[z] + H 2[z] +… y[n]
Transfer function…. .
Inverse Transfer Function The transfer functions h 1[n] and h 2[n] or, H 1[z] and H 2[z] if observe the rule: h 1[n] * h 2[n] = [n], or, H 1[z] H 2[z] = 1 are inverse of each other.
Inverse convolution • Inverse transfer function are used when solution to two polynomials in the form y[n]/x[n] is to be obtained. • It is obtained by dividing polynomial y[n] by the polynomial x[n]. • This process is called inverse convolution.
Convolution with one input periodic § only one input x[n] is periodic; periodicity N = 3: § Let x[n] = [2, 1, 3, ……. . ] and h[n] = [2, 1, 1, 3, 1]. § Word length of h[n] = M = 5. § The above can be solved by basic convolution method. § Make an array of three or more x[n] in a sequence. § Use linear convolution procedure to calculate output.
Convolution contd. § The first and last (M-1) terms are transients. § Remaining in between terms have periodicity of N. § Number of repeated terms are “one less over the repeated terms” of x[n] used in the array. § For x[n] repeated thrice, the output is:
The system can also be periodic x[n] + Z-1 ao Z-1 a 2 a 1 + Feedback makes it periodic y[n] a 3
The number of delays are three • • Therefore the system periodicity; N=3. Solve for h[n] = [ao a 1 a 2 a 3] =[1 2 3 4] Inputs: a. x 1[n] = [ 1 2 3 ] b. x 2[n] = [1 2 3 4 ] c. x 3[n] = [1 2 3 4 5]
We illustrate the case with x 3(t) Note: steady state output is [34, 44, 52] and circulates in the length of 3. It is due to three delay elements. The linear convolved output is [1, 4, 10, 20, 34, 31, 20] when foldback in the length of 3, we get: [01, 04, 10, 20, 34 31, 20 ]. Column wise summation gives: [52, 54, 44] which matches with the above.
Convolution with periodic input using wrap around method: The linear convolution of the given problem is: [ ]. The output will observe the periodicity of repeating function x[n] i. e. N=3. Therefore we wrap the convolved output in the word length of x[n] N = 3 and sum them column wise. The result is [ The output is in the sequence of ] In an steady-state sequence, first term is unimportant. Sequence should be maintained.
Example Workout the linear convolution of x[n] =[2 5 0 4 ] and h[n] =[4 1 3]. x[n] is periodic of periodicity N = 4. length of convolved string is 4+3 -1= 6. Linear convolution: Y[n] = [8 22 11 31 4 12] To find the periodic convolution wrap around the length N=length of x[n] = 4. It is [8 22 11 31 + 4 12 ] = [12 34 11 31]
Example Workout the linear convolution of x[n] =[ ] and h[n] =[ ]. h[n] is periodic of periodicity N = 3. length of convolved string is 4+3 -1= 6. Linear convolution: Y[n] = [ ] To find the periodic convolution wrap around the length N=length of x[n] = 3. It is
The circulant matrix in this case: Note the circulant matrix. It is a 3 x 4 matrix made from the values of x(n) =[4, 1, 3] with last column made out of circulation. Size of x(n) being smaller than h(n), zero padding is not needed.
Periodic Convolution: both the signals should be of same period. Let each signal be of word length N. § Find the linear convolution of one-period segment of each. The string length is 2 N-1. § Take elements equal to word length (N) in one row. § Remaining [N-1] elements are to be wrapped in second row. § Add elements column wise. The result will be one period of periodic convolution.
Solution_1 of periodic convolution Convention for circular convolution [1 0 1 1] [1 2 3 1] = [ ]. The length of the string is (2 N-1)= 7. The length of periodic signal is 4. ans.
Solution_2 for periodic convolution a matrix approach
Deconvolution • It is the process to evaluate x(t) for the given when y(t) and h(t). • The mathematical description for convolution is: i. e. y(n)=h(0)x(n)+x(1)x(n-1)+……. . +h(n)x(0) • The above can be rewritten for n 1 as:
Deconvolution: Hence
- Slides: 33