SlideShare a Scribd company logo
1 of 54
Download to read offline
Implementation of Digital Filters

                Elena Punskaya
         www-sigproc.eng.cam.ac.uk/~op205


                                  Some material adapted from courses by
                                  Prof. Simon Godsill, Dr. Arnaud Doucet,
                             Dr. Malcolm Macleod and Prof. Peter Rayner




                                                                            1
Filter Implementation

• Discussed: How to design digital filters

          • How do you implement them in
            practice?

• In a double-precision floating-point world – no
  problem

• No constraints simple architecture is possible




                                                    2
Direct form I Implementation


 Any FIR/IIR Filter



                                            If N≠M just put
                                            some coefficients
                                            to zero



Moving
average
                                        Autoregressive
part
                                        part

                                                         3
Constraints


However, one usually has severe
  – speed constraints
  – power constraints



       direct implementation is not a good idea

What can we do?




                                                  4
Addressing speed/power concerns


• Reduce total number of operations

• In particular, multiplications might take longer than
  additions & takes more power
       reduce their number

• Fixed-point arithmetic takes much less area
       cheaper, faster

• The area of a fixed-point parallel multiplier is
  proportional to the product of the coefficient and data
  wordlengths
      reduce data or coefficient wordlengths

                                                            5
Advantages of the Alternative Structures

• For each given transfer function, there are many
  potential realization structures

• Direct I is one of the examples

• Alternative structures are useful since in fixed-point
  implementation
   – may decrease multiplications or overall computation
     load
   – may make the response much less sensitive to
     coefficient imprecision (coefficient quantisation)
   – may add less quantisation noise into the output
     signal
                                                      6
Structures for FIR Filters
• Implementation of FIR filters is far more straightforward
  than IIR filters

• General FIR filter

• Direct form I structure, also called tapped delay line or
  transversal structure




Requirements: M memory locations for storing previous inputs
Complexity:   M multiplications and M additions per output point   7
Linear Phase FIR with symmetric taps

• However, FIR filters are often designed to have linear
  phase, and the symmetry in the filter taps
• One can rewrite



• Symmetric FIR realization



The number of
multiplications reduced
to

    (integer part)
                                                           8
Structure of IIR Filters*

   • We are interested in implementing

   • Direct Form I implementation




                                                   Alternative structures:
                                                      • parallel
                                                      • cascade
                                                      • feedback



*Most of the material discussed of course applies to FIR filters as well 9
Parallel Structure of IIR Filter


• The idea: rewrite         as a sum of filters




• Parallel Structure for K = 2




                                                  10
Example 1: Parallel Structure of IIR Filter

• Consider the following transfer function




• Partial fraction expansion leads to




                              complex poles
                                   one would not implement the filter
                                                             11
Example 1: Parallel Structure of IIR Filter

• Recombine the last two terms




                  parallel structure with 3 branches

• Alternatively




                   parallel structure with 2 branches

                                                        12
Example 2: Parallel Structure of IIR Filter

• Consider the following transfer function




• The denominator admits 3 roots:
                  0.0655 ± 0.5755j and 0.0492
• Recombine the two conjugate roots
                          partial fraction expansion




                                                       13
General Procedure to Obtain a Parallel Structure


  • Decompose H(z) using a partial fraction expansion

  • Combine any pair of complex conjugate poles to obtain
    real-valued elements Hi(z)

  • Optional: Combine such elements further if beneficial


    Remark: Typically we limit ourselves
            to second-order sections


                                                        14
Main Characteristics of the Parallel Structure

•   Simple to implement

•   Sometimes has an advantage over the cascade realisation in terms of
    internally generated quantisation noise, not much though (no
    amplication of errors over various stages)

•   Errors of coefficient quantization of Hi(z) ) affects zeros of H(z)
         longer coefficient wordlengths required to ensure stability

•   Zeros on the unit circle in the overall transfer function are not preserved
        no saving of multipliers can be obtained for filters
        having such zeros



                                                                          15
Cascade Structure of IIR Filter

• The idea: rewrite the transfer function as a product of filters




• Cascade Structure - the output of one filter is the input to
  another one, for K = 2




• If we ignore finite precision effects
        the order of filters in a cascade can be changed
        without altering the transfer function
                                                             16
Back to Example 1: Cascade Structure


• The following transfer function was considered




• Decompose as




                cascade structure with 2 sections

                                                    17
Back to Example 2: Cascade Structure

• The following transfer function was considered




• The denominator admits 3 roots:
•                       0.0655 ± 0.5755j and 0.0492
• Recombine the two conjugate roots and decompose:




               cascade structure with 2 sections
                                                      18
General Procedure to Obtain Cascade Structure


  • Compute the poles and zeros of H(z)

  • Combine any pair of complex conjugate poles/zeros to
    obtain real-valued elements Hi(z)

  • Optional: Combine such elements further if beneficial




    Remark: Typically first and second-order sections are
            used

                                                       19
Sensitivity to coefficient quantisation

• The filter coefficients are quantised
              errors in coefficient value cause errors in pole
              and zero positions and, hence, filter response

• Example: Consider a filter with four poles at z = - 0.9
  (close to unit circle but stable)




                                                          20
Example: Sensitivity to coefficient quantisation

• Direct form filter would have the following denominator
  polynomial in its transfer function:

• Cascade of four first-order sections:



Assume an error of -0.06
     Direct: error -0.06 to the third coefficient, i.e. 4.86 → 4.8
             roots of the resulting polynomial are
             -1.5077, -0.7775 ± 0.4533j, -0.5372 Filter unstable!
     Cascade: error -0.06 to 0.9, i.e. 0.9 → 0.84 Not big deal!
                                     smaller change, only one root affected


Cascade has much lower sensitivity to coefficient quantisation           21
Useful Tips

• Each complex root, with its inevitable conjugate, can
  be implemented by a single second-order section

• Consider a root at rejω and its conjugate re-jω
     the real-coefficient second-order polynomial



• If interested in placing zeros

• If interested in placing poles
                                ,

                       usually assumed
                                                          22
Filters with Zeros on the Unit Circle

• Many filters (FIR and IIR) have zeros on the unit
  circle
• Biquadratic section with rejω and its conjugate re-jω



       no multiplication required - very used in practice

• Implementing a high-order filter with many zeros on
  the unit circle as a cascade of biquadratic sections
  requires fewer total multiplications than a direct form
  implementation

                                                            23
Feedback Structure of IIR Filter

Two filters H1(z) and H2(z) in a feedback structure




       Transfer function of a feedback network



       Output
