Hello Vahe,
I have had a similar idea and did have a go on this but at some
point I found a statement in the help files saying that any user
function evaluation is done before simulation starts.
I have even thought of paralleling two volatge sources and setting
their internal resistance zero to zero at some point in time.
I haven't tried and I can still not see if this might help with my
preferred stop condition which is a certain voltage.
But thanks for the effort anyway.
kind regards,
Karl.
--- In LTspice@yahoogroups
wrote:
>
> --- In LTspice@yahoogroups
> >
> > Hi all,
> >
> > is there a way to set some sort of simulation stop condition,
e.g
> > .tran 0 {V(v1) = 5V} 0 10n to abort the simulation as soon the
voltage
> > V1 reaches a certain value ?
> >
> > Thanks, Karl
> >
>
> I can think of a way to do this but I don't think it is very
elegant.
> Here is what I am thinking ... when does a simulation fail?
>
> I think we can think of a number of ways. The one that came to mind
> was to use a function like the natural log, ln(x), and let x be a
> voltage that was generated based on our abort condition. To stop
the
> simulation, we would make x be negative and since the log of a
> negative number should produce an error this would halt the
simulator.
>
> So for example, as you said in your message, we could set up an
> if-then-else construct that would make v(x) negative when v(v1)=5
is
> reached and this would halt the simulator.
>
> I actually tried this but the ln() function does not seem to stop
when
> the argument is negative. For example, ln(-1) reports -230.259V.
> This number looks like -100*ln(10) ... I don't know what is
happening.
>
> Incidentally, ln(x), where x<0 should result in a complex number
which
> would probably be flagged. For example, ln(-1)= j*pi (where
> j=sqrt(-1)), so I was hoping that sending in a negative number as
the
> argument would be able to halt the simulation.
>
> Anyway, I will stop here to see if anybody has any comments.
>
> Best regards,
> Vahe
>

Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch format to Traditional
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
__,_._,___
Tidak ada komentar:
Posting Komentar