Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Pspice how can't be so wrong

Status
Not open for further replies.

jony130

Full Member level 3
Joined
Sep 6, 2006
Messages
168
Helped
51
Reputation
102
Reaction score
44
Trophy points
1,308
Activity points
2,326
pspice abm schmitt trigger

I got this "simple" (not for pspice Orcad 9.2) circuit :

And pspice calculate the bias point and is all Ok.

But if I change the circuit a little bit (positive feedback).
Then pspice show that I don't expect.
This is a bias point that calculate the pspice

I even build the circuit to assure the correct answers because I was a little confuse.
Only LTspic and multisim show the correct answer.
So here we have another example that pspice sometime is wrong
 

pspice 9 bias point

jony130 said:
Only LTspic and multisim show the correct answer.
So here we have another example that pspice sometime is wrong

I can´t believe that PSpice "sometimes is wrong" as all the mentioned programs use the spice principle. But I will test both of your circuits tomorrow.
However, one question: You speak of a "correct answer". What did you expect and what is the correct answer (the same bias point in both cases) ?
 

    jony130

    Points: 2
    Helpful Answer Positive Rating
ltspice bjt models

You should never totally trust CAD programs. I have had many errors on PSpice over the years. One passive circuit showed the output appearing before the input was applied. A JFET amplifier had gain at X-Ray frequencies.
 

    jony130

    Points: 2
    Helpful Answer Positive Rating
bc549c ltspice

LvW said:
However, one question: You speak of a "correct answer". What did you expect and what is the correct answer (the same bias point in both cases) ?
Well I expect the saturation because the positive feedback.
If the output voltage is rise then T1 and T3 are more open. So the voltage on the base T4 is rise to. So the output voltage rise even more (positive feedback).
And I build the circuit and I measure -12V on output. LTspice show (11.6V) and multisim10 show -12V.
 

ltspice+schmitt

flatulent said:
You should never totally trust CAD programs. I have had many errors on PSpice over the years. One passive circuit showed the output appearing before the input was applied. A JFET amplifier had gain at X-Ray frequencies.

Of course, flatulent is right when he recommends not to trust "totally" to CAD programs. However, I like to correct this statement slightly. I think one should not trust totally the models used within those programs. It is my experience that in most cases of a conflict between reality and simulation a simplified model was the source rather than the program itself. I am sure that flatulent´s observation that a FET amplifies at X-ray frequencies is a question of the model and of the program.

And this leads directly to the problem mentioned by jony130:

Hi, jony 130: I am pretty sure the reason of the discrepancy is simply that the BJT model in PSpice is not the same as used in both of the other programs. It´s a pity that you didn´t give the information what transistors you have used.
So I have chosen 2N3904 ans 2N3906 for my simulation profile (same circuits as yours). I have simulated with PSpice and TOPSpice - with different bias points.
And than I have checked the models and I have found out that the model description is different. Thus, no surprise ! Please, have a look on the model description.
 

    jony130

    Points: 2
    Helpful Answer Positive Rating
bc549c spice model

I don't think, that it's a problem of the model. You can see, that the shown bias point is basically unstable, independent of the particular transistor properties.

It's really an interesting question, why the Bias Point Solver finds a solution, that won't be observed in a real circuit. I assume, that it's a side effect of the solver's operation method.

I don't regard the solution simply as wrong. Or you can say, it's as wrong as an oscillator simulation that shows no output without an initial disturbance.
 

    jony130

    Points: 2
    Helpful Answer Positive Rating
ltspice abm

FvM said:
It's really an interesting question, why the Bias Point Solver finds a solution, that won't be observed in a real circuit. I assume, that it's a side effect of the solver's operation method.
I don't regard the solution simply as wrong. Or you can say, it's as wrong as an oscillator simulation that shows no output without an initial disturbance.

OK, I agree. However, since the question was related solely to simulation results I did not compare with "real life"results. But, on the other hand, I am sure that different simulated bias points result from different transistor models. But, of course, this can be proved.

Regarding the "wrong"-philosophy I have another good example which is worth to be discussed:
If an opamp has positive instead of negative resistive feedback a simulation program will find a stable bias point; in addition, an ac analysis will produce a continuous and frequency dependent gain function.
Question: Is this result right or wrong ?

Added after 14 minutes:

I just have made a TRAN analysis in PSpice with Vdd=12volts and after 1msec an increase to 12.001 volts. As expected - the circuit went immediately into saturation.
 

    jony130

    Points: 2
    Helpful Answer Positive Rating
