1 / 50

Digital Filters

Digital Filters. x(t). A/D. x[n]. Computer. y[n]. D/A. y(t). Example:. When we describe a discrete-time system by a discrete-time transfer function. what can we find-out about the system from the transfer function?.

bob
Télécharger la présentation

Digital Filters

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Digital Filters

  2. x(t) A/D x[n] Computer y[n] D/A y(t) Example:

  3. When we describe a discrete-time system by a discrete-time transfer function what can we find-out about the system from the transfer function?

  4. Example: What is the input-output relationship for the following transfer function? Solution: From the definition of the transfer function we have

  5. Cross-multiplying and converting back to discrete-time domain we have In other words, the current output is equal to one-half times the previous output plus the current input.

  6. To get the current output y[n], which is sent to the D/A, we get the previous output y[n-1] (sent the last time to the D/A), multiply it by one-half and add to it the current input from the A/D. In a programming language like C++, the code would look something like this: yp = 0; // set “previous” y to zero while (true) { x = inp(ad); // get new sample y = 0.5*yp+x; // perform filtering operation outp(y, da); // send filtered sample to D/A yp = y; // set “current” to “previous” // for next iteration }

  7. Now what does this operation do to an input signal? Example: find the impulse and step responses to the previous filter. Solution: we could use z-transforms or convolution to find the output when the input is an impulse or a step, but instead, let us see how the output “evolves.” A table will be created with three columns: n, x[n] and y[n]. Each column will correspond to an instance in discrete-time. For the impulse input x[n]=d[n] we have

  8. For the step input x[n]=u[n] we have

  9. The plots of these outputs are as follows: y[n] for x[n]=d[n] n 1 2 3 4

  10. y[n] for x[n]=u[n] 2 1 n 1 2 3 4

  11. The responses look like those for an RC low-pass filter. What about the frequency response for this digital filter? Is it indeed a low-pass filter? To answer this question, we go back to the meaning of z:

  12. To find the frequency response of filters described by Laplace-domain transfer functions, we let s=jW. We do the same for z-transform transfer functions: At this point we introduce a notational convenience:

  13. So, The values of z=ejw correspond to values on the unit circle in the z-plane. The variable w will take-on values from 0 to 2p. From the relationship w=2p(W/Ws), as w goes from 0 to 2p, W/Ws will go from 0 to 1 andW will go from 0 to Ws.

  14. Im w Re

  15. The range W=0 to W=Ws corresponds to the spectrum of the sampled signal through the lower half of the first alias. The significant frequencies of the signal are from W=0 to W=Ws/2. This range of frequencies corresponds to the range w=0 to w=p. Xs(W) Ws/2 -Ws Ws W w=0 w=2p w=0 to p

  16. To find the frequency response of a digital filter, we plug-in z=ejw to the transfer function and evaluate this function for w=0 to p.

  17. Example: Find the frequency response of the digital filter described by the transfer function Solution: We evaluate H(ejw) for w=0,p/2 and p.

  18. Im Re

  19. We can readily see that the frequency response corresponds to that of a low-pass filter.

  20. A better frequency response plot would include more sample points.

  21. Example: Find the frequency response of the digital filter described by the transfer function Solution: As before, we evaluate H(ejw) for w=0,p/2 and p.

  22. Im Re

  23. Here, we have a high-pass response.

  24. Notice that the frequency of maximum response corresponds to the angular location of the polex Suppose the angular location of the pole were at w=p/2. What would the frequency response be?

  25. Im Re

  26. The corresponding transfer function would be Evaluating this transfer function at z=ejw for w=0,p/2 and p, we have

  27. As expected, we get a band-pass response

  28. The angular location of the poles correspond to frequencies of resonant peaks. We could improve upon the design of the previous filter by inserting zeroes at w=0 (z=1) and w=p (z= -1). The resultant transfer function would be

  29. Im Re

  30. The corresponding frequency response is as follows:

  31. We also must recognize that the poles must occur in conjugate imaginary pairs. So, The resultant frequency response has a similar shape (not quite as sharp) and has a different maximum value:

  32. We can perform rough design digital filters in this manner by trial-and error placement of poles and zeros in the complex plane. However, more precise and analytic methods of designing digital filters exist and will be discussed in later presentations.

  33. Digital Filter Phase Response The phase response of a digital filter can be evaluated in a similarmanner to the magnitude response. For each frequency value, evaluate ejw, and H(ejw). But instead of computing |H(ejw)|, compute H(ejw).

  34. Example: Find the phase response of Solution: We let z=ejw, and find the angle of the complex value.

  35. The Matched z-Transform In the matched z-transform digital filter design method we try to “match” the impulse response of the analog filter with that of the digital filter being designed. To match the impulse responses, we take the inverse Laplace transform of the analog filter H(s)h(t), then sample the impulse response h(t)h[n], then take the z-transform of the sampled impulse response to get the z-transform transfer function h[n]H(z).

  36. Analog Prototype Digital Filter L-1 Z sample Once we have our z-transform transfer function H(z), we apply the definition of the transfer function to write our digital filter equations:

  37. Example: Use the matched filter design method to design the digital equivalent of an integrator. Solution: The analog transfer function is The inverse Laplace transform is

  38. We then sample the impulse response to get h[n]: Finally, we take the z-transform of the impulse response to get the digital filter transfer function.

  39. Finally, we apply the definition of the z-transform transfer function to get the relationship between the input of the digital filter x[n] and the output of the digital filter y[n].

  40. Applying this formula to an arbitrary input x[n], we have

  41. We see that the output is the summationof the input. Thus the digital filter accurately represents the analog filter. The digital filter does not always accurately represent the analog filter as will be seen in the next example.

  42. Example: Use the matched filter design method to design the following transfer function: where Wc = Ws/4, and Ws is the sampling frequency. Solution: First, we find the impulse response

  43. Then we sample the impulse response: Then we take the z-transform of the (discrete-time) impulse response:

More Related