linear using circular conv (1)a

Upload: akshit-sharma

Post on 13-Apr-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/26/2019 Linear Using Circular Conv (1)A

    1/2

    AKSHIT SHARMA

    00910402813

    EXPERIMENT 9

    AIM : Write a MATLAB code to perform linear convolution usin circular convolution!

    APPARAT"# : MATLAB

    T$E%R& :Linear convolution is the basic operation to calculate the output for any linear time

    invariant system given its input and its impulse response.

    Circular convolution is the same thing but considering that the support of the signal is

    periodic (as in a circle).

    Most often it is considered because it is a mathematical consequence of the discrete ourier

    transform (or discrete ourier series to be precise)!

    "ne of the most efficient #ays to implement convolution is by doing multiplication in the

    frequency.

    $ampling in the frequency requires periodicity in the time domain.

    %o#ever& due to the mathematical properties of the T this results in circular

    convolution.

    'f the sequences are not padded #ith (a sufficient number of) eros you cannot retrieve the linear

    convolution. 'f the sequences are padded #ith eros the linear convolution is identical to (a part

    of) the circular convolution. This property is used to calculate the linear convolution more

    efficiently& by calculating he circular convolution& #hich in turn can be calculated very efficientlyin the frequency domain using the T algorithm.

    'nstead of padding #ith eros you may as #ell pad #ith something else& as long as you no# it

    (it*s deterministic). A common alternative #ould be the cyclic prefi+ (artificially periodify) used

    in ",M.

    MATLAB '%(E:

    -. clc

    /. close all

    0. clear all1. +-2input(*enetr the first sequence*)

    3. +/2input(*enetr the second sequence*)

    4. n2input(*enter the no of points of the dft*)

    5. subplot(0&-&-)

    6. stem(+-&*filled*)

    7. title(*plot of first sequence*)

    -8. subplot(0&-&/)

    --. stem(+/&*filled*)

    -/. title(*plot of second sequence*)

    -0. n-2length(+-)

    -1. n/2length(+/)-3. m2n-9n/:-

  • 7/26/2019 Linear Using Circular Conv (1)A

    2/2

    AKSHIT SHARMA

    00910402813

    -4. +2;+- eroes(-&n/:-)