Attenuator With Current Dependent Resistor Challenge

WBahn

Joined Mar 31, 2012
32,871
Hello again,

Found a new angle for this discussion. That is, when trying to use the transistor model with 're' in it in a spice program. It makes it much easier to make 're' a simple current dependent resistor re(i) with (i) being the emitter current.
So what is the difference?
Well, in the standard way of doing it, we have to FIRST evaluate the DC conditions in order to calculate the value of 're'. After we do that, then we have to insert the value of 're' into the schematic, then we can proceed with the AC analysis in the usual way. If we happen to change the DC supply voltage, well then we have to recalculate 're' again and then change the value manually before we can do the AC analysis because the old value of 're' no longer applies.
I think maybe I am seeing where a disconnect is happening. When you use a linearized model, it is usually because you are doing the analysis manually and are NOT using a SPICE simulator. Remember, that's why these techniques were developed -- because we have all kinds of wonderful math tools available to deal with linear systems and the world of nonlinear systems analysis is a much darker and scarier place. If you are using a SPICE simulator, then you simply use the full up transistor-based schematic and let it do the simulation with whatever transistor model you happen to be using. We do NOT run a DC simulation to get the operating point and then use that to make a different schematic to do the transient analysis. Why would we? We have a simulator that is specifically intended to live in the dark world and simulate the nonlinear behavior of real world components.

So if your approach involves making a second schematic that incorporates a current dependent resistor and then claiming it is better than the linearized model, that may be true but it has to be evaluated based on the complexity of doing the subsequent nonlinear analysis by hand, not with a simulator. Otherwise, if you are going to use a simulator to analyze your resulting circuit, you need to compare it to the results and effort needed to do the analysis with the original transistor circuit directly with the simulator. Guess which one is going to win?
 

Thread Starter

MrAl

Joined Jun 17, 2014
13,708
Hi,

Well 'usually' doesnt mean 'all the time'.
Spice simulators can be used to test results, with any model we have chosen.
Cant use a full transistor based model to test results from a simpler model.
You have to know the DC operating point to use some models.
The complexity depends on what the student was given.
"if you are going to use a simulator to analyze your resulting circuit, you need
to compare it to the results and effort needed to do the analysis with the original
transistor circuit directly with the simulator. Guess which one is going to win?"
If you are given a transistor model that is already in the simulator then you got
it made, but if not, you have to create a new one to test your results. I dont
think any simulator has the model being talked about here in their library.
However, if they did, it would be best with the re(i) resistor. In fact, try and do
it differently and see what problem you run into, go ahead. You may have
inadvertently brought out the best point to this yet :)
 

LvW

Joined Jun 13, 2013
2,030
Here are the two functions used in the graphical comparison:
Gain1=(2*K+E2)/(2*(3*K+2*E2))
Gain2=(K+E2)/(2*(K+2*E2))
where
Gain1 uses the standard method and
Gain2 uses the 'new' method.
MrAl - hello again.
It would be nice and helpful (to continue the discussion) if you could show us how the above two expressions were derived.
 

WBahn

Joined Mar 31, 2012
32,871
Hi,

Well 'usually' doesnt mean 'all the time'.
Spice simulators can be used to test results, with any model we have chosen.
Cant use a full transistor based model to test results from a simpler model.
You have to know the DC operating point to use some models.
The complexity depends on what the student was given.
"if you are going to use a simulator to analyze your resulting circuit, you need
to compare it to the results and effort needed to do the analysis with the original
transistor circuit directly with the simulator. Guess which one is going to win?"
If you are given a transistor model that is already in the simulator then you got
it made, but if not, you have to create a new one to test your results. I dont
think any simulator has the model being talked about here in their library.
However, if they did, it would be best with the re(i) resistor. In fact, try and do
it differently and see what problem you run into, go ahead. You may have
inadvertently brought out the best point to this yet :)
If you can't get a decent transistor model from the manufacturer that made the transistor, then perhaps you shouldn't be using that transistor in the first place.

Even if you do have to use one of the simpler models and set the parameters based on test measurements, it is almost certainly going to be better over a far greater range of operation than what you are talking about doing.
 

Thread Starter

MrAl

Joined Jun 17, 2014
13,708
If you can't get a decent transistor model from the manufacturer that made the transistor, then perhaps you shouldn't be using that transistor in the first place.

Even if you do have to use one of the simpler models and set the parameters based on test measurements, it is almost certainly going to be better over a far greater range of operation than what you are talking about doing.
Hi,

Thanks again for the reply.

Well you see, the discussion i brought up is not about what is the best possible model. The best possible model is probably a real physical device except in certain cases. If you accept the standard spice model then that's probably pretty good and includes effects like the Early Effect and things like that, and also transient elements like capacitors that help model the time aspects. To model that Early Effect i think we would have to add 'ro' to the equations, but this thread wasnt about that either.

