Switch problems once more
Hi all,
Thanks for this replays for my switch problems. I have tried using B
source
instead off switch before and it is not working right, don't ask my why I
have no
idea.
This time I have checked how switches works in PSPICE and Msim??? (Windows
version
of Pspice with schematics, optimizer and so on) and find out that they all use
simple method -
switch resistance change exponentially between RON and ROFF when control
voltage is between VON and VOFF.
For simple test I modified switch code to change resistance linearly when
Vcontrol
is between VT-VH and VT+VH. This fixes all my problems - I use small VH when
I want
fast switch and large when slower. Code is really simple and works as fast as
before.
Now back to ngspice... Switch levels can be used but:
1) I don't know how to add them
2) I am not sure if they are really needed. How often standard "rapid"
switches
will be used? This was the first time that I needed a switch, and I am doing
really
a lot of simulations.
3) Commercial PSPICE and other spice based simulators that I know don't
use
rapid switches.
Please think about this. I will send my code tomorrow (for voltage and current
switches), Do with it what You want.
Michael
Partial thread listing:
- Switch problems once more, (continued)
Re: [ng-spice] Switch problems / solutions . . .
James Swonger