2
\$\begingroup\$

I am trying to simulate NMOS and PMOS power transistors in LTspice, but I keep getting error messages about the NMOS being duplicate.

Some of the earlier LTspice file is here. I am trying to have a 5V drain supply across a resistor and driving it with a sine wave on the gate 5V bias and amplitude 5V to see the resistor voltage go "on" 5V and "off" 0V, still without getting the simulator to start to succeed. I am lost with the LTspice documentation and movie still.

Version 4
SHEET 1 968 680
WIRE 432 0 32 0
WIRE 336 64 208 64
WIRE 432 96 432 80
WIRE 32 112 32 0
WIRE 208 112 208 64
WIRE 336 176 336 64
WIRE 384 176 336 176
WIRE 32 224 32 192
WIRE 208 224 208 192
WIRE 432 224 432 192
FLAG 32 224 0
FLAG 208 224 0
FLAG 432 224 0
SYMBOL voltage 32 96 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 5
SYMBOL voltage 208 96 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V2
SYMATTR Value SINE(5 5 100)
SYMBOL res 416 -16 R0
SYMATTR InstName R1
SYMATTR Value 1
SYMBOL nmos 384 96 R0
SYMATTR InstName M1
SYMATTR Value ""
SYMATTR SpiceModel .model MyMOSFET NMOS(KP=.001)
TEXT -2 248 Left 2 !.tran .01

Update:

I am using LTSpice XVII ; I tried copying the source code from G36 into the the .asc file but it did not work. However, it was a good enough a hint to make substantial progress, together with the link provided in that answer of: Stack Exchange Electrical Engineering: Simulating Power PMOS using LTSpice. I updated the PMOSbasictest4.asc file using a text editor, outside of LTSpice XVII and then I imported it again, updating everything according to the linked example (picture is important).

The copy of the PMOSbasictest4.asc code is here:

Version 4
SHEET 1 1128 680
WIRE 112 48 -16 48
WIRE 352 48 112 48
WIRE 352 64 352 48
WIRE 304 80 240 80
WIRE 112 160 112 128
WIRE 240 160 240 80
WIRE 240 160 112 160
WIRE 352 176 352 160
WIRE -16 192 -16 48
WIRE -16 288 -16 272
WIRE 352 288 352 256
FLAG -16 288 0
FLAG 352 288 0
SYMBOL res 336 160 R0
SYMATTR InstName R1
SYMATTR Value 1
SYMBOL voltage -16 176 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 12
SYMBOL voltage 112 32 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V2
SYMATTR Value 4.8
SYMBOL pmos 304 160 M180
SYMATTR InstName M1
SYMATTR Value MyPMOSFET
TEXT -48 312 Left 2 !.tran .01
TEXT 464 168 Left 2 !.MODEL MyPMOSFET PMOS (LEVEL=2 KP=1.4 VTO=-3.11)

But the question is still not completely answered in terms of what I need.

I want to simulate the Vishay IRF9510 power P-channel MOSFET: https://www.vishay.com/docs/91072/91072.pdf

To make the answer complete, I still need the actual needed parameters.

Right now I have some modulation simulated, but with a different transistor model:

Latest Schematic That has Correct DC Values following the Answer Link

I have also made some progress in getting modulation to work with the example P-channel MOSFET parameters. (Thank you for the answers that provided inspiration of how to get here! I am almost finished!)

Schematic and Simulation for the PMOSBasicV7.asc simulation below

Version 4
SHEET 1 1128 680
WIRE 112 48 -16 48
WIRE 352 48 112 48
WIRE 352 64 352 48
WIRE 304 80 240 80
WIRE -368 112 -432 112
WIRE -288 112 -368 112
WIRE -368 144 -368 112
WIRE -288 160 -288 112
WIRE 112 160 112 128
WIRE 240 160 240 80
WIRE 240 160 112 160
WIRE 448 160 352 160
WIRE 352 176 352 160
WIRE -16 192 -16 48
WIRE 448 208 448 160
WIRE 480 208 448 208
WIRE -368 240 -368 224
WIRE -288 240 -368 240
WIRE 240 240 240 160
WIRE -368 256 -368 240
WIRE -16 288 -16 272
WIRE 352 288 352 256
FLAG -16 288 0
FLAG 352 288 0
FLAG -368 256 0
FLAG -432 112 V10-711
IOPIN -432 112 Out
FLAG 240 240 VMODDrain
IOPIN 240 240 In
FLAG 480 208 VR1
IOPIN 480 208 Out
SYMBOL res 336 160 R0
SYMATTR InstName R1
SYMATTR Value 1
SYMBOL voltage -16 176 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 12
SYMBOL voltage 112 32 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V2
SYMATTR Value SINE(4.8 5 100)
SYMBOL pmos 304 160 M180
SYMATTR InstName M1
SYMATTR Value MyPMOSFET
SYMBOL res -304 144 R0
SYMATTR InstName R3
SYMATTR Value 10K
SYMBOL voltage -368 128 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V3
SYMATTR Value 10.72
TEXT -48 312 Left 2 !.tran 0 .1 0 0.01
TEXT 424 128 Left 2 !.MODEL MyPMOSFET PMOS (LEVEL=2 KP=1.4 VTO=-3.11)

