Working of Digital filters...

Discussion in 'Homework Help' started by RRITESH KAKKAR, Oct 21, 2011.

  1. RRITESH KAKKAR

    RRITESH KAKKAR Thread Starter Well-Known Member

    Joined:
    Jun 29, 2010
    Messages:
    1,379
    Location:
    India
    I was just thinking how Digital filters work in case of analog we just connected
    RC to the signal input to amplifiers, etc
    but in case of Digital filter....what happen??

    Thanks
  2. Papabravo

    Papabravo AAC Fanatic!

    Joined:
    Feb 24, 2006
    Messages:
    6,251
    Location:
    Michigan, USA (GMT-5)
    In an FIR (Finite Impulse Response) filter the present output is a function of the current and previous inputs. If the input goes away then the output goes away. That is the 'F' in FIR.

    In an IIR (Infinite Impulse Response) filter the present output is a function of the current and previous inputs AND the previous outputs. If the input goes away the out does not have to go away. That is the first 'I' in IIR.

    Finite and Infinite Impusle Response refers to the output over time, NOT the amplitude of the response.
    RRITESH KAKKAR likes this.
  3. crutschow

    crutschow AAC Fanatic!

    Joined:
    Mar 14, 2008
    Messages:
    7,139
    Location:
    L.A. USA
    For a digital filter you first convert the analog signal to digital format by sampling the signal at greater than the Nyquist sample-rate for the highest analog frequency using an A/D converter. A digital processor then takes these samples and performs a mathematical function of the values to generate the desired filter response for each sample. If desired the samples from the filter can be then converted back to analog with a D/A converter.
    RRITESH KAKKAR likes this.
  4. RRITESH KAKKAR

    RRITESH KAKKAR Thread Starter Well-Known Member

    Joined:
    Jun 29, 2010
    Messages:
    1,379
    Location:
    India
    In case of analog low pass filter with connect R and C by using cut of frq. F=1/(2*PI*R*C)....and analyzing by Bode plot.
    But this how really work in digital filters??
    The input isin form of 010101010 if i want low freq. output of digital signal then what to do??
  5. crutschow

    crutschow AAC Fanatic!

    Joined:
    Mar 14, 2008
    Messages:
    7,139
    Location:
    L.A. USA
    The digital filter algorithm is what determines the filter function. A simple low pass function can be performed by generating a running average of the digital values. Thus you would take the difference between the running average and the next sample and add a percentage of the difference to the running average. The cut-off frequency is determined by the digital sample rate and the percent value you add to the running average. It's not as simple a function as the analog circuit.

    For more info look at one of these Google references.
    RRITESH KAKKAR likes this.
  6. Papabravo

    Papabravo AAC Fanatic!

    Joined:
    Feb 24, 2006
    Messages:
    6,251
    Location:
    Michigan, USA (GMT-5)
    It works the same way except there is no R and no C. What you do have control of is the sample rate and the coefficients of the impulse response. If you know the coefficients of the impulse response you can compute the output via convolution.

    http://www.dspguide.com/

    I think Prof. Smith's book is still a free download by chapters in PDF format
    RRITESH KAKKAR likes this.
  7. RRITESH KAKKAR

    RRITESH KAKKAR Thread Starter Well-Known Member

    Joined:
    Jun 29, 2010
    Messages:
    1,379
    Location:
    India
    Guys can you just give an block example for better understanding of digital filters..??
  8. Papabravo

    Papabravo AAC Fanatic!

    Joined:
    Feb 24, 2006
    Messages:
    6,251
    Location:
    Michigan, USA (GMT-5)
    Your best bet is to go to the free resources like Steve Smith's DSP book.

    Here is another one

    http://en.wikipedia.org/wiki/Finite_impulse_response

    Boxcar filters have a low-pass characteristic similar to the multi-pole RC filter.

    When you do some reading it will lead to more specific questions.
    Last edited: Oct 22, 2011
    RRITESH KAKKAR likes this.
  9. RRITESH KAKKAR

    RRITESH KAKKAR Thread Starter Well-Known Member

    Joined:
    Jun 29, 2010
    Messages:
    1,379
    Location:
    India
    I think i am know getting how digital filters work as first we convert analog to Digital then uC/uP do calculation like FFT,etc then output is converted analog.......

    But if we talk about convolution theorem it say multiply in freq. domain, vice versa...but what the use and how does it happen in CPU itself??
  10. Papabravo

    Papabravo AAC Fanatic!

    Joined:
    Feb 24, 2006
    Messages:
    6,251
    Location:
    Michigan, USA (GMT-5)
    A digital filter is implemented in a CPU by a succession of multiply and accumulate (add) operations. In some processors there is even an instruction that does exactly that operation called "Multiply and Accumulate". A processor can also keep track of previous inputs and previous outputs which may also be used in the filter calculations. Was that what you were looking for?
    RRITESH KAKKAR likes this.
  11. RRITESH KAKKAR

    RRITESH KAKKAR Thread Starter Well-Known Member

    Joined:
    Jun 29, 2010
    Messages:
    1,379
    Location:
    India
    Yes if we talk about many convolution method what the use of them??
    what does this mean X(n)= 1 8 5 4 and H(n) impulse = 1 5 4 6
    what does this mean as we calculate y(n) in real ??
    pls explain me for understanding the basic of it
  12. Papabravo

    Papabravo AAC Fanatic!

    Joined:
    Feb 24, 2006
    Messages:
    6,251
    Location:
    Michigan, USA (GMT-5)
    I don't know precisely what you are asking but I'll try. X(n) and H(n) are discrete time functions. That means they have defined values only for values of n that belong to the set {0, 1, 2, 3}. So if I look at what you wrote it seems that
    Code:
    Impulse Response H(n) = 1 5 4 6
        implies H(0) = 1, H(1) = 5, H(2) = 4, and H(3) = 6
    Input X(n) = 1 8 5 4
        implies X(0) = 1, X(1) = 8, X(2) = 5, and X(3) = 6
    
    Now from Smiths' book you have all the information you need to compute the output Y(n). Piece of cake -- Right?
    RRITESH KAKKAR likes this.
  13. RRITESH KAKKAR

    RRITESH KAKKAR Thread Starter Well-Known Member

    Joined:
    Jun 29, 2010
    Messages:
    1,379
    Location:
    India
    Is input X(n) mean amplitude of signal at discrete level??
    and if we talk about impulse response H(n) at discrete level what this mean...these are my doubt...
  14. RRITESH KAKKAR

    RRITESH KAKKAR Thread Starter Well-Known Member

    Joined:
    Jun 29, 2010
    Messages:
    1,379
    Location:
    India
    help please..........
  15. Papabravo

    Papabravo AAC Fanatic!

    Joined:
    Feb 24, 2006
    Messages:
    6,251
    Location:
    Michigan, USA (GMT-5)
    A discrete time function has the the amplitudes at the defined times. The function is not defined anywhere else. You can think of X(n) and H(n) as a sequence of infinitesimally small pulses. That is how discrete time functions are defined. Sorry if you're uncomfortable with the concept.
    RRITESH KAKKAR likes this.
  16. RRITESH KAKKAR

    RRITESH KAKKAR Thread Starter Well-Known Member

    Joined:
    Jun 29, 2010
    Messages:
    1,379
    Location:
    India
    Yes i know about this...
    But it is over my head please tell use of this pulses??
  17. RRITESH KAKKAR

    RRITESH KAKKAR Thread Starter Well-Known Member

    Joined:
    Jun 29, 2010
    Messages:
    1,379
    Location:
    India
    Reply please.....
  18. Papabravo

    Papabravo AAC Fanatic!

    Joined:
    Feb 24, 2006
    Messages:
    6,251
    Location:
    Michigan, USA (GMT-5)
    You can think of the amplitudes of a sequence of pulses as the output of a sampling mechanism. You imagine and A/D converter. At regular intervals you sample the incoming analog signal. You have no information about what the signal does in between the samples. You only know the value of the function at the sampling instant.

    A famous theorem due to Shannon, unrigorously stated, says that if you sample a signal at twice the frequency of the highest frequency component you will not miss anything important.
    RRITESH KAKKAR likes this.
  19. RRITESH KAKKAR

    RRITESH KAKKAR Thread Starter Well-Known Member

    Joined:
    Jun 29, 2010
    Messages:
    1,379
    Location:
    India
    Hi again,

    I think we can see each value of signal in oscilloscope like that..

    But what the use of impulse response in DSP???
    or what this mean as i conform these tech. is used to see output response of a system using different signal like ramp, unit step, etc....
  20. Papabravo

    Papabravo AAC Fanatic!

    Joined:
    Feb 24, 2006
    Messages:
    6,251
    Location:
    Michigan, USA (GMT-5)
    It would be a great deal easier if you just read Smith's free e-book. The impulse response is the response of the filter to a discrete input function consisting of a single impulse. Once you know the impulse response you can convolve the impulse response with ANY discrete input function and compute the output. I don't understand why you are being so ...well....thick. Make some effort -- will you?
    RRITESH KAKKAR likes this.
Similar Threads
Forum Title Date
Homework Help Working of π Filters Oct 2, 2014
Homework Help Wien Bridge Oscillator simulation not working in LTSpice Aug 5, 2014
Homework Help lm318p not working?? Jul 11, 2014
Homework Help Full wave rectifier not working May 25, 2014
Homework Help working with buttons in microcontroller Jan 22, 2014

Share This Page