¿ªÔÆÌåÓý

Date

Re: Noise source in Transient analysis #NOISE

 

There were reports at one time that 2 or more rand() functions were random but very well correlated with each other. Has this been corrected?


Re: BJT Parameters

 

Hi Tony,?

Thanks for the feedback.?

I am afraid you missed my point. First, I never said I would use s parameters to emulate a non linear aspect of the model. However, the point of the validation exercise is to satisfy the criteria that the s parameters of the non linear model... Spice model... operating in a linear manner meet the s parameters of the measured device. Many of them do... spot on. And other models fail miserably.?

Second point, the use of s parameters actually can produce a very excellent STARTING point for successful non linear design. I have applied such techniques to both power amplifiers and one and two port oscillators.?

Again, I emphasize they provide an excellent initialized starting condition. That is to say, ?find embedding networks, matching elements and resonator development in oscillator applications.?

Alan?


Re: MOSFET subcircuit drain and gate currents used in dependent source equation - faults #MOSFET

 

Thank you, Vlad

I have switched to the 0V voltage source, and all is working as expected, no matter the source of the model for the ?FET I choose. ? I appreciate the information on when model items are parsed. ?I will file that away for future circuits where I am interested in subcircuit items. ?


Kind regards!


Re: BJT Parameters

 

OTOH, we can't talk about Ft without treating it as a linear(ized) amplifying device.

Andy


Re: BJT Parameters

 

On 22/02/2021 20:47, alan victor wrote:
The approach I have taken is to gather the 2 port s parameters for a box full of say 3904. Then use the s data with a waveform arithmetic statement in LTSpice to get ft. As ft is an extrapolation of the low frequency gain on a 6dB per octave slope, it is pretty fast to evaluate. Recall, it is just a function of gm and Cbe; unity short circuit current gain crossing point. It does assist in validating the quality of some BIP models. I usually take the s data at the collector current where advertised ft peaks.
I'd be interested to know whose S-parameter data you've got for 2N3904?

Overall, your suggestion isn't worth much because S-parameters only model linear devices. The whole point about SPICE models is that they model the non-linear characteristics of devices. As a by-product they can also re-produce the S-parameters if the SPICE model is good. The converse is simply wishful thinking.

--
Regards,
Tony


Re: MOSFET subcircuit drain and gate currents used in dependent source equation - faults #MOSFET

 

B1 out 0 V=I(R:U1:1)
You need to use the numeric order of the pin, i.e. if the subcircuit
was defined as:

.subckt xxx a b c

then using i(r:u1:a) will fail.

--
Vlad
______________________
ltspicegoodies.ltwiki.org v2:
quite universal analog/digital filter,
power electronics, signal processing,
easy to work with math functions,
digital models, and rants.


Re: MOSFET subcircuit drain and gate currents used in dependent source equation - faults #MOSFET

 

Hello

BB, thanks for the tip on capturing and viewing subcircuit parameters!

When I add those 0V sources, I¡¯ll do a side by side comparison with a
version that uses the model currents. Appreciate the heads up!
Mike, himself, has said that the pin currents are not known before
parsing, and since that implies parsing behavioural sources with their
expressions, too, it's not possible to use the currents into pins as
used by Ix(), but they can be plotted if you know the subcircuit. For
example:

.subckt xxx 1 2 3
r1 1 2 1
r2 2 3 1
.ends xxx
B1 out 0 V=I(R:U1:1)

This is valid and will simulate. If the subcircuit has many nested
subcircuits, it gets funnier and funnier. And if the subcircuit is
encrypted, you're out of luck. So the best way, tested through time,
is the series zero valued voltage source.

--
Vlad
______________________
ltspicegoodies.ltwiki.org v2:
quite universal analog/digital filter,
power electronics, signal processing,
easy to work with math functions,
digital models, and rants.


Re: Text substitution in .meas files #meas

 

Hello Neil

I am using a .meas file to run after the simulation completes. As this has
now grown considerably being able to use text substitution would help
enormously but I can't figure out the syntax.
For example the measurements are taken over a time period,i.e. "FROM 6.3e-3
TO 7.3e-3" so if I want to change this, I have to change every line that
contains it.
It would better if I could set this once as a parameter and then use that
parameter on each line.

I've tried various combinations of param, .param, traditional string
commands but to no avail.
Is it possible to do this and if so, what is the correct syntax please and
is there a cheat sheet anywhere?
If I understand correctly, you want something like this:

.meas t1 param 6.3m
.meas t2 param 7.3m
.meas a avg v(x) from t1 to t2
.meas b rms i(v1) from t1 to t2
.
.
.

Alternatively, you can define t1 and t2 as parameters:

.param t1=6.3m t2=7.3m

but then you'd have to re-run the simulation so that the .PARAMs are
recalculated. With .MEAS they will be available only inside the .MEAS
script.

Looking at the values for t1 and t2 (as you exemplified), maybe you
need these to be calculated for (say) a period of some frequency. Then
you can more easily define them as:

