04-16-2014 08:48 PM
Hi All,
I am now trying to build a Spice model for a type of high-voltage LED for Multisim 13. Because I do not have electronic parameters of the LED, and I only have the I-V function of it, I tried to write a .subckt file for it.
Assuming the anode is A1 and cathode is A2, the current through the LED can be expressed as by the function:
I=((0.581*(V(A1)-V(A2))*(V(A1)-V(A2))/3/3-18.4*(V(A1)-V(A2))/3+144.66)/1000)*U((V(A1)-V(A2))-53)
With it, I wrote a .subckt:
.SUBCKT LED A1 A2
B1 A1 A2 I=((0.581*(V(A1)-V(A2))*(V(A1)-V(A2))/3/3-18.4*(V(A1)-V(A2))/3+144.66)/1000)*U((V(A1)-V(A2))-53)
.ENDS LED
This model works well under IV analyzer in Multisim 13, but when I connect 2 or 3 of them in series and run a simple circuit simulation, I always get error report and always failed to fix the error.
Can any body help me check if my .subckt is correct or not? Thank you.
Solved! Go to Solution.
04-17-2014 08:58 AM
Please post the circuit with the error.
04-17-2014 09:11 AM
Hi Tien,
This is the circuit, it is just a simple AC LED circuit.
The error is
Thanks. Is there anything wrong with the .subckt script?
04-17-2014 09:15 AM
Save the Multisim file and attach it to your post there are settings in your file doesn't doesn't appear in a screen shot.
04-17-2014 10:12 AM - edited 04-17-2014 10:13 AM
Hi Tien, this is the Multisim file. The LEDs are built by the .subckt script:
.SUBCKT SAW8K A1 A2
B1 A1 A2 I=((0.581*(V(A1)-V(A2))*(V(A1)-V(A2))/3/3-18.4*(V(A1)-V(A2))/3+144.66)/1000)*U((V(A1)-V(A2))-53)
.ENDS SAW8K
The U() function is a step function.
Thank you very much.
04-17-2014 10:14 AM
Considering that with real, physical devices, all the LEDs would be destroyed on the first cycle of the input signal, It is not too surprising that the simulation might have problems also.
Although your formula has a much slower increase in current than the typical exponential relationship, the peak power in one LED is over 70 watts.
Lynn
04-17-2014 10:16 AM
Hi Lynn,
The LED model is for high-voltage LEDs, with typical forward voltage @ 66V and current 20mA. The LED turns on at 53V. Thanks.
04-23-2014 02:48 PM
It looks like the convergence error is caused by a discontinuity across the diode at about 53V. Run DC sweep using the test circuit.
To prevent the discontinuity, use the following express with the if function instead. You can give it a small current when V (A1, A2) is less than 0V.
B1 A1 A2 I=if(((V(A1)-V(A2))-51)>0,((0.581*(V(A1)-V(A2))*(V(A1)-V(A2))/3/3-18.4*(V(A1)-V(A2))/3+144.66)/1000),-230u)
The attached circuit have a resistor to help convergence.
You may want to simplify your expression for readability:
- (V(A1)-V(A2)) = V(A1,A2)
- if you can make the expression in this form it will simply the calculation ax^2 + bx + c
04-24-2014 10:33 AM
Hi Tien,
Thank you so much for this. It works well in the Multisim. Thank you.
Jianchuan