=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Date: Fri, 19 Nov 1999 11:30:03 From: "Nikolai Golovchenko" To: "pic microcontroller discussion list" Subject: [OT]Re: DTMF Tones? [Idea]How to produce sine wave -------------------------------------------------------------------------------- -----Original Message----- From: Sean Breheny To: PICLIST@MITVMA.MIT.EDU Date: Friday, November 19, 1999 2:07 AM Subject: Re: [OT]Re: DTMF Tones? [Idea]How to produce sine wave >Along the lines of this thread: Can someone please tell me the difference >between FIR and IIR filters? I am familiar with impulse response for >continuous time systems, and with transfer functions,but I have not yet >covered IIR versus FIR in class nor have I read any explanation of it yet, >so I am curious. Is it just that the impulse response is time-limited? FIR filters use only input signal samples to compute the next output. The difference equation for FIR filter is: y(n) = b0 * x(n) + b1 * x(n - 1) + b2 * x(n - 2) + ..., where y(n) - n'th sample of output x(n) - n'th sample of input IIR filters use also output signals samples. That is, y(n) = b0 * x(n) + b1 * x(n - 1) + b2 * x(n - 2) + ... - a1 * y(n - 1) - a2 * y(n - 2) - ..., You can see from the FIR formula that its impulse response is indeed time-limited, because its output is based on a number of input samples and if input becomes zero then output will go zero sooner or later. The length of FIR filter buffer defines the frequency and magnitude resolution that the filter can provide. For example, a low pass filter with pass band edge frequency of 100 Hz (0dB) and stop frequency 150 Hz (-60 dB) at 44100 Hz sampling requires about 1400 buffer size. FIR filters can have linear phase on frequency dependence. IIR filter output depends on both input and output samples. IIR filters resemble analog filters in this respect and often synthesized on an analog model. IIR filters generally require less memory size, but harder to implement. They have problems with stability, coeficients resolution. Good idea is break the whole filter into second order sections. Response of a practical IIR filter may be finite because of limited coeficients length. Sometimes, the response is made infinite intentionally to generate for example sine waves. If you want more information on digital filters check out Texas Instruments and Analog Devices web sites. They should have lots of information on this topic. _ Nikolai Golovchenko, Electrical Engineering Student National Mining University of Ukraine www.nmuu.dp.ua Dnepropetrovsk, Ukraine E-mail: golovchenko@mail.ru