Skip to content

Building higher order filters with Biquads

The standard filters in CamillaDSP are not of a specific type, like Butterworth. Instead they are generic, with an adjustable q-value. To make the normal filters, one or several generic filters have to be used together.

Bessel

Making a Bessel filter with a set of Biquads requires creating several Biquads, each with a unique Q and cut-off frequency.

Multiplication factor for frequency:

OrderBiquad 1Biquad 2Biquad 3Biquad 4
11.0*
21.27201964951
31.32267579991*1.44761713315
41.603357516221.43017155999
51.50231627145*1.755377776641.5563471223
61.90470761231.689168267621.60391912877
71.68436817927*2.049490900271.822417478861.71635604487
82.188726230531.953195759021.83209260121.77846591177

The asterisk (*) indicates that this is a 1st order filter.

Q values:

OrderBiquad 1Biquad 2Biquad 3Biquad 4
1(1st order)
20.57735026919
3(1st order)0.691046625825
40.8055382818420.521934581669
5(1st order)0.9164773739480.563535620851
61.023313953830.6111945468780.510317824749
7(1st order)1.126257541980.6608213892970.5323556979
81.225669425410.7108520744420.5596091647960.505991069397

Example Bessel filter

Let’s make a 5th order Lowpass at 1 kHz. Loking at the tables we see that we need three filters. The first should be a 1st order while the second and third are 2nd order.

  • First filter, type LowpassFO:
    • freq = 1kHz * 1.50231627145 = 1502Hz
    • (no q-value)
  • Second filter, type Lowpass:
    • freq = 1kHz * 1.75537777664 = 1755Hz
    • q = 0.916477373948
  • Third filter, type Lowpass:
    • freq = 1kHz * 1.5563471223 = 1556Hz
    • q = 0.563535620851

Butterworth and Linkwitz-Riley

For an Nth order Butterworth you will have N/2 biquad sections if N is even, and ((N+1)/2 if N is odd. For odd filters one of the Biquads will be a first order filter. Each filter will have the same resonant frequency f0 and the second order filters will have Q according to this formula:

Q = 1/( 2*sin((pi/N)*(n + 1/2)) )

where 0 <= n < (N-1)/2

Table for q-values

Butterworth and Linkwitz-Riley filtes can easily be built with Biquads. The following table lists the most common ones. High- and lowpass use the same parameters.

TypeOrderBiquad 1Biquad 2Biquad 3Biquad 4
Butterworth20.71
40.541.31
80.510.60.92.56
Linkwitz-Riley20.5
40.710.71
80.541.310.541.31

Note that a 4th order LR iconsists of two 2nd order Butterworth filters, and that an 8th order LR consists of two 4:th order Butterworth filters.