18 C H A P T E R 0: From the Ground Up!
which is represented by the block diagram in Figure 0.9(b). Notice that the integrator also provides a
way to include the initial condition, which in this case is the initial voltage across the capacitor,vc( 0 ).
Different from the accentuating the effect of differentiators on noise, integrators average the noise,
thus reducing its effects.
Block diagrams like the ones shown in Figure 0.9 allow us to visualize the system much better, and are
commonly used. Integrators can be efficiently implemented using operational amplifiers with resistors and
capacitors.
How to Obtain Difference Equations
Let us then show how Equation (0.10) can be solved using integration and its approximation, result-
ing in a difference equation. Using Equation (0.11) att=t 1 andt=t 0 fort 1 >t 0 , we have that
vc(t 1 )−vc(t 0 )=
∫t^1
t 0
vi(τ)dτ−
∫t^1
t 0
vc(τ)dτ
If we lett 1 −t 0 = 1 twhere 1 t→0 (i.e., a very small time interval), the integrals can be seen as
the area of small trapezoids of height 1 tand basesvi(t 1 )andvi(t 0 )for the input source andvc(t 1 )
andvc(t 0 )for the voltage across the capacitor (see Figure 0.10). Using the formula for the area of a
trapezoid we get an approximation for the above integrals so that
vc(t 1 )−vc(t 0 )=[vi(t 1 )+vi(t 0 )]
1 t
2
−[vc(t 1 )+vc(t 0 )]
1 t
2
from which we obtain
vc(t 1 )
[
1 +
1 t
2
]
=[vi(t 1 )+vi(t 0 )]
1 t
2
+vc(t 0 )
[
1 −
1 t
2
]
Assuming 1 t=T, we then lett 1 =nTandt 0 =(n− 1 )T. The above equation can be written as
vc(nT)=
T
2 +T
[vi(nT)+vi((n− 1 )T)]+
2 −T
2 +T
vc((n− 1 )T) n≥ 1 (0.12)
and initial condition vc( 0 )=0. This is a first-order linear difference equation with constant
coefficients approximating the differential equation characterizing the RC circuit. Letting the input
FIGURE 0.10
Approximation of area under the
curve by a trapezoid.
vc(t 0 )
vc(t 1 )
t 0
Δt
t 1
t