Hello Everybody
In this circuit
The diode current is :
And the output is "Diode Voltage"
I MUST define the diode as a voltage controlled current source
It is my program
But my teacher say me it is Wrong
I define the blue line as COS but Hspice show this Error :
and Simulation not work
Help me plz
[ Excuseme if my english is not good
]
In this circuit
The diode current is :
Rich (BB code):
iD = 200*(vD-0.5)^2 vD>=0.5
iD = 0 vD<=0.5
I MUST define the diode as a voltage controlled current source
It is my program
Rich (BB code):
option post
.tran 0.5ns 500us
.PRINT TRAN v(1,2)
r1 1 0 80
r2 2 3 20
i1 1 0 25m
Vs 3 0 sin(0 0.1 5k 0 0 90)
GD1 1 2 CUR='200*(V(1,2)-0.5)*(V(2,1)-0.5)*(-1)'
.end
I define the blue line as COS but Hspice show this Error :
Also I change the red line with**error** no definition for 0:cos
it was called by 0:vs
Rich (BB code):
GD1 1 2 CUR='200*(V(1,2)-0.5)*(V(1,2)-0.5)*'
Rich (BB code):
GD1 1 2 CUR='200*pow(V(1,2)-0.5,2)'
Rich (BB code):
GD1 1 2 CUR='200*sqr(V(1,2)-0.5)'
Help me plz
[ Excuseme if my english is not good
Attachments
-
25.6 KB Views: 50