Author Topic: RC time constant  (Read 5808 times)

0 Members and 1 Guest are viewing this topic.

Offline electrowhizTopic starter

  • Contributor
  • Posts: 28
  • Country: in
RC time constant
« on: August 21, 2019, 05:24:08 pm »
How to calculate the RC time constant of the attached circuit?
 

Offline Dave

  • Super Contributor
  • ***
  • Posts: 1356
  • Country: si
  • I like to measure things.
Re: RC time constant
« Reply #1 on: August 21, 2019, 05:53:21 pm »
http://sim.okawa-denshi.jp/en/CRCRkeisan.htm

You 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?
<fellbuendel> it's arduino, you're not supposed to know anything about what you're doing
<fellbuendel> if you knew, you wouldn't be using it
 

Offline bson

  • Supporter
  • ****
  • Posts: 2497
  • Country: us
Re: RC time constant
« Reply #2 on: August 21, 2019, 06:04:47 pm »
Vc = Vs(1-e^(-t/(RC)))

The RC time constant is the t where Vc/Vs = 1-1/e

For the cascaded case, remember that transfer functions of serial elements multiply.

« Last Edit: August 21, 2019, 06:14:45 pm by bson »
 

Offline Dave

  • Super Contributor
  • ***
  • Posts: 1356
  • Country: si
  • I like to measure things.
Re: RC time constant
« Reply #3 on: August 21, 2019, 08:12:46 pm »
For the cascaded case, remember that transfer functions of serial elements multiply.
Not 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.
<fellbuendel> it's arduino, you're not supposed to know anything about what you're doing
<fellbuendel> if you knew, you wouldn't be using it
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 9003
  • Country: us
  • Retired, now restoring antique test equipment
Re: RC time constant
« Reply #4 on: August 21, 2019, 08:48:49 pm »
When the circuit is more complicated than a single-pole R-C, the correct questions are what is the rise-time or bandwidth.
 

Offline electrowhizTopic starter

  • Contributor
  • Posts: 28
  • Country: in
Re: RC time constant
« Reply #5 on: August 22, 2019, 03:14:47 am »
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?
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 13217
Re: RC time constant
« Reply #6 on: August 22, 2019, 03:56:06 am »
If you know the component values and don't need an analytic solution, sim it with a SPICE program.
 

Offline Dave

  • Super Contributor
  • ***
  • Posts: 1356
  • Country: si
  • I like to measure things.
Re: RC time constant
« Reply #7 on: August 22, 2019, 10:34:32 am »
If you do need an analytic solution, the URL I provided above has everything you need.
<fellbuendel> it's arduino, you're not supposed to know anything about what you're doing
<fellbuendel> if you knew, you wouldn't be using it
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9964
  • Country: us
Re: RC time constant
« Reply #8 on: August 22, 2019, 02:48:12 pm »
If you do need an analytic solution, the URL I provided above has everything you need.

That'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?
 

Offline bson

  • Supporter
  • ****
  • Posts: 2497
  • Country: us
Re: RC time constant
« Reply #9 on: August 22, 2019, 04:55:15 pm »
For a second order system, what does "time constant" even mean?  63% charge on the first capacitor or on the second capacitor?
Or just calculate both time constants and let the teacher decide, if it's unclear.
 

Offline GerryR

  • Frequent Contributor
  • **
  • Posts: 256
  • Country: us
Re: RC time constant
« Reply #10 on: August 23, 2019, 12:25:36 am »
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.  :-//
Still learning; good judgment comes from experience, which comes from bad judgment!!
 

Offline Dave

  • Super Contributor
  • ***
  • Posts: 1356
  • Country: si
  • I like to measure things.
Re: RC time constant
« Reply #11 on: August 23, 2019, 01:03:10 pm »
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.  :-//
Well, 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. ::)
<fellbuendel> it's arduino, you're not supposed to know anything about what you're doing
<fellbuendel> if you knew, you wouldn't be using it
 

