Capacitance of MOS cap in spice


by Lanot
Tags: capacitance, moscap, spice
Lanot
Lanot is offline
#1
Feb13-14, 06:00 PM
P: 34
Hi guys,

I'm trying to obtain the CxV curve from moscap in SPICE (hspice).
Note that I'm not talking about the sum of the capacitances from the mos transistor, but the transistor behaving as a capacitor.
Is there an easy way to do this?
Phys.Org News Partner Engineering news on Phys.org
PsiKick's batteryless sensors poised for coming 'Internet of things'
Researcher launches successful tech start-up to help the blind
Researchers propose network-based evaluation tool to assess relief operations feasibility
meBigGuy
meBigGuy is offline
#2
Feb13-14, 10:40 PM
P: 961
How about a resistor connected to the moscap, Resistor driven by small AC voltage superimposed on DC, measure AC current through resistor while sweeping DC.
Lanot
Lanot is offline
#3
Feb14-14, 08:19 AM
P: 34
Do you mean a DC sweep like this?

Vin vin 0 AC 1 SIN (0 1 0.159)
R1 vin v2 1k
M1 0 v2 0 0 nmos l=1 w=10
.DC SWEEP vin -1 3 1m
.end

The current is zero though.

meBigGuy
meBigGuy is offline
#4
Feb14-14, 01:17 PM
P: 961

Capacitance of MOS cap in spice


Put an AC source in series with the DC source. Then, the AC current will depend on the capacitance value.
Lanot
Lanot is offline
#5
Feb14-14, 01:23 PM
P: 34
Nothing changed.

Vin vin 0
Vac vin vr1 AC 1 SIN (0 1 0.159)

R1 vr1 v2 1k
M1 0 v2 0 0 nmos l=1 w=10

.DC SWEEP vin -1 3 1m
.end
meBigGuy
meBigGuy is offline
#6
Feb14-14, 09:19 PM
P: 961
Why would there be zero AC current through a capacitor? Set the AC frequency to 100MHz. set the R to a higher value also. Replace the MOSCAP with a Capacitor. Play around with it a bit and figure it out.
Lanot
Lanot is offline
#7
Feb15-14, 01:20 PM
P: 34
Unfortunately, I couldn't replicate this experiment. I don't know what's the problem.
I was able to obtain an estimate of the MOS capacitance with a .op simulation (cgtot parameter), for low frequencies.
The only thing that is missing is the high frequency behavior of the moscap.
meBigGuy
meBigGuy is offline
#8
Feb15-14, 04:54 PM
P: 961
I don't see how .op provides any useful information.

Can you just replace the MOS with a capacitor and measure AC current. Then you know the sim is working.
Lanot
Lanot is offline
#9
Feb15-14, 05:09 PM
P: 34
I forgot to tell. I tested the circuit with a capacitor, and the current is zero.
meBigGuy
meBigGuy is offline
#10
Feb15-14, 05:41 PM
P: 961
Then you are doing something very wrong. If you can't see the AC current through a simple cap then you are looking in the wrong place. Can you see the AC voltage across the cap?
Lanot
Lanot is offline
#11
Feb16-14, 06:50 PM
P: 34
No, I can't. Isn't it because it's a DC sweep analysis?

The code is as follow:

Vin vin 0 DC 1
Vin vin 0
Vac vin vr1 AC 1 SIN (0 1 100MEG)

R1 vr1 v2 100k
M1 0 v2 0 0 nmos l=1 w=10

.DC SWEEP vin -1 3 1m
.end
meBigGuy
meBigGuy is offline
#12
Feb17-14, 03:06 AM
P: 961
sorry
Do a .tran
Then,
Do a .TRAN with a piecewise linear DC source and constant AC source.
I don't use spice much. I'm surprised no one else pointed out the issue. I actually didn't know you can't measure AC during a DC sweep.
Lanot
Lanot is offline
#13
Feb19-14, 09:20 AM
P: 34
Sorry for the delay. Now I can see the transient response. But the curve doesn't seem right I guess.

The code is:
Vin vin 0 DC 0 pulse=(0 1.2 0 50n 0 0 0 0 51n)
Vac vin vr1 AC 0 SIN (0 10m 100MEG)
R1 vr1 v2 100k
M1 0 v2 0 0 nmos l=1 w=10
.TRAN 1p 50n
.end

The response is as follows:
Click image for larger version

Name:	image.png
Views:	5
Size:	10.5 KB
ID:	66783
analogdesign
analogdesign is online now
#14
Feb21-14, 12:57 AM
P: 373
The easiest way to do this is with a transient analysis and a pulse so your input should be fine. Remember in the time domain that I = C dV/dT or C = I / (dV/dT). So divide the measured current with the voltage slope and that is your capacitance. You should do it with a rising and falling pulse and average the value you calculate.

AC analysis is also possible and may be more useful if you're using the MOSCAP as a decoupling device (so you mostly care about the capacitance around a small operating region.


Register to reply

Related Discussions
Help explain the capacitance definition in Spice General Physics 1
Spice and B2 Spice Circuit Schematics Question Electrical Engineering 1
Projected Capacitance Touchscreen, confused by how the capacitance is formed. Electrical Engineering 4
capacitance of a body versus capacitance of inscribed and circumscribed spheres Classical Physics 0
Difference between P-spice and LT-spice. Electrical Engineering 4