Question update:

I received an excellent LTSpice help link reference in the answer from @Ste Kulov in his comment, that matches the help pdf in the directory of the installation of LTSpice XVII.

I took the datasheet and its graph of the V-I curve at 5-Volt \$V_{SG}\$ (Source-Gate voltage is 5V). For a source-gate voltage of 0 Volt, the LT-Spice Level 1 Shichman-Hodges equations have that the \$I_{SD}\$ (from Source-to Drain current) is 0 Amps. Also, from the data-sheet, below the Source-Gate absolute threshold voltage, \$V_{sg}<|V_{th}|\$, the Source-Drain current is very small, essentially zero for the current design-purposes.

In addition, for the "turn-on" state of the PMOS MOSFET, I drive the voltages as follows:

$$V_{SG}=5.0 \text{ Volts }$$

So I only need to take data from one of the curves, the \$-5 \text{ Volt}\$ curve in particular, from the data-sheet. I can use GIMP software to take data-points from the curve as pixels, and make mathematical conversions later.

I started with the datasheet to get a couple of data-points (21 data points), from the \$25^\circ C\$ data-set:

Datasheet Graph at 25 Degrees C and VSG=5V

I have a spreadsheet that I derived the model parameters from. I am hoping to update this further.

Still left for the answer: how to take those parameters and verify in LTSpice XVII is working fine. Also, how to set zero default capacitance values, as the frequency of operation is too low to make capacitance an issue. And of course a comparison of the Vishay model and the datasheet, especially the model parameters like \$V_{th}\$ that can vary between -2 V and -4 V.

Question Update:

Introduction to he Applicable Theory

From Shichman-Hodges equations for the P-channel MOSFET (which has \$V_{th} < 0\$ for the transistor under consideration):

"DC model selector. Level 1 is the Schichman-Hodges model."

$$\text{Cutoff Region, } 0 \le V_{SG} \le |V_{th}|$$

$$I_{DS}=0.0 \longrightarrow I_{SD}=0$$

For the "Cutoff Region", the current entering into the Source and exiting the Drain and it is modeled as zero Amps. From the IRF9510 Data Sheet, at \$V_{SG}=0\$ and \$V_{DS} > -100 V\$ then \$I_{SD} \lt 50 \mu A \$ which is negligible (essentially zero) for the purposes of this model. The LTSpice Help is available at this link, selecting "Dot Commands -> Model -> MOSFET". The equations themselves were taken from the previous link.

$$\text{Linear Region, } V_{SD} \le V_{SG} - |V_{th}|$$

$$I_{SD}= \text{ KP } \frac{W_{eff}}{L_{eff}} \left(1+\text{LAMBDA } V_{SD} \right)\left( V_{SG}- |V_{th}| – \frac{1}{2}V_{SD}\right) V_{SD}$$

$$\longrightarrow I_{SD}= \frac{\text{ KP }}{2} \frac{W_{eff}}{L_{eff}} \left(1+\text{LAMBDA } V_{SD} \right)\left( 2 \left(V_{SG}- |V_{th}| \right)– V_{SD}\right) V_{SD}$$

\$\text{LAMDA }\$ is positive for PMOS and NMOS transistors according to page 3 of this link.

$$\text{Saturation Region, } V_{SD} \ge V_{SG} - |V_{th}|$$

$$ I_{SD}= \frac{\text{KP }}{2} \frac{W_{eff}}{L_{eff}} \left(1+\text{LAMBDA } V_{SD} \right)\left( V_{SG}- |V_{th}|\right)^2 $$

