ArticleslgStudy

engineering

Digital biquad filter

Digital biquad filter is a engineering topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Digital biquad filter rather than just read about it. In short: In signal processing, a digital biquad filter is a second order recursive linear filter, containing two poles and two zeros, which implements the analog biquad filter topology in the digital domain. Biquad is an abbreviation of biquadratic, which refers to the fact that in the Z domain, its transfer function is the ratio of two quadratic functions: H(z)=b0+b1z−1+b2z−2a0+a1z−1+a2z−2 The coefficients are often normali…

Digital biquad filter — main illustration
Digital biquad filter — illustration

Key takeaways

  • Digital biquad filter belongs to engineering; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Digital biquad filter to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Digital biquad filter from memory before moving on to harder problems.

Reference excerpt

In signal processing, a digital biquad filter is a second order recursive linear filter, containing two poles and two zeros, which implements the analog biquad filter topology in the digital domain. Biquad is an abbreviation of biquadratic, which refers to the fact that in the Z domain, its transfer function is the ratio of two quadratic functions:

H(z)=b0+b1z−1+b2z−2a0+a1z−1+a2z−2 The coefficients are often normalized such that a0 = 1:

H(z)=b0+b1z−1+b2z−21+a1z−1+a2z−2 High-order infinite impulse response filters can be highly sensitive to quantization of their coefficients, and can easily become unstable. This is much less of a problem with first and second-order filters; therefore, higher-order filters are typically implemented as serially-cascaded biquad sections (and a first-order filter if necessary). The two poles of the biquad filter must be inside the unit circle for it to be stable. In general, this is true for all discrete filters i.e. all poles must be inside the unit circle in the Z-domain for the filter to be stable.

Implementation

Direct form 1 The most straightforward implementation is the direct form 1, which has the following difference equation:

y[n]=1a0(b0x[n]+b1x[n−1]+b2x[n−2]−a1y[n−1]−a2y[n−2]) or, if normalized:

y[n]=b0x[n]+b1x[n−1]+b2x[n−2]−a1y[n−1]−a2y[n−2] Here the b0, b1 and b2 coefficients determine zeros, and a1, a2 determine the position of the poles. Flow graph of a biquad filter in direct form 1:

When these sections are cascaded for filters of order greater than 2, the efficiency of implementation can be improved by noticing that the z−1 delay of a section output is repeated in the next section input. Two storage delay components may be eliminated between sections.

Direct form 2 The direct form 2 implements the same normalized transfer function as direct form 1, but in two parts:

y[n]=b0w[n]+b1w[n−1]+b2w[n−2], and using the difference equation:

w[n]=x[n]−a1w[n−1]−a2w[n−2]. Flow graph of biquad filter in direct form 2:

The direct form 2 implementation only needs N delay units, where N is the order of the filter – potentially half as much as direct form 1. The derivation from the normalized direct form 1 is as follows: y[n]=b0x[n]+b1x[n−1]+b2x[n−2]−a1y[n−1]−a2y[n−2] Assume the substitution: y[n]=b0w[n]+b1w[n−1]+b2w[n−2] Which results in: y[n]=b0x[n]+b1x[n−1]+b2x[n−2]−a1(b0w[n−1]+b1w[n−2]+b2w[n−3])−a2(b0w[n−2]+b1w[n−3]+b2w[n−4]) Isolating the b0, b1 and b2 coefficients: y[n]=b0(x[n]−a1w[n−1]−a2w[n−2])+b1(x[n−1]−a1w[n−2]−a2w[n−3])+b2(x[n−2]−a1w[n−3]−a2w[n−4]) Which assuming w[n]=x[n]−a1w[n−1]−a2w[n−2] yields the above result: y[n]=b0w[n]+b1w[n−1]+b2w[n−2], The disadvantage is that direct form 2 increases the possibility of arithmetic overflow for filters of high Q or resonance. It has been shown that as Q increases, the round-off noise of both direct form topologies increases without bounds. This is because, conceptually, the signal is first passed through an all-pole filter (which normally boosts gain at the resonant frequencies) before the result of that is saturated, then passed through an all-zero filter (which often attenuates much of what the all-pole half amplifies). The direct form 2 implementation is called the canonical form, because it uses the minimal amount of delays, adders and multipliers, yielding in the same transfer function as the direct form 1 implementation.

Transposed direct forms

Each of the two direct forms may be transposed by reversing the flow graph without altering the transfer function. Branch points are changed to summers and summers are changed to branch points. These provide modified implementations that accomplish the same transfer function which can be mathematically significant in a real-world implementation where precision may be lost in state storage. The difference equations for transposed direct form 2 are:

y[n]=b0x[n]+s1[n−1], where

s1[n]=s2[n−1]+b1x[n]−a1y[n] and

s2[n]=b2x[n]−a2y[n].

Transposed direct form 1 The direct form 1

is transposed into

Transposed direct form 2 The direct form 2

is transposed into

Conversion from analog to digital designs An analog biquad filter can be converted into a digital design through the bilinear transform. For a filter designed in the analog s-domain, its z-domain representation can be derived from the following set of substitutions:

The coefficients for a digital biquad filter can then be derived from the analog filter design through bilinear transforms as: H(z)=b0+b1z−1+b2z−2a0+a1z−1+a2z−2

Bilinear transform examples Using the bilinear transform, coefficients for a 2nd order low pass filter digital biquad filter are: b0=1−cos(w0)2 b1=1−cos(w0) b2=1−cos(w0)2 a0=1+α a1=−2cos(w0) a2=1−α α=sin(w0)2Q=sin(w0)(sinh(ln(2)2∗BW∗w0sin(w0))

Quantizing noise When a sample of n bits is multiplied by a coefficient of m bits, the product has n+m bits. These products are typically accumulated in a DSP register, the addition of five products may need 3 overflow bits; this register is often large enough to hold n+m+3 bits. The z−1 is implemented by storing a value for one sample time; this storage register is usually n bits, the accumulator register is rounded to fit n bits, and this introduced quantizing noise. In the direct form 1 arrangement, there is a single quantizing/rounding function Q(z):

In the direct form 2 arrangement, there also is a quantizing/rounding function for an intermediate value. In a cascade, the value may not need rounding between stages, but the final output may need rounding.

Fixed point DSP usually prefers the non transposed forms and has an accumulator with a large number of bits, and is rounded when stored in main memory. Floating point DSP usually prefers the transposed form, each multiplication and potentially each addition are rounded; the additions are higher precision result, when both operands have similar magnitude.

See also Biquad filter Digital filter

References

External links Cookbook formulae for audio EQ biquad filter coefficients WikiBook on digital signal processing Matched Second Order Digital Filters

Illustrations

Digital biquad filter illustration
Digital biquad filter illustration
Digital biquad filter illustration
Digital biquad filter illustration
Digital biquad filter illustration

Worked examples

Example 1 — a first encounter with Digital biquad filter

Start with the simplest possible case. Write down what Digital biquad filter claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In engineering, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Digital biquad filter before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Digital biquad filter ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Digital biquad filter

In research
Digital biquad filter appears in engineering research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Digital biquad filter in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Digital biquad filter is common in secondary-school and first-year university syllabi. It links to neighbouring topics Audio engineering, Filter theory, Linear filters, so understanding it makes those chapters shorter.
In everyday life
Look for Digital biquad filter outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Digital biquad filter” →

How to study Digital biquad filter in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Digital biquad filter means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Digital biquad filter out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Digital biquad filter in simple terms?

In signal processing, a digital biquad filter is a second order recursive linear filter, containing two poles and two zeros, which implements the analog biquad filter topology in the digital domain. Biquad is an abbreviation of biquadratic, which refers to the fact that in the Z domain, its transfe…

Why does Digital biquad filter matter?

Because it connects several engineering ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Digital biquad filter?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Digital biquad filter.

Tags

  • Audio engineering
  • Filter theory
  • Linear filters

Keep exploring