Spice Simulation AC simulation then to calculate a parameter

Status
Not open for further replies.
M

MohEllayali

Guest
spice simulation

Hello Everybody,

I am newbie with Spice and I had a basic question:
So, I would like to perform an AC simulation then to calculate a parameter. Here a small example:
Code:
A SIMPLE AC RUN
.OPTION LIST NODE POST
.OP
.AC DEC 10 1K 1MEG
.PRINT AC V2=V(2) Ic1=I(C1)
V1 1 0 10 AC 1
R1 1 2 1K
R2 2 0 1K
C1 2 0 .001U
.end

In addition to V2 and Ic1I want to calculate the parameter:
Cap= Imaginary_part(Ic1/V2)/(2*PI*Freq), where Freq is the current simulation frequency.
From the code above, how can I calculate the Cap parameter?

Thank you for your help
 

spice simulation

You may use waveform viewer to perform the calculation.
 

Spice Simulation

Thanks, but I want to perform this kind of analysis to hundred of circuits so I am using spice in batch mode...the viewer solution is not usable.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…