But this thread is about, or is supposed to be about, one particular type of model. That's the basis of this whole discussion. It came about because i noticed that the question involving the transistor model with 're' in it comes up now and then on sites like this one and i noticed that there is a simple modification that helps in the calculations.

I guess to narrow down the entire premise of this thread, i would say that it is about replacing 're' in the T model with re(i) and thus making it a little simpler in some cases, or at least that there are not many differences and having a function like re(i) in there means that the value can now be ignored because once in the equations, the value never needs to be actually explicitly calculated.
Surely you must at least find it an interesting alternative.
 
Last edited:

Thread Starter

MrAl

Joined Jun 17, 2014
13,708
MrAl - hello again.
It would be nice and helpful (to continue the discussion) if you could show us how the above two expressions were derived.

Hello there and thanks for the reply,

The first one is derived by analyzing the circuit for 're' and then using that value in the AC circuit and calculating the AC gain, however all of this is done symbolically with no numerical values even for K yet. K is the thermal voltage.
The symbolic solution comes out a little bit long and involved, but by making all resistors equal to the same resistance R1 as:
R2=R1
R3=R1
R4=R1
then the formula boils down to the one shown there. The values in the original circuit where all the same, so by making them all equal to R1 then R1 cancels out of the solution completely. There's no reason why we cant change this though.

The second one is derived by replacing 're' in the 'T' model with re(i) where 'i' is the emitter current. re(i) is a function of the emitter current and thus 're' must be the right value because that is how we define it in this simplified model:
re=K/idc
changes to:
re(i)=K/i
and then the resistors are all made equal to R1 and again R1 cancels and so we get a nice little formula.

To recap the first one (the second one isnt that much different as to the procedure):
1. Using the supply voltage and resistor values, calculate the emitter current symbolically.
2. Using the emitter current, calculate the static value of 're' but keep it symbolic.
3. Arrange the components into the AC equiv circuit, then calculate the AC gain, keeping it all symbolic.
4. Replace all resistors with "R1" and simplify.

If you would like to see all steps i guess i could post that.
 

LvW

Joined Jun 13, 2013
2,030
I guess to narrow down the entire premise of this thread, i would say that it is about replacing 're' in the T model with re(i) and thus making it a little simpler in some cases,...
But - as you certainly know - in the small-signal BJT model the part re=1/gm=Vt/Ic is, of course, not a fixed value but is always considered as a function re=f(I).
 

Thread Starter

MrAl

Joined Jun 17, 2014
13,708
But - as you certainly know - in the small-signal BJT model the part re=1/gm=Vt/Ic is, of course, not a fixed value but is always considered as a function re=f(I).
Hi,

Yes i understand that, but doesnt that just make my point that much more justified?
Maybe i dont understand your point there.

Also, just to be succinct, i think we have:
're' is approximately equal to 1/gm.
 

LvW

Joined Jun 13, 2013
2,030
Hi,
Maybe i dont understand your point there.
My point is the following:
From your text (and wording) I`ve got the impression that your (novel) method is "replacing 're' in the T model with re(i) and thus making it a little simpler".
And the intention of my comment was to state that from the beginning in the T-model re is and was always a function of the dc current.
 

Thread Starter

MrAl

Joined Jun 17, 2014
13,708
My point is the following:
From your text (and wording) I`ve got the impression that your (novel) method is "replacing 're' in the T model with re(i) and thus making it a little simpler".
And the intention of my comment was to state that from the beginning in the T-model re is and was always a function of the dc current.
Hi,

Ok thanks, but that's not being used in the same way i am using it as it is normally calculated using the standard method. That is why we end up with two different solutions as i have shown. If they were both REALLY the same, the solutions would be identical.

So that's another reason why to use re(i) rather than the static value 're'. Because in the more real life version 're' changes as the DC bias changes, it does not stay the same as calculated with the standard method.

In the standard method we calculate the DC bias like this as i am sure you know:
[E2 is supply voltage again]

vR3=E2*R3/(R2+R3) [constant voltage]
iR3=vR3/R3 [constant emitter current]
re=K/iR3 [hence constant re]
DONE calculating re numerically and re never changes.
Next we go to the AC circuit by shorting stuff out and then calculate the AC gain.

