Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple circuit analysis 3

Status
Not open for further replies.

sibeen

Electrical
Jul 8, 2003
414
0
0
AU
I was having a look at a dual op-amp intergrator today - something that I haven't done for a very long time. I thought to myself "this couldn't be too hard" and quickly worked out what I assumed the output of the circuit would be, using some vaguely remembered formulas from long ago. Turns out that I was wrong and so I got some books out, looked up how to do it and got the correct result.

The thing is, I still don't know why my original method didn't work, and have looked at it for a few hours now without a light bulb moment. I actually went through an old circuit analysis book, blew the dust of it, and tried to find the answer; albeit well amongst the earlier chapters. Once I got to where it was discussing Laplace transforms my eyes began to glaze over, and the need for a strong beer became palpable.

I was able to sort out the beer, but the answer to my dilemma still eludes me. If any of you kind folk could peruse the attached PDF and give me a succinct answer I'd be well obliged.

I'm just hoping that the answer isn't another bloody differential equation :)
 
Replies continue below

Recommended for you

A fixed value current source (e.g. 50 μA) into a capacitor makes a linear (over time) voltage rise. In fact, that's how (current source and capacitor) one often makes a nice ramp waveforms. The difference here is that you're siphoning off a current into a parallel resistor; the current (obviously) varies with voltage.
 
I think that sibeen is very well aware of that parallel resistor. It is included in his first equation. I also think that he is aware of the Thevein equivalent.

I am not so sure what his problem is. If it is the parasitic interaction between two coupled RC circuits, then there are loads of texts about that. But, really, I have not understood the question yet.

Gunnar Englund
--------------------------------------
Half full - Half empty? I don't mind. It's what in it that counts.
 
But, isn't your equation a direct consequence of assuming a step input? If your input is now time-varying, then the solution to the diff eq is different and will not have the identical form.

TTFN
faq731-376
7ofakss
 
IRstuff is right - that equation you've used (Vr = Vf + (Vi-Vf)e^(-t/RC)) is the solution to a particular differential equation. In particular, it is the solution to the differential equation given by the circuit when the input is a step function. I know a lot of people memorise this equation and attach all sorts of value to it, but it's important to keep in mind that it's value really only extends to two things:

1) Providing the basic model of exponential charge and discharge of a capacitor or inductor when nothing else changes. In others, it captures a general idea to do with first order decay/growth.
2) Answering Q1 of any introductory text on capacitor charging.

Note that (2) does not extend to solving general circuit problems. Trying to apply the formula is often dangerous - you really should start again each time.

I'm afraid that in order to see how things change when the input changes, you need another one of your dreaded differential equations! But fear not, differential equations simply model values that change over time - like a car accelerating covers a distance [tt]s = v*t + (1/2)a*t*t[/tt] is a differential equation. Just because we write [tt]a[/tt] for acceleration instead of [tt]dv/dt[/tt] doesn't change the fact that very common things are modelled using differential equations.

Back to your circuit. The equation for a resistor is [tt]v = i*R[/tt] and for a capacitor [tt]i = C * (dv/dt)[/tt]. Since all the current that leaves our source splits into the resistor and capacitor, the actual equation that models the circuit is this:

[tt]i = v/R + C(dv/dt)[/tt]
[tt]=> (dv/dt) + 10v = 1000000*i[/tt]

remembering that both [tt]i[/tt] and [tt]v[/tt] are functions of time, [tt]t[/tt].

This is a first order differential equation and would be easy to solve, except that [tt]i[/tt] might get tricky to integrate.

If we take your first case, [tt]i[/tt] is just a step from 0 to 50uA. We can just manage to integrate that by hand, representing the unit step function by [tt]u[/tt]:

[tt](dv/dt) + 10*v = 1000000*i[/tt]
[tt]=> (dv/dt) + 10*v = 50*u[/tt]
[tt]=> ( v*e^(10*t) )' = 50*e^(10*t)*u[/tt]
[tt]=> v*e^(10*t) = 5*e^(10*t) + c[/tt] (integrating both sides, integration constant [tt]c[/tt])
[tt]=> v = 5 + c*e^(-10*t)[/tt]
[tt]=> v = 5 - 5*e^(-10*t)[/tt] (using initial conditions to solve for [sub]c[/sub])

If you rearrange this, you can see your (Vr = Vf + (Vi-Vf)e^(-t/RC)) form.
But if we use i2 instead, that integration is different:

[tt](dv/dt) + 10*v = 1000000*i[/tt]
[tt]=> (dv/dt) + 10*v = 50 - 50*e^(-20*t)[/tt]
[tt]=> ( v*e^(10*t) )' = 50*e^(10*t) - 50*e^(-10*t)[/tt]
[tt]=> v*e^(10*t) = 5*e^(10*t) + 5*e^(-10*t) + c[/tt] (integrating both sides, integration constant [tt]c[/tt])
[tt]=> v = 5 + 5*e^(-20*t) + c*e^(-10*t)[/tt]
[tt]=> v = 5 + 5*e^(-20*t) - 10*e^(-10*t)[/tt] (using initial conditions to solve for [tt]c[/tt])

So I guess the problem just boils down to you starting with the wrong equation. You really started with the solution to a particular problem, instead of the equation for the circuit. If it helps, you could just make the circuit equation general, and leave [tt]i[/tt] as a variable:

[tt](dv/dt) + (1/(R*C))*v = (1/C)*i[/tt]
[tt]=> ( v*e^(t/(R*C)) )' = (1/C)*i*e^(t/(R*C))[/tt]

From there you only have to sub in [tt]R[/tt], [tt]C[/tt] and [tt]i[/tt], and integrate both sides to get the specific solution.
 
Hmm, maybe that's not quite as succinct as you were hoping! In brief:

