Sunday, December 9, 2012

How Accurate are Manufacturers' Bipolar Transistor SPICE Models?

Recently I've been working on a few circuits that use discrete bipolar junction transistors (BJT) operating in linear (as opposed to switching) mode. The performance of these circuits depend critically on transistor characteristics, so I've done a lot of LTSpice modeling to understand and improve my designs.

A big problem I've run into is inaccurate manufacturers' SPICE models, which don't match either the datasheet specs or the actual parts. An interesting result has been the growth of amateur or hobbyist model creation, which seems to be centered around the DIY audio community. Many of the resulting models, derived from measurements on purchased parts, are far superior to those from the manufacturer. Caveat emptor, but a lot of the third-party models I've pulled off the web and tested are head and shoulders above the OEM versions.

The example below is the ON Semiconductor (formerly Motorola) D44H11 family, NPN 80V 10A power transistors available in several packages. I am quite deliberately picking on On Semi because, in my experience, many of their BJT models are wildly inaccurate. Other manufacturers certainly aren't perfect, but ON Semi seems to be the worst.

The plots show hFE (current gain) verses IC (collector current), which is a useful parameter to examine for several reasons. hFE is critical in many designs, so an hFE-IC curve is included on most BJT datasheets. It's also very easy to create hFE-IC curves in SPICE, yet hFE's dependence on IC is complex, so the accuracy of a model's hFE-IC curve is a reasonably good indication of its overall quality.

The first image shows the hFE-IC curve from the current On Semiconductor MJF44H11 datasheet. IC is shown from 0.1A to 10A, hFE peaks at around 160, and that, at higher currents, hFE depends on the collector-emitter voltage, VCE. Based on my own measurements, the datasheet is reasonably accurate.

 

 ON Semiconductor MJF44H11 hFE verses IC curve.

 
The next image shows hFE-IC curves extracted in LTSpice from ON Semi's model (blue) and from a third party model (green) created by Harry Dymond (http://www.cordellaudio.com/book/spice_models.shtml). The X-axis (IC) runs from 0.01A to 10A (ignore the "S" units), VCE was 4.3V, and the vertical scale is somewhat different, but it's pretty easy to see that the Dymond model is far closer to the datasheet.

 

 Both models are listed below, and even folks who don't understand SPICE models will see that many of the parameters in the two models are significantly different.

Official ON Semiconductor model:

**************************************
*      Model Generated by MODPEX     *
*Copyright(c) Symmetry Design Systems*
*         All Rights Reserved        *
*    UNPUBLISHED LICENSED SOFTWARE   *
*   Contains Proprietary Information *
*      Which is The Property of      *
*     SYMMETRY OR ITS LICENSORS      *
*    Modeling services provided by   *
* Interface Technologies www.i-t.com *
**************************************
.MODEL mjf44h11 npn
+IS=1.32547e-11 BF=164.27 NF=1.16023 VAF=46.9759
+IKF=4.32946 ISE=2.61723e-12 NE=1.62633 BR=1.80421
+NR=1.16498 VAR=469.765 IKR=0.670133 ISC=2.61723e-12
+NC=3.00051 RB=1.61538 IRB=0.1 RBM=0.1
+RE=0.00864486 RC=0.0432243 XTB=0.1 XTI=1
+EG=1.05 CJE=1.04839e-09 VJE=0.651544 MJE=0.353502
+TF=3.84017e-09 XTF=1.35721 VTF=0.995712 ITF=0.999991
+CJC=3.7959e-10 VJC=0.422311 MJC=0.334082 XCJC=0.803125
+FC=0.533765 CJS=0 VJS=0.75 MJS=0.5
+TR=1.93641e-08 PTF=0 KF=0 AF=1
* Model generated on Feb  7, 2004
* Model format: SPICE3


Third-party Harry Dymond model:

***************************************************************************
*                                                                         *
*  D44H11 model created by Harry Dymond. May be freely distributed with   *
*  the proviso that this header comment is included in its entirety. The  *
*  model is based on datasheet and custom measurements available at:      *
*  https://dl.dropbox.com/s/v95mdjwit237sl5/transistor%20models.zip?dl=1  *
*                                                                         *
*  Please note that fT is not accurately modelled at low voltage. This is *
*  in order to accurately model the transistor at higher voltages.        *
*                                                                         *
*  The model has not been tested at any temperature other than 25 C       *
*                                                                         *
*  If you feel you can improve the model you are of course welcome to do  *
*  so but if you do, please let me know!                                  *
*                                                                         *
*  harry(dot)dymond(at)bristol(dot)ac(dot)uk                              *
*                                                                         *
***************************************************************************
.MODEL D44H11_HD NPN(
+IS=2.14e-10 NF=1.271265 BF=208.89 RB=2 RBM=0.1 IRB=10
+VAF=342 NE=2.7349 ISE=1e-8 IKF=30 NK=0.9687
+BR=4 IKR=1.05 VAR=35
+XTF=1800 TF=1.9e-9 ITF=200 VTF=40
+CJE=1.4e-9 MJE=0.3092662 VJE=0.4723539
+CJC=175.527e-12 MJC=0.383595 VJC=0.479488
+TNOM=25 Vceo=80 Icrating=8 mfg=ON)

Saturday, February 27, 2010

Anjon Big Frog Pond Pumps - Misleading Claims on Energy Efficient

A while back I bought an Anjon BF3000 "Big Frog" pond pump to replace a broken pump in our koi pond. The big reason I chose this pump was that Anjon claims it to be very energy efficient, drawing only 150 watts, compared to 300 watts for most similar products. Unfortunately, this isn't true. My measurements showed that the Anjon Big Frog pump is actually slightly less efficient than the old Aquascapes pump it replaced.

Initially I thought this was simply a error by Anjon, so I contacted them and explained to their technical people what I had found. However, it's been more than a year, and not only has Anjon failed to correct the inaccurate information, as you can see in the link above, but they've actually altered some of their other specifications to make them consistent with their false wattage claims. Very hard to interpret this as anything other than a deliberate attempt to mislead.

My measurements on the Anjon BPP3000 show that with a two foot head and essentially unrestricted flow it draws 350 watts, compared to the claimed 150 watts. Here are Anjon's published wattages for the Big Frog pumps verses what I expect them to actually consume, based on my measurements and the current draw specs (before Anjon changed them) for the other pumps:
Anjon Big Frog Pumps

ModelSpecified WattsReal Watts
BF3000150350 (measured)
BF4200250500 (estimated)
BF5500400670 (estimated)
BF63007501140 (estimated)
The cost of electricity consumed by a water pump over its lifetime usually far exceeds the cost of the pump itself. Even if you ignore the environmental issues, energy efficiency should be a critical consideration when choosing a pump simply based on economics. Although the Anjon Big Frog pumps otherwise seem to be quality well-made products, Anjon is clearly lying about their efficiency. Don't make the same mistake I did and buy an Anjon pump expecting to save energy, because you won't.

Wednesday, December 16, 2009

Simple Constant Power Loads in LTspice

I recently needed to model active and passive power factor correction techniques as part of the design process for a 100 watt offline LED ballast. The LED driver is essentially a constant power load, but, unfortunately, LTspice doesn't include a constant power load element. A quick Google search didn't turn up anything particularly elegant, so I decided to roll my own. Below are two simple constant power loads I came up with. The first is a resistor whose resistance is a function of the voltage across it, and the second is a voltage-dependent current source using a piece-wise linear approximation. Both are bounded to prevent convergence problems. Click for a bigger image.


The resistor-based load is more accurate and works for either polarity. To create it just place a resistor on your schematic, but instead of entering a numeric resistance value you put in a formula, in my example:
R=limit(10,V(v1)**2/100,1000)
Ignoring the limit command for the moment, the resistance is simply V(v1)**2/100, load voltage squared divided by the desired load wattage, in this case 100 watts. The limit command is necessary to constrain the min and max resistance values. The limit function is described, rather tersely but accurately, in the LTspice manual as "limit(x,y,z) - Intermediate value of x, y, and z". The order of the arguments doesn't matter because it really does just take the intermediate value of the three. In my example the limits are 10 and 1000 ohms.

Although the voltage dependent current source based load is not as accurate as the resistor based load, it offers more flexibility. The example I show is a constant power load, but you can use the table concept to define arbitrary load functions. To create it, just place a voltage dependent current source, listed as "g" in LTspice's component menu, on your schematic. Right click on the current source's value, which will be shown as "G", and enter your table. The table consists of pairs of voltages and currents separated by commas. It's a good idea to have your first pair be (0 0) so that the current goes to zero at zero volts. In the constant power case the voltage times the current of all of the other pairs is your desired load power. Here's my 100 watt example:
table = (0 0, 25 4, 50 2, 75 1.333, 100 1, 125 0.8, 150 0.667, 175 0.572, 200 0.5)
Notice that after the first pair each subsequent pair multiplies to 100. You should choose voltages to cover your entire anticipated operating range, and have enough pairs so that the interpolation error is acceptable. My operating range is roughly 50 to 175 volts, so my table covers 25 to 200 volts to provide a little margin. With eight pairs (not counting the first) the error over the operating range is a few percent.

To get accurate simulations with nonlinear elements, like these loads, you must keep your time steps small. I found that the default LTspice .tran settings resulted in obvious artifacts, and that to get reasonably clean results with a 60Hz voltage source I needed to set to set the .tran maximum timestep to around 10uS.