In the adjusted version we do it like this:
vR3=E2*R3/(R2+R3+re(iR3)) [with re being a symbolic function and not calculated numerically and vR3 is a variable not a constant]
iR3=vR3/R3 [a variable emitter current because vR3 is variable]
re(iR3)=K/iR3 [re must be a function now because iR3 varies]
expanding:
re(iR3)=K/(E2/(R2+R3+re(iR3)))
solving for re(iR3) explicitly we get:
re(iR3)=(K*R3+K*R2)/(E2-K)
and note that the right hand side is void of 're' altogether.
Next we go to the AC circuit by using the right hand side of re(iR3) and short stuff out and then calculate the AC gain.
If all of the resistors have the same value (except re of course) then we set all the others equal to R1 and then
simplify. The result is Gain2 in one of the previous posts. Note that the value of 're' never has to be calculated directly once we have this new circuit change. Doing it the standard way, the value of 're' has to be calculated again after every change of voltage E2 which is the supply voltage.

Now my thoughts on this are that it should be done that way, but because the results are usually so close it is normally done using the standard method. The fact that re varies as noted before makes this even a more likely candidate. In that case the distortion could show up too but i wont got that far with it just yet.
 

LvW

Joined Jun 13, 2013
2,030
I must admit that I cannot follow - it is not easy to evaluate your equations (K, E and v are voltages?).
In post#46 I can read R1=R2=R3=R4 ....related to which diagram?

I think, it would be best to explain your equations using an example with numbers - and to show how the "novel" method is more exact than the "old" one.
 

Thread Starter

MrAl

Joined Jun 17, 2014
13,708
I must admit that I cannot follow - it is not easy to evaluate your equations (K, E and v are voltages?).
In post#46 I can read R1=R2=R3=R4 ....related to which diagram?

I think, it would be best to explain your equations using an example with numbers - and to show how the "novel" method is more exact than the "old" one.

Hello again,

I've included the diagram again for convenience. Small byte count on the file too.

I am not sure i can do a numerical example from start to finish because the second method relies on a function which has no definite value and that is by design in order to come up with an analytical solution. The analytical solution solves for every possible value not just one.
Given the diagram below, i'll go through the first method solution.
vR3=voltage across R3
iR3=current through R3
in this circuit iR3 is also the emitter current.

1. Short out 're'.
2. Calculate the DC voltage across R3 (vR3) because if we know that voltage and we divide by R3 we get the current through R3 which we call iR3. To calculate this algebraically we just use the divider formula and get:
vR3=V2*R3/(R2+R3) and that is the voltage across R3.
3. Knowing that, we can calculate iR3:
iR3=vR3/R3=V2/(R2+R3)
4. Knowing that, we can calculate 're':
re=K/iR3
because iR3 is also the emitter current and so we have:
re=(K*(R3+R2))/V2
5. Having 're', we can calculate the total resistance attached to the emitter which is RT=re+R3.
6. Now that we have that we can calculate the AC gain by shorting out he caps and power supply and applying an input voltage Vin.
That means the resistors R2, RT, and R4 are all in parallel call this resistance Rp.
RT comes out to: RT=(R3*V2+K*R3+K*R2)/V2
Placing those resistors in parallel we get:
Rp=(R2*R4*(R3*V2+K*R3+K*R2))/(R3*R4*V2+R2*R4*V2+R2*R3*V2+K*R3*R4+K*R2*R4+K*R2*R3+K*R2^2)
7. Apply Vin to the new AC voltage divider we get:
Vout=Vin*Rp/(Rp+R1)
and therefore the gain is:
G=Rp/(Rp+R1)
8. Expanding this we get:
G=(R2*R4*(R3*V2+K*R3+K*R2))/(R2*R3*R4*V2+R1*R3*R4*V2+R1*
R2*R4*V2+R1*R2*R3*V2+K*R2*R3*R4+K*R1*R3*R4+K*R2^2*R4+K*R1*R2*R4+
K*R1*R2*R3+K*R1*R2^2)
9. Setting R2=R1, R3=R1, R4=R1, we get:
G=(R1^2*(R1*V2+2*K*R1))/(4*R1^3*V2+6*K*R1^3)
and simplifying the R1's cancel and we are left with:
G=(V2+2*K)/(2*(2*V2+3*K))

I gave two numerical results before though and for this one it was:
0.263158
and for the new way it was:
0.264706

so the difference is small in this case. In a regular transistor circuit it should be small.

The calculations for the 'new' way went as follows:
Rp=(R2*(E2*R3+K*R2)*R4)/(E2*R3*R4+E2*R2*R4+E2*R2*R3+K*R2^2)
G=Rp/(Rp+R1)=(R2*(E2*R3+K*R2)*R4)/(E2*R2*R3*R4+E2*R1*R3*R4+K*R2^2*R4+E2*R1*R2*R4+E2*R1*R2*R3+K*R1*R2^2)
and after making all resistors equal to R1 we end up with:
G=(K+E2)/(2*(K+2*E2))
It's a little interesting that Rp was actually simpler.

Now in all of the above K is the thermal voltage and for a transistor this is usually taken as 0.025 to start with because it is NT/Q.
In the examples i have given i use 0.25v not 0.025v which is different but used to see a wider difference. In reality that would be for a very hot temperature.
E2 or V2 is the supply voltage. I usually use E2 but used V2 in the schematic, but they one and the same voltage source +Vcc.