bc549+model+spice

LvW said:
I am pretty sure the reason of the discrepancy is simply that the BJT model in PSpice is not the same as used in both of the other programs.
I check this and in LT uses the PSpice models

Code:
.model BC549C  NPN(Bf=490 Br=2.9 Cjc=5.5p Cje=12p Eg=1.1 Fc=.5 IkF=.1500 Ikr=6 Is=8f Isc=7p Ise=100f Itf=1.4 Mjc=.31 Mje=.7 Nc=1.5 Ne=1.8 Nk=.63
Rc=1.12 Tf=420p Tr=10n Vaf=24 Vjc=.5 Vje=.5 Vtf=12 Xtb=1.5Xtf=50Xti=3)

.model BC557A PNP(Is=10.2f BF=221 VAF=121 Ikf=60M Ise=5.93p Ne=2 Br=4 Nr=1 Var=20
Ikr=90M Re=0.515 Rb=2.06 Rc=0.206 Xtb=1.5 Cje=24.9p Vje=1.1 Mje=0.5 Cjc=8.67p Vjc=0.3 Tf=497p Tr=345n)
And again LT find a solution (11.2V) that's very different from the PSpice result (0.1V)
It's looks like the LTspice is given more "real life" solution.
But is a TRAN analysis PSpice show exactly the same result as LT (11.2V)
 

bc557a spice

jony130 said:
.....................
And again LT find a solution (11.2V) that's very different from the PSpice result (0.1V)
It's looks like the LTspice is given more "real life" solution.

It´s really funny. I have simulated your circuit No. 2 (with positive feedback) in LTspice using the same transistors as I have used before in PSpice (but with slightly modified model description) and I got about the same results: Bias point at the ouput without saturation (app 0.1 volts). Next time I will try it with your transistors.

Added after 50 minutes:

Hi jony130,

I suppose, now I can solve the discrepancy between our results:
1.) When I speak about operating point found by analysis I refer simply to "op" analysis. As far as PSpice is concerned you do the same as I can see in your diagram.
2.) However, I don´t know which analysis you have performed using the other programs - perhaps TRAN ?
3.) The reason for this comment is as follows: When I try to find the operating point with PSpice not with "op" but in a TRAN analysis (without any time dependent parameter) the circuit shows 11.2 V at the output (saturation) - however, only when I before gave the instruction "skip initial bias solution". If not, a stable bias point is calculated also doing TRAN analysis.
4.) Question: Are your results (saturation) using LTSpice resp. Multisim derived from a simple op-statement or from something like a TRAN statement ?
5.) Additional info: My analysis in LTSpice (simple .op statement) results in a stable bias point at app. +200mvolts at the output - even with BC549/BC557.
 

    jony130

    Points: 2
    Helpful Answer Positive Rating
ltspice bc549

Yes It´s really funny, and yes I uses simply "op" analysis in LT.
Multisim


LTspice


And after this:
I have simulated your circuit No. 2 (with positive feedback) in LTspice using the same transistors as I have used before in PSpice (but with slightly modified model description) and I got about the same results: Bias point at the ouput without saturation (app 0.1 volts)
I restore the default values in LTspice and surprise surprise result has change.
And I got about the same results as in Pspice 0.1V :D

FvM said:
It's really an interesting question, why the Bias Point Solver finds a solution, that won't be observed in a real circuit.
It's really interesting, because the noobie in EE will believe the PSpice result and if he build the circuit, he will be looking error in assembling not in the circuit.
 

To my opinion, one can't expect a generally correct solution from the Bias Point Analysis for a bistable circuit. I may seem as an advantage, that Multisim is giving a more realistic solution. It's producing incorrect results in other cases as well. My general impression is, that Multisim is rather faking real circuit behaviour than performing more reliable analysis.

I wonder, if Pspice also shows the said results when simulating the a DC transfer function. This could be actually regarded as faulty behaviour.
 

    jony130

    Points: 2
    Helpful Answer Positive Rating
FvM said:
To my opinion, one can't expect a generally correct solution from the Bias Point Analysis for a bistable circuit.
I wonder, if Pspice also shows the said results when simulating the a DC transfer function. This could be actually regarded as faulty behaviour.

Well, answering the second question first: Yes, applying a dc voltage to the 100k base resistor in the circuit with pos. feedback and performing a dc analysis between -1V and +1V results in a classical transfer curve - again with app 100mV at the output for zero input.