Offline Mattjd

  • Regular Contributor
  • *
  • Posts: 230
  • Country: us
Re: RC time constant
« Reply #12 on: August 23, 2019, 01:55:30 pm »
If you do need an analytic solution, the URL I provided above has everything you need.

That'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?


there'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
 

Offline The Electrician

  • Frequent Contributor
  • **
  • Posts: 747
  • Country: us
Re: RC time constant
« Reply #13 on: August 23, 2019, 04:11:39 pm »
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.  :-//
Well, let's put this claim to the test.

(Attachment Link)

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.
(Attachment Link)

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. ::)

You didn't plot the switched value version over a wide enough frequency range:

 
The following users thanked this post: Nitrousoxide

Offline bson

  • Supporter
  • ****
  • Posts: 2497
  • Country: us
Re: RC time constant
« Reply #14 on: August 23, 2019, 04:40:05 pm »
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.  :-//
Please don't do posters' homework for them here.  Hints are fine, but they need to do their own homework!
 

Offline Nitrousoxide

  • Regular Contributor
  • *
  • Posts: 156
  • Country: au
Re: RC time constant
« Reply #15 on: August 23, 2019, 05:00:23 pm »
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.
 

Offline Dave

  • Super Contributor
  • ***
  • Posts: 1356
  • Country: si
  • I like to measure things.
Re: RC time constant
« Reply #16 on: August 23, 2019, 06:01:02 pm »
You didn't plot the switched value version over a wide enough frequency range:
The 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.
<fellbuendel> it's arduino, you're not supposed to know anything about what you're doing
<fellbuendel> if you knew, you wouldn't be using it
 
The following users thanked this post: Nitrousoxide

Offline GerryR

  • Frequent Contributor
  • **
  • Posts: 256
  • Country: us
Re: RC time constant
« Reply #17 on: August 23, 2019, 11:31:54 pm »
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??
Still learning; good judgment comes from experience, which comes from bad judgment!!
 

Offline Nitrousoxide

  • Regular Contributor
  • *
  • Posts: 156
  • Country: au
Re: RC time constant
« Reply #18 on: August 24, 2019, 07:09:55 am »
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??

Time 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)
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9964
  • Country: us
Re: RC time constant
« Reply #19 on: August 24, 2019, 01:52:13 pm »
You didn't plot the switched value version over a wide enough frequency range:

What math package did you use for that plot?  It looks like something I should be playing with.
Thanks!
 

Offline The Electrician

  • Frequent Contributor
  • **
  • Posts: 747
  • Country: us
Re: RC time constant
« Reply #20 on: August 24, 2019, 02:07:15 pm »
You didn't plot the switched value version over a wide enough frequency range:

What math package did you use for that plot?  It looks like something I should be playing with.
Thanks!

It'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.
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3925
  • Country: de
Re: RC time constant
« Reply #21 on: August 24, 2019, 02:32:05 pm »

You didn't plot the switched value version over a wide enough frequency range:

What math package did you use for that plot?  It looks like something I should be playing with.
Thanks!

It'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.

Or 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.
 

Offline The Electrician

  • Frequent Contributor
  • **
  • Posts: 747
  • Country: us
Re: RC time constant
« Reply #22 on: August 24, 2019, 02:37:40 pm »
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.  :-//
Please don't do posters' homework for them here.  Hints are fine, but they need to do their own homework!

I 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.
 
The following users thanked this post: RonFred2

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3925
  • Country: de
Re: RC time constant
« Reply #23 on: August 24, 2019, 06:04:55 pm »
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.  :-//
Please don't do posters' homework for them here.  Hints are fine, but they need to do their own homework!

I 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.

Also the school is out in most places for a few weeks still. So a bit early for homeworks  ;)
 

Offline Mattjd

  • Regular Contributor
  • *
  • Posts: 230
  • Country: us
Re: RC time constant
« Reply #24 on: August 24, 2019, 07:04:57 pm »
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.



« Last Edit: August 24, 2019, 07:07:56 pm by Mattjd »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf