eCircuit Center |
|
About SPICE |
SPICE Basics | Running SPICE
| CIRCUIT COLLECTION |
SPICE Commands | SPICE Demos and Downloads |
Op Amp All-Pass FilterCIRCUIT
OP_ALL-PASS1.CR Download the SPICE file The All-Pass Filter went largely ignored by me for many years until I ran into it studying a guitar effect pedal, the phase-shifter. The heart of this popular effect pedal is an all-pass filter that creates a time delay of the guitar signal. The delay acts as the key block of a comb filter - multiple notch filters. So I figured the door had opened to learn about this circuit.
ALL-PASS WITH DELAY Where is the transition between inverting and non-inverting behaviors? The corner frequency is defined by
The table below summarizes the all-pass action.
TRANSFER FUNCTION The positive path looks like a high pass filter R1,C1 followed by a non-inverting gain defined by R4 and R3.
Finally, tie the inputs together (vn=vp=vs), set R4/R3 = 1 and add the outputs together.
After getting a common denominator, some simplifying, labor pains and ultimately joy, you get vo/vs = ( 1 - s·R1·C1 ) / ( 1 + s·R1·C1 ) The magnitude and phase look like this Mag = 1 Phase = -tan (2 pi f R1 C1) + tan ( -2 pi f R1 C1 ) What story is this telling us? Across the frequency range, it has unity
gain. But, the phase starts out at
FREQUENCY RESPONSE CIRCUIT INSIGHT Does the magnitude hold steady at 1 across the frequency range? Does the phase reach -180, -90, and 0 when the frequency is below, at, and above fc? Eventually at 1MHz the output drops. Why? What is the Gain Bandwidth Product
of the op amp model? TRANSIENT RESPONSE
The variable fo also sets the length of simulation time
to conveniently include several sine cycles. Nice feature - less monkeying with the setup at each run. CIRCUIT INSIGHT Initially, set fo=1.6 Hz, one hundred times below fc=159 Hz. Run a TRANSIENT ANALYSIS of OP_ALL_PASS1.CIR and plot the input and output V(5). What is the expected output? Is the output delayed by 1/2 cycle (a.k.a. -180 deg or inverting)? Rerun the simulation with fo=16 Hz, 160 Hz, 1600Hz and 16000Hz. Does the time delay through the filter progressively shift as the frequency increases? Cool beans - the time delay changes (phase shift), yet the magnitude stays the same!
CASCADED FILTERS
UPCOMING TOPIC
SPICE FILE Download the file or copy this netlist into a text file with the *.cir extension. * op_all-pass1.cir * .PARAM fo=1.6Hz VS 1 0 AC 1 SIN(0V 1V {fo}) * C1 1 3 0.1UF R1 3 0 10k R3 1 2 10K R4 2 5 10K XOP1 3 2 5 OPAMP1 * C21 5 23 0.1UF R21 23 0 10k R23 15 22 10K R24 22 25 10K XOP2 23 22 25 OPAMP1 * * * OPAMP MACRO MODEL, SINGLE-POLE * connections: non-inverting input * | inverting input * | | output * | | | .SUBCKT OPAMP1 1 2 6 * INPUT IMPEDANCE RIN 1 2 10MEG * GAIN BW PRODUCT = 10MHZ * DC GAIN (1MEG) AND POLE 1 (10HZ) EGAIN 3 0 1 2 1000K RP1 3 4 1K CP1 4 0 15.9UF * OUTPUT BUFFER AND RESISTANCE EBUFFER 5 0 4 0 1 ROUT 5 6 10 .ENDS * * ANALYSIS ************************************* .TRAN 0.1MS {4/fo} *.TRAN 10MS 5S *.ac dec 40 1 1000k .PROBE .END
© 2012 eCircuit Center |