VoltageDividerWith_Re-1.gif
 

LvW

Joined Jun 13, 2013
2,030
hello agian,

I am an engineer - and as such I am interested primarily in real and practical circuits.
Therefore my (simple) question:
The gain of a basic common-emitter stage (without DC-stabilizing feedback resistor RE and neglecting EARLY effect) ) is simply A=-gm*RC.
(transconductance gm=1/re=Ic/Vt, collector resistor RC).
Question: Will your method lead to another result?
 

Thread Starter

MrAl

Joined Jun 17, 2014
13,708
hello agian,

I am an engineer - and as such I am interested primarily in real and practical circuits.
Therefore my (simple) question:
The gain of a basic common-emitter stage (without DC-stabilizing feedback resistor RE and neglecting EARLY effect) ) is simply A=-gm*RC.
(transconductance gm=1/re=Ic/Vt, collector resistor RC).
Question: Will your method lead to another result?
Hello again,

Can you point me to a circuit so i know what you are doing there?
I see you dont have RE, that's good, but i dont know how you are driving the base and i dont know if you have any load. Is this with no load other than the RC?
I suppose that you drive the base though a resistor and capacitor with input source Vin being an AC source.
Just have to be sure.

Thanks.
 

LvW

Joined Jun 13, 2013
2,030
MrAl - I spoke about the most simple common-emitter stage.
The mentioned voltage gain expression is well-known and its derivation can be found in each textbook - and it is, of course, the gain between base and collector, assuming a suitable bias point (which determines the gm value) and no additional load - otherwise I would have mentioned the load resistance.
 

Thread Starter

MrAl

Joined Jun 17, 2014
13,708
MrAl - I spoke about the most simple common-emitter stage.
The mentioned voltage gain expression is well-known and its derivation can be found in each textbook - and it is, of course, the gain between base and collector, assuming a suitable bias point (which determines the gm value) and no additional load - otherwise I would have mentioned the load resistance.
Hi,

Ok, how about this one...

TransistorAmp_20181230_103753.gif

Caps C1 and C2 are very large. R2 is for DC biasing. R3 is zero.
 

LvW

Joined Jun 13, 2013
2,030
....and R1=0.
I spoke about the most simple gain stage and the gain between base and Collector.
I do not want to calculate the actual bias point - so forget about the value of R2.
My question was only (assuming a DC collector current IC=const): Gain A=-gm*R4 with gm=IC/Vt.
Do you propose another formula?
 

Thread Starter

MrAl

Joined Jun 17, 2014
13,708
....and R1=0.
I spoke about the most simple gain stage and the gain between base and Collector.
I do not want to calculate the actual bias point - so forget about the value of R2.
My question was only (assuming a DC collector current IC=const): Gain A=-gm*R4 with gm=IC/Vt.
Do you propose another formula?
Hello again,

Ok i will make R1=0 also, and not be too particular about the current in R2 to establish the DC bias point.

So you are asserting gm=iC/VT and so given the collector current i can calculate the base current knowing the Beta.
Without R1 though i am not sure i can make a direct comparison or not because R1 plays a part in the overall AC gain.
I'll see what comes of this without R1.

Without actually doing this yet, if you are also asserting that your formula, gain A=gm*R4 is just like any other formula for small signal analysis then i would have to guess that it should be the same as the 're' model because the re(i) model i propose is so very similar to the standard 're' model used (usually referred to as the T model).

Ok let me see what happens here with the new circuit.
I'll make a new post so it shows up in the 'Alerts' for members following this thread.
 

Thread Starter

MrAl

Joined Jun 17, 2014
13,708
Hello again,

Ok i got rid of R1, got rid of C1 and C2 and R2, then calculated the gain.
What i got was the more exact relationship for gm which is:
gm=a/re

where a=transistor alpha=Beta/(Beta+1)

With Beta large alpha is often taken to be equal to 1, but calculating things directly we see the more exact value pop out.

With this in mind, the 'new' method could be very slightly different as expected.
 

LvW

Joined Jun 13, 2013
2,030
What i got was the more exact relationship for gm which is:
gm=a/re
where a=transistor alpha=Beta/(Beta+1)
Sorry, but I doubt if it is "more exact".
The transconductance is DEFINED as
gm=d(Ic)/d/VBE)
That is nothing else than the slope of the well-known exponential Shockley equation Ic=f(VBE, Vt).
And the differential quotient (slope) is calculated to be gm=Ic/Vt.

This definition does not depend on beta and does not need such an artificial quantity re which appears in just one of the small-signal models for the BJT. Can you show how your expression is "more exact"?
 
Top