Saturday, August 14, 2010

SALLEN-KEY BESSEL FILTER 4TH ORDER






The transfer function for filters constructed from cascading a 2nd order filter can be calculated with the product of the 2nd oder polynomials from the equation

A(s) = Ao /(( 1 + a1 * s + b1 * s^2)( 1 + a2 * s + b2 * s^2) ... )

We are going to cascade two 2nd order filters that are not identical to obtain a 4th order filter as shown in Fig. 1. The result produces the Bessel filter characteristics overall as long as we use the Bessel coefficients in the calculations of R and C values. The Ac response curve below the schematic shows the results of simulating the circuit on SPICE with the ouput levels and the phase shifts vs. frequency of the first stage and the second stages combined. The circuit is designed to be a Bessel type filter so that the phase shifts are linear and pulse response is good. The circuit values shown produce a 1KHZ low pass filter. We calculate the values below.

First note that since we are not cascading two identical filters, we must use a1, a2, b1, and b2 coefficents. a1 and b1 are used for the first stage, and a2 and b2 are used for the second stage to conform to the theory.

We choose the coefficents in accordance with known coefficients for the major filter types as tabulated here:

4th order Bessel coefficients:

a1 1.3397
b1 0.4889
a2 0.7743
b2 0.3890

Q is calculated from:

Q1 = ( b1 )^0.5 / a1 for the first stage = 0.52

q2 = ( b2 )^0.5 / a2 for the second stage = 0.805

using the Bessel coefficients.

In Fig. 1 we will rename the first resistor on the left as R1 and the next resistor R2. The lower capacitor we will call C1 and the capacitor in the feedback loop as C2 for both stage calulations for reasons of simplicity.

Next we need to assign a value for C1 so that we can calculate a value for C2 and the resistor values R1, R2 The value of C2 must be set so that the R values are positive real numbers. First,

C1 = 0.1ufd (defined as a starting point). Then

C2 > = 4* C1 * b1 / a1^2 = 0.1333ufd

We will set C2 to 0.15ufd for the first stage and we will need a hihger value of 0.33ufd for C2 in the second stage as an available standard value. Now we can calculate the resistor values from the solutions to the quadratic equation for the first stage

R1, R2 =( a1 * C2 -/+ (a1^2 * C2^2 - 4 * b1 * C1 * C2)^0.5) / (4 * Pi * Fo * C1 *C2)

The solutions are

R1, R2 = 508, 1.624K ohms (find the closest standard values.)

In the theory it is correct to use R1 as the value resulting from the calculation with the negative of the square root of the above equation, and R2 as the result of the calculations from the positive square root. It is a good idea to always verify your design with a simulation and testing a prototype circuit.

Similar calculations are done for the second stage to get resistor values of R1 = 331 ohms and 901 ohms.

The 2nd order stages have now been completely designed and in Fig. 1 we show two stages cascaded to achieve a 4th order filter.

The AC response at the output of each stage is shown if the figure below the schematic above. The advantage of the linear phase shift is that the group delay is constant and the pulse response is excellent for the Bessel filter. Simulation with a pulse input shows that the pulse response at the first stage output is faster than that of the 2nd output stage. So the trade off of the faster cut-off of the 4th order vs. the 2nd order filter is a slower pulse response of the higher order filter.

Note that you cannot apply the same identical stage for both stages as the results will not be accurate and it does not conform to the theory of the correct transfer function.

Wednesday, August 4, 2010

60HZ TWIN-T NOTCH FILTER




A Twin-T RC filter can be buffered with one or two op-amps to provided a usable notch filter for audio circuits or other applications.

Fig. 1 shows the AC response of the circuit of Fig. 2, a Twin-T filter with LTC6244 rail-to-rail 5MHZ op-amps. We used the following equations to calculate the values in the circuit elements R1 - R3 and C1 - C3. R4 and R5 could be set as shown or a 50K potentiometer could be used to adjust the Q of the circuit. We set the values shown to give us a high Q notch with approximately 60db of attenuation at 60HZ.

The following calculations were used:

Fo = 1 / ( 2 * Pi * R1 * C1 )

For this design we will set Fo to 60HZ and calculate the basic RC time constants of the filter using the normal value relationships for this type of filter

R1 = R2 = 2 * R3

C1 = C2 = C3 / 2

R1*C1 = 1 / ( 2 * Pi * Fo ) = 0.0026526

Let C1 = 0.1 * 10^-6

Then,

R1 = 0.0026526 / ( 0.1 * 10^-6 ) = 26526

R2 = 26526 C2 = 0.1 * 10^-6

C3 = 0.2 * 10^-6 R3 = 13263

In regard to setting values for R4 and R5, we found that better Q and response was obtained by setting R4 less than R5. Fig. 1 shows the results of simulation of the circuit of Fig. 2.

Note that the source has to be able to drive the input impedance of the filter which is approximately 160 ohms at 20KHZ. If a higher input impedance is needed you must reduce the value of C1 and C2 which mainly control the input impedance of the filter. Then you will have to calculate new values for R1 - R3.

