I have attached a schematic of a sample circuit I'm investigating.
V1 starts at 0 volts, and then goes to 3.3 volts in a single step, and I am measuring the voltage at VM1.
I would like to come up with a formula for VM1 that shows how it changes through time after this voltage step. I'm pretty sure I should be able to find an expression for VM1 in terms of the resistor and capacitor values. I.e.:
VM1(t) = f(t, R1, C1, R2, C2, C3)
What's the most 'straightforward' way to do this? I expect I could probably do it by writing down expressions for the voltages at various nodes (using integrals) and the current through nodes, but that will take a lot of algebra, and I was wondering if there were some more efficient analytical tools I can use?
I've done a bit of Google, but having a hard time seeing how complex numbers, transfer functions, and Laplace transforms might help me for this type of stepped voltage. Would appreciate any pointers in the right direction! Even just confirming that I should be going down the route of e.g. transfer functions would be appreciated.
Hello,
This method is straightforward but with three capacitors it will end up sort of complicated unless you allow some of the component values to be the same. I'll outline the procedure for this network and then provide a clear way to do it in Maxima which is software that does these calculations for you.
If you know a little bit about network theory this network is not very difficult to do although you may end up with a complicated expression. You would really want to use math software to plot the result anyway.
You will first note that everything to the right of VM1 and everything to the left of VM1
constitute a simple voltage divider. The voltage divider formula is:
Vout=Vin*Z2/(Z1+Z2)
where the Z's are the impedances.
Since you are using a forcing function that is a step this is a transient problem and
not an AC analysis, so it is best to work in the Laplace domain. This boils down to
expressing the impedances in terms of the variable 's' instead of 'jw'. Actually the
variable 's' can be equal to 'jw' later too if we want it to be, but for the transient
analysis it is easier to keep it as just 's'.
There is a catch however, and that is if there are initial conditions (in this case
that would be initial voltages across each capacitor) then the analysis has to include
those voltage values also, but many times the initial voltages are all zero. If they
are not zero there are ways to handle that but i'll save that for another time.
Ok so with all cap voltage equal to zero, we want to get the total impedances on both
sides of VM1. The impedance to the left is simple R1. The impedance to the right is
a combination of C1,C2,C3, and R2.
Since C2 and R2 are in series, we can write the impedance as:
Z2=R2+1/(s*C2)
and since that impedance is in turn in parallel with C3, we have to use the parallel formula:
ZT=Z1*Z2/(Z1+Z2)
and here Z2 is Z2 as above and Z1 is 1/(s*C2).
For now though, let's use the impedances for each cap instead of combining the full expressions
right away. The impedances for the caps can be written:
zC1=1/(s*C1)
zC2=1/(s*C2)
zC3=1/(s*C3)
and you can see how simple that is.
Now the series connection of R2 and C2 is (and i'll introduce some new variables also):
z22=R2+zC2
That's even simpler.
That is in parallel with zC3 so we use the parallel formula:
z223=zC3*z22/(zC3+z22)
Now we have the impedance to the right of C1.
Since C1 is in series with that impedance, we can write:
z2231=zC1+z223
Ok so now we have all the required impedances to use the voltage divider formula.
The voltage VM1 is then equal to:
VM1=V1*z2231/(R1+z2231)
and so the transfer function is:
VM1/V1=z2231/(R1+z2231)
Now when you go back and substitute all the previous definitions in you get:
VM1=V1*C1*R1*(s*C2*C3*R2+C3+C2)/(s^2*C1*C2*C3*R1*R2+s*C2*C3*R2+s*C1*C2*R2+s*C1*C3*R1+s*C1*C2*R1+C3+C2+C1)
and since V1 is a step it is equal to Vpk/s we substitute that in for V1 and get:
(Vpk*C1*R1*(s*C2*C3*R2+C3+C2))/(s*(s^2*C1*C2*C3*R1*R2+s*C2*C3*R2+s*C1*C2*R2+s*C1*C3*R1+s*C1*C2*R1+C3+C2+C1))
That is the expression that we would find the Inverse Laplace Transform of. There could be up to 3
different time solutions depending on the values of the components.
Since this is a little complicated, let's say we have all the caps equal and all the resistors equal, that
means that:
C3=C2=C1=C
and:
R2=R1=R
and if we substitute C in for all caps and R in for all resistors, we end up with:
VM1=(Vpk*(2*s*C*R+3))/(s*(s*C*R+1)*(s*C*R+3))
Taking the Inverse Laplace Transform of that we get:
VM1(t)=-(Vpk*e^(-t/RC))/2-(Vpk*e^(-(3*t)/RC))/2+Vpk
where RC=R*C.
This is just one exponential but if it was more complicated as before we would have to look for 3 solutions
depending on the values of the components, unless we can specify the values before we take the inverse
transform.
If we then set RC=1 and Vpk=1 we get:
VM1(t)=-e^(-t)/2-e^(-3*t)/2+1
Sometimes it comes out simpler even with separate components if we specify the values before we take the
inverse transform. For example, as we use these values:
R1=1, R2=2, C1=1, C2=2, C3=3,
then we get:
VM1(t)=(e^(-(7*t)/8)*((44*sinh((sqrt(17)*t)/8)*Vpk)/(3*sqrt(17))-4*cosh((sqrt(17)*t)/8)*Vpk))/4+Vpk
and that can be simplifed further.
From the transfer function above we can also get the final value after a long time has passed by taking
the limit as s goes toward zero. The result will be VM1=Vpk and that is easy to verify by inpection.
Note there are other ways to do this also. One notable method is to replace V1 with a large number of
harmonics and sum the result at VM1 using superposition. For that we would use s=j*w and do the complex
math to get the total sum, then find the norm of that to get the voltage.
Using automatic software such as Maxima you can do these lines:
zC1:1/(s*C1);
zC2:1/(s*C2);
zC3:1/(s*C3);
z22:R2+zC2;
z223:zC3*z22/(zC3+z22);
z2231:zC1+z223;
VM1:V1*z2231/(R1+z2231);
and that will give you the solution in 's' and then you can substitute V1=Vpk/s and find the inverse
transform. I highly recommend replacing the cap and resistors values with their numerical values first though so you dont have to choose which solution you need, the software will choose the correct form.