National Instruments Car Stereo System 320571-01 用户手册

下载
页码 157
NI-DSP Analysis VI Reference Overview
Chapter 1
Part 3:  NI-DSP Function Reference
1-6
NI-DSP SRM for LabVIEW for Windows
The set of coefficients a and b are often referred to as the numerator and denominator coefficients, respectively.
Another common way to refer to them is as the feedforward and feedback coefficients.  This is due to the
mathematical derivation that led to equation a.  Refer to Discrete-Time Signal Processing by Oppenheim and
Schafer for more information.  Another frequent assumption is that a(0)=1.0.  For example, let us assume M = 4,
N = 4 and n = 2.  Using the filtering equation produces:
a(0)*y(2)  = b(0)*x(2) + b(1)*x(1) + b(2)* x(0) + b(3)* x(-1) - a(1)*y(1) - a(2)*y(0) - a(3)*y(-1)
(b)
The filtering equation suggests that in order to compute the value of the output at n = 2, you not only need the
coefficients that represent the filter that is producing this output sequence, but also the value of the current input and
output, the values of the input and output one time unit ago, the values of the input and output two time units ago,
and the values of the input and output three time units ago.  You need some “history” about the previous outputs of
the filter as well as the previous inputs to the filter.  The amount of history (number of previous output and input
samples) depends on the lengths of the arrays a and b (filter coefficients arrays).
At time n = 0, it is important to note that the filtering equation becomes:
a(0)*y(0)  = b(0)*x(0) + b(1)*x(-1) + b(2)* x(-2) + b(3)* x(-3) - a(1)*y(-1) - a(2)*y(-2) - a(3)*y(-3)
(c)
Thus, for the function filter to properly operate as of time n = 0, you need to supply some history about previous
behavior.  The filter function then updates the history as time goes on, keeping track of previous input values and
corresponding outputs.  This history, at time n = 0, is referred to as the initial conditions on the input and output of
the filter.
Digital filters fall into two classes–Infinite Impulse Response filters (IIR filters) and Finite Impulse Response filters
(FIR filters).  Notice that IIR filters are represented by equation (a) while the FIR filters can be represented by the
same equation provided all a's are zero except for a(0) as shown in the following equation:
i = N
a(0)*y(n) =
 (x[n-i]*b(i))
(d)
i = 0
The NI-DSP Analysis VIs have a set of VIs that implement IIR and FIR filters.  Because all digital filters are
approximations of their analog design counterparts, there are several techniques for designing a digital filter.
For the IIR filter design, the NI-DSP Analysis VIs have four approaches representing four different techniques of
obtaining digital filter specifications (coefficients to equation (a))–Butterworth, Chebyshev, inverse Chebyshev, and
elliptic techniques.  With each design technique, you can obtain the coefficients for lowpass, highpass, bandpass,
and bandstop filters from the respective NI-DSP Analysis VIs.
For the FIR filters, the NI-DSP Analysis VIs allow the
 
design of a multiband FIR linear phase filter using the Parks-
McClellan algorithm.  The frequency response in each band has equal ripples that can be adjusted by a weighting
factor.  For more information, please refer to Digital Filter Design by Parks and Burrus, or "A Computer Program
for Designing Optimum FIR Linear Phase Digital Filters," by McClellan, Parks, and Rabiner.
The IIR VIs generate filter coefficients that represent the a's and b's in the equations a and b.  No filtering is actually
performed.  The IIR filter design coefficients all have a(0) = 1.0.  You can use the general-purpose VI that accepts
filter coefficients, initial conditions on the input and output sequences, and an input sequence to filter any of the
filter specifications.  This VI filters the input sequence and provides the final conditions on the output and input of
the filter.
About Windowing
Almost every application requires you to use finite length signals.  This requires that continuous signals be
truncated, using a process called windowing.