The second point is for my opinion a more or less philosophical question:
Is it really a faulty behaviour ? Is the bias point for the circuit with pos. feedback right or wrong ?
My answer is: It is correct as the program for "op analysis" did nothing else than to calculate voltages which fulfill the external conditions. It is another point if in reality (with noise and supply uncertainties) this result is meaningful or not.
As a simple example please look at the pdf attachement. For clarity I have used an idealized opamp model (gain=100) with positive feedback. And the program did find a set of voltages which meets the external conditions (gain and resistor values). You can check the result with hand calculations.
However, if we try to evaluate the result we see that is not logical, because a positive input applied to the positive terminal cannot produce a negative output voltage. But nevertheless, Kirchhoff and Ohm are satisfied. And that´s the only task we can expect from a program.
And in this respect FLATULENT is right to say: You should never totally trust CAD programs
Finally, an mechanical analogon: In theory, it should be possible to place one small iron ball onto a bigger one without loosing stability. In THEORY ! However, everybody knows that minor external disturbances lead to instability of this system which has positive feedback.
 

    jony130

    Points: 2
    Helpful Answer Positive Rating
I understand from your report, that PSpice is using the same Solver for Bias Point and DC Transfer analysis, ignoring the positive feedback in both cases. I must confess that I wouldn't have expected this result. It's not a particular problem to me, cause I generally don't trust simulations unconditionally.

I don't think however, that the mechanical balance analogon really hits. It's rather the case of a ball laying motionless on an inclined plane. Following the analogon, the PSpice solver is ignoring gravity when calculating the solution.
 

    jony130

    Points: 2
    Helpful Answer Positive Rating
One thing to keep in mind is that although all vendors use the basic UC Berkeley code, they have different proprietary methods for solving the matrix that describes the circuit. Since all notes are not connected to all other nodes by circuit elements, the matrix is very sparse.
 

    jony130

    Points: 2
    Helpful Answer Positive Rating
FvM said:
..............
I don't think however, that the mechanical balance analogon really hits. It's rather the case of a ball laying motionless on an inclined plane. Following the analogon, the PSpice solver is ignoring gravity when calculating the solution.

Yes, I confess the example meets the problem not by 100%.
Perhaps the case mentioned by you some days ago is more appropriate:
....or you can say, it's as wrong as an oscillator simulation that shows no output without an initial disturbance.

I guess, also in the present case under discussion the reason for misbehaving is the fact that we have no "initial disturbance".

But the problem is not new as the following text shows:

Excerpt from IEEE press:
A method for automatically finding multiple operating points.

Finding the dc operating points of a nonlinear circuit is one of the most important and difficult tasks in electrical circuit simulation.In the majority of circuit simulation programs the dc operating point is found (as in SPICE, for example) by using a Newton–Raphson-based iterative algorithm.Such algorithms have two shortcomings:
First,convergence is in general not guaranteed unless the initial guess (specified by the user nodeset statement) is suffciently close to SPICE by the actual solution.Unfortunately the user either may not know the solution or cannot give a sufficiently accurate initial guess.
Second, only one operating point can be found during a single analysis; neither location nor even existence of other operating points is known once the algorithm has converged to a particular operating point.
 

    jony130

    Points: 2
    Helpful Answer Positive Rating
I checked the PSpice behaviour with a simple schmitt-trigger ABM circuit and found, that it's basically identical for Bias Point, DC Sweep and Transient Analysis.



For an input voltage within the threshold interval (the bistable range), the said abnormal behaviour with unsaturated output voltage can be observed. If the input voltage exceeds the threshold interval, the simulation behaves corresponding to the real circuit. Once it has reached a stable saturated bias point, it continues regular behaviour.

From this results, I don't recognize a problem of missing initial disturbance. Within the bistable range, two stable saturated solutions exists. The solver selects a third unstable solution. It apparently satisfies the node voltage equations but isn't physically existing to my opinion.

I wonder if this behaviour has been introduced with PSpice 9, a previous PSpice version or is already present in original SPICE 2 or 3.
 

I think - as a consequence - we can say: Don´t trust the bias point calculation as well as a simulated dc transfer curve if the circuit to be analyzed contains at least one positive feedback path. To be sure that a stable operating point exist one should run a TRAN analysis.
And even the TRAN analysis is not always unequivocal.
 

Is the bjt 2N222 of Multisim equivalent to the bjt BC549c of pspice?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top