¿ªÔÆÌåÓý


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.


Re: How can I create a continuously (kind of) varying duty cycle in one simulation

 

¿ªÔÆÌåÓý

I absolutely LOVE the TimerBlox line!

SO many components rolled into one ddevice¡­

?

From: [email protected] <[email protected]> On Behalf Of PK
Sent: Thursday, April 10, 2025 11:41 AM
To: [email protected]
Subject: EXTERNAL: Re: [LTspice] How can I create a continuously (kind of) varying duty cycle in one simulation

?

Answer: Use LTC6992 Voltage Controlled PWM

?

Peter


--
PKa?


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

 

¿ªÔÆÌåÓý

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


Re: How can I create a continuously (kind of) varying duty cycle in one simulation

 

Answer: Use LTC6992 Voltage Controlled PWM

Peter


--
PKa?


Re: 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


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

 

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.


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

 

¿ªÔÆÌåÓý

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.


Overriding a library diode's internal parameter(s)

 

¿ªÔÆÌåÓý

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


Re: Classic Menu vs Keyboard shortcuts

 

See this post on ADI's EZone: https://ez.analog.com/design-tools-and-calculators/ltspice/f/q-a/577705/i-would-like-to-use-the-legacy-pre-ltspice-24-ltspice-gui


Re: NCS2001

 

I get "timestep too small".
?
Is that NOT the error you see?

Andy
?


Re: Lateral PNP In Model of 741 Internal Architecture

 

Hi Andy,
?
Thanks for the suggestion - I'll take a look at that example and the built-in LPNP model.

Your point about the antiquity of the device is well-taken. I'm working on learning some more in-depth analog design and the 741 seemed like a good foundational block given how widely documented it is, and then able to use that to move into more advanced/modern circuits.


NCS2001

 

Trying to get this opamp model to work. I keep getting errors. I know it has to do with the "TABLE" lines, but not sure how to fix. Model was pulled from OnSemi's website.
?
File is posted in the temp section as NCS2001_test.zip


Re: How can I create a continuously (kind of) varying duty cycle in one simulation

 

On Wed, Apr 9, 2025 at 04:47 PM, <kmesne@...> wrote:
I am trying to create a duty cycle that kind of continuously varying like in a 200ms simulation I want a duty cycle start from 0.01 to 0.99 ?(approximately 0.01 Duty increase per 2 ms). How can I do this I am really struggling with it .?
If I were to do this, I would use something like the one suggested by Donald.? I prefer it because I think it is easy to visualize how it gives you the? varying duty cycle, and it might be close to how you would build it in hardware.? But I have two differences from Donald's example:
?
(1)? Donald's example (DutyCycleModulator.zip) needs a Maximum Timestep.? Without it, it works but LTspice uses far too few timepoints to get good signal edges.
.tran 0 200m 0 10u
.options plotwinsize=0? ?; <-- Disables waveform compression
?
(2)? Instead of Donald's voltage-controlled switch S1, I would use a comparator, to compare the voltage ramp with the triangle or sawtooth wave.? LTspice's "diffschmitt" element works well for this, even if you omit the hysteresis of the Schmitt function.
?
I uploaded an example, VaryingDutyCycle.asc, in the Temp folder.
?
Andy
?


Re: Lateral PNP In Model of 741 Internal Architecture

 

Manauo,
?
Have you looked at this schematic, that comes with LTspice?
...\examples\Educational\LM741.asc
I don't know how it compares to your efforts, but it is another one to consider.? I'm guessing that one just copied the "equivalent" schematic from the old 741 datasheet, without much more effort.
?
I do not recall seeing anyone attempt to accurately model the transistors in a 741 before.? I think your question is unique.? Be aware that the 741 is ancient history.? Personally, I might question the validity of anything that talks about its design, even though it may be OK.? ?How well do you trust its source?
?
Did you know that LTspice has both a different PNP symbol and a different PNP model for lateral PNP transistors?? The symbol is "LPNP" and has the base-to-substrate diode and the connection to the P-type substrate (negative supply).? Don't be fooled by the PNP4 symbol which is not for a lateral PNP - but anyway that is just a symbol, not the model.
?
The lateral PNP's model name is also "LPNP" so I think you would write something like this:
.model 741P LPNP (Bf=50 ...
to get that lateral PNP model that comes with SPICE.? I do not often see it used.? (FYI, there is even a lateral NPN model, probably never used, but it is there in case someone were to make ICs from an N substrate.)? If I remember correctly, these LPNP and LNPN models are not unique to LTspice and they come with other SPICE programs too, perhaps even with Berkeley SPICE, but documentation about them is scarce.? I don't know what sets them apart from normal PNP and NPN SPICE models.? I would expect that they work best when they have the fourth pin (to substrate) in each of those LPNP transistors in your circuit.
?
I do not know if changing those models from PNP to LPNP makes much difference.? I did some experiments many years ago but I didn't finish them.
?
Do you suppose that a forward Beta of 50 is reasonable for a lateral PNP?? I would have thought that it is much lower.? But don't take my word on that.? Back in the early days of analog ICs, a Beta of 50 would have been good for a normal NPN and impossible for a lateral PNP.? Again, don't take my word on that.
?
Andy
?


Re: Lateral PNP In Model of 741 Internal Architecture

 

Edit: Schematic is uploaded in files/temp, "741.asc"


Lateral PNP In Model of 741 Internal Architecture

 

Hi,

I'm sure this has been asked before but in searching I couldn't find anything that addressed my issue, so apologies if this is a duplicate.

As an exercise I'm modeling the 741 op-amp internal structure (from this ) but I can't get the lateral PNP to behave as expected (Q13A/B). I get the expected 730uA through the reference current mirror, and the expected ~20uA through the Q20 mirror. But through Q13B I should be sourcing 0.75*Iref and I'm only getting ~12uA; similarly through Q13A i should be sourcing 0.25*Iref and I'm only getting 75pA.

Model statements used for all parts are in the schematic. The only difference between Q13 and the standard PNP used is the saturation current Is changed from 10fA (standard) to 7.5fA (Q13B) and 2.5fA (Q13A). Apparently I'm missing something else about how this stage is supposed to function, seemingly with Q13. Any ideas to get this working?