How to correct SPICE SiC MOSFET models to work with Pspice

Hi, after duly studying "Wolfspeed SiC Mosfet OrCad Pspice Model Quick Start Guide Rev 2 January 2024" I have succeeded in importing the library (the E3M0160120D.lib in the example I have tried) into Pspice OrCAD X 24.1, as well as succeeding in linking it to the WOLFSPEED-TO247-3L.OLB symbol. I have then connected the MOSFET drain to DC voltage source, the gate to a trivial 0 to 15V square pulse (connected between gate and source), and the source to a load resistor. You know, just to verify whether the model works. Unfortunately not so … However, the issues at play appear to me as related to some of the syntax used by the Wolfspeed SPICE model not being recognized by Pspice. To make it easier for you to narrow down the root causes, here are my findings:
- X_U1.Ci_d DC+ 0 1p Rpar 1G
⇒ apparently, Pspice does not recognize this syntax for assigning 1G parallel resistance to a capacitor. Of course, this same error is flagged everywhere else Rpar is assigned to a capacitor. Would you have any equivalent suggestion for assigning, in a PSPICE-compatible way, said parallel resistance? In that way I will then be able to edit myself the .lib of other MOSFETs I may need later on. - X_U1.Ls1 SW X_U1.s 5.17n Rser 10.11m
⇒ apparently, Pspice does not recognize this syntax for assigning 10.11m series resistance to an inductor. Of course, this same error is flagged everywhere else Rser is assigned to n inductor. Would you have any equivalent suggestion for assigning, in a PSPICE-compatible way, said series resistance? In that way I will then be able to edit myself the .lib of other MOSFETs I may need later on. - X_U1.Ed X_U1.Id 0 value {I(Rdrain_s)} ERROR(ORPSIM-16318): Missing or invalid expression ⇒ in this case the syntax I(Rdrain_s) is apparently not recognized as referring to the current through Rdrain_s. If I replace the expression
{I(Rdrain_s)} with the voltage across it divided by its resistance value, i.e., {v(d3,d1)/Rdrain_s} (I am unsure about the sign), this error is then corrected. However, I suppose there must be a more elegant Pspice way to address the current through a resistor … - X_U1.Rbd X_U1.d1 X_U1.dd2 X_U1.R rbody
ERROR(ORPSIM-16152): Invalid number: Error while converting token 'rbody' to double value. Token can be a constant or expression. ⇒ unfortunately, about this one I have no clue … - Some of the Table defined lines were too long for PspicE ⇒ trivially fixed by simply splitting the offending lines.
If you could suggest ways to fix those few issues, we will then be able to edit ourselves the .lib files of any other Wolfspeed SiC MOSFET models we may need to simulate in the future.
Many Thanks
Luca
Comments
-
Thank you for your post, it has been approved and we will respond as soon as possible.
0 -
Just to make it more precise. In fact I was listing the troublesome lines as already processed by Pspice into its output netlist. The source line in the .lib file are respectively:
Ci_d d 0 1p Rpar=1G (and all other Cs with parallel R), which are easy to replace with
Ci_d d 0 1p
RPi_d d 0 1G etc. etc. for all other similar onesLs1 s1 s 5. 17n Rser=10.11m lines such as this one require inserting an additional node (e.g. s1_s) ⇒
Ls1 s1 s1_s 5.17n
Rs_Ls1 s1_s s 10.11mREMARK: changing them this way would still maintain compatibility with LTspice
other issues concern the use of some LTspice specific functions, such as: uplimit() dnlimit() but about which I believe that your coding experts, with some more efforts, might find alternative ways to define as functions using only built-in basic functions common to both LTspice and Pspice.
0 -
Hello LucaTron,
Here is the PSpice-compatible model for E3M0160120D. You did a great job addressing some of the errors! Below are additional changes you will need to make for compatibility with PSpice:
- rdlim Function: The rdlim function, which calls uplim and dnlim, is not supported by PSpice. Replace rdlim with the limit function.
- Rdrain_s: This component measures device current, but PSpice doesn’t support it. Replace it with a small-value voltage source to measure the current instead.
- Body Diode Resistance (Rbd): PSpice does not support variable resistance for the body diode. Change it to a current source (GRbd) with the value {V(d1,dd2)/rbody(V(gk),V(Tjc))}.
I hope this helps! Feel free to reach out if you need any further assistance.
Best regards
0 -
Great! now it works!
just a little more tweaking, as in the meantime I have found the definition of the LTspice uplim and dnlim functions. They are both easy to replicate in Pspice:
*defining a function identical to LTspice uplim, but which also Pspice understand (see https://ltwiki.org/?title=Undocumented_LTspice)
.func UpLim(x,y,z) {if((y-x)<z,y-z*exp((y-x-z)/z),x)}
*defining a function identical to LTspice dnlim, but which also Pspice understand (see https://ltwiki.org/?title=Undocumented_LTspice)
.func DnLim(x,y,z) {if((x-y)<z,y+z*exp((x-y-z)/z),x)}
.func rdlim(x,n,p,z) {uplim(dnlim(x,n,z),p,z)}
That helps a lot when combinations of input voltage and other mysterious variables result in the dreaded "Convergence Errors." Indeed, the uplim and dnlim smooth out the otherwise very sharp transitions of the limit function.
Finally, I believe that if you repeat the same .func definition in all your devices LTspice .lib files, you will then obtain the result that all them will now work both in LTspice and Pspice, without requiring any additional adaptation or customization.
Best Regards,
Luca
0 -
Hi, I hope that this answered your question. I will close this discussion for now but if you have a follow up question, please "Start a New Discussion" and we would be glad to support you further.
0