Gain of Integrator Amplifier With Square Wave Input Using basic circuit analysis techniques we can find the voltage gain of this basic integrator as follows:

$i_1=\frac{v_I}{R_I}\quad\text{and}\quad i_2=-C(\frac{dv_O}{dt})\\\text{since:}\quad i_1=i_2 \ \rightarrow \ \frac{v_I}{R_I}=-C(\frac{dv_O}{dt})$

From this we can derive the output voltage to be:$-\frac{1}{RC}\int_{0}^{t}v_Idt+v_O(0)$

If we look at it in the s domain, we can easily find the voltage gain of the circuit to be:

$G_v=\frac{v_O}{v_I}=-\frac{1}{sRC}$

This was easy enough. The only problem is, this is only valid if the input signal is a sine wave. Granted, the gain will approximate this value if the input signal is a square wave and it will be even closer if the input is a triangle wave, but it will not be 100% correct.

So my question: how can we modify this relationship to solve for the output voltage or gain of the circuit if the input signal is a square wave? I would think that since a square wave is composed of a sine wave at the primary frequency and a number of odd order harmonic frequencies, there must be a way to add to this and solve it more accurately.

• What is the integral of a full cycle of a sine? Or a square wave? In other words, I don't get the point of the question. (1/RC is the scale factor). – C. Towne Springer Feb 18 '17 at 5:35
• The gain in the s domain is a complex number that represents the gain for each and every sine wave, and also represents the transient response, so it is not correct only 'for a sine wave' but it is correct for sine, triangle, square waves, etc. and with the correct techniques you can get both the transient and the steady state response for any of those inputs. – Claudio Avi Chami Feb 18 '17 at 5:59
• The gain of a circit is the output-to-input ratio which only can be found when both signals have the same form. For an integrating circuit this is true for sinusoidal signals only. Hence, all analyses in the frequency domain (watch the term !) are, of course, valid for sinus only. For all other cases, you must stay in the time domain. – LvW Feb 18 '17 at 7:21
• $\small G_v$, in your question, is the transfer function. It's misleading to call it 'gain'. By imposing certain conditions, a meaningful gain value can sometimes be determined from the TF. For example, the steady state gain for a sinusoidal input at $\omega\: rad/sec$ is $\frac{1}{\omega RC}$; the gain for a step input ('DC gain', $\small \omega=0$) is infinite. – Chu Feb 18 '17 at 9:11

I would think that since a square wave is composed of a sine wave at the primary frequency and a number of odd order harmonic frequencies, there must be a way to add to this and solve it more accurately.

A square wave comprises odd order harmonics that have amplitudes (relative to the fundamental) of 1/3, 1/5, 1/7, 1/9 etc..

An integrator attenuates higher order harmonics more than lower order ones. This attenuation is linear with frequency i.e. assuming the fundamental is the reference point, the 3rd order harmonic will be attenuated by a factor of 3:1. The fifth order harmonic is attenuated by 5:1.

So now, the relative values of harmonics to the fundamental are: -

1, 1/9, 1/35, 1/49, 1/81 etc..

This of course is a triangle wave: - So, you input a square wave into an integrator and you get a triangle wave out. How you relate this to "gain" is up to you.