SPICE vswitch?

S

Stuart Brorson

Guest
Another question about switches in SPICE: My SPICE netlist has the
following model line for a switch element:

..MODEL SLATCH1 VSWITCH(ROFF=1E6,RON=500,VOFF=2.1,VON=1.4)

Tclspice reports that the VSWITCH model is not found. I can't find a
VSWITCH model doing a search on the cannonical SPICE3f5 documentation
site:

http://newton.ex.ac.uk/teaching/CDHW/Electronics2/userguide/index.html#toc

So, is VSWITCH an hspice or PSpice model? Or is it proper SPICE3f5,
and my head is just wedged?

Stuart
 
Stuart Brorson wrote:
Another question about switches in SPICE: My SPICE netlist has the
following model line for a switch element:

.MODEL SLATCH1 VSWITCH(ROFF=1E6,RON=500,VOFF=2.1,VON=1.4)

Tclspice reports that the VSWITCH model is not found. I can't find a
VSWITCH model doing a search on the cannonical SPICE3f5 documentation
site:


http://newton.ex.ac.uk/teaching/CDHW/Electronics2/userguide/index.html#toc

So, is VSWITCH an hspice or PSpice model? Or is it proper SPICE3f5,
and my head is just wedged?

Stuart
vswitch is a standard spice device. The syntax above is not for a
standard spice device. remove the ',' for starters.

Vt is the threshold voltage, Vh is the hysterisis for standard spice.
Von and Voff are pspice specific.

If it didn't find it, it didnt find it. Have you got the name SLATCH1
correct in both places of the netlist?

Kevin Aylward
salesEXTRACT@anasoft.co.uk
http://www.anasoft.co.uk
SuperSpice, a very affordable Mixed-Mode
Windows Simulator with Schematic Capture,
Waveform Display, FFT's and Filter Design.

http://www.anasoft.co.uk/replicators/index.html

"Understanding" itself requires consciousness,
therefore consciousness cannot be "understood"
without referring to itself for the explanation,
therefore the "hard problem" of consciousness,
is intrinsically unsolvable as it is self referral.
 
Stuart,

.MODEL SLATCH1 VSWITCH(ROFF=1E6,RON=500,VOFF=2.1,VON=1.4)
This is PSpice syntax. It smoothly transitions between
and off resistances. You can't run this in Berkeley SPICE
3f4/5 because 3f4 doesn't have a switch that smoothly
transitions between on and off. LTspice will run this
switch exactly has you've written as well as an alterntive
syntax:

..MODEL SLATCH1 SW(Roff=1E6 Ron=500 Vt-1.75 Vh=-.35)

Which is closer to 3f4 syntax but the negative hytersis means
smoothly transitioning to LTspice and is an extension of the
SPICE 3f4 syntax.

--Mike
 
Stuart,

I wrote:

.MODEL SLATCH1 SW(ROFF=1E6 RON=500 Vt-1.75 Vh=-.35)
Opps. that should have been

..MODEL SLATCH1 SW(Roff=1E6 Ron=500 Vt=-1.75 Vh=-.35)

Here's a PSpice/LTspice deck that will show your model
smoothly transistioning between on and off. Node A is
between the switch and a 1K pull up.

*
S1 0 A N002 0 SLATCH1
V1 N001 0 5
R1 N001 A 1K
V2 N002 0 pulse(0 2 0 .5m .5m 1u 1.002m)
..MODEL SLATCH1 VSWITCH(ROFF=1E6,RON=500,VOFF=2.1,VON=1.4)
..tran 1m 1m
..probe
..end

And here's a LTspice deck running both models in separate
switches but with identical behavior at nodes A and B.

*
S1 0 A VC 0 SLATCH1
V1 N001 0 5
R1 N001 A 1K
R2 B N001 1K
S2 B 0 0 VC X
V2 VC 0 pulse(0 2 0 .5m .5m 0 1m)
..MODEL SLATCH1 VSWITCH(ROFF=1E6,RON=500,VOFF=2.1,VON=1.4)
..MODEL X SW(Roff=1E6 Ron=500 Vt=-1.75 Vh=-.35)
..tran 1m
..end
 
Mike Engelhardt <pmte@concentric.net> wrote:
: Stuart,

: Here's a PSpice/LTspice deck that will show your model
: smoothly transistioning between on and off.

[snip!]

Mike & Kevin --

Thanks for your information! I will try out the switch model under
tclspice. . . .

Stuart
 
Stuart Brorson wrote:
Mike Engelhardt <pmte@concentric.net> wrote:
Stuart,

Here's a PSpice/LTspice deck that will show your model
smoothly transistioning between on and off.

[snip!]

Mike & Kevin --

Thanks for your information! I will try out the switch model under
tclspice. . . .

Stuart
Note that tclspice has the xspice additions, and so should also have the
xspice voltage controlled switch.

..model xspice_switch aswitch(cntl_on= 0.6 cntl_off=0.4 r_off=100e6
r_on=10m log=TRUE)

This has a smooth transition between its on and off values. In, general,
it is best to avoid the spice vswitch.

Kevin Aylward
salesEXTRACT@anasoft.co.uk
http://www.anasoft.co.uk
SuperSpice, a very affordable Mixed-Mode
Windows Simulator with Schematic Capture,
Waveform Display, FFT's and Filter Design.

http://www.anasoft.co.uk/replicators/index.html

"Understanding" itself requires consciousness,
therefore consciousness cannot be "understood"
without referring to itself for the explanation,
therefore the "hard problem" of consciousness,
is intrinsically unsolvable as it is self referral.
 

Welcome to EDABoard.com

Sponsor

Back
Top