Problem importing this PSPICE model

Question asked by ren_zokuken01 on Feb 24, 2016
Latest reply on Feb 24, 2016 by sdgrant
Whenever I import this (http://epc-co.com/epc/documents/spice-files/PSPICE/EPC2036_V100_PSPICE.net):
-----
-----
-----
*****************************************************************************
* Version History:
* 1.00: 04/20/2015 - Initial Model Creation

.subckt EPC2036 gatein drainin sourcein
.param aWg=123 A1=4.7499 k2=2.0338 k3=0.15 rpara=0.039128 rpara_s_factor=0.23
+ aITc=0.004104 arTc=-0.0054 k2Tc=0.0006 x0_0=1.6588 x0_1=3.8735e-06 x0_1_TC=0
+ dgs1=4.3e-07 dgs2=2.6e-13 dgs3=0.8 dgs4=0.23
+ ags1=7.4257e-11 ags2=4.0219e-11 ags3=1.8702 ags4=0.19695
+ ags5=-4.0069e-14 ags6=-3.674 ags7=0.093656
+ agd1=2.6555e-13 agd2=1.0757e-12 agd3=-0.10439 agd4=0.60281
+ agd5=1.4576e-11 agd6=-2.3244 agd7=6.1875
+ agd8=1.7475e-12 agd9=-20.723 agd10=28.685
+ asd1=3.6091e-11 asd2=4.7586e-11 asd3=-9.7731 asd4=8.7493
+ asd5=9.0279e-11 asd6=-0.12324 asd7=28.057 rg_value=0.6

rd drainin drain {((1-rpara_s_factor)*rpara*(1-arTc*(Temp-25)))}
rs sourcein source {(rpara_s_factor*rpara*(1-arTc*(Temp-25)))}
rg gatein gate {(rg_value)}

*Large resistors to aid convergence
Rcsdconv drain source {100000Meg/aWg}
Rcgsconv gate source {100000Meg/aWg}
Rcgdconv gate drain {100000Meg/aWg}

gswitch drain source Value {if(v(drain,source)>0,
+     (A1*(1-aITc*(Temp-25))*log(1.0+exp((v(gate,source)-(k2*(1-k2Tc*(Temp-25))))/k3))*
+     v(drain,source)/(1 + max(x0_0+x0_1*(1-x0_1_TC*(Temp-25))*v(gate,source),0.2)*v(drain,source)) ),
+     (-A1*(1-aITc*(Temp-25))*log(1.0+exp((v(gate,drain)-(k2*(1-k2Tc*(Temp-25))))/k3))*
+     v(source,drain)/(1 + max(x0_0+x0_1*(1-x0_1_TC*(Temp-25))*v(gate,drain),0.2)*v(source,drain)) ) ) }

ggsdiode gate source VALUE {if( v(gate,source) < 10,
+     0.5*aWg/1077*(dgs1*(exp((v(gate,source))/dgs3)-1)+dgs2*(exp((v(gate,source))/dgs4)-1)),
+     0.5*aWg/1077*(dgs1*(exp((10)/dgs3)-1)+dgs2*(exp((10)/dgs4)-1)) ) }

ggddiode gate drain Value {if( v(gate,drain) < 10,
+     0.5*aWg/1077*(dgs1*(exp((v(gate,drain))/dgs3)-1)+dgs2*(exp((v(gate,drain))/dgs4)-1)),
+     0.5*aWg/1077*(dgs1*(exp((10)/dgs3)-1)+dgs2*(exp((10)/dgs4)-1)) ) }

*Model for voltage dependent gate-source capacitance
E_IGS tl_gs bl_gs value = {0.5*ags2*ags4*log(1+exp((v(gate,source)-ags3)/ags4))+
+     ags5*ags7*log(1+exp((v(source,drain)-ags6)/ags7))+
+     ags1*v(gate,source) }
V_INGS br_gs bl_gs 0.0
C_IGS br_gs tr_gs {1.0e-6}
R_IGS tr_gs tl_gs {1.0e-4}
F_IGS gate source V_INGS 1e6
R_IGS2 bl_gs source 100Meg

*Model for voltage dependent gate-drain capacitance
E_IGD tl_gd bl_gd value = {0.5*ags2*ags4*log(1+exp((v(gate,drain)-ags3)/ags4))+
+     agd2*agd4*log(1+exp((v(gate,drain)-agd3)/agd4))+
+     agd5*agd7*log(1+exp((v(gate,drain)-agd6)/agd7))+
+     agd8*agd10*log(1+exp((v(gate,drain)-agd9)/agd10))+
+     agd1*v(gate,drain) }
V_INGD br_gd bl_gd 0.0
C_IGD br_gd tr_gd {1.0e-6}
R_IGD tr_gd tl_gd {1.0e-4}
F_IGD gate drain V_INGD 1e6
R_IGD2 bl_gd drain 100Meg

*Model for voltage dependent source-drain capacitance
E_ISD tl_sd bl_sd value = {asd2*asd4*log(1+exp((v(source,drain)-asd3)/asd4))+
+     asd5*asd7*log(1+exp((v(source,drain)-asd6)/asd7))+
+     asd1*v(source,drain) }
V_INSD br_sd bl_sd 0.0
C_ISD br_sd tr_sd {1.0E-6}
R_ISD tr_sd tl_sd {1.0e-4}
F_ISD source drain V_INSD 1e6
R_ISD2 bl_sd drain 100Meg

.ends
-----
-----
-----

I end up with a schematic for a subcircuit that seems to be fine, no complaints from the Netlist Translator, but when I place this as a component to another schematic and run the simulation, I get this:

-----
-----
-----
Simulation Messages

Error detected by hpeesofsim during netlist flattening.
While evaluating expression `X2.gswitch.I':
Undefined function `ADS_SPC_IF()' ( used by device parameter `gswitch.I[1,0]' defined in the subcircuit `epc2036' ).
Error detected by hpeesofsim during netlist flattening.
Undefined function `ADS_SPC_IF()' ( used by device parameter `ggddiode.I[1,0]' defined in the subcircuit `epc2036' ).
Undefined function `ADS_SPC_IF()' ( used by device parameter `ggsdiode.I[1,0]' defined in the subcircuit `epc2036' ).
Undefined function `ADS_SPC_IF()' ( used by device parameter `gswitch.I[1,0]' defined in the subcircuit `epc2036' ).

Status / Summary

hpeesofsim (*) 430.shp Dec  7 2014
(64-bit windows built: 12/07/14 09:11:55)
****************
Simulation terminated due to error.
****************

-----
-----
-----

I googled "ADS_SPC_IF" and found very few results, so I figured this isn't even part of ADS Extension Language. This must've been generated at preprocessor stage or something. So maybe the original PSPICE netlist must've not been translated correctly. I don't know PSPICE nor do I have time to learn it.

So I'm asking if anyone of you can verify if the original PSPICE netlist was translated correctly and if so where is the actual problem here.

Edited by: ren_zokuken01 on Feb 24, 2016 11:05 AM