Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding new diode model to Modelica.Electrical.Analog #1413

Closed
modelica-trac-importer opened this issue Jan 14, 2017 · 8 comments
Closed

Adding new diode model to Modelica.Electrical.Analog #1413

modelica-trac-importer opened this issue Jan 14, 2017 · 8 comments
Assignees
Labels
enhancement New feature or enhancement L: Electrical.Analog Issue addresses Modelica.Electrical.Analog
Milestone

Comments

@modelica-trac-importer
Copy link

modelica-trac-importer commented Jan 14, 2017

Modified by dietmarw on 18 Jun 2014 16:00 UTC
The existing diode model in Modelica.Electrical.Analog.Semiconductors has some shortcomes:

  • it does not model reverse breakdown (this is done in the ZDiode model in the same package)
  • the behaviour of the model is controlled by the physically-meaningless parameter Maxexp, for which it is difficult to supply an apropriate value
  • it does not model an internal series resistance

For all these reasons Stefan Vorkoetter proposed an improved diode model which addresses the mentioned shortcomes.The Modelica code of this model is:

#!div style="font-size: 80%"
  ```mo
model Diode_improved "Improved diode model"
    import Modelica.SIunits;
    extends Modelica.Electrical.Analog.Interfaces.OnePort;
    parameter SIunits.Voltage Vf = 0.7 "Forward voltage";
    parameter SIunits.Current Ids = 1.e-13 "Reverse saturation current";
    parameter SIunits.Resistance Rs = 16 "Ohmic resistance";
    parameter SIunits.Voltage Vt = 0.026 "Thermal voltage (kT/q)";
    parameter Real N = 1 "Emission coefficient";
    parameter SIunits.Voltage Bv = 100 "Reverse breakdown voltage";
protected 
    parameter SIunits.Voltage VdMax = Vf + (N\*Vt) 
    "Linear continuation threshold";
    parameter SIunits.Voltage iVdMax = Ids \* (exp(VdMax/(N\*Vt)) - 1) 
    "Current at threshold";
    parameter SIunits.Conductance diVdMax = Ids \* exp(VdMax/(N\*Vt))/(N\*Vt) 
    "Conductance at threshold";
    SIunits.Voltage Vd "Voltage across pure diode part";
equation 
    i = smooth(1,
               if Vd < -Bv / 2 then 
                   -Ids \* (exp(-(Vd+Bv)/(N\*Vt)) + 1 - 2\*exp(-Bv/(2\*N*Vt)))
               elseif Vd < VdMax then 
                   Ids \* (exp(Vd/(N\*Vt)) - 1)
               else 
                   iVdMax + (Vd - VdMax) \* diVdMax);
                   /\* Lower half of reverse biased region including
                      breakdown. \*/
                   /\* Upper half of reverse biased region, and forward
                      biased region before conduction. \*/
                   /\* Forward biased region after conduction. \*/
    v = Vd + i \* Rs;
end Diode_improved;

}}}
Nevertheless this diode model also has a small shortcome. It has no parallel conductance in order to ensure a small currentflow when the diode is closed in order to avoid singularity. Therefore, compared to the diode model of Stefan Vorkoettter, we propose the following slightly improved diode model:

#!div style="font-size: 80%"
  {{{#!mo
model Diode_improved "Improved diode model"
    import Modelica.SIunits;
    extends Modelica.Electrical.Analog.Interfaces.OnePort;
        parameter SIunits.Voltage Vf = 0.7 "Forward voltage";
    parameter SIunits.Current Ids = 1.e-13 "Reverse saturation current";
    parameter SIunits.Resistance Rs = 16 "Ohmic resistance";
    parameter SIunits.Voltage Vt = 0.026 "Thermal voltage (kT/q)";
    parameter Real N = 1 "Emission coefficient";
    parameter SIunits.Voltage Bv = 100 "Reverse breakdown voltage";
    parameter SIunits.Conductance Gp = 1e-6 
    "Parallel conductance for numerical stability";
protected 
    parameter SIunits.Voltage VdMax = Vf + (N\*Vt) 
    "Linear continuation threshold";
    parameter SIunits.Voltage iVdMax = Ids \* (exp(VdMax/(N\*Vt)) - 1) 
    "Current at threshold";
    parameter SIunits.Conductance diVdMax = Ids \* exp(VdMax/(N\*Vt))/(N\*Vt) 
    "Conductance at threshold";
    SIunits.Voltage Vd "Voltage across pure diode part";
    SIunits.Current id "diode current";
equation 
    id = smooth(1,
               if Vd < -Bv / 2 then 
                   -Ids \* (exp(-(Vd+Bv)/(N\*Vt)) + 1 - 2\*exp(-Bv/(2\*N*Vt)))
               elseif Vd < VdMax then 
                   Ids \* (exp(Vd/(N\*Vt)) - 1)
               else 
                   iVdMax + (Vd - VdMax) \* diVdMax);
                   /\* Lower half of reverse biased region including
                      breakdown. \*/
                   /\* Upper half of reverse biased region, and forward
                      biased region before conduction. \*/
                   /\* Forward biased region after conduction. \*/
    v = Vd + id \* Rs;
    i = id + v\*Gp;
end Diode_improved;

}}}
We are planning to add (i.e. additional to the existing diode models) this improved diode model in Modelica.Electrica.Analog.Semiconductors. It will be named Diode_improved.
We would like to discuss our plans here. Is anyone against adding this improved diode model?
Best regards
Kristin Majetta


----

**Reported by majetta on 6 Feb 2014 10:46 UTC**
The existing diode model in Modelica.Electrical.Analog.Semiconductors has some shortcomes:

 * it does not model reverse breakdown (this is done in the ZDiode model in the same package)
 * the  behaviour of the model is controlled by the physically-meaningless  parameter Maxexp, for which it is difficult to supply an apropriate  value
 * it does not model an internal series resistance

For  all these reasons Stefan Vorkoetter proposed an improved diode model  which addresses the mentioned shortcomes.The Modelica code of this model  is:

#!div style="font-size: 80%"

model Diode_improved "Improved diode model"
  import Modelica.SIunits;
  extends Modelica.Electrical.Analog.Interfaces.OnePort;
  parameter SIunits.Voltage Vf = 0.7 "Forward voltage";
  parameter SIunits.Current Ids = 1.e-13 "Reverse saturation current";
  parameter SIunits.Resistance Rs = 16 "Ohmic resistance";
  parameter SIunits.Voltage Vt = 0.026 "Thermal voltage (kT/q)";
  parameter Real N = 1 "Emission coefficient";
  parameter SIunits.Voltage Bv = 100 "Reverse breakdown voltage";
protected 
  parameter SIunits.Voltage VdMax = Vf + (N\*Vt) 
  "Linear continuation threshold";
  parameter SIunits.Voltage iVdMax = Ids \* (exp(VdMax/(N\*Vt)) - 1) 
  "Current at threshold";
  parameter SIunits.Conductance diVdMax = Ids \* exp(VdMax/(N\*Vt))/(N\*Vt) 
  "Conductance at threshold";
  SIunits.Voltage Vd "Voltage across pure diode part";
equation 
  i = smooth(1,
             if Vd < -Bv / 2 then 
                 -Ids \* (exp(-(Vd+Bv)/(N\*Vt)) + 1 - 2\*exp(-Bv/(2\*N*Vt)))
             elseif Vd < VdMax then 
                 Ids \* (exp(Vd/(N\*Vt)) - 1)
             else 
                 iVdMax + (Vd - VdMax) \* diVdMax);
                 /\* Lower half of reverse biased region including
                    breakdown. \*/
                 /\* Upper half of reverse biased region, and forward
                    biased region before conduction. \*/
                 /\* Forward biased region after conduction. \*/
  v = Vd + i \* Rs;
end Diode_improved;

}}}
Nevertheless this diode model also has a small shortcome. It has no parallel conductance in order to ensure a small currentflow when the diode is closed in order to avoid singularity. Therefore, compared to the diode model of Stefan Vorkoettter, we propose the following slightly improved diode model:

#!div style="font-size: 80%"
  {{{#!python
model Diode_improved "Improved diode model"
    import Modelica.SIunits;
    extends Modelica.Electrical.Analog.Interfaces.OnePort;
        parameter SIunits.Voltage Vf = 0.7 "Forward voltage";
    parameter SIunits.Current Ids = 1.e-13 "Reverse saturation current";
    parameter SIunits.Resistance Rs = 16 "Ohmic resistance";
    parameter SIunits.Voltage Vt = 0.026 "Thermal voltage (kT/q)";
    parameter Real N = 1 "Emission coefficient";
    parameter SIunits.Voltage Bv = 100 "Reverse breakdown voltage";
    parameter SIunits.Conductance Gp = 1e-6 
    "Parallel conductance for numerical stability";
protected 
    parameter SIunits.Voltage VdMax = Vf + (N\*Vt) 
    "Linear continuation threshold";
    parameter SIunits.Voltage iVdMax = Ids \* (exp(VdMax/(N\*Vt)) - 1) 
    "Current at threshold";
    parameter SIunits.Conductance diVdMax = Ids \* exp(VdMax/(N\*Vt))/(N\*Vt) 
    "Conductance at threshold";
    SIunits.Voltage Vd "Voltage across pure diode part";
    SIunits.Current id "diode current";
equation 
    id = smooth(1,
               if Vd < -Bv / 2 then 
                   -Ids \* (exp(-(Vd+Bv)/(N\*Vt)) + 1 - 2\*exp(-Bv/(2\*N*Vt)))
               elseif Vd < VdMax then 
                   Ids \* (exp(Vd/(N\*Vt)) - 1)
               else 
                   iVdMax + (Vd - VdMax) \* diVdMax);
                   /\* Lower half of reverse biased region including
                      breakdown. \*/
                   /\* Upper half of reverse biased region, and forward
                      biased region before conduction. \*/
                   /\* Forward biased region after conduction. \*/
    v = Vd + id \* Rs;
    i = id + v\*Gp;
end Diode_improved;

}}}
We are planning to add (i.e. additional to the existing diode models) this improved diode model in Modelica.Electrica.Analog.Semiconductors. It will be named Diode_improved.
We would like to discuss our plans here. Is anyone against adding this improved diode model?
Best regards
Kristin Majetta


----

Migrated-From: https://trac.modelica.org/Modelica/ticket/1413
@modelica-trac-importer modelica-trac-importer added discussion Discussion issue that it not necessarily related to a concrete bug or feature L: Electrical.Analog Issue addresses Modelica.Electrical.Analog labels Jan 14, 2017
@modelica-trac-importer
Copy link
Author

Modified by jmattsson on 18 Jun 2014 11:50 UTC

@modelica-trac-importer
Copy link
Author

Modified by dietmarw on 18 Jun 2014 16:00 UTC

@modelica-trac-importer
Copy link
Author

Comment by dietmarw on 18 Jun 2014 16:08 UTC
Namewise I would not go for such long name but keeping to the same principle that is already used in other places of the MSL, i.e., adding an increment to the name:

model Diode2 "Improved version of 'Diode' model"
...
end Diode2;

@modelica-trac-importer
Copy link
Author

Comment by majetta on 19 Jun 2014 05:49 UTC
I added the improved diode model called Diode2 to the trunk (3680448).

@modelica-trac-importer
Copy link
Author

Comment by beutlich on 19 Jun 2014 06:31 UTC
It's no longer undecided then.

@modelica-trac-importer modelica-trac-importer added this to the MSL3.2.2 milestone Jan 14, 2017
@modelica-trac-importer
Copy link
Author

Comment by beutlich on 6 Oct 2015 09:49 UTC
So it's fixed then, I suppose?

@modelica-trac-importer
Copy link
Author

Changelog modified by beutlich on 6 Oct 2015 09:49 UTC
Added an improved diode model (Modelica.Electrical.Analog.Semiconductors.Diode2)

@modelica-trac-importer
Copy link
Author

Modified by beutlich on 29 Oct 2015 15:02 UTC

@modelica-trac-importer modelica-trac-importer added enhancement New feature or enhancement and removed discussion Discussion issue that it not necessarily related to a concrete bug or feature labels Jan 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or enhancement L: Electrical.Analog Issue addresses Modelica.Electrical.Analog
Projects
None yet
Development

No branches or pull requests

2 participants