Showing calculated parameters on a schematic page – Andy’s solution


 

I am creating schematics where the values of several components are calculated parameters,

where these values have to appear on the schematic page after a simulation run.  

 

Guided by the  topic “Showing calc'd Parameter Values on schematic”

(https://groups.io/g/LTspice/topic/showing_calc_d_parameter/50270753), at the end I have

chosen Andy’s compact solution described in the Temp folder example file

<Par_Values_on_Schematic_AI.asc">. Adapted to my schematics, it works just fine.

 

Now, to better understand this method, there are a couple of questions regarding the SPICE

Netlist block that implements the useful trick:

 

a)    A) What is the logic behind the three lines of the initial “Force .op solution” part?:

 

Dxyz1 xyz 0 Dxyz

Dxyz2 xyz 0 Dxyz

.model Dxyz D

 

b)     B) Why is it a good measure to add 1 GOhm resistors in parallel to all the voltage generators associated to the parameters?

 

rL1 L1 0 1G

rL2 L2 0 1G

rL3 L3 0 1G

…etc

 

Thank you very much and best regards


 

On Mon, Nov 18, 2024 at 01:47 PM, Alberto wrote:

... I have

chosen Andy’s compact solution described in the Temp folder example file

<Par_Values_on_Schematic_AI.asc">. ...

That schematic is now located here:
Files > z_yahoo > Files sorted by message number > msg_126391 > Par_Values_on_Schematic_AI.asc
 

a)    A) What is the logic behind the three lines of the initial “Force .op solution” part?:

 

Dxyz1 xyz 0 Dxyz

Dxyz2 xyz 0 Dxyz

.model Dxyz D

In order to get any numbers from the ".op Data Labels", there must be an Operating Point (.OP) solution.  That 2019 simulation used .AC analysis and it had no nonlinear elements.  Under those conditions, LTspice skips the Operating Point solution because the operating point does not affect the .AC solution.  The result would have been that all the ".op Data Labels" would display "???".
 
Simply adding one diode anywhere in the circuit makes LTspice do an Operating Point analysis in the background.  It has no effect on the .AC results, but it allows the ".op Data Labels" to display numbers instead of "???".
 
The second diode is there to avoid a warning about "Less than two connections" on that node (node "xyz").
 

b)     B) Why is it a good measure to add 1 GOhm resistors in parallel to all the voltage generators associated to the parameters?

 

rL1 L1 0 1G

rL2 L2 0 1G

rL3 L3 0 1G

…etc

That just avoids more Warnings.  Without them, you'd have all those voltage sources to nowhere, resulting in more "Less than two connections" at those nodes.  It is done simply to keep things tidy.  Sometimes people really dislike any warning or error messages in the log file, even if they can be ignored.
 
Andy
 
 


 

Thank you very much for your clear and exhaustive response, Andy. 
 
Maybe this method, like other interesting details found in the discussion group,
deserves to be described in LTspice's help pages and user's manual. 
 
Alberto