Electrical – Simulation discrepancy in Qucs with 2N3904 transistor

ltspicequcssimulationspicetransistors

I've been testing out a few circuit simulation applications and ran into an unusual issue with Qucs and the 2N3904 transistor. For a simple NPN transistor circuit with load resistor \$R_L\$, base resistor \$R_B\$, and pull-down resistor \$R_P\$, I'm seeing an inflection in the collector-to-emitter voltage \$V_{CE}\$ as I sweep \$R_B\$ through a range of values. It also reads much higher than it should, starting out around 0.4 V and increasing to nearly 5 V. In the screenshot below, you can see how \$V_{CE}\$ rises sharply and \$I_C\$ begins to decline when \$R_B\$ is around 4 kOhm.

enter image description here

When I simulate the same circuit in LTSpice, the results are more typical: \$V_{CE}\$ is less than 0.2 V while in saturation and there's a nice flat \$I_C\$ curve around 120 mA or so, which correlates to the supply voltage and load resistor.

enter image description here

I'm thinking there must be an incorrect parameter in the 2N3904 component in Qucs that is throwing things off. I've tried to compare the parameters between the different software packages, but haven't had much luck (some of the data sheets don't even have all of those parameters listed). Interestingly, if I try to substitute a 2N2222, the inflection is gone, but I think \$V_{CE}\$ is still too high since the transistor should be in saturation.

enter image description here

Am I doing something wrong, or is my Qucs configured incorrectly? I'm trying to evaluate a variety of simulation packages and I really like Qucs, but I want to be sure the simulation results are going to be accurate going forward. Thanks for the help.

Best Answer

The hFE of the 2N3904 is typically around 40-50 at 110mA Ic and Vce = 1V, according to this datasheet and this datasheet.

Your Qucs simulation shows 2.2mA base current with Vce = 1V and Ic = 110mA, so hFE is about 50, which does not seem unreasonable.

The LTSpice simulation seems a bit more dubious, for that part number, at least based on the above datasheets. I believe you're probably using the Philips model in LTspice, which seems to have an unusually high hFE at 110mA for a crappy 2N3904. The 2N3904_Cordell model has lower hFE, at high current anyway. You're really out at the edge of where people would use a 2N3904 anyway, so I'm not sure it's even that useful a comparison. Try at 5 or 10mA Ic and see what the differences are.

You should be able to compare the model parameters to see what the differences are. You're changing two things at once (model and simulator) so you're not really comparing simulators.

I believe that both are based on Berkeley SPICE 3.x so the simulation results should be similar, all other things being equal (and there are many options with each).