Algorithm 1.
1: function fitModel({DataSet}, {initParams}) |
2: if "rectifier" in {DataSet} then |
3: (E, v0, v1) ← fitVoltageRectifier(Vc, Iss) |
4: g0 ← fitConductance(v, E, maxϕ(Ip)) |
5: if"recovery" in {DataSet} then |
6: Gr0 ← fitPeakRecovery(tp, Ip) |
7: (Gd(1,2), [Gf0, Gb0]) ← fitOffCurves({Iϕ[toff:]}) |
8: (ϕm, k(1,2), p, [Gr1, Gf0, kf, q, Gb0, kb, γ, Go(1,2)]) |
← fitOnCurves({Iϕ[ton : toff]}) |
9: if postFitOptimization is True then |
10: ({All parameters}) ← fitCurves({Iϕ}) |