[sci.electronics] FIR Signals

ugbell@sunybcs.uucp (William Bell) (02/09/89)

   I am taking a course at the University called:
       Signal Processing Algorithms (ECE 416).
   I have a strong mathematical background, and understand
the mathematics behind The Fourier and Z-Transforms. For example
I know that any signal is composed of an Amplitude and a
phase, and given any digital signal the signal can be changed
by using filters or Amplifiers. (I fully understand what Amplifiers
do - eg. Amplify the Power, Voltage or Current).
   What I am confused about is: What is the purpose behind filter
design? I know they can be used in Radar.  More specifically,
I know that FIR (finite impulse response) has the following
transfer function:  H(z) =        -1         -L
                           b  + b z  + ...+b z
                            0    1          L

               Now, 1) What does it do? What are the benefits
                      over IIR? When is it used?
                    2) What is "impulse response"? I know it is h,
                       but is it just frequency??
                    3) For example they say that the impulse
                       response can be gotten by taking fourier,
                       and in FIR filters is an infinitely long
                       sequence, but what does this all mean?
                     4) I seen many diagrams saying "FIR Impulse
                       response for low-pass filter with..." and
                       Diagram shows Amplitude and Sample number,
                       but how can FIR be don to low pass "filter"?
                       2 filters?? hmmm...
                                        Thanks.

grnberg@mit-caf.MIT.EDU (David R. Greenberg) (02/12/89)

In article <4104@cs.Buffalo.EDU> ugbell@sunybcs.UUCP (William Bell) writes:
>
>   I am taking a course at the University called:
>       Signal Processing Algorithms (ECE 416).

>   What I am confused about is: What is the purpose behind filter
>design?

>I know that FIR (finite impulse response) has the following
>transfer function:  H(z) =        -1         -L
>                           b  + b z  + ...+b z
>                            0    1          L
>
>               Now, 1) What does it do? What are the benefits
>                      over IIR? When is it used?
>                    2) What is "impulse response"? I know it is h,
>                       but is it just frequency??
>                    3) For example they say that the impulse
>                       response can be gotten by taking fourier,
>                       and in FIR filters is an infinitely long
>                       sequence, but what does this all mean?
>                     4) I seen many diagrams saying "FIR Impulse
>                       response for low-pass filter with..." and
>                       Diagram shows Amplitude and Sample number,
>                       but how can FIR be don to low pass "filter"?
>                       2 filters?? hmmm...
>                                        Thanks.

I am usually a browser on this newsgroup and do not post.  However, I
felt guilty not responding to this question.  I think, first of all, that
you may not have as solid an idea of signals, transforms, and linear systems
as you feel you do.  Also, since I have time to answer these questions only
briefly, I suggest that you do refer to a textbook such as _Digital Signal
Processing_ by Jackson, or the signals and systems book by W.M. Siebert
for further information.

Although the algebra is often more difficult, most of the concepts of
signals and linear systems are understood more easily with discrete
time (DT) signals than with continuous time (CT) signals:

   A DT signal is just a sequence of numbers, x[n], where
n is an integer.  Usually, n ranges from negative to positive infinity.
So, x[n] is really just a function that is defined only for an integer
argument.  As an example:

x[n] = a^n, n>=0
       0  , n<0

is a DT signal.  Often, the term "digital" is used to describe
this kind of signal.  Strictly speaking, this term is not correct.  A
DT signal should be called digital only when x[n] is quantized
and can take on only a discrete set of values e.g. the integers 0-255.
Thus, both the domain and range of a digital signal are discrete.

   In real applications, we use a DT signal to represent information.
For example, we may sample the voltage generated by a microphone at
discrete instances of time.  For example, x[0] could equal the voltage
at 0 seconds, x[1] the voltage at 1 millisecond, and so forth.

   Because signals are used so often to represent quantities that evolve
