Forums

Improved Diode Recovery Model

Started by Tim Williams September 24, 2017
https://docs.google.com/viewer?a=v&pid=sites&srcid=ZGVmYXVsdGRvbWFpbnxyc3RldmVzY290dHxneDo1NjQ1ZTI1ZTY2MWFiM2Yz

This had been discussed some time ago.  There was a lot of bragging about 
being able to create a model, but nothing came of it.  Fortunately, this guy 
had beaten us to the punch, and released this paper publically.

The design with multiple time constants makes me think of approximating 
diffusion with a series of poles.  Seems reasonable.

Also seems reasonable that you might make those nonlinear or interdependent, 
to better model nonlinear recovery and charge transport phenomena.  Still a 
hack, yes, but a means towards simulating it in SPICE at all?  Nice.

Tim

-- 
Seven Transistor Labs, LLC
Electrical Engineering Consultation and Contract Design
Website: http://seventransistorlabs.com 

On Sun, 24 Sep 2017 01:46:20 -0500, "Tim Williams"
<tmoranwms@gmail.com> wrote:

>https://docs.google.com/viewer?a=v&pid=sites&srcid=ZGVmYXVsdGRvbWFpbnxyc3RldmVzY290dHxneDo1NjQ1ZTI1ZTY2MWFiM2Yz > >This had been discussed some time ago. There was a lot of bragging about >being able to create a model, but nothing came of it. Fortunately, this guy >had beaten us to the punch, and released this paper publically. > >The design with multiple time constants makes me think of approximating >diffusion with a series of poles. Seems reasonable. > >Also seems reasonable that you might make those nonlinear or interdependent, >to better model nonlinear recovery and charge transport phenomena. Still a >hack, yes, but a means towards simulating it in SPICE at all? Nice. > >Tim
You're way behind. I found that paper on December 14, 2014. I have exactly 50 papers on the subject at the moment. Before I fell ill I was trying to parameterize a model I had working, but that required guessing the coefficients. Maybe it's time to resume pursuit. ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | STV, Queen Creek, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I'm looking for work... see my website. Thinking outside the box...producing elegant & economic solutions.
On 09/24/2017 02:46 AM, Tim Williams wrote:
> https://docs.google.com/viewer?a=v&pid=sites&srcid=ZGVmYXVsdGRvbWFpbnxyc3RldmVzY290dHxneDo1NjQ1ZTI1ZTY2MWFiM2Yz > > > This had been discussed some time ago.&nbsp; There was a lot of bragging > about being able to create a model, but nothing came of it. > Fortunately, this guy had beaten us to the punch, and released this > paper publically. > > The design with multiple time constants makes me think of approximating > diffusion with a series of poles.&nbsp; Seems reasonable. > > Also seems reasonable that you might make those nonlinear or > interdependent, to better model nonlinear recovery and charge transport > phenomena.&nbsp; Still a hack, yes, but a means towards simulating it in > SPICE at all?&nbsp; Nice. > > Tim >
The reverse recovery current probably varies as erf(t) (error function), not atanh(t). atanh(t) is a decent approximation to erf(t) over a small portion of the domain but the tail behavior is much different. Also there are better numerical approximations to erf(t) itself that require fewer computations than atanh
On Mon, 25 Sep 2017 02:04:15 -0400, bitrex
<bitrex@de.lete.earthlink.net> wrote:

>On 09/24/2017 02:46 AM, Tim Williams wrote: >> https://docs.google.com/viewer?a=v&pid=sites&srcid=ZGVmYXVsdGRvbWFpbnxyc3RldmVzY290dHxneDo1NjQ1ZTI1ZTY2MWFiM2Yz >> >> >> This had been discussed some time ago.&#2013266080; There was a lot of bragging >> about being able to create a model, but nothing came of it. >> Fortunately, this guy had beaten us to the punch, and released this >> paper publically. >> >> The design with multiple time constants makes me think of approximating >> diffusion with a series of poles.&#2013266080; Seems reasonable. >> >> Also seems reasonable that you might make those nonlinear or >> interdependent, to better model nonlinear recovery and charge transport >> phenomena.&#2013266080; Still a hack, yes, but a means towards simulating it in >> SPICE at all?&#2013266080; Nice. >> >> Tim >> > >The reverse recovery current probably varies as erf(t) (error function), >not atanh(t). atanh(t) is a decent approximation to erf(t) over a small >portion of the domain but the tail behavior is much different. Also >there are better numerical approximations to erf(t) itself that require >fewer computations than atanh
Hmmmm? Simply... ATANH(x) = 0.5*LOGe((1+x)/(1-x)) ATANH)x) is usually recognized by most simulators. So far I've found that only TopSpice requires using the above equation. ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | STV, Queen Creek, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I'm looking for work... see my website. Thinking outside the box...producing elegant & economic solutions.
On 09/25/2017 03:50 PM, Jim Thompson wrote:
> On Mon, 25 Sep 2017 02:04:15 -0400, bitrex > <bitrex@de.lete.earthlink.net> wrote: > >> On 09/24/2017 02:46 AM, Tim Williams wrote: >>> https://docs.google.com/viewer?a=v&pid=sites&srcid=ZGVmYXVsdGRvbWFpbnxyc3RldmVzY290dHxneDo1NjQ1ZTI1ZTY2MWFiM2Yz >>> >>> >>> This had been discussed some time ago.&nbsp; There was a lot of bragging >>> about being able to create a model, but nothing came of it. >>> Fortunately, this guy had beaten us to the punch, and released this >>> paper publically. >>> >>> The design with multiple time constants makes me think of approximating >>> diffusion with a series of poles.&nbsp; Seems reasonable. >>> >>> Also seems reasonable that you might make those nonlinear or >>> interdependent, to better model nonlinear recovery and charge transport >>> phenomena.&nbsp; Still a hack, yes, but a means towards simulating it in >>> SPICE at all?&nbsp; Nice. >>> >>> Tim >>> >> >> The reverse recovery current probably varies as erf(t) (error function), >> not atanh(t). atanh(t) is a decent approximation to erf(t) over a small >> portion of the domain but the tail behavior is much different. Also >> there are better numerical approximations to erf(t) itself that require >> fewer computations than atanh > > Hmmmm? Simply... > > ATANH(x) = 0.5*LOGe((1+x)/(1-x)) > > ATANH)x) is usually recognized by most simulators. So far I've found > that only TopSpice requires using the above equation. > > ...Jim Thompson >
If performance is a big concern one would want to avoid expressions like (1 + x)/(1 - x) in certain domains, because for values of x close to 1 processors have to apply certain "hax" to ensure you don't get a divide-by-zero exception. The FPU logic has to switch over to "denormal" numbers which are sometimes implemented in hardware, sometimes software, sometimes a combination but always run slower than the native FPU execution speed would be when calculating with "normal" floats. Only when working with denormals is one guaranteed that when subtracting two floats one will get a non-zero result. <https://en.wikipedia.org/wiki/Denormal_number#Performance_issues>
On 09/25/2017 05:15 PM, bitrex wrote:
> On 09/25/2017 03:50 PM, Jim Thompson wrote: >> On Mon, 25 Sep 2017 02:04:15 -0400, bitrex >> <bitrex@de.lete.earthlink.net> wrote: >> >>> On 09/24/2017 02:46 AM, Tim Williams wrote: >>>> https://docs.google.com/viewer?a=v&pid=sites&srcid=ZGVmYXVsdGRvbWFpbnxyc3RldmVzY290dHxneDo1NjQ1ZTI1ZTY2MWFiM2Yz >>>> >>>> >>>> >>>> This had been discussed some time ago.&nbsp; There was a lot of bragging >>>> about being able to create a model, but nothing came of it. >>>> Fortunately, this guy had beaten us to the punch, and released this >>>> paper publically. >>>> >>>> The design with multiple time constants makes me think of approximating >>>> diffusion with a series of poles.&nbsp; Seems reasonable. >>>> >>>> Also seems reasonable that you might make those nonlinear or >>>> interdependent, to better model nonlinear recovery and charge transport >>>> phenomena.&nbsp; Still a hack, yes, but a means towards simulating it in >>>> SPICE at all?&nbsp; Nice. >>>> >>>> Tim >>>> >>> >>> The reverse recovery current probably varies as erf(t) (error function), >>> not atanh(t). atanh(t) is a decent approximation to erf(t) over a small >>> portion of the domain but the tail behavior is much different. Also >>> there are better numerical approximations to erf(t) itself that require >>> fewer computations than atanh >> >> Hmmmm?&nbsp; Simply... >> >> ATANH(x) = 0.5*LOGe((1+x)/(1-x)) >> >> ATANH)x) is usually recognized by most simulators.&nbsp; So far I've found >> that only TopSpice requires using the above equation. >> >> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...Jim Thompson >> > > If performance is a big concern one would want to avoid expressions like > (1 + x)/(1 - x) in certain domains, because for values of x close to 1 > processors have to apply certain "hax" to ensure you don't get a > divide-by-zero exception. The FPU logic has to switch over to "denormal" > numbers which are sometimes implemented in hardware, sometimes software, > sometimes a combination but always run slower than the native FPU > execution speed would be when calculating with "normal" floats. Only > when working with denormals is one guaranteed that when subtracting two > floats one will get a non-zero result. > > <https://en.wikipedia.org/wiki/Denormal_number#Performance_issues> >
The error function is itself a good approximation to atanh, and a good approximation to the error function is: 1 - 1/([1 + a*x + b*x^2 + c*x^3 + d*x^4)^4] with a = 0.278393, b = 0.230389, c = 0.000972, d = 0.078108. This is mad fast on any modern superscalar processor
On 09/25/2017 05:23 PM, bitrex wrote:
> On 09/25/2017 05:15 PM, bitrex wrote: >> On 09/25/2017 03:50 PM, Jim Thompson wrote: >>> On Mon, 25 Sep 2017 02:04:15 -0400, bitrex >>> <bitrex@de.lete.earthlink.net> wrote: >>> >>>> On 09/24/2017 02:46 AM, Tim Williams wrote: >>>>> https://docs.google.com/viewer?a=v&pid=sites&srcid=ZGVmYXVsdGRvbWFpbnxyc3RldmVzY290dHxneDo1NjQ1ZTI1ZTY2MWFiM2Yz >>>>> >>>>> >>>>> >>>>> This had been discussed some time ago.&nbsp; There was a lot of bragging >>>>> about being able to create a model, but nothing came of it. >>>>> Fortunately, this guy had beaten us to the punch, and released this >>>>> paper publically. >>>>> >>>>> The design with multiple time constants makes me think of >>>>> approximating >>>>> diffusion with a series of poles.&nbsp; Seems reasonable. >>>>> >>>>> Also seems reasonable that you might make those nonlinear or >>>>> interdependent, to better model nonlinear recovery and charge >>>>> transport >>>>> phenomena.&nbsp; Still a hack, yes, but a means towards simulating it in >>>>> SPICE at all?&nbsp; Nice. >>>>> >>>>> Tim >>>>> >>>> >>>> The reverse recovery current probably varies as erf(t) (error >>>> function), >>>> not atanh(t). atanh(t) is a decent approximation to erf(t) over a small >>>> portion of the domain but the tail behavior is much different. Also >>>> there are better numerical approximations to erf(t) itself that require >>>> fewer computations than atanh >>> >>> Hmmmm?&nbsp; Simply... >>> >>> ATANH(x) = 0.5*LOGe((1+x)/(1-x)) >>> >>> ATANH)x) is usually recognized by most simulators.&nbsp; So far I've found >>> that only TopSpice requires using the above equation. >>> >>> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...Jim Thompson >>> >> >> If performance is a big concern one would want to avoid expressions >> like (1 + x)/(1 - x) in certain domains, because for values of x close >> to 1 processors have to apply certain "hax" to ensure you don't get a >> divide-by-zero exception. The FPU logic has to switch over to >> "denormal" numbers which are sometimes implemented in hardware, >> sometimes software, sometimes a combination but always run slower than >> the native FPU execution speed would be when calculating with "normal" >> floats. Only when working with denormals is one guaranteed that when >> subtracting two floats one will get a non-zero result. >> >> <https://en.wikipedia.org/wiki/Denormal_number#Performance_issues> >> > > The error function is itself a good approximation to atanh, and a good > approximation to the error function is: > > 1 - 1/([1 + a*x + b*x^2 + c*x^3 + d*x^4)^4] with a = 0.278393, b = > 0.230389, c = 0.000972, d = 0.078108. This is mad fast on any modern > superscalar processor >
Though IIRC you have to scale your argument by a constant
On Mon, 25 Sep 2017 17:15:02 -0400, bitrex
<bitrex@de.lete.earthlink.net> wrote:

