¿ªÔÆÌåÓý


Re: NCS2001

 

Derek,
?
I think your voltage source V1 is wrong.? Its sine wave amplitude is 1.2 V with a DC offset of 0.6 V, so it swings between -0.6 V and 1.8 V.? That goes low enough to violate the Absolute Maximum Input Common Mode Voltage Range, and Note 1 below the table.? You would be damaging the part.
?
Andy
?


Re: NCS2001

 

On Thu, Apr 10, 2025 at 04:41 PM, Andy I wrote:
But the catch is that this is obscure SPICE syntax,
Thanks Andy. I will attempt to correct the model when I get back to this next week. I was not sure how to handle the TABLE statement. I do have the latest LTSpice loaded.?
?
As for the age of the model, I have no idea what OnSemi is basing this off of.


Re: NCS2001

 

On Thu, Apr 10, 2025 at 02:54 PM, John Woodgate wrote:
There is a wire form C3 that goes nowhere and one labelled fb that also goes
I extracted the main simulation I was working on. The .asc is the portion that should work. It is just that I was getting errors about the model.


Re: NCS2001

 

Derek,
?
If I am right about the formatting of the G-source TABLE() functions, you can modify them like the following:
?
First TABLE function (1 of 12):
? ? old line:? GD16 16 1 TABLE {V(16,1)} ((-100,-100E-15)(0,0)(1m,1u)(2m,1m))?
? ? new line:? GD16 16 1 16 1 TABLE((-100,-100E-15)(0,0)(1m,1u)(2m,1m))?
?
Note what I've done is:
  • Move the keyword "TABLE" to the right, past the V-source that previously came after it.
  • Change "V(x,y)" to "x y".
  • Leave the rest of the line intact.
From my read, this would make the syntax "correct" according to the LTspice Help page for G-sources.? You would need to repeat this 12 times, once for each of the 12 TABLE() functions in that model.
?
But the catch is that this is obscure SPICE syntax, and there is no guarantee that either older versions or newer versions of LTspice handle it correctly.? When Analog Devices re-coded LTspice 24, they may or may not have carried forward the right processing of these TABLE() functions.
?
This model also has an E-source with {curly braces} that maybe should not be there.? But that is yet another matter.
?
Andy
?


Re: NCS2001

 

On Thu, Apr 10, 2025 at 05:17 PM, DerekK wrote:
I downloaded a model from OnSemi and am having issues with it simulating. Something about the TABLE lines. I am not a Spice expert, but would like some guidance to get the model working.
I still get the "timestep too small" error.? ?But I'm using the computer with the older LTspice version today.
?
See the FAQ file for help with "timestep too small" errors - if that is what you see.? If not, read on.
?
Which version of LTspice did you try?? I suspect the problem you have may be version-specific.? What specific error messages do you get?? Not "something about the TABLE lines", but what exact errors did you see?
?
The NCS2001.LIB model file looks to be poorly formed, and that might be the source of problems.? I see about a dozen TABLEs that look something like this:
GD16 16 1 TABLE {V(16,1)} ((-100,-100E-15)(0,0)(1m,1u)(2m,1m))?
which looks wrong for multiple reasons.? For one, I think there should not be all those {curly braces} like this pair around V(16,1).? I think you can delete the curly braces.? Technically there "should" be parentheses around everything after "TABLE", but sometimes parentheses are optional in SPICE and that might be the case here.? However, this format looks wrong for a G-source TABLE() function where all the values should be in pairs, but it might be right for a B-source TABLE() where the first parameter is an index into the remaining pairs of values.? This could be an issue.? I think older versions of LTspice upgrade the G-source to a B-source where this kind of TABLE() function would be OK, but that might not happen anymore since LTspice's netlisting changed.? If so, this could be a new (unreported) bug.
?
I think the things John mentioned are non-issues.? Wires to nowhere do not matter even if they look funny.? The same with comment text, assuming that you meant it to be a comment.
?
Andy
?


Re: NCS2001

 

¿ªÔÆÌåÓý

There appears to be something missing from your upload. Download the .ZIP to Downloads and open it from there. There is a wire form C3 that goes nowhere and one labelled fb that also goes nowhere. Also, there is a PULSE spec with no generator associated and no Table lines on the .ASC or in the .NET file.

On 2025-04-10 22:17, DerekK wrote:
I downloaded a model from OnSemi and am having issues with it simulating. Something about the TABLE lines. I am not a Spice expert, but would like some guidance to get the model working.
?
I uploaded NCS2001_test.zip? as the example.?
?
--
Best wishes John Woodgate RAYLEIGH Essex OOO-Own Opinions Only If something is true: * as far as we know - it's science *for certain - it's mathematics *unquestionably - it's religion