Friday, July 30, 2010

2ND ORDER NARROW BAND FILTER WITH GAIN



A high Q narrow band filter with gain is shown in Fig. 1. This filter can be used to filter steady state signals but it is not suitable for audio use or with signals that have frequent transient signals. Its high Q and gain will cause it to ring or be unstable with such transients. The high Q, high gain circuit is with R5 not populated. The circuit can be used with audio signals if Q and gain is reduced with the " Q spoiler" resistor R5 set to approximately 12.5K maximum. With R5 in place the Q is approximately 1.3 and the gain is approximately 22.5db at the pass frequency, in the case shown, of 2KHZ. Without R5 populated, the Q is set to 10 and the gain is approximately 40db or 100 at the pass frequency. A 0.05 volt peak 2KHZ input signal will produce a 5 volt peak output signal.

The design shown has been simulated for AC response and transient response using the LTC6244 rail-to-rail 5MHZ op-amp. Fig.1 is the actual simulation schematic.

To design the circuit, we must first decide on the pass band center frequency Fo.
Next set the Q value. Then set a practical value for C1 and C2, e.g., 0.01UFD. Next we will calculate a value called Beta which is the ratio of the center frequency in radians to the Q value. Set Fo to 2KHZ and set Q to 10.

Beta = 2 * Pi * Fo / Q

Beta = 1256.6 with an Fo of 2KHZ and a Q of 10.

In the case of the circuit shown we can now calculate the value of R4 as

R4 = 2 / ( Beta * C ) = 159.16K with C=C1=C2= 0.01UFD

The closest standard value would then be selected from the standard resistance decade table.

Also we can compute the bandwidth of the filter measured at the -3db points as

BW = Beta / ( 2 * Pi ) = Fo / Q = 200. The bandwidth for this circuit is 10% of the center frequency with Q set at 10.

It is also known for the circuit of Fig. 1 that the circuit component values are related to the center frequency as

Fo = 1 / ( 2 * Pi * ( R2||R3 * R4 )^0.5 * C )

where R2||R3 is the parallel value of R2 and R3. We can re-write the equation as


R2||R3 = 1 / ( Wo^2 * C^2 * R4 ) = 397.9

where

Wo = 2 * Pi * Fo

Assuming that R2 = R3, we can then say that R2 and R3 are 2 * (R2||R3) = 795.8 each as shown in Fig. 1. The closest standard value would be selected from the standard resistance decade table.

We have now completely designed the circuit of Fig. 1.

The performance of the circuit was verified using a SPICE circuit simulator. The center frequency was at 2KHZ. Bandwidth was 200 HZ. Gain was 40db or 100. With a 50 millivolt peak 2KHZ input signal, the output signal was 5 volts peak. AC analysis showed that symmetry was excellent.

Saturday, July 24, 2010

2ND ORDER BAND PASS FILTER



Fig. 1 shows a second order band pass filter that is designed to have a center frequncy of 2KHZ and is stable with transient signals or noise inputs. The schematic is the actual simulation schemtaice used including the biasing circuit as the basic circuit. Note that a practical value of 0.01UFD is set for the capacitors to start with but the R values are calculated as shown below and the calculated values are shown to 5 or 6 digits for use in the simulation but standard resistor decade values that are close will provide acceptable results.

We want this filter to have a maximally flat response in the pass band so the damping factor d is set to the square root of 2, as

d = ( 2 )^2 = 1.1412...

If we wanted a maximally flat time delay instead, such as might be required for an audio cross-over network, we would set d to the square root of 3 instead.

Once we have decided on d we can then calculate a gain that will be stable for the circuit. For an ordinary wide band pass filter, like the circuit in Fig. 1, we don't need a lot of gain and we need to be careful not to use too much gain as the filter may become unstable and ring on any kind of input transient, making it useless. We will use a standard formula to calculate the gain K that will work. We will treat the gain K as a positive value although the real gain is actually negative due to the inverting amplifier circuit we are using.

K = 3 - d = 1.5857

We can round off the gain to 1.59.

Now there is a criteria for setting the minimum value of the quality factor of the filter Q. Again, we don't want too high a Q for this simple wide band filter as the circuit may not then be time stable. The criteria is:

Q > ( K / 2 )^0.5 = 0.89

So what ever Q we choose it needs to be greater than 0.89. So lets try a Q = 1.

Also we set the center of the pass band to 2KHZ for demonstration.

Fo = 2000

Now we can calculate the resistor values for the filter:

R3 = Q / ( 2 * Pi *K * C * Fo ) = 1 / ( 2 * 3.14159 * 1.5857 * 0.01*10^-6 * Fo )

R3 = 5004.9

R4 = Q / (( 2 * Q^2 - K ) * 2 * Pi * C * Fo ) = 19409

From the equation for R4 we can see that 2Q^2 must be greater than the absolute value of K, and 2Q^2 cannot equal K, or R4 must be removed from the filter and then we have a different circuit and performance. I have found that including R4 makes a better filter.

R2 = 2 * Q / ( 2 * Pi * C * Fo ) = 15915.5

R1 is simply a dummy load for the op-amp and has no theoretical effect on calculations.

Simulating the circuit as shown in Fig. 1 with the Linear Technology LTC6244 rail-to-rail 5MHZ op-amp we have the following results:

Quite symmetrical band pass curve on a log of frequency vs voltage db scale with

Fo = 2KHZ

F low at -3db = 1.24KHZ approx.

F high at -3db = 3.3KHZ approx.

-20db at 20KHZ approx.
-20db at 200HZ approx.

Phase shift at Fo is -90 degrees.

With an input signal of 0.62893, the output signal is 1 volt as predicted from the gain K calculation.

Note that

Fo = ( F low * F high )^0.5 = ( 1240 * 3300)^0.5 = 2023HZ , very close to Fo = 2KHZ.

You will note also that the band pass shape for the rates of attenuation is proportional to a percentage of the frequency, not an absolute value of frequency delta from Fo.

Thursday, July 15, 2010

2ND ORDER LOW OR HIGH PASS FILTER



Fig. 1 shows a circuit that can be configured as either a high pass or low pass filter depending on which components are populated. The values shown are for a low pass filter with a cut-off frequency of approximately 200HZ.

In the case shown R2 and R3 are set to 8.1K, and C1 and C4 are set to 0.1UFD. The component parts parallel to these are set to parasitic values (not populated) but would be populated for the high pass version and R2, R3, C1, and C4 would not be populated for the high pass configuration.

We can calculate the cut-off frequency value for either the high pass or low pass filter from the equation

Fo = 1 /( 2 * Pi * ( R2 * R3 * C1 * C4 ) ^ 0.5 ) = 196.48 HZ

R2 and R3 are usually set equal to each other and C1 an C4 are usually set equal to each other. We can then simplify the formula to:

Fo = 1 / ( 2 * Pi * R * C)

which we should recognize as the equation for a simple RC filter, but in this case we have a 2nd filter instead of a 1st order filter with the circuit of Fig. 1.

So if you know the frequency cut-off you want you can set the capacitor values and calculate the R values. For example, say you want a cut-off of 500 HZ and you will set the C values to 0.1UFD as before. The R values are then

R = 1 / ( 2 * Pi * Fo * C ) = 3.183 K

Or if we know the R values and the cut-off frequency, we can calculate the capacitor values;

C = 1 / ( 2 * Pi * Fo * R ) = 1.000 * 10^-7

or 0.1UFD.

The circuit in Fig. 1 was simulated with the components shown using +5V and -5V power supplies on a SPICE simulator and verified to have the calculated cut-off frequency.

Thursday, July 1, 2010

What is a class T amplifier?

A class T amplifier is a type of class D amplifier except that it has some characteristics based on advanced technology in switching modulation and feedback techniques, such as very high switching frequencies, sigma-delta type pulse width modulation, and other usually proprietary features that are not published as generally available information. What might be some of the advantages of this type of design? We can expect that the higher switching frequency would help to reduce distortion and lower noise. Sigma-delta modulation spreads out the switching frequency over a range of frequencies which helps to reduce EMI testing problems.

What would we expect to be the disadvantages of the class T system? The variable switching frequency has some disadvantages over a fixed frequency system, especially in testing, and filtering out the switching frequency in the final output signal. The circuitry is usually more complicated and harder to design than the classical fixed frequency ramp generated pulse width modulation.

Should you buy a class T system? This is a question of personal taste, but I can tell you that the class T system has been very well accepted by large companies that are including the system in TV’s and home theatre systems. If the system sounds good and you do not want to spend a lot of money on high end equipment, class T may be good for you. If you are looking for a high end system you may want to shop carefully and do your research first. You may still find that a class T system is great and just right for you. Good hunting and good listening.

what are differences of full bridge vs. half-bridge class d

What are the advantages of full-bridge vs. half-bridge Class D amplifiers?

The following is a quick summary:

Half-Bridge
PWM Two-level switching (high and low logic levels)
Current Limited to the rating of each mosfet, assuming 1 mosfet high side, and 1 low.
No. of mosfets 2 minimum
Gate drive One dual gate driver possible
DC offset Critical -- must be virtually zero
Supply voltages Need positive and negative voltages
Distorsion Less than 1% possible
Bandwidth 20-20KHZ possible depending on design
Power regulation A pumping effect makes regulation more difficult

Full bridge
PWM Three-level possible
Current capacity Twice the half-bridge rating for the same mosfet types
No. of mosfets 4 minimum
Gate drive More complex than half-bridge
DC offset Self-canceling
Supply voltages One voltage can be used. Also can work from positive and negative supplies
Distorsion Much less than 1% possible
Bandwidth 20-20KHZ practical
Power regulation Easier than half-bridge

One comment on the gate drive system for the full-bridge circuit is that the logic is straight-forward but it may be necessary to add gate drive buffers to increase the strength of the gate drives.