# RC circuit problem

1. Aug 21, 2007

### mankku

Hi everybody!

This is my first post, happy to be a part of this forum!

I have a problem that may be pretty easy to solve, and a few years ago I could've myself, but at the moment I'm stuck.

I enjoy fiddling with electronics during my free time, and I'd like to study the use of a capacitor to remove DC offset from a signal (more specifically, how the capacitance, frequency and amplitude affect the outcome).

So I've made a simple assumption: I have a voltage source,

$$e(t)=2.5+A*sin(2*pi*ft)$$

that feeds a circuit. The circuit consists of a capacitor C and resistor R in series, so that any current passes through both. I've based the case on Kirchoff's voltage law so that

$$e(t)=Vc(t)+Vr(t)$$

where

$$i(t)=C*\frac{dVc(t)}{dt}$$

and $$Vr(t)=R*i(t)$$

The equation becomes

$$e'(t)=\frac{1}{C}*i(t) + R*i'(t)$$

From this I attempted to do a Laplace transform but I ended up with an expression that I cannot get past. I assumed that at t=0, e(t)=2.5 and i(0)=0.

Here's what I did:

$$sE(s)-e(0) = R*(sI(s)-i(0)) + I(s) * \frac{1}{C}$$

from which I obtained

$$I(s) = \frac{sE(s)-2.5}{Rs+1/C}$$

and substituting in E(s)

$$I(s) = \frac{As*\frac{2\pi f}{s^{2}+4\pi^{2}f^{2}}}{Rs+1/C}$$

where I'm stuck... I can't modify the expression to be able to apply the inverse Laplace transform...

My question is, am I even doing the right thing? Have I gone wrong somewhere? I'm trying to obtain the function for the current i(t) so that I can work out the resistor voltage and thus the circuit output.

Any hints or helps will be greatly appreciated!

Mankku

Last edited: Aug 21, 2007
2. Aug 21, 2007

### learningphysics

Use partial fractions to change this:

$$I(s) = \frac{As*2\pi f}{(Rs+1/C)(s^{2}+4\pi^{2}f^{2})}$$

into two fractions added together... then taking the inverse laplace is simple.

3. Aug 22, 2007

### mankku

Partial fractions

I looked into turning the expression into partial fractions... I still don't think I got the right answer in the end...

Anyway, here's how I went about:

$$I(s) = \frac{As*2\pi f}{(Rs+\frac{1}{C})(s^2+(2\pi f)^2)} = \frac{K_1}{Rs+\frac{1}{C}} + \frac{sK_2 + K_3}{s^2+(2\pi f)^2}$$

which eventually yields

$$2\pi fAs = (K_1 + RK_2)s^2 + (\frac{K_2}{C} + K_3 R)s + \frac{K_3}{C} + K_1 (2\pi f)^2$$

and thus

$$K_1+RK_2 = 0$$

$$\frac{K_2}{C} + K_3 R = 2\pi fA$$

$$\frac{K_3}{C} + K_1 (2\pi f)^2 = 0$$

Solving this, I obtain

$$K_1 = -\frac{2\pi ARf}{\frac{1}{c} + R^2 C(2\pi f)^2}$$

$$K_2 = \frac{2\pi Af}{\frac{1}{c} + R^2 C(2\pi f)^2}$$

$$K_3 = \frac{ARC(2\pi f)^3}{\frac{1}{c} + R^2 C(2\pi f)^2}$$

Moving on, I substitute these into the partial fraction form of I(s):

$$I(s) = K_1 \frac{1}{s+\frac{1}{RC}} + K_2 \frac{s}{s^2+(2\pi f)^2} + K_3 \frac{1}{s^2+(2\pi f)^2}$$

Borrowing a $$2\pi f$$ from $$K_3$$, I can now inverse transform and get

$$i(t) = K_1 \times e^\frac{-t}{RC} + K_2 \times cos(2\pi ft) + \frac{K_3}{2\pi f} \times sin(2\pi ft)$$

However, at this point, the three terms have different units, IMO they should have the same if this were the correct solution.

In other words, I'm a bit upset... :(

Can anyone point me in the right direction? Did I go wrong somewhere?

Mankku

4. Aug 22, 2007

### learningphysics

I don't see any mistakes. I didn't go through your calculation of the K1, K2 and K3 terms. Why do you say the units are different?