Virus-free.


NCS2001

 

I downloaded a model from OnSemi and am having issues with it simulating. Something about the TABLE lines. I am not a Spice expert, but would like some guidance to get the model working.
?
I uploaded NCS2001_test.zip? as the example.?
?


Re: Overriding a library diode's internal parameter(s)

 

Indeed -?almost everything in LTspice is case-insensitive, just like all SPICE programs.
?
LTspice does recognize upper/lowercase in a very limited situation in the waveform viewer, where "mHz" and "MHz" do not mean the same thing.? That is ONLY in the waveform viewer part of LTspice.
?
Andy


Re: Overriding a library diode's internal parameter(s)

 

¿ªÔÆÌåÓý

More specifically, being SPICE, it doesn't matter: SPICE is case-insensitive, regardless of what the OS does.

On 2025-04-10 21:44, Richard Andrews via groups.io wrote:
Does it matter if it's "rs", "RS", or "Rs"? It being windows probably not?
--
Best wishes John Woodgate RAYLEIGH Essex OOO-Own Opinions Only If something is true: * as far as we know - it's science *for certain - it's mathematics *unquestionably - it's religion

Virus-free.


Re: Overriding a library diode's internal parameter(s)

 

Does it matter if it's "rs", "RS", or "Rs"? It being windows probably not?


Re: Overriding a library diode's internal parameter(s)

 

¿ªÔÆÌåÓý

Actually, I meant: LTspice XVII doesn't recognize rs as a parameter of a diode model, which cannot be true.

But what really matters is why the error occurs and how can it be fixed.

On 2025-04-10 21:18, Andy I via groups.io wrote:
On Thu, Apr 10, 2025 at 03:13 PM, John Woodgate wrote:

Ah, that would means that LTspice XVII doesn't recognize rs as a parameter of a diode, which cannot be true.

No, that is actually correct.? Here is what a Diode element line should look like, according to LTspice's Help:

Syntax: Dnnn anode cathode <model> [area] [off] [m=<val>] [n=<val>] [temp=<value>]

Notice there is no parameter named Rs.? The only listed parameters are Area, "off", M, N, and Temp.
?
But you are mistaking it for the .MODEL parameter Rs.? .MODEL parameters go only in .MODEL statements, not in the element line.? The entire list of diode model parameters belong only in the .MODEL statement.
?
Andy
?
--
Best wishes John Woodgate RAYLEIGH Essex OOO-Own Opinions Only If something is true: * as far as we know - it's science *for certain - it's mathematics *unquestionably - it's religion

Virus-free.


Re: Overriding a library diode's internal parameter(s)

 

On Thu, Apr 10, 2025 at 03:13 PM, John Woodgate wrote:

Ah, that would means that LTspice XVII doesn't recognize rs as a parameter of a diode, which cannot be true.

No, that is actually correct.? Here is what a Diode element line should look like, according to LTspice's Help:

Syntax: Dnnn anode cathode <model> [area] [off] [m=<val>] [n=<val>] [temp=<value>]

Notice there is no parameter named Rs.? The only listed parameters are Area, "off", M, N, and Temp.
?
But you are mistaking it for the .MODEL parameter Rs.? .MODEL parameters go only in .MODEL statements, not in the element line.? The entire list of diode model parameters belong only in the .MODEL statement.
?
Andy
?


Re: Overriding a library diode's internal parameter(s)

 

On Thu, Apr 10, 2025 at 02:59 PM, Richard Andrews wrote:
Well defining it twice is no good.
Actually, defining something twice (or more) is usually OK in most SPICE programs.? I think it was designed to work that way.
?
In LTspice, sometimes you get a warning message, sometimes not.? And in newer versions, sometimes now it aborts, which could be considered either good or bad.
?
Andy
?


Re: Overriding a library diode's internal parameter(s)

 

On Thu, Apr 10, 2025 at 01:59 PM, Bell, Dave wrote:

The diode¡¯s parameter string includes ¡°rs=0.0384¡±, and I want to vary that to adjust the curve to the panel I want to simulate.

FYI, another way you can do that, which might work reasonably well, is this:
  1. Edit the .MODEL command to make its Rs=0.
  2. Add a discrete resistor in series with the diode, with resistance = Rs.
There might be some advantage to doing it this way, e.g., if the value of Rs needs to vary.? If it is inside the .MODEL definition, it can't.? If it is an external resistor, it could.
?
Andy
?


Re: Overriding a library diode's internal parameter(s)

 

On Thu, Apr 10, 2025 at 01:59 PM, Bell, Dave wrote:

I imagine I could use a default ¡°D¡± diode and modify all of the params, but I don¡¯t see any way to copy the LONG string listed in ¡°Pick new diode¡±.

When you use "Pick New Diode", you select from the diodes in your standard.dio (and/or user.dio).? Therefore, open standard.dio in Notepad/Wordpad or your editor of choice, or in LTspice itself.? Find the line, highlight it, and Ctrl-C (copy).? Be careful not to save the file standard.dio when you're done.
?

The diode¡¯s parameter string includes ¡°rs=0.0384¡±, and I want to vary that to adjust the curve to the panel I want to simulate.

The model adds a multiplier to the diode, ¡°N=15¡±, which I successfully changed to ¡°N={Ns}¡± so I could vary the number of cells.

I tried adding an override of rs by ¡°N={N} Rs={Rser}¡±, but the second term throws an ¡°unrecognized¡± fault.

Right-clicking the diode symbol doesn¡¯t offer any route to setting any terms.

Be careful here.? You are mixing up your parameters.
?
Rs is a .MODEL parameter.? It can be changed only by editing the .MODEL statement.? You can use AKO: or you can replicate the entire .MODEL statement, but it must be done only with the .MODEL statement.? Like all .MODEL parameters, the Rs parameter never comes up in an Attribute of a symbol.? You can't do it that way.
?
N, as you've used it here (as N sets of series-connected diodes) is an element parameter.? It can be changed only in the element line, the one that begins with a "D".? That can be done on an Attribute line of a symbol, because the symbol with its attributes create the D diode element statement.??Do not attempt to modify the N that is a .MODEL parameter because it is not the same thing; and anyway that would not be the right place to change element parameters.
?
Clearly, these two parameters must not be modified the same way as each other.? .MODEL parameters, and element parameters.? Two completely independent things.
?
Andy
?


Re: Overriding a library diode's internal parameter(s)

 

¿ªÔÆÌåÓý

I have to think on that, Andy!

?

Please see the file AD_PV_Sim 250410.zip I just uploaded.

?

Dave

?

From: [email protected] <[email protected]> On Behalf Of Andy I via groups.io
Sent: Thursday, April 10, 2025 12:10 PM
To: [email protected]
Subject: EXTERNAL: Re: [LTspice] Overriding a library diode's internal parameter(s)

?

In case it matters, ...

?

Be careful with diode parameter 'N'.

?

'N' in the .model statement means Emission Coefficient.

?

'N' in the diode element line is the diode multiplier.

?

This is a SPICE thing that the UCal/Berkeley guys got wrong.

?

Now back to your regularly scheduled program.

?

Andy


Re: Overriding a library diode's internal parameter(s)

 

¿ªÔÆÌåÓý

Ah, that would means that LTspice XVII doesn't recognize rs as a parameter of a diode, which cannot be true. Can you try another diode, just to see if you get the same error? You could also upload your.ASC and associated files in a .ZIP.

On 2025-04-10 19:44, Bell, Dave via groups.io wrote:

OK, correcting my confusings¡­

?

N={Ns} was a typo; I have N={N}, and that ¨C by itself ¨C works correctly.

It¡¯s the second parameter, rs={Rs} that causes a fault:

Error on line 3 : d1 vpv 0 mur460 n= 14.9? rs= 0.0384

?????????????? ?Unknown parameter "rs"

0.0384 is the default value (from the Pick New displayed string), so the value can¡¯t be a problem.

LTspice (XVII) just rejects the ¡°rs¡±

?

From: [email protected] <[email protected]> On Behalf Of John Woodgate
Sent: Thursday, April 10, 2025 11:20 AM
To: [email protected]
Subject: EXTERNAL: Re: [LTspice] Overriding a library diode's internal parameter(s)

?

Hello, Richard. I'm not running the sim, that is Dave Bell. I think N={N} is wrong because there is already N={Ns}; it can't be defined twice.

On 2025-04-10 19:15, Richard Andrews via groups.io wrote:

Hello John,

?

Not that it matters, but N={N} Rs={Rser} looks right to me. What version of LTspice are you running? What exactly does the log file say?

?

?

On Thursday, April 10, 2025 at 02:09:24 PM EDT, John Woodgate <jmw@...> wrote:

?

?

I don't understand this line:

I tried adding an override of rs by ¡°N={N} Rs={Rser}¡±,

What is N={N} for? I don't think you need it: Rs is in every instance of the diode already. Do you have a line Rser= [a number], or perhaps a .STEPped sequence?

On 2025-04-10 18:59, Bell, Dave via groups.io wrote:

I was working with the recently linked AD PV Cell sim.

?

It uses a MUR460 library diode, multiple in series, to simulate the cell/string¡¯s forward voltage.

The default series resistance seems too high, per plotted I/V curve.

?

The diode¡¯s parameter string includes ¡°rs=0.0384¡±, and I want to vary that to adjust the curve to the panel I want to simulate.

The model adds a multiplier to the diode, ¡°N=15¡±, which I successfully changed to ¡°N={Ns}¡± so I could vary the number of cells.

I tried adding an override of rs by ¡°N={N} Rs={Rser}¡±, but the second term throws an ¡°unrecognized¡± fault.

Right-clicking the diode symbol doesn¡¯t offer any route to setting any terms.

?

I imagine I could use a default ¡°D¡± diode and modify all of the params, but I don¡¯t see any way to copy the LONG string listed in ¡°Pick new diode¡±.

?

Is there a better (i.e. working) way to override the internal params?

?

Thanks,

Dave

--
Best wishes John Woodgate RAYLEIGH Essex OOO-Own Opinions Only If something is true: * as far as we know - it's science *for certain - it's mathematics *unquestionably - it's religion

?

Virus-free.

--
Best wishes John Woodgate RAYLEIGH Essex OOO-Own Opinions Only If something is true: * as far as we know - it's science *for certain - it's mathematics *unquestionably - it's religion

--
Best wishes John Woodgate RAYLEIGH Essex OOO-Own Opinions Only If something is true: * as far as we know - it's science *for certain - it's mathematics *unquestionably - it's religion


Re: Overriding a library diode's internal parameter(s)

 

In case it matters, ...
?
Be careful with diode parameter 'N'.
?
'N' in the .model statement means Emission Coefficient.
?
'N' in the diode element line is the diode multiplier.
?
This is a SPICE thing that the UCal/Berkeley guys got wrong.
?
Now back to your regularly scheduled program.
?
Andy


Re: How to simulate the gate charge characteristic given in the datasheet of a mosfet?

 

On Wed, Apr 9, 2025 at 02:50 PM, <ankitk.ace@...> wrote:
Amidst all the discussion I overlooked some of the key concepts that are essential to these simulations and I can certainly use a second opinion from you.
Ankit,
?
I will try to address your questions.?
?
3) All measurements made by the .meas statements are done after the simulation has ended. They are done by a post processing step and have access to all signals throughout the simulation.
?
4) The simulation results will be good if the models are good. Actual hardware measurements always have variations due to component tolerances. Unless you repeat your hardware measurements with multiple devices from different production batches you will be measuring only a single part whose parameters could be anywhere within the tolerances shown on the parts datasheets.?
?
1 and 2) The double pulse test is a way to measure the turn on and turn off characteristics of a device with a known on-state load current and known off-state withstand voltage. In a double pulse test the inductor current is ramped up during the first pulse to a known value by controlling the first pulse width. The device under test is then turned off and the on to off behavior of the device can be measured at that current. During the off time the inductor current remains nearly constant because there is only the low voltage across the forward biased upper device body diode across the inductor to reduce the current. Then the device under test is turned on again during the second pulse and the off to on behavior of the device can be measured during this transition. During these tests the inductor is basically performing the function of the constant current limiter in my circuits. Because the device under test is used to set the inductor current, the turn off transition is measured first at the end of the first pulse. Then the turn on transition is measured second when the device under test is turned back on at the beginning of the second pulse. Using an identical device for the upper device in the double pulse test circuit allows you to measure the characteristics of the body diode of those devices. That body diode turns on at the transition at the end of the first pulse, and it turns off at the transition at the beginning of the second pulse.?

Both methods can be used in simulation, but the classic double pulse test circuit is more applicable to real hardware measurements because it does not need ideal diodes or current sources. A charged inductor is a very good approximation of an ideal current source, which is why it is used for the double pulse test. The known drain voltage is applied to the inductor for a fixed time (the width of the first pulse) to charge the inductor up to a known current level. For the remained of the test that current remains nearly constant at that value.
?
HTH


Re: Overriding a library diode's internal parameter(s)

 

Well defining it twice is no good.