Advanced Low-Pass Filter

Description of the Advanced Low-Pass Filter component in Schematic Editor, which implements a discrete low-pass filter, with the possibility to choose the filter order, cutoff frequency, as well as its type (Basic, Butterworth, Chebyshev1, Chebyshev2, Elliptic) and parameters.

Component Icon

Figure 1. Advanced Low-Pass Filter icons

Description

The Low-Pass Filter component implements a low-pass filter on the input signal. The cutoff frequency fc can be defined through the Component Properties menu or connected to the Cutoff frequency input of the component.

All the filters are designed to have a maximum magnitude of 1 (0 dB) in the passband.

Figure 2. Specification of bands and frequencies

Passband is the range of frequencies over which the magnitude response does not fall below ( -A p ). For a low-pass filter it is the range between 0 and ω p . ω p is called the passband frequency.

Stopband is the range of frequencies over which the magnitude response does not rise above ( -A s ). For a low-pass filter it is the range between 0 and ω s . ω s is called the stopband frequency.

Transition band is the range of frequencies between the passband and the stopband. Roll-off is the term used for the decrease of the magnitude after the passband i.e. it represents the transition band. When comparing roll-offs between filters, it is assumed that the comparison is done for filters with same number of poles.

Cutoff frequency is by definition the frequency in which the magnitude plot has has an attenuation of 3 dB. However, this component defines the cutoff frequency for the Chebyshev1 and Elliptic filters as the frequency in which the passband regime is over and after which the magnitude infinitely drops (the official term for this frequency is the passband frequency). Also, the Basic filter represents a filter whose transfer function has all poles within a defined cut-off frequency. Therefore, cutoff frequency is in the -3 dB spot only for the first order of the Basic filter.

Passband attenuation is the width of the passband ripple for the Chebyshev1 and Elliptic filters ( A p ). Stopband attenuation is the minimum attenuation in the stopband for the Chebyshev2 and Elliptic filters ( A s ). Basic and Butterworth filters do not have ripples, so they do not have these properties.

In order to implement discrete filters, a Bilinear discretization is applied to all filters.
Figure 3. 7th Order Basic filter
Figure 3 shows the 7th Order Basic filter with 100 Hz cutoff frequency obtained from the component. It also shows the cutoff frequency obtained from the component, as well as the real 3 dB cutoff frequency. The link between those two frequencies is ω 3 dB = ω c 10 3 10 N - 1 ,

where ω c = 2 π f c is the radian cutoff frequency obtained from the component, and N is the filter order.

The transfer function of the basic filter is:

Y s U s = ω c N ( s + ω c ) N

Figure 4. 4th Order Butterworth filter
Figure 4 shows the 4th Order Butterworth filter with 100 Hz cutoff frequency obtained from the component. It also shows cutoff frequency obtained from the component, which is also the 3 dB cutoff frequency. Butterworth filter has a maximally flat passband, but a slower roll-off compared to Chebyshev1, Chebyshev2 and Elliptic filters.

The transfer function of the Butterworth filter is:

Y s U s = k = 1 N ω c ( s - s p k ) ,

where s k are the poles obtained from:

s p k = ω c e j(2k+N-1)π 2N ,

for k = 1 , 2 , ... N , N is the filter order.

Figure 5. 3rd Order Chebyshev1 filter
Figure 5 shows the 3rd Order Chebyshev1 filter with a 5 dB passband ripple ( A p ) and with 100 Hz cutoff frequency obtained from the component. As mentioned earlier, that cutoff frequency obtained from the component is actually the passband frequency of the filter. Chebyshev1 filter has a ripple in the passband, but also a steeper roll-off than Basic, Butterworth and Chebyshev2 filters. The link between the cutoff frequency obtained from the component and the 3 dB cutoff frequency is:

ω 3 dB = ω c cos ( arccosh ( 1 ε p ) N ) , for A p < 3 d B

where ω c = 2 π f c is the radian cutoff frequency obtained from the component, and N is the filter order. ε p is the passband ripple factor obtained from:

ε p = 10 Ap 10 - 1 .

The transfer function of the Chebyshev1 filter is:

Y s U s = 1 2 N-1 ɛ k = 1 N ω c ( s - s p k ) ,

where s p k are the poles obtained from:

s p k = ω c ( - sinh ( arsinh ( 1 ε p ) N ) sin ( θ k ) + j cosh ( arsinh ( 1 ε p ) N ) cos ( θ k ) ) , θ k = π 2 2 k - 1 N ,

for k = 1 , 2 , ... N

Figure 6. 4th Order Chebyshev2 filter
Figure 6 shows the 4th Order Chebyshev2 Filter with a 40 dB attenuation in the stopband ( A s ) and with 100 Hz cutoff frequency obtained from the component, which is also the 3 dB cutoff frequency. Chebyshev2 filter has a ripple in the stopband, but also a steeper roll-off than Basic and Butterworth filters. The link between cutoff and stopband frequency is

ω c = ω s / cos ( arccosh ( ( ε s 10 0.3 - 1 ) -1 ) N ) ,

where ω c = 2 π f c is the radian cutoff frequency obtained from the component, ω s is the stopband frequency, and N is the filter order. ε s is the stopband ripple factor obtained from

ε s = 1/ 10 As 10 - 1 ,

The transfer function of the Chebyshev2 filter is:

Y s U s = K k = 1 N ( s - s z k ) ( s - s p k ) ,

s p k are the poles obtained from:

s p k = - ω s D k ( sinh ( arsinh ( 1 ε p ) N ) sin ( θ k ) + j cosh ( arcosh ( 1 ε p ) N ) cos ( θ k ) ) ,

where θ k = π 2 2 k - 1 n , D k = sinh 2 ( arsinh ( 1 ε s ) N ) sin 2 ( θ k ) + cosh 2 ( arsinh ( 1 ε s ) N ) cos 2 ( θ k ) , for k = 1 , 2 , ... N

s z k are the zeros obtained from:

s z k = ± j ω s cos ( [ 2 k - 1 ] π / ( 2 N ) ) , for k = 1 , 2 , ... [ N / 2 ]

If the order of the filter is odd, the last zero (zero of the highest frequency) is infinity.

K is the gain of the transfer function, equal to ε s if the order is even, or ε s ω s N if the order is odd.

Figure 7. 4th Order Elliptic filter
Figure 7 shows the 4th Order Elliptic Filter with a 3 dB passband ripple ( A p ), a 40 dB attenuation in the stopband ( A s ) and with 500Hz cutoff frequency obtained from the component. Elliptic filter has ripples both in the passband and in the stopband, but it also has the steepest roll-off.

The magnitude response of the Elliptic filter is:

| H | = 1 1 + ε p 2 R n 2

R n ω , ω s , ω c , ε s , ε p = sn [ b sn -1 ( ω / ω c , ω c / ω s ) + q X 1 , ε s ε p ]

where sn x , τ is the Jacobian elliptic sine of x with modulus τ , where sn -1 x , τ is the inverse Jacobian elliptic sine of x with modulus τ , q is zero if the order is odd and unity if order is even, X 1 is the complete elliptic integral of first kind of τ 1 = ε s ε p , ε s and ε p are ripple parameters as same as for the Chebyshev1 and Chebyshev2 filters, and b can be obtained from:

b = N X 1 X 2 ,

where N is the filter order and X 2 is the complete elliptic integral of first kind of τ 2 = ω p / ω s .

Ports

  • In (in)
    • The signal that the filtering should be applied to.
      • Supported types: real.
      • Vector support: no.
  • Out (out)
    • Filtered input signal.
      • Supported types: real.
      • Vector support: no.
  • Cutoff frequency (fc_input)
    • Port enabled when the frequency source of the component is external (except for the Elliptic filter).
      • Supported types: real.
      • Vector support: no.

Properties

  • Filter type
    • Choose the type of the low-pass filter.
  • Filter order
    • Type in the order of the low-pass filter.
  • Cutoff frequency source
    • Choose the source of the cutoff frequency for the low-pass filter. Option "Internal" displays Cutoff frequency property. Option "External" creates a new input port on the component (except for the Elliptic filter).
  • Cutoff frequency
    • Type in the cutoff frequency of the low-pass filter. Property enabled when the frequency source of the component is internal.
  • Passband attenuation
    • Type in the passband attenuation of the low-pass filter. It is the attenuation at cut-off frequency for both Chebyshev1 and Elliptic filters.
  • Stopband attenuation
    • Type in the stopband attenuation of the low-pass filter. It is the attenuation at stopband frequency for both Chebyshev2 and Elliptic filters.
  • Execution rate
    • Type in the desired signal processing execution rate. This value must be compatible with other signal processing components of the same circuit: the value must be a multiple of the fastest execution rate in the circuit. There can be up to four different execution rates, but they must all be multiple of the basic simulation timestep. To specify the execution rate, you can use either decimal (e.g. 0.001) or exponential values (e.g. 1e-3) in seconds. Alternatively, you can type in ‘inherit’ in which case the component will be assigned execution rate based on the execution rate of the components it is receiving input from.
  • Bode plot
    • Button which displays the magnitude Bode plot of the created filter. If any property is defined through the namespace, or the cutoff frequency is defined externally, a Generic Bode plot with valid parameters will be shown (properties which cannot be evaluated will be substituted with unity or other generic values). Also, a warning will occur in the output console.