Keyboard Shortcuts
Likes
- LTspice
- Messages
Search
Re: How to simulate the gate charge characteristic given in the datasheet of a mosfet?
Hi all,
Mmmm .... I can't find any of these files. I'm in ????? /g/LTspice/files/Temp??
and have found and downloaded many files from this source.?
Any ideas ???
Ian
?
? |
Re: How to simulate the gate charge characteristic given in the datasheet of a mosfet?
开云体育A very clear explanation. On 2025-04-07 19:58, Dennis wrote:
--
OOO - Own Opinions only If something is true: * as far as we know - it's science *for certain - it's mathematics *unquestionably - it's religion |
Re: How to simulate the gate charge characteristic given in the datasheet of a mosfet?
Dear Dennis,
?
Thank you so very much for such an insightful and beautiful explanation. I will be under your debt forever. I have a follow-up query though and it is as follows:
You mention>> "I think I should point out that the pulse duration is not important for this test in a simulation. It is important for real parts that dissipate power during the test to ensure they do not overheat." I forgot to write the reason behind why I want to do this simulation. The thing is I want to know the exact gate charge at my operating condition (a particular value of VGS and VDS), so that I can calculate the Rg needed in the gate drive circuit to run my hardware. Similarly, I also want to learn how I may obtain Eon and Eoff values for any particular MOSFET so that I may design the snubber circuit accurately and do the converter efficiency analysis in PLECS. It asks for these values (Eon and Eoff). Further, I tried to look for open source simulation examples on how to find reverse recovery losses of any diode, however, I was unable to find anything on this. I would be grateful if you may teach me these things too. With regards, Ankit |
Re: How to simulate the gate charge characteristic given in the datasheet of a mosfet?
On Sun, Apr 6, 2025 at 02:34 PM, <ankitk.ace@...> wrote:
only IG = Constant is mentioned and nothing about the pulse duration. I think I should point out that the pulse duration is not important for this test in a simulation. It is important for real parts that dissipate power during the test to ensure they do not overheat. The pulse width an duty cycle must be limited to ensure the parts do not go up in smoke.
?
For my circuit the pulse width is set to 1 second, i.e. much longer than the total simulation time, so that a constant current is applied to gate (after the rise time of 1 ps) for the entire simulation. The end of the simulation is effectively the end of the pulse of current applied to the gate.
?
HTH |
Re: How to simulate the gate charge characteristic given in the datasheet of a mosfet?
On Sun, Apr 6, 2025 at 02:34 PM, <ankitk.ace@...> wrote:
It would be helpful if you can suggest something foolproof that can help in overcoming such scenarios. I don't think there is anything foolproof but I will try to explain the working of the circuit.
?
It applies a constant current to the gate of the MOSFET. The x-axis displays the product of that constant current and the simulation time, which is the total charge on the gate at that time. The maximum x-axis value is the product of the applied current and the simulation end time. For my 2n7002 it was 1 uA x 1 ms = 1 nAs = 1 nC. You can adjust the either or both the applied gate current or the total simulation time.
?
The voltage source V1 applies the stated Vds test voltage. The current source I1 applies the stated Id test current. These values are almost always given as notes on the gate charge plots or detailed in the specifications for total gate charge.
?
Lets take your third MOSFET the Infineon IPW80R360P7 as an example. If you look at the notes associated with Diagram 10 is says Id is 5.6 A during their test. This is the value that you must set for I1. They also show two curves with different Vds voltages applied, 120 V and 640 V. These are the values you would use for V1. You can run two separate simulations, one for each of the applied drain voltages they have stated, or you could step the voltage by adding a ".step V1 list 120 640" statement to the circuit to plot both curves at the same time.
?
Also notice that the maximum gate charge on the x-axis is 40 nC, so you will need to increase the gate current from 1 uA to 40 uA, or alternatively increase the simulation time from 1 ms to 40 ms, or you can select any other combination such that the product of the gate current and simulation time is 40 nC, for example 10 uA and 4 ms also gives a maximum x-axis value of 40 nC.
?
Similarly for your MOSFET number 5 the required information is given as the test conditions for the total gate charge specification on page 2. There Id is 16.5 A and Vds is 520 V. As you noted, they have specified the gate current as 3 mA in the gate charge test circuit in figure 18. Given that and the fact the highest x-axis value needed for their plot is 120 nC you can get the maximum simulation time of 120 nC / 3 mA = 40 us.
?
If you examine their gate charge test circuit you will see that the upper mosfet (and associated parts) is used as a current regulator (which must be adjusted to the correct value, 16.5 A in this case, by adjusting the 50K pot). This is the same function as I1 and D1 in my test circuit which form an ideal current limiter. The other components are current sample resistors labeled Ig and Id which would be used to measure the gate and drain currents in a real circuit. These components are not needed in a spice simulation since we can directly probe the gate and drain currents. Aside from that they have Vds which is the same as my V1 which applies the stated Vds test condition, and the current source that drives a constant current pulse into the gate the same as Igate in my circuit.
?
So to use my circuit you need to replace the 2n7002 MOSFET with the MOSFET your are investigating, then set I1 to the Id test condition current, and V1 to the Vds test condition voltage. Finally, select a combination of the magnitude of the applied gate current and the total simulation time such that their product is equal to the maximum x-axis charge you need to plot. Then set the value for I2 (or on state current) of Igate to the selected gate current and the simulation end time on the .tran statement to the selected total simulation time.
?
HTH
?
? |
Re: Simulation runs very slowly: test.asc
Actually, these messages are a red flag. They mean that your model might not work as expected.
?
Model makers frequently resort to diodes with very small emission coefficients in order to create diodes with very small forward voltages, e.g. close to zero.
(It would be far better to use the LTspice ideal diode, but then the model would be limited to LTspice.)
?
This can cause numerical problems, resulting in infinity or NaN. It also makes it extremely hard for the Newton iteration to converge. A long time ago, after spending a lot of time debugging a corresponding problem, we decided to not allow this, but instead impose a limit of 0.1. That was a mistake, because it breaks too many models. Latest LTspice imposes no limit anymore, just issues a warning, just like LTspiceXVII.
?
Best Regards,
Mathias ?
?
On Sun, Apr 6, 2025 at 08:22 PM, Andy I wrote:
|
Re: Simulation runs very slowly: test.asc
开云体育Ah, Rene. Welcome to planet engineering, where ambiguity is less than useful. Andy provided a clear example of how d/s might be otherwise
interpreted, which ambiguity would have been easily avoided by
abbreviating "datasheet" to "dtasht" if six extra characters were
just too much to type, saving at least three messages and even
saved you an entire 'nother message. Donald. On 4/6/25 09:18, Rene via groups.io
wrote:
|
Re: Simulation runs very slowly: test.asc
I fixed that in in the updated model. Christopher saw it again because the hard-coded symbol overrode the .lib directive. -- Regards, Tony On 6 April 2025 20:12:04 CEST, "Andy I via groups.io" <AI.egrps+io@...> wrote:
--<br>Regards,<br>Tony<br> |
Re: How to simulate the gate charge characteristic given in the datasheet of a mosfet?
Hello Dennis,
?
Thank you so very much for sharing your mosfet gate charge file. It is extremely useful for beginners like me. However, certain manufacturers are very clever and do not provide complete details. Some of the examples are:
1) MOSFET : If you go to figure 15 (Test circuit for gate charge behavior) in this datasheet, only IG = Constant is mentioned and nothing about the pulse duration. The current source has also been implemented using a linear regulator, I believe. 2) MOSFET : Here, in figure 13 (Gate Charge Test Circuit & Waveform), again IG = Constant is the only thing that is mentioned. Nothing about pulse width duration.
3) MOSFET : Only the typical gate charge curve is provided in Diagram 10 (page 8). Nothing at all about how to implement the circuit or simulation.
4) MOSFET : Again, figure 2-1 (Gate Charge Measurement Circuit) provides incomplete information. IG = Constant, but how much should be the amplitude of the pulse? How much should be the ON time of the pulse? How much should be the pulse duration? 5) MOSFET : Here the gate charge characteristics have been plotted in figure 7 (Typical Gate Charge vs. Gate-to-Source Voltage), however, there's no mention of the value of current current for which these characteristics were obtained. And if you go further to figure 18 (Gate Charge Test Circuit) amplitude of the pulse is mentioned (3 mA), but again the remaining information is missing. 6) MOSFET : Again, only the typical gate charge curve is available in Diagram 10 (page 9), and nothing about how to implement the circuit. There may be many more similar or different cases where the information is incomplete in several different manners. It would be helpful if you can suggest something foolproof that can help in overcoming such scenarios. With Regards, Ankit |
Re: Simulation runs very slowly: test.asc
开云体育I’m using LTspice 17.1.14. Not worried about pursuing this further if I don’t need to be. Thanks for all the help. ? From: [email protected] <[email protected]> On Behalf Of Andy I via groups.io
Sent: Sunday, April 6, 2025 2:22 PM To: [email protected] Subject: Re: [LTspice] Simulation runs very slowly: test.asc ? On Sun, Apr 6, 2025 at 01:19 PM, Christopher Paul wrote:
To clarify -- ? Not one of those is an error message. ? The first four are status messages saying that the diode's N coefficient value was limited by LTspice.? The fifth line is a status message saying that one of LTspice's simulation phases succeeded.? There was no error - though some might say that the first four suggest that something was wrong with the original model.? That point could be debated. ? If you downgrade to a suitably old LTspice version (perhaps v17.0.* or older), those four warnings ab out the Emission Coefficient would go away, and LTspice would use the incredibly small value for N.? Would it make a difference?? I have no idea. ? Andy ? |
Re: Simulation runs very slowly: test.asc
On Sun, Apr 6, 2025 at 01:19 PM, Christopher Paul wrote:
To clarify --
?
Not one of those is an error message.
?
The first four are status messages saying that the diode's N coefficient value was limited by LTspice.? The fifth line is a status message saying that one of LTspice's simulation phases succeeded.? There was no error - though some might say that the first four suggest that something was wrong with the original model.? That point could be debated.
?
If you downgrade to a suitably old LTspice version (perhaps v17.0.* or older), those four warnings about the Emission Coefficient would go away, and LTspice would use the incredibly small value for N.? Would it make a difference?? I have no idea.
?
Andy
? |
Re: Simulation runs very slowly: test.asc
开云体育Thanks Andy, for the explanation. ? I’ll look again. Those three commands did come up, but when I did a control F and entered round, nothing came up. I’ll look again. ? From: [email protected] <[email protected]> On Behalf Of Andy I via groups.io
Sent: Sunday, April 6, 2025 2:12 PM To: [email protected] Subject: Re: [LTspice] Simulation runs very slowly: test.asc ? On Sun, Apr 6, 2025 at 01:19 PM, Christopher Paul wrote:
Those error messages will continue.? It concerns a diode parameter N, which had been set to an extremely small value.? Until recently, that was accepted by LTspice despite being unreasonably small.? In newer versions, LTspice complains and limits it to >= 0.1. ? Why was the model's N set to such a small value?? Sometimes, the people who make SPICE models use diodes to help construct other elements that have voltage dependencies but are not actual diodes.? I have seen this done to make voltage-dependent capacitors. ? One might argue that Analog Device's decision to limit N was an unwise choice, given the fact that many SPICE models over time have been built that way.? But now we are stuck with it. ? ? ? ?
Are you sure?? The "round()" function is documented in a few places, including the Help pages for Waveform Arithmetic, for B-sources, and for the .PARAM command.? It is like it sounds; it rounds a real number to the closest integer. ? Here, it is being used to truncate a number to having fewer significant digits.? Multiply the number by 1e4. find the nearest integer, then divide it by 1e4.? All digits past the 4th after the decimal point are turned to zeros, and thus are omitted. ? Andy ? |
Re: Simulation runs very slowly: test.asc
开云体育Hi Tony, thanks. ? ??????????? I extracted your zip file into a folder and ran your .asc from there. Would you still recommend your 1st paragraph to fix the problem? ? ??????????? “The ideal current source causes the LM317A come out of regulation because the output voltage is too low.” ??????????????? I don’t understand. I would think that as long as IN – OUT exceeds 5V and OUT = ?ADJ + 1.25V, the LM317 should operate properly. This is the case in my original circuit. That ADJ is at a negative voltage should be irrelevant. This is not a practical circuit, just a proof of concept. ? ??????????????? Yes, figure 26. I1 flows through Rc2 creating a voltage drop between the load and the ADJ terminal. The LM317 maintains the 1.25 V difference between OUT and ADJ, but the voltage drop across Rs2 is lessened. Different values of I1 lead to different drops across Rc2 and different RL2 load currents. ??????????? ? From: [email protected] <[email protected]> On Behalf Of Tony Casey via groups.io
Sent: Sunday, April 6, 2025 2:00 PM To: [email protected] Subject: Re: [LTspice] Simulation runs very slowly: test.asc ? Aah. I think LTspice didn't update the symbol reference in the schematic. Delete the LM317A symbols from the schematic and reload the replacement symbol LM317A.asy. It sounds like the old symbol was being used that had the hard-coded ModelFile. I've updated the zip file to make sure that does happen. -- ? On 06/04/2025 19:19, Christopher Paul via groups.io wrote:
? |
Re: Simulation runs very slowly: test.asc
On Sun, Apr 6, 2025 at 01:19 PM, Christopher Paul wrote:
Those error messages will continue.? It concerns a diode parameter N, which had been set to an extremely small value.? Until recently, that was accepted by LTspice despite being unreasonably small.? In newer versions, LTspice complains and limits it to >= 0.1. ?
Why was the model's N set to such a small value?? Sometimes, the people who make SPICE models use diodes to help construct other elements that have voltage dependencies but are not actual diodes.? I have seen this done to make voltage-dependent capacitors.
?
One might argue that Analog Device's decision to limit N was an unwise choice, given the fact that many SPICE models over time have been built that way.? But now we are stuck with it.
?
Are you sure?? The "round()" function is documented in a few places, including the Help pages for Waveform Arithmetic, for B-sources, and for the .PARAM command.? It is like it sounds; it rounds a real number to the closest integer.
?
Here, it is being used to truncate a number to having fewer significant digits.? Multiply the number by 1e4. find the nearest integer, then divide it by 1e4.? All digits past the 4th after the decimal point are turned to zeros, and thus are omitted.
?
Andy
? |
Re: Simulation runs very slowly: test.asc
开云体育Aah. I think LTspice didn't update the symbol reference in the schematic. Delete the LM317A symbols from the schematic and reload the replacement symbol LM317A.asy. It sounds like the old symbol was being used that had the hard-coded ModelFile. I've updated the zip file to make sure that does happen.The ideal current source causes the LM317A come out of regulation because the output voltage is too low. If I was making a programmable current source, I probably wouldn't choose the LM317 as the basis, because the voltage feedback doesn't operate the same way as the classic series regulator. I guess you were working from Figure 26 in the LM317A datasheet? I don't really understand what you were trying to accomplish with the additional current source. I don't think it quite does what you were looking for because all that is relevant to the output current is the resistance between OUT and ADJ, as V(out,adj) is maintained at 1.25V by the feedback. --
Regards, Tony On 06/04/2025 19:19, Christopher Paul
via groups.io wrote:
|
Re: Simulation runs very slowly: test.asc
开云体育Thank you, Tony, for the corrected Lib file. I got the file I was using from one posted this year in the user’s temp folder. Maybe you’d like to post an update? ? I intended that RL2 have 10mA through it, and 1V across it. I don’t see why a negative voltage on ADJ would be a problem as long as the OUT minus ADJ pin voltage is appropriate, and it is. Please keep in mind that this is not intended to be a practical circuit, only a proof of concept. Kindly comment. ? I am still getting the following error messages when I run your file.: ? u1:_u1_u12:dd1: Emission coefficient, N=4.83179e-313, too small, limited to 0.1 u1:_u1_u11:dd1: Emission coefficient, N=4.83179e-313, too small, limited to 0.1 u2:_u1_u12:dd1: Emission coefficient, N=4.83179e-313, too small, limited to 0.1 u2:_u1_u11:dd1: Emission coefficient, N=4.83179e-313, too small, limited to 0.1 Direct Newton iteration for .op point succeeded. ? I am unfamiliar with the round(I(RL2)*1e4)/1e4 instruction you used and can’t find a reference to it in my Help instructions. Can you direct me to where I could find information about it? I’m still using LTspice 17.1.14. ? The ? From: [email protected] <[email protected]> On Behalf Of Tony Casey via groups.io
Sent: Sunday, April 6, 2025 12:55 PM To: [email protected] Subject: Re: [LTspice] Simulation runs very slowly: test.asc ? I fixed all the anomalies in the TI LM317A model, so there are no errors or warnings. I also implemented the small changes in PSRR.
-- ? On 06/04/2025 15:57, Christopher Paul via groups.io wrote:
? |
Re: Simulation runs very slowly: test.asc
开云体育I fixed all the anomalies in the TI LM317A model, so there are no errors or warnings. I also implemented the small changes in PSRR.The reason your 2 circuits deliver different results is that 2nd one isn't functioning properly due to the current source I1. This causes the ADJ pin to go below ground and the O/P pin to reach 353mV. I added the LOAD parameter to spec of I1 - this prevents non-physical behaviour. The analysis runs instantaneously in XVII, 24.0.12 and 24.1.5. Check that you have reset you SPICE parameters to default. Try my upload: ProgCurrSource_corr_ATC.zip Note:
--
Regards, Tony On 06/04/2025 15:57, Christopher Paul
via groups.io wrote:
|
Re: Simulation on LTspice about of Power Quality and Energy Efficient
开云体育To help you, we meed more information. What
sort of circuits are you studying? Switch-mode power supplies?
RF amplifiers? Washing machines? On 2025-04-06 17:16, mmartine via
groups.io wrote:
--
OOO - Own Opinions only If something is true: * as far as we know - it's science *for certain - it's mathematics *unquestionably - it's religion |
Re: Simulation runs very slowly: test.asc
开云体育OK, thanks, I’ll try it. ? From: [email protected] <[email protected]> On Behalf Of John Woodgate via groups.io
Sent: Sunday, April 6, 2025 12:20 PM To: [email protected] Subject: Re: [LTspice] Simulation runs very slowly: test.asc ? Yes, because that only works for .AC simulation, which assumes that everything is linear, and that is unlikely to give you the correct result for PSRR. On 2025-04-06 17:01, Christopher Paul via groups.io wrote:
|