The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Mar 19th, 2024, 3:17am
Pages: 1
Send Topic Print
verilog-A dependent source NOT converge (Read 3417 times)
ywguo
Community Fellow
*****
Offline



Posts: 943
Shanghai, PRC
verilog-A dependent source NOT converge
Sep 20th, 2014, 6:50am
 
Hi Guys,

I wrote one voltage controlled voltage source with verilog-A, which is used in a transient analysis of one buck model. The spectre simulator could not get initial point for transient analysis. The VCVS code is shown below.

Code:
`include "constants.vams"
`include "disciplines.vams"

module Epwm(in, out);
input in;
electrical in;
input out;
electrical out;

parameter real vm = 4.0 from (0:inf);

analog begin
    @(initial_step) begin
	  V(out) <+ (V(in)>0.9) ? 0.9 : (V(in)<0.1) ? 0.1 : V(in)/vm;
    end

    V(out) <+ (V(in)>0.9) ? 0.9 : (V(in)<0.1) ? 0.1 : V(in)/vm;
end

endmodule 



After I replaced it with a spectre VCVS, the buck model works. The spectre VCVS is shown below.
Code:
E0 (d 0 vx 0) vcvs gain=0.25 min=0.1 max=0.9 


What's wrong with my verilog-A code? How do I improve it?



Thanks in advance.
Yawei
Back to top
 
 
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2384
Silicon Valley
Re: verilog-A dependent source NOT converge
Reply #1 - Sep 21st, 2014, 8:11am
 
Get rid of the initial step code. You are contributing the same thing to the output twice on the initial step. That creates an impulse at t=0 that is probably the source of you convergence issues.

-Ken
Back to top
 
 
View Profile WWW   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: verilog-A dependent source NOT converge
Reply #2 - Sep 23rd, 2014, 2:23pm
 
I'm also a little concerned about continuity at the breakpoints:

V(out) <+ (V(in)>0.9) ? 0.9 : (V(in)<0.1) ? 0.1 : V(in)/vm;

At V(in) = 0.9 plus a bit, the output is 0.9
At V(in) = 0.9 minus a bit, the output is V(in)/vm = 0.9/4 = 0.225

I don't think that's what the VCVS does.
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
boe
Community Fellow
*****
Offline



Posts: 615

Re: verilog-A dependent source NOT converge
Reply #3 - Sep 24th, 2014, 2:06am
 
Geoffrey_Coram wrote on Sep 23rd, 2014, 2:23pm:
I'm also a little concerned about continuity at the breakpoints:

V(out) <+ (V(in)>0.9) ? 0.9 : (V(in)<0.1) ? 0.1 : V(in)/vm;

At V(in) = 0.9 plus a bit, the output is 0.9
At V(in) = 0.9 minus a bit, the output is V(in)/vm = 0.9/4 = 0.225

I don't think that's what the VCVS does.
You are right, this is not what the VCVS does and such model behavior causes convergence issues.
- B O E
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.