RC time constant - Page 1
Forum section: electronics / beginners

author: electrowhiz
author_rank: Contributor
timestamp: August 21, 2019, 05:24:08 pm
content: How to calculate the RC time constant of the attached circuit?

author: Dave
author_rank: Super Contributor
timestamp: August 21, 2019, 05:53:21 pm
content: http://sim.okawa-denshi.jp/en/CRCRkeisan.htmYou don't have a time constant as such in a 2nd order system, as you would in a 1st order system. What exactly are you trying to accomplish?

author: bson
author_rank: Unknown
timestamp: August 21, 2019, 06:04:47 pm
content: Vc = Vs(1-e^(-t/(RC)))The RC time constant is the t where Vc/Vs = 1-1/eFor the cascaded case, remember that transfer functions of serial elements multiply.

author: Dave
author_rank: Super Contributor
timestamp: August 21, 2019, 08:12:46 pm
content: Quote from: bson on August 21, 2019, 06:04:47 pmNot quite. The second RC element affects the first one, altering the response. Your statement would be true if there was a buffer amplifier between C1 and R2.

author: TimFox
author_rank: Super Contributor
timestamp: August 21, 2019, 08:48:49 pm
content: When the circuit is more complicated than a single-pole R-C, the correct questions are what is the rise-time or bandwidth.

author: electrowhiz
author_rank: Contributor
timestamp: August 22, 2019, 03:14:47 am
content: Hi, I just want to know the response of this circuit for step input. How long will it take for cap C1 and C2 to charge? Do u know any ways to find the duration it takes to charge?

author: Ian.M
author_rank: Super Contributor
timestamp: August 22, 2019, 03:56:06 am
content: If you know the component values and don't need an analytic solution, sim it with a SPICE program.

author: Dave
author_rank: Super Contributor
timestamp: August 22, 2019, 10:34:32 am
content: If you do need an analytic solution, the URL I provided above has everything you need.

author: rstofer
author_rank: Super Contributor
timestamp: August 22, 2019, 02:48:12 pm
content: Quote from: Dave on August 22, 2019, 10:34:32 amThat's a great link! You just know the thing is a second order differential equation and that Laplace Transforms are going to show up somewhere. MATLAB can probably plot the equation for particular values.LTspice is one way, Runge-Kutta and Fortran is another.For a second order system, what does "time constant" even mean? 63% charge on the first capacitor or on the second capacitor?

author: bson
author_rank: Unknown
timestamp: August 22, 2019, 04:55:15 pm
content: Quote from: rstofer on August 22, 2019, 02:48:12 pmOr just calculate both time constants and let the teacher decide, if it's unclear.

author: GerryR
author_rank: Frequent Contributor
timestamp: August 23, 2019, 12:25:36 am
content: The first R-C group has a break frequency at 1/ 2pi R1C1 at 20 db / decade (1st order filter); the second R-C group has a break frequency at 1/2pi R2C2 at 20 db / decade (1st order filter). Where the frequencies overlap, they roll off at 40 db / decade, a 2nd order filter.

author: Dave
author_rank: Super Contributor
timestamp: August 23, 2019, 01:03:10 pm
content: Quote from: GerryR on August 23, 2019, 12:25:36 amWell, let's put this claim to the test.Seems to hold up, -20 dB per decade after the first break frequency, -40 dB per decade after the second break frequency. So far so good.Now let's switch their values.Hmm... Weird, it suddenly behaves just like a 1st order LPF. The corner frequency seems to be closest to 1 / (2 * pi * R1 * C2).It's almost as if the second pair of components is affecting the response of the first pair.

author: Mattjd
author_rank: Regular Contributor
timestamp: August 23, 2019, 01:55:30 pm
content: Quote from: rstofer on August 22, 2019, 02:48:12 pmthere's a lot of heuristics, but for example, if you have a nth order system, depending on location of poles/zeros and what their residuals are (wrt to the dominate poles), you can ignore them and treat it as a 2nd order system. Same applies for a second order system