.meas freq param 1k
.meas delay param 0.3/f
.meas t1 param 6/f+delay
.meas t2 param 7/f+delay

If the frequency, itself, is a variable to be determined from
measurements, then you could also use this:

.meas tmp1 find time when v(x)=0 cross=13 ; or some other trigger
.meas tmp2 find time when v(x)=0 cross=15
.meas f param 1/(tmp2-tmp1)
; and now continue with t1, t2, etc

--
Vlad
______________________
ltspicegoodies.ltwiki.org v2:
quite universal analog/digital filter,
power electronics, signal processing,
easy to work with math functions,
digital models, and rants.


Re: MOSFET subcircuit drain and gate currents used in dependent source equation - faults #MOSFET

 

BB, thanks for the tip on capturing and viewing subcircuit parameters! ?

When I add those 0V sources, I¡¯ll do a side by side comparison with a version that uses the model currents. Appreciate the heads up!


Re: BJT Parameters

 

Hi Jim,?

The approach I have taken is to gather the 2 port s parameters for a box full of say 3904. Then use the s data with a waveform arithmetic statement in LTSpice to get ft. As ft is an extrapolation of the low frequency gain on a 6dB per octave slope, it is pretty fast to evaluate. Recall, it is just a function of gm and Cbe; unity short circuit current gain crossing point. It does assist in validating the quality of some BIP models. I usually take the s data at the collector current where advertised ft peaks.?

Alan?


Re: MOSFET subcircuit drain and gate currents used in dependent source equation - faults #MOSFET

 

If you want to view the .subcircuit values in the waveform viewer, you can (even though you cannot seem to use them in the circuit as you wanted) go to Tools-->Control Panel-->Save Defaults and click to add the subcircuit voltages and currents. You can then plot them in the waveform viewer (one BIG caveat is that your .raw file will become quite large...). I had hoped this would allow you to use the values, but it didn't seem to help. The 0 voltage sources works fine, but you will see some VERY small differences between the 0V source voltage and that produced by the Ix(M1:D) in the plotter. It's easiest to see them by plotting the difference (in this case, less than a milliamp) between the two values.

BB


Re: BJT Parameters

 
Edited

Bad 'black market' parts even fall into the mainstream distribution channels.? You need to know your sources very well.

Andy


Re: MOSFET subcircuit drain and gate currents used in dependent source equation - faults #MOSFET

 

This is as good an explanation as I could have hoped for. ?I really appreciate your insight on this... it makes sense. ?Perhaps it¡¯s just a missing feature in LTspice, or perhaps it¡¯s by design somehow.?

I have used 0V supplies in the past for current detection. ?In this case I just went for a quick calculation, and it worked until I tried a subcircuit and found this hitch. ?I guess I learned something in the process, but I think I¡¯ll go back with using the 0V supply as a reliable method. ?Thanks for the nudge. ;-)

I also totally understand the coffee thing, and I can relate. ? Ha! ?


Thanks again!


Re: BJT Parameters

 

¿ªÔÆÌåÓý

You mean like those ¡°grab bags¡± that can be gotten for a pittance at a swap meet? ?Got a bunch of those and now they are mixed in with good stock :=(( Wonder where those that are marked with the Motorola logo might fall. What ever.

Thanks

Jim

On Feb 22, 2021, at 10:32 AM, Andy I <AI.egrps+io@...> wrote:

And then there is the question of where your distributor got THEIR parts.? These days, some are rejects that fall off the datasheet.? Watch out for that.

Andy


Re: BJT Parameters

 

And then there is the question of where your distributor got THEIR parts.? These days, some are rejects that fall off the datasheet.? Watch out for that.

Andy


Re: BJT Parameters

 

I think Helmut's recommendation in this case would be to use the PSpice docs.? Helmut used PSPCREF.pdf which can be downloaded from many places on the net.? Then turn to the chapter on BJTs and read all about it.? There are pages of equations that describe how the Gummel-Poon model behaves.? But I think it does not answer your question directly; you still have to do the work.

The problem is that parameters such as Beta and Ft are best for making lab measurements of transistors, not for modeling them.? SPICE model parameters are for modeling them but not for measuring them.? There is some overlap but not a lot.

? ? "For example, the model COULD represent a minimum gain device or it could represent a ¡°typical¡± device or any of a number of other choices."

In my experience, virtually all models for simple parts like BJTs are "typical".? The only time I've seen anything else, is when they were specified to be "best-case" and "worst-case" or other labels.? Without such a label, I would always assume typical.? But also remain skeptical because every model can be bad right from the start, or a poor selection from the distribution of parts, or an example of typical from 25 years ago before the process shifted.

Andy


Re: Text substitution in .meas files #meas

 

Neil wrote, "I am using a .meas file to run after the simulation completes."

I just want to clarify one thing, which is probably obvious.? You run this .MEAS script from the waveform viewer, right?? (I ask because all .MEAS commands that are in the simulation itself, are executed only after the simulation itself has completed, even though LTspice says that it's still running.)

I'm not familiar with .MEAS scripts from the waveform viewer.? There is a Plot Defs file.? Have you been editing that file to include your parameter definitions?? When you refer to the parameters, are you using {curly braces} around them?? This might not help because my experience there is approximately zero.

Andy


Re: BJT Parameters

 

Sorry, I should have thought the question through, more carefully. Of course, beta and Ft depend on voltage, current, and temperature, I guess that what I¡¯d like to figure out is where, in the parameter distribution the model makers chose to put the model. For example, the model COULD represent a minimum gain device or it could represent a ¡°typical¡± device or any of a number of other choices. Rarely does the text of the model indicate this, so the user is left a bit blind about which of several models to choose for a particular device.

Thanks
Jim

On Feb 22, 2021, at 9:51 AM, Tony Casey <tony@...> wrote:

On 22/02/2021 18:01, Jim Wagner wrote:
I wonder if there is a way to estimate any of the first order bjt parameters, such has dc beta or Ft for a model? Yes, a test bench could be created but I was wondering if one could read the model and do some basic mental arithmetic that would estimate how the model behaves. I am thinking, for example, of the bog-common 2N3904 which has a huge range of beta in real life. Knowing what beta the model maker chose for the model would help in doing the correlation between simulation behavior and bench behavior.
The two parameters (beta and Ft) you've chosen have no fixed value; they both vary with Ic, Vce and temperature as well as sample to sample. If you mean BF and not beta, then that's a different matter. Beta is the real-world value of Ic/Ib, which varies as described above. BF, on the other hand is a model parameter and fixed, but that doesn't necessarily make it equal to beta, as the "simulated" beta is affected by a host of other model parameters, like IKF, NK, IS and NF that modify how "beta" varies under different conditions. BF might equal the peak value of beta for some devices, but it might not for others. There is no one model parameter that defines Ft, although it is affected by TF. However, it is also affected by Ic and Cbe, which are also not model parameters but a physical ones.

But are you asking how model creators decide on what constitutes a typical device sample to base the model on? Or are you saying you want to minimally modify the default BJT to make it have a passing resemblance to a particular real device? It sounds a bit "hand-wavy".

--
Regards,
Tony






Text substitution in .meas files #meas

 

I am using a .meas file to run after the simulation completes. As this has now grown considerably being able to use text substitution would help enormously but I can't figure out the syntax.?
For example the measurements are taken over a time period,i.e. "FROM 6.3e-3 TO 7.3e-3" so if I want to change this, I have to change every line that contains it.
It would better if I could set this once as a parameter and then use that parameter on each line.

I've tried various combinations of param, .param, traditional string commands but to no avail.
Is it possible to do this and if so, what is the correct syntax please and is there a cheat sheet anywhere?

Many thanks

Neil
?


Re: MOSFET subcircuit drain and gate currents used in dependent source equation - faults #MOSFET

 

It's not really that the FET current signals are being 'created' when using a non-subcircuit FET.? All device currents are already there.? Every element has a current through it, or into its pins (if it has more than 2 pins).? The problem is that the subcircuit version doesn't have a Drain pin or a Gate pin where you think they are.? The subcircuit version expands it into a collection of resistors, capacitors, diodes, etc., and that's what actually gets simulated.? If you know exactly which components in the subcircuit go to your "drain pin" and your "gate pin", you could reference those in your formula.? (In this case, that includes RD and RG, but also DSD.? So I think you could use I(M1:RG) as the gate current, and I(M1:RG)-I(M1:DSD) as the drain current.? Not a good idea but it might work.)

I think I have not tried using subcircuit pin currents in formulas before.? Maybe that is missing in LTspice.? (If it's missing in LTspice, it's probably missing in PSpice too, because LTspice was made to be largely compatible with what PSpice does.)? What LTspice probably should have done, is either add the means to refer to subcircuit pin currents in formulas, or document the fact that you can't.? I haven't had a cup of coffee yet so maybe I'm just missing something.

Traditionally, SPICE users had to add 0V voltage sources everywhere they wanted a current to be sensed and referred to elsewhere.? The ability to refer to currents through other components was added later.? If I understand correctly, even that ability is somewhat compromised.? Notice the restriction that device currents should only vary "quasi-statically" and there should be "no instantaneous feedback" through them.? (I think there is a 1 or 1+ timestep delay in those currents.)? That restriction is for things other than 0V voltage sources as your "ammeters".? When in doubt, use a 0V source.

Within LTspice, there is effectively a "wall" between the simulator itself and everything else.? The schematic editor generates a SPICE netlist, and that is the only thing that gets simulated.? If it's not in the netlist, the simulator doesn't see it.? The output of the simulator is the .raw file.? If it's not in the .raw file, it can't be plotted or .MEASured.? The problem here is the fact that the netlist doesn't "know" that your M1 is a MOSFET, even though it knows there was a subcircuit by that name.? To the simulator, it's a dozen separate components which could be anything.

Andy