in time, we often refer to the sequence x[n] as the "time domain"
representation of signal x.  However, there are others ways to express
the same information contained in signal x.  One such way is called the
z-transform, X(z).  X(z) is a different function from x[n].  For one
thing, z is a complex number, and X(z) itself is complex as well.  Also,
X(z) may be not be defined over the entire complex plane.  In general,
it is defined over the region contained between two concentric circles drawn
in the complex plane (an annular region centered about 0).  However,
we can go back and forth between x[n] and X(z) with the appropriate
mathematical formula - both functions contain the same information and
should thought of as two different ways of expressing signal x.  If
we look at X(z) for z on the unit circle in the complex plane (assuming
it is defined there), we obtain the frequency content of our signal.

   Now, it does us little good to be able to represent information in a DT
signal if we cannot process this information.  This is the purpose of
filter design - to take a given signal and to process it in some way so
as to extract information from it or to modify it in some desired way.
As an example, you mention RADAR in your posting.  Assume that we transmit a
but of radio energy and pick up the "returned" signal with an antenna.  Our DT
signal would then represent the magnitude of the returned signal at discrete
instances of time over some small period of time.  Since this returned signal
consists of noise as well as possible reflections from a target, we may wish to
process the signal to determine if our signal does, in fact, contain
reflections from actual targets.  As another example, our signal may
represent an audio signal.  We may want to attenuate or amplify certain
frequencies in this signal.

   We modify our original signal by putting it through a system.  A DT
system takes one signal, namely our original signal, processes it, and
produces a second signal as its output.  In your class, you will be
learning about linear, time invariant (LTI) systems.  We can think of such
systems as modifying the frequency content of our original signal.  This
is why they are often called filters.

   We can represent LTI systems by their "system function", H(z).  If
original signal has z-transform X(z), than the output of our system will
have z-transform Y(z)=X(z)H(z).  We can represent the action of a filter in
the time domain as well.  In the time domain, output y[n] is just the
convolution of our input x[n] and a signal h[n] called the impulse
response of the system.  The impulse reponse of a system (filter) is
just the output of the system when the input is an impulse, i.e. the
signal:

delta[n] = 0, n not 0
           1, n=0

Since any function can be written as a superposition of weighted, shifted
impulses, the output of an LTI system can be written as a superposition
of weighted, shifted impulse responses.  The system function H(z) is
just the z-transform of the impulse response.

   Now, suppose we apply an impulse as the input to a system.  That is,
we apply all zeros to the input until n=0, at which time we apply a
single input of 1 followed by more zeros forever.  Our input consists,
therefore, of only one non-zero point.  If our system is causal, the
output of the system will be zero all the way until the point where 
we apply our single non-zero input.  At this time, the system will
begin to output non-zero values.  If these non-zero values eventually
die down and stop, our system is said to have a finite impulse response (FIR).
If, on the other hand, our signal puts our non-zero values forever (e.g.
an exponentially decaying sequence of values), our system has an infinite
impulse response (IIR).

   Both FIR and IIR systems have uses.  IIR filters can usually be
of lower order than FIR filters that do the same job, and thus are
easier to realize.  However, IIR filters generally employ feedback which
can lead to stability problems if they are not properly designed.  IIR
filters have another disadvantage over IIR filters.  An FIR filter can be
designed to have linear phase.  That is, an FIR filter can be designed
so that it delays all input frequencies by the same amount.  Thus, the
output, although delayed from the input, is not distorted by the
spreading out of all of its frequency components.  Compare this
with a narrow pulse of white light.  If the various colors of the light
all travel at the same speed, the pulse will arrive intact at its 
destination some time later.  If the colors each travel at different
speeds, however, the pulse will be broadened at its destination, with
the faster colors arriving first and the slower colors trailing behind.
IIR filters cannot be designed to have linear phase.

   I have to give up my terminal to my officemate at the moment, so I
can't go on.  I'll try to keep up with the responses to this posting.

-David