Hello everyone,
There is some trouble I am having concerning the modeling of a PIN diode (code in the attachments), that would be nice if someone with some more knowledge could help. My approach has been to alter the PN diode code included in the example and let a Newton secs1d solver solve this (I have also tried Gummel, but I was advised that Newton works better for PIN), but unfortunately this hasn't produced any results yet. The PIN diode is supposed to be 180 um long with three segments of 60 um. I don't have a specific doping strength in mind so I took the values 1e16 for both the P and N parts as a start. Unfortunately my code still produces the following errors: >> newtonPIN warning: matrix singular to machine precision warning: called from secs1d_dd_newton at line 69 column 11 newtonPIN at line 121 column 28 error: bimu_bernoulli: invalid conversion from NaN to logical error: called from bimu_bernoulli at line 45 column 11 bim1a_advection_diffusion at line 99 column 13 secs1d_dd_newton>residual_jaco secs1d_dd_newton at line 83 column 22 newtonPIN at line 121 column 28 Thanks so much in advance, Best regards, Tijmen Kroezen Student Applied Physics TU Delft Heemraadssingel 245 3023CD Rotterdam t : +31 6 24 25 46 63 m : [hidden email][hidden email] _______________________________________________ Help-octave mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/help-octave newtonPIN.m (6K) Download Attachment |
> On 1 Nov 2017, at 15:17, Tijmen Kroezen <[hidden email]> wrote: > > Hello everyone, > > There is some trouble I am having concerning the modeling of a PIN diode (code in the attachments), that would be nice if someone with some more knowledge could help. > > My approach has been to alter the PN diode code included in the example and let a Newton secs1d solver solve this (I have also tried Gummel, but I was advised that Newton works better for PIN), but unfortunately this hasn't produced any results yet. The PIN diode is supposed to be 180 um long with three segments of 60 um. I don't have a specific doping strength in mind so I took the values 1e16 for both the P and N parts as a start. > > Unfortunately my code still produces the following errors: > > >> newtonPIN > warning: matrix singular to machine precision > warning: called from > secs1d_dd_newton at line 69 column 11 > newtonPIN at line 121 column 28 > error: bimu_bernoulli: invalid conversion from NaN to logical > error: called from > bimu_bernoulli at line 45 column 11 > bim1a_advection_diffusion at line 99 column 13 > secs1d_dd_newton>residual_jacobian at line 129 column 7 > secs1d_dd_newton at line 83 column 22 > newtonPIN at line 121 column 28 > > I have tried using a finer mesh, I am starting from zero bias, so I guess the only thing that might be the problem is my initial guess but I don't know what other guess to use. Does anyone have suggestions? > > Thanks so much in advance, > > Best regards, > Hi, Indeed your initial guess is inconsistent. You are imposing a weak p-type doping in the i region, therefore p = n = ni is not correct. I didn't have time yet to check whether this is the reason for the simulation failure. I also at first sight see some errors in the postprocessing: you are de-scaling nout, pout, etc. but your simulation output are called p, n, etc. Finally, if you use secs1d_dd_newton you do not need to compute the current densities by the difference formulas as the simulation already provides them as output (you do need to de-scale them though). Finally hoping to get solutions within a tolerance of 1e-12 sounds a bit optimistic in this case, I'd rather use something in the order of 1e-4 ~ 1e-6. That is expressed in multiples of Vth so that means hundreds of microvolts to nanovolts. HTH, c. _______________________________________________ Help-octave mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/help-octave |
> On 2 Nov 2017, at 10:44, Carlo De Falco <[hidden email]> wrote: > > Hi, Indeed your initial guess is inconsistent. > > You are imposing a weak p-type doping in the i region, therefore p = n = ni is not correct. > I didn't have time yet to check whether this is the reason for the simulation failure. One way to set a consistent guess would be for example % initial guess for n, p, V, phin, phip V_p = -.1; V_n = 0; Fp = V_p * (D<0); Fn = Fp; pp = (D < 0) .* (- D + sqrt (D .^ 2 + 4 * ni ^ 2)) / 2; pn = (D > 0) .* ni^2 ./ ((D + sqrt (D .^ 2 + 4 * ni ^ 2)) / 2); p0 = (D == 0) .* ni .* ones (size (x)); p = pp + pn + p0; np = (D < 0) .* ni^2 ./ ((- D + sqrt (D .^ 2 + 4 * ni ^ 2)) / 2); nn = (D > 0) .* (D + sqrt (D .^ 2 + 4 * ni ^ 2)) / 2; n0 = (D == 0) .* ni .* ones (size (x)); n = np + nn + n0; V = Fn + Vth * log (n / ni); HTH, c. _______________________________________________ Help-octave mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/help-octave |
In reply to this post by tkroezen
On 01/11/17 14:17, Tijmen Kroezen
wrote:
Not necessarily Octaveable but have you looked at any spice models for inspiration? I used spice to model PIN diodes as part of ultra high speed ECL 28 years ago ( the models may have been developed in-house) but they worked well enough. Tom _______________________________________________ Help-octave mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/help-octave |
Hi,
> On 2 Nov 2017, at 10:55, Tom <[hidden email]> wrote: > > Not necessarily Octaveable but have you looked at any spice models for inspiration? I used spice to model PIN diodes as part of ultra high speed ECL 28 years ago ( the models may have been developed in-house) but they worked well enough. > What secs1d and spice do are not comparable. secs1d is a package TCAD simulation: https://en.wikipedia.org/wiki/Technology_CAD while spice is for lumped element circuit simulation: https://en.wikipedia.org/wiki/Electronic_circuit_simulation spice compares rather to the ocs package than to secs1d. A free software alternative to secs{1,2,3}d packages would be GNU Archimedes: https://www.gnu.org/software/archimedes/ I never tried it, though, I just found out about its existence while looking up TCAD on wikipedia for providing the link above, but I do know the lead developer ... > Tom c. _______________________________________________ Help-octave mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/help-octave |
In reply to this post by Carlo de Falco-2
Hi Carlo, Thanks for
your reply! I have some results to analyze and work with now. Could you
perhaps elaborate a bit further on why did you suggested: V_p = -.1 ; ? I was of the understanding that V_p and V_n were the positive and negative contact voltages but is this incorrect? Thanks so much sir, TijmenOn Thu, Nov 2, 2017 at 10:51 AM, Carlo De Falco <[hidden email]> wrote:
-- Met vriendelijke groet, Tijmen Kroezen Student Applied Physics TU Delft Heemraadssingel 245 3023CD Rotterdam t : +31 6 24 25 46 63 m : [hidden email][hidden email] _______________________________________________ Help-octave mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/help-octave |
> On 2 Nov 2017, at 15:12, Tijmen Kroezen <[hidden email]> wrote: > > Hi Carlo, > > Thanks for your reply! I have some results to analyze and work with now. Could you perhaps elaborate a bit further on why did you suggested: > > V_p = -.1 ; ? > that is just an example of a non-zero bias, with V_p = V_n = 0 both quasi-Fermi levels are everywhere 0 and it is less informative to look at the initial guess. > I was of the understanding that V_p and V_n were the positive and negative contact voltages but is this incorrect? your understanding was correct, you can set V_p to any value but if you start with a strong positive or negative bias convergence may be difficult. Your idea of starting from thermal equilibrium, i.e. V_p = V_n = 0, is correct. You should then apply small bias steps by modifying the the fermi levels you obtain from the simulation and adapting the electric potential so that Maxwell-Boltzmann statistics are satisfied. > > Thanks so much sir, > > Tijmen c. _______________________________________________ Help-octave mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/help-octave |
Free forum by Nabble | Edit this page |