$$\text{Saturation Voltage }V_{sat}, V_{\text{SD sat}}=V_{SG}-|V{th}|$$

At the saturation voltage \$V_{\text{SD Sat}} \$, the saturation region and linear region meet at one point. This can be revealed by substituting \$ V_{\text{SD sat}}=V_{SG}-|V{th}| \$ into both the equation for Linear Region and for the Saturated Region: $$ I_{SD}= \frac{\text{ KP }}{2} \frac{W_{eff}}{L_{eff}} \left(1+\text{LAMBDA } V_{SD} \right)\left( 2 \left(V_{SG}- |V_{th}| \right)– V_{SD}\right) V_{SD} $$ $$ =\frac{\text{ KP }}{2} \frac{W_{eff}}{L_{eff}} \left(1+\text{LAMBDA } V_{\text{SD sat }} \right)\left( 2 V_{\text{SD sat }}– V_{\text{SD sat }}\right) V_{\text{SD sat }} $$ $$ I_{\text{SD sat Linear Region}}=\frac{\text{ KP }}{2} \frac{W_{eff}}{L_{eff}} \left(1+\text{LAMBDA } V_{\text{SD sat }} \right)\left(V_{\text{SD sat }}\right)^2 $$ At the Saturation Region Point: $$ I_{\text{SD sat}}= \frac{\text{KP }}{2} \frac{W_{eff}}{L_{eff}} \left(1+\text{LAMBDA } V_{\text{SD sat}} \right)\left( V_{\text{SG sat}}- |V_{th}|\right)^2 $$ $$ I_{\text{SD sat Saturation Region}}=\frac{\text{ KP }}{2} \frac{W_{eff}}{L_{eff}} \left(1+\text{LAMBDA } V_{\text{SD sat }} \right)\left(V_{\text{SD sat }}\right)^2 $$

It is important to realize that for \$I_D \ge I_{\text{D Sat}}\$ that the equation for \$I_D\$ is that of a line. So statistical linear regression approaches can be used to find the parameters over the applicable region and then apply these to the full solution.

Introduction to he Applicable Data

The X-Axis and L-Axis Data Points

The applicable data points taken include \$0\text{ Volts}_{SD} \longrightarrow 0\text{ Amps}_{SD}\$, the other 20 x-axis data points, and the other y-axis data-points. A simple mathematical formula that determines \${Amps}_{SD}\$ and \${Volts}_{SD}\$ is then determined, evaluated, and its relative error is determined.

The Data Points From the SD V-I Curve for the MOSFET

After that, pixel sample data points are taken from the V-I curve of the device also using the GIMP Gnu Image Manipulation program in Ubuntu Linux. Then the corresponding voltage and current data values are determined from the data-sheet curve. It is to be appreciated that with real devices, sometimes an actual measurement deviates somewhat from what should be expected, sometimes from experimental error, and sometimes in the limitations of the expectations for the device under test (DUT).

\$\endgroup\$
8
  • \$\begingroup\$ Please post the netlist also \$\endgroup\$
    – Voltage Spike
    Commented Nov 9, 2023 at 16:11
  • \$\begingroup\$ If you want to include lambda (channel length modulation) take a look here electronics.stackexchange.com/questions/298829/… \$\endgroup\$
    – G36
    Commented Dec 17, 2023 at 14:25
  • 1
    \$\begingroup\$ You can run a test circuit like this one and then format the plot to compare against the datasheet. Note that I used the manufacturer's subcircuit that @G36 highlighted and explained how to set up in his answer. As for capacitance values, they all default to zero anyway. Check the LTspice built-in help page for "M. MOSFET" for all the default model values. \$\endgroup\$
    – Ste Kulov
    Commented Dec 18, 2023 at 12:53
  • 1
    \$\begingroup\$ Stephen Elliott - Hi, (a) FYI, the number of edits you've made has started to trigger alerts. While they seem relevant, please note that each edit bumps your question to the top of the active list, so each edit also pushes everything else on that list down. Therefore doing many, small edits is discouraged, in favour of a smaller number of larger edits i.e. fewer bumps. (b) You seem to have the text "Introduction to he Applicable Data" as the last line. Is that intended? (c) Personally for me, your actual question is now hidden in the commentary. Perhaps consider highlighting it? \$\endgroup\$
    – SamGibson
    Commented Dec 19, 2023 at 14:51
  • \$\begingroup\$ @SamGibson: There is the one larger heading "Introduction to the Applicable Data", which has underneath it two sub-headings: "The X-Axis and Y-Axis Data Points" which represent sample data that I took from the graph axis; and "The Data Points From the SD V-I Curve for the MOSFET" which has data-points for the VI curve at VSD=5V. It takes me a lot of time to generate all these tables and graphs here; that is why there are small edits here and there. But I have gotten to the stage that if there were a way to attach a spreadsheet with graphs, the one attachment could save on multiple edits. \$\endgroup\$ Commented Dec 26, 2023 at 12:37

