# How do I model the voltage of a capacitor being charged by a buffer?

I have a problem where I am trying to model the voltage across a capacitor in the following circuit:

We can see we have a reference voltage source of 1.25V driving a buffer. For T/2 the Capacitor is connected to the 1V supply, such that the voltage across it is 1V. After T/2 it then switched to the output of the buffer and is charged to 1.25V. My goal is to find the voltage across the capactior, $$\V_c(t)\$$, as a function of time.

# 1st Approach

Initially I just thought to model the voltage across the cap as a 1.25V source charging a capacitor through the output resistance of an Opamp, as follows:

Given the capacitor starts at a voltage of 1V, we model the charging as:

$$V_c(t) = 1.0 + (1.25 - 1.0)(1 - e^{t/\tau}) = 1.0 + 0.25(1 - e^{t/\tau})$$

since the buffer provides a fixed 1.25v charging voltage. However, I was told this may be incorrect since the voltage used to charge the capacitor is itself a function of time, dependent on the voltage across the capacitor, so I tried another approach ...

# 2nd Approach

Using a model for the OpAmp, we replace the buffer circuit with a dependent voltage source as follows

The voltage generated by the OpAmp is $$\A_{OL}(V_+ - V_-)\$$, where $$\A_{OL}\$$ is the open loop gain of the OpAmp. In this case $$\V_+ = 1.25v\$$ and $$\V_- = V_c(t)\$$, yielding the above model. We can then model this as an RC circuit as before, this time the charging voltage a dependent voltage source:

Therefore, the voltage across the capacitor is

$$V_c(t) = 1.0 + [A_{OL}(1.25 - V_c(t)) - 1.0](1 - e^{t/\tau})$$

which can be re-arranged for $$\V_c(t)\$$ to give:

$$V_c(t) = \frac{1.0 + A_{OL}(1.25)(1-e^{-t/\tau}) - (1-e^{-t/\tau})}{1 + A_{OL}(1-e^{-t/\tau})}$$

# Simulation

Plotting both these results in desmos yields : (https://www.desmos.com/calculator/9yzrm6hsnm)

where the red curve is method 1, and the purple is method 2. Now, i'd like to know people's opinion on which is the correct approach, or are BOTH wrong?

The reason I suspect that there is an error here is because I also have the conditions that $$\V_c(0.48*T) = 1.249511\$$, where $$\T = 1/20Mhz\$$, which yields a time constant of $$\\tau_1 = 1.758e-7\$$ for method 1 and $$\\tau_2 = 7.93e-8\$$ for method 2 (using the information $$\A_{OL} = 4000\$$). Dividing each by the load capacitance (1.5pF) yields output resistances for the OpAmp of $$\119k\Omega\$$ and $$\52.8k\Omega\$$ respectively, while I expect this value to be on the order of Mega Ohms.

• Which op-amp is it? Usually op-amp outputs are not supposed to be connected to capacitors, so why are you modeling it? Commented Mar 10, 2023 at 18:22
• I am designing the OpAmp. But before I do so, I'm deriving the system specification (Gm, Bandwidth) based on a high level description of settling error, and DC gain error etc. The load is capacitive as I am driving the input of an ADC which use the 1.25V capacitor as a reference. This reference discharged to 1v during the conversion phase and must be charged (as shown above) to 1.25v on the acquisition phase. Commented Mar 10, 2023 at 18:28
• If so, would the resistance of the switch also affect the capacitor charging, and at the same time provide some isolation from direct short circuit to capacitor? Commented Mar 10, 2023 at 18:49
• @JonahF, I would think this is a large signal phenomenon that you are trying to model and hence, can model the output as staying at 1V till the amplifier loop delay after which the cap charges linearly at a rate depending on the max current output of the amplifier till it comes close to 1.25V.
– sai
Commented Mar 11, 2023 at 17:07

If the capacitor is connected to the 1V source and then to the opamp, the capacitor will not charge instantaneously because of the source resistance of the opamp. so before $$\ T_{0} \$$ the capacitor will be at 1V. Whenever it switches it will decay with an RC time constant to 1.25V because the opamp's negative feedback will always try to move the output of the to the V+ input in a voltage follower configuration.