gEDA-user: ngspice - switched capacitors
Stuart Brorson
sdb at cloud9.net
Thu Nov 16 17:25:48 EST 2006
According to a widely available ngspice handbook available here:
http://www-ti.informatik.uni-tuebingen.de/~bernauer/lehre/ti-1-0506/spice/docu.html
you need to name the switch model SW, not VSWITCH. Give the handbook
a read, it's not too bad.
Stuart
On Thu, 16 Nov 2006, nano schultz wrote:
> Hello,
>
> I'm trying to simulate a switched-capacitor model, but however ngspice
> can't recognize vswitch model. Or does ngspice have another name for
> it ?
>
> here is my spice file:
> SWCAP.CIR - SWITCHED-CAPACITOR RESISTOR
> *
> V1 1 0 DC 5V
> *
> * SWITCHES AND CAP
> S1A 1 2 10 0 SW1
> C1 2 0 1000PF IC=0V
> S1B 2 3 11 0 SW1
> *
> V2 3 0 DC 1V
>
> *
> * SWITCH CONTROL
> VSA 10 0 PULSE(0V 5V 0US 0.1US 0.1US 5US 20US)
> VSB 11 0 PULSE(0V 5V 10US 0.1US 0.1US 5US 20US)
> *
> .MODEL SW1 VSWITCH(VOFF=0 VON=5 RON=100 ROFF=10MEG)
>
> *
> * ANALYSIS
> .TRAN 0.1US 100US
> *
> * VIEW RESULTS
> .PROBE
> .END
>
> the erreur I'm getting with ngspice:
> [..]
> Circuit: SWCAP_RES.CIR - SWITCHED-CAPACITOR RESISTOR
>
> Error on line 6 : s1a 1 2 10 0 sw1
> unable to find definition of model sw1 - default assumed
> Error on line 8 : s1b 2 3 11 0 sw1
> unable to find definition of model sw1 - default assumed
> Error on line 17 : .model sw1 vswitch(voff=0 von=5 ron=100
> roff=10meg)
> Unknown model type vswitch - ignored
>
> nano
>
>
> _______________________________________________
> geda-user mailing list
> geda-user at moria.seul.org
> http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
>
More information about the geda-user
mailing list