The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 17th, 2024, 2:30am
Pages: 1
Send Topic Print
A capacitance with a second-order input (Read 2649 times)
ChinFu
New Member
*
Offline



Posts: 6

A capacitance with a second-order input
Aug 31st, 2008, 8:50am
 
Hi:
Recently, I need to simulate a capacitance with a second-order voltage input (451.47+4.9*V-0.0143*V^2). For V=sin(1000*t), C=2 pf and a RL=1M ohm, we can get I=RL*d(c*v)/dt, and the pick of the Vout is ≈ 9.8 mV. However, by using spectre, I got different results.

In first approach, I used verilog-a to built a capacitance model.

`include “discipline.vams”

module varactor(p, n);
inout p, n;
electrical p, n;
parameter real c = 2p;
parameter real a0 = 451.47;      
parameter real a1 = 4.9;
parameter real a2 = -0.0143;

real q, v;

analog begin

v = V(p,n);
q = a0+a1*v+a2*pow(v,2);
I(p, n) <+ c*ddt(q);

end
endmodule

This can be compiled in verilog-a, but can not run in spectre.
If I modify the input to 1 order (q = a0+a1*v; since a2 is much smaller than a1), it can run in spectre. However, the pick of Vout is ≈62 mV. Furthermore, if I the RL is increased, the Vout wil  be increased lineraly until 5V (like a saturation phenomenon).

In the second approach, I used an adder (built by verilog-a), a multiplication (built by verilog-a) and voltage sources to synthetize a second-order input in spectre. The synthetized signal is connected to a common capacitance, and also a load resistance is connected to the capacitance in the other side. The simulation result ( in spectre) show that the pick of Vout is ≈60mV. However, simular to  approach 1, as the Rl increasing, the Vout is increasing until 5 V and saturated.

Could someone tell me
1. Why the simulation result is 60 mV but not 9.8 mV ?
2. Why did the "saturation phenomenon" occur ?
3. How to built a second-order input capacitance that can be used in spectre (approach 1 ) ?    

Thnaks a lot.
Back to top
 
 
View Profile ChinFu   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1999
Massachusetts, USA
Re: A capacitance with a second-order input
Reply #1 - Sep 3rd, 2008, 8:26am
 
I don't see any reason that model shouldn't run in Spectre -- are you using a current version?  Does it fail in the middle of the sim, or it won't even start?  Are you trying transient or dc?

I would suggest:
q = c * (a0 + a1*v + a2*v*v);
// or c * (a0 + v*(a1 * v*a2));
I(p,n) <+ ddt(q);

but that shouldn't make a difference.
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
ChinFu
New Member
*
Offline



Posts: 6

Re: A capacitance with a second-order input
Reply #2 - Sep 22nd, 2008, 2:18am
 
Dear Geoffrey:

Thanks a lot for your reply  :)


ChinFu
Back to top
 
 
View Profile ChinFu   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1999
Massachusetts, USA
Re: A capacitance with a second-order input
Reply #3 - Sep 23rd, 2008, 7:03am
 
You're welcome -- but I (and other readers of this forum) are probably curious whether my suggestion was the fix, or if there was something else you did to get it to work.
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   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.