Modeling an electrical non-linear problem

Modeling a diode

../_images/diode2.png

A diode is an electrical non linear component. Let I be the current flowing through the diode, Vj the voltage across its terminals, Vs a threshold voltage, V0 and I0 two parameters of the characteristic curve of the diode.The behavior of such a component is the following one: *

if \(V_j < V_s\) then \(I=0\)

else \(I=I_0*(e^{V_j/V_0}-1)\)

with

\(V_0 = 0.025875 V\) \(V_s = 0.3 V\) \(I_0 = 1e-11 A\)

One way of modeling a diode in DEPS is to use the IfThenElse metaproperty as follow:

Model Diode() extends Dipole[DipoleIndex]
Constants
V0 : Voltage = 0.025875;
Vs : Voltage = 0.3;
I0 : Current = 1e-11;

Variables
expr Vj : Voltage in [0, 20];

Elements

Properties
Vj := Pin.V-Pout.V;

IfThenElse(Vj >= Vs,
            [I = I0*(exp(Vj/V0)-1)],
            [I=0]);

End

Modeling a non linear system

Let’s assume now that we want to model in DEPS the following circuit where the value of R1 = 100 Ohms is known, the D1 diode is the previous one and the value of R2 is unkonwn:

../_images/DiodePb.png

First of all, we need to model a current generator as follow:

Model ISource(is)
Constants
is :  Current;

Variables

Elements
Pin : Port();
Pout:  Port();

Properties
Pin.V = 0;
Pin.I := is;
Pout.I := -is;

End

Then the DiodeSys model can be built. It represents the R1, R2, D1 system connected with the Gen current generator:

Model DiodeSys(Gen)
Constants
R1val : Resistance = 100.0;

Variables

Elements
R1:Resistor(1,R1val);
R2 : Resistor(2);
D1 : Diode(3);
Gen : ISource[Current];

node1 : Node(Gen.Pout, R1.Pin, R2.Pin);
node2 : Node(R2.Pout, D1.Pin);
node3 : Node(Gen.Pin, R1.Pout, D1.Pout);

Properties
End

Modeling the problem

The problem is to find the right value of R2 such that the current in the diode becomes equal to 30 mA.

Problem DiodePb
Constants
i: Current = 0.1;

Variables

Elements
Gen : VSource(i);
S : DiodeSys(Gen);

Properties

S.D1.I <= 0.03;

End

Compiling and solving

After opening the DiodePb.proj project file in DEPS Studio, we can compile the project (project > build the problem).

../_images/DiodeCompile.png

Then the problem can be solved (Solve > Firts Solution).

../_images/DiodeSolve.png