u2 function


To ng-spice@ieee.ing.uniroma1.it
From Paolo Nenzi <pnenzi@ieee.ing.uniroma1.it>
Date Sun, 30 Apr 2000 16:47:52 +0200 (CEST)
Delivered-To mailing list ng-spice@ieee.ing.uniroma1.it
In-Reply-To <390BDA73.65D0AA80@uci.agh.edu.pl >
Mailing-List contact ng-spice-help@ieee.ing.uniroma1.it; run by ezmlm
Reply-To ng-spice@ieee.ing.uniroma1.it


>     Now about spice itself.
> I added new function "u2" to the B source. It is version of "u" that 
> change smoothly from 0 to 1 and 1 to 0. I don't know why but standard
> "u" doesn't worked with my galvoscanner model, I spend much time on it and 
> finally changed the code. Do You think that this is right? Should
> we solve problems in this way?

What is a galvoscanner ? Anyway, your function should work better than the
original one because it is "more" continuous (what is the function you
used ?). The real problem is the time constant, how fast the funxtion
raises or decreases. The time constant should be 1 or 2 order of magnitude
smaller than the smallest time constant in the circuit.  

> Anyway, "u2" works better then "u" in if-then-else expressions, so maybe
> we should keep it?

Why not ?

Paolo


Partial thread listing: