¿ªÔÆÌåÓý

Date

Re: LTspice vs ngspice 12AU7 tube amplifier transient analysis

 

I'd like to ask how Newton-Raphson iterations actually work in SPICE/LTspice.
?
I'm aware of SPICE uses, whenever possible, voltage-controlled representation of devices' I/V characteristic, i.e. the form i=f(v).
?
Therefore I believe the initial "guess/hint" to start Direct NR iterations from (including homotopies like gmin and source stepping) is about devices' voltage or actually node voltages themselves.
?
That should be what .NODESET= directive is supposed to set/work. Without any .NODESET statement I believe the NR initial "guess/hint" for devices' voltage is actually zero.
?
Can you confirm my understanding?
?
Carlo.
?


Re: Stepping MOSFETs

 

¿ªÔÆÌåÓý

On 10/03/2025 10:41, Mathias Born via groups.io wrote:
Thanks for providing this case. In a nicely condensed form, it demonstrates the problems of legacy LTspice and how they are addressed by 24.1.
You have two models:
?
.model 0 AKO: BSP89
.model 1 AKO: BSS145
?
and the line
?
M1 D G 0 0 {M}
?
Legacy LTspice (aka the version that you assumed "works") interprets the the second "0" as the model name. That's because there is a model with the name "0" defined. However, the actual intent for this "0" is to label the substrate node. (As documented in the help.) It then goes on and finds "{M}" which resolves to "0". This is interpreted as a parameter to M1, but a single "0" is not a valid parameter. It keeps going, at the end you get a visible error message in the log:
?
Error on line 4 : m1 d g 0 0 ?0?
? ? Error: ?No unlabeled parameter permitted for MOSFET's
?
If you changed the M1 line into:
?
M1 D G 0 1 {M}
?
you'd expect the substrate node to be connected to node "1" and model "{M}" be used. Instead, legacy LTspice will use model "1" and again ignore "{M}" as invalid parameter. Still, it keeps going.
?
LTspice 24.1 behaves in exactly the same way, except that it aborts with a hard error and a much better error message. This is the only acceptable behavior, because there is no point running a sim that obviously doesn't work out as the user intended.
?
All this boils down to the fact that the spice netlist format is poorly designed.
?
LTspice 24.1 introduces string parameters and thereby eliminates the need to name models like numbers, thus greatly reducing the likelihood of problems.
I understand your desire to add more features and improve performance. But I worry about backwards compatibility and portability. I am concerned that this is the tip of an iceberg of broken models. I haven't had the time check very many, but I know that quite a few long standing examples in the Files area of the group website are now broken because of the line-by-line syntax checker we discussed in the thread beginning #158931.

Adding new features to 24.1.x to address "problems of legacy LTspice" also introduces forward compatibility issues for people still using older versions of LTspice. There are lots of corporate users of LTspice who are not able to update to the "latest version" because of permissions restrictions placed by IT departments. This is a declining problem, but it still exists.

I am happy for new features and "improved" syntax to be added, but you should consider alongside this, "compatibility options", preferably at schematic level by directive so that "old" syntax remains acceptable. This is a common feature of compilers and Windows itself (even if 16 bit code cannot run any more, if anyone can still remember that).

--
Regards,
Tony


Re: Stepping MOSFETs

 

Hi Tony,
?
Thanks for providing this case. In a nicely condensed form, it demonstrates the problems of legacy LTspice and how they are addressed by 24.1.
You have two models:
?
.model 0 AKO: BSP89
.model 1 AKO: BSS145
?
and the line
?
M1 D G 0 0 {M}
?
Legacy LTspice (aka the version that you assumed "works") interprets the the second "0" as the model name. That's because there is a model with the name "0" defined. However, the actual intent for this "0" is to label the substrate node. (As documented in the help.) It then goes on and finds "{M}" which resolves to "0". This is interpreted as a parameter to M1, but a single "0" is not a valid parameter. It keeps going, at the end you get a visible error message in the log:
?
Error on line 4 : m1 d g 0 0 ?0?
? ? Error: ?No unlabeled parameter permitted for MOSFET's
?
If you changed the M1 line into:
?
M1 D G 0 1 {M}
?
you'd expect the substrate node to be connected to node "1" and model "{M}" be used. Instead, legacy LTspice will use model "1" and again ignore "{M}" as invalid parameter. Still, it keeps going.
?
LTspice 24.1 behaves in exactly the same way, except that it aborts with a hard error and a much better error message. This is the only acceptable behavior, because there is no point running a sim that obviously doesn't work out as the user intended.
?
All this boils down to the fact that the spice netlist format is poorly designed.
?
LTspice 24.1 introduces string parameters and thereby eliminates the need to name models like numbers, thus greatly reducing the likelihood of problems.
?
Best Regards,
Mathias
?
?
On Tue, Mar 4, 2025 at 11:38 AM, Tony Casey wrote:

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: Schematic drawing issues

 

¿ªÔÆÌåÓý

Thank you.

On 2025-03-10 03:24, Ryu via groups.io wrote:
What I meant to say is of course "lasso one of the anchor points", depending on the direction in which you want to enlarge the rectangle.
?
Ryu
--
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: Schematic drawing issues

 

¿ªÔÆÌåÓý

Thanks, Andy. I have to print to .JPG, and doing that directly from LTspice doesn't produce a good output, so I Print Screen and copy to Irfanview, crop and print from there. I think I will ask for an option to make the dots actually visible.

On 2025-03-09 23:59, Andy I via groups.io wrote:
On Sun, Mar 9, 2025 at 06:07 PM, John Woodgate wrote:

1. I have the background colour for both schematics and waveforms set to white, because that saves a lot of toner when printing out.

The on-screen background color does not affect the printed output, in my experience.? That is true whether or not I have "Print Monochrome" selected, at least when printing to PDF.? I suppose Your Mileage May Vary.
?

I wonder what I should see, with the grid enabled.

For schematic grids, you should see dots, not lines.? They are so tiny, I can barely see them.? Changing the on-screen colors does not seem to help me see them better.? Perhaps LTspice uses a size of 1 pixel, making them less apparent with high-res displays.? As far as I know, the schematic grid dots are on-screen only, not in the Printed output.? As you might notice (if you can see them), the on-screen dot spacing is not the functional grid spacing when you zoom out.? That is, it may show you one grid dot for every 2 or 4 or X functional grids - presumably so that the screen does not become filled with dots.
?
In contrast, the waveform grids are dotted lines, and they are much more visible.? I have to tone-down their color so that they don't overwhelm the waveform lines.
?
Andy
?
--
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: Schematic drawing issues

 

What I meant to say is of course "lasso one of the anchor points", depending on the direction in which you want to enlarge the rectangle.
?
Ryu


Re: Schematic drawing issues

 

I don't know if it is of any help after all the advice already given, but to change the size of a rectangle simultaneously in two directions with the drag tool I have to lasso the anchor points which are upper left corner or lower right corner. Doesn't work with the other corners. (LTspice XVII)
?
Ryu


Re: Schematic drawing issues

 

On Sun, Mar 9, 2025 at 06:07 PM, John Woodgate wrote:

1. I have the background colour for both schematics and waveforms set to white, because that saves a lot of toner when printing out.

The on-screen background color does not affect the printed output, in my experience.? That is true whether or not I have "Print Monochrome" selected, at least when printing to PDF.? I suppose Your Mileage May Vary.
?

I wonder what I should see, with the grid enabled.

For schematic grids, you should see dots, not lines.? They are so tiny, I can barely see them.? Changing the on-screen colors does not seem to help me see them better.? Perhaps LTspice uses a size of 1 pixel, making them less apparent with high-res displays.? As far as I know, the schematic grid dots are on-screen only, not in the Printed output.? As you might notice (if you can see them), the on-screen dot spacing is not the functional grid spacing when you zoom out.? That is, it may show you one grid dot for every 2 or 4 or X functional grids - presumably so that the screen does not become filled with dots.
?
In contrast, the waveform grids are dotted lines, and they are much more visible.? I have to tone-down their color so that they don't overwhelm the waveform lines.
?
Andy
?


Re: Schematic drawing issues

 

¿ªÔÆÌåÓý

I have succeeded, but without really resolving the issues:

1. I have the background colour for both schematics and waveforms set to white, because that saves a lot of toner when printing out. I think I can see very faint grid lines on the schematic screen, although that might be imagination. I also think that there are some tiny black dots, but they may be artefacts of my aged vision. I wonder what I should see, with the grid enabled.

2. This is still the case, but I have changed the rectangles of the block diagram to have sides that are odd numbers of grid steps, so that a wire can be taken from, and to, a centre of a side.

3. Acting on advice received, I have managed to do that.

I have not tried to use the symbol drafter, because I don't know how to run it other than by creating or editing a symbol from within a schematic.

If anyone is interested, I could upload the resulting block diagram.

On 2025-03-08 18:52, John Woodgate wrote:

I am still using version 24.0.11, and I am finding some problems with drawing a block diagram of a multi-stage circuit as a schematic. I know that LTspice isn't intended for that, but It's much simpler to use than some other drafting apps. The problems are:

1. I can't see the grid points. They have always been minute but now I can't see them at all. They used to be more visible on print-outs of schematics.

2. Drawing a wire with CTRL held down doesn't allow the wire to start and end off-grid. It's the same if I draw lines instead of wires. I can't find a 'Snap to grid' check box to untick.

3. Is there any way to change the dimensions of a? rectangle after it is drawn? I guess not.

Would it be better to use the symbol drafter?

--
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
--
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: Schematic drawing issues

 

¿ªÔÆÌåÓý

Thanks, Andy.

On 2025-03-08 20:48, Andy I via groups.io wrote:
On Sat, Mar 8, 2025 at 01:53 PM, John Woodgate wrote:

3. Is there any way to change the dimensions of a? rectangle after it is drawn? I guess not.

To which I replied, "I do not think so".? But I'm wrong.? I was using the "Move" and "Drag" buttons incorrectly in this case.? "Move" moves the entire rectangle.? "Drag" drags only the lasso'ed portion, thus allowing its size to be changed.
?
So yes, you can change the size of a rectangle, with the "Drag" tool.
?
Andy
?
--
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: Schematic drawing issues

 

¿ªÔÆÌåÓý

Thank you.

On 2025-03-08 20:41, eewiz via groups.io wrote:
As for #3 below;
Hit the "S" key.
Drag a box around an entire edge of a rectangle, top to bottom, or right to left.
Drag that edge of the rectangle to a new desired position.
?
All for now
?
?
Sent:?Saturday, March 08, 2025 at 3:13 PM
From:?"Andy I via groups.io" <AI.egrps+io@...>
To:?[email protected]
Subject:?Re: [LTspice] Schematic drawing issues
On Sat, Mar 8, 2025 at 01:53 PM, John Woodgate wrote:

1. I can't see the grid points. They have always been minute but now I can't see them at all. They used to be more visible on print-outs of schematics.

Are you sure they are enabled?? Right-click in schematic window > View > Show Grid.? Or Ctrl-G should toggle them.
?
Zooming in and out MIGHT help make them marginally more visible, but my eyes are not what they used to be.? Changing screen colors may help too.
?

2. Drawing a wire with CTRL held down doesn't allow the wire to start and end off-grid. It's the same if I draw lines instead of wires. I can't find a 'Snap to grid' check box to untick.

I am not sure, but I think "Snap to Grid" might be always enabled for wires in the schematic viewer.? CTRL might toggle "snap to grid" for certain objects other than wires; and it lets? you draw wires at angles - but to grid only.
?

3. Is there any way to change the dimensions of a? rectangle after it is drawn? I guess not.

I do not think so.? I always need to draw a new one.
?

Would it be better to use the symbol drafter?

Maybe.
?
Andy
?
--
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: Schematic drawing issues

 

On Sat, Mar 8, 2025 at 01:53 PM, John Woodgate wrote:

3. Is there any way to change the dimensions of a? rectangle after it is drawn? I guess not.

To which I replied, "I do not think so".? But I'm wrong.? I was using the "Move" and "Drag" buttons incorrectly in this case.? "Move" moves the entire rectangle.? "Drag" drags only the lasso'ed portion, thus allowing its size to be changed.
?
So yes, you can change the size of a rectangle, with the "Drag" tool.
?
Andy
?


Re: How to flip the screen's moving direction when using touchpad?

 

There's a Control Panel setting to flip the mouse wheel options, try changing that. I normally have that setting checked and the touchpad on my laptop works well for me.

--
Regards,
Tony?

On 8 Mar 2025 19:38, "lyulinshen via groups.io" <lyulinshen@...> wrote:
My touchpad works as intended on all other platforms and the windows system itself, only flipped directions on LTspice.


Re: Schematic drawing issues

 

As for #3 below;
Hit the "S" key.
Drag a box around an entire edge of a rectangle, top to bottom, or right to left.
Drag that edge of the rectangle to a new desired position.
?
All for now

?
?
Sent:?Saturday, March 08, 2025 at 3:13 PM
From:?"Andy I via groups.io" <AI.egrps+io@...>
To:[email protected]
Subject:?Re: [LTspice] Schematic drawing issues
On Sat, Mar 8, 2025 at 01:53 PM, John Woodgate wrote:

1. I can't see the grid points. They have always been minute but now I can't see them at all. They used to be more visible on print-outs of schematics.

Are you sure they are enabled?? Right-click in schematic window > View > Show Grid.? Or Ctrl-G should toggle them.
?
Zooming in and out MIGHT help make them marginally more visible, but my eyes are not what they used to be.? Changing screen colors may help too.
?

2. Drawing a wire with CTRL held down doesn't allow the wire to start and end off-grid. It's the same if I draw lines instead of wires. I can't find a 'Snap to grid' check box to untick.

I am not sure, but I think "Snap to Grid" might be always enabled for wires in the schematic viewer.? CTRL might toggle "snap to grid" for certain objects other than wires; and it lets? you draw wires at angles - but to grid only.
?

3. Is there any way to change the dimensions of a? rectangle after it is drawn? I guess not.

I do not think so.? I always need to draw a new one.
?

Would it be better to use the symbol drafter?

Maybe.
?
Andy
?


Re: Schematic drawing issues

 

On Sat, Mar 8, 2025 at 01:53 PM, John Woodgate wrote:

1. I can't see the grid points. They have always been minute but now I can't see them at all. They used to be more visible on print-outs of schematics.

Are you sure they are enabled?? Right-click in schematic window > View > Show Grid.? Or Ctrl-G should toggle them.
?
Zooming in and out MIGHT help make them marginally more visible, but my eyes are not what they used to be.? Changing screen colors may help too.
?

2. Drawing a wire with CTRL held down doesn't allow the wire to start and end off-grid. It's the same if I draw lines instead of wires. I can't find a 'Snap to grid' check box to untick.

I am not sure, but I think "Snap to Grid" might be always enabled for wires in the schematic viewer.? CTRL might toggle "snap to grid" for certain objects other than wires; and it lets? you draw wires at angles - but to grid only.
?

3. Is there any way to change the dimensions of a? rectangle after it is drawn? I guess not.

I do not think so.? I always need to draw a new one.
?

Would it be better to use the symbol drafter?

Maybe.
?
Andy
?


Re: How to flip the screen's moving direction when using touchpad?

 

It is 24.1.1.0, windows 64bit


Re: How to flip the screen's moving direction when using touchpad?

 

What version of LTspice?
?
Jim

On 03/08/2025 10:38 AM PST lyulinshen via groups.io <lyulinshen@...> wrote:
?
?
My touchpad works as intended on all other platforms and the windows system itself, only flipped directions on LTspice.


Re: How to flip the screen's moving direction when using touchpad?

 

¿ªÔÆÌåÓý

In that case, I suggest taking the issue to ADI's Engineer Zone.

On 2025-03-08 18:38, lyulinshen via groups.io wrote:
My touchpad works as intended on all other platforms and the windows system itself, only flipped directions on LTspice.
--
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.


Schematic drawing issues

 

¿ªÔÆÌåÓý

I am still using version 24.0.11, and I am finding some problems with drawing a block diagram of a multi-stage circuit as a schematic. I know that LTspice isn't intended for that, but It's much simpler to use than some other drafting apps. The problems are:

1. I can't see the grid points. They have always been minute but now I can't see them at all. They used to be more visible on print-outs of schematics.

2. Drawing a wire with CTRL held down doesn't allow the wire to start and end off-grid. It's the same if I draw lines instead of wires. I can't find a 'Snap to grid' check box to untick.

3. Is there any way to change the dimensions of a? rectangle after it is drawn? I guess not.

Would it be better to use the symbol drafter?

--
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: How to flip the screen's moving direction when using touchpad?

 

My touchpad works as intended on all other platforms and the windows system itself, only flipped directions on LTspice.