1 Answer 1

4
\$\begingroup\$

You need to do it this way: enter image description here

Version 4
SHEET 1 968 680
WIRE 432 0 32 0
WIRE 336 64 208 64
WIRE 432 96 432 80
WIRE 32 112 32 0
WIRE 208 112 208 64
WIRE 336 176 336 64
WIRE 384 176 336 176
WIRE 32 224 32 192
WIRE 208 224 208 192
WIRE 432 224 432 192
FLAG 32 224 0
FLAG 208 224 0
FLAG 432 224 0
SYMBOL voltage 32 96 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 5
SYMBOL voltage 208 96 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V2
SYMATTR Value SINE(5 5 100)
SYMBOL res 416 -16 R0
SYMATTR InstName R1
SYMATTR Value 1
SYMBOL nmos 384 96 R0
WINDOW 3 56 60 Left 2
SYMATTR InstName M1
SYMATTR Value MyMOSFET
TEXT 0 248 Left 2 !.tran .01
TEXT 128 280 Left 2 !.model MyMOSFET NMOS(KP=.001)

Also if you are interested in modeling MOSFET based on the datasheet information take a look here: Simulating Power PMOS using LTSpice

Also, you can download the simulation model from the transistor vendor. https://www.vishay.com/en/product/91072/tab/designtools-ppg/

Download the sihf9510.lib

Draw the schematic.

Include the file sihf9510.lib

In the component attribute editor window change the prefix from MP to X.

And value to IRF9510.

enter image description here

Run the simulation.

enter image description here

\$\endgroup\$
5
  • \$\begingroup\$ Hello G36. Your update was extremely helpful for me to make some progress. But I am still not all the way there net. Please see my update as to why. I provided some additional detail about my question including the progress I made. For some reason when I cut and pasted your LTSpice XVII simulation code in a text editor and saved the schematic file, when I loaded it into LTSpice XVII it was missing wires and the text was oddly formatted. I was still not able to get the simulation to run. However your source helped be get to to what I needed to edit in my own schematic source file! \$\endgroup\$ Commented Nov 16, 2023 at 13:36
  • \$\begingroup\$ @StephenElliott Why don't you download the simulation model directly from the Vishay website? \$\endgroup\$
    – G36
    Commented Nov 16, 2023 at 14:29
  • \$\begingroup\$ I contacted the support manger for the SPICE model, but he wrote me back that they did not have the LTSpice model available for this part. The link: vishay.com/en/product/91072/tab/designtools-ppg is really helpful. However there is a disclaimer that only the datasheet has guaranteed limits. Probably I am starting from the data sheet to derive the parameters. I did download the library but I need to figure out still how to connect the symbol to it. I am still a little confused about how I can open the standard symbol for a PMOS and save it so that all the pins are in order. \$\endgroup\$ Commented Nov 21, 2023 at 17:56
  • \$\begingroup\$ @StephenElliott So you did not follow my "tutorial" on how to include the xxx. lib file? Or you do not know how the enter "component attribute editor "? Simply place the mouse over the body of an MOS symbol, hold down the control key, and click the right mouse button. Or maybe my "tutorial" is unclear to you? Also, you don't have to worry about pins order. \$\endgroup\$
    – G36
    Commented Nov 21, 2023 at 19:15
  • \$\begingroup\$ The suggested use of the .lib file is very nice. I only have very limited time to work on this, and hence my long delay in getting back with you. I have started from the data-sheet to capture a few parameters and compare them to the Level-1 PMOS standard Shichman-Hodges model. I have already completed a spreadsheet and this Level 1 model seems very good with a maximum 6.22% relative error at around 1 Amp of flow. I am hoping to update my question with additional detail and eventually also compare the library simulation that you mentioned. \$\endgroup\$ Commented Dec 13, 2023 at 13:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.