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.
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:
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:
Defining the quality factor as:
The previous transfer function after operating results into:
- 𝛼 = 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.
function F = root2d(x)
//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;
To solve the equations the system is solved with the fsolve. In the command window:
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
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:
%Obtaining alpha for filter calculation
fmin = 700;
fmax = 8000;
f0 = sqrt(fmin * fmax);
wn = (fmax - fmin)/f0;
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:
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 4rth 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
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.
From the previous Figure, the mean value can be read 22.2513 dB
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.
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|
|||“Input impedance of an amplifier,” [Online]. Available: http://www.electronics-tutorials.ws/amplifier/input-impedance-of-an-amplifier.html.|
|||R. Machini, Ops Amps for every one, Texas Instruments.|
|||Analog Devices, “Multiple Feedback Band-Pass design example,” [Online]. Available: http://www.analog.com/media/en/training-seminars/tutorials/MT-218.pdf.|
|||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[º]|