# op-amp transfer function

Discussion in 'Homework Help' started by derill03420, Apr 13, 2012.

1. ### derill03420 Thread Starter New Member

Oct 15, 2011
26
0
The equations i get doing kcl are as follows:

1.) Vg-V1/8k - V1-Vo/(8x10^9/s) - V1/(2x10^9/s)

2.) V1/(2x10^9/s) - Vo/62.5k

equation 1 is doing kcl at node between 8k and 2nF
equation 2 is doing kcl at - input

I have drawn my currents as i1 flowing through 8k, i2 flowing through 2nF, and i3 flowing through 8nF, to get i1= i2+i3 these are for equation 1

I have drawn my currents for iO, and i2 flowing into - terminal to get i2=iO (which is ground due to ideal properties)

If my equations are correct then i think i need to proceed by finding an expression for V1 so i have an equation only in terms of Vg and Vo?

File size:
22 KB
Views:
50
2. ### t_n_k AAC Fanatic!

Mar 6, 2009
5,448
789
In purely symbolic form I would expect the equations

Where:
R1=8kΩ
R2=62.5kΩ
C1=2nF
C2=8nF

$\frac{v_g-v_1}{R_1}-\frac{v_1}{(\frac{1}{C_1s})}-\frac{(v_1-v_o)}{(\frac{1}{C_2s})}=0$

and if both io and i2 are flowing into the negative terminal

$\frac{v_1}{(\frac{1}{C_1s})}+\frac{v_o}{R_2}=0$

with the latter giving a sign discrepancy c.f. your (somewhat incomplete) equations.

So you might need to show the current directions clearly on your schematic to confirm we are on the same page on that matter.

Also I suggest you be quite clear about the $\frac{1}{C_1s}$ & $\frac{1}{C_2s}$ terms in your equations - having regard to the indices, etc.

For instance

$\frac{v_1}{(\frac{1}{C_1s})}=v_1C_1s=v_12*10^{-9}s$

derill03420 likes this.
3. ### derill03420 Thread Starter New Member

Oct 15, 2011
26
0
thank you for the help, i should have posted my equations symbolically cause except for the + sign in equation 2 they match perfectly, and i had a feeling that was + in equation 2.

thanks again for the help much appreciated!

4. ### WBahn Moderator

Mar 31, 2012
22,861
6,827
Several things to note:

1) These aren't equations? What is equal to what?

2) The units don't work. I suspect these are typos but, since it is repeated, it indicates a tendency to be sloppy in this regard. You have:

Vg-V1/8k - V1-Vo/(8x10^9/s) - V1/(2x10^9/s)

which, being explicit based on what you wrote, is:

Vg - (V1/8k) - V1 - (Vo/(8x10^9/s)) - (V1/(2x10^9/s))

The first and third terms are voltage, the second term is current, and the last two terms are current.

3) You have messed up the component values. Note that

$
$

I would recommend keeping specific values out of equations until the very end and use symbolic values, such as C1 or R1, instead.

Track your units! If you are going to plug in the values, then those values have units. The capacitance isn't 2x10^-9, it is 2x10^-9F. Or just leave it as 2nF. When combining units, a F is simply As/V (amp-second per volt), since an amp-second is a coulomb. The units of s are 1/sec. So your last term, for instance, would be:

$
\frac{V_1}{\frac{1}{C_2s}}
$

which is then easily seen to be:

$
V_1C_2s
$

The units are easy to check. You are doing KCL so you want current and you have:

$
V \frac{As}{V} \frac{1}{s} => A$

(check!)

5. ### derill03420 Thread Starter New Member

Oct 15, 2011
26
0
as i said above i should have kept the values symbolic until the end, and i realize wat i did wrong.

After going through the motions i end up with the following:

Vg = Vo[(R1*C1*s) - (1/s*R2*C2) - ((R1*C1)/(R2*C2)) - (R1/R2)]

Vo/Vg = (s^2 - 78160*s + 125x10^6)/(8000*s)

I'm thinking i screwed up the inversion and it should be:

Vo/Vg = (8000*s)/(s^2 - 78160*s + 125x10^6)

i think i screwed up because usually when doing an inverse laplace (which is next step) the power of "s" in the numerator is less than power of "s" in denominator

kind of new at this so please take it easy on me

6. ### t_n_k AAC Fanatic!

Mar 6, 2009
5,448
789
Hi derill03420,

Unfortunately you've clearly made some errors in the solution.

Don't be discouraged by this. It's natural for us "older hands" to find this easier than someone new to the process. Still we all make mistakes even with years of experience behind us. It takes time and perseverance to get things right. Carefully writing out your solution on paper (and posting same here) will help others to spot the points at which errors have crept in.

Keep on trying.

7. ### WBahn Moderator

Mar 31, 2012
22,861
6,827
Our posts crossed. When I posted mine, there was only t_n_k's first response in the thread.

One thing you said in the latest post bothers me:

It sounds like you've gone into guessing mode. If you think you screwed something up, go back and redo it so that you can say, "I screwed up the inversion and it should be:" Of course, since you are just learning this stuff, it is neither surprising or unreasonable that you are unsure of your steps, so don't read too much into my comment. But, by the same token, don't just flip things upside down unless you determine that flipping them upside down is what is required to correct the error you have made, not just because it makes a symptom go away.

One you have a potential solution, always do as many checks on it as you can. Always make sure the units work our correctly (which you can't do because you haven't included your units throughout your work and have therefore robbed yourself of perhaps the most effective tool in your toolbox for detecting and identifying errors) and also check if the limiting cases work out properly, such as at DC (s=0) and arbitrarily high frequencies (s=infinity).

In this case, the response at DC should either zero since there is no connection between the input and output. At infinity, it becomes an inverting unity gain buffer.

By keeping it symbolic as long as possible, you also gain other useful checks. For instance, what if the 2nF capacitor became a short circuit (C1=ooF) and the 8nF cap became an open (C2=0F) circuit (Note that I may have assigned C1 and C2 differently than you)? You would have an inverting amplifier with a gain of R2/R1 (where I have assigned R1 to the 8kohm and R2 to the 62.5kohm).

8. ### derill03420 Thread Starter New Member

Oct 15, 2011
26
0
ok attached is all my work step by step, if im wrong can someone point out where i went wrong.

Thank you i appreciate the help very much

File size:
175.1 KB
Views:
23
9. ### t_n_k AAC Fanatic!

Mar 6, 2009
5,448
789
Well you went wrong with the first equation.

Take another look at my post [#2] and recheck the terms in the equation.

I'll assume one would stay with the designated labels (a point on which I'm not clear concerning your chosen component labels)

R1=8kΩ
R2=62.5kΩ
C1=2nF
C2=8nF

In that case one should have

$\frac{(v_g-v_1)}{R_1}-v_1C_1s-(v_1-v_o)C_2s=0$

or after multiplying through by R1

$(v_g-v_1)-v_1R_1C_1s-(v_1-v_o)R_1C_2s=0$

and so forth.

Giving a final "simpler" form

$v_g-v_1 $1+R_1(C_1+C_2)s$+v_oR_1C_2s=0$

If you happened to have swapped the labels for C1 & C2 to be different to those given above then you would have

$v_g-v_1 $1+R_1(C_1+C_2)s$+v_oR_1C_1s=0$

Similarly if you stayed with my label conventions then the other relevant equation would be

$v_1=-\frac{v_o}{R_2C_1s}$

Alternatively if you had swapped C1 & C2 labels the equation would be

$v_1=-\frac{v_o}{R_2C_2s}$

as you have it.

So you would do well to include a listing of your adopted component labeling as well.

Last edited: Apr 15, 2012
10. ### derill03420 Thread Starter New Member

Oct 15, 2011
26
0
ok ill take another look and i do apologize i didnt define my choices of R1,R2,C1,C2

R1 = 8k
R2 = 62.5k
C1 = 8nF
C2 = 2nF

i kept this convention because this was my original definition of the variables

will re-post in morning, thanks

11. ### derill03420 Thread Starter New Member

Oct 15, 2011
26
0
ok going back through i found where i missed some parenthesis and this is my new equation for Vo/Vg.

I was able to derive the "simpler form" equation you got once i found my issue with parenthesis, so i hope this looks better (not simplified cause i didnt want to make another stupid mistake).

Also when i get Vo/Vg im using the property that (Vg/Vo = x) is also (Vo/Vg = 1/x) basically invert both sides to change from Vg/Vo to Vo/Vg

File size:
100.7 KB
Views:
23
12. ### WBahn Moderator

Mar 31, 2012
22,861
6,827
Up to your next to last line, things look good. But in going from that to your final line, it looks like you are trying to say that:

$
\left(\frac{a}{b} + \frac{c}{d}\right)^{-1} = \left(\frac{b}{a} + \frac{d}{c}\right)
$

Were but it that simple!

So go back and try doing the algebra correctly and you should get the correct answer.

Remember those sanity checks I told you about? In particular, if C1 is removed and replaced with an open (C1=0) and C2 is replaced by a short (C2=oo), then the transfer function is trivial and can be written down by inspection as:

$
\frac{V_0}{V_g} = -\frac{R_2}{R_1}
$

In your next to last line, making those substitutions yields:

$
V_g = V_0\left[-\frac{R_1}{R_2}\right]
$

which agrees with this. But making the same substitutions in your final equation results in three of the four terms blowing up toward infinity. So, if nothing else, you know that the two equations to not agree with each other.

Another sanity check was that the gain should go to zero as the frequency goes to DC. Your next to last line passes this test and your final line doesn't.

I can't stress this enough. Everyone makes stupid algebra mistakes. I made several while working this problem. Most of them made the units fail to work out properly and the others failed at least one of my sanity checks.

13. ### derill03420 Thread Starter New Member

Oct 15, 2011
26
0
this is an example my professor posted, and the circled portion is wat im referring to, the a,b,c,d is just me trying to make a connection.

with the coefficient of Vg being 1 would it be correct to say Vo/Vg is 1/(coeff of Vo). its been awhile since ive done this algebra rule and im trying to remember. Can you help me understand how they got Vo/Vg. Because it seems in my case it is just 1/coeff of Vo

by coeff i mean the equation Vo is multiplied by just to be clear its prolly wrong terminology

File size:
121 KB
Views:
28
14. ### WBahn Moderator

Mar 31, 2012
22,861
6,827
Perhaps this will make it clearer.

Look at the next to last line of the solution you posted. It is of the form:

$
V_g = V_o[\alpha]
$

where $\alpha$ is everything you have in square brackets.

You are absolutely correct in that

$
V_o = V_g \left[\frac{1}{\alpha}\right]
\frac{V_o}{V_g} = \frac{1}{\alpha}
$

It's how you are taking the recipricol of $\alpha$ that is the problem.

Here is what you are doing:

$
\alpha = w + x + y + z
\frac{1}{\alpha} = \frac{1}{w}+\frac{1}{x}+\frac{1}{y}+\frac{1}{z}
$

This just simply isn't true. Consider a simple example:

p = 1/2 + 1/4 (= 3/4)

Using your approach, you would say that

1/p = 2 + 4 = 6

when clearly it must be equal to 4/3.

In order to use your approach, $\alpha$ must be a single numerator over a single denominator.

15. ### derill03420 Thread Starter New Member

Oct 15, 2011
26
0
ok i see, i have maple on my computer so i used simplify function for 1/alpha and this is what i got, look any better?

File size:
45.1 KB
Views:
27
16. ### WBahn Moderator

Mar 31, 2012
22,861
6,827
I've just thrown my notes away, but yes, I am pretty sure that is correct.

It's pretty clear to me that you have a significant weakness in your foundational algebra skills -- that's an observation, not a put down. That weakness will only cause you more difficulty as you proceed, both with your education and in your career. Letting Maple do your thinking for you is not going to help. In fact, I would not be surprised if a big part of the reason your fundamental skills are so weak wasn't precisely because you've had access to (and been encouraged to use) things like algebraic calculators and such all your life. It is a widespread problem.

I recommend only using them for the purposes of checking the answers you produce manually whenever possible and, when you use it to get an answer that you didn't get manually, going back and working it again until you do get the same answer. Do this pretty much exclusively until you are truly comfortable with the mechanics and, even then, do the math manually on a regular basis.

Personal story: I grew up at a time when scientific calculators were just barely becomg affordable for the typical high school student. As such, my entire education up to that point had all been done by hand and I was very good at it. In college I became reliant on a calculator very quickly and one day, in the Fall of my sophomore year, realized that I had just pulled out my \$300 HP41CV in order to add two simple two-digit numbers that didn't even involve a carry. It was at that point, nearly 30 years ago, that I made a vow to myself to do as much of the math manually on paper or in my head as I could as often as I could and that has served me very well to this day.

17. ### WBahn Moderator

Mar 31, 2012
22,861
6,827
Oh, and another thing. I would strongly recommend you look at the sticky on making mathematical expressions using LaTeX so that people don't have to download and open files everytime you want to post just an equation or two. It's reasonable to attach a file if you have a lot of math, especially if there is some artwork that goes along with it.

18. ### derill03420 Thread Starter New Member

Oct 15, 2011
26
0
actually im just a bit rusty is all, looking at it closer it seems i overlooked making a common denominator and then changing signs when flipping the terms. and thanks for sharing with me how to display equations on the forum i was wondering how to.

I dont use maple often at all actually this is my first semester, i believe highly in doing it by hand and using tools to check, but its been awhile since ive dealt with large equations and simplifying them