# Amplifier and step function

1. Apr 23, 2005

### EvLer

I am given an ideal OP-AMP like this (R-resistor, Cap-capacitor):
Code (Text):

____+Cap-_
|          |
___R____|__|\______|_____ +
|          -|/
+         |
V in      |                  V out
-         |
|         |
|_________|______________ -

and V in is given as a step function like so:
Code (Text):

/\ (volts)
|
|____1____2_______> (t, sec)
|____| (-2)
|
|

that is V(in) is -2 on [0,1] and then 0 further. I need to find V(out) at 2sec.
So far I think I got the expression I need to work with.
V(out) = -Vc
Vc = 1/(RC) * integral(V in dt)
But my problem is how I deal with a step function in this case of integration. Any help is appreciated.
Thanks.

Last edited: Apr 23, 2005
2. Apr 23, 2005

### Jeff273

$$Vc = \frac{1}{C} \int_{0}^{t} i_c dt$$

In your circuit $$i_c = V_{in}/R$$

$$Vc = \frac{1}{RC} \int_{0}^{t} V_{in} dt$$

looks right. So, assuming Vc started at zero at To with Vin = -2V, you have,

$$Vc = \left[\frac{1}{RC} \times -2(t)\right]_{0}^{1}$$

When you switch from Vin = -2V to Vin = 0V the output will stop ramping because the current goes to zero.

Does that make sense?

3. Apr 24, 2005

### EvLer

So, to find V(out) at t = 2, I need to add integral from 0 to 1s and then from 1 to 2s? That is my question.

4. Apr 24, 2005

### SGT

Not really! When the input voltage switchs to zero the capacitor is charged. So it will start discharging towards zero
$$Vc(t) = Vc(1) + \frac{1}{RC} \int_{1}^{t} V_{in} dt$$
Where $$V_{in} = 2.u(t-1)$$

5. Apr 24, 2005

### Jeff273

SGT,

Ignore the math for a second and check the circuit. When Vin is at zero the current through R is zero. Since there is no current flow at the virtual node (which is always at zero volts - the reference - in this circuit) the voltage across the cap as measured at Vout will hold at whatever voltage is across it.

6. Apr 24, 2005

### Jeff273

EvLer,

Yes. Evaluating, you will have:

$$Vc = \left[\frac{1}{RC} \times -2(t)\right]_{0}^{1} \plus+ \left[\frac{1}{RC} \times 0(t)\right]_{1}^{2}$$

You can see that the second term is zero forever with Vin = 0.

7. Apr 25, 2005

### SGT

Nope! The capacitor is negatively charged and since there is a path to ground through R, the capacitor will discharge.

8. Apr 25, 2005

### Jeff273

Nope. The voltage at the RC node is always zero (this is a virtual gnd). With Vin at zero, the circuit looks like this:

Code (Text):

_ Vout
|
| -
I           C
<---         | +
gnd ____ R __________|
|
Vgnd

I = zero, and no current can flow into or out of a virtual gnd, therefore the cap has no discharge path and holds at whatever the last ramp voltage was.

Think about it. This is an ideal integrator. Assume R and C are 1 so it sums -Vin x (t).

t....Vin....Vout
--------------
0.....0.......0
1.....1......-1
2.....1......-2
3.....0......-2
4.....0......-2
5.....1......-3
6.....1......-4
7.....0......-4

Looks like this:

Code (Text):

0 _
-1  \
-2   \____
-3        \
-4         \_

If it discharged at Vin = 0, it would be useless as an integrator.

Last edited: Apr 25, 2005