author: The Electrician
author_rank: Frequent Contributor
timestamp: August 23, 2019, 04:11:39 pm
content: Quote from: Dave on August 23, 2019, 01:03:10 pmYou didn't plot the switched value version over a wide enough frequency range:

author: bson
author_rank: Unknown
timestamp: August 23, 2019, 04:40:05 pm
content: Quote from: GerryR on August 23, 2019, 12:25:36 amPlease don't do posters' homework for them here. Hints are fine, but they need to do their own homework!

author: Nitrousoxide
author_rank: Regular Contributor
timestamp: August 23, 2019, 05:00:23 pm
content: A good exercise would be to derive the transfer functions for a fully passive second-order network and a cascade of 1'st order networks with an intermediate buffer.You will (or should) see that the "center" frequency will remain the same (Hint: the 0th order term in the denominator when simplifying), Whilst the 1st order term will vary. The first-order term contains information about the system damping and thus can lead you to an answer about the system settling time.As mentioned before the "time-constant" is not really applicable to second-order systems. However, if the system is critically damped (zeta = 1), both the poles of the system will be purely real and exist on the same point (repeated root), thus it can be seen as two identical networks charging (Note: This is only for the buffered case). Think for what values of R and C this would occur.

author: Dave
author_rank: Super Contributor
timestamp: August 23, 2019, 06:01:02 pm
content: Quote from: The Electrician on August 23, 2019, 04:11:39 pmThe point stands, you can't evaluate a second order system by simplifying it to a combined response of two first order systems, because without an intermediate buffer, they affect each other.

author: GerryR
author_rank: Frequent Contributor
timestamp: August 23, 2019, 11:31:54 pm
content: Your point is well taken, but why would anyone, or should I say for what reason would anyone, put the higher break frequency of a low-pass filter ahead of the the one with the lower break frequency in a stacked filter like that? Maybe just to prove a point??

author: Nitrousoxide
author_rank: Regular Contributor
timestamp: August 24, 2019, 07:09:55 am
content: Quote from: GerryR on August 23, 2019, 11:31:54 pmTime domain and phase response. This is could be potentially critically important for system compensation. Say for maximising time-domain performance whilst ensuring stability. (i.e. say you want an underdamped response versus a critically damped response)

author: rstofer
author_rank: Super Contributor
timestamp: August 24, 2019, 01:52:13 pm
content: Quote from: The Electrician on August 23, 2019, 04:11:39 pmWhat math package did you use for that plot? It looks like something I should be playing with.Thanks!

author: The Electrician
author_rank: Frequent Contributor
timestamp: August 24, 2019, 02:07:15 pm
content: Quote from: rstofer on August 24, 2019, 01:52:13 pmIt's Mathematica. Along with the other top-of-the line packages, Maple and Matlab, its commercial version is expensive. Student versions are available [for verifiable students]. I'm still using an old version of Mathematica.There's a free package, Maxima (http://maxima.sourceforge.net/), which is comparable in performance.

author: janoc
author_rank: Super Contributor
timestamp: August 24, 2019, 02:32:05 pm
content: Quote from: The Electrician on August 24, 2019, 02:07:15 pmOr save your money and aggravation and use JupyterLab like everyone (well, almost) else for numerics:https://jupyterlab.readthedocs.io/en/stable/Jupyter has pretty much replaced Matlab for anything numerics and statistics (e.g. machine learning) related in research these days.If you need symbolic math (that's where Mathematica and to a lesser degree Maxima & Maple excel), you can either use Maxima or SymPy from Jupyter ((https://www.sympy.org/en/index.html)And, if you don't like the browser-based UI, Jupyter is just a frontend to Numpy and a lot of other Python packages which you can use from your favorite Python IDE as well.

author: The Electrician
author_rank: Frequent Contributor
timestamp: August 24, 2019, 02:37:40 pm
content: Quote from: bson on August 23, 2019, 04:40:05 pmI don't think this is homework. If you'll look at electrowhiz's other posts, it appears that he is self-educating about RC circuits.

author: janoc
author_rank: Super Contributor
timestamp: August 24, 2019, 06:04:55 pm
content: Quote from: The Electrician on August 24, 2019, 02:37:40 pmAlso the school is out in most places for a few weeks still. So a bit early for homeworks

