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.

please help me out with this ERROR(ORPSIM-16047): Must be V

Status
Not open for further replies.

mmkabir

Newbie level 4
Newbie level 4
Joined
Mar 25, 2017
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
74
I am using orcad pspice 16.6 full version and trying to implement the macro model of memristor. i am using this code to run


Code dot - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
.SUBCKT memristor 1 2 6
Eres 1 9 POLY(2)
+(8, 0) (11, 0) 0 0 0 0 1
Vsense 9 4 DC 0V
Fcopy 0 8 Vsense 1
Rstep 8 0 1K
Rser 2 4 10
Fmem 6 0 POLY(2) Vsense
+Ecopy -0.5E-10 0 1E-10 0 -1 0 0 0 1
Cmem 6 0 90nF
Rsp 6 0 1000Meg
Ecopy 7 0 0 6 1
Rc 7 0 1
Ecpy2 10 0 6 0 1
Vref ref 0 DC 1V
R1 10 11 100K
Ssat1 11 0 0 11 SWX
Ssat2 11 ref 11 ref SWX
.MODEL SWX SW(Ron=0.001, Roff=1000Meg,
+Vt=0.00001V, Vh=0.00001V)
.ENDS



when i try to run the net list it shows this message


Code dot - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
X_M1.Rser OUTPUT X_M1.4 10
X_M1.Fmem STATE 0 POLY 2 X_M1.Vsense Ecopy
-------------------------------------$
ERROR(ORPSIM-16047): Must be V
+ -0.5E-10 0 1E-10 0 -1 0 0 0 1
X_M1.Cmem STATE 0 90nF
X_M1.Rsp STATE 0 1000Meg
X_M1.Ecopy X_M1.7 0 0 STATE 1
X_M1.Rc X_M1.7 0 1
X_M1.Ecpy2 X_M1.10 0 STATE 0 1
X_M1.Vref X_M1.ref 0 DC 1V
X_M1.R1 X_M1.10 X_M1.11 100K
X_M1.Ssat1 X_M1.11 0 0 X_M1.11 X_M1.SWX
X_M1.Ssat2 X_M1.11 X_M1.ref X_M1.11 X_M1.ref X_M1.SWX
.MODEL X_M1.SWX SW
----------------$
ERROR -- Invalid model type




Please show me the path to solve this problem.

this is the design environment

 
Last edited by a moderator:

I am using orcad 16.6 full version to implement the macromodel of memristor and using this spcie code


Code dot - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
.SUBCKT memristor 1 2 6
Eres 1 9 POLY(2)
+(8, 0) (11, 0) 0 0 0 0 1
Vsense 9 4 DC 0V
Fcopy 0 8 Vsense 1
Rstep 8 0 1K
Rser 2 4 10
Fmem 6 0 POLY(2) Vsense
+Ecopy -0.5E-10 0 1E-10 0 -1 0 0 0 1
Cmem 6 0 90nF
Rsp 6 0 1000Meg
Ecopy 7 0 0 6 1
Rc 7 0 1
Ecpy2 10 0 6 0 1
Vref ref 0 DC 1V
R1 10 11 100K
Ssat1 11 0 0 11 SWX
Ssat2 11 ref 11 ref SWX
.MODEL SWX SW(Ron=0.001, Roff=1000Meg,
+Vt=0.00001V, Vh=0.00001V)
.ENDS




Whenever i try to run the simulation it shows me this message



Code dot - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
**** 03/26/17 10:22:18 ***** PSpice 16.6.0 (October 2012) ***** ID# 0 ********
 
 ** Profile: "SCHEMATIC1-sim1"  [ D:\CADENCE\simulations\macromodel simu1-PSpiceFiles\SCHEMATIC1\sim1.sim ] 
 
 
 ****     CIRCUIT DESCRIPTION
 
 
******************************************************************************
 
 
 
 
** Creating circuit file "sim1.cir" 
** WARNING: THIS AUTOMATICALLY GENERATED FILE MAY BE OVERWRITTEN BY SUBSEQUENT SIMULATIONS
 
*Libraries: 
* Profile Libraries :
* Local Libraries :
* From [PSPICE NETLIST] section of D:\SPB_Data\cdssetup\OrCAD_PSpice/16.6.0/PSpice.ini file:
.lib "D:\Cadence\SPB_16.6\tools\pspice\library\memristor macro Model.lib" 
.lib "nom.lib" 
 
