Newsletter

DSP DesignLine  >  Design Center

The math of DSP, part 4: Convolution, Fourier, and Nyquist

Part 4 looks at convolution, the Fourier series, and the Nyquist sampling theorem.

Page 1 of 3

DSP DesignLine

This series is excerpted from "Digital Signal Processing: Instant Access."

Order this book today and receive an additional 20% discount. Click here www.elsevierdirect.com and be sure to type in 92836. Or call 1-800-545-2522 and be sure to mention 92836. Offer expires 12/31/2008.

Part 3 explains the basics of filters. Part 5 explains the concept of orthogonality.


CONVOLUTION


Key Concept
Convolution , in its simplest terms, is the process of feeding one function into (or as it is sometimes called, through) another function. Conceptually, for example, a filter can be thought of as a function. When we feed some function (such as the one in Figure 4-9) through our moving average filter, we are convolving the input function with the moving average filter. The asterisk (*) is normally used to denote convolution:

where h[n] are the coefficients of our filter, and f [n] is the input function. In our moving average filter h[n] had three coefficients and they were all equal to 1/3.


Convolution is sufficiently important to DSP that it is worth developing the subject in detail. In the following examples, the notation will be somewhat simplified. Instead of using f[n], we will use the simpler fn. The meaning is identical.

In review then, our moving average filter can be expressed as follows:

Distributing the (1/3) gives us:

To make the expression more general, we replace the constants with the function h:

Converting to our simpler notation yields:

It is worthwhile to study the actual computation sequence that goes on in the filter. Let's take the first four samples of f:f0, f1, f2 and f3.

We start out at time n = -1. The first computation is then:

Immediately, a problem crops up. We require values of f with a negative index. In other words, we need values before our first sample. We can get around this problem by simply defining f to be 0 at any point where it is not explicitly defined. Thus, for n = -1 we obtain:

This notation is still a little awkward, since the y -1 implies that our first output occurs at some time prior to the n = 0 point. This is just a manifestation of our noncausal implementation. It really is our first output.

In a similar fashion, we can get the next output for n = 0:

Proceeding along these lines, we obtain the results shown in Table 4-5. Notice the symmetry and pattern of the terms in the table. We have been careful to line up the terms in the equations to emphasize this point. With a little contemplation, we can derive a very compact expression for producing the terms in Table 4-5:


Table 4-5. Results of convolution example.

One caveat: Don't try to apply Equation 4-51 too literally to produce Table 4-5, as the n = -1 term will throw you off. If you start with n = 0, however, you will get the same terms shown in Table 4-5. More formally, we can say that Equation 4-51 is valid for all non-negative index values of y.

Equation 4-51 is called the convolution sum, and we can use it directly to implement filters. We simply plug in the coefficients for h, and then feed in the values for the input function f. Obviously, finding the coefficients for h is of key interest. So far we have only been able to come up with the simple moving average filter:

Increasing N gives more terms to average, and therefore a lower frequency response. Fewer terms give fewer terms to average, and therefore a higher frequency response. As we saw, we can empirically determine the curve for the frequency response, but we cannot really do much to control the shape of the curve.

It would be much more useful if we could simply draw the frequency response we wanted, and then convert that frequency response to the coefficients for h. That is exactly what we will do, but first we must develop a few more tools.

Page 2: The Fourier series  

Page 1 | 2 | 3

Related Links:
  • Fixed-Point DSP and Algorithm Implementation


  • Rate this article
    WORSE | BETTER
    1 2 3 4 5




    Related Content

    TECH PAPER
    1. Li-ion battery-charger solutions for JEITA compliance

    TECH PAPER
    2. RapidIO Gen2 Technology

    COURSE
    3. Enabling a Ubiquitous Video Infrastructure

    TECH PAPER
    4. Innovative DSP technology with RISC virtualization

     


     Featured Jobs
    Accenture seeking Project Management Team Lead in Charlotte, NC

    Accenture seeking Software Engineer in Salt Lake City, UT

    Boeing Company seeking Software Engineer in Herndon, VA

    Switch and Data seeking Customer Solutions Engineer in Dallas, TX

    Chart Industries seeking Sr. Developer in Cleveland, OH

    More jobs on EETimesCareers
     Sponsor
     CAREER CENTER
    Ready to take that job and shove it?
    SEARCH JOBS:

     SPONSOR

     RECENT JOB POSTINGS
    For more great jobs, career related news, features and services, please visit EETimes' Career Center.