(Vr = Vf + (Vi-Vf)e^(-t/RC)) does not work in general because it is the solution to the governing differential equation when the input is a step function. The point in the derivation at which things change is at the end of this standard method:

[tt]i = v/R + C*(dv/dt)
=> (dv/dt) + (1/RC)*v = (1/C)*i
=> ( v*e^(t/RC) )' = (1/C)*e^(t/RC)*i
[/tt]

From here you would plug in [tt]i[/tt] and integrate both sides (remembering to include the integration constant). For a step current [tt]i[/tt], it's simply follows thus:

[tt]
( v*e^(t/RC) )' = (1/C)*e^(t/RC)*i
=> v*e^(t/RC) = 5*e^(t/RC) + c
=> v = 5 + c*e^(-t/RC)
[/tt]

Using initial conditions of [tt]v = v_i[/tt] at [tt]t = 0[/tt] to solve for [tt]c[/tt], you get: [tt]v = 5 + (v_i - 5)*e^(-t/RC)[/tt] as expected.

If i is not a step function, the integration step is different. See my previous response for the derivation in that case.
 
LiteYear, thanks for helping me out on this.

It has been a very long time since I've looked at anything like this.

You write:

=> (dv/dt) + (1/RC)*v = (1/C)*i

and then:

=> ( v*e^(t/RC) )' = (1/C)*e^(t/RC)*i

I can't see how you got between these two steps. What does the )' signify?

I'm probably just thick :)
 
OK. Is this the question? "Why doesn't the the response of a multi-stage RC filter follow the same equation as the response of a single RC link?" I had an impression that the OP was well beyond that stage.

If that is the question, then you cannot avoid another bloody (as you put it) differential equation.

Well, yes you can avoid it. Use Laplace (or some other operator method) or run a simulation.

Actually, you can sometimes avoid active filters when building a second (or third) order filter if you use higher and higher order of magnitudes of resistor values as you add filter sections. With two sections, you get a typical second order response, exactly as shown in the OP. What is typical, you may ask. Answer: the inflexion point. You can never have an inflexion point in a passive one stage filter.

Why avoid opamps? Simply because they introduce new problems. Like the need for a power supply, some noise, DC offset, sensitivity to RF and temperature, limited band-width. There are really good opamps that laugh at most of these issues. But still, they add complexity and they still haven't got to that stage in evolution where they can work without power supply.


Gunnar Englund
--------------------------------------
Half full - Half empty? I don't mind. It's what in it that counts.
 
Skogsgurra, the question is in the original attachment. It's not to do with higher order filters (although one could model it as such).

sibeen, good question - there is a bit of a jump at that point if you're not familiar with ODE (ordinary differential equations). The answer is that this is the solution to a first order, linear, ordinary differential equation:

[tt]df/dt + P(t)*f(t) = Q(t)
=> ( f(t)*I(t) ) ' = Q(t)*I(t)[/tt]

where [tt]( )'[/tt] means "differentiated with respect to [tt]t[/tt]" or [tt]d/dt[/tt],
and [tt]I(t)[/tt] is the "integrating factor", equal to [tt]e[/tt] to the power of the integral of [tt]P(t)[/tt]: [tt]I(t) = e^(int(P(t))[/tt]

You can prove it to yourself by going back the other way using the product rule of differentiation:

[tt]( f(t)*I(t) ) ' = Q(t)*I(t)
=> (df/dt)*I(t) + (dI/dt)*f(t) = Q(t)*I(t)
=> (df/dt)*I(t) + (d/dt)(e^int(P(t))*f(t) = Q(t)*I(t)
=> (df/dt)*I(t) + P(t)*(e^int(P(t))*f(t) = Q(t)*I(t)
=> (df/dt)*I(t) + P(t)*I(t)*f(t) = Q(t)*I(t)
=> df/dt + P(t)*f(t) = Q(t)
[/tt]

Pretty cool ay? Once you've seen it a hundred times, you can skip all the steps in between.
 
LiteYear, thanks.

It's been a very long time since I've even looked at an ODE, and I'm afraid all that information has appeared to have been lost in the intervening years.

I suspect I'll spend a day over at Mr Khan's site trying to regain some semblance of it :)
 
Thanks LiteYear. You certainly have seen a few hundred differential equations lately. I use them only occasionally. And only when people ask about things that need differential equations to be understood. Simulate mostly.

Gunnar Englund
--------------------------------------
Half full - Half empty? I don't mind. It's what in it that counts.
 
A simple mathematical answer

If you choose a capacitor for an integrator and have leakage with a parallel resistance, if you want good linearity, you want to choose I&R&C values such that the steady state voltage into for V= I * R alone is about 5x your desired integrator swing. This avoids the latter exponential part of the curve and could be compromised from 5x to as low as 2x worst case desired output swing. Meaning the "Integrator" operates on the first 50% of the exponential curve, where it is "quasi-linear" within a few percent error.

Obviously your choice of capacitor is critical, so choose any plastic Film Cap every time when considering something in the uF range and avoid the 100kOhm leakaage.
This is how you can generate perfect Sawtooths from step inputs or triangle waves from square waves etc.

( Post mortem analysis)
using 50 uA current source and 100K with 1uF gives V= I*R= 5V which is probably not 5x your desired Integrator range.
So you can either in crease I or R or reduce V operating range..
 
Sunny
Please show us old-timers some respect and read the whole thread before jumping in with simplistic and not-so-valid answers.

Gunnar Englund
--------------------------------------
Half full - Half empty? I don't mind. It's what in it that counts.
 
I fail to see the lack of validity. The Op requested a simplistic no so Laplacian answer which I offered,.. as for age, I'm older than dirt and designed by 1st integrator in 1970.
 
Status
Not open for further replies.
Back
Top