开云体育

Date

Re: Is there a way to make node numbers appear on LTSpice schematics?

 

I can answer my own question: editing the plot.defs file *immediately* has effect.
(I reran the simulation before trying but did not restart LTspice.)

Why don't they document these useful enhancements? Is it in any of the LTspice
books or tutorials? I'm almost certain I tried this before with LTspiceIV and
it didn't work.

-marcel


Re: Is there a way to make node numbers appear on LTSpice schematics?

 

On Mon, Jul 17, 2023 at 02:33 PM, Andy I wrote:

I do not think you can do that (except by defining functions in the waveform viewer).?
Is it possible to use parameters and functions defined on the schematic (not in plot.defs) in the waveform viewer?
Related, is it possible to use such parameters / functions in measurements, even when directly on a .raw file with
a .meas script?

I think this can be done with a dynamically adjusted plot.defs file, but currently that might need restarting the GUI.

-marcel


Re: Is there a way to make node numbers appear on LTSpice schematics?

 

Many thanks, guys.


Re: Is there a way to make node numbers appear on LTSpice schematics?

 

What was the need for it, perhaps an alternative can be found. I think mousing over them is all you can do.


Re: Is there a way to make node numbers appear on LTSpice schematics?

 

Automatically assigned node numbers are ephemeral between runs, unless you label them.
Giving the same label to different nets, shorts those nets together. I use it often.

Giving more than one label to one net, confuses LTspice. I get no specific warning.
A short wire with label A at one end, and label B at the other, does NOT connect other nets A and B elsewhere on the schematic. It seems LTspice ignores some labels when another label has been found earlier on that net.


Re: Is there a way to make node numbers appear on LTSpice schematics?

 

Tony,

That is exactly what I was saying (or meant).

Andy


Re: Using Q=expr syntax in capacitor

 

George,

I don't think this can be called a bug.? Be aware that SPICE's (and LTspice's) netlist syntax is not free-form and we are not free to use functions anywhere we want to.? There are syntax rules, which can be tricky and difficult to understand.

I should preface this by saying that I don't have a lot of personal experience with LTspice's user-defined .FUNCtions.? Also, I don't know what was?your user-defined function, and more importantly, how you used it in your capacitor's Q=expression.

If you try to use a capacitor with something simple like Q=Myfunc(100p,5V)*x, LTspice gives an error and quits.? I think it makes sense that it would do that, because LTspice expects to see a number where "Myfunc(100p,5V)" is.? Enclose the function call between curly braces, like this: Q={Myfunc(100p,5V)}*x.? Note that only the function is in the curly braces; the special variable 'x' is outside.

Not knowing your function and what your Q=expr looks like, I can't say if this works for you.

But there might be another option.? Consider using a .TEXT definition, to shorten the appearance of a long expression on the schematic.? My understanding is that .TEXT uses a literal substitution of one string with another, before parsing the netlist and the syntax matters.

Andy


Re: Flyback Transformer #Transformer

 

  1. Run LTspice
  2. Open Help (press F1, or go to Help > Help)
  3. Open the Contents
  4. Go to F.A.Q. > Simulating Transformers

To simulate any transformers in SPICE or LTspice using this linear transformer model, you need to know the primary and secondary inductances.? Well, you need to know at least one of them, and then you can calculate the other if you know the turns-ratio = voltage step-up or step-down ratio.

Andy


Re: Spark gap physics.

 

The following formula can be used to calculate the dynamic resistance of a spark gap:

R = R0 * (1 - exp(-t / tau))

where:

??? R is the dynamic resistance of the spark gap at time t
??? R0 is the initial resistance of the spark gap (when t = 0)
??? tau is the time constant of the spark gap

The time constant of a spark gap for nitrogen at 1 atmosphere with a gap of 3mm is approximately 100 nanoseconds. This can be calculated using the following formula:

tau = 1.5 * d^2 / p * k

where:

??? tau is the time constant in nanoseconds
??? d is the gap spacing in millimeters
??? p is the gas pressure in atmospheres
??? k is a constant that depends on the gas composition


Re: ISL70444SEH declaration issue?

 

Thanks so much guys.


Re: Transformer models WAS: New Simulator Written by Mike Engelhardt #Transformer

 

For those who are interested in modelling tube amplifiers and the output transformers used:?I have a thread on DIYaudio? with easy to use LTspice transformer models.

There are currently 3 flavours: Push-Pull with ultra-linear taps, Ditto with extra cathode feedback windings and Single-ended. I am working on a Hammond 125A. Just enter the numbers from the transformer datasheet. All tedious calculations are done by LTspice in the model.
Something like [Rpp=8k Lpp=1220 UL=35 Cp=390p Rp=152 RS4=0.145 K=0.9999987] for an AMPLIMO Toroidal Output Transformer type 20PP8K0S.

Comments are welcome,

Ite


Re: Using Q=expr syntax in capacitor

 

I realized it pretty quickly and remedied the problem.
?


Re: Transformer models WAS: New Simulator Written by Mike Engelhardt #Transformer

 

开云体育

This is a suspended thread, but I am now able to look at the proposed tutorial The first question is, what sort(s) of transformer? While the basic theory is the same for all, the practical design methods vary considerably. There is no point in writing a tutorial that no-one is interested in.

I see the occasional query about a power supply having a mains transformer with inductances in the mH or less range, so there may be some interest in mains transformers.? I also see the occasional query about audio output transformers for tubes/valves.? I don't think anyone would try to wind their own toroidal, so we are talking 'E's and I's', maybe with the occasional 'T's and U's.

I'm not going to deal with transformers for SMPS, because they need a totally different approach, as do RF transformers with ferrite cores or no core.

======================================================================================
Best wishes John Woodgate OOO-Own Opinions Only

Rayleigh, Essex UK

I hear, and I forget. I see, and I remember. I do, and I understand. Xunzi (340 - 245 BC)


On 2023-04-29 19:50, Jim Wagner wrote:

BUT, what are those “easily measured or calculated parameters”? I am a circuit designer and have no idea what they are (or how to do the measurements)!. I strongly suspect that I am not alone. How about a tutorial for the wiki?

Jim

On Apr 29, 2023, at 11:06 AM, John Woodgate <jmw@...> wrote:

Many types of transformer do not need complicated models like Gummel-Poon for transistors, but of course complicated models like Chan can give more accurate results (often more accurate than is necessary, but that also apples to transistor models, which do not account for variations between samples). Simple models can use easily measured or calculated parameters, so it is easy to relate the model to the hardware.

Please note the new Subject line.

======================================================================================
Best wishes John Woodgate OOO-Own Opinions Only

Rayleigh, Essex UK

I hear, and I forget. I see, and I remember. I do, and I understand. Xunzi (340 - 245 BC)


On 2023-04-29 18:02, Jim Wagner wrote:
For me. the real transformer challenge is associating the physical parameters (dimensions, numbers of turns, core material, and such) into model parameters. One might reasonably assert that this is no different than, say, transistors. There is a big difference, though; I can build a transformer but I am not likely to build a transistor. I do not have the capability to measure transistors sufficiently to create models, so must rely on third-parties to do that. What third party do I use for that ferrite toroid transformer that i just built?

Perhaps the solution to this is a transformer model generator (like VDMOS tool). I can handle program writing but I do not know enough about magnetics to even think about something like that. To be useful, such a model generator should rely on measurements the most of us could do in a modestly equipped lab (say, with a signal generator and an oscilloscope).?

Jim Wagner
Oregon Research Electronics

On Apr 29, 2023, at 9:38 AM, Andy I <AI.egrps+io@...> wrote:

Susan wrote, "My big issue/stumbling-block when using 'spice simulators is transformer models; they all seem to be described in intractable terms making it difficult to translate something I have in my hand to an accurate simulation model."

That sounds like a topic for a separate subject (not this one).? The simplest transformer models are very simple.? It's the more complicated ones that can be challenging.

Andy



Re: Using Q=expr syntax in capacitor

 

开云体育

Wrong thread, I think, Bruce.
--
Regards,
Tony

On 18/07/2023 15:19, BRUCE108 wrote:

  1. Define the primary inductance as a parameter Lp
  2. Change the value of the primary inductor to {Lp}. the curly braces will pick up the value of parameter Lp
  3. Define parameter n to be the turns ratio.
  4. Set the secondary inductance to be {n*n*Lp}



Re: Flyback Transformer #Transformer

 


The inductance ratio is the squared of the winding ratio. If you need a 4:1 ratio for the windings. The Inductance shall have a 1:16 ratio. Ie. A 1 uH and a 16 uH inductor.?


Cheers!
Bernie


tir. 18. jul. 2023 kl. 13:15 skrev <usmanagani89@...>:

hello sir, how can i set the total winding in trafo simulation? (flyback transformer)


Re: Flyback Transformer #Transformer

 

  1. Define the primary inductance as a parameter Lp
  2. Change the value of the primary inductor to {Lp}. the curly braces will pick up the value of parameter Lp
  3. Define parameter n to be the turns ratio.
  4. Set the secondary inductance to be {n*n*Lp}


Re: Using Q=expr syntax in capacitor

 

开云体育

Well, we can't tell for sure from the limited information you supplied, but the Q function for a capacitor can only be an explicit function of "x". "x" is the special variable for the voltage between the "plates".

Help > LTspice XVII > LTspice? > Circuit Elements > C. Capacitor:
Syntax: Cnnn n1 n2 Q=<expression> [ic=<value>] [m=<value>]
There is a special variable, x, that means the voltage across the device. Therefore, a 100pF constant capacitance can be written as
Cnnn n1 n2 Q=100p*x
You might want to refer to the group's files section where there a number of examples of non-linear capacitors.

--
Regards,
Tony


On 18/07/2023 14:07, George Yashin wrote:
My question is simple, and I think it is a bug:
When I use function that is defined by .func statement in capacitor equation Q=func(args), I got the error that there is no such function.
But it is perfectly works in behavioural sources. If I enter equation directly in capacitor, it works.
What is the reason for that?


Using Q=expr syntax in capacitor

 

Hello,
My question is simple, and I think it is a bug:
When I use function that is defined by .func statement in capacitor equation Q=func(args), I got the error that there is no such function.
But it is perfectly works in behavioural sources. If I enter equation directly in capacitor, it works.
What is the reason for that?
Thank you in advance


Re: Flyback Transformer #Transformer

 

开云体育

With that level of input data, the answer is 'make it about enough'.

======================================================================================
Best wishes John Woodgate OOO-Own Opinions Only

Rayleigh, Essex UK

I hear, and I forget. I see, and I remember. I do, and I understand. Xunzi (340 - 245 BC)


On 2023-07-18 12:15, usmanagani89@... wrote:

hello sir, how can i set the total winding in trafo simulation? (flyback transformer)


Flyback Transformer #Transformer

 

hello sir, how can i set the total winding in trafo simulation? (flyback transformer)