I'm working on a project using some 5mm through-hole LEDs that I purchased. I want to simulate my circuit in LTspice before soldering it. However, none of the built-in LEDs in LTspice are close to the ones that I have.
I have measured some IV sample data. For example, this is the from the 5mm green LED: V1 = 2.61, I1 = 5mA; V2 = 2.46, I2 = 2.5mA; V3 = 2.24, I3 = 0.28mA; V4 = 2.14, I4 = 29uA; V5 = 2.03, I5 = 3.0uA.
I want to compute the model parameters and add them to the "standard.dio" file. This is an example of a built-in LED: ".model NSCW100 D(Is=16.88n Rs=8.163 N=9.626 Cjo=42p Xti=200 Iave=30m Vpk=5 mfg=Nichia type=LED)".
With the Shockley diode equation, and 3 measured IV samples, I can compute Is, Rs and N. I have two questions: (1) How to do regression analysis with more than 3 samples? My maths knowledge only allows me to solve a linear model, but the Shockley diode equation is nonlinear. (2) Are there any existing tools or websites that compute this? If no, I'd like to make my wheel.