author: Mattjd
author_rank: Regular Contributor
timestamp: August 24, 2019, 07:04:57 pm
content: Word of advice, stay away any symbolic math packages in python, they're garbage.Numpy, scipy, sklearn, matplotlib, bokeh and pandas can do 90 percent of what Matlab does for free. No denying that.What python lacks is a good symbolic engine and Simulink, both of which Matlab has. Simulink is still the preferred method of designing controllers in commercial industries.

author: janoc
author_rank: Super Contributor
timestamp: August 25, 2019, 11:45:45 am
content: Quote from: Mattjd on August 24, 2019, 07:04:57 pmCare to elaborate?Do you mean Sympy? I dare to say that it does more than most will need. It is certainly not Mathematica, but it also doesn't cost arm and leg and your firstborn. I have used it to derive some complicated jacobians involving quaternions for a SLAM system and it certainly was able to deal with that. The kind of stuff that has been posted earlier in that Mathematica example is certainly possible with it with no issues.If Sympy isn't enough, there is also the older Sage project (http://www.sagemath.org/) that is more powerful than Sympy (it is used for mathematical research, such as number theory, so I dare to say its symbolic capabilities are decent).If neither of that works, there are Python (or JupyterLab) frontends to Maple, Maxima (Sage uses Maxima under the hood), even Mathematica and the now free (as in beer) Mathematica kernel/Wolfram Engine (basically Mathematica meant for embedding in other things, no UI and a restrictive license)Quote from: Mattjd on August 24, 2019, 07:04:57 pmSimulink yes, but then Python is a general purpose programming language + libraries, not a specialized tool (where the programming bit is mostly a messy afterthought - ehm Matlab ...). However, we were talking about plotting graphs and doing basic math, not designing controllers (or similar activities) where one benefits from one of the many specialized (and expensive) Matlab/Simulink toolboxes.

author: Mattjd
author_rank: Regular Contributor
timestamp: August 25, 2019, 01:25:02 pm
content: Idk about magma but sympy is notoriously bad. From first hand experience performance is poor and its limitations are large.This can be backed up by the large amounts of quora and stack posts.Honestly, I'd tell OP to get a ti nspire Cas but if they can afford that then they can afford a Mathematica student license.

author: janoc
author_rank: Super Contributor
timestamp: August 25, 2019, 03:09:33 pm
content: Quote from: Mattjd on August 25, 2019, 01:25:02 pmThat was not my experience (and seriously, Stack Overflow and Quora posts are hardly an indicator of anything except that the software in question is popular and being used ...)Quote from: Mattjd on August 25, 2019, 01:25:02 pmHum, Mathematica is 160 EUR (+ VAT if applicable) for a student license and you need to provide a proof of university enrollment (no idea whether the OP is eligible for that, plus he is in India, so that price is certainly no peanuts). Seriously, buying that only for solving a system of equations?I had a personal (non-student) Mathematica license and while that software is very powerful, it is an enormous overkill unless you need its capabilities every day. I have ended up not renewing the license because most of my work required fast and easy to use numerical math - and that's where Mathematica actually sucks because it is very clunky for such use (or I can't wrap my head around the weird syntax sufficiently to not get triggered by the messy code - and I have no issues with Lisp and parentheses normally!)

author: GerryR
author_rank: Frequent Contributor
timestamp: August 25, 2019, 11:58:23 pm
content: How about just getting a "Math for Electronics" book and learn how to do the transfer functions and Bode plots etc. I have several; of course I realize an analysis program makes it easier, but it is good foundation learning.Happy to make some recommendations for you, if you are interested.

author: Mattjd
author_rank: Regular Contributor
timestamp: August 26, 2019, 12:11:26 am
content: That's probably the best suggestion. At the end of the day these mathes arnt hard.Whats the general method?Parts are considered linear, therefore superposition applies. Take laplace transform of each individual component(applicable bc parts are linear and the laplace transform is a linear operator) and create a transfer function. Perform partial fraction decomposition, then take the inverse laplace transform. Done.Or you could go the long way, derive ode, find forced and natural responseOr its a steady state circuit(as opposed to transient) , use phasors (aka natural response)

author: The Electrician
author_rank: Frequent Contributor
timestamp: August 26, 2019, 07:30:34 am
content: Quote from: Dave on August 22, 2019, 10:34:32 amIt doesn't have everything; an analytic solution is provided for the frequency response but not for the time response.An expression for the time response of the low pass topology shown here:http://sim.okawa-denshi.jp/en/CRCRkeisan.htmcan be derived with the help of Mathematica:The numerical values shown on this page:http://sim.okawa-denshi.jp/en/CRCRtool.phpcan be used with the derived expression to produce a plot of the time response of the circuit shown:A time response plot with the two sections reversed (R2/C2 first, R1/C1 second) is as shown:

author: Dave
author_rank: Super Contributor
timestamp: August 27, 2019, 12:40:15 pm
content: Quote from: The Electrician on August 26, 2019, 07:30:34 amA boatload of exponents doesn't seem mighty helpful, IMO.Manually doing inverse Laplace transforms only makes sense when expressions are simple enough to even make sense doing it (learning mathematics, for example). For anything more complex you'd use a computer anyhow.

author: The Electrician
author_rank: Frequent Contributor
timestamp: August 27, 2019, 07:21:11 pm
content: Quote from: Dave on August 27, 2019, 12:40:15 pmI suppose that if one isn't interested in an analytical solution for the time response, exponents aren't helpful. But, if an analytical solution is of interest, exponents are inevitable.Quote from: Dave on August 27, 2019, 12:40:15 pmIdiduse a computer to obtain the expression shown. You don't think I came up with all those exponents by hand, do you?

author: Wimberleytech
author_rank: Super Contributor
timestamp: August 28, 2019, 01:49:20 am
content: Pick the node of interest and use Elmore's approximation.

author: The Electrician
author_rank: Frequent Contributor
timestamp: August 29, 2019, 03:22:40 pm
content: Quote from: Wimberleytech on August 28, 2019, 01:49:20 amBefore software packages such as Mathematica or Maple were available, the calculations involved in obtaining an Elmore approximation were less than those for finding the exact time response:https://ieeexplore.ieee.org/document/545648(This is a 22 year old paper. Mathematical software has become much more powerful in the intervening years.)andhttps://en.wikipedia.org/wiki/Elmore_delay(moments or Pade approxmations are needed)But now with the availability of software like Mathematica with built-in Inverse Laplace transforms, and fast computers to go along with the software, it's quicker to get the analytical expression for the time response than to calculate the Elmore delay.Here is the calculation and plot of the time response of the twin tee filter shown here:http://sim.okawa-denshi.jp/en/TwinTCRtool.phpIt took Mathematica about 1 second to find the Inverse Laplace transform. The full transform expression isn't shown because it's several pages long.

author: Wimberleytech
author_rank: Super Contributor
timestamp: August 29, 2019, 03:38:46 pm
content: QuoteTo be fair, I think Pileggi's work was not simply to analyze an RC network. IMHO, his work was to develop a fast method to calculate delays in large-scale timing analyzers (for integrated circuit design).

author: schratterulrich
author_rank: Regular Contributor
timestamp: August 31, 2019, 04:02:47 pm
content: In general for second order systems there exists three cases:Critically dampedUnderdampedOverdampedif we assume that this circuit always generates an overdamped case, there is a simpler analytic solution in the time domain:proof:I have derived the formula using this document:https://www.eal.ei.tum.de/fileadmin/tueieal/www/courses/AESACA/5__Responce_first_and_second.pdf

author: ledtester
author_rank: Super Contributor
timestamp: September 01, 2019, 03:07:51 am
content: Quote from: schratterulrich on August 31, 2019, 04:02:47 pmThis condition always holds.It follows from the inequality a^2 + b^2 >= 2*a*b. Use a = sqrt(R1*C1), b = sqrt(R2*C2).It follows from the inequality \$a^2 + b^2 \ge 2ab\$. Use \$a = \sqrt{R_1C_1}\$, \$b = \sqrt{R_2C_2}\$.