3.0 Op-Amp Circuits for Mathematical Operations
Beyond simple amplification, operational amplifiers are exceptionally adept at performing mathematical computations, forming the core of analog computers and advanced signal processing systems. By arranging resistors and capacitors in specific negative feedback configurations, op-amps can be made to perform arithmetic (addition and subtraction) and calculus-based operations (differentiation and integration).
3.1 Arithmetic Circuits
Summing Amplifier (Adder)
An adder, or summing amplifier, produces an output voltage that is the weighted sum of multiple input voltages. In this circuit, several input signals are applied to the inverting terminal through separate resistors, and the virtual ground at this node sums the input currents.
The output voltage is derived from the nodal equation at the inverting terminal’s virtual ground: \frac{0-V_1}{R_1}+\frac{0-V_2}{R_2}+\frac{0-V_0}{R_f}=0 =>\frac{V_1}{R_1}-\frac{V_2}{R_2}=\frac{V_0}{R_f} =>V_{0}=R_{f}\left(\frac{V_1}{R_1}+\frac{V_2}{R_2}\right) In the special case where all resistors are of equal value (R_f = R_1 = R_2 = R), the equation simplifies to a direct, inverted sum of the inputs: V_{0}=-(V_{1}+V_{2})
Difference Amplifier (Subtractor)
A subtractor, or difference amplifier, produces an output voltage proportional to the difference between two input voltages. This circuit utilizes both the inverting and non-inverting inputs. Its output can be derived using the superposition theorem.
- Considering input only (with grounded): The circuit acts as a non-inverting amplifier. The voltage at the non-inverting terminal (V_p) is V_{1}\left(\frac{R_3}{R_2+R_3}\right). The resulting output (V_{01}) is: V_{01}=V_{1}\left(\frac{R_3}{R_2+R_3}\right)\left(1+\frac{R_f}{R_1}\right)
- Considering input only (with grounded): The circuit acts as an inverting amplifier. The resulting output (V_{02}) is: V_{02}=\left(-\frac{R_f}{R_1}\right)V_{2}
- Total Output: The final output is the sum of the two results: V_{0}=V_{01}+V_{02} = V_{1}\left(\frac{R_3}{R_2+R_3}\right)\left(1+\frac{R_f}{R_1}\right)-\left(\frac{R_f}{R_1}\right)V_{2} If all resistors are of equal value (R_f = R_1 = R_2 = R_3 = R), the equation simplifies dramatically to a direct subtraction:
V_{0}=V_{1}-V_{2}
3.2 Differentiator and Integrator Circuits
Differentiator
A differentiator circuit produces an output voltage that is the first derivative of the input voltage with respect to time. This is achieved by replacing the input resistor of an inverting amplifier with a capacitor, making the input current proportional to the rate of change of the input voltage.
The nodal equation at the inverting terminal is based on the current through the capacitor and the feedback resistor: C\frac{\text{d}(0-V_{i})}{\text{d}t}+\frac{0-V_0}{R}=0 Solving for the output voltage V_0 yields the differentiation relationship: V_{0}=-RC\frac{\text{d}V_{i}}{\text{d}t} The negative sign indicates a 180-degree phase shift between the output and the differentiated input.
Integrator
An integrator circuit performs the mathematical operation of integration, producing an output voltage that is the integral of the input voltage over time. This is achieved by swapping the positions of the resistor and capacitor from the differentiator, placing the capacitor in the feedback path. The feedback current now charges or discharges the capacitor, causing the output voltage to ramp at a rate proportional to the input voltage.
The nodal equation at the inverting terminal is: \frac{0-V_i}{R}+C\frac{\text{d}(0-V_{0})}{\text{d}t}=0 Rearranging and integrating both sides of the equation gives the final result: \int{d}V_{0}=\int\left(-\frac{V_i}{RC}\right){\text{d}t} V_{0}=-\frac{1}{RC}\int V_{t}{\text{d}t} Similar to the differentiator, the negative sign indicates a 180-degree phase shift.
Beyond these fundamental arithmetic and calculus operations, the op-amp’s characteristics allow it to be configured for more complex non-linear functions, such as logarithmic and exponential responses, which are explored next.