# Simulate dynamic systems with op-amp integrators

#### Article By : Bob Witte

Use analog circuits for integration when simulating dynamic systems.

In my previous article on common op-amp circuits, I mentioned that operational amplifiers were used for analog computing, where analog circuits simulated the behavior of complex systems. That article covered circuits that can amplify, invert, add, and subtract voltages. However, to fully simulate dynamic systems, we need to include integration and differentiation (see Reference 1 for an interesting historical look at analog computing).

Generic inverting amplifier

Figure 1 shows the inverting amplifier configuration with impedances Z1 and Z2. It is useful to analyze this circuit with generic complex impedances and apply those results to a variety of circuits. The circuit analysis follows the same approach used with the inverting amplifier discussed in “Common op-amp circuits” and won’t be repeated here.

The transfer function of this circuit is:

Figure 1 This is the generic inverting amplifier configuration.

The integrator

An integrator circuit performs the mathematical function of integration on the input voltage to produce the output voltage. Mathematically, this can be expressed as:

In a practical application, the integration starts at a specific point in time and the initial condition may need to be included. Sometimes the integrator circuit includes a reset method to start the integration at a specific time. The variable k is just a scale factor corresponding to the gain of the circuit.

Applying the Laplace transform to obtain the frequency domain representation (with complex frequency s), we get:

Referring back to Figure 1, putting a capacitor in the feedback path (Z2) and a resistor in the input path (Z1) creates an integrator (Figure 2). Using the Laplace transform representation of the components, we have:

This equation shows the transfer function as the proper form for an integrator, having a scale factor (gain) of 1/(R1C). The minus sign indicates that the output voltage is inverted relative to the input, so this circuit is sometimes called an inverting integrator.

Figure 2 Putting a capacitor in the feedback path produces an integrator.

Figure 3 shows an example of integrator operation in the time domain. The upper waveform is the input to the circuit and the lower waveform is the output. The input is a square wave that first causes the output voltage to ramp down as the constant input voltage is integrated (with negative gain). When the square wave changes level, the output voltage ramps back up. Then the square wave changes level again, causing another ramp down. The net result at the output is a triangle wave.

Figure 3 The square wave (upper waveform) applied to the input of the integrator produces the triangle wave at the integrator output (lower waveform).

We can also look at the circuit characteristics in the frequency domain. The frequency domain response of the integrator is shaped by the 1/s term, giving us a straight line that slopes downward with increasing frequency (Figure 4). Note that Figure 4 has a logarithmic frequency scale and that the gain of the circuit approaches infinity as the frequency goes to 0 Hz.

Standing alone, this integrator circuit will not be stable because the slightest amount of DC offset in the system will cause the output to ramp up or down until it hits the maximum or minimum voltage limits of the op-amp output. In some applications, there may be feedback from somewhere else in the system that keeps the output voltage within a reasonable operating range. But in the general case, the output will tend to slam to the positive or negative rail.

Figure 4 The frequency response of the integrator circuit is inversely proportional to frequency.

The practical integrator

A more practical integrator circuit is shown in Figure 5. The feedback resistor R2 reduces the DC gain of the circuit to (hopefully) keep it from saturating the output voltage.

Figure 5 A feedback resistor lowers the DC gain of the integrator, creating a more practical integrator circuit.

The transfer function of the circuit is given by:

Solving this equation for the DC gain by inserting zero for the frequency, we see that the circuit reduces to an inverting amplifier with gain of -(R2/R1).

Figure 6 shows a plot of the circuit gain versus frequency, with R1 = R2 = 1kΩ and C = 1μF. These component values produce a single-pole response with the -3 dB frequency of 1/(2πR2C) = 160 Hz. Because the two resistors are the same value, the DC gain is 0 dB. The overall shape of the response does mimic the integrator frequency response shown in Figure 4, without the problem of huge DC gain.

Figure 6 The practical integrator circuit has a frequency response that starts out flat at DC and then rolls off with frequency.

You may also recognize this circuit as a single-pole lowpass filter. The values of R2 and C can be set to pass any desired signals while providing attenuation at higher frequencies. Having a relatively gentle rolloff, this circuit is often used to reduce the high frequency response of an amplifier and avoid unwanted noise in a system.

That completes our look at op-amp integrators. Next time, we will discuss op-amp differentiator circuits.

Bob Witte is President of Signal Blue LLC, a technology consulting company.

References

1. Fundamentals of the Analog Computer,” Robert M. Howe, IEEE Control Systems Magazine, June 2005.
2. Handbook of Operational Amplifier Applications, Bruce Carter and Thomas R. Brown, Texas Instruments, Sept 2016.
3. Op Amps for Everyone, Ron Mancini, editor, August 2002.

Related articles: