MOSFET differential amplifier gain

20 replies · 6K views · last reply
etf
Messages
179
Reaction score
2
Hi!
Here is my task:
For differential amplifier on scheme calculate voltage gains Av1=vout1/(vin1-vin2) and Av2=vout2/(vin1-vin2). MOSFET's M1 and M2 have same characteristics. MOFSTE's M3 and M4 have same characteristics. All MOSFET's are in saturation. Assume that gm*rds>>1.

Circuit schematic of a MOSFET differential amplifier with transistors M1 to M5, two resistors R, supply VDD, bias VB, supply VSS, inputs Vin1 and Vin2, and outputs Vout1 and Vout2.

How to use fact that gm*rds>>1?
I did AC Analysis of this amplifier and found vout1 in function of vin1 and vin2 and vout2 in function of vin1 and vin2. For the sake of simplicity, I used variables a,b,... . I got these results:

[itex]vout1=\frac{bgn-cfn+dfm-dgl}{afm-agl-bem+bgk+cel-cfk}\, \, \,\, vin1+\frac{chl-bhm+bgo-cfo}{afm-agl-bem+bgk+cel-cfk}\, \, \, \, vin2[/itex]
[itex]vout2=\frac{cen-agn-dem+dgk}{afm-agl-bem+bgk+cel-cfk}\, \, \, \, vin1+\frac{ahm-chk-ago+ceo}{afm-agl-bem+bgk+cel-cfk}\, \, \, \, vin2[/itex]

My question is, how to get rid of vin1 and vin2 in Av1 and Av2? V1 and v2 shouldn't figure in gains Av1 and Av2.
 
Last edited:
I don't think there is enough info to determine the gains.

But if you feel you know those four fractions which I will call F1, F2, F3 and F4, then
Av1 = Vout1/(Vin1 - Vin2)
1/Av1 = Vin1/Vout1 - Vin2/Vout2
and Vin1/Vout1 = 1/F1 etc.

It should be apparent that F1, F2, F3 and F4 all have the same magnitude.
 
  • Like
Likes   Reactions: 1 person
etf said:
Hi!
Here is my task:
For differential amplifier on scheme calculate voltage gains Av1=vout1/(vin1-vin2) and Av2=vout2/(vin1-vin2). MOSFET's M1 and M2 have same characteristics. MOFSTE's M3 and M4 have same characteristics. All MOSFET's are in saturation. Assume that gm*rds>>1.

View attachment 70647
How to use fact that gm*rds>>1?
I did AC Analysis of this amplifier and found vout1 in function of vin1 and vin2 and vout2 in function of vin1 and vin2. For the sake of simplicity, I used variables a,b,... . I got these results:

[itex]vout1=\frac{bgn-cfn+dfm-dgl}{afm-agl-bem+bgk+cel-cfk}\, \, \,\, vin1+\frac{chl-bhm+bgo-cfo}{afm-agl-bem+bgk+cel-cfk}\, \, \, \, vin2[/itex]
[itex]vout2=\frac{cen-agn-dem+dgk}{afm-agl-bem+bgk+cel-cfk}\, \, \, \, vin1+\frac{ahm-chk-ago+ceo}{afm-agl-bem+bgk+cel-cfk}\, \, \, \, vin2[/itex]

My question is, how to get rid of vin1 and vin2 in Av1 and Av2? V1 and v2 shouldn't figure in gains Av1 and Av2.

You could replace those complicated expressions you have with single variables x and y, and make use of the extreme symmetry of the circuit. You get this:

[itex]vout1=x*vin1 - y*vin2[/itex]
[itex]vout2=-y*vin1+x*vin2[/itex]

Also make use of the fact that for purely differential input, Vin1 = -Vin2

I think that then you can find a solution.
 
  • Like
Likes   Reactions: 1 person
Why do you have about 14 single letter variables for this problem? Have you assigned a variable to each branch current? If that's what you've done, I would recommend using some other approach. Your circuit only has 6 nodes; wouldn't it be simpler to use nodal analysis rather than branch current analysis?
 
I used nodal analysis. I will post complete work very soon.
 
So is your final answer what you have shown in the last page, expressions involving a11, a12, a21 and a22?

I would have thought you would need expressions in terms of the MOSFET parameters, such as gm1, gm2, gm3, rds1, rds2, rds3, etc.

Your problem stated that gm*rds>>1, and you asked how to use that fact. Wouldn't you expect that expressions involving gm*rds would appear in your algebra, and that's where you could make use of the strong inequality? But I don't see any expressions like in your work. I wonder why?

I find it hard to follow your work. For example, on page 2 you have a subexpression you've labeled q. It looks like the subexpression is:

(||rds1 + ||(2 R) + gm3/2 + ||rds3) "phi"d1

What are those 2 vertical bars in front of rds1 (why are they there?), and what is the character I've labeled "phi"? Are the vertical bars || really 1/ (1 divided by)?

Also on page 2 is what looks like a signal flow graph. Is it supposed to be a signal flow graph, or is it just a representation of the circuit topology to be used as an aid in setting up the nodal equations?

Between nodes d1 and s1 I see a branch with an arrow in series with rds1; beside the arrow I see what looks like qds1. What is qds1?
 
I have bad handwriting :) I used "phi" to represent node potentials...There are no vertical bars, "(||rds1 + ||(2 R) + gm3/2 + ||rds3) "phi"d1" is (1/rds1 + 1/(2 R) + gm3/2 + 1/rds3) "phi"d1 :) I will rewrite solution and upload it again :)
 
What about my question regarding the form of your final solution? Shouldn't your answer involve things like gm1, rds1 and not just a11, a12, etc.
 
Firstly, we draw original circuit with shorted Voltage sources (VB, VSS, VDD):

Hand-drawn circuit schematic on grid paper of a MOSFET differential amplifier with transistors M1 to M5, resistors R1 and R2, supply nodes S3 and S4, source node S5, inputs G1 and G2 and output voltages labelled Uout1 and Uout2.


Then we draw 5 small-signal MOSFET models and connect them according to first circuit:

Hand-drawn small-signal equivalent circuit on graph paper with five MOSFET models M1 to M5, each boxed in yellow, showing gate, drain and source nodes, gm and rds dependent sources, and wiring between them.


Here is result of "simplification" of second circuit:

Hand-drawn small-signal equivalent circuit of a MOSFET network with five transistors, labelled ids1 to ids5, transconductance terms gm and rds resistances, and nodes D1 to D5, S1 to S5 and G1 to G5.


Now we form system of 3 equations with 3 uknowns:

Handwritten nodal analysis of a small-signal MOSFET circuit, showing three node equations in Vd1, Vd4 and Vs1 with circled coefficient groups and boxed labels a through o, with the first equation set equal to -gm1·Vgs1.


Here is solution (I didn't write potential for node S1 since it isn't required):

Handwritten derivation of two output voltages, qd1 and qd2, as linear combinations of vin1 and vin2 with boxed coefficient expressions over a common denominator.


Now we can find gains:

Handwritten derivation of differential and common-mode gains: Avd1 = vout1/(vid1 - vid2), Avd2 = vout2/(vid1 - vid2), with vid = v1 - v2 and vcm = (v1 + v2)/2, leading to vout1 = a11 vid1 + a12 vid2 expressed in vcm and vd.
 
Handwritten derivation on graph paper of four differential gain expressions: Adm = (a11 - a12)/2 style half-difference results, Acm1 = a11 + a12, Ad2 and Acm2 in similar form, with boxed final results.


Now I should replace variables a11, a12, a21 and a22 with firstly introduced a,b,c,... and then replace them with gm1, rds1,... and use fact that gmrds>>1 ? :)
 
Last edited:
I'm off to lunch with some of my former EE professors at the local University.

I'll have a look at your work when I get back.

In the meantime, answer me this. Do you have access to Matlab, Mathcad, or some similar modern program to do the tedious algebra involved in this problem?

If you don't have any of those, consider downloading the free package Maxima and learning how to use it:

http://maxima.sourceforge.net/
 
Ok :)
I use Matlab. It would be very exhausting to do all these calculations by hand :)
 
Ok :)
I use Matlab. It would be very exhausting to do all these calculations by hand :)
 
etf said:
View attachment 70686

Now I should replace variables a11, a12, a21 and a22 with firstly introduced a,b,c,... and then replace them with gm1, rds1,... and use fact that gmrds>>1 ? :)

Don't bother replacing your subexpressions with a, b, c, ...

Just plug the complicated expressions into the Matlab solver and let it do the work. Look at your results and see if you see any thing like this: (1+gm*rds). If you do, then you can replace that with (gm*rds). That may help simplify your results.

Post your results here.
 
By the way, do you have the correct answer for this problem, from the text or from your instructor?
 
I don't have solution for this problem in my book...
Below is code and final result from Matlab. I did DC analysis and got gm1=gm2, gm3=gm4, rds1=rds2, rds3=rds4.
>> syms gm1 gm2 gm3 gm4 gm5 rds1 rds2 rds3 rds4 rds5 R
>> rds1=rds2;
>> rds3=rds4;
>> gm1=gm2;
>> gm3=gm4;
>> a=1/rds1+1/(2*R)+gm3/2+1/rds3;
>> b=-(1/(2*R)-gm3/2);
>> c=-(gm1+1/rds1);
>> d=-gm1;
>> e=-(1/(2*R)-gm4/2);
>> f=1/rds2+1/(2*R)+gm4/2+1/rds4;
>> g=-(1/rds2+gm2);
>> h=-gm2;
>> k=-1/rds1;
>> l=-1/rds2;
>> m=gm1+1/rds1+gm2+1/rds2+1/rds5;
>> n=gm1;
>> o=gm2;
>> a11=(b*g*n-c*f*n+d*f*m-d*g*l)/(a*f*m-a*g*l-b*e*m+b*g*k+c*e*l-c*f*k);
>> a12=(c*h*l-b*h*m+b*g*o-c*f*o)/(a*f*m-a*g*l-b*e*m+b*g*k+c*e*l-c*f*k);
>> a21=(c*e*n-a*g*n-d*e*m+d*g*k)/(a*f*m-a*g*l-b*e*m+b*g*k+c*e*l-c*f*k);
>> a22=(a*h*m-c*h*k-a*g*o+c*e*o)/(a*f*m-a*g*l-b*e*m+b*g*k+c*e*l-c*f*k);
>> Av1=simplify((1/2)*(a11-a12))

Av1 =

-(R*gm2*rds2*rds4)/(2*(R*rds2 + R*rds4 + rds2*rds4))

>> Av2=simplify((1/2)*(a21-a22))

Av2 =

(R*gm2*rds2*rds4)/(2*(R*rds2 + R*rds4 + rds2*rds4))
 
Last edited:
That's the result I get:

Mathematica session showing a 6x6 matrix Y written as a sum of two matrices, Z = Inverse[Y], two Print statements for Av1 and Av2, and the resulting closed-form expressions Av1 = -gm2 R rds2 rds4 / (2(rds2 rds4 + R(rds2 + rds4))) and Av2 = gm2 R rds2 rds4 / (2(rds2 rds4 + R(rds2 + rds4))).


You have made your solution more cumbersome than it needs to be by introducing all those single variables a, b, c, ... m, n, o.

As you can see, the most compact way to do it is with the matrix form of your equations. I have more equations than you do because I set up the general problem. I provided equations for the g1, g2, and g3g4 nodes, and I allowed for the possibility of a gate resistor Rg, which turns out not matter in the end. Also we see that rds5 doesn't matter because of the symmetry.

You can see 2 matrices; that's because I kept the matrix for M1 and M2 separate from the matrix for M3 and M4. They could be combined into one matrix; in fact as you can see, I added them, but didn't bother displaying the single matrix which is the sum of the two.

You can use your same technique to solve the CMRR problem thread. You will need to label the MOSFETs corresponding to M1, M2 and M3, M4 of this problem. You will need more equations (at least one more), but the equations you used in this problem will apply in the CMRR problem, possibly with different designators.

The reason I asked you in the CMRR problem if you need to keep the various parameters for each MOSFET separate, is because if you do, the solutions become very complicated. For example, in this problem, if you keep gm1 and gm2 separate, and rds1 and rds2 separate, the answers become (now we see that rds5 appears, because the symmetry is lost):

Two long symbolic expressions for Av1 and Av2, written in Mathematica-style notation, involving rds, gm, Rg and R terms in fractions.


If you let all of the MOSFETs have only a single gm and rds, the result becomes very simple.
 
Attachments
  • Mathematica session showing a 6x6 matrix Y with gm2 and rds terms plus a second matrix with gm4 and R terms, followed by Z = Inverse[Y] and printed expressions for Av1 and Av2 as rational functions of gm2, R, rds2 and rds4.
    DiffAmp.png
    8.1 KB · Views: 755
  • Two long symbolic expressions for Av1 and Av2, written in Mathematica-style notation, each a ratio of large polynomial sums in gm, rds, R and Rg terms.
    DiffAmpX.png
    60.4 KB · Views: 793
etf said:
I don't have solution for this problem in my book...
Below is code and final result from Matlab. I did DC analysis and got gm1=gm2, gm3=gm4, rds1=rds2, rds3=rds4.
>> syms gm1 gm2 gm3 gm4 gm5 rds1 rds2 rds3 rds4 rds5 R
>> rds1=rds2;
>> rds3=rds4;
>> gm1=gm2;
>> gm3=gm4;
>> a=1/rds1+1/(2*R)+gm3/2+1/rds3;
>> b=-(1/(2*R)-gm3/2);
>> c=-(gm1+1/rds1);
>> d=-gm1;
>> e=-(1/(2*R)-gm4/2);
>> f=1/rds2+1/(2*R)+gm4/2+1/rds4;
>> g=-(1/rds2+gm2);
>> h=-gm2;
>> k=-1/rds1;
>> l=-1/rds2;
>> m=gm1+1/rds1+gm2+1/rds2+1/rds5;
>> n=gm1;
>> o=gm2;
>> a11=(b*g*n-c*f*n+d*f*m-d*g*l)/(a*f*m-a*g*l-b*e*m+b*g*k+c*e*l-c*f*k);
>> a12=(c*h*l-b*h*m+b*g*o-c*f*o)/(a*f*m-a*g*l-b*e*m+b*g*k+c*e*l-c*f*k);
>> a21=(c*e*n-a*g*n-d*e*m+d*g*k)/(a*f*m-a*g*l-b*e*m+b*g*k+c*e*l-c*f*k);
>> a22=(a*h*m-c*h*k-a*g*o+c*e*o)/(a*f*m-a*g*l-b*e*m+b*g*k+c*e*l-c*f*k);
>> Av1=simplify((1/2)*(a11-a12))

Av1 =

-(R*gm2*rds2*rds4)/(2*(R*rds2 + R*rds4 + rds2*rds4))

>> Av2=simplify((1/2)*(a21-a22))

Av2 =

(R*gm2*rds2*rds4)/(2*(R*rds2 + R*rds4 + rds2*rds4))

The results shown in red above were obtained in another Matlab session. If you would just let Matlab do the work of solving with your original equations, you should get the same answer.

What I mean is this. You set up some equations for Matlab to solve, using variables a, b, c...m, n, o. Just leave the original subexpressions in place. Everywhere you have the variable a, just put 1/rds1+1/(2*R)+gm3/2+1/rds3 instead. Do the same for all the other single variables. Put the subexpressions for each in the equations Matlab is solving.

If you were doing this by hand, it would be very tedious, but Matlab can do it without mistakes.
 
Thanks a lot! One more question for thread about CMRR: Can I analyse diff. amp. with Iss source from b), calculate CMRR for that circuit and use that CMRR to calculate CMRR for diff. amp. with Iss source from a) (i.e. seting for M2 gm2=0, rds2=∞) ? More precisely, for CMRR of diff. amp. with ISS from b) I will got CMRR in function of gm1, rds1, gm2, rds2 and gm's and rds's of other MOSFETS so I will just put there gm2=0 and rds2=∞ and that would be my CMRR for diff. amp. with source Iss from a)?
 
Last edited:
What you must do is set rds2=0, not rds2=∞. If you do that, then your proposed method should work.

What I did is use a symbol to represent the impedance of the (not so good) current source; I called it "zs". Then you can see the effect of that source on CMRR and differential gain, if you wanted to examine the effect.

I then calculated the impedance looking down into the a) and b) circuits, and substituted those values for zs in the calculations for CMRR and AV.

I should warn you that the circuit in your CMRR problem doesn't have the extreme symmetry that this one does and if you use different values for the parameters of the 4 MOSFETs making up the diff amp, plus the two MOSFETs of the current source, you will get very complicated answers! You could use just gm and rds for the 4 diff amp MOSFETs.

I did a solution with just gm and rds for all the MOSFETs, including M1 and M2, and even then the solutions begin to expand.

Your description of the CMRR problem seems to indicate that you should keep gm1, rds1 and gm2, rds2 as separate parameters, but I see no mention of what to do about the parameters of the 4 diff amp parameters. Maybe you should just go with gm and rds.

You should move over to the CMRR thread for further discussion. Give your calculations a try and post your results.