how to plot output impedance in HSPICE?

Status
Not open for further replies.

renguo

Newbie level 6
hello,

I'm simulating a wilson current mirror and would like to plot the output impedance of the circuit. In theory, it should be as easy as Vout/Iout but I just don't have any idea how to implement it. I know it's possible because I've seen the work of my senior but I can't ask him now. Here's his plot:

Here's my netlist:
Code:
m1 	vd1	vg1	gnd	gnd nch w=5u l=2u
m2	vg1	vg1	gnd	gnd nch w=5u l=2u
m3	vd3	vd1	vg1	gnd nch w=20u l=2u
**********************************************
vdd	vdd	gnd	3.3
iref	vdd	vd1	100uA
r1	vdd	vd3	3k
**********************************************
.plot dc gm=lx7(m3)
.dc 	vdd	0	3.3	0.1
.print i(m3)

.end

Attachments

• 103.2 KB Views: 10
Last edited:

erikl

Super Moderator
Staff member
Replace r1 by a huge inductance L1, inject a unit ac current between vd3 & gnd, and run an .ac simulation with a fixed frequency and a sweep of your vdd. Then plot the voltage on vd3 vs. vdd , its value should represent the output impedance.

I'm not acquainted with HSPICE, but something like this should do it:
Code:
m1 	vd1	vg1	gnd	gnd nch w=5u  l=2u
m2	vg1	vg1	gnd	gnd nch w=5u  l=2u
m3	vd3	vd1	vg1	gnd nch w=20u l=2u
**********************************************
vdd	vdd	gnd	3.3
iref	vdd	vd1	100uA
* r1	vdd	vd3	3k
L1	vdd	vd3	1kH
Iac     vd3     gnd     1A
**********************************************
.ac 1Meg sweep	vdd	0	3.3	0.1
.plot v(vd3)

.end

renguo

Newbie level 6
Thanks for the help! I haven't tried your code yet as I decided to proceed with other homework but I did find a solution in the equation builder of SPICE explorer, which is to plot Vout/Iout. Sheesh, that was easy! However, I'm wondering why your method needs inductor replacement of the resistor. Also, the ac simulation is for the small signal resistance, right? I'm not sure what would be the difference if I just get the DC. Sorry, i'm such a noob

erikl

Super Moderator
Staff member
... the ac simulation is for the small signal resistance, right?
Right!

I'm not sure what would be the difference if I just get the DC.
In the triode region there's not much difference. In the saturation region, however, there will be a big difference: the small signal impedance is much larger than the DC resistance, and relatively independent of Vds, which is not the case for Vout/Iout, of course.

renguo

renguo

points: 2

multi_booter

Newbie level 6
Hi renguo can you share the solution with me? I have the same problem with hspice 2008..

renguo

Newbie level 6
I did not add anything on the netlist. I just used SPICE explorer to plot the graph. Use the Equation Builder under Tools button and put Vout/Iout

Last edited:
multi_booter

multi_booter

points: 2

multi_booter

Newbie level 6
renguo thank u so much

Status
Not open for further replies.