Maple Services

Design of a Band-Pass Filter

© 1998 Waterloo Maple Inc.

NOTE: This worksheet demonstrates the use of Maple in the design of a bandp.

Introduction

> restart:

The frequency response of a circuit illustrates graphically how the gain (or amplifying factor) of a circuit is affected by frequency. This example determines the frequency response for a bandp and analyzes how it is affected by a change in the input capacitance.

The circuit elements of a band pass filter are resistors, capacitors, and operational amplifiers (op amps).

[Maple OLE 2.0 Object]

Defining the Equations

The equations which define the circuit are written using complex arithmetic, referred to as Phasor Analysis. The following defines the component equations.

> Vo := (-Z2/Z1)* Vi;

[Maple Math]

> Z1 := R3 + 1/(I*omega*C3);

[Maple Math]

> Z2 := R4*1/(I*omega*C4) / (R4 + 1/(I*omega*C4));

[Maple Math]

Solving the Problem

The objective of the circuit is to eliminate the frequencies which are unwanted. Therefore, the amplification or gain of these frequencies must be reduced.

First define the relationship between the radian frequency variable [Maple Math] and the Hertz frequency variable f.

> omega := 2*Pi*f;

[Maple Math]

Compute the gain (ratio of output to input).

> gain := abs(evalc(Vo/Vi));

[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]

Convert to polar form to generate the expression for phase.

> phase := evalc(op(2,convert(Vo/Vi,polar)));

[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]

The above are closed-form expressions for magnitude and phase. The problem has been solved in the most general form using undefined variables instead of numbers. In this way, the numbers can be specified later and different values can be tried.

Specify Values for the Components

> R3 := 1000:
> R4 := 3000:
> C3 := 0.08*10^(-6):
> C4 := 0.01*10^(-6):

Plotting the Solution

A Bode plot is a graphical representation of the frequency response. For a filter, it illustrates how different frequencies are amplified or reduced.

Plot the magnitude.

> plot([log10(f), 20*log10(gain), f=10..50000], title=`Magnitude: dB vs. Frequency`);

[Maple Plot]

Plot the phase.

> plot ([log10(f), phase, f=10..50000], title=`Phase Angle vs. Frequency`);

[Maple Plot]

The sensitivity of the circuit to changes in component values can be illustrated with a three-dimensional plot using the third dimension as one of the component values. The following plot shows how the magnitude of the frequency response changes as the value of the capacitor C3 changes.

Re-establish C3 as an undefined variable.

> C3 := 'C3':

Plot the resulting surface.

> plot3d([log10(f), 10^(6)*C3, 20*log10(gain)], f=10..50000, C3=0.01*10^(-6)..1*10^(-6),
       title=`Frequency Sensitivity to C3`, axes=boxed, labels=[`log(f)`,`C3*10^-6`,`dB`]);

[Maple Plot]

This surface summarizes all possible frequency responses for values of C3 in the specified range. In a Maple session, you can rotate the plot and see that as the capacitance increases, the center frequency of the pass-band shifts to higher frequencies and the gain (amplification) increases.

>

Maple Services