Proving RL and RC circuits acts as differentiator or integrator using Differential Equations

Thread Starter

onurcevik

Joined Dec 21, 2016
12
Hi, our professor gave us a homework here is the description:

We must prove if RL and RC circuits acts as integrator or differentiator or both using differential equations. I know differential equations but sadly i am very bad at circuits and terrible at solving RL,RC circuits using dif. eq. . So far i got help from some of my friends and internet and already solved RC as differentiator but if its wrong please correct my mistakes andon RC as integrator is halfway done.

Here is my progression:


*******
The current through the circuit is the same as the current through the capacitor then:

iC=C*(dVi/dt)


So the voltage across the resistor is

VR=R*iC=R*C*(dVi/dt)


As we measure the output voltage across the resistor then the output voltage is
Vo=R*C*(dVi/dt)

Thus the RC circuit with an output across the resistor is a differentiator since it differentiates the input voltage.

This one is one of the solutions with the help i get but on this video on youtube
solution is different than mine which one is true ? Did i made mistake ?

********

I still stuck at RL as integrator and differentiator. So if you can Show me some way to do it or solve RL as integrator or diffferentaitor to Show me how to do other i would really appericiate it.

Btw we got 1 week and i have 5 days left so this homework is kinda urgent and sorry for my English.
 
Last edited:

MrAl

Joined Jun 17, 2014
6,770
Hi, our professor gave us a homework here is the description:

We must prove if RL and RC circuits acts as integrator or differentiator or both using differential equations. I know differential equations but sadly i am very bad at circuits and terrible at solving RL,RC circuits using dif. eq. . So far i got help from some of my friends and internet and already solved RC as differentiator but if its wrong please correct my mistakes andon RC as integrator is halfway done.

Here is my progression:


*******
The current through the circuit is the same as the current through the capacitor then:

iC=C*(dVi/dt)


So the voltage across the resistor is

VR=R*iC=R*C*(dVi/dt)


As we measure the output voltage across the resistor then the output voltage is
Vo=R*C*(dVi/dt)

Thus the RC circuit with an output across the resistor is a differentiator since it differentiates the input voltage.

This one is one of the solutions with the help i get but on this video on youtube
solution is different than mine which one is true ? Did i made mistake ?

********

I still stuck at RL as integrator and differentiator. So if you can Show me some way to do it or solve RL as integrator or diffferentaitor to Show me how to do other i would really appericiate it.

Btw we got 1 week and i have 5 days left so this homework is kinda urgent and sorry for my English.

Hi,

I am not sure you can get away with that simplified version, i guess it depends what your instructor is looking for.

For one, the current in the cap is not:
iC=C*dVi/dt

it is:
iC=C*dVc/dt

where Vc is the voltage across the CAPACITOR which is connected from input to output.

Second, the equation:
Vr=R*C*dVi/dt

can not be correct because that is an ideal differentiator and the RC circuit is just an approximate differentiator (both with R*C constant). If you do in fact get that result anyway then you would have to show more explicitly how you can get that from a non ideal differentiator.

I think what you have to do is show how the RC circuit becomes an APPROXIMATE differentiator under certain conditions such as certain R and/or C and maybe a specific time frame.

For example, you should be able to show how a given test input signal turns into a differentiated version of that signal at the output, as an approximation, and show when that approximation is valid.
 

Thread Starter

onurcevik

Joined Dec 21, 2016
12
Hi,

I am not sure you can get away with that simplified version, i guess it depends what your instructor is looking for.

For one, the current in the cap is not:
iC=C*dVi/dt

it is:
iC=C*dVc/dt

where Vc is the voltage across the CAPACITOR which is connected from input to output.

Second, the equation:
Vr=R*C*dVi/dt

can not be correct because that is an ideal differentiator and the RC circuit is just an approximate differentiator (both with R*C constant). If you do in fact get that result anyway then you would have to show more explicitly how you can get that from a non ideal differentiator.

I think what you have to do is show how the RC circuit becomes an APPROXIMATE differentiator under certain conditions such as certain R and/or C and maybe a specific time frame.