Transfer function of the filter
                                                      24
Example: Feedback Structure Transfer Function

 More complex structure




Similar technique:
  feedback network


  output


  transfer function
                                              25
Example: Feedback Structure Transfer Function

Quite complex




A far simpler way: to rearrange the system so that it
                   looks like a feedback network
                   in cascade with a parallel one



                                                        26
IIR Direct Forms


• Direct From I –
  considered already




• Direct Form II – standard alternative



                                          27
Direct Form II

Implementing transfer function



Set it as a cascade of two:




                     can be realized with a parallel structure
                     can be realized with a feedback structure
              part   can be realized with a parallel structure


                                                         28
Direct Form II
                                               parallel
Putting it all together
                                                    parallel
                                                           feedback


                                           Direct form II is
                                           preferable to Direct
                                           form I as it requires a
                                           smaller number of
                                           memory locations.


                                           Direct form II is
                                           canonic (the number
                             delays
                                           of delay elements is
                                           exactly N) while
                                           direct form I is not.
                                                               29
Example of Direct Form II realisation

Consider the third-order IIR transfer function




feedback




                                                   30
Finite-Precision Number Representation



•   In a computer, numbers are represented as combinations of a finite
    number of binary digits, or bits that take values of 0 and 1

•   Bits are usually organised into bytes containing 8 bits
                                      or words (16 bits, 32 bits)

•   Two forms are used to represent numbers on a digital computer:
     – fixed-point
     – floating-point




                                                                    31
Fixed-point representation

The magnitude of the number is expressed in powers of 2, with the
binary point separating positive and negative exponents
B bits number representation, value (B,A)                             16-bit word
                                                binary point
                               A bits                          B-A bits




                  sign bit                                least significant bit (LSB)

Number range                                   B bits



Example: a B = 12 bit number with A = 2 bits before the binary point is
in the range -2048/1024 to +2047/1024 inclusive

  All values are quantised to integer multiples of the LSB
                                                                            32
Overflow


• If the result of any calculation in the filter exceeds its
  number range          overflow occurs.

• By default, a value slightly greater than the maximum
  representable positive number becomes a large
  negative number, and vice versa.

• This is called wraparound; the resulting error is huge.

• In IIR filters it can result in very large amplitude
  quot;overflow oscillationsquot;.

                                                               33
Strategies to avoid overflow


Two strategies exist

• scaling - to ensure that values can never (or hardly
  ever) overflow

• saturation arithmetic - to ensure that if overflow
  occurs its effects are greatly reduced




                                                         34
Saturation arithmetic


• First, the results of all calculations are to full precision.
  For example, the addition of 2 (B,A) values results in a (B +1,A +1)
  value; the multiplication of a (B,A) value by a (C,D) value results in
  a (B+C-1,A+D-1) value.


• Then, the higher order bits of the true result are
  processed to detect overflow.

• If overflow occurs, the maximum possible positive
  value or minimum possible negative value is returned



                                                                    35
Saturation arithmetic

Instead of merely masking the true result to a (B,A),
overflow is detected and the maximum possible
positive value or minimum possible negative value is
returned.




Some DSP ICs incorporate saturation arithmetic hardware
                                                        36
Scaling


l1 scaling
Assume that the input to a filter is bounded by

Then its output is bounded by



             where           is its impulse response

              is known as the l1 norm of the filter impulse
               response, easy to compute numerically

                                                         37
l1 scaling

  Bounded input                bounded output



  If the maximum permissible output magnitude is D,
  overflow cannot occur provided we scale the output
  by



  However if we reduce the magnitude of signals,
       the ratio of signal power to quantisation noise
      power becomes smaller
Scaling worsens the noise performance of the filter
                                                         38
Alternative scaling



The input signal which gives rise to the largest
possible output is unlikely to occur in practice, so a
less conservative scaling approach is often used

    • l2 scaling
    • frequency – response scaling


For both saturation arithmetic is still needed as
overflow is still possible

                                                         39
l2 scaling

Choose less conservative scaling based on the scale
factor




          which is the root mean square impulse
          response and this is known as l2 scaling




                                                     40
Frequency-response scaling

Suppose frequency response of the filter is

  a sine wave of frequency ω and peak amplitude C at
  the input
         gives a sine wave of peak amplitude
         at the output

• To prevent overflow of a single sine wave use scaling
  factor




                                                       41
Application of scaling to cascade and parallel
                     realisations
•   At each step, you must compute the impulse response or
    frequency response from the input of the overall filter to the point
    of interest, taking account of all scaling already included up to
    that point.

•   The scaling at section inputs may implemented using simple
    binary shifts (by using the next smaller power of 2), or by
    incorporating it into the FIR coefficient scaling of the preceding
    section.

•   For a parallel realisation, scaling is computed independently for
    each section, but all section outputs must be scaled by the
    same amount, so the overall scaling of each section must be
    made the same.

•   Finally scaling is applied to the final adder(s) which add together
    the outputs of the parallel sections.
                                                                         42
Roundoff (quantisation) noise generation

The output of a multiplier has more bits than its inputs
(for example, a 16 by 16 two's complement multiplier
outputs a 31-bit two's complement value).

    To store the output it has to be (re)quantised
    (low order bits have to be thrown away)

    An error called quantisation noise or roundoff
    noise is added at that point

The noise variance at the multiplier output, assuming
rounding is used, is q2/12, where q is the LSB size
after quantisation. (The same as for quantisation of
analogue signals.)

                                                        43
Roundoff (quantisation) noise assumptions


• It is often assumed that the quantisation noise at
  each multiplier output is white (independent from
  sample to sample).
• It is also assumed that it is independent between
  multipliers, so that the noise variances (quot;powersquot;)
  add.

  (The assumption of whiteness is actually a very poor model if
  the signal is narrowband, but it is reasonable for large amplitude
  wideband signals. The assumption of independence can also be
  a poor model.)


                                                                  44
Roundoff (quantisation) noise in FIR and IIR filters

As a result:

• The quantisation noise from the multipliers of an FIR
  filter therefore adds white noise directly to the output
  signal

• In IIR filters, the white quantisation noise from the
  feedback multipliers filter is fed to the input of the
  filter, so the resulting noise spectrum at the filter
  output is coloured.
  Its spectrum is proportional to the square of the filter's
  frequency response magnitude.


                                                          45
Roundoff (quantisation) noise


Roundooff noise level is affected by data
wordlengths, filter response, filter structure and
(to an extent) by section ordering in cascade
structures.
Further details are in specialist texts.


Remark. DSP ICs, and some VLSI filters, provide an
accumulator store of longer wordlength than the data
wordlength (e.g. a 32-bit accumulator for a 16-bit DSP).
The multiplier outputs are accumulated at the longer
wordlength, and then the accumulator output is only
quantised once. This approach significantly reduces
roundoff noise.


                                                           46
Limit cycles
Zero-input limit cycles are self-sustaining oscillations, caused by the
rounding of the results of computations.

Example: consider the second-order filter


     • This is a stable second order IIR filter with complex poles at j0.9.

     • If rounding to the nearest LSB is used at the output of the
       multiplier, then when y (n - 2) = ±1; ± 2; ± 3; or ± 4LSB, the
       computation 0.9y (n-2) will give the result ± 1; ± 2; ± 3; or ± 4LSB
       respectively.

     • Hence a limit cycle of the form y (n) = 4; 0;-4; 0; 4; 0;-4; 0 (or the
       same pattern with 3,2, or 1) may occur.

     • Effectively, the reason is that the rounding non-linearity has
       increased the feedback gain to 1, turning the system into an
       oscillator.
                                                                           47
Limit cycles

•   Limit cycles are troublesome in some applications, especially
    with short data wordlengths, where the limit cycle may be
    relatively large. With the longer wordlengths of DSP ICs, it is
    often possible to ignore limit cycles.

Solutions:

•   One solution is to quantise toward 0 (truncation) instead of
    rounding the multiplier output. But the extra roundoff noise due
    to truncation may require the data wordlength to be increased
    by 1 or 2 bits.

•   Another solution is to use certain forms of digital filters (such as
    Wave filters) which do not support limit cycles. However these
    are computationally more expensive.
                                                                       48
Deadbands

•   Consider a simple digital low-pass filter such as is commonly
    used for smoothing:

•   The transfer function is

• This has unit gain at zero frequency (z = 1), and a pole at 1 – α.
• The time constant is approximately 1/α samples, for α<<1
• If                                   then the multiplier output will
  round to zero, and the filter output will therefore remain
  constant.
• Hence a constant output known as the deadband, arises. It can
  be up to (0.5/α)LSB
• If, for example, (1/α)=10000 to give a time constant of 10000
  samples, then the size of the LSB of the internal arithmetic must
  be 5000 times smaller than the permissible size of the
  deadband. This implies 13 extra bits (since 212 = 4096).           49
Coefficient quantisation


• In a previous section we showed that the cascade
  form is much less sensitive to coefficient quantisation
  than a high order direct form filter.
  (This is also true of the parallel form.)

• If the filter has zeros on the unit circle and is
  implemented using a second-order section, the
  cascade realisation has the advantage that these
  zeros stay on the unit circle (because a coefficient b2
  = 1 is unaffected by quantisation), although their
  frequencies may be altered.

                                                        50
Coefficient quantisation

•   A traditional way to study the relative merits of different filter
    structures was to analyse the sensitivity of the frequency
    response magnitude to random (often Gaussian) perturbations
    of the coefficients, and to use this as a measure of the likely
    sensitivity of a given structure to coefficient quantisation.

•   Various structures, including Lattice and Wave filters, give even
    lower sensitivity to coefficient quantisation than the cascade
    realisation.

•   However, they generally require a substantially increased
    number of multipliers. For a specific filter design, you should
    compute the actual filter response with quantised coefficients,
    and then modify it if necessary.


                                                                         51
Coefficient quantisation


•   In dedicated hardware, such as custom ICs, where there are
    significant benefits from reducing coefficient wordlengths,
    discrete optimisation can be used to search for the finite-
    wordlength filter with the closest response to a given
    specification.

•   Some discrete optimisation algorithms, including Genetic
    Algorithms and Simulated Annealing, are available in software
    libraries




                                                                    52
53
Thank you!



             54

More Related Content

What's hot

DSP_FOEHU - Lec 11 - IIR Filter Design
DSP_FOEHU - Lec 11 - IIR Filter DesignDSP_FOEHU - Lec 11 - IIR Filter Design
DSP_FOEHU - Lec 11 - IIR Filter DesignAmr E. Mohamed
 
Finite word length of IIR filters Limit cycles due to product round-off error...
Finite word length of IIR filters Limit cycles due to product round-off error...Finite word length of IIR filters Limit cycles due to product round-off error...
Finite word length of IIR filters Limit cycles due to product round-off error...Praveen Kumar
 
MIMO-OFDM for 4G network
MIMO-OFDM for 4G networkMIMO-OFDM for 4G network
MIMO-OFDM for 4G networknimay1
 
EC8562 DSP Viva Questions
EC8562 DSP Viva Questions EC8562 DSP Viva Questions
EC8562 DSP Viva Questions ssuser2797e4
 
Butterworth filter design
Butterworth filter designButterworth filter design
Butterworth filter designSushant Shankar
 
SAMPLING & RECONSTRUCTION OF DISCRETE TIME SIGNAL
SAMPLING & RECONSTRUCTION  OF DISCRETE TIME SIGNALSAMPLING & RECONSTRUCTION  OF DISCRETE TIME SIGNAL
SAMPLING & RECONSTRUCTION OF DISCRETE TIME SIGNALkaran sati
 
DSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time Signals
DSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time SignalsDSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time Signals
DSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time SignalsAmr E. Mohamed
 
Ssb generation method
Ssb generation methodSsb generation method
Ssb generation methodjahirpatel
 
Power delay profile,delay spread and doppler spread
Power delay profile,delay spread and doppler spreadPower delay profile,delay spread and doppler spread
Power delay profile,delay spread and doppler spreadManish Srivastava
 
7.Active Filters using Opamp
7.Active Filters using Opamp7.Active Filters using Opamp
7.Active Filters using OpampINDIAN NAVY
 
Discrete Fourier Transform
Discrete Fourier TransformDiscrete Fourier Transform
Discrete Fourier TransformAbhishek Choksi
 
5. convolution and correlation of discrete time signals
5. convolution and correlation of discrete time signals 5. convolution and correlation of discrete time signals
5. convolution and correlation of discrete time signals MdFazleRabbi18
 
Frequency Division Multiple Access (FDMA)
Frequency Division Multiple Access (FDMA)Frequency Division Multiple Access (FDMA)
Frequency Division Multiple Access (FDMA)Miles Kevin Galario
 

What's hot (20)

Information theory
Information theoryInformation theory
Information theory
 
Butterworth filter
Butterworth filterButterworth filter
Butterworth filter
 
Design of Filters PPT
Design of Filters PPTDesign of Filters PPT
Design of Filters PPT
 
DSP_FOEHU - Lec 11 - IIR Filter Design
DSP_FOEHU - Lec 11 - IIR Filter DesignDSP_FOEHU - Lec 11 - IIR Filter Design
DSP_FOEHU - Lec 11 - IIR Filter Design
 
Discrete Fourier Series | Discrete Fourier Transform | Discrete Time Fourier ...
Discrete Fourier Series | Discrete Fourier Transform | Discrete Time Fourier ...Discrete Fourier Series | Discrete Fourier Transform | Discrete Time Fourier ...
Discrete Fourier Series | Discrete Fourier Transform | Discrete Time Fourier ...
 
Finite word length of IIR filters Limit cycles due to product round-off error...
Finite word length of IIR filters Limit cycles due to product round-off error...Finite word length of IIR filters Limit cycles due to product round-off error...
Finite word length of IIR filters Limit cycles due to product round-off error...
 
Adaptive filter
Adaptive filterAdaptive filter
Adaptive filter
 
MIMO-OFDM for 4G network
MIMO-OFDM for 4G networkMIMO-OFDM for 4G network
MIMO-OFDM for 4G network
 
Equalization
EqualizationEqualization
Equalization
 
EC8562 DSP Viva Questions
EC8562 DSP Viva Questions EC8562 DSP Viva Questions
EC8562 DSP Viva Questions
 
Ac2 09-anti windup
Ac2 09-anti windupAc2 09-anti windup
Ac2 09-anti windup
 
Butterworth filter design
Butterworth filter designButterworth filter design
Butterworth filter design
 
SAMPLING & RECONSTRUCTION OF DISCRETE TIME SIGNAL
SAMPLING & RECONSTRUCTION  OF DISCRETE TIME SIGNALSAMPLING & RECONSTRUCTION  OF DISCRETE TIME SIGNAL
SAMPLING & RECONSTRUCTION OF DISCRETE TIME SIGNAL
 
DSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time Signals
DSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time SignalsDSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time Signals
DSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time Signals
 
Ssb generation method
Ssb generation methodSsb generation method
Ssb generation method
 
Power delay profile,delay spread and doppler spread
Power delay profile,delay spread and doppler spreadPower delay profile,delay spread and doppler spread
Power delay profile,delay spread and doppler spread
 
7.Active Filters using Opamp
7.Active Filters using Opamp7.Active Filters using Opamp
7.Active Filters using Opamp
 
Discrete Fourier Transform
Discrete Fourier TransformDiscrete Fourier Transform
Discrete Fourier Transform
 
5. convolution and correlation of discrete time signals
5. convolution and correlation of discrete time signals 5. convolution and correlation of discrete time signals
5. convolution and correlation of discrete time signals
 
Frequency Division Multiple Access (FDMA)
Frequency Division Multiple Access (FDMA)Frequency Division Multiple Access (FDMA)
Frequency Division Multiple Access (FDMA)
 

Similar to Implementation of Digital Filters

MIPI DevCon 2020 | Interoperability Challenges and Solutions for MIPI I3C
MIPI DevCon 2020 | Interoperability Challenges and Solutions for MIPI I3CMIPI DevCon 2020 | Interoperability Challenges and Solutions for MIPI I3C
MIPI DevCon 2020 | Interoperability Challenges and Solutions for MIPI I3CMIPI Alliance
 
Lecture 17 me 176 (4th) 9 - design via root locus
Lecture 17   me 176 (4th)   9 - design via root locusLecture 17   me 176 (4th)   9 - design via root locus
Lecture 17 me 176 (4th) 9 - design via root locusLeonides De Ocampo
 
Nabeelpbm1998@gmail.com
Nabeelpbm1998@gmail.comNabeelpbm1998@gmail.com
Nabeelpbm1998@gmail.comnabeelavulan
 
ConvNeXt: A ConvNet for the 2020s explained
ConvNeXt: A ConvNet for the 2020s explainedConvNeXt: A ConvNet for the 2020s explained
ConvNeXt: A ConvNet for the 2020s explainedSushant Gautam
 
ProxGen: Adaptive Proximal Gradient Methods for Structured Neural Networks (N...
ProxGen: Adaptive Proximal Gradient Methods for Structured Neural Networks (N...ProxGen: Adaptive Proximal Gradient Methods for Structured Neural Networks (N...
ProxGen: Adaptive Proximal Gradient Methods for Structured Neural Networks (N...Jihun Yun
 
ICIAM 2019: Reproducible Linear Algebra from Application to Architecture
ICIAM 2019: Reproducible Linear Algebra from Application to ArchitectureICIAM 2019: Reproducible Linear Algebra from Application to Architecture
ICIAM 2019: Reproducible Linear Algebra from Application to ArchitectureJason Riedy
 
SPICE LEVEL I/LEVEL II/LEVEL III AND BSIM MODELS
SPICE LEVEL I/LEVEL II/LEVEL III AND BSIM MODELSSPICE LEVEL I/LEVEL II/LEVEL III AND BSIM MODELS
SPICE LEVEL I/LEVEL II/LEVEL III AND BSIM MODELSPraveen Kumar
 
Nonlinear Aeroelastic Steady Simulation Applied to Highly Flexible Blades for...
Nonlinear Aeroelastic Steady Simulation Applied to Highly Flexible Blades for...Nonlinear Aeroelastic Steady Simulation Applied to Highly Flexible Blades for...
Nonlinear Aeroelastic Steady Simulation Applied to Highly Flexible Blades for...Fausto Gill Di Vincenzo
 
High-Dimensional Bayesian Optimization with Constraints: Application to Powde...
High-Dimensional Bayesian Optimization with Constraints: Application to Powde...High-Dimensional Bayesian Optimization with Constraints: Application to Powde...
High-Dimensional Bayesian Optimization with Constraints: Application to Powde...Shoki Miyagawa
 
Distributed Checkpointing on an Enterprise Desktop Grid
Distributed Checkpointing on an Enterprise Desktop GridDistributed Checkpointing on an Enterprise Desktop Grid
Distributed Checkpointing on an Enterprise Desktop Gridbrent.wilson
 
Kamaelia - Networking Using Generators
Kamaelia - Networking Using GeneratorsKamaelia - Networking Using Generators
Kamaelia - Networking Using Generatorskamaelian
 
Reproducible Linear Algebra from Application to Architecture
Reproducible Linear Algebra from Application to ArchitectureReproducible Linear Algebra from Application to Architecture
Reproducible Linear Algebra from Application to ArchitectureJason Riedy
 
Kamaelia-ACCU-20050422
Kamaelia-ACCU-20050422Kamaelia-ACCU-20050422
Kamaelia-ACCU-20050422journeyer
 

Similar to Implementation of Digital Filters (20)

Costs2
Costs2Costs2
Costs2
 
IIR Filters
IIR FiltersIIR Filters
IIR Filters
 
MIPI DevCon 2020 | Interoperability Challenges and Solutions for MIPI I3C
MIPI DevCon 2020 | Interoperability Challenges and Solutions for MIPI I3CMIPI DevCon 2020 | Interoperability Challenges and Solutions for MIPI I3C
MIPI DevCon 2020 | Interoperability Challenges and Solutions for MIPI I3C
 
Lecture 17 me 176 (4th) 9 - design via root locus
Lecture 17   me 176 (4th)   9 - design via root locusLecture 17   me 176 (4th)   9 - design via root locus
Lecture 17 me 176 (4th) 9 - design via root locus
 
Nabeelpbm1998@gmail.com
Nabeelpbm1998@gmail.comNabeelpbm1998@gmail.com
Nabeelpbm1998@gmail.com
 
ConvNeXt: A ConvNet for the 2020s explained
ConvNeXt: A ConvNet for the 2020s explainedConvNeXt: A ConvNet for the 2020s explained
ConvNeXt: A ConvNet for the 2020s explained
 
MobileNet V3
MobileNet V3MobileNet V3
MobileNet V3
 
Km3617971803
Km3617971803Km3617971803
Km3617971803
 
ProxGen: Adaptive Proximal Gradient Methods for Structured Neural Networks (N...
ProxGen: Adaptive Proximal Gradient Methods for Structured Neural Networks (N...ProxGen: Adaptive Proximal Gradient Methods for Structured Neural Networks (N...
ProxGen: Adaptive Proximal Gradient Methods for Structured Neural Networks (N...
 
ICIAM 2019: Reproducible Linear Algebra from Application to Architecture
ICIAM 2019: Reproducible Linear Algebra from Application to ArchitectureICIAM 2019: Reproducible Linear Algebra from Application to Architecture
ICIAM 2019: Reproducible Linear Algebra from Application to Architecture
 
SPICE LEVEL I/LEVEL II/LEVEL III AND BSIM MODELS
SPICE LEVEL I/LEVEL II/LEVEL III AND BSIM MODELSSPICE LEVEL I/LEVEL II/LEVEL III AND BSIM MODELS
SPICE LEVEL I/LEVEL II/LEVEL III AND BSIM MODELS
 
P1111143901
P1111143901P1111143901
P1111143901
 
Nonlinear Aeroelastic Steady Simulation Applied to Highly Flexible Blades for...
Nonlinear Aeroelastic Steady Simulation Applied to Highly Flexible Blades for...Nonlinear Aeroelastic Steady Simulation Applied to Highly Flexible Blades for...
Nonlinear Aeroelastic Steady Simulation Applied to Highly Flexible Blades for...
 
High-Dimensional Bayesian Optimization with Constraints: Application to Powde...
High-Dimensional Bayesian Optimization with Constraints: Application to Powde...High-Dimensional Bayesian Optimization with Constraints: Application to Powde...
High-Dimensional Bayesian Optimization with Constraints: Application to Powde...
 
Distributed Checkpointing on an Enterprise Desktop Grid
Distributed Checkpointing on an Enterprise Desktop GridDistributed Checkpointing on an Enterprise Desktop Grid
Distributed Checkpointing on an Enterprise Desktop Grid
 
Kamaelia - Networking Using Generators
Kamaelia - Networking Using GeneratorsKamaelia - Networking Using Generators
Kamaelia - Networking Using Generators
 
Reproducible Linear Algebra from Application to Architecture
Reproducible Linear Algebra from Application to ArchitectureReproducible Linear Algebra from Application to Architecture
Reproducible Linear Algebra from Application to Architecture
 
Kamaelia-ACCU-20050422
Kamaelia-ACCU-20050422Kamaelia-ACCU-20050422
Kamaelia-ACCU-20050422
 
Generator
GeneratorGenerator
Generator
 
SUBJECT
SUBJECTSUBJECT
SUBJECT
 

More from op205

3 f6 security
3 f6 security3 f6 security
3 f6 securityop205
 
3 f6 11_softdevmethodologies
3 f6 11_softdevmethodologies3 f6 11_softdevmethodologies
3 f6 11_softdevmethodologiesop205
 
3 f6 8_databases
3 f6 8_databases3 f6 8_databases
3 f6 8_databasesop205
 
3 f6 10_testing
3 f6 10_testing3 f6 10_testing
3 f6 10_testingop205
 
3 f6 9a_corba
3 f6 9a_corba3 f6 9a_corba
3 f6 9a_corbaop205
 
3 f6 9a_corba
3 f6 9a_corba3 f6 9a_corba
3 f6 9a_corbaop205
 
3 f6 9_distributed_systems
3 f6 9_distributed_systems3 f6 9_distributed_systems
3 f6 9_distributed_systemsop205
 
Lecture 7 Software Engineering and Design User Interface Design
Lecture 7 Software Engineering and Design User Interface Design Lecture 7 Software Engineering and Design User Interface Design
Lecture 7 Software Engineering and Design User Interface Design op205
 
Lecture 6 Software Engineering and Design Good Design
Lecture 6 Software Engineering and Design Good Design Lecture 6 Software Engineering and Design Good Design
Lecture 6 Software Engineering and Design Good Design op205
 
Lecture 5 Software Engineering and Design Design Patterns
Lecture 5 Software Engineering and Design Design PatternsLecture 5 Software Engineering and Design Design Patterns
Lecture 5 Software Engineering and Design Design Patternsop205
 
Lecture 4 Software Engineering and Design Brief Introduction to Programming
Lecture 4 Software Engineering and Design Brief Introduction to ProgrammingLecture 4 Software Engineering and Design Brief Introduction to Programming
Lecture 4 Software Engineering and Design Brief Introduction to Programmingop205
 
Lecture 3 Software Engineering and Design Introduction to UML
Lecture 3 Software Engineering and Design Introduction to UMLLecture 3 Software Engineering and Design Introduction to UML
Lecture 3 Software Engineering and Design Introduction to UMLop205
 
Lecture 2 Software Engineering and Design Object Oriented Programming, Design...
Lecture 2 Software Engineering and Design Object Oriented Programming, Design...Lecture 2 Software Engineering and Design Object Oriented Programming, Design...
Lecture 2 Software Engineering and Design Object Oriented Programming, Design...op205
 
Lecture 1 Software Engineering and Design Introduction
Lecture 1 Software Engineering and Design Introduction Lecture 1 Software Engineering and Design Introduction
Lecture 1 Software Engineering and Design Introduction op205
 
More on DFT
More on DFTMore on DFT
More on DFTop205
 
Digital Signal Processing Summary
Digital Signal Processing SummaryDigital Signal Processing Summary
Digital Signal Processing Summaryop205
 
Basics of Analogue Filters
Basics of Analogue FiltersBasics of Analogue Filters
Basics of Analogue Filtersop205
 
Design of FIR filters
Design of FIR filtersDesign of FIR filters
Design of FIR filtersop205
 
Introduction to Digital Signal Processing
Introduction to Digital Signal ProcessingIntroduction to Digital Signal Processing
Introduction to Digital Signal Processingop205
 
Fast Fourier Transform
Fast Fourier TransformFast Fourier Transform
Fast Fourier Transformop205
 

More from op205 (20)

3 f6 security
3 f6 security3 f6 security
3 f6 security
 
3 f6 11_softdevmethodologies
3 f6 11_softdevmethodologies3 f6 11_softdevmethodologies
3 f6 11_softdevmethodologies
 
3 f6 8_databases
3 f6 8_databases3 f6 8_databases
3 f6 8_databases
 
3 f6 10_testing
3 f6 10_testing3 f6 10_testing
3 f6 10_testing
 
3 f6 9a_corba
3 f6 9a_corba3 f6 9a_corba
3 f6 9a_corba
 
3 f6 9a_corba
3 f6 9a_corba3 f6 9a_corba
3 f6 9a_corba
 
3 f6 9_distributed_systems
3 f6 9_distributed_systems3 f6 9_distributed_systems
3 f6 9_distributed_systems
 
Lecture 7 Software Engineering and Design User Interface Design
Lecture 7 Software Engineering and Design User Interface Design Lecture 7 Software Engineering and Design User Interface Design
Lecture 7 Software Engineering and Design User Interface Design
 
Lecture 6 Software Engineering and Design Good Design
Lecture 6 Software Engineering and Design Good Design Lecture 6 Software Engineering and Design Good Design
Lecture 6 Software Engineering and Design Good Design
 
Lecture 5 Software Engineering and Design Design Patterns
Lecture 5 Software Engineering and Design Design PatternsLecture 5 Software Engineering and Design Design Patterns
Lecture 5 Software Engineering and Design Design Patterns
 
Lecture 4 Software Engineering and Design Brief Introduction to Programming
Lecture 4 Software Engineering and Design Brief Introduction to ProgrammingLecture 4 Software Engineering and Design Brief Introduction to Programming
Lecture 4 Software Engineering and Design Brief Introduction to Programming
 
Lecture 3 Software Engineering and Design Introduction to UML
Lecture 3 Software Engineering and Design Introduction to UMLLecture 3 Software Engineering and Design Introduction to UML
Lecture 3 Software Engineering and Design Introduction to UML
 
Lecture 2 Software Engineering and Design Object Oriented Programming, Design...
Lecture 2 Software Engineering and Design Object Oriented Programming, Design...Lecture 2 Software Engineering and Design Object Oriented Programming, Design...
Lecture 2 Software Engineering and Design Object Oriented Programming, Design...
 
Lecture 1 Software Engineering and Design Introduction
Lecture 1 Software Engineering and Design Introduction Lecture 1 Software Engineering and Design Introduction
Lecture 1 Software Engineering and Design Introduction
 
More on DFT
More on DFTMore on DFT
More on DFT
 
Digital Signal Processing Summary
Digital Signal Processing SummaryDigital Signal Processing Summary
Digital Signal Processing Summary
 
Basics of Analogue Filters
Basics of Analogue FiltersBasics of Analogue Filters
Basics of Analogue Filters
 
Design of FIR filters
Design of FIR filtersDesign of FIR filters
Design of FIR filters
 
Introduction to Digital Signal Processing
Introduction to Digital Signal ProcessingIntroduction to Digital Signal Processing
Introduction to Digital Signal Processing
 
Fast Fourier Transform
Fast Fourier TransformFast Fourier Transform
Fast Fourier Transform
 

Recently uploaded

Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 

Recently uploaded (20)

OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 

Implementation of Digital Filters

  • 1. Implementation of Digital Filters Elena Punskaya www-sigproc.eng.cam.ac.uk/~op205 Some material adapted from courses by Prof. Simon Godsill, Dr. Arnaud Doucet, Dr. Malcolm Macleod and Prof. Peter Rayner 1
  • 2. Filter Implementation • Discussed: How to design digital filters • How do you implement them in practice? • In a double-precision floating-point world – no problem • No constraints simple architecture is possible 2
  • 3. Direct form I Implementation Any FIR/IIR Filter If N≠M just put some coefficients to zero Moving average Autoregressive part part 3
  • 4. Constraints However, one usually has severe – speed constraints – power constraints direct implementation is not a good idea What can we do? 4
  • 5. Addressing speed/power concerns • Reduce total number of operations • In particular, multiplications might take longer than additions & takes more power reduce their number • Fixed-point arithmetic takes much less area cheaper, faster • The area of a fixed-point parallel multiplier is proportional to the product of the coefficient and data wordlengths reduce data or coefficient wordlengths 5
  • 6. Advantages of the Alternative Structures • For each given transfer function, there are many potential realization structures • Direct I is one of the examples • Alternative structures are useful since in fixed-point implementation – may decrease multiplications or overall computation load – may make the response much less sensitive to coefficient imprecision (coefficient quantisation) – may add less quantisation noise into the output signal 6
  • 7. Structures for FIR Filters • Implementation of FIR filters is far more straightforward than IIR filters • General FIR filter • Direct form I structure, also called tapped delay line or transversal structure Requirements: M memory locations for storing previous inputs Complexity: M multiplications and M additions per output point 7
  • 8. Linear Phase FIR with symmetric taps • However, FIR filters are often designed to have linear phase, and the symmetry in the filter taps • One can rewrite • Symmetric FIR realization The number of multiplications reduced to (integer part) 8
  • 9. Structure of IIR Filters* • We are interested in implementing • Direct Form I implementation Alternative structures: • parallel • cascade • feedback *Most of the material discussed of course applies to FIR filters as well 9
  • 10. Parallel Structure of IIR Filter • The idea: rewrite as a sum of filters • Parallel Structure for K = 2 10
  • 11. Example 1: Parallel Structure of IIR Filter • Consider the following transfer function • Partial fraction expansion leads to complex poles one would not implement the filter 11
  • 12. Example 1: Parallel Structure of IIR Filter • Recombine the last two terms parallel structure with 3 branches • Alternatively parallel structure with 2 branches 12
  • 13. Example 2: Parallel Structure of IIR Filter • Consider the following transfer function • The denominator admits 3 roots: 0.0655 ± 0.5755j and 0.0492 • Recombine the two conjugate roots partial fraction expansion 13
  • 14. General Procedure to Obtain a Parallel Structure • Decompose H(z) using a partial fraction expansion • Combine any pair of complex conjugate poles to obtain real-valued elements Hi(z) • Optional: Combine such elements further if beneficial Remark: Typically we limit ourselves to second-order sections 14
  • 15. Main Characteristics of the Parallel Structure • Simple to implement • Sometimes has an advantage over the cascade realisation in terms of internally generated quantisation noise, not much though (no amplication of errors over various stages) • Errors of coefficient quantization of Hi(z) ) affects zeros of H(z) longer coefficient wordlengths required to ensure stability • Zeros on the unit circle in the overall transfer function are not preserved no saving of multipliers can be obtained for filters having such zeros 15
  • 16. Cascade Structure of IIR Filter • The idea: rewrite the transfer function as a product of filters • Cascade Structure - the output of one filter is the input to another one, for K = 2 • If we ignore finite precision effects the order of filters in a cascade can be changed without altering the transfer function 16
  • 17. Back to Example 1: Cascade Structure • The following transfer function was considered • Decompose as cascade structure with 2 sections 17
  • 18. Back to Example 2: Cascade Structure • The following transfer function was considered • The denominator admits 3 roots: • 0.0655 ± 0.5755j and 0.0492 • Recombine the two conjugate roots and decompose: cascade structure with 2 sections 18
  • 19. General Procedure to Obtain Cascade Structure • Compute the poles and zeros of H(z) • Combine any pair of complex conjugate poles/zeros to obtain real-valued elements Hi(z) • Optional: Combine such elements further if beneficial Remark: Typically first and second-order sections are used 19
  • 20. Sensitivity to coefficient quantisation • The filter coefficients are quantised errors in coefficient value cause errors in pole and zero positions and, hence, filter response • Example: Consider a filter with four poles at z = - 0.9 (close to unit circle but stable) 20
  • 21. Example: Sensitivity to coefficient quantisation • Direct form filter would have the following denominator polynomial in its transfer function: • Cascade of four first-order sections: Assume an error of -0.06 Direct: error -0.06 to the third coefficient, i.e. 4.86 → 4.8 roots of the resulting polynomial are -1.5077, -0.7775 ± 0.4533j, -0.5372 Filter unstable! Cascade: error -0.06 to 0.9, i.e. 0.9 → 0.84 Not big deal! smaller change, only one root affected Cascade has much lower sensitivity to coefficient quantisation 21
  • 22. Useful Tips • Each complex root, with its inevitable conjugate, can be implemented by a single second-order section • Consider a root at rejω and its conjugate re-jω the real-coefficient second-order polynomial • If interested in placing zeros • If interested in placing poles , usually assumed 22
  • 23. Filters with Zeros on the Unit Circle • Many filters (FIR and IIR) have zeros on the unit circle • Biquadratic section with rejω and its conjugate re-jω no multiplication required - very used in practice • Implementing a high-order filter with many zeros on the unit circle as a cascade of biquadratic sections requires fewer total multiplications than a direct form implementation 23
  • 24. Feedback Structure of IIR Filter Two filters H1(z) and H2(z) in a feedback structure Transfer function of a feedback network Output Transfer function of the filter 24
  • 25. Example: Feedback Structure Transfer Function More complex structure Similar technique: feedback network output transfer function 25
  • 26. Example: Feedback Structure Transfer Function Quite complex A far simpler way: to rearrange the system so that it looks like a feedback network in cascade with a parallel one 26
  • 27. IIR Direct Forms • Direct From I – considered already • Direct Form II – standard alternative 27
  • 28. Direct Form II Implementing transfer function Set it as a cascade of two: can be realized with a parallel structure can be realized with a feedback structure part can be realized with a parallel structure 28
  • 29. Direct Form II parallel Putting it all together parallel feedback Direct form II is preferable to Direct form I as it requires a smaller number of memory locations. Direct form II is canonic (the number delays of delay elements is exactly N) while direct form I is not. 29
  • 30. Example of Direct Form II realisation Consider the third-order IIR transfer function feedback 30
  • 31. Finite-Precision Number Representation • In a computer, numbers are represented as combinations of a finite number of binary digits, or bits that take values of 0 and 1 • Bits are usually organised into bytes containing 8 bits or words (16 bits, 32 bits) • Two forms are used to represent numbers on a digital computer: – fixed-point – floating-point 31
  • 32. Fixed-point representation The magnitude of the number is expressed in powers of 2, with the binary point separating positive and negative exponents B bits number representation, value (B,A) 16-bit word binary point A bits B-A bits sign bit least significant bit (LSB) Number range B bits Example: a B = 12 bit number with A = 2 bits before the binary point is in the range -2048/1024 to +2047/1024 inclusive All values are quantised to integer multiples of the LSB 32
  • 33. Overflow • If the result of any calculation in the filter exceeds its number range overflow occurs. • By default, a value slightly greater than the maximum representable positive number becomes a large negative number, and vice versa. • This is called wraparound; the resulting error is huge. • In IIR filters it can result in very large amplitude quot;overflow oscillationsquot;. 33
  • 34. Strategies to avoid overflow Two strategies exist • scaling - to ensure that values can never (or hardly ever) overflow • saturation arithmetic - to ensure that if overflow occurs its effects are greatly reduced 34
  • 35. Saturation arithmetic • First, the results of all calculations are to full precision. For example, the addition of 2 (B,A) values results in a (B +1,A +1) value; the multiplication of a (B,A) value by a (C,D) value results in a (B+C-1,A+D-1) value. • Then, the higher order bits of the true result are processed to detect overflow. • If overflow occurs, the maximum possible positive value or minimum possible negative value is returned 35
  • 36. Saturation arithmetic Instead of merely masking the true result to a (B,A), overflow is detected and the maximum possible positive value or minimum possible negative value is returned. Some DSP ICs incorporate saturation arithmetic hardware 36
  • 37. Scaling l1 scaling Assume that the input to a filter is bounded by Then its output is bounded by where is its impulse response is known as the l1 norm of the filter impulse response, easy to compute numerically 37
  • 38. l1 scaling Bounded input bounded output If the maximum permissible output magnitude is D, overflow cannot occur provided we scale the output by However if we reduce the magnitude of signals, the ratio of signal power to quantisation noise power becomes smaller Scaling worsens the noise performance of the filter 38
  • 39. Alternative scaling The input signal which gives rise to the largest possible output is unlikely to occur in practice, so a less conservative scaling approach is often used • l2 scaling • frequency – response scaling For both saturation arithmetic is still needed as overflow is still possible 39
  • 40. l2 scaling Choose less conservative scaling based on the scale factor which is the root mean square impulse response and this is known as l2 scaling 40
  • 41. Frequency-response scaling Suppose frequency response of the filter is a sine wave of frequency ω and peak amplitude C at the input gives a sine wave of peak amplitude at the output • To prevent overflow of a single sine wave use scaling factor 41
  • 42. Application of scaling to cascade and parallel realisations • At each step, you must compute the impulse response or frequency response from the input of the overall filter to the point of interest, taking account of all scaling already included up to that point. • The scaling at section inputs may implemented using simple binary shifts (by using the next smaller power of 2), or by incorporating it into the FIR coefficient scaling of the preceding section. • For a parallel realisation, scaling is computed independently for each section, but all section outputs must be scaled by the same amount, so the overall scaling of each section must be made the same. • Finally scaling is applied to the final adder(s) which add together the outputs of the parallel sections. 42
  • 43. Roundoff (quantisation) noise generation The output of a multiplier has more bits than its inputs (for example, a 16 by 16 two's complement multiplier outputs a 31-bit two's complement value). To store the output it has to be (re)quantised (low order bits have to be thrown away) An error called quantisation noise or roundoff noise is added at that point The noise variance at the multiplier output, assuming rounding is used, is q2/12, where q is the LSB size after quantisation. (The same as for quantisation of analogue signals.) 43
  • 44. Roundoff (quantisation) noise assumptions • It is often assumed that the quantisation noise at each multiplier output is white (independent from sample to sample). • It is also assumed that it is independent between multipliers, so that the noise variances (quot;powersquot;) add. (The assumption of whiteness is actually a very poor model if the signal is narrowband, but it is reasonable for large amplitude wideband signals. The assumption of independence can also be a poor model.) 44
  • 45. Roundoff (quantisation) noise in FIR and IIR filters As a result: • The quantisation noise from the multipliers of an FIR filter therefore adds white noise directly to the output signal • In IIR filters, the white quantisation noise from the feedback multipliers filter is fed to the input of the filter, so the resulting noise spectrum at the filter output is coloured. Its spectrum is proportional to the square of the filter's frequency response magnitude. 45
  • 46. Roundoff (quantisation) noise Roundooff noise level is affected by data wordlengths, filter response, filter structure and (to an extent) by section ordering in cascade structures. Further details are in specialist texts. Remark. DSP ICs, and some VLSI filters, provide an accumulator store of longer wordlength than the data wordlength (e.g. a 32-bit accumulator for a 16-bit DSP). The multiplier outputs are accumulated at the longer wordlength, and then the accumulator output is only quantised once. This approach significantly reduces roundoff noise. 46
  • 47. Limit cycles Zero-input limit cycles are self-sustaining oscillations, caused by the rounding of the results of computations. Example: consider the second-order filter • This is a stable second order IIR filter with complex poles at j0.9. • If rounding to the nearest LSB is used at the output of the multiplier, then when y (n - 2) = ±1; ± 2; ± 3; or ± 4LSB, the computation 0.9y (n-2) will give the result ± 1; ± 2; ± 3; or ± 4LSB respectively. • Hence a limit cycle of the form y (n) = 4; 0;-4; 0; 4; 0;-4; 0 (or the same pattern with 3,2, or 1) may occur. • Effectively, the reason is that the rounding non-linearity has increased the feedback gain to 1, turning the system into an oscillator. 47
  • 48. Limit cycles • Limit cycles are troublesome in some applications, especially with short data wordlengths, where the limit cycle may be relatively large. With the longer wordlengths of DSP ICs, it is often possible to ignore limit cycles. Solutions: • One solution is to quantise toward 0 (truncation) instead of rounding the multiplier output. But the extra roundoff noise due to truncation may require the data wordlength to be increased by 1 or 2 bits. • Another solution is to use certain forms of digital filters (such as Wave filters) which do not support limit cycles. However these are computationally more expensive. 48
  • 49. Deadbands • Consider a simple digital low-pass filter such as is commonly used for smoothing: • The transfer function is • This has unit gain at zero frequency (z = 1), and a pole at 1 – α. • The time constant is approximately 1/α samples, for α<<1 • If then the multiplier output will round to zero, and the filter output will therefore remain constant. • Hence a constant output known as the deadband, arises. It can be up to (0.5/α)LSB • If, for example, (1/α)=10000 to give a time constant of 10000 samples, then the size of the LSB of the internal arithmetic must be 5000 times smaller than the permissible size of the deadband. This implies 13 extra bits (since 212 = 4096). 49
  • 50. Coefficient quantisation • In a previous section we showed that the cascade form is much less sensitive to coefficient quantisation than a high order direct form filter. (This is also true of the parallel form.) • If the filter has zeros on the unit circle and is implemented using a second-order section, the cascade realisation has the advantage that these zeros stay on the unit circle (because a coefficient b2 = 1 is unaffected by quantisation), although their frequencies may be altered. 50
  • 51. Coefficient quantisation • A traditional way to study the relative merits of different filter structures was to analyse the sensitivity of the frequency response magnitude to random (often Gaussian) perturbations of the coefficients, and to use this as a measure of the likely sensitivity of a given structure to coefficient quantisation. • Various structures, including Lattice and Wave filters, give even lower sensitivity to coefficient quantisation than the cascade realisation. • However, they generally require a substantially increased number of multipliers. For a specific filter design, you should compute the actual filter response with quantised coefficients, and then modify it if necessary. 51
  • 52. Coefficient quantisation • In dedicated hardware, such as custom ICs, where there are significant benefits from reducing coefficient wordlengths, discrete optimisation can be used to search for the finite- wordlength filter with the closest response to a given specification. • Some discrete optimisation algorithms, including Genetic Algorithms and Simulated Annealing, are available in software libraries 52
  • 53. 53