The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 17th, 2024, 10:26pm
Pages: 1
Send Topic Print
switch model in DC-sweep analysis (Read 2642 times)
spinfab
Junior Member
**
Offline



Posts: 10

switch model in DC-sweep analysis
Jul 19th, 2013, 6:31am
 
Hello,

I wrote a .va model for a switch with a "if then else" approach using $discontinuity(0) and transition(..) commands to improve management of the sharp transition.
For a transient analysis it is functional, but for a DC-sweep analysis ( to plot an I vs V curve), it fails.

Any idea to help me

fab
nb: code skeleton


           if (state==0) G=Gmax;
           else if (state==1) G=Gmin;            
           G = transition(G_digital,0,1p);
           I(b1) <+ G*V(b1);
Back to top
 
 
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2386
Silicon Valley
Re: switch model in DC-sweep analysis
Reply #1 - Jul 19th, 2013, 8:18am
 
Your code is nonsensical. If you cannot give the original code, at least provide a complete model that actually exhibits the problem.

-Ken
Back to top
 
 
View Profile WWW   IP Logged
spinfab
Junior Member
**
Offline



Posts: 10

Re: switch model in DC-sweep analysis
Reply #2 - Jul 22nd, 2013, 2:04am
 
Hello,

Finally I succeed by defining a dedicated bloc for DC analysis "analysis('dc')", with the sharp transition transformed in a linear approach.

fab
Back to top
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.