Forums

Log sweeping a current with SPICE.

Started by Winfield Hill February 27, 2019
I haven't found a SPICE that allows for Log sweeping.  To make 
wide-range BJT beta-vs-IC and Gummel plots, I did the following:

1.  DC sweep with equal voltage steps, e.g. 0 to 20 volts, 0.2-volt steps.
2.  Linear EXP function subcircuit.
3.  Voltage-controlled current source, with severe attenuation, 1E-10
    * At this point we have a super-wide-range log sweep of base current.
4.  Small series resistor to BJT base, with current and voltage probes. 
5.  BJT emitter to GND.
6.  Series resistor from BJT collector to +5V supply, with current probe.

7.  Run, gather a set of base and collector currents, add to spreadsheet.
8.  Data probably covers over 10 decades.  Take ratio Ic/Ib = beta.
9.  Gummel plot: Ic and Ib traces vs Vbe.
10. Beta plot: beta vs collector current, Ic from 1uA to 10A.

Make changes to BJT SPICE model parameters, etc., goto step 7.


-- 
 Thanks,
    - Win
Winfield Hill <hill@rowland.harvard.edu> wrote:

> I haven't found a SPICE that allows for Log sweeping. To make > wide-range BJT beta-vs-IC and Gummel plots, I did the following:
> 1. DC sweep with equal voltage steps, e.g. 0 to 20 volts, 0.2-volt > steps. 2. Linear EXP function subcircuit. > 3. Voltage-controlled current source, with severe attenuation, 1E-10 > * At this point we have a super-wide-range log sweep of base > current. > 4. Small series resistor to BJT base, with current and voltage probes. > 5. BJT emitter to GND. > 6. Series resistor from BJT collector to +5V supply, with current > probe.
> 7. Run, gather a set of base and collector currents, add to > spreadsheet. 8. Data probably covers over 10 decades. Take ratio Ic/Ib > = beta. 9. Gummel plot: Ic and Ib traces vs Vbe. > 10. Beta plot: beta vs collector current, Ic from 1uA to 10A.
> Make changes to BJT SPICE model parameters, etc., goto step 7.
It would be more interesting to measure the relationship on several samples. I'm sure it would change with different samples and different temperatures. For this reason, circuits that depend on beta are frowned on. Although I applaud your interest in SPICE, I'm not sure a model would hold over such a wide range. I use LTspice to investigate new ideas, then prove them on the bench. Some effects are difficult to model, such as parasitic oscillations, noise, jitter, flicker, and so on. Some circuits are more susceptible to unwanted side effects than others. A good circuit should suppress these side effects.
Steve Wilson wrote...
> >It would be more interesting to measure the relationship on several >samples. I'm sure it would change with different samples and different >temperatures. > >For this reason, circuits that depend on beta are frowned on. > >Although I applaud your interest in SPICE, I'm not sure a model would hold >over such a wide range. I use LTspice to investigate new ideas, then prove >them on the bench. Some effects are difficult to model, such as parasitic >oscillations, noise, jitter, flicker, and so on. Some circuits are more >susceptible to unwanted side effects than others. A good circuit should >suppress these side effects.
I agree, for the most part. I am not a big SPICE fan, but I often use it to explore, when analytical analysis is impractical. In that case I insist that my SPICE models match my device's bench measurements. If I use a two-channel SMU, I quickly get measurements over a wide current range. The trick is to get SPICE to let me quickly analyze this. -- Thanks, - Win
Winfield Hill <hill@rowland.harvard.edu> wrote:

> Steve Wilson wrote...
>>It would be more interesting to measure the relationship on several >>samples. I'm sure it would change with different samples and different >>temperatures.
>>For this reason, circuits that depend on beta are frowned on.
>>Although I applaud your interest in SPICE, I'm not sure a model would hold >>over such a wide range. I use LTspice to investigate new ideas, then prove >>them on the bench. Some effects are difficult to model, such as parasitic >>oscillations, noise, jitter, flicker, and so on. Some circuits are more >>susceptible to unwanted side effects than others. A good circuit should >>suppress these side effects.
> I agree, for the most part.
> I am not a big SPICE fan, but I often use it to explore, when > analytical analysis is impractical. In that case I insist that > my SPICE models match my device's bench measurements. If I use > a two-channel SMU, I quickly get measurements over a wide current > range. The trick is to get SPICE to let me quickly analyze this.
What is a two-channel SMU and what does it do? Can you show us the .ASC file?
> haven't found a SPICE that allows for Log sweeping. &nbsp;To make >wide-range BJT beta-vs-IC and Gummel plots
.step dec param doesn't do it? Cheers Phil Hobbs
On 27 Feb 2019 14:46:17 -0800, Winfield Hill
<hill@rowland.harvard.edu> wrote:

>I haven't found a SPICE that allows for Log sweeping. To make >wide-range BJT beta-vs-IC and Gummel plots, I did the following: > >1. DC sweep with equal voltage steps, e.g. 0 to 20 volts, 0.2-volt steps. >2. Linear EXP function subcircuit. >3. Voltage-controlled current source, with severe attenuation, 1E-10 > * At this point we have a super-wide-range log sweep of base current. >4. Small series resistor to BJT base, with current and voltage probes. >5. BJT emitter to GND. >6. Series resistor from BJT collector to +5V supply, with current probe. > >7. Run, gather a set of base and collector currents, add to spreadsheet. >8. Data probably covers over 10 decades. Take ratio Ic/Ib = beta. >9. Gummel plot: Ic and Ib traces vs Vbe. >10. Beta plot: beta vs collector current, Ic from 1uA to 10A. > >Make changes to BJT SPICE model parameters, etc., goto step 7.
I like to do 1-second (or whatever) transient sweeps. Use the TIME variable in an equation (or even charge a cap from a current source) to make a linear sweep into a BV or BI source. Make everything a function of time, and keep all the math and the graphing in LT Spice. BV blocks can also compute results, like power dissipation or the log of something, and convert that to a plottable voltage. Well, I don't like spreadsheets. -- John Larkin Highland Technology, Inc picosecond timing precision measurement jlarkin att highlandtechnology dott com http://www.highlandtechnology.com
On Wed, 27 Feb 2019 23:26:45 GMT, Steve Wilson <no@spam.com> wrote:

>Winfield Hill <hill@rowland.harvard.edu> wrote: > >> Steve Wilson wrote... > >>>It would be more interesting to measure the relationship on several >>>samples. I'm sure it would change with different samples and different >>>temperatures. > >>>For this reason, circuits that depend on beta are frowned on. > >>>Although I applaud your interest in SPICE, I'm not sure a model would hold >>>over such a wide range. I use LTspice to investigate new ideas, then prove >>>them on the bench. Some effects are difficult to model, such as parasitic >>>oscillations, noise, jitter, flicker, and so on. Some circuits are more >>>susceptible to unwanted side effects than others. A good circuit should >>>suppress these side effects. > >> I agree, for the most part. > >> I am not a big SPICE fan, but I often use it to explore, when >> analytical analysis is impractical. In that case I insist that >> my SPICE models match my device's bench measurements. If I use >> a two-channel SMU, I quickly get measurements over a wide current >> range. The trick is to get SPICE to let me quickly analyze this. > >What is a two-channel SMU and what does it do? Can you show us the .ASC file? >
Source Measurement Unit. A benchtop instrument. They tend to be expensive. Somebody should do a cheap one. Don't buy the Keithley. -- John Larkin Highland Technology, Inc picosecond timing precision measurement jlarkin att highlandtechnology dott com http://www.highlandtechnology.com
John Larkin wrote...
> >> What is a two-channel SMU and what does it do? Can you show us the .ASC file? > > Source Measurement Unit. A benchtop instrument. > They tend to be expensive. Somebody should do a cheap one. > Don't buy the Keithley.
I own four different types of Keithley models. Paul bought an Agilent model. I greatly prefer mine. -- Thanks, - Win
pcdhobbs@gmail.com wrote...
> >> haven't found a SPICE that allows for Log sweeping. >> To make wide-range BJT beta-vs-IC and Gummel plots > > .step dec param doesn't do it?
I know we can do log frequency stepping, but can we do log voltage or current stepping? -- Thanks, - Win
On Wednesday, February 27, 2019 at 5:46:32 PM UTC-5, Winfield Hill wrote:
> I haven't found a SPICE that allows for Log sweeping. To make > wide-range BJT beta-vs-IC and Gummel plots, I did the following: > > 1. DC sweep with equal voltage steps, e.g. 0 to 20 volts, 0.2-volt steps. > 2. Linear EXP function subcircuit. > 3. Voltage-controlled current source, with severe attenuation, 1E-10 > * At this point we have a super-wide-range log sweep of base current. > 4. Small series resistor to BJT base, with current and voltage probes. > 5. BJT emitter to GND. > 6. Series resistor from BJT collector to +5V supply, with current probe. > > 7. Run, gather a set of base and collector currents, add to spreadsheet. > 8. Data probably covers over 10 decades. Take ratio Ic/Ib = beta. > 9. Gummel plot: Ic and Ib traces vs Vbe. > 10. Beta plot: beta vs collector current, Ic from 1uA to 10A. > > Make changes to BJT SPICE model parameters, etc., goto step 7. > > > -- > Thanks, > - Win
Not sure I understand your question. In the SIMULATE tab, you have EDIT SIMULATION COMMAND, and from there you you select, DC SWEEP within which you select DC SOURCE, TYPE OF SWEEP, giving you a choice of LINEAR, OCTAVE, DECADE and LIST, with START, STOP and INCREMENT. Then just PROBE the variables in your circuit you will need to perform your beta calculations or whatevers. Then you do that crazy quasi C-commands (not fully documented) on your data set for graphing.