请教个hspice 获取本subckt内获节点电压的做法
时间:10-02
整理:3721RD
点击:
想要在下面的subckt中,根据T点的电压选用不同的device。
要怎么才能获得T点的电压呢?
直接写V(T)会出错,说找不到T这个parameter。
用.probe和.measure,会说在subckt内部不支持这些语法。
spice网标如下:
.SUBCKT PS2561D A K E C
D1 A D LED
Vsense D K 0
HdR 0 Vsense 1
RdR T 100K
CdT 0 20p
.IF (V(T) < 3)
Gpcg C B POLY(1) T 0'0.00001396*0.96/550''-0.258*0.96/550''3086*0.96/550''-2462000*0.96/550''962700000*0.96/550''-135900000000*0.96/550'
.ELSE
Gpcg C B POLY(1) T 0'-0.001517*0.98/550''2.409*0.98/550''-22.36*0.98/550''-530.9*0.98/550''8526*0.98/550'
.ENDIF
.model LED D IS=1p N=1.999644 RS=0 BV=6 IBV=10u
+ CJO=10p EG=1.424 TT=500n
.model detector NPN IS=100p BF=550 NF=1.3 BR=50 TF=2n TR=1.5n
+ CJE=15p CJC=20p VAF=100 ISS=0 CJS=1p
.ends
.endl opto_comp
请多赐教,谢谢
要怎么才能获得T点的电压呢?
直接写V(T)会出错,说找不到T这个parameter。
用.probe和.measure,会说在subckt内部不支持这些语法。
spice网标如下:
.SUBCKT PS2561D A K E C
D1 A D LED
Vsense D K 0
HdR 0 Vsense 1
RdR T 100K
CdT 0 20p
.IF (V(T) < 3)
Gpcg C B POLY(1) T 0'0.00001396*0.96/550''-0.258*0.96/550''3086*0.96/550''-2462000*0.96/550''962700000*0.96/550''-135900000000*0.96/550'
.ELSE
Gpcg C B POLY(1) T 0'-0.001517*0.98/550''2.409*0.98/550''-22.36*0.98/550''-530.9*0.98/550''8526*0.98/550'
.ENDIF
.model LED D IS=1p N=1.999644 RS=0 BV=6 IBV=10u
+ CJO=10p EG=1.424 TT=500n
.model detector NPN IS=100p BF=550 NF=1.3 BR=50 TF=2n TR=1.5n
+ CJE=15p CJC=20p VAF=100 ISS=0 CJS=1p
.ends
.endl opto_comp
请多赐教,谢谢
把节点T改名1,v(t)改成v(1)就对了。
你好。