Below are plots showing the behavior of both loads when driven by a 120VAC 60Hz sine wave. Click for a bigger image. The resistor load, on top, works for both polarities. The voltage controlled current source load, at the bottom, only works for positive voltages. The table interpolation errors are visible as ripple in the power level, particularly at lower voltages.



If you'd like more information about constant power loads, this thread on the LTspice Yahoo group is a good place to start.

Thursday, July 2, 2009

Mauna Kea - IRTF - Hawaii Pictures

One of the things I've done as an electrical engineering consultant is to design and build drive and data acquisition systems for many of the infrared cameras and spectrometers used by astronomers around the world. So every now and then I get invited to go on an observing run with one of the groups using my equipment. Right now I'm on Mauna Kea with a team of astronomers from NASA Goddard who are using NASA's Infrared Telescope Facility (IRTF) to study carbon chemistry on Jupiter.

Mauna Kea is on the island of Hawaii, usually just called the Big Island. The top of Mauna Kea, at 13,800 feet, is anything but tropical. It snows here during the winter, and nighttime temperatures even in the summer are around freezing. We've been watching the last little snow patch at the summit melt over the past few days, but it's lasted into July!


After I landed in Hilo we had to kill a couple of hours waiting for another team member to arrive, so we went down to Hilo Bay. It was packed with locals watching traditional Hawaiian canoe races. There were lots of fiberglass canoes on shore, but it looked like they only used hand-made wooden canoes for racing. Beautiful boats! The picture below shows one of the racing canoes being loaded on a trailer.




You can see several of the Mauna Kea telescopes peaking above the clouds in this picture which I took from Hilo Bay. The distance to Mauna Kea's summit is about 25 miles horizontally and three miles vertically. Click on any of these pictures to see full size versions.



This is Hale Pohaku (Stone House), the dorms and support buildings for the Mauna Kea observatories, as seen from the top of a nearby pu'u (hill or cinder cone) which I climbed. This cone may be Pu'ukalepeamoa, but I'm not sure. I stayed in dorm B, which is the smaller building just to the right and above the main building. The dorm rooms are spartan, but they have private baths, and you don't spend much time in them anyway. Hale Pohaku is at 9300 feet, which is a fairly comfortable altitude, although you certainly notice it if you climb a steep pu'u. The main building has offices, a cafeteria, rec rooms, and the laundry. The road up to Hale Pohaku is paved, but most of the road to the summit isn't.


This is the pu'u that I climbed to take the picture of Hale Pohaku. It's a few hundred feet tall. I took this picture shortly after sunrise, and it really is that red. There are around a hundred pu'us on Mauna Kea, and this one is fairly typical of those at higher altitudes where there isn't a lot of plant cover.


This is the view looking southeast from the top of the pu'u. The road to Hale Pohaku is on the left, and the eastern slope of Mauna Loa is visible above the clouds on the right. Eight or nine other pu'us are visible, and each was an active volcanic cone at some time.

Wednesday, January 23, 2008

Passive Tone Control for Vacuum Tube Amps

This is a passive tone control circuit that I developed as part of a single-ended class A triode amp project I'm working on. I wanted bass and treble controls, but I didn't want to use a standard Baxandell circuit because doing so would violate the minimal-feedback philosophy of this project.

There are lots of designs for passive tone stacks on the web, but they typically have 20dB or more attenuation when flat, and I wanted a circuit with less than ten dB. I was willing to trade reduced boost and cut ranges for less attenuation, and the circuit below is the result. It features a loss of about eight dB, flatness better than +0.5dB from 20Hz to 20kHz with the controls centered, max boost of slightly less than five dB, max cut of about seven dB, and a very smooth and well behaved set of curves compared to most passive tone control designs.

(Click the image for a larger version)

This circuit requires linear taper pots, not logarithmic. Use high quality 1% tolerance components if possible. The source (driving) impedance should be 1k or less, and the load (shown as R5 in the schematic) should be 1M or higher. You can get away with a somewhat higher source or lower load impedance, but it will affect performance so try to stick close to my recommendations.

I designed this circuit by hand and then refined it using a great little free program called Tone Stack Calculator. Highly recommended, and although it doesn't claim to work under Windows XP I didn't have any problems. To make it easier to plug my design back into Tone Stack Calculator I kept the same part numbering convention. R4 is missing because it wasn't necessary (set it to 1 ohm to model the circuit), and RA and RB are added to control the response curves at max treble boost and cut. They're easily simulated in Tone Stack Calculator by setting R6 to 115k (100k + RA + RB), and only going from 7% to 93% on the treble control.

For a good review of tone controls check out this site, and for a nice technical discussion of passive tone stacks go here.

This Blog...

This blog is the repository for all my random thoughts and ideas that don't really fit on my other blogs or forums. Personal, hobbies, whatever. Enjoy!