Multisim and Ultiboard

cancel
Showing results for 
Search instead for 
Did you mean: 

using nest if then statements in ABM component

Solved!
Go to solution

I have a two input, 1 ouput circuit as in the schematic attached. My third node is defined at the bottom by the very high resistance voltmeter. What I have is a user-defined ABM current source that is dependent upon other parameters within the circuit. What I am wondering is this, is my conditional statement entered in the correct format? The conditions are particularly complex and outline as follows:

 

If the voltage difference between V2 and U1 is greater than 0, then the current in the ABM = 10^-12

 

If this voltage difference above is not greater than zero and if (V(1)-U(1))<(V(2)-U(1)), then the ABM current is (0.1*((-(V(2)-U(1)))^0.35))*0.00001596*(((V(2)-U(1))-(V(1)-U(1)))/2)*(V(1)-U(1))

 

Otherwise, if (V(1)-U(1))>= (V(2)-U(1)) then, the current is (0.1*((-(V(2)-U(1)))^0.35))*0.00001596*(((V(2)-U(1))^2)/2)

 

As you can see, these are very complex conditions and my concern is that I cannot simply type in U1 and get the compiler to understand that I want the voltage being read at the bottom-node voltmeter. I believe that I am using the correct nesting as far as the coding format is concerned: if(T,X,(if(Q,R,S))).

 

Any help would be much appreciated, and clarification can be provided.



 

0 Kudos
Message 1 of 4
(5,087 Views)
Solution
Accepted by jade.swordy
I am not sure why its not throwing an error for the use of U(1), perhaps that's a valid reserved word.

If you want to reference a voltage correctly it should be V(net_name) for single ended voltages (referenced to ground) or V(net1,net2) for differential voltages... For ABM models I suggest turning on net visibility for the entire schematic so you know the net name at the positive terminal of U1 or any other location for that matter.

I think the syntax you have for if/then/else is correct otherwise.

Regards,
Pat Noonan
National Instruments
0 Kudos
Message 2 of 4
(5,077 Views)

And am I correct in that by differential voltage your mean that V(1,2) would be the voltage difference between node 1 and node 2 (1-2)? Just to check.

 

Thanks

0 Kudos
Message 3 of 4
(5,055 Views)

jade.swordy,

 

Yes for the ABM a differential voltage is V(1,2) , meaning:  

 

V(1,2) = Voltage at net "1" - Voltage at net "2",

 

Example: Probe1 = +5V, Probe2 = -5V...

Simple ABM_VOLTAGE.JPG

 

Regards,

Pat Noonan

National Instruments

 

0 Kudos
Message 4 of 4
(5,049 Views)