>On 09/25/2017 03:50 PM, Jim Thompson wrote: >> On Mon, 25 Sep 2017 02:04:15 -0400, bitrex >> <bitrex@de.lete.earthlink.net> wrote: >> >>> On 09/24/2017 02:46 AM, Tim Williams wrote: >>>> https://docs.google.com/viewer?a=v&pid=sites&srcid=ZGVmYXVsdGRvbWFpbnxyc3RldmVzY290dHxneDo1NjQ1ZTI1ZTY2MWFiM2Yz >>>> >>>> >>>> This had been discussed some time ago.&#2013266080; There was a lot of bragging >>>> about being able to create a model, but nothing came of it. >>>> Fortunately, this guy had beaten us to the punch, and released this >>>> paper publically. >>>> >>>> The design with multiple time constants makes me think of approximating >>>> diffusion with a series of poles.&#2013266080; Seems reasonable. >>>> >>>> Also seems reasonable that you might make those nonlinear or >>>> interdependent, to better model nonlinear recovery and charge transport >>>> phenomena.&#2013266080; Still a hack, yes, but a means towards simulating it in >>>> SPICE at all?&#2013266080; Nice. >>>> >>>> Tim >>>> >>> >>> The reverse recovery current probably varies as erf(t) (error function), >>> not atanh(t). atanh(t) is a decent approximation to erf(t) over a small >>> portion of the domain but the tail behavior is much different. Also >>> there are better numerical approximations to erf(t) itself that require >>> fewer computations than atanh >> >> Hmmmm? Simply... >> >> ATANH(x) = 0.5*LOGe((1+x)/(1-x)) >> >> ATANH)x) is usually recognized by most simulators. So far I've found >> that only TopSpice requires using the above equation. >> >> ...Jim Thompson >> > >If performance is a big concern one would want to avoid expressions like >(1 + x)/(1 - x) in certain domains, because for values of x close to 1 >processors have to apply certain "hax" to ensure you don't get a >divide-by-zero exception. The FPU logic has to switch over to "denormal" >numbers which are sometimes implemented in hardware, sometimes software, >sometimes a combination but always run slower than the native FPU >execution speed would be when calculating with "normal" floats. Only >when working with denormals is one guaranteed that when subtracting two >floats one will get a non-zero result. > ><https://en.wikipedia.org/wiki/Denormal_number#Performance_issues> >
I don't use ATANH(x) _within_ a transient analysis... it's guaranteed to blow up when the simulator "hunts and pecks".... I only use it to preset model coefficients. But it would be simple enough to modify to enforce bounds. ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | STV, Queen Creek, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I'm looking for work... see my website. Thinking outside the box...producing elegant & economic solutions.