Unit2 Rev 2

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 10

Example 1

• The impulse response of a system is {1, 0, –1}. Suppose the input data
is {1, 2, 3, 2, 1, 3, 2, 1}, With 4 as circular convolution length give the
blocks of input by overlap save and overlap add methods.
• M =3; N =5; as N = L + M – 1, L = 3; 3 samples from the long
sequence is taken at a time.
• Overlap save
• x1(n) = {0 0 1 2 3}; M – 1 = 2 zeros at start
• x2(n) = {2 3 2 1 3}; M – 1 = 2 ending samples from previous block
• x3(n) = {1 3 2 1 0}; same as above.
Example 1…
• Is there one more input block, input data is exhausted?
• Yes to cover 1 and appended 0
• x4(n) ={1 0 0 0 0}; no input samples add 0’s.
• Ls = 8, L =3, number of blocks = Ls/L = 2.66 = 3 not a whole number
means 0s are inserted. 0.66 means 2 samples 1 zero appended.
Samples taken from previous block > 1, hence 1 additional block is
required. Number of blocks = 3+1 = 4.
• h (n) = {1, 0, –1, 0, 0}; 2 zeros to make length = 5
Example 1…
• Overlap add
• x1(n) = {1 2 3 0 0}; M – 1 = 2 zeros at the end in every block
• x2(n) = {2 1 3 0 0};
• x3(n) = {2 1 0 0 0}; only 3 blocks !!. Actual remaining samples in the
block are 2 and 3 zeros. No extra block.
• Number of blocks = 3+1 = 4, from Ls/L = 2.66 = 3
• h (n) = {1, 0, –1, 0, 0}; 2 zeros to make length = 5
• Overlap add is computationally faster and easier as zeros are padded
to the end of block.
Example 2
• Compute response of example 1.
• Overlap save
• y1(n) = x1(n) ⑤ h (n) = { – 2 – 3 1 2 2}
• y2(n) = x2(n) ⑤ h (n) = { 1 0 0 – 2 1}
• y3(n) = x3(n) ⑤ h (n) = { 0 3 1 – 2 – 2}
• y4(n) = x4(n) ⑤ h (n) = { 1 0 – 1 0 0 } ; samples in red discarded
• y (n) = {y1 (n) y2(n) y3(n) y4(n)}
• = { 1 2 2 0 – 2 1 1 – 2 – 2 – 1 0 0}
Example 2…
• Overlap add
• y1(n) = x1(n) ⑤ h (n) = {1 2 2 – 2 – 3}
• y2(n) = x2(n) ⑤ h (n) = { 2 1 1 –1 –3}
• y3(n) = x3(n) ⑤ h (n) = {2 1 –2 –1 0
}
• y (n) = {y1 (n) y2(n) y3(n) }
• = { 1 2 2 0 – 2 1 1 – 2 – 2 – 1 0 0}
Example 3
• A long input data sequence of length 2000 is to be filtered using impulse
sequence of length 250. Suppose a 256 point DFT – IDFT is employed,
compute the number of DFT & IDFT necessary by overlap save and overlap add
methods. Indicate number of zeros in first and last blocks in both methods.
• Ls = 2000; M =250; N = 256;
• N = L +M – 1 or L = N – M + 1 = 7
• Number of blocks = Ls/L = 2000/7 = 285.7142, not an integer
• From fraction, 0.7142 *7 = 5 that is last block is short by 7 – 5 =2 samples.
• These 2 samples are extra zeros.
• Number of start or end zeros = M – 1 =249.
Example 3…
• Overlap save
• Number of DFTs = 287 + 1 = 288; extra for H (k)
• Number of IDFTs = 287; same as blocks.
• ZEROS: first block at start 249 zeros, next block 249 ending samples from
previous block and 7 new samples from x (n);last block 5 samples, 2 zeros
• Overlap add
• Number of DFTs = 286 + 1 = 287; extra for H (k)
• Number of IDFTs = 286; same as blocks.
• ZEROS: at the end of every block → 249 but last block contains 251.
Example 4
• Repeat example 3 if length of sequence is 1995.
• Ls = 1995; M =250; N = 256;
• N = L +M – 1 or L = N – M + 1 = 7
• Number of blocks = Ls/L = 1995/7 = 285, an integer. No extra zeros to long
data.
• Overlap save:
• Number of DFTs = 285 +1 + 1 = 287; extra for H (k)
• Number of IDFTs = 286; same as blocks.
• ZEROS: first block at start 249, next block 249 ending samples from previous
block and 7 new samples from x (n); last block all 7 samples
Example 4…
• Overlap add
• Number of DFTs = 285 + 1 = 286; extra for H (k)
• Number of IDFTs = 285; same as blocks.
• ZEROS: at the end of every block → 249.
DIT - FFT sketch and do computation

• 1
• 1
• 1 -j

You might also like