Inside Collection: A First Course in Electrical and Computer Engineering

This module is part of the collection, *A First Course in Electrical and Computer Engineering*. The LaTeX source files for this collection were created using an optical character recognition technology, and because of this process there may be more errors than usual. Please contact us if you discover any errors.

The simplest numerical filter is the simple averaging filter. This filter is defined by the equation

The filter output *x* is the average of the *N* filter inputs *u _{N}*. These
inputs may be real or complex numbers, and

If the averaging filter is excited by the constant sequence

The output is, truly, the average of the inputs. Now suppose the filter is excited by the linearly increasing sequence

This sequence is plotted in Figure 2. How do we sum such a sequence in
order to produce the average

Each pair-sum in parentheses equals

This is certainly a reasonable answer for the average of a linearly increasing sequence. See Figure 2.

Write

**General Sum Formula.** Suppose the input to the simple averaging filter is the polynomial sequence

where

We rewrite

Rather than study the average

The sum

This result is very important because it tells us that the sum *recursion* in which

Let's check to see that this polynomial really can obey the required recursion.
First note that

The term

This recursion is general enough to produce the difference *N ^{k}* provided we can solve for

In order to solve for the coefficients of this polynomial, we propose to
write out our equation for

Using the linear algebra we learned earlier, we may write these equations as the matrix equation

The terms on the right-hand side of the equal sign are “initial conditions”
that tell us how the sum

When

Solve for

(MATLAB) Write a MATLAB program to determine the coefficients

**Exponential Sums.** When the input to an averaging filter is the
sequence

we say that the input is exponential (or geometric). Typical sequences are
illustrated in Figure 6.5 for

How do we evaluate this sum? Well, we note that the sum

Therefore, provided

This formula, discovered already in the chapter covering the functions

When

Evaluate

Prove that

Prove that

**Recursive Computation.** Every sum of the form

obeys the recursion

This means that when summing numbers you may “use them and discard them.” That is, you do not need to read them, store them, and sum them.

You may read

This is very important for hardware and software implementations of running sums. You need only store the current sum, not the measurements that produced it. Two illustrations of the recursion

- « Previous module in collection Filtering: Introduction
- Collection home: A First Course in Electrical and Computer Engineering
- Next module in collection » Filtering: Weighted Averages

Comments:"Reviewer's Comments: 'I recommend this book as a "required primary textbook." This text attempts to lower the barriers for students that take courses such as Principles of Electrical Engineering, […]"