5. Aug 22, 2007

### mankku

Well the logarithmic and the trigonometric factors are scalar, so they don't contribute any physical units... So the unit of i(t) (should be amperes) depends on the K1, K2 and K3 factors...

Comparing e.g. K1 and K2, K1 has an R in the nominator that K2 doesn't have... Similarly K3 introduces a C. So they all have different units when simplified, which means that i(t) would be the sum of three different physical quantities...

But if I haven't made a mechanical mistake, then there must be something wrong in the beginning? I can't think of what that would be though...

Edit: I verified that the expressions I obtained for K1...3 actually fulfill the three criteria stated by the partial fraction expansion.

Mankku

Last edited: Aug 22, 2007
6. Aug 22, 2007

### learningphysics

The denominator of the K1 term should be Rs + 1/C...

7. Aug 22, 2007

### mankku

Ack! Good point! That simplification isn't valid!

Let's see... I used the correct form when deriving the expressions for K1...3, so they should be ok as such...

I take it there is no inverse transform for $$\frac{1}{As + B}$$? I need to eliminate whatever's in front of the s to be able to inverse transform it?

Edit: Correct me if I'm wrong, but it should be possible to change

$$\frac{1}{Rs+1/C}$$

into

$$\frac{1/R}{s+1/RC}$$

which would mean that the 1/R nominator eliminates the R in K1, leaving

$$\frac{1}{s+1/RC}$$

to inverse transform?

Edit 2: This means that the units provided by K1 and K2 would now be equal... indicating that K3 is incorrect?

Mankku

Last edited: Aug 22, 2007
8. Aug 22, 2007

### nicktacik

I believe the inverse transform for

$$\frac{1}{As + B}$$

would be

$$\frac{1}{A}e^{\frac{-Bt}{A}}$$

9. Aug 22, 2007

### learningphysics

Yup. factoring out that A... so mankku you should have (K1/R)e^(-t/RC) instead of K1e^(-t/RC)

10. Aug 22, 2007

### mankku

I thought I saw a post telling me that the units of the RCf in K3 eliminate themselves... Checking it, I believe they do... So this would mean that the units are correct in all three terms and the problem might be solved! YAY!

I'll have to check this through in the morning when my head is fresh, but I want to extend a BIG preliminary thank you to everyone who posted here!

Mankku

11. Aug 22, 2007

### learningphysics

That was me. I wasn't sure though which is why I deleted the post... because I wasn't seeing the $$2\pi$$'s cancelling... $$K3/2\pi f$$ has units of (radians^2)/s in the numerator (RC has units of seconds)... K1 and K2/R have units radians/s in the numerator...

If you ignore $$2\pi$$ then the units cancel... but that $$2\pi$$ is bothering me.

EDIT: NEver mind... 1/RC has units of radians/second, so everything works out.

Last edited: Aug 22, 2007
12. Aug 22, 2007

### mankku

Problem solved?

Hi again!

I did a units check on the K's and they seem to be ok. The unit of the denominator

$$\frac{1}{C} + R^2 C f^2$$

turns out to be volts/amperesecond. Furthermore, the unit of the nominators of K1/R and K2 is volts/second, meaning that the unit of the fractions is

$$\frac{\frac{V}{s}}{\frac{V}{As}} = \frac{V}{s} \times \frac{As}{V} = A$$

as should for i(t).

Furthermore, RCf cancels as you suggested, learningphysics, as RC has the unit of seconds and f is 1/second. Thus, modifying the nominator of K3/(2*pi*f):

$$ARC(2\pi f)^2 = 2\pi ARCf (2\pi f) = 2\pi A(2\pi f) = 4\pi^2 Af$$

And the unit of the entire K3/(2*pi*f) fraction turns out as amperes.

So, at this stage it seems that the equation is valid. The next step for me is to attempt to verify it experimentally.

I'm deeply grateful for your help, learningphysics, you saw what I was unable to see. Big cheers!

Mankku

P.S: Isn't it kinda strange that you're the only one who has replied to this thread? I thought there'd be more interest... Well perhaps it's just me :)

13. Aug 22, 2007

### learningphysics

Cool! Glad to help! I think everything works out... actually I think the units of RC are radians/s... all the $$2\pi$$'s cancel...