LTSpice - Is there a way to plot nonlinearity

Thread Starter

eblc1388

Joined Nov 28, 2008
1,542
The attached image shows the response of a diode through a temperature sweep. It appears to be linear.

Is there a way to plot the deviation of the response against a straight line of approximate the same slope? i.e. just to show the deviation or non-linearity?

I know I might be able to get that by using waveform arithmetic but I just can't seem to be able to use 'temp' as the x-axis variable in the calculation to get the deviation.

Thanks

 

Attachments

ifixit

Joined Nov 20, 2008
652
Hi eblc1388,

One method would be to use a behavioral model (bv) to plot a linear function close to the expected values and then compare with the actual diode characteristic. I used 20°C as a reference point where the two are assumed to be almost equal. Use 2mV per °C for the estimated perfect slope.

Have Fun,
Ifixit
 

Attachments

rapidcoder

Joined Jan 16, 2011
37
No, the original SPICE diode model does not have discontinuities in it. These bumps are caused by inacurracies of the LTSpice simulation engine, probably by running the NR loop too few times. Try to lower the RELTOL setting.
 

Thread Starter

eblc1388

Joined Nov 28, 2008
1,542
Thanks all for the fast response.

ifixit offers what I wanted as I would be reading the actual diode voltage and using a linear relationship to calculate the temperature. I need to know how linear is the diode voltage vs temperature and the non linearity error to decide if I need to apply any correction to the final calculated temperature.

Looks like the linearity is very good for all practical purposes.
 

rapidcoder

Joined Jan 16, 2011
37
The forward diode current is given by the formula:

I = IS(T) * (Exp(VD / (VT * N)) - 1)

where IS is the saturation current of the diode, dependent on the temperature according to the formula:

IS(T) = IS * Pow(T / TNOM, XTI / N) * Exp(q * EG * (T - TNOM) / (k * T * TNOM * N))

Because all the temperatures are in K, in the close neighbourhood of TNOM (300K) the characteristic is quite linear.
 
Top