For example, you should be able to show how a given test input signal turns into a differentiated version of that signal at the output, as an approximation, and show when that approximation is valid.
Thanks for the correction and about simplified version i think you are right if i make it longer and more explainive i think my instructor will like it more. But the thing is we didn't learn much about this topic(we just watched couple of youtube videos on class and read some PowerPoint slides and solved couple capacitor problems.) and since i have been trying to find formulas and way to solve this on internet for 3 days and now i return to the start i got 3.5 days left. Can you give me more tips about this please. I know how to solve dif. eq. but since i didn't learn much about this yet i cant build the equations(don't know where to start what to do etc. ) for example how im gonna solve it differentiator or integrator. Am i gonna use same formulas for both. Any help is greatly appericated.

And is the guy on the video i posted solving it in the right way ?
 

MrAl

Joined Jun 17, 2014
6,770
Thanks for the correction and about simplified version i think you are right if i make it longer and more explainive i think my instructor will like it more. But the thing is we didn't learn much about this topic(we just watched couple of youtube videos on class and read some PowerPoint slides and solved couple capacitor problems.) and since i have been trying to find formulas and way to solve this on internet for 3 days and now i return to the start i got 3.5 days left. Can you give me more tips about this please. I know how to solve dif. eq. but since i didn't learn much about this yet i cant build the equations(don't know where to start what to do etc. ) for example how im gonna solve it differentiator or integrator. Am i gonna use same formulas for both. Any help is greatly appericated.

And is the guy on the video i posted solving it in the right way ?

Hello again,

I think he had shown an interesting way to do it, but he had shown WHY this approximation MIGHT work. You need to show that in your solution also or else it wont be valid.
Around 3:10 he states that C and R are small. That is a necessary condition in order to get a good approximate differentiator. If you dont state that, it can not be assumed that it is a good approximation and so stating the conditions (as i was saying earlier) has to be part of the solution.
You also have to know why you have to assume C and R small, which is stated in the video (which is to get rid of one of the terms and thus simplify the solution).
 

Thread Starter

onurcevik

Joined Dec 21, 2016
12
Hello again,

I think he had shown an interesting way to do it, but he had shown WHY this approximation MIGHT work. You need to show that in your solution also or else it wont be valid.
Around 3:10 he states that C and R are small. That is a necessary condition in order to get a good approximate differentiator. If you dont state that, it can not be assumed that it is a good approximation and so stating the conditions (as i was saying earlier) has to be part of the solution.
You also have to know why you have to assume C and R small, which is stated in the video (which is to get rid of one of the terms and thus simplify the solution).
Thanks for the reply again. I'll start to get the point and i was just discussing with another engineer and he said "A simple RC (or RL) is neither a perfect integrator nor a perfect differentiator because of the presence of the resistor. So don't waste your time trying to prove it." But i dont think that my instructor would accept that answer :/. I think i will use the simplified solution with assuming C and R are small with explanation as text . Any further help would be appericated.
 

MrAl

Joined Jun 17, 2014
6,770
Thanks for the reply again. I'll start to get the point and i was just discussing with another engineer and he said "A simple RC (or RL) is neither a perfect integrator nor a perfect differentiator because of the presence of the resistor. So don't waste your time trying to prove it." But i dont think that my instructor would accept that answer :/. I think i will use the simplified solution with assuming C and R are small with explanation as text . Any further help would be appericated.
Hi,

Yes he is right, but i do not believe that is the right view to take on this problem. That is because the circuit you show with the R and C *is* called a differentiator circuit sometimes (other times a 'lead' circuit) but it is assumed that the user knows full well that it is not perfect but wishes to show WHEN it can still be used as a differentiator. It has and still will be used as a differentiator circuit even though it is not perfect. All you have to do is show that it can be used if conditions are right.

If you had an application, you could show how it works OK in that application for example when certain R and C are chosen. In fact, the choice of R and C are the main concern, because with the right values (relative to the application) it works good enough so that we dont have to add an op amp to get a more perfect differentiator.

But if you follow that video (which i did not look at until you mentioned it in your more recent post) that should show you how this works, using that approach. So the question is, are you following that video and if so, is there anything you dont understand or some place where you get lost in the reasoning?

I dont know if you care to do this, but if you apply a ramp to the input (which for practical purposes could be a triangle wave) you should get a constant output because the derivative of a ramp is a constant:
ramp(t)=K*t
d(ramp)/dt=K

With a triangle wave it would just switch polarities from K to -K and back again, and that would show that it actually does differentiate the input.

Another simpler idea is that with a low value R we are accomplishing two simplifications in one:
1. The input voltage is almost equal to the capacitor voltage with low R.
2. The output voltage is equal to R*i, and i is equal to C*dVc/dt and dVc/dt is almost equal to dVin/dt with a low value R.

Have you gotten into Laplace Transforms yet or complex analysis?
If we calculate the output voltage transfer function we get:
Vout/Vin=j*w*R*C/(j*w*R*C+1)

and now if we let R and C become small, that "1" in the denominator starts to become the dominant term in the denominator as compared to j*w*R*C in the denominator, so we then have as an approximation:
Vout/Vin=j*w*R*C/1

and j*w*R*C is a perfect differentiator, so that means with R and C small we have an approximate differentiator. Since R and C must be small (or one very small and the other not too big) we get a low level output, but it's still an approximate differentiator.
 
Last edited:

Thread Starter

onurcevik

Joined Dec 21, 2016
12
Hi,

Yes he is right, but i do not believe that is the right view to take on this problem. That is because the circuit you show with the R and C *is* called a differentiator circuit sometimes (other times a 'lead' circuit) but it is assumed that the user knows full well that it is not perfect but wishes to show WHEN it can still be used as a differentiator. It has and still will be used as a differentiator circuit even though it is not perfect. All you have to do is show that it can be used if conditions are right.

If you had an application, you could show how it works OK in that application for example when certain R and C are chosen. In fact, the choice of R and C are the main concern, because with the right values (relative to the application) it works good enough so that we dont have to add an op amp to get a more perfect differentiator.

But if you follow that video (which i did not look at until you mentioned it in your more recent post) that should show you how this works, using that approach. So the question is, are you following that video and if so, is there anything you dont understand or some place where you get lost in the reasoning?

I dont know if you care to do this, but if you apply a ramp to the input (which for practical purposes could be a triangle wave) you should get a constant output because the derivative of a ramp is a constant:
ramp(t)=K*t
d(ramp)/dt=K

With a triangle wave it would just switch polarities from K to -K and back again, and that would show that it actually does differentiate the input.

Another simpler idea is that with a low value R we are accomplishing two simplifications in one:
1. The input voltage is almost equal to the capacitor voltage with low R.
2. The output voltage is equal to R*i, and i is equal to C*dVc/dt and dVc/dt is almost equal to dVin/dt with a low value R.

Have you gotten into Laplace Transforms yet or complex analysis?
If we calculate the output voltage transfer function we get:
Vout/Vin=j*w*R*C/(j*w*R*C+1)

and now if we let R and C become small, that "1" in the denominator starts to become the dominant term in the denominator as compared to j*w*R*C in the denominator, so we then have as an approximation:
Vout/Vin=j*w*R*C/1

and j*w*R*C is a perfect differentiator, so that means with R and C small we have an approximate differentiator. Since R and C must be small (or one very small and the other not too big) we get a low level output, but it's still an approximate differentiator.
I'll probably use the solution in the video which is assuming R and C too small to find differentiator and assuming them too big to find integrator. My question is when i solving RL circuit am i gonna assume R and L as too small and too big to solve the circuit as both as both integrator and differentiator ? And since our instructor told us u have to solve it with "first order ordinary dif. eq." i don't think i'll use Laplace way and i dont know what that ramp thing is. And btw my second question is even though i get my answer to how to solve both circuit. I still wonder that would it be too hard to solve both Rc Rl as differantiator and integrator if we dont make those R C assumptions ?
 

MrAl

Joined Jun 17, 2014
6,770
I'll probably use the solution in the video which is assuming R and C too small to find differentiator and assuming them too big to find integrator. My question is when i solving RL circuit am i gonna assume R and L as too small and too big to solve the circuit as both as both integrator and differentiator ? And since our instructor told us u have to solve it with "first order ordinary dif. eq." i don't think i'll use Laplace way and i dont know what that ramp thing is. And btw my second question is even though i get my answer to how to solve both circuit. I still wonder that would it be too hard to solve both Rc Rl as differantiator and integrator if we dont make those R C assumptions ?
Hi,

Well, the assumptions are what makes it work in the real world. Otherwise we just have a general RC network. In an application we would have to know what R and C would work for a given project based on the frequency of operation or the timing. If we just throw any R and C at it, we would most likely end up with a circuit that has some exponential response which does not mimic an actual differentiator. That's why the assumptions are so important. If you have the wrong R and/or C values in a given application you get nothing like a differentiation of the input dVin/dt, you get something like e^(-t/RC) or something like that. In that video he also mentions those assumptions as i am sure you saw already.
So what this would mean is that the solution R*C*dv/dt would not be correct without the side note that R and C have to be small, or at least R has to be small, in order to get the approximation. If you were satisfied with a REALLY bad approximation maybe you can get away without that, but that just does not seem complete enough and not very good at all.

I mentioned that 'ramp' because that is a convenient way to test the circuit to see if we really get what looks like a differentiated input signal. With larger R and C we get an exponential response that lasts for a significant time, while with small R and C we get a very very quick exponential part and then a signal that is really the differentiated input just at a low output level.
A ramp is just a wave that goes from 0 to some high level in a straight line like a diagonal line. A formula for a ramp is very simple:
V=K*t

Another way to visualize this is to think of that resistor R as a 'sense' resistor, which senses current in the capacitor. If it is small it does not influence the dVc/dt part and the dVc/dt part can be called the dVin/dt because then the cap is almost in parallel with the input voltage.
What if we had a 'zero ohms' sense resistor R, then we would sense current perfectly and we know that:
i=C*dv/dt
or:
dv/dt=i/C

and since we are sensing current directly we now see that dv/dt is proportional to 'i', and dv/dt is the dVin/dt because all we have now in the circuit is a single capacitor (no resistor now).

Is this starting to make sense? If not, maybe we need another view.
If i had to modify that video i would also mention that C does not have to be small if R gets very small, but it does help.
 

Thread Starter

onurcevik

Joined Dec 21, 2016
12
Hi,

Well, the assumptions are what makes it work in the real world. Otherwise we just have a general RC network. In an application we would have to know what R and C would work for a given project based on the frequency of operation or the timing. If we just throw any R and C at it, we would most likely end up with a circuit that has some exponential response which does not mimic an actual differentiator. That's why the assumptions are so important. If you have the wrong R and/or C values in a given application you get nothing like a differentiation of the input dVin/dt, you get something like e^(-t/RC) or something like that. In that video he also mentions those assumptions as i am sure you saw already.
So what this would mean is that the solution R*C*dv/dt would not be correct without the side note that R and C have to be small, or at least R has to be small, in order to get the approximation. If you were satisfied with a REALLY bad approximation maybe you can get away without that, but that just does not seem complete enough and not very good at all.

I mentioned that 'ramp' because that is a convenient way to test the circuit to see if we really get what looks like a differentiated input signal. With larger R and C we get an exponential response that lasts for a significant time, while with small R and C we get a very very quick exponential part and then a signal that is really the differentiated input just at a low output level.
A ramp is just a wave that goes from 0 to some high level in a straight line like a diagonal line. A formula for a ramp is very simple:
V=K*t

Another way to visualize this is to think of that resistor R as a 'sense' resistor, which senses current in the capacitor. If it is small it does not influence the dVc/dt part and the dVc/dt part can be called the dVin/dt because then the cap is almost in parallel with the input voltage.
What if we had a 'zero ohms' sense resistor R, then we would sense current perfectly and we know that:
i=C*dv/dt
or:
dv/dt=i/C

and since we are sensing current directly we now see that dv/dt is proportional to 'i', and dv/dt is the dVin/dt because all we have now in the circuit is a single capacitor (no resistor now).

Is this starting to make sense? If not, maybe we need another view.
If i had to modify that video i would also mention that C does not have to be small if R gets very small, but it does help.
Yeah i started to understand it now, and i am watching more videos now and i can say i get it mostly. Thanks for your help. And about RL circuit should i do the same thinks that i did for RC (assuming R and L too small to solve it as differentiator or too big to solve it as integrator or just assuming R is too small etc.)?
 

MrAl

Joined Jun 17, 2014
6,770
Hello again,

Well each one could be different. For example, to see the L+R circuit integrate you probably have to see R small and L large, or at least L large.

Did you understand WHY in the video the guy mentioned the values of R and C to be small?
If you can see that, you can probably do any of these problems. The idea is to see what values might make a better integrator or differentiator. You can see that in the video he has one term with C in the denominator and one term with R in the numerator, and he wants to get rid of the term with R in the numerator so that the approximation writes out just like a simple DE. In other words, once we get rid of that term the equation writes out very simply with dVin/dt on one side, which is what we wanted.
 

Thread Starter

onurcevik

Joined Dec 21, 2016
12
Hello again,

Well each one could be different. For example, to see the L+R circuit integrate you probably have to see R small and L large, or at least L large.

Did you understand WHY in the video the guy mentioned the values of R and C to be small?
If you can see that, you can probably do any of these problems. The idea is to see what values might make a better integrator or differentiator. You can see that in the video he has one term with C in the denominator and one term with R in the numerator, and he wants to get rid of the term with R in the numerator so that the approximation writes out just like a simple DE. In other words, once we get rid of that term the equation writes out very simply with dVin/dt on one side, which is what we wanted.
I understand it now and i already solved it with the way of that video. Im solving Rl as integrator and differentiator now. So far i found eq : Vi=Ldi/dt + Rdq/dt and if i see R as small it gaves me eq: Vi=L(di/dt) and if i integrate it it becomes : 1/L (integral) vi = i which is the point im stuck now :(
 

MrAl

Joined Jun 17, 2014
6,770
Hello again,

Well the circuit topology may not be the same for the RC integrator or for the RL differentiator.
For example, the RC circuit makes a better integrator when the R is connected to the input and the cap is the output where we take the output voltage from across the cap:
Vin o---R---+---C---GND

and in the above little schematic the output is at the "+" node and ground GND.
 

Thread Starter

onurcevik

Joined Dec 21, 2016
12
Hello again,

Well the circuit topology may not be the same for the RC integrator or for the RL differentiator.
For example, the RC circuit makes a better integrator when the R is connected to the input and the cap is the output where we take the output voltage from across the cap:
Vin o---R---+---C---GND

and in the above little schematic the output is at the "+" node and ground GND.
Hi i already know the topoloy i think. For Rl integrator i use Vin ----L---+----R---GND topology
and for Rl differentiator i use Vin---R---+---L---GND topology. The point i stuck was the equation. i found this eq. Vi=Ldi/dt + Rdq/dt and if i see R as small it gaves me eq: Vi=L(di/dt) and if i integrate it it becomes : 1/L (integral) vi = i and shouldnt i find the eq. related to Vo and Vi in this eq. i founded it related to i which is the part im stucked.
 

MrAl

Joined Jun 17, 2014
6,770
Hi i already know the topoloy i think. For Rl integrator i use Vin ----L---+----R---GND topology
and for Rl differentiator i use Vin---R---+---L---GND topology. The point i stuck was the equation. i found this eq. Vi=Ldi/dt + Rdq/dt and if i see R as small it gaves me eq: Vi=L(di/dt) and if i integrate it it becomes : 1/L (integral) vi = i and shouldnt i find the eq. related to Vo and Vi in this eq. i founded it related to i which is the part im stucked.
Hello again,

Starting with
Vin=L*di/dt+R*i

to start if we assume L is large and R is small we already have approximately:
Vin=L*di/dt

and integrating and assuming i0=0 we have:
integrate(Vin,t)=L*i

or:
(1/L)*integrate(Vin,t)=i

and remember we said R as small, not zero, so if we know the current through R is i then we know the voltage across R is:
vR=i*R

and we know that the voltage across R is the output Vout in this case so if we multiply the former equation by R we get:
(R/L)*integrate(Vin,t)=i*R

and since i*R=vR=Vout we have:
(R/L)*integrate(Vin,t)=Vout

or:
Vout=(R/L)*integrate(Vin,t)

Vout will be small but that's life.

Note the i=dq/dt usually is used to simplify problems that involve capacitors.
 

Thread Starter

onurcevik

Joined Dec 21, 2016
12
Hello again,

Starting with
Vin=L*di/dt+R*i

to start if we assume L is large and R is small we already have approximately:
Vin=L*di/dt

and integrating and assuming i0=0 we have:
integrate(Vin,t)=L*i

or:
(1/L)*integrate(Vin,t)=i

and remember we said R as small, not zero, so if we know the current through R is i then we know the voltage across R is:
vR=i*R

and we know that the voltage across R is the output Vout in this case so if we multiply the former equation by R we get:
(R/L)*integrate(Vin,t)=i*R

and since i*R=vR=Vout we have:
(R/L)*integrate(Vin,t)=Vout

or:
Vout=(R/L)*integrate(Vin,t)

Vout will be small but that's life.

Note the i=dq/dt usually is used to simplify problems that involve capacitors.
Thanks i already solved it as differentaitor. I missed some points and your solution made me see my mistakes. Thanks all of your help again.
 
Top