# Finding correct RC value for transient equations in DC RC circuit

simulate this circuit – Schematic created using CircuitLab

So I'm doing this problem in boylestad book. I need to find $$\v_c\$$ and $$\i_c\$$. I converted the current source to voltage source. I found the voltage at the upper node including the capacitor is 3.27 V. So the $$v_c = 3.27(1-e^{-1/\tau})$$ The answer in the back of the book confirms this. Where I have an issue is with both the RC value and the current $$\i_c\$$.

For the $$\\tau\$$ I have supposed that the R value is seen from the branch in the capacitor, so $$\tau = \frac{(4460 \times6800)}{(4460+6800)}\times (0.000020) = 0.05386$$ however the book says it should be $$\0.05380\$$, so I'm not sure if I have done the right way here or the book has rounded down.

The answer in the book for $$\i_c\$$ is

$$i_c = 1.22mAe^{-t/53.80ms}$$

I got this correct through superposition except for the $$\\tau\$$. So really my only question is how would you work out $$\\tau\$$.

• The resistance seen by the capacitor is 4.46kΩ||6.8kΩ ≈ 2.7kΩ thus the time constant is 2.7kΩ*20µF ≈ 54ms
– G36
Commented Oct 6, 2020 at 13:43
• When do the switches close? Commented Oct 6, 2020 at 13:57
• @Jan the question asked what the mathematical expressions are for $v_c$ and $i_c$ when the switch closes. Commented Oct 6, 2020 at 15:45
• Thanks @G36 for the confirmation. Commented Oct 6, 2020 at 15:45
• @Bucephalus So, the switch closes at $t=0$? Commented Oct 6, 2020 at 15:54

First, I assume that the switch closes at $$\t=0\$$ and there is no initial voltage across the capacitor.

Well, we are trying to analyze the following circuit:

simulate this circuit – Schematic created using CircuitLab

When we use and apply KCL, we can write the following set of equations:

$$\begin{cases} \text{I}_1=\text{I}_2+\text{I}_3\\ \\ 0=\text{I}_\text{k}+\text{I}_3+\text{I}_4\\ \\ \text{I}_\text{n}=\text{I}_\text{k}+\text{I}_4\\ \\ \text{I}_2=\text{I}_\text{n}+\text{I}_1 \end{cases}\tag1$$

When we use and apply Ohm's law, we can write the following set of equations:

$$\begin{cases} \text{I}_1=\frac{\text{V}_\text{i}-\text{V}_1}{\text{R}_1}\\ \\ \text{I}_2=\frac{\text{V}_1}{\text{R}_2}\\ \\ \text{I}_3=\frac{\text{V}_1-\text{V}_2}{\text{R}_3}\\ \\ \text{I}_4=\frac{\text{V}_\text{n}-\text{V}_2}{\text{R}_4} \end{cases}\tag2$$

Substitute $$\(2)\$$ into $$\(1)\$$, in order to get:

$$\begin{cases} \frac{\text{V}_\text{i}-\text{V}_1}{\text{R}_1}=\frac{\text{V}_1}{\text{R}_2}+\frac{\text{V}_1-\text{V}_2}{\text{R}_3}\\ \\ 0=\text{I}_\text{k}+\frac{\text{V}_1-\text{V}_2}{\text{R}_3}+\frac{\text{V}_\text{n}-\text{V}_2}{\text{R}_4}\\ \\ \text{I}_\text{n}=\text{I}_\text{k}+\frac{\text{V}_\text{n}-\text{V}_2}{\text{R}_4}\\ \\ \frac{\text{V}_1}{\text{R}_2}=\text{I}_\text{n}+\frac{\text{V}_\text{i}-\text{V}_1}{\text{R}_1} \end{cases}\tag3$$

Now, it is not hard to solve for $$\\text{V}_1\$$:

$$\text{V}_1=\frac{\text{R}_2\left(\text{R}_1\left(\text{I}_\text{k}\text{R}_4+\text{V}_\text{n}\right)+\text{V}_\text{i}\left(\text{R}_3+\text{R}_4\right)\right)}{\text{R}_1\left(\text{R}_2+\text{R}_3+\text{R}_4\right)+\text{R}_2\left(\text{R}_3+\text{R}_4\right)}\tag4$$

Where I used Mathematica-code to solve for that:

In[1]:=FullSimplify[
Solve[{I1 == I2 + I3, 0 == Ik + I3 + I4, In == Ik + I4,
I2 == In + I1, I1 == (Vi - V1)/R1, I2 == V1/R2, I3 == (V1 - V2)/R3,
I4 == (Vn - V2)/R4}, {In, I1, I2, I3, I4, V1, V2}]]

Out[1]={{In -> (Ik (R1 + R2) R4 - R2 Vi + (R1 + R2) Vn)/(
R2 (R3 + R4) + R1 (R2 + R3 + R4)),
I1 -> (-Ik R2 R4 + (R2 + R3 + R4) Vi - R2 Vn)/(
R2 (R3 + R4) + R1 (R2 + R3 + R4)),
I2 -> (Ik R1 R4 + (R3 + R4) Vi + R1 Vn)/(
R2 (R3 + R4) + R1 (R2 + R3 + R4)),
I3 -> (-Ik (R1 + R2) R4 + R2 Vi - (R1 + R2) Vn)/(
R2 (R3 + R4) + R1 (R2 + R3 + R4)),
I4 -> (-Ik (R2 R3 + R1 (R2 + R3)) - R2 Vi + (R1 + R2) Vn)/(
R2 (R3 + R4) + R1 (R2 + R3 + R4)),
V1 -> (R2 (Ik R1 R4 + (R3 + R4) Vi + R1 Vn))/(
R2 (R3 + R4) + R1 (R2 + R3 + R4)),
V2 -> (Ik (R2 R3 + R1 (R2 + R3)) R4 + R2 R4 Vi + R1 R3 Vn +
R2 (R1 + R3) Vn)/(R2 (R3 + R4) + R1 (R2 + R3 + R4))}}


When we want to apply the derivation from above to your circuit we need to use Laplace transform (I will use lower case function names for the functions that are in the (complex) s-domain, so $$\\text{y}\left(\text{s}\right)\$$ is the Laplace transform of the function $$\\text{Y}\left(t\right)\$$):

• $$\text{R}_2=\frac{1}{\text{sC}_1}\tag5$$
• The input voltage, $$\\text{V}_\text{i}\$$, is a stable DC voltage equal to $$\\hat{\text{u}}_\text{i}\$$, so: $$\text{v}_\text{i}\left(\text{s}\right)=\frac{\hat{\text{u}}_\text{i}}{\text{s}}\tag6$$
• The input voltage, $$\\text{V}_\text{n}\$$, is a stable DC voltage equal to $$\\hat{\text{u}}_\text{n}\$$, so: $$\text{v}_\text{n}\left(\text{s}\right)=\frac{\hat{\text{u}}_\text{n}}{\text{s}}\tag7$$
• The input current, $$\\text{I}_\text{k}\$$, is a stable DC current equal to $$\\hat{\text{i}}_\text{k}\$$, so: $$\text{i}_\text{k}\left(\text{s}\right)=\frac{\hat{\text{i}}_\text{k}}{\text{s}}\tag8$$

So, we can rewrite equation $$\(4)\$$ as follows:

$$\text{v}_1\left(\text{s}\right)=\frac{\frac{1}{\text{sC}_1}\cdot\left(\text{R}_1\left(\frac{\hat{\text{i}}_\text{k}}{\text{s}}\cdot\text{R}_4+\frac{\hat{\text{u}}_\text{n}}{\text{s}}\right)+\frac{\hat{\text{u}}_\text{i}}{\text{s}}\cdot\left(\text{R}_3+\text{R}_4\right)\right)}{\text{R}_1\left(\frac{1}{\text{sC}_1}+\text{R}_3+\text{R}_4\right)+\frac{1}{\text{sC}_1}\cdot\left(\text{R}_3+\text{R}_4\right)}\tag9$$

Using inverse Laplace transform we can see that:

$$\text{V}_1\left(t\right)=\frac{\left(\text{R}_1\hat{\text{u}}_\text{n}+\left(\text{R}_3+\text{R}_4\right)\hat{\text{u}}_\text{i}+\text{R}_1\text{R}_4\hat{\text{i}}_\text{k}\right)\left(1-\exp\left(-\frac{\text{R}_1+\text{R}_3+\text{R}_4}{\text{C}\text{R}_1\left(\text{R}_3+\text{R}_4\right)}\cdot t\right)\right)}{\text{R}_1+\text{R}_3+\text{R}_4}\tag{10}$$

Where I used the following Mathematica-code:

In[2]:=R2 = 1/(s*c);
Vi = Ui/s;
Vn = Un/s;
Ik = ik/s;
FullSimplify[
InverseLaplaceTransform[(R2 (Ik R1 R4 + (R3 + R4) Vi + R1 Vn))/(
R2 (R3 + R4) + R1 (R2 + R3 + R4)), s, t]]

Out[2]=-(((-1 + E^(-(((R1 + R3 + R4) t)/(
c R1 (R3 + R4))))) (ik R1 R4 + (R3 + R4) Ui + R1 Un))/(
R1 + R3 + R4))


So, the time constant is given by:

$$\tau=\frac{\text{C}\text{R}_1\left(\text{R}_3+\text{R}_4\right)}{\text{R}_1+\text{R}_3+\text{R}_4}\tag{11}$$

Using your values, we can see that:

$$\tau=\frac{3791}{70375}\approx0.0538686\space\text{s}\tag{12}$$

And for $$\\text{V}_1\left(t\right)\$$, we find:

1. For your left circuit in your question: $$\text{V}_1\left(t\right)=\frac{1844}{563}\left(1-\exp\left(-\frac{70375 t}{3791}\right)\right)\tag{13}$$
2. For your right circuit in your question: $$\text{V}_1\left(t\right)=\frac{1844}{563}\left(1-\exp\left(-\frac{70375 t}{3791}\right)\right)\tag{14}$$

Where I used the following Mathematica-code:

In[3]:=R1 = (68/10)*1000;
R3 = (39/10)*1000;
R4 = 560;
c = 20*10^(-6);

In[4]:=ik = 5*10^(-3);
Ui = 4;
Un = 0; FullSimplify[-(((-1 +
E^(-(((R1 + R3 + R4) t)/(
c R1 (R3 + R4))))) (ik R1 R4 + (R3 + R4) Ui + R1 Un))/(
R1 + R3 + R4))]

Out[4]=-(1844/563) (-1 + E^(-70375 t/3791))

In[5]:=ik = 0;
Ui = 4;
Un = 28/10; FullSimplify[-(((-1 +
E^(-(((R1 + R3 + R4) t)/(
c R1 (R3 + R4))))) (ik R1 R4 + (R3 + R4) Ui + R1 Un))/(
R1 + R3 + R4))]

Out[5]=-(1844/563) (-1 + E^(-70375 t/3791))


So, the voltage time-domain functions (the voltage across the capacitor) are the same for both circuits.

• That's a hardcore answer @Jan - a little above my comprehension sorry. However, I do have one question. I noticed your circuit has two voltage sources and one current source. Mine has only two sources in either configuration. Why is there an extra voltage source in there? How does it relate to the original circuit? Commented Oct 7, 2020 at 3:16
• @Bucephalus If you did study my last Mathematica-code you could have seen that when $\text{V}_\text{n}=0$ we have your circuit on the left and when $\text{I}_\text{k}=0$ we have your circuit on the right. Commented Oct 7, 2020 at 5:43
• @Bucephalus And when you like an answer you can vote for that by using the arrow above the $0$ on the left of the answers. Commented Oct 7, 2020 at 5:44

Assuming the switch closing in $$\ t= 0 \, s\$$ and $$\v_c(0) = 0\, V\$$, the Thevenin equivalent between upper capacitor lead and reference is: $$V_{th} = 3.2753\, V$$ $$R_{th} = 2.6934\, k \Omega$$

So (and taking in account the comment from @G36): $$RC = 0.05386\, s$$

The expression of capacitor voltage for $$\t\ge 0\$$ is:

$$v_c(t) = 3.2753(1-e^{-18.56t}) V$$

Knowing that $$i_c(t) = C\frac{dv_c(t)}{dt}$$

$$i_c(t) = 1.22\times10^{-3}e^{-18.56t} A$$

• Thanks @DirceuRodriguesJr that was very helpful. Commented Oct 7, 2020 at 3:13
• Some results had already been achieved by yourself. At the end, that is a simple and effective solution. Commented Oct 7, 2020 at 5:04