Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PSPICE error : ERROR(ORPSIM-16364): Invalid device in subcircuit

Status
Not open for further replies.

rmmstn

Newbie level 6
Joined
May 3, 2017
Messages
12
Helped
1
Reputation
2
Reaction score
1
Trophy points
3
Activity points
159
Hello,

I am currently working on a project in which a new model of device has to be added to the SPICE library. However, when I used the code below, I am getting the error which is :
ERROR(ORPSIM-16364): Invalid device in subcircuit.

According to my investigations, I have seen that one person offered to make some important modifications in the code. Do you also think that it is the way?
If so, can you suggest me what to do in order to solve this issue.

Thank you.

CODE:

.SUBCKT memristor Plus Minus PARAMS:
+ Ron=10 Roff=16K Rinit=11K D=10N uv=10F
p=10
****************************************
* DIFFERENTIAL EQUATION MODELING *
****************************************
Gx 0 x value={ I(Emem)*uv*Ron/D^2*f(V(x),p)}
Cx x 0 1 IC={(Roff-Rinit)/(Roff-Ron)}
Raux x 0 1T
* RESISTIVE PORT OF THE MEMRISTOR *
*************************************
Emem plus aux value={-I(Emem)*V(x)*(Roff-Ron)}
Roff aux minus {Roff}
**************************************
*Flux computation*
**************************************
Eflux flux 0 value={SDT(V(plus,minus))}
****************************************
*Charge computation*
***************************************
Echarge charge 0 value={SDT(I(Emem))}
****************************************
* WINDOW FUNCTIONS
* FOR NONLINEAR DRIFT MODELING *
****************************************
*window function, according to Joglekar
.func f(x,p)={1-(2*x-1)^(2*p)}
*proposed window function
;.func f(x,i,p)={1-(x-stp(-i))^(2*p)}
.ENDS
 

You missed to tell for which line the error is reported.
 

Hello again,

I tried to do some implementations on top of the simulation and my errors changed. Right below, there is a simulation window where you can see the lines and errors. I guess that spice is not reading the device that I created. What do you suggest? Moreover, I changed the code :
.SUBCKT memristor 1 2 6
Eres 1 9 POLY(2) (8,0) (10,0) 0 0 0 0 1
Vsense 9 4 DC 0V
Fcopy 0 8 Vsense 1
Rstep 8 0 1K
Rser 2 4 10
Gmem 6 0 VALUE={I(Vsense)*max(v(6,0)*(1-v(6,0)), 0)}
Cmem 6 0 50nF
Ecpy 10 0 VALUE={min(max(v(6,0), 0), 1)}
Rsp 6 0 1000Meg
.ENDS
*$

SIMULATION WINDOW:

**** 07/15/17 17:28:03 ****** PSpice Lite (October 2012) ****** ID# 10813 ****

** Profile: "SCHEMATIC1-sonsimul" [ C:\Cadence\SPB_16.6\tools\capture\library\pspice\simul1-SCHEMATIC1-sonsimul.sim ]


**** CIRCUIT DESCRIPTION


******************************************************************************




** Creating circuit file "simul1-SCHEMATIC1-sonsimul.sim.cir"
** WARNING: THIS AUTOMATICALLY GENERATED FILE MAY BE OVERWRITTEN BY SUBSEQUENT SIMULATIONS

*Libraries:
* Profile Libraries :
* Local Libraries :
.LIB "./memristor.lib"
.INC "./memristor.lib"

**** INCLUDING memristor.lib ****
.SUBCKT memristor 1 2 6
Eres 1 9 POLY(2) (8,0) (10,0) 0 0 0 0 1
Vsense 9 4 DC 0V
Fcopy 0 8 Vsense 1
Rstep 8 0 1K
Rser 2 4 10
Gmem 6 0 VALUE={I(Vsense)*max(v(6,0)*(1-v(6,0)), 0)}
Cmem 6 0 50nF
Ecpy 10 0 VALUE={min(max(v(6,0), 0), 1)}
Rsp 6 0 1000Meg
.ENDS
*$

**** RESUMING simul1-SCHEMATIC1-sonsimul.sim.cir ****
.STMLIB "./memristor.lib"
* From [PSPICE NETLIST] section of C:\Users\Yahya\AppData\Roaming\SPB_Data\cdssetup\OrCAD_PSpice/16.6.0/PSpice.ini file:
.lib "nomd.lib"

*Analysis directives:
.TRAN 0 100ms 0 1u
.OPTIONS ADVCONV
.PROBE64 V(alias(*)) I(alias(*)) W(alias(*)) D(alias(*)) NOISE(alias(*))
.INC ".\simul1-SCHEMATIC1.net"



**** INCLUDING simul1-SCHEMATIC1.net ****
* source SIMUL1
X_M1 INPUT OUTPUT STATE MEMRISTOR
R_R2 OUTPUT 0 1k TC=0,0
V_V1 M_UN0001 M_UN0002 AC 0
+SIN 0 1VDc 500Hz 0 0 0
R_R1 N00749 STATE 1G TC=0,0
V_V2 N00749 0 0.5V

**** RESUMING simul1-SCHEMATIC1-sonsimul.sim.cir ****
.END

ERROR(ORPSIM-15141): Less than 2 connections at node M_UN0001.

ERROR(ORPSIM-15141): Less than 2 connections at node M_UN0002.

ERROR(ORPSIM-15142): Node M_UN0001 is floating

ERROR(ORPSIM-15142): Node M_UN0002 is floating


- - - Updated - - -

post.png Sorry , I forgot to add the image.
 

Look at the small squares. Both terminals of V1 are unconnected, a problem of schematic drawing grid.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top