equations in VCCS Pspice. urgent!!

Thread Starter

yoyo1987

Joined Apr 24, 2014
17
I need to create a special VCCS (voltage controlled current source), that will send a current that equals I=i^2+2*(i^3). does anyone know how to do this?
 

strantor

Joined Oct 3, 2010
6,798
I like your tactic; two identical questions, one with the word "urgent" in the title. Throw out two types of lures and see which one gets a bite first, it's genius! I'll have to try this next time I have a question....
 

WBahn

Joined Mar 31, 2012
30,058
In most spice implementations you can define a source based on a mathematical expression involving other circuit variables. You might look for information on formula sources or something like that.
 

mvaseem

Joined Jan 31, 2014
48
You can do that using G device in Pspice. That means input is voltage and output is current.

In your equation "v" must be voltage on some net.

See below code. I am trying to output current through device G1 which is function of voltage of net1 (which is 5V).
Plotting trace I(G1) in Pspice would give 275A current.

*
V1 net1 0 5
G1 out 0 value={v(net1)**2+2*(v(net1)**3)}
R1 out 0 1k
.tran 0 1m
.probe
.end
 

mvaseem

Joined Jan 31, 2014
48
You can write it in text editor (notepad), change the extension from .txt to .cir.
Launch Pspice -> Open Simulation -> Select file type (from default .sim to .cir) -> Browse for cir file -> Run simulation.
 

mvaseem

Joined Jan 31, 2014
48
You can definitely build the circuit in Orcad Capture, which is tightly integrated with Pspice. All the device symbols are available in Capture-Pspice library. You just need to instantiate and connect them. Apply desired values and simulate.
 

Thread Starter

yoyo1987

Joined Apr 24, 2014
17
all the devices are available, but I need the CCCS to give me a v^3+2*v^2, how do i do that in Orcad capture? I need to write that in code?, if so, so how do I connect between the orcad and the Pspice code?

I'm sorry, but I'm pretty new with this whole program
 

mvaseem

Joined Jan 31, 2014
48
You need to draw the circuit in Capture. When you simulate it from Capture, it will generate netlist (for Pspice). This netlist is in the same form as the code I've written. Finally this netlist would automatically be simulated in pspice.
See attached Image. This would produce same result as the text code.
 

Attachments

Thread Starter

yoyo1987

Joined Apr 24, 2014
17
is there any way to do this only in Orcad capture? this Pspice code is messing me up!
the only problem I have is to explain to Oracad that I want my VCCS to do something a little different.

in your example, I draw the circuit (but how do I enter the value for G, and how do I call part of the circuit net1 ?) and when I play it , it generates netlist, then I write the code you gave me??
 
Top