Академический Документы
Профессиональный Документы
Культура Документы
Filter
Introduction
A filter is essentially a system or network that selectively changes changes the: Wave Shape, AmplitudeAmplitude-Frequency and/ or PhasePhase-Frequency characteristics of a signal in a desired manner.
Filter
Introduction
Common Filtering Objectives: Improve quality of signal (E.g. Removing or reducing noise), Extract information from signals or Separate 2 or more signals previously combined
E.g. When combined to make efficient use of an available communication channel)
Digital Filter
Introduction
A digital filter is a mathematical algorithm implemented in hardware and/ or software that operates on a digital input signal to produce a digital output signal for the purpose of achieving a filtering objective. The term digital digital filter filter refers to the specific hardware or software routine that performs the filtering algorithm.
Digital Filter
Introduction
Simplified block diagram of a realreal-time digital filter with analogue input and output signals:
mapping g the The Digital Processor implements the filtering operation, mappin input sequence, x(n), to the output sequence, y(n), in accordance with the computational algorithm. The DAC converts the digitally filtered output into analogue values values which are then analogue filtered to smooth and remove unwanted high frequency components.
convolution nvolution sum The input and output signals to the filter are related by the co
Finite Impulse Response (FIR):
It is evident from these equations that, for IIR filters, the impulse impulse response is of infinite duration whereas for FIR it is of finite duration.
because the length of its impulse response is too long (infinite in theory). Instead, the IIR filtering equation is expressed in a recursive form:
These equations, and in particular the values of h(k), for FIR, or ak and bk, for IIR, are often very important objectives of most filter de design sign problems.
it is noted that the current output sample, y(n), is a function of past outputs as well as present and past input samples.
i.e. the IIR is a feedback system of some sort.
in which the current output sample, y(n), is a function only of past and present values of the input. Note, however, that when the bk are set to zero, the IIR equation reduces to the FIR equation.
The transfer functions, H(z), for these filters, are very useful in evaluating their frequency responses.
Digital Filters
Choosing btw. FIR and IIR Filters
The choice between FIR and IIR depends largely on the relative advantages of the 2 filter types: FIR:
FIR filters can have linear phase response FIR filters can be realized nonnon-recursively Finite wordlength effects far less severe in FIR filters
IIR:
FIR filters require more coefficients than IIR filters to realize realize sharp cutoffs Easy to create IIR filters from equivalent analogue filters FIR filters algebraically more difficult to synthesize
Thus: Use IIRs when only important requirements are sharp cutoffs Use FIRs if the number of coefficients is not too large and little or no phase distortion is required
Specification of the filter requirements Calculation of suitable filter coefficients Representation of the filter by a suitable structure (Realisation) (Realisation) Analysis of the effects of finite wordlength on filter performance performance Implementation of a filter in SW and/ or HW
The 5 steps are not necessarily independent; nor are they always performed in the order given.
Filter Design
1. Specification of the filter requirements Requirement specifications include specifying:
1.1. 1.2. 1.3. 1.4. Signal characteristics Characteristics of the filter Manner of implementation Other design constraints
Filter Design
1. Specification of the filter requirements
1.1. Signal characteristics
Include:
Types of signal source and sink Input/ Output interface Data rates and width Highest frequency of interest
Filter Design
1. Specification of the filter requirements
1.2. characteristics of the filter
Include:
Desired amplitude, phase and tolerances Speed of operation Modes of filtering (Real time or batch)
The characteristics of digital filters are often specified in the the frequency domain.
Filter Design
1. Specification of the filter requirements
1.2. characteristics of the filter For frequency selective filters, such as LP and BP filters, the specifications are often in the form of tolerance schemes. The following figure depicts a scheme for a LPF
The shaded horizontal lines indicate the tolerance limits. To be discussed in more detail later on during FIR filter design
Filter Design
1. Specification of the filter requirements
1.3. Manner of implementation
Include:
High level language routine in a computer, or DSPDSP-based system Choice of signal processor
Filter Design
1. Specification of the filter requirements
1.4. Other design constraints
Include:
Cost Size
Filter Design
2. Calculation of suitable filter coefficients and nd In this step we select one of a number of approximation method a calculate the values of the coefficients. For FIR we obtain h(k) using:
Window method Frequency sampling method Optimal method
3.
Filter Design
3. Representation of the filter by a suitable structure (Realisation) Realistion involves converting a given transfer function, H(z), into a suitable filter structure. Block or flow diagrams are often used to depict filter structures and they show the computational procedure for implementing the digital filter. The structure used depends whether the filter is FIR or IIR.
Filter Design
3. Representation of the filter by a suitable structure (Realisation) For FIR the following realisation structures are used:
Transversal (Direct) Frequency Sampling Fast Convolution Lattice
Filter Design
3. Representation of the filter by a suitable structure (Realisation) Transversal (Direct) realisation (FIR):
Filter Design
3. Representation of the filter by a suitable structure (Realisation) Frequency Sampling (FIR):
Filter Design
3. Representation of the filter by a suitable structure (Realisation) Basic lattice structure (IIR or FIR):
Filter Design
3. Representation of the filter by a suitable structure (Realisation) FIR realisation structures:
Transversal (Direct) Frequency Sampling Fast Convolution Lattice
Filter Design
3. Representation of the filter by a suitable structure (Realisation) Direct realisation (IIR):
Filter Design
3. Representation of the filter by a suitable structure (Realisation) Cascade realisation (IIR):
Filter Design
3. Representation of the filter by a suitable structure (Realisation) Parallel realisation (IIR):
Filter Design
3. Representation of the filter by a suitable structure (Realisation) IIR realisation structures:
Direct Form Cascade Parallel Lattice
Filter Design
3. Representation of the filter by a suitable structure (Realisation) Conclusion All structures for implementing a given filter would perform identically under infiniteinfinite-precision arithmetic, but produce different
quantisation noise, coefficient quantisation effects, and limit cycles
4.
Specification of the filter requirements Calculation of suitable filter coefficients Representation of the filter by a suitable structure (Realisation) (Realisation) Analysis of the effects of finite wordlength on filter performance performance
Filter Design
4. Analysis of the effects of finite on filter performance wordlength
The approximation and realisation steps assume infinite or very high precision. In actual implementation it is often necessary to represent the filter coefficients using a limited number of bits. The effects of using a finite number of bits are to degrade the performance of the filter and in some cases make it unusable. The designer must analyse these affects and choose suitable wordlengths wordlengths for the:
coefficients, filter variables, and arithmetic operations within the filter
Filter Design
4. Analysis of the effects of finite on filter performance wordlength
are re as The main sources of performance degradation in digital filters a follows: Input/output quantisation
ADC noise
Coefficient quantisation
Deviation in frequency response
Overflow
Results when addition exceeds permissible wordlength
5.
Filter Design
5. Implementation of a filter (SW and/ or HW) Having calculated the filter coefficients, chosen a suitable structure, verified the filter degradation (wordlength effects) the difference equation must be implemented as a software routine routine or in hardware.
Filter Design
5. Implementation of a filter (SW and/ or HW) To implement a filter the following building blocks are required: required:
Memory (ROM) for storing filter coefficients Memory (RAM) for storing present and past inputs and outputs. Hardware and software multipliers Adder or ALU
Filter Design
5. Implementation of a filter (SW and/ or HW) These components are configured depending on whether
Batch (non(non-real time), or RealReal-time
processing is required.
Filter Design
5. Implementation of a filter (SW and/ or HW) Batch processing may be described as a purely software implementation implementation
Although the designer may wish to incorporate additional hardware hardware to increase the speed of processing.
Filter Design
5. Implementation of a filter (SW and/ or HW) For RealReal-time processing, the filter is required either
to operate on the present input sample, x(n), to produce the current output sample, y(n), before the next input sample arrives (i.e. within the interinter-sample period), or to operate on an input block of data, using an FFT algorithm for example, to produce an output block of data within a period proportional to the block length.
RealReal-time filtering may require fast and dedicated hardware if the sample rate is very high or if the filter is of a high order.
Filter Design
5. Implementation of a filter (SW and/ or HW) Finally
In addition to the signal processing hardware, the designer must also provide suitable inputinput-output interfaces to the digital hardware, depending on the type of data source and sink. E.g. Analogue to digital conversion