Sign up ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free.

I found the following image on

enter image description here

Isn't this wrong? Shouldn't the voltage rise faster during the first 2T than that it decreases during the next half period? I think so because the voltage difference at t=0 is Vc, which is higher than the voltage difference at t=2T. Shouldn't the triangle wave ultimately go halfway Vc(max), with difference distributed evenly below and above the curve?
(I hope I make myself clear.)

share|improve this question
I can't see the embedded picture - this may apply to other users of IE – Andy aka Dec 14 '13 at 17:13
@Andyaka I can see it in Firefox. Can you see it on the original page (link in question)? – pebbles Dec 14 '13 at 17:58
@pebbles there are a bunch of pictures in the link and I don't know which one. – Andy aka Dec 14 '13 at 18:09

3 Answers 3

up vote 6 down vote accepted

Yes, it actually looks like this (doing a numerical integration of the differential equation):

sawtooth ending up between about 0.12 and 0.88

At equilibrium, the peaks of the sawtooth are at \${1\over 1+e^{T\over 2RC}}V_S\$ and \${e^{T\over 2RC}\over 1+e^{T\over 2RC}}V_S\$, where \$T\$ is the period of the square wave (different from the \$T\$ in the question plot). For this example, that's about \$0.12V_S\$ to \$0.88V_S\$.

In that case equilibrium is reached very fast. For a higher frequency square wave, it can take a few cycles. In this example, the period of the square wave is \$RC\over 2\$ instead of \$4RC\$:

slower rise for higher frequency

share|improve this answer
Thanks. Just a nag: can't Mathematica do the DE analytically? :-) – flup Dec 15 '13 at 8:21
Yes it certainly can, but that would take more care and feeding. Doing it numerically with NDSolve[] was just one line. Took about 30 seconds to type in, boom, done. Then another line for the plot. I did then solve analytically for the equilibrium peaks, though I didn't use DSolve[] since I already knew the equations. – Mark Adler Dec 15 '13 at 8:34
Small request: could you make the vertical scale from 0 to 1 in the second graph too? It better shows the symmetry. – amadeus Dec 15 '13 at 8:46

Like Wouter says the discharge voltage should be negative to get this curve. More precisely it should be -difference V. So indeed, like you surmised the curve will end up halfway the charge and discharge voltages. Note that at t = 0 it will start from V = 0V, and over a few cycles move up.

share|improve this answer
Actually it gets to equilibrium very fast. It's extremely close within one cycle. The first peak is within 2% of the equlibrium peak, and the first trough is within 2% as well. The next peak and trough are within 0.03%. – Mark Adler Dec 15 '13 at 1:24
@MarkAdler: you're right that in this case equilibrium is reached fast, but I was thinking in more general terms. If the signal's period is much shorter than RC then it may take several cycles. – amadeus Dec 15 '13 at 8:36
Yes, it will. I'll add an example of that to my answer. – Mark Adler Dec 15 '13 at 8:41

You are right. The curve as shown requires that the discharge voltage is negative.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.