Forums

Hysteresis for the SW in LTspice question

Started by Maynard A. Philbrook Jr. December 25, 2013

  I am trying to emulate a spark gap effect using the SW component in 
LTspice and the parameter Vh = xxx seems to allude me !
 
  The help file leaves a lot to be desired and network searches 
simply point me to the same help file or youtube videos with no sound
and very blurry images.

  Is the value for the hysteresis absolute below the trigger or is an
offset from the trigger?

  I will say this, after experimenting with the values, I find that in 
this circuit I am playing with, if I don't get the Vh very close to the 
 Vt value, Ltspice will never complete the simulation run, it just sits
there and loops on some calculation that it never comes out of.. I 
Suppose I can change the step point, I using the default for now.

 P.S.
   The load this is shorting is from a secondary side of a HV 
transformer, much like a car coil would be.

Jamie
Den onsdag den 25. december 2013 20.31.42 UTC+1 skrev Maynard A. Philbrook Jr.:
> I am trying to emulate a spark gap effect using the SW component in > > LTspice and the parameter Vh = xxx seems to allude me ! > > > > The help file leaves a lot to be desired and network searches > > simply point me to the same help file or youtube videos with no sound > > and very blurry images. > > > > Is the value for the hysteresis absolute below the trigger or is an > > offset from the trigger? > > > > I will say this, after experimenting with the values, I find that in > > this circuit I am playing with, if I don't get the Vh very close to the > > Vt value, Ltspice will never complete the simulation run, it just sits > > there and loops on some calculation that it never comes out of.. I > > Suppose I can change the step point, I using the default for now. > > > > P.S. > > The load this is shorting is from a secondary side of a HV > > transformer, much like a car coil would be. > > > > Jamie
http://ltwiki.org/index.php?title=S_Voltage_Controlled_Switch would the neonbulb with changed voltages work ? -Lasse
On Wed, 25 Dec 2013 12:16:53 -0800 (PST), Lasse Langwadt Christensen
<langwadt@fonz.dk> wrote:

>Den onsdag den 25. december 2013 20.31.42 UTC+1 skrev Maynard A. Philbrook Jr.: >> I am trying to emulate a spark gap effect using the SW component in >> >> LTspice and the parameter Vh = xxx seems to allude me ! >> >> >> >> The help file leaves a lot to be desired and network searches >> >> simply point me to the same help file or youtube videos with no sound >> >> and very blurry images. >> >> >> >> Is the value for the hysteresis absolute below the trigger or is an >> >> offset from the trigger? >> >> >> >> I will say this, after experimenting with the values, I find that in >> >> this circuit I am playing with, if I don't get the Vh very close to the >> >> Vt value, Ltspice will never complete the simulation run, it just sits >> >> there and loops on some calculation that it never comes out of.. I >> >> Suppose I can change the step point, I using the default for now. >> >> >> >> P.S. >> >> The load this is shorting is from a secondary side of a HV >> >> transformer, much like a car coil would be. >> >> >> >> Jamie > >http://ltwiki.org/index.php?title=S_Voltage_Controlled_Switch > >would the neonbulb with changed voltages work ? > >-Lasse
Often you need to force a maximum time step to get LTspice to find a solution... its defaults are too loose for negative resistance situations. ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.
On Wed, 25 Dec 2013 14:31:42 -0500, Maynard A. Philbrook Jr. wrote:

> > > I am trying to emulate a spark gap effect using the SW component in > LTspice and the parameter Vh = xxx seems to allude me !
Level 1 Vh positive: Switches abruptly at Vt-Vh and Vt+Vh Hence Vt=1 and Vh=0.5 will switch at 0.5 and 1.5 Vt midway between switching points. Level 1 Vh negative: Switches smoothly (polynomial fit) at Vt-Vh and Vt+Vh /Examples/Educational/Vswitch.asc demonstrates this. You need to play with the .model directive to see the two modes As it comes, it uses Vh negative. Play with it to see how it works. This is what most people ever need. Putting "level=2" in the .model line, with Vh negative gives a function dependent on log(Roff/Ron)/pi, and log(1/(Roff*Ron))/2, with a tanh limit function. Jim would like that ;-) You probably never need worry about level 2. It's all in the help file, just not either intuitive, or well explained. LTspice also appears to honor Pspice switch syntax, which is different, too.
> > The help file leaves a lot to be desired
Yup
> and network searches > simply point me to the same help file or youtube videos with no sound and > very blurry images.
Par for the course.
> > Is the value for the hysteresis absolute below the trigger or is an > offset from the trigger?
See above
> > I will say this, after experimenting with the values, I find that in > this circuit I am playing with, if I don't get the Vh very close to the > Vt value, Ltspice will never complete the simulation run, it just sits > there and loops on some calculation that it never comes out of.. I Suppose > I can change the step point, I using the default for now.
Post the relevant .asc, and let's see what can be done.
> > P.S. > The load this is shorting is from a secondary side of a HV > transformer, much like a car coil would be. >
Like a spark plug? -- "Design is the reverse of analysis" (R.D. Middlebrook)
On Wed, 25 Dec 2013 13:24:13 -0800, Fred Abse wrote:

> Hence Vt=1 and Vh=0.5 will switch at 0.5 and 1.5 Vt midway between > switching points.
Sorry, that's misleading/ambiguous. Hence Vt=1 and Vh=0.5 will switch at 0.5 and 1.5V. Vt is midway between switching points. That's better;-) -- "Design is the reverse of analysis" (R.D. Middlebrook)
In article <a02bb965-53de-4e70-b5fe-7047220ea836@googlegroups.com>, 
langwadt@fonz.dk says...
> > Den onsdag den 25. december 2013 20.31.42 UTC+1 skrev Maynard A. Philbrook Jr.: > > I am trying to emulate a spark gap effect using the SW component in > > > > LTspice and the parameter Vh = xxx seems to allude me ! > > > > > > > > The help file leaves a lot to be desired and network searches > > > > simply point me to the same help file or youtube videos with no sound > > > > and very blurry images. > > > > > > > > Is the value for the hysteresis absolute below the trigger or is an > > > > offset from the trigger? > > > > > > > > I will say this, after experimenting with the values, I find that in > > > > this circuit I am playing with, if I don't get the Vh very close to the > > > > Vt value, Ltspice will never complete the simulation run, it just sits > > > > there and loops on some calculation that it never comes out of.. I > > > > Suppose I can change the step point, I using the default for now. > > > > > > > > P.S. > > > > The load this is shorting is from a secondary side of a HV > > > > transformer, much like a car coil would be. > > > > > > > > Jamie > > http://ltwiki.org/index.php?title=S_Voltage_Controlled_Switch > > would the neonbulb with changed voltages work ? > > -Lasse
I got it, it appears that the Vh parameter plays two roles here. - numbers creates arc intersection, much like an arc-cardinal function which can form an arc wave in the load effect of the switch. Setting the Vt and Vh -0..-1 sets the arc and offset for the Vt. I guess one could use that to make selectable raise/fall rates. Using positive numbers does the OFFSET of the Vt (trigger). This means If i would to do this, Vh = 1, that would put the Vt at Vt+1 and Vt-1 etc, which makes sense. but the help file does not explain this to you. Jamie
On Wed, 25 Dec 2013 12:16:53 -0800, Lasse Langwadt Christensen wrote:

> http://ltwiki.org/index.php?title=S_Voltage_Controlled_Switch
That's just a verbatim reprint of the help file -- "Design is the reverse of analysis" (R.D. Middlebrook)
On Wed, 25 Dec 2013 13:24:13 -0800, Fred Abse
<excretatauris@invalid.invalid> wrote:

>On Wed, 25 Dec 2013 14:31:42 -0500, Maynard A. Philbrook Jr. wrote: > >> >> >> I am trying to emulate a spark gap effect using the SW component in >> LTspice and the parameter Vh = xxx seems to allude me ! > >Level 1 Vh positive: > >Switches abruptly at Vt-Vh and Vt+Vh >Hence Vt=1 and Vh=0.5 will switch at 0.5 and 1.5 >Vt midway between switching points. > >Level 1 Vh negative: > >Switches smoothly (polynomial fit) at Vt-Vh and Vt+Vh > >/Examples/Educational/Vswitch.asc demonstrates this. You need to play with >the .model directive to see the two modes As it comes, it uses Vh negative. >Play with it to see how it works. This is what most people ever need. > >Putting "level=2" in the .model line, with Vh negative gives a function >dependent on log(Roff/Ron)/pi, and log(1/(Roff*Ron))/2, with a tanh limit >function. Jim would like that ;-)
Yes, indeed!
>You probably never need worry about level 2. > >It's all in the help file, just not either intuitive, or well explained. > >LTspice also appears to honor Pspice switch syntax, which is different, >too. > >> >> The help file leaves a lot to be desired > >Yup > >> and network searches >> simply point me to the same help file or youtube videos with no sound and >> very blurry images. > >Par for the course. > >> >> Is the value for the hysteresis absolute below the trigger or is an >> offset from the trigger? > >See above > >> >> I will say this, after experimenting with the values, I find that in >> this circuit I am playing with, if I don't get the Vh very close to the >> Vt value, Ltspice will never complete the simulation run, it just sits >> there and loops on some calculation that it never comes out of.. I Suppose >> I can change the step point, I using the default for now. > >Post the relevant .asc, and let's see what can be done. > >> >> P.S. >> The load this is shorting is from a secondary side of a HV >> transformer, much like a car coil would be. >> > Like a spark plug?
...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.
On Wed, 25 Dec 2013 16:50:36 -0500, Maynard A. Philbrook Jr. wrote:

> I got it, it appears that the Vh parameter plays two roles here. > > - numbers creates arc intersection, much like an arc-cardinal function > which can form an arc wave in the load effect of the switch. Setting the > Vt and Vh -0..-1 sets the arc and offset for the Vt. I guess one could use > that to make selectable raise/fall rates. > > Using positive numbers does the OFFSET of the Vt (trigger). This means > If i would to do this, Vh = 1, that would put the Vt at Vt+1 and Vt-1 etc, > which makes sense. but the help file does not explain this to you.
It actually does explain it, just not very well. See the PDF I posted to a.b.s.e, which illustrates the various modes as plots of switch impedance versus control voltage. -- "Design is the reverse of analysis" (R.D. Middlebrook)