开云体育

Date

Re: LTspice vs ngspice 12AU7 tube amplifier transient analysis

 

On Tue, Mar 4, 2025 at 05:06 PM, Andy I wrote:
It looks like you used LTspice's schematic and transistor models (standard.???) in both simulations.? That MIGHT be a problem.? LTspice's discrete MOS models in standard.mos all use LTspice's proprietary "VDMOS" (Vertical Double-Diffused power MOSfet) model, which is a little different than SPICE's ordinary MOS models.? I don't know what ngspice does with the VDMOS model definition.
?
There is a chance that ngspice handles the IRF510 model incorrectly.
?
Thanks Andy, that's the point indeed ! I downloaded the following IRF510 model from
?
.MODEL IRF510 NMOS LEVEL=3 VTO=3.699 KP=20.82U RD=21.08M 
+      RS=450.8M IS=202.7F CBD=366.6P 
+      CGSO=604.9P CGDO=62.62P
?
LTspice and ngspice return exactly the same answer for ITS. However it isn't good enough since the amplifier's output signal isn't there (only some nV oscillating around 0V).
?
I let the simulation continue for 20 seconds (.tran 0 20 19) with no luck (with or without UIC to skip the ITS step). The output signal V(out1) isn't good at all both for LTspice and ngspice.
?
Btw, as far as I understood, transient simulation doesn't use the same "small signal linear equivalent circuit" for non-linear devices (i.e. diodes, bjt, mos etc..). Instead at each timestep it leverages on the solver (possibly iterating to solve non-linear equations) to work out circuit's voltages and currents.
?
Carlo.
?
?
?
?


Re: LTspice vs ngspice 12AU7 tube amplifier transient analysis

 

On Tue, Mar 4, 2025 at 02:06 PM, Andy I wrote:


I don't know what ngspice does with the VDMOS model definition.
NGSPICE has had a VDMOS model since release 32 (current is 44.2).

-marcel


Re: LTspice vs ngspice 12AU7 tube amplifier transient analysis

 

Carlo, did you have succcess finding the ngspice user group?? (Not the brand new "AllSpice" group.)
?
Andy
?


Re: LTspice vs ngspice 12AU7 tube amplifier transient analysis

 