*Analysis directives: 
.TRAN  0 100m 0 1u 
.OPTIONS ADVCONV
.PROBE64 V(alias(*)) I(alias(*)) W(alias(*)) D(alias(*)) NOISE(alias(*)) 
.INC "..\SCHEMATIC1.net" 
 
 
 
**** INCLUDING SCHEMATIC1.net ****
* source MACROMODEL SIMU1
X_M1         INPUT OUTPUT STATE MEMRISTOR
R_R1         OUTPUT 0  1k TC=0,0 
R_R2         N00216 STATE  1G TC=0,0 
V_V1         INPUT 0  
+SIN 0 1Vdc 500Hz 0 0 0
V_V2         N00216 0 0.5Vdc
 
**** RESUMING sim1.cir ****
.END
 
 
**** EXPANSION OF SUBCIRCUIT X_M1 ****
X_M1.Eres INPUT X_M1.9 POLY 2 X_M1.8 0 X_M1.11 0 0 0 0 0 1
X_M1.Vsense X_M1.9 X_M1.4 DC 0V
X_M1.Fcopy 0 X_M1.8 X_M1.Vsense 1
X_M1.Rstep X_M1.8 0 1K
X_M1.Rser OUTPUT X_M1.4 10
X_M1.Fmem STATE 0 POLY 2 X_M1.Vsense Ecopy
-------------------------------------$
ERROR(ORPSIM-16047): Must be V
+ -0.5E-10 0 1E-10 0 -1 0 0 0 1
X_M1.Cmem STATE 0 90nF
X_M1.Rsp STATE 0 1000Meg
X_M1.Ecopy X_M1.7 0 0 STATE 1
X_M1.Rc X_M1.7 0 1
X_M1.Ecpy2 X_M1.10 0 STATE 0 1
X_M1.Vref X_M1.ref 0 DC 1V
X_M1.R1 X_M1.10 X_M1.11 100K
X_M1.Ssat1 X_M1.11 0 0 X_M1.11 X_M1.SWX
X_M1.Ssat2 X_M1.11 X_M1.ref X_M1.11 X_M1.ref X_M1.SWX
.MODEL X_M1.SWX SW
----------------$
ERROR -- Invalid model type




How to solve this problem please help me
 
Last edited by a moderator:

This should work

***
r1 1 0 1
R2 2 0 1
X1 1 2 0 memristor
.SUBCKT memristor 1 2 6
Eres 1 9 POLY(2)
+(8, 0) (11, 0) 0 0 0 0 1
Vsense 9 4 DC 0V
Fcopy 0 8 Vsense 1
Rstep 8 0 1K
Rser 2 4 10
Fmem 6 0 POLY(2) Vsense
+VEcopy -0.5E-10 0 1E-10 0 -1 0 0 0 1
Cmem 6 0 90nF
Rsp 6 0 1000Meg
VEcopy 7 0 0 ;6 1

Rc 7 0 1
Ecpy2 10 0 6 0 1
Vref ref 0 DC 1V
R1 10 11 100K
Ssat1 11 0 0 11 SWX
Ssat2 11 ref 11 ref SWX

.MODEL SWX VSWITCH (Ron=0.001, Roff=1000Meg,
+Vt=0.00001V, Vh=0.00001V)

.ENDS

.op
.end

Changes - Switch Model in PSpice is VSWITCH, it is not SW.
Second problem is with F device "Fmem" - here you can use a E device as controlling source. The change above is convert E device to V - however you need to make sure model intent is not altered. Change above does not gurantee that
 

Thank you very much for your reply. I need one more and last help. I am also getting error in the following code aswell. Please can you help me out with this.

.SUBCKT memristor plus minus PARAMS:
+ Ron=100 Roff=16K Rinit=11K D=10N uv=10F p=10
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
Emem plus aux value={-I(Emem)*V(x)*(Roff-Ron)}
Roff aux minus {Roff}
Eflux flux 0 value={SDT(V(plus,minus))}
Echarge charge 0 value={SDT(I(Emem))}
.func f(x,p)={1-(2*x-1)^(2*p)}
*;.func f(x,i,p)={1-(x-stp(-i))^(2*p)}
.ENDS
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top