A **second order active **bandpass** filter** by cascading two staggered tuned first order bandpass filters is shown, built and tested.

## What are active filters and the difference with passive filters?

**Passive filters** are built with resistors, capacitors and self-inductances. They are generally used to separate frequencies from the rest of the spectrum, they have no power gain and are relatively difficult to tune.

**Active filters** are built with **resistors, capacitors and operational amplifiers**. They are used for the same purpose as liabilities. Due to the amplifiers, they do have gain in power and are relatively easy to tune.

Therefore, this active filter uses a dual operational amplifier (one for each cascaded stage). The component AD823 was employed.

## Tschebychev Filter

For this example a Tschebychev** 1 dB **bandpass filter is designed. Tschebyshev filter generates a constant ripple in the passband. Also, the attenuation is higher in comparison with a standard Butterworth filter.

The filter requirements (or characteristics) are given:

The coefficients for the Tschebychev filter taken from the table:

The normalized bandwidth is calculated as:

## Topology

The **topology** to build a second order is by cascading two second-order **multi-feedback passband**. The schematic can be seen in the next figure.

The **transfer function** of a two cascaded second-order bandpass filter is the following:

## Calculations

Defining the **quality** **factor** as:

The previous transfer function after operating results into:

Where:

- 𝛼 = Coefficient of comparison.
- Qi= Quality factor.

As the terms P^2 and P from the previous equations must be equal, two new are obtained. This is a non-linear system of two equations and two incognitas are:

The two incognitas, 𝛼 and Q, are in *matlab* redefined as follows:

Two equations have to be solved, therefore a *matlab* script is used to solve the equations by numeric methods. With the following code, the previous functions are declared.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | function F = root2d(x) omega=0.1336; a1=1.3022; b1=1.5515; //x(1) = alpha //x(2) = Q_i F(1) = x(1)/x(2) +1/(x(2)*x(1))-a1*omega/b1; F(2) = 1/(x(1)^2)+1/(x(2)^2) + x(1)^2-2-omega^2/b1; end |

To solve the equations the system is solved with the *fsolve*. In the command window:

1 2 3 4 5 6 7 | options = optimoptions('fsolve','Display','none','PlotFcn',@optimplotfirstorderopt); fun = @root2d; x0 = [1,1]; //Set the initial point for iteration x =fsolve(fun,x0, options) |

The solution after the iteration is:

- alpha = 1.0468 ;
- Qi= 17.8545

### Components calculation

The fourth order filter is built with two second order in series. The obtained value to build a second order multi-feedback topology:

For computing the values of the resistors the equations from the book OpAmps for Everyone was used. The code in *Matlab* has been written:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | %Obtaining alpha for filter calculation fmin = 700; fmax = 8000; f0 = sqrt(fmin * fmax); wn = (fmax - fmin)/f0; %Resonant frequencies fr_min = fmin * wn; fr_max = fmax * wn; %Tschebychev second order coefficients b1 = 1.3827; a1 = 1.3614 alpha = 1.0468; %Previously calculated Qi = 17.85; %Previously calculated %For the resistor calculation the system from the book %OpAmps for everyone is used %The mean frequencies fm_l = f0/alpha; fm_h = f0*alpha; %The Capacitor value is chosen. Only two options available C = 1e-9; %Farads %The following middle values are needed for the fomulas: gain = 20; Ho = 10^(gain/20); Hr = -(Qi * wn * sqrt(Ho/b1)); %Resistors calculation from the formulas R2 = Qi/(pi * fm_l * C); R1 = -R2/(Hr * 2); R3 = -(Hr * R1)/((2 * Qi^2) + Hr); R5 = Qi / (pi * fm_h * C); R4 = -R5/(Hr * 2); R6 = -(Hr * R4)/((2 * Qi^2) + Hr); |

After the previous code run, results in the following:

1 2 3 4 5 6 | R1=6.1951e+04 R2=7.9480e+05 R3=629.9637 R4=7.2532e+05 R5=5.6535e+04 R6=574.8945 |

These values are rounded and used for the simulation in OrCad on the following part:

- R1 = 65KΩ
- R2 = 820KΩ
- R3 = 630KΩ
- R4 = 59.8KΩ
- R5 = 750KΩ
- R6 = 575KΩ

## Simulation of the 4^{rth} order bandpass filter

Before the circuit is physically built, the filter was simulated in OrCad.

### OrCad Capture CIS with exact values

After obtaining the results from the Matlab, the schematic was implemented in the PSpice.

The output of the simulation of this filter could be seen in the following plot. It could be noticed that this is a bandwidth filter, which starts at 7.040 and reaches 7.9323 KHz.

Bode diagram of the filter

### Transient Analysis

In the transient analysis the AC value is set to zero and the frequency was set to 7.5KHz.

The waveforms are given from the following picture:

The red line represents the output after the filtering and the green line represents the input.

The input is a sine of 1 volt of amplitude. The gain should be 10, but in Tschebychev filters the passband is not exactly flat, therefore the gain can go higher. In this case, the 11 volts are reached.

In this case, the Vinput was set to perform a step response. Below the behaviour could be checked:

### Monte Carlo analysis

A Monte Calor simulation is performed to view the **statistical changes** of the filter depending on the **components variations**. The used resistors have a deviation of 5% and the capacitors 1% of the nominal value.

Bandwidth gain:

From the previous Figure, the mean value can be read 22.2513 dB

Center Frequency:

From the previous figure, the main lobe can be read at 7389.57Hz

## Real Circuit Implementation in a Protoboard

The circuit was built in a **prototype-board and tested in the lab**. In order to obtain a better results avoiding interferences and noise, the circuit was constructed **using short and straight** cables and an as intuitive as possible layout. In the following picture:

In the real prototype circuit, the **value of the resistors** were **not the same as the calculation and simulations,** because **only the standards values are available**. For keep the circuit simple and not add to much noise with the cables and connection on the prototype board, **any parallel or series resistor are used** to get a less noisy resistor value.

In the case of willing a high accurate filter, a fabrication of a small PCB is highly recommended, to perform a low noise and better result.

The **new nominal values** of the resistors vary slightly from the calculations:

R1 = 61.8KΩ

R2 = 816KΩ

R3 = 616KΩ

R4 = 62KΩ

R5 = 749KΩ

R6 = 555KΩ

As in the lab we had only resistors E96 available. The filter behaviour changes a bit its corner values, in comparison with the calculated one in the previous part. If an accurate filter is desired, some parallel and series resistor should.

## Measurements

Once the filter is measured several measurements were taken sweeping the frequency. All this data were tabulated and shown in the appendix. The gain is calculated with the oscilloscope, using the measurement “Ratio -cyc(12)”, as it can be seen on the next figure:

On the previous Figure, it can be seen a frequency inside the passband, 7.98KHz. On the following figure a frequency out of the pas band range is shown. On the stop band the signal is attenuated, therefore the gain must be negative, for this case -23dB. The phase is also calculated with the same method.

Sweeping the frequency in a range from 1 KHz to 10 KHz a Bode plot was plotted using Matlab. The graphs can be seen in the next figures.

The obtained gain of the circuit was lower than the expected. 20 dB were expected but only around 11 dB was measured on the real circuit. This is due cable attenuations and operational amplifier non-ideal characteristics. The cut-off frequency is inside the expected range.

The phase diagram can be seen on the previous Figure, that it goes from 150°to -150°. At the center of the passband the phase between the input and output is zero (as expected). The point at 4.5KHz is an errata, and should be on the positive side.

### Simulation of the real nominal resistor values

The simulation was repeated, but now taking the real values used on the circuit built. The results are slightly different from the previous one.

From the Figure, it can be seen that the lower cut-off frequency is 6.9KHz and the upper cut-off frequency is 7.9KHz. This is the graph that we take from the previous values. As it could be noticed the cursors have been moved 3dB lower from the 20dB amplitude. The maximum value is slighter more than 20dB.

# Instrument device list

Instrument | Device and model number |

Wave generator | 33120A |

Oscilloscope | Agylent DSX0-3014A |

## References

[1] | “Input impedance of an amplifier,” [Online]. Available: http://www.electronics-tutorials.ws/amplifier/input-impedance-of-an-amplifier.html. |

[2] | R. Machini, Ops Amps for every one, Texas Instruments. |

[3] | Analog Devices, “Multiple Feedback Band-Pass design example,” [Online]. Available: http://www.analog.com/media/en/training-seminars/tutorials/MT-218.pdf. |

[4] | D. R. Okorn, Analog Circuits, FH Joanneum, 2012. |

### Data measured from the filter

The raw data measured from the filter prototype:

Frequency [Hz] | Magnitude [dB] | Phase[º] |

1300 | -29 | |

2000 | -29 | |

3000 | -27 | |

4000 | -22 | |

4500 | -18 | 100 |

5000 | -14 | 160 |

5200 | -12,5 | 150 |

5400 | -10,6 | 140 |

5500 | -9,5 | 140 |

5600 | -8,5 | 140 |

5800 | -6,2 | 140 |

6000 | -3,7 | 130 |

6200 | -1,1 | 120 |

6400 | 1,6 | 110 |

6500 | 3,1 | 106 |

6600 | 4,5 | 97 |

6800 | 7,1 | 77 |

7000 | 9,2 | 50 |

7200 | 10,4 | 23 |

7400 | 10,9 | -6 |

7600 | 10,4 | -36 |

7800 | 9 | -66 |

8000 | 6,7 | -89 |

8200 | 4,3 | -104 |

8400 | 1,9 | -115 |

8600 | -0,3 | 126 |

8800 | -2,3 | -130 |

9000 | -4,1 | -140 |

9200 | -5,8 | -140 |

9400 | -7,2 | -140 |

9600 | -8,6 | -150 |

9800 | -9,8 | -150 |

10000 | -11 | -150 |

10200 | -12 | -160 |

10400 | -13 | -150 |

10600 | -14 | -150 |

10800 | -14,6 | -150 |

trusty

Hеllo, I read yoᥙr bloɡ like every week. Your writing style is awesome, keep up the good work!