參數(shù)資料
型號(hào): AN540
廠商: Microchip Technology Inc.
英文描述: Implementing IIR Digital Filters
中文描述: 實(shí)現(xiàn)IIR數(shù)字濾波器
文件頁數(shù): 1/17頁
文件大?。?/td> 135K
代理商: AN540
1993 Microchip Technology Inc.
DS00540B-page 1
Implementing IIR Digital Filters
4
Implementing IIR Digital Filters
THEORY OF OPERATION
Digital filters in most cases assume the following form of
relationship between the output and input sequences.
y(n) = -
a
i
y(n - i) +
b
j
x(n - j)
i=o
The above equation basically states that the present
output is a weighted sum of the past inputs and past
outputs. In case of FIR filters, the weighted constants
ai=0 and in case of IIR filters, at least one of the ai
constant is non zero. In case of IIR, the above formula
may be re written in terms of Z transform as:
The above equation can further be rewritten in differ-
ence equation format as follows:
M
y(n) = -
a
i
y(n - i) +
b
j
x(n - j)
i=1
Realization of the above equation is called as the Direct
Form II structure. For example, in case of a second order
structure, M=N=2, gives the following difference equa-
tions :
d(n) = x(n) + a
1
d(n-1) + a
2
d(n-2)
y(n) = b
0
d(n) + b
1
d(n-1) + b
2
(d(n-2)
(1)
(2)
The above difference equations may be represented as
shown in Figure 1.
INTRODUCTION
This application note describes the implementation of
various digital filters using the PIC17C42, the first mem-
ber of Microchip’s 2nd generation 8-bit microcontrollers.
The PIC17C42 is a very high speed 8-bit microcontroller
with an instruction cycle time of 250ns (@ 16 MHz input
clock). Even though PIC17C42 is an 8-bit device, it’s
high speed and efficient instruction set allows imple-
mentation of digital filters for practical applications.
Traditionally digital filters are implemented using expen-
sive Digital Signal Processors (DSPs). In a system the
DSP is normally a slave processor being controlled by
either an 8- or 16-bit microcontroller. Where sampling
rates are not high (esp. in mechanical control systems),
a single chip solution is possible using the PIC17C42.
This application note provides a few examples of imple-
menting digital filters. Example code for 2nd order Infi-
nite Impulse Response (IIR) filters is given. The follow-
ing type of filters are implemented:
Low Pass
High Pass
Band Pass
Band Stop (notch) filter
This application note does not explain how to design a
filter. Filter design theory is well established and is
beyond the scope of this application note. It is assumed
that a filter is designed according to the desired specifi-
cations. The desired digital filters may be designed
using either standard techniques or using commonly
available digital filter design software packages.
Finite Impulse Response (FIR) filters have many advan-
tages over IIR filters, but are much more resource
intensive (both in terms of execution time and RAM). On
the other hand, IIR filters are quite attractive for imple-
menting with the PIC17C42 resources. Especially where
phase information is not so important, IIR filters are a
good choice (FIR filters have a linear phase response).
Of the various forms used for realizing digital filters (like,
Direct form, Direct II form, Cascade form, Parallel,
Lattice structure, etc.) the Direct II form is used in this
application note. It is easy to understand and simple
macros can be built using these structures.
b
k
Z
-k
k=0
N
M
1 +
a
k
Z
-k
k=1
H(z) =
=
Y(z)
X(z)
N
j=o
M
N
j=o
X(n)
b0
+
Y(n)
Z
-1
b1
b2
-a1
-a2
Z
-1
FIGURE 1 - 2ND ORDER DIRECT FORM II
STRUCTURE (TRANSPOSED)
AN540
4-129
相關(guān)PDF資料
PDF描述
AN5766 8MHz Power Amps For Military, Industrial and Commercial Equipment
AN597 Implementing Ultrasonic Ranging
an6077 An IC Operational Transconductance Amplifier With Power Capability
AN610 Using the 24LC21 Dual Mode Serial EEPROM
an6668 ECONOLINE: REC3-S_DR/H1 - 3W DIP Package- 1kVDC Isolation- Regulated Output- UL94V-0 Package Material- Continuous Short Circiut Protection- Internal SMD design- 100% Burned In- Efficiency to 75%
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
AN5410 制造商:未知廠家 制造商全稱:未知廠家 功能描述:Vertical/Horizontal Deflection Processor
AN5411 制造商:未知廠家 制造商全稱:未知廠家 功能描述:Video Deflection Circuit
AN5415 制造商:PANASONIC 制造商全稱:Panasonic Semiconductor 功能描述:Color TV Deflection Signal Processing Circuits
AN5416 制造商:PANASONIC 制造商全稱:Panasonic Semiconductor 功能描述:Color TV Deflection Signal Processing Circuits
AN5421 制造商:Panasonic Industrial Company 功能描述:IC