Carlo,
?
I'm sorry that I am not currently able to give you direct help with the ngspice part of your question.? But here is another thing to consider.
?
It looks like you used LTspice's schematic and transistor models (standard.???) in both simulations.? That MIGHT be a problem.? LTspice's discrete MOS models in standard.mos all use LTspice's proprietary "VDMOS" (Vertical Double-Diffused power MOSfet) model, which is a little different than SPICE's ordinary MOS models.? I don't know what ngspice does with the VDMOS model definition.
?
There is a chance that ngspice handles the IRF510 model incorrectly.
?
(I'm also aware that "VDMOS" can mean different things to different people and their tools.)
?
To put both simulators on equal footing, try downloading an IRF510 model from the internet and plug it into both simulators.
?
Andy
?


Re: LTspice vs ngspice 12AU7 tube amplifier transient analysis

 

On Tue, Mar 4, 2025 at 01:36 PM, Carlo wrote:
As you can check, .tran 100n 10m analysis gives quite different answers for ITS/DC operating point. Btw, as convergence aid, option noopiter gminsteps=0 is used in LTspice to skip direct NR and gmin stepping to get a "reasonable" ITS solution.
FYI, LTspice ignores the first parameter of the .TRAN command.? Therefore, ".tran 100n 10m" is identical to ".tran 0 10m" or ".tran 10m 10m".? In the old days of SPICE, the first parameter was the print step interval for SPICE's line-printer output.? ".tran 100n 10m" would have given you about 100,001 lines of waveform data, which might have spanned about two thousand pages (four reams) of paper in your line-printer.? LTspice never prints waveforms like that, so the first parameter is always ignored in LTspice.? Maybe ngspice still uses it for something; I don't know.? But that's off-topic anyway.
?
I have not used ngspice in years, so I can't try that simulation, but someone else here might.? Since ngspice's input is a SPICE Netlist, and since LTspice can simulate SPICE Netlists, did you also try simulating the ngspice netlist in LTspice?? It is a "sanity check", if nothing else.
?
Because your simulation uses the troublesome 12AU7 model which we already know has issues with multiple convergent operating points, it would not surprise me if differences were seen.? We saw that already, even from people using just one simulator (LTspice).? It's a flip of the coin whether it finds one initial operating point, or another, especially when they are both valid, mathematically.

For instance 12AU7's plate voltage is 12.8V for LTspice vs 22.6V for ngspice.
DC currents are also quite different and, in the end, output signal for ngspice isn't good at all even for a 1Khz amplifier's input signal.
Did you let the ngspice simulation continue for several more seconds, to see if it drifted towards a more appropriate operating point?? This might be just another case like the ones we had earlier with LTspice.? If the 12AU7 model, or any of the other models, do not handle out-of-bound conditions properly, then any simulator might find a mathematically valid but physically incorrect initial operating point.? That is really a problem with the model, not the simulator which is just doing its job.
?
I don't want to say that this IS the difference you saw, but it might be.
?
Andy
?


Re: LTspice vs ngspice 12AU7 tube amplifier transient analysis

 

Carlo,
?
Remember that uploaded files should be uploaded to the "Temp" directory only.? As it says, "Do not upload your files here" where 'here' is the top-level directory -- and "Click 'Temp' first, before uploading."
?
Please re-read the group's guidelines on the group's main webpage.? It reminds you about this:
To upload:? First navigate to the?Temp?folder, then click the "New/Upload" button.
?
Andy
?


Re: opamp BW slew rate search engine sorting

 
Edited

On Tue, Mar 4, 2025 at 03:31 PM, john23 wrote:
Hello , The analog devices website is not aloowing to filter OPAMPs exactly by the BW slew rate etc parmater.
For example as you can see here.Its not allowing me to sort OPAMP models.
Why do you say that it does not allow you to sort bandwidth or slew rate columns?? It works for me.? Did you click on the up- and down-arrows at the top of the columns?? Was there something wrong about the sort orders you saw after doing that?
?
If it did not work the way you desired, did you send feedback to Analog Devices?? Most of their webpages have a link in the lower right corner for "Site Feedback".? And there is another one near the lower right corner for "How would you describe your experience with this page?"? I can't say if web features such as that are available in all parts of the world, but there PROBABLY is a way in your country for telling ADI how their webpage did not meet your expectations.
?
The group you are in is about LTspice.? It's not a forum to complain about someone's website, even if that 'someone' is the same company that releases LTspice.? Their part selector pages have nothing to do with LTspice.? The group you are in is not run by Analog Devices, and complaining here has no assurance of reaching anyone at Analog Devices..
?
Andy
?


Re: Model of TDA2822, Dual Low-Voltage Audio Amplifier

 

开云体育

I have tested it, and it seems to work quite well. But read the data sheet with care.

On 2025-03-04 20:36, Kerim via groups.io wrote:
On Tue, Mar 4, 2025 at 10:56 PM, John Woodgate wrote:
Have you asked ST Micro if they have a SPICE model (not an 'LTspice model')?
During the search, I heard someone in a forum who did and didn't get a reply.
I think I will likely have to test it in real if no one here heard of it.
Thank you.
?
--
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: Model of TDA2822, Dual Low-Voltage Audio Amplifier

 

On Tue, Mar 4, 2025 at 10:56 PM, John Woodgate wrote:
Have you asked ST Micro if they have a SPICE model (not an 'LTspice model')?
During the search, I heard someone in a forum who did and didn't get a reply.
I think I will likely have to test it in real if no one here heard of it.
Thank you.
?


opamp BW slew rate search engine sorting

 

Hello , The analog devices website is not aloowing to filter OPAMPs exactly by the BW slew rate etc parmater.
For example as you can see here.Its not allowing me to sort OPAMP models.
Is there some catalog search engine you reccomend where I could sort OPAMPS by their properties?
https://www.analog.com/en/product-category/high-voltage-op-amps-greaterthanequalto-12v.html#products-in-category
?
Thanks.


Re: Model of TDA2822, Dual Low-Voltage Audio Amplifier

 

开云体育

Have you asked ST Micro if they have a SPICE model (not an 'LTspice model')?

On 2025-03-04 19:42, Kerim via groups.io wrote:

Hello,

?

In vain, I searched its model (TDA2822) in the group’s archive and on the internet.

?

It is suitable for 32 Ohm headphone with an electret microphone and 2*1.5V battery.

?

I have one ear working and its sensitivity has been degraded because of age.

TDA2822 gain is fixed (39 dB = 89 V/V). In the bridge configuration (mono), its output voltage limit is doubled.

?

Is there any chance to find its LTspice model?

?

Thank you.

Kerim

--
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.


Model of TDA2822, Dual Low-Voltage Audio Amplifier

 

Hello,

?

In vain, I searched its model (TDA2822) in the group’s archive and on the internet.

?

It is suitable for 32 Ohm headphone with an electret microphone and 2*1.5V battery.

?

I have one ear working and its sensitivity has been degraded because of age.

TDA2822 gain is fixed (39 dB = 89 V/V). In the bridge configuration (mono), its output voltage limit is doubled.

?

Is there any chance to find its LTspice model?

?

Thank you.

Kerim


Re: LTspice vs ngspice 12AU7 tube amplifier transient analysis

 

Ok, I'll try asking..
?
I uploaded both LTspice .asc schematic and ngspice .cir netlist including the libraries for subckts referenced.
?
As you can check, .tran 100n 10m analysis gives quite different answers for ITS/DC operating point. Btw, as convergence aid, option noopiter gminsteps=0 is used in LTspice to skip direct NR and gmin stepping to get a "reasonable" ITS solution.
?
ngspice .tran however converges to a quite different ITS solution. For instance 12AU7's plate voltage is 12.8V for LTspice vs 22.6V for ngspice. DC currents are also quite different and, in the end, output signal for ngspice isn't good at all even for a 1Khz amplifier's input signal.
?
I've no idea why their ITS solutions are so different though...
?
Carlo.
?
?


Re: More syntax issues with 24.1.x

 

On Tue, Mar 4, 2025 at 01:53 PM, Tony Casey wrote:
On 04/03/2025 13:14, Mathias Born via groups.io wrote:
Yes, this won't work anymore. Prior versions pre-process the input and replace the .include line with the contents of the included file and then parse everything all over again. 24.1 is very different, it doesn't accept a top-level directive in the middle of something.
But you don't actually need such general behavior, all you want is to load data from another file, and that's certainly useful. How about extending the table syntax:
?
B1 1 2 I=table(V(3,4), "BC848B_Ic_Vce_400u.inc")
No, that doesn't work, either, in any version.

Even if this did work, I have hundreds of instances like this. It's a lot less pain to stick with 24.0.12.
Sorry, that was a misunderstanding. The above syntax was a proposal for a future change. This is about a compromise. The old way can't come back. I'm open for suggestions.
And modifying all those netlists could be done in one go with grep. (Or much better, with
?
Best Regards,
Mathias
?


Re: More syntax issues with 24.1.x

 

开云体育

On 04/03/2025 13:14, Mathias Born via groups.io wrote:
Yes, this won't work anymore. Prior versions pre-process the input and replace the .include line with the contents of the included file and then parse everything all over again. 24.1 is very different, it doesn't accept a top-level directive in the middle of something.
But you don't actually need such general behavior, all you want is to load data from another file, and that's certainly useful. How about extending the table syntax:
?
B1 1 2 I=table(V(3,4), "BC848B_Ic_Vce_400u.inc")
No, that doesn't work, either, in any version.

U:\Simulations\LTspice\Modelling_Bipolar\BC847_BC857\OP_Characteristic_rounding.net(17): Invalid number of arguments.
B1 1 2 I=table(V(3,4) "BC848B_Ic_Vce_400u.inc" )
?????????????? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
With or without a comma between "V(3,4)" & "BC848B_Ic_Vce_400u.inc" the same error results. Doesn't look like the file is being included.

Even if this did work, I have hundreds of instances like this. It's a lot less pain to stick with 24.0.12.

--
Regards,
Tony


Re: More syntax issues with 24.1.x

 

On Tue, Mar 4, 2025 at 12:06 PM, Tony Casey wrote:
I have many testjigs that import digitised datasheet characteristic curves. An example of this would be:

.subckt IB_400u 1 2 3 4
R1 3 4 1G
B1 1 2 I=table(V(3,4)
.inc BC848B_Ic_Vce_400u.inc
+)

The file BC848B_Ic_Vce_400u.inc is a simple table:

+, 0, 0
+, 0.033713692946058194, 0.0037373737373737337
+, 0.07139456405596434, 0.007119195585620269
+, 0.09937242651150191, 0.01031229370884544
+, 0.11993258152246877, 0.014095645315621533
etc.
Yes, this won't work anymore. Prior versions pre-process the input and replace the .include line with the contents of the included file and then parse everything all over again. 24.1 is very different, it doesn't accept a top-level directive in the middle of something.
But you don't actually need such general behavior, all you want is to load data from another file, and that's certainly useful. How about extending the table syntax:
?
B1 1 2 I=table(V(3,4), "BC848B_Ic_Vce_400u.inc")
?
This would be easy to do. You'd still have to modify your netlists, though.

This issue seems to be related to the previously reported issue with nested .STEP directives of the form:

.step param A? 0 10 1
+ param B list 1 2 5 10

..where the 2nd line is failing with 24.1.x. Example schematic uploaded: LTspice_24.1_Step_problem.
?
This should work and does work for me if I try, but you obviously have a case where it doesn't. Unfortunately, you uploaded the wrong file. I'd appreciate a netlist or schematic.
?
Best Regards,
Mathias
?


More syntax issues with 24.1.x

 

开云体育

I have many testjigs that import digitised datasheet characteristic curves. An example of this would be:

.subckt IB_400u 1 2 3 4
R1 3 4 1G
B1 1 2 I=table(V(3,4)
.inc BC848B_Ic_Vce_400u.inc
+)

This is used with a G-source called IB_400u, which in this case is the? Ic vs. Vce characteristic of a transistor, i.e.:

XG1 C 0 C 0 IB_400u

The file BC848B_Ic_Vce_400u.inc is a simple table:

+, 0, 0
+, 0.033713692946058194, 0.0037373737373737337
+, 0.07139456405596434, 0.007119195585620269
+, 0.09937242651150191, 0.01031229370884544
+, 0.11993258152246877, 0.014095645315621533
etc.


This has always worked since LTspiceIV. With 24.1.4, it no longer works. Apparently, the new syntax checker works line by line, therefore the line:

B1 1 2 I=table(V(3,4)

..will fail due to unbalanced parentheses. There seems to be no workaround that I have yet been able to figure, as the .inc directive must appear at the start of a line.

I have uploaded example schematic to illustrate this issue: OP_Characteristic_rounding.

This issue seems to be related to the previously reported issue with nested .STEP directives of the form:

.step param A? 0 10 1
+ param B list 1 2 5 10

..where the 2nd line is failing with 24.1.x. Example schematic uploaded: LTspice_24.1_Step_problem.

--
Regards,
Tony


Re: Stepping MOSFETs

 

开云体育

On 03/03/2025 18:28, Mathias Born via groups.io wrote:
On Mon, Mar 3, 2025 at 06:02 PM, Tony Casey wrote:
It turns out that numeric models of "0" are rejected as invalid in all versions of LTspice, including 24.1.4, even though it is ultimately converted to a string. So the .STEP'ed parameter list can't start at 0.


--
Regards,
Tony
That should not be the case. There is no special treatment of the number zero. Can you provide a test case that proves a problem? Works just fine over here.
I have uploaded an example schematic that shows 3 options for stepping MOSFET models: Stepping_Models_pre-V24.1_workaround.

Option 1: works only in 24.1
Option 2: works in all versions
Option 3: fails completely in 24.1; fails 1st step, but works for 2nd step in pre-24.1

--
Tony


Re: Can LTspice XVII and LTspice 24 Be Installed On the Same Win 10 Machine?

 

开云体育

On 03/03/2025 23:32, Jim wrote:
I currently have LTspice 17.1.14 installed on my Windows 10 computer.? Can the latest version of LTspice 24 be installed without uninstalling LTspice 17?
All you have to do is to change the installation location, from:

C:\Program Files\ADI\LTspice\

..which is the default, to:

C:\Program Files\ADI\LTspice 24.1\

LTspice 24.1 will become the default application for opening files, but you can choose XVII from the Desktop link, or Task Bar if you make a copy there.

--
Regards,
Tony


Re: Can LTspice XVII and LTspice 24 Be Installed On the Same Win 10 Machine?

 

Hello Jim,
When you install 24, the installer will change all pointers in the registry.
After installation double-clicking any .asc, .asy, .net, .plt etc... will cause 24 to open.
?
Therefrom, the only way to use 17 will be to start it manually and throw your .asc, .asy, .net, .plt etc...? file onto it or use its open menu.
?
Also, I would make a copy of the 17 directory? from "Program Files" or where ever it is to somewhere safe in case Murphy's Law causes 24 to install on top of 17.
The copy of 17 can be put back anywhere if the original 17 gets clobbered by the 24 install.
Where ever 17 is stored it will run from there without issue by double-clicking the 17 .exe or via a shortcut to the 17 .exe.
17 will continue to use all the same library storage paths that it used to.
?
As for libraries, both 17 and 24 use "C:\Users\<user>\AppData\Local\LTspice\lib" to store the ADI supplied libraries.
Installing 24 will fully erase "C:\Users\<user>\AppData\Local\LTspice\lib" before installing all of ADI's latest stuff that comes with 24.
If you have your 3rd party library stuff also stored in "C:\Users\<user>\AppData\Local\LTspice\lib", as many have done in the past, make a copy of "C:\Users\<user>\AppData\Local\LTspice\lib" before installing 24.
You can sort out what models etc... you wish to keep and, where to store it going forward, after 24 is installed, because you made a complete copy of it.
?
All for now

?
?
Sent:?Monday, March 03, 2025 at 5:32 PM
From:?"Jim via groups.io" <jrteig@...>
To:[email protected]
Subject:?[LTspice] Can LTspice XVII and LTspice 24 Be Installed On the Same Win 10 Machine?
I currently have LTspice 17.1.14 installed on my Windows 10 computer.? Can the latest version of LTspice 24 be installed without uninstalling LTspice 17?
?
Thanks