Homework Help: RC circuit Transfer Function/bode plot

1. Apr 19, 2012

Mitchy190

1. The problem statement, all variables and given/known data

I have for the attached circuit measured the amplitude and phase response, but the question I have to answer is too theoretically, derive, similar results and then compare the two methods. It is suggested to figure out the transfer function and plot the magnitude and phase response.

The component values are know, and are:

R1 = 47k
R2 = 4K7
C = 10nF

I am having difficulty driving the transfer function for this circuit :( and some much needed help would be appreciated! :D

2. Relevant equations

H(jω) = R2/(R2+(R1*1/jωC)/(R1+1/jωC))

3. The attempt at a solution

So far I have converted the circuit into 'standard form':

Z1 = R1, Z2 = R2, Zc = 1/jωC, Vin = Vip and Vout = Vop (p = Phasor)

and then I know that H(jω) = Vop/Vip

And knowing this I worked out that

Vop = (R2/(R2+(R1*1/jωC)/(R1+1/jωC)))*Vip

H(jω) = R2/(R2+(R1*1/jωC)/(R1+1/jωC))

And this is where I am stuck. I'm not sure if this is the correct method to derive the transfer function, or even right at all, but this is just my thinking and attempt. So much help is needed :D

Thank you

Last edited: Apr 19, 2012
2. Apr 19, 2012

rude man

What you did was right. Now, how does one determine amplitude and phase, given H(jω)? This is a matter of handling complex algebra, is all:

1. reduce to form H = Hr + jHi
2. Compute √(Hr2 + Hi2)
3. Compute arc tan(Hi/Hr).

Bonus: let me show you an easier way to get H(jω): Let G1 = 1/R1 and G2 = 1/R2. Then
H(jω) = (G1 + jωC)/(G1 + G2 + jωC).

I did that by using admittance, conductance and susceptance instead of impedance, reactance and resistance:
Admittance = Y = 1/impedance = 1/Z
Capacitive susceptance = jB = 1/capacitive reactance = 1/jX = 1/(1/jωC) = jωC
G = 1/R

So in general, for parallel R and C,
Y = G + jB and for your circuit,
H = (G1 + jB)/(G1 + G2 + jB).

(For an inductor, B = 1/jX where X = ωL).

In general, think Y, G and B instead of Z, R and X when you see components hooked up in parallel (shunt).

Last edited: Apr 19, 2012
3. Apr 19, 2012

Mitchy190

Your bonus information is extremely useful, and I will bare it in mind for future problems! :D

But I am having trouble understanding the fist part of your reply :(

I understand the two last points, but not the first. I am unsure on how to reduce the function into the from you have stated? Some help on this will also be appreciated :)

4. Apr 19, 2012

rude man

You mean the bit about h(jω)?

5. Apr 19, 2012

Staff: Mentor

Complex number algebra:
$$\frac{a + j b}{c + j d} \Rightarrow \frac{a + j b}{c + j d} \cdot \frac{c - j d}{c - j d} = \frac{a c + b d}{c^2 + d^2} + j\frac{b c - a d}{c^2 + d^2}$$

6. Apr 19, 2012

Mitchy190

Rude man - something I'm just really unsure on how to do is convert the transfer function form the form I've stated into the form where I can determine the break frequency.

7. Apr 19, 2012

rude man

gneill above gave you an excellent road map for that - just associate his a,b,c & d with your derived transfer function. You need to wind up with the form I stated: H = Hr + jHi.

To get there, collect real and imaginary parts of the numerator & denominator of your derived transfer function (I would use my version, but only because it's simpler so you tend to commit fewer errors). Then associate those four parts with gneill's a,b,c and d.

Once you have that done we can maybe help further.

BTW gneill betw you & me I prefer to go with magnitude & exponent instead of complex-conjugates.

8. Apr 19, 2012

Staff: Mentor

Whatever works!

9. Apr 20, 2012

Mitchy190

Right! Thanks!

I get all what you have stated now (:

Except! One last thing! My algebraic skills are not that great, and I am struggling with the collecting of the real and imaginary terms, I know that in general that transfer function can be represent in the form

Where Kgl is know as the Dc gain.

But im struggling! grrrr :(

10. Apr 20, 2012

rude man

Mitchy, you need to drop everything and get comfortable manipulating complex numbers.

It's not hard. Just high school algebra except j2 = -1 on top of it. So when you perform the multiplications and additions to get your H(jω) into the form I stated, some of the real terms will be the result of multipying two real numbers, and others will be the result of multiplying two imaginary numbers. The imaginary terms will always be the result of multiplying a real term with an imaginary term.

You need to look at what gneill posted a couple of days ago and really understand it. Forget volts and amps until you do.

11. Apr 20, 2012

rude man

I forgot to mentin your attachment. That form is not useful for determining gain magnitude and phase. It's good for plotting magnitude and phase plots called Bode plots, which are approximations to the frequency response of the transfer function. You're not there yet.

12. Apr 20, 2012

Mitchy190

Thank you! :D But I understand complex numbers and how to manipulate them, and I fully understand what gneill posted. It is the algebraic manipulation I have always had problems with, I find it hard to rearrange the function so that I can preform the complex division, which in turn, will get the H = H + Hj form I need (:

I have had an attempt, and got this far:

H(jω) = (R2/(R+R2) * (1+jωRC)) / (1+(R2/(R+R2))*jωRC), once I have the transfer function in the form H = H + hj, I can take the magnitude of H(ω), and then 20Log(H(ω)) to get the magnitude in dBs

I know now I can dived the top and bottom by (R + R2), But I'm struggling on how to do that. :/ basic... I know, but Ive always had trouble with it.

and for you other comment, I know, that is what I need to do... I need to approximate the frequency response for the circuit (a bode plot).. I need to find the break frequency (ωb), and then from that approximate the gain in db when ω >> ωb, ω << ωb and ω = ωb (the 3db point).

Its not the concept of bode plots or frequency response I'm having trouble with, its the basic algebra :(

13. Apr 20, 2012

Mitchy190

I think I may be almost there!

I have now worked out that

H(jω) = (R2/(R+R2) * (1+jωRC)) / (1+(R2/(R+R2))*jωRC)

and then,

Let A = R2/(R+R2)

H(jω) = A *(1+jωRC) / (1+A*jωRC), then dividing the complex numbers to get:

H(jω) = A *(1+jωRC)*(1-A*jωRC) / ((1+A*jωRC)*(1-A*jωRC))

and since (1+A*jωRC)*(1-A*jωRC) = 1^2-(A*jωRC)^2 = 1+(AωRC)^2, the complex expression in the denominator been eliminated, which I think is the goal right?

so the end result is:

H(jω) = (R2/(R+R2)*(1+jωRC)*(1-(R2/(R+R2)*jωRC) / (1+((R2/(R+R2)ωRC)^2), I think?

14. Apr 20, 2012

rude man

You make life easier for yourself if you simplify your H(jω). Let a = R2/(R+R2). Then you have it in the form gneill wrote. And also suitable for Bode plotting.

15. Apr 20, 2012

rude man

16. Apr 20, 2012

Mitchy190

Getting there, but thing is! I have 3 more different RC circuits to do yet :/

Already worked out the high pass and low pass filter plots.

Anyway, I think I have an answer, what do you think?

I think I can construct a bode plot from this? I hope this is right!

17. Apr 20, 2012

rude man

Looking good!

BTW a quick, if incomplete, check, is to compute dc and high-frequency gains:

At dc, C is absent, and sure enough, your dc gain is A = R2/(R+R2) as it obviously should be.

At high frequencies the "1"'s drop out in the numerator and denominator, and we get
gain = AR/R3 = R2/(R+R2) * R / {RR2(R+R2)} = 1. At high freq C is a short so the output = input and gain is 1. Again, check.

18. Apr 21, 2012

Mitchy190

I am unsure that my transfer function is right, I have plotted a bode for the magnitude and it does not compare to my real life results at all, which i am assuming are right.

I worked out the bode plot by

$|H(Jω)| = 20Log(|A|) + 20Log(|1 + jωRC|) - 20Log(|1 + jωR_{3}C|)$

And I got these results

View attachment bode plot.pdf

The real measured results I obtained are:

View attachment Frequency1.pdf

As you can see they look completely different? Is my transfer function wrong, or is it the method in which I have plotted the bode?

Thanks.

Last edited: Apr 21, 2012
19. Apr 21, 2012

rude man

I can't check this until you give me the value of R1. You had R1 = 4K7 which is ???

I do know that your plots in bode plot.pdf are wrong. You show overshoot which can't happen. You also show high-frequency response as rolling off indefinitely with frequency. Remember we did a "check" at high frequencies where we determined the gain should be 1?

Your empirical data (frequency1.pdf) looks the way it should.

20. Apr 21, 2012

Mitchy190

The value of R1 is 47kΩ, sorry. R2 = 4K7Ω, C = 10nF and on the real life results:

$\textit{Vin = 10(cos(ωt + ∅))}$

Thats what I thought but I do not know where I have gone wrong.

the way I worked out the bode plot was with the equation I gave above.

maybe you could have a quick look and see what you think, if you wouldnt mind?

Last edited: Apr 21, 2012
21. Apr 21, 2012

rude man

How do you get the plots of bode plot.pdf? These are not asymptotes. Asymptotes are straight lines. These are apparently actual calculations by software of some kind. In my opinion you should not be generating the plots that way. If you use software you might as well let the software do the whole thing! (e.g. PSPICE or MatLab).

The slope of the green line is wrong. It should have the same slope as the red line, except downward instead of upward. That would make the black line flat at high frequencies as it should be.

BTW the phase in frequency1.pdf should be +, not -. And the dc gain should be -20.8 dB, not -12dB. You must have made a measurement error to get -12 dB. The high-frequency gain (0 dB) is correct.

22. Apr 21, 2012

rude man

BTW I still don't know what "4K7Ω" means. I assumned it meant 4700 ohms which is conventionally written 4.7K.

23. Apr 21, 2012

Mitchy190

Okay thank you.

I just varied omega over a frequency range then plotted my results on excel.

Once I know the transfer function is right I will hand draw the asymptotes.

What do you think to this:

View attachment RC circuit transfer function.pdf

This one was done by a friend on his software?

4k7 does mean 4700 ohms, it is recognized as that in electronics now, it changed to this form a few years back.

24. Apr 21, 2012

rude man

That graph of your friend is 100% correct.

I worked in industry until a couple of yrs ago and never saw anything like 4k7. I advise you not to use that form. Most people won't know what it means.

25. Apr 21, 2012

Mitchy190

Resistor Convention
When we write resistor values we use a convention. I mentioned at the start a resistor value of 4K7. So why put the K in the middle? Why not say 4.7K?. This comes down to the days of bad photocopiers. Take a circuit diagram and photocopy it. Then copy the copy. Soon you end up with a dirty copy with stray dots all over it. Is that a 47K or a 4.7K?

This doesn't happen when it is written as 4K7. And after all you say 'four thousand, seven hundred' so as K is a thousand, 4K7 is totally logical.

Reference from http://clivetec.0catch.com/Resistors.html

Thanks all for your help rude man!

If you have a look at the transfer function the software has derived. Could you possible explain why it is in that from and not the from we worked out. As this may be where im going wrong.