LithiumOverdosE
Senior Member
![*](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/star.gif) ![*](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/star.gif) ![*](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/star.gif)
Offline
Posts: 361
Thank You
-Given: 383
-Receive: 588
|
![](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/post/xx.gif) |
« on: May 20, 2017, 11:10:08 23:10 » |
|
For most things related to simulation I find Proteus more than adequate. However, from time to time a need arises to simulate more complex parts and to use PSpice models and Micro-Cap is suitable for that. So far, I haven't had any problems importing manufacturers models into MC. However, this time around I'm stuck with two models that make MC throw error when trying to use them. While I do now some basics of Spice modelling, I find MC manuals lacking depth regarding peculiarity of supported syntax. Of course, I tried searching the net for some useful info that doesn't require steep learning curve but with no luck. My guess is that the problems are related to some aspect of Spice/PSpice syntax so perhaps someone more proficient in Spice/PSpice syntax may suggest some solution or point me into correct direction. 1. The first model is small NE-2 gas discharge bulb. While Proteus have a good enough model of it, of course the source is closed so no luck peeking into it. I have found surprisingly small number of articles on topic of NE-2 simulation but one particular model is more or less always circulating around and it seems good enough for my needs. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Small Neon Lamp Behavioral Model Copyright 2003 by [email protected] * Vs: strike voltage (bi-directional) * Ii: threshold current boundary between strike and hold voltage * Ti: ionization time constant of gas * Vh: hold (regulation) voltage within normal current range * Rh: on resistance within normal current range * Ia: transition current to the increasing resistance of abnormal glow * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ****************************************************************** .SUBCKT NE-2H A1 A2 PARAMS: Vs=130 Ii=50u Ti=1m Vh=80 Rh=1k Ia=4m Varc A1 arc 0 ; current sense Garc arc A2 VALUE = {sgn(V(arc,A2))*LIMIT((abs(V(arc,A2))-V(ref))/(Rh*V(abn)),0,1)} Carc arc A2 5p ; stray terminal capacitance Gref 0 ref VALUE = {Vh+(Vs-Vh)/(1+V(ion)**2)} ; Rpar=1 ; voltage transition Rparref 0 ref 1; Cref ref 0 1n ; tiny capacitance here aids convergence Gion 0 ion VALUE = {abs(I(Varc))} ; Rpar={1/Ii} ; measure of free ions Rpar 0 ion {1/Ii} Cion ion 0 {Ti*Ii} ; gas ionization time constant Gabn 0 abn VALUE = {Ia**2}+I(Varc)**2 ; Rpar={1/Ia**2} ; abnormal glow Rparabn 0 abn {1/Ia**2} Cabn abn 0 1p ; tiny capacitance here aids convergence .ENDS NE-2H It looks like PSpice syntax and MC should be able to run it but when the sim starts I get following errors: Warning: Part names have been changed. RPAR1=1 changed to RPAR_1 following with Error: Missing Nodes. Part: X13.RPAR_1 File: C:\TEST.CIR .Subckt: X13 calls NE-2H To me it seems as if MC doesn't like assigning value to a Rpar for some reason but at this point I'm at loss on how to proceed further. 2. The second model are ordinary cheap MOSFET driver TC4429 which is successfully modelled in Proteus but not in MC. Microchip offers PSpice models but they also make MC throw an error. .SUBCKT TC4429 1 2 3 4 * | | | | * | | | Negative Supply * | | Positive Supply * | Output * Input * ******************************************************************************** * Software License Agreement * * * * The software supplied herewith by Microchip Technology Incorporated (the * * 'Company') is intended and supplied to you, the Company's customer, for use * * solely and exclusively on Microchip products. * * * * The software is owned by the Company and/or its supplier, and is protected * * under applicable copyright laws. All rights are reserved. Any use in * * violation of the foregoing restrictions may subject the user to criminal * * sanctions under applicable laws, as well as to civil liability for the * * breach of the terms and conditions of this license. * * * * THIS SOFTWARE IS PROVIDED IN AN 'AS IS' CONDITION. NO WARRANTIES, WHETHER * * EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED * * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO * * THIS SOFTWARE. THE COMPANY SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR * * SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. * ******************************************************************************** * * The following MOSFET drivers are covered by this model: * Rev A Testing - TC4429 * * Polarity: Inverting * * Date of model creation: 1/26/2007 * Level of Model Creator: A * * Revision History: * 12/24/07 HNV Created by edit of TC4423_I2D_A * 2/28/08 HNV Updated quiescent current, adjust speed * * Recommendations: * Use PSPICE (or SPICE 2G6; other simulators may require translation) * For a quick, effective design, use a combination of: data sheet * specs, bench testing, and simulations with this macromodel * For high impedance circuits, set GMIN=100F in the .OPTIONS statement * * Supported: * Typical performance for temperature range (-40 to 125) degrees Celsius * DC, AC, Transient, and Noise analyses. * Most specs, including: propgation delays, rise times, fall times, max sink/source current, * input thresholds, voltage ranges, supply current, ... , etc. * Temperature effects for Ibias, Iquiescent, output current, output * resistance,....,etc. * * Not Supported: * Some Variation in specs vs. Power Supply Voltage * Vos distribution, Ib distribution for Monte Carlo * Some Temperature analysis * Process variation * Behavior outside normal operating region * * Known Discrepancies in Model vs. Datasheet: * * Input Impedance/Clamp R1 4 1 2MEG C1 4 1 38P G3 3 1 TABLE { V(3, 1) } ((-770M,-1.00)(-700M,-10.0M)(-630M,-10N)(0,0)(20.0,10N)) G4 1 4 TABLE { V(1, 4) } ((-5.94,-1.00)(-5.4,-10.0M)(-4.86,-10N)(0,0)(20.0,10N)) * Threshold G11 0 30 TABLE {V(1,11)}((-1m,10n)(0,0)(0.88,-.1)(1.5,-0.9)(2.2,-1)(4,-1.1)(6,-1.3)) G12 0 30 TABLE {V(1,12)}((-6,1.3)(-4,1.1)(-2.3,1)(-1.8,.9)(-0.7,.1)(0,0)(1,-10n)) R21 0 11 1 TC .3m 1.4u G21 0 11 TABLE { V(3, 4) } + ((0,0)(4,1.34)(5,1.43)(6,1.5)(7,1.5)(10,1.48)(12,1.48)(18,1.5)) R22 0 12 1 TC .1m -0.8U G22 0 12 TABLE { V(3, 4) } + ((0,0)(4,1.16)(6,1.24)(7,1.24)(9,1.23)(11,1.23)(18,1.25)) C30 30 0 1n * HL Circuit G31 0 31 TABLE { V(3, 4) } ((0,75)(5,43)(5.5,39.5)(6,37)(7,34)(8,32)(12,29.2)(17,29.8)(18,28.6)) R31 31 0 1 TC 3.2M G33 0 30 TABLE { V(31, 30) } ( (-1m,-10)(0,0)(1m,5n)(1,10n) ) S31 31 30 31 30 SS31 * LH Circuit G32 32 0 TABLE { V(3, 4) } ((0,31)(5,19)(6,18)(8.5,15)(11.5,14.4)(17,15.5)(18,15.4)) R32 0 32 1 TC 2.9M 10U G34 30 0 TABLE { V(30, 32) } ( (-1m,-10)(0,0)(1m,5n)(1,10n) ) R30 32 30 1MEG * DRIVE G51 0 50 TABLE {V(30, 0)} +((-5,-1n)(-3,-1n)(0,0)(5,6.8)(15,3.3)(30,4.5)) G52 50 0 TABLE {V(0, 30)} +((-5,-1n)(-3,-1n)(0,0)(4,6)(13,3.2)(15,3.0)(22,2.7)) R53 0 50 1 TC -4m 12u G50 51 60 VALUE {V(50,0)*0.8/(-0.2+18/V(3,4))+1m} R51 51 0 1 G53 3 0 TABLE {V(51,0)} ((-10,10)(0,0)(1,1n)) G54 0 4 TABLE {V(0,51)} ((-10,10)(0,0)(1,1n)) R60 0 60 100MEG H67 0 69 V67 1 V67 60 59 0V C59 0 59 1.5N C60 561 60 2N R59 59 2 0.5 L59 59 2 5N * Shoot-through adjustment VC60 56 0 0V RC60 56 561 1m H60 58 0 VC60 56 G60P 0 3 TABLE { V(58, 0) } + ((-1,-1u)(0,0)(30,0.8)(100,1.3)) G60N 4 0 TABLE { V(0, 58) } + ((-1,-1u)(0,0)(30,0.8)(100,1.3)) * Source Output E67 67 0 TABLE {V(69, 0)}((-10,-10)(0,0)(10,50)) G63 0 63 POLY(1) 3 4 6 -280M 3M R63 0 63 1 TC 3.3M,-2U E61 61 65 VALUE {V(67,0)*V(63,0)} V63 65 3 10.0M G61 61 60 TABLE {V(61,60)}((-12.0M,-200.0)(-11.0M,-60)(-10.0M,-6)(0,0)(.1,5N)(50,10N)) * Sink Output E68 68 0 TABLE {V(69,0)}((-50,-10)(0,0)(10,10)) G64 0 64 POLY(1) 3 4 3.45 -180M 2.7M R64 0 64 1 TC 3.3M 6U E62 62 66 VALUE {V(68,0)*V(64,0)} V64 66 4 10.0M G62 60 62 TABLE {V(60,62)}(-12.0M,-200.0)(-11.0M,-60)(-10.0M,-6)(0,0)(.1,5N)(10,10N)) * Bias Current G55 0 55 TABLE {V(3,4)}((0,0)(4,296U)(6,338U)(13,410U)(17,500U)(20,750U)) G56 3 4 55 0 1 R55 55 0 1 TC 5.7M 19U G57 0 57 TABLE {V(3,4)}((0,0)(4.4,48U)(6,54U)(7,64U)(13,68U)(16,70U)(20,78U)) G58 3 4 57 0 1 R57 57 0 1 TC 4.6M 49U S59 55 0 1 0 SS59 * Models .MODEL SS59 VSWITCH Roff=100MEG Ron=1m Voff=1.5V Von=1.2V .MODEL SS31 VSWITCH Roff=100MEG Ron=800 Voff=0.2V Von=0.1V .ENDS TC4429 However, resistors TC syntax seems to be bothersome for MC. Error: Missing model statement 'TC'. Part: X12.R21 File: C:\TEST2.CIR .Subckt: X12 calls TC4429 I have tried putting TC values into square brackets as suggested in MC manual but with no luck. There is something I'm missing but I'm not really sure what exactly. Of course, the simplest solution would be to try models in PSpice but for some reason I have problem running it on the laptop so for the moment I can use only MC. Regrettably there seem to be limited resources on the net pertaining to peculiarities of MC so perhaps some of you have have some useful ideas. ![Roll Eyes](http://www.sonsivri.to/forum/Smileys/SoLoSMiLeYS1/rolleyes.gif)
|
|
|
Logged
|
|
|
|
optikon
Cracking Team
Hero Member
![*](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/star.gif) ![*](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/star.gif) ![*](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/star.gif)
Offline
Posts: 856
Thank You
-Given: 1113
-Receive: 2007
|
![](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/post/xx.gif) |
« Reply #1 on: May 21, 2017, 01:49:53 13:49 » |
|
Have you narrowed down which particular lines are causing trouble?
When you remove certain lines or commands, the model wont run but does it eliminate the errors?
Once the errors are eliminated, we can re-write the problematic line using MC friendly syntax.
|
|
« Last Edit: May 21, 2017, 02:03:26 14:03 by optikon »
|
Logged
|
I can explain this to you. I can't comprehend it for you.
|
|
|
LithiumOverdosE
Senior Member
![*](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/star.gif) ![*](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/star.gif) ![*](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/star.gif)
Offline
Posts: 361
Thank You
-Given: 383
-Receive: 588
|
![](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/post/xx.gif) |
« Reply #2 on: May 22, 2017, 09:51:08 09:51 » |
|
Thx for the reply. 1. Sure, I've narrowed it down to two "Rpar=1;" and "Rpar={1/Ia**2};" statements in the NE-2H model. I commented those two statements and the model appeared to be simulating but with the wrong results. What caught my eye is that B sources are not mentioned in the MC manual. As it turns out B sources are common to LTspice and indeed there is a parameter "Rpar". Take a look at LTwiki http://ltwiki.org/index.php5?title=B_sources_(complete_reference)For the current source, a parallel resistance may be specified with the Rpar instance parameter. I found that capacitor models in LTspice also have "Rpar" parameter which defines parallel resistance. So, I added parallel resistance between two same nodes and the model now seems to be working fine. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Small Neon Lamp Behavioral Model Copyright 2003 by [email protected] * Vs: strike voltage (bi-directional) * Ii: threshold current boundary between strike and hold voltage * Ti: ionization time constant of gas * Vh: hold (regulation) voltage within normal current range * Rh: on resistance within normal current range * Ia: transition current to the increasing resistance of abnormal glow * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ******************************************************************
.SUBCKT NE-2H A1 A2 PARAMS: Vs=130 Ii=50u Ti=1m Vh=80 Rh=1k Ia=4m Varc A1 arc 0 ; current sense Barc arc A2 I= sgn(V(arc,A2))*uramp(abs(V(arc,A2))-V(ref))/(Rh*V(abn)) Carc arc A2 5p ; stray terminal capacitance *Bref 0 ref VALUE = {Vh+(Vs-Vh)/(1+V(ion)**2)} Rpar=1 ; voltage transition Bref 0 ref I= Vh+{Vs-Vh}/(1+V(ion)**2) ; voltage transition Rref 0 ref 1; Cref ref 0 1n ; tiny capacitance here aids convergence *Bion 0 ion VALUE = {abs(I(Varc))} Rpar={1/Ii} ; measure of free ions Bion 0 ion I= abs(I(Varc)) ; measure of free ions Rion 0 ion {1/Ii}; Cion ion 0 {Ti*Ii} ; gas ionization time constant *Babn 0 abn VALUE = {Ia**2}+I(Varc)**2 Rpar={1/Ia**2} ; abnormal glow Babn 0 abn I= {Ia**2}+I(Varc)**2 ; abnormal glow Rabn 0 abn {1/Ia**2}; Cabn abn 0 1p ; tiny capacitance here aids convergence .ENDS NE-2H
What perplexes me is that it seems that MC accepts LTspice's B source "I" parameter but not "Rpar" and what is even more curious is that I don't see B source mentioned in the MC reference guide. So, the first problem is solved. ![Smiley](http://www.sonsivri.to/forum/Smileys/SoLoSMiLeYS1/smiley.gif)
|
|
« Last Edit: May 22, 2017, 09:59:12 09:59 by LithiumOverdosE »
|
Logged
|
|
|
|
optikon
Cracking Team
Hero Member
![*](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/star.gif) ![*](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/star.gif) ![*](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/star.gif)
Offline
Posts: 856
Thank You
-Given: 1113
-Receive: 2007
|
![](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/post/xx.gif) |
« Reply #3 on: May 22, 2017, 11:02:21 11:02 » |
|
In MC, NFV or NFI seem to be the behavioral voltage and current sources. I am unsure which one follows the SPICE syntax more closely but yeah, clearly a difference.
|
|
|
Logged
|
I can explain this to you. I can't comprehend it for you.
|
|
|
LithiumOverdosE
Senior Member
![*](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/star.gif) ![*](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/star.gif) ![*](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/star.gif)
Offline
Posts: 361
Thank You
-Given: 383
-Receive: 588
|
![](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/post/xx.gif) |
« Reply #4 on: May 22, 2017, 08:16:30 20:16 » |
|
Indeed, but why is B source partially accepted by MC but not documented? 2. Back to TC4429 model problem. First of all it seems that TC temperature parameter of few resistors is not in the form acceptable to MC. As it turns out MC requires different syntax that includes equal sign and comma. Example: *R21 0 11 1 TC .3m 1.4u R21 0 11 1 TC= .3m, 1.4u Considering that MCHP explicitly says those are PSpice models I start to wonder to which extent MC is truly PSpice compatible. ![Lips sealed](http://www.sonsivri.to/forum/Smileys/SoLoSMiLeYS1/lipsrsealed.gif) So, that solved the problem with the resistors TC parameters. Then MC threw error regarding extra parenthesis in the G source tables. Well, it seems that MCHP have two missing parentheses in their model. ![Sad](http://www.sonsivri.to/forum/Smileys/SoLoSMiLeYS1/sad.gif) That was quickly fixed and the model is suppose to be running. Here is the corrected model: * * * THIS SOFTWARE IS PROVIDED IN AN 'AS IS' CONDITION. NO WARRANTIES, WHETHER * * EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED * * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO * * THIS SOFTWARE. THE COMPANY SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR * * SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. * ******************************************************************************** * * The following MOSFET drivers are covered by this model: * Rev A Testing - TC4429 * * Polarity: Inverting * * Date of model creation: 1/26/2007 * Level of Model Creator: A * * Revision History: * 12/24/07 HNV Created by edit of TC4423_I2D_A * 2/28/08 HNV Updated quiescent current, adjust speed * * Recommendations: * Use PSPICE (or SPICE 2G6; other simulators may require translation) * For a quick, effective design, use a combination of: data sheet * specs, bench testing, and simulations with this macromodel * For high impedance circuits, set GMIN=100F in the .OPTIONS statement * * Supported: * Typical performance for temperature range (-40 to 125) degrees Celsius * DC, AC, Transient, and Noise analyses. * Most specs, including: propgation delays, rise times, fall times, max sink/source current, * input thresholds, voltage ranges, supply current, ... , etc. * Temperature effects for Ibias, Iquiescent, output current, output * resistance,....,etc. * * Not Supported: * Some Variation in specs vs. Power Supply Voltage * Vos distribution, Ib distribution for Monte Carlo * Some Temperature analysis * Process variation * Behavior outside normal operating region * * Known Discrepancies in Model vs. Datasheet: * * Input Impedance/Clamp R1 4 1 2MEG C1 4 1 38P G3 3 1 TABLE { V(3, 1) } ((-770M,-1.00)(-700M,-10.0M)(-630M,-10N)(0,0)(20.0,10N)) G4 1 4 TABLE { V(1, 4) } ((-5.94,-1.00)(-5.4,-10.0M)(-4.86,-10N)(0,0)(20.0,10N)) * Threshold G11 0 30 TABLE {V(1,11)}((-1m,10n)(0,0)(0.88,-.1)(1.5,-0.9)(2.2,-1)(4,-1.1)(6,-1.3)) G12 0 30 TABLE {V(1,12)}((-6,1.3)(-4,1.1)(-2.3,1)(-1.8,.9)(-0.7,.1)(0,0)(1,-10n)) *R21 0 11 1 TC .3m 1.4u R21 0 11 1 TC= .3m, 1.4u G21 0 11 TABLE { V(3, 4) } + ((0,0)(4,1.34)(5,1.43)(6,1.5)(7,1.5)(10,1.48)(12,1.48)(18,1.5)) *R22 0 12 1 TC .1m -0.8U R22 0 12 1 TC= .1m, -0.8U G22 0 12 TABLE { V(3, 4) } + ((0,0)(4,1.16)(6,1.24)(7,1.24)(9,1.23)(11,1.23)(18,1.25)) C30 30 0 1n * HL Circuit G31 0 31 TABLE { V(3, 4) } ((0,75)(5,43)(5.5,39.5)(6,37)(7,34)(8,32)(12,29.2)(17,29.8)(18,28.6)) *R31 31 0 1 TC 3.2M R31 31 0 1 TC= 3.2M G33 0 30 TABLE { V(31, 30) } ( (-1m,-10)(0,0)(1m,5n)(1,10n) ) S31 31 30 31 30 SS31 * LH Circuit G32 32 0 TABLE { V(3, 4) } ((0,31)(5,19)(6,18)(8.5,15)(11.5,14.4)(17,15.5)(18,15.4)) *R32 0 32 1 TC 2.9M 10U R32 0 32 1 TC= 2.9M, 10U G34 30 0 TABLE { V(30, 32) } ( (-1m,-10)(0,0)(1m,5n)(1,10n) ) R30 32 30 1MEG * DRIVE G51 0 50 TABLE {V(30, 0)} +((-5,-1n)(-3,-1n)(0,0)(5,6.8)(15,3.3)(30,4.5)) G52 50 0 TABLE {V(0, 30)} +((-5,-1n)(-3,-1n)(0,0)(4,6)(13,3.2)(15,3.0)(22,2.7)) *R53 0 50 1 TC -4m 12u R53 0 50 1 TC= -4m, 12u G50 51 60 VALUE {V(50,0)*0.8/(-0.2+18/V(3,4))+1m} R51 51 0 1 G53 3 0 TABLE {V(51,0)} ((-10,10)(0,0)(1,1n)) G54 0 4 TABLE {V(0,51)} ((-10,10)(0,0)(1,1n)) R60 0 60 100MEG H67 0 69 V67 1 V67 60 59 0V C59 0 59 1.5N C60 561 60 2N R59 59 2 0.5 L59 59 2 5N * Shoot-through adjustment VC60 56 0 0V RC60 56 561 1m H60 58 0 VC60 56 G60P 0 3 TABLE { V(58, 0) } + ((-1,-1u)(0,0)(30,0.8)(100,1.3)) G60N 4 0 TABLE { V(0, 58) } + ((-1,-1u)(0,0)(30,0.8)(100,1.3)) * Source Output E67 67 0 TABLE {V(69, 0)}((-10,-10)(0,0)(10,50)) G63 0 63 POLY(1) 3 4 6 -280M 3M *R63 0 63 1 TC 3.3M -2U R63 0 63 1 TC= 3.3M,-2U E61 61 65 VALUE {V(67,0)*V(63,0)} V63 65 3 10.0M G61 61 60 TABLE {V(61,60)}((-12.0M,-200.0)(-11.0M,-60)(-10.0M,-6)(0,0)(.1,5N)(50,10N)) * Sink Output E68 68 0 TABLE {V(69,0)}((-50,-10)(0,0)(10,10)) G64 0 64 POLY(1) 3 4 3.45 -180M 2.7M *R64 0 64 1 TC 3.3M 6U R64 0 64 1 TC= 3.3M, 6U E62 62 66 VALUE {V(68,0)*V(64,0)} V64 66 4 10.0M G62 60 62 TABLE {V(60,62)} ((-12.0M,-200.0)(-11.0M,-60)(-10.0M,-6)(0,0)(.1,5N)(10,10N)) * Bias Current G55 0 55 TABLE {V(3,4)} ((0,0)(4,296U)(6,338U)(13,410U)(17,500U)(20,750U)) G56 3 4 55 0 1 *R55 55 0 1 TC 5.7M 19U R55 55 0 1 TC= 5.7M, 19U G57 0 57 TABLE {V(3,4)} ((0,0)(4.4,48U)(6,54U)(7,64U)(13,68U)(16,70U)(20,78U)) G58 3 4 57 0 1 *R57 57 0 1 TC 4.6M 49U R57 57 0 1 TC= 4.6M, 49U S59 55 0 1 0 SS59 * Models .MODEL SS59 VSWITCH Roff=100MEG Ron=1m Voff=1.5V Von=1.2V .MODEL SS31 VSWITCH Roff=100MEG Ron=800 Voff=0.2V Von=0.1V .ENDS TC4429 However, although MC doesn't report any errors regarding the model, now I get singular matrix error. ![Huh](http://www.sonsivri.to/forum/Smileys/SoLoSMiLeYS1/huh.gif)
|
|
« Last Edit: May 22, 2017, 09:31:55 21:31 by LithiumOverdosE »
|
Logged
|
|
|
|
LithiumOverdosE
Senior Member
![*](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/star.gif) ![*](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/star.gif) ![*](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/star.gif)
Offline
Posts: 361
Thank You
-Given: 383
-Receive: 588
|
![](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/post/xx.gif) |
« Reply #5 on: May 22, 2017, 09:51:00 21:51 » |
|
I have just noticed that the MC syntax for TABLE is differs from PSpice as well. So, the corrected model is here: .SUBCKT TC4429 1 2 3 4 * | | | | * | | | Negative Supply * | | Positive Supply * | Output * Input * ******************************************************************************** * Software License Agreement * * * * The software supplied herewith by Microchip Technology Incorporated (the * * 'Company') is intended and supplied to you, the Company's customer, for use * * soley and exclusively on Microchip products. * * * * The software is owned by the Company and/or its supplier, and is protected * * under applicable copyright laws. All rights are reserved. Any use in * * violation of the foregoing restrictions may subject the user to criminal * * sanctions under applicable laws, as well as to civil liability for the * * breach of the terms and conditions of this license. * * * * THIS SOFTWARE IS PROVIDED IN AN 'AS IS' CONDITION. NO WARRANTIES, WHETHER * * EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED * * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO * * THIS SOFTWARE. THE COMPANY SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR * * SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. * ******************************************************************************** * * The following MOSFET drivers are covered by this model: * Rev A Testing - TC4429 * * Polarity: Inverting * * Date of model creation: 1/26/2007 * Level of Model Creator: A * * Revision History: * 12/24/07 HNV Created by edit of TC4423_I2D_A * 2/28/08 HNV Updated quiescent current, adjust speed * * Recommendations: * Use PSPICE (or SPICE 2G6; other simulators may require translation) * For a quick, effective design, use a combination of: data sheet * specs, bench testing, and simulations with this macromodel * For high impedance circuits, set GMIN=100F in the .OPTIONS statement * * Supported: * Typical performance for temperature range (-40 to 125) degrees Celsius * DC, AC, Transient, and Noise analyses. * Most specs, including: propgation delays, rise times, fall times, max sink/source current, * input thresholds, voltage ranges, supply current, ... , etc. * Temperature effects for Ibias, Iquiescent, output current, output * resistance,....,etc. * * Not Supported: * Some Variation in specs vs. Power Supply Voltage * Vos distribution, Ib distribution for Monte Carlo * Some Temperature analysis * Process variation * Behavior outside normal operating region * * Known Discrepancies in Model vs. Datasheet: * * Input Impedance/Clamp R1 4 1 2MEG C1 4 1 38P *G3 3 1 TABLE { V(3, 1) } ((-770M,-1.00)(-700M,-10.0M)(-630M,-10N)(0,0)(20.0,10N)) G3 3 1 TABLE { V(3, 1) } = (-770M,-1.00)(-700M,-10.0M)(-630M,-10N)(0,0)(20.0,10N) *G4 1 4 TABLE { V(1, 4) } ((-5.94,-1.00)(-5.4,-10.0M)(-4.86,-10N)(0,0)(20.0,10N)) G4 1 4 TABLE { V(1, 4) } = (-5.94,-1.00)(-5.4,-10.0M)(-4.86,-10N)(0,0)(20.0,10N) * Threshold *G11 0 30 TABLE {V(1,11)}((-1m,10n)(0,0)(0.88,-.1)(1.5,-0.9)(2.2,-1)(4,-1.1)(6,-1.3)) G11 0 30 TABLE {V(1,11)} = (-1m,10n)(0,0)(0.88,-.1)(1.5,-0.9)(2.2,-1)(4,-1.1)(6,-1.3) *G12 0 30 TABLE {V(1,12)}((-6,1.3)(-4,1.1)(-2.3,1)(-1.8,.9)(-0.7,.1)(0,0)(1,-10n)) G12 0 30 TABLE {V(1,12)}= (-6,1.3)(-4,1.1)(-2.3,1)(-1.8,.9)(-0.7,.1)(0,0)(1,-10n) *R21 0 11 1 TC .3m 1.4u R21 0 11 1 TC= .3m, 1.4u G21 0 11 TABLE { V(3, 4) } = (0,0)(4,1.34)(5,1.43)(6,1.5)(7,1.5)(10,1.48)(12,1.48)(18,1.5) *R22 0 12 1 TC .1m -0.8U R22 0 12 1 TC= .1m, -0.8U G22 0 12 TABLE { V(3, 4) } = (0,0)(4,1.16)(6,1.24)(7,1.24)(9,1.23)(11,1.23)(18,1.25) C30 30 0 1n * HL Circuit G31 0 31 TABLE { V(3, 4) } = (0,75)(5,43)(5.5,39.5)(6,37)(7,34)(8,32)(12,29.2)(17,29.8)(18,28.6) *R31 31 0 1 TC 3.2M R31 31 0 1 TC= 3.2M G33 0 30 TABLE { V(31, 30) } = (-1m,-10)(0,0)(1m,5n)(1,10n) S31 31 30 31 30 SS31 * LH Circuit G32 32 0 TABLE { V(3, 4) } = (0,31)(5,19)(6,18)(8.5,15)(11.5,14.4)(17,15.5)(18,15.4) *R32 0 32 1 TC 2.9M 10U R32 0 32 1 TC= 2.9M, 10U G34 30 0 TABLE { V(30, 32) } = (-1m,-10)(0,0)(1m,5n)(1,10n) R30 32 30 1MEG * DRIVE G51 0 50 TABLE {V(30, 0)} = (-5,-1n)(-3,-1n)(0,0)(5,6.8)(15,3.3)(30,4.5) G52 50 0 TABLE {V(0, 30)} = (-5,-1n)(-3,-1n)(0,0)(4,6)(13,3.2)(15,3.0)(22,2.7) *R53 0 50 1 TC -4m 12u R53 0 50 1 TC= -4m, 12u G50 51 60 VALUE {V(50,0)*0.8/(-0.2+18/V(3,4))+1m} R51 51 0 1 G53 3 0 TABLE {V(51,0)} = (-10,10)(0,0)(1,1n) G54 0 4 TABLE {V(0,51)} = (-10,10)(0,0)(1,1n) R60 0 60 100MEG H67 0 69 V67 1 V67 60 59 0V C59 0 59 1.5N C60 561 60 2N R59 59 2 0.5 L59 59 2 5N * Shoot-through adjustment VC60 56 0 0V RC60 56 561 1m H60 58 0 VC60 56 G60P 0 3 TABLE { V(58, 0) } = (-1,-1u)(0,0)(30,0.8)(100,1.3) G60N 4 0 TABLE { V(0, 58) } = (-1,-1u)(0,0)(30,0.8)(100,1.3) * Source Output E67 67 0 TABLE {V(69, 0)} = (-10,-10)(0,0)(10,50) G63 0 63 POLY(1) 3 4 6 -280M 3M *R63 0 63 1 TC 3.3M -2U R63 0 63 1 TC= 3.3M,-2U E61 61 65 VALUE {V(67,0)*V(63,0)} V63 65 3 10.0M G61 61 60 TABLE {V(61,60)} = (-12.0M,-200.0)(-11.0M,-60)(-10.0M,-6)(0,0)(.1,5N)(50,10N) * Sink Output E68 68 0 TABLE {V(69,0)} = (-50,-10)(0,0)(10,10) G64 0 64 POLY(1) 3 4 3.45 -180M 2.7M *R64 0 64 1 TC 3.3M 6U R64 0 64 1 TC= 3.3M, 6U E62 62 66 VALUE {V(68,0)*V(64,0)} V64 66 4 10.0M G62 60 62 TABLE {V(60,62)} = (-12.0M,-200.0)(-11.0M,-60)(-10.0M,-6)(0,0)(.1,5N)(10,10N) * Bias Current G55 0 55 TABLE {V(3,4)} = (0,0)(4,296U)(6,338U)(13,410U)(17,500U)(20,750U) G56 3 4 55 0 1 *R55 55 0 1 TC 5.7M 19U R55 55 0 1 TC= 5.7M, 19U G57 0 57 TABLE {V(3,4)} = (0,0)(4.4,48U)(6,54U)(7,64U)(13,68U)(16,70U)(20,78U) G58 3 4 57 0 1 *R57 57 0 1 TC 4.6M 49U R57 57 0 1 TC= 4.6M, 49U S59 55 0 1 0 SS59 * Models .MODEL SS59 VSWITCH Roff=100MEG Ron=1m Voff=1.5V Von=1.2V .MODEL SS31 VSWITCH Roff=100MEG Ron=800 Voff=0.2V Von=0.1V .ENDS TC4429
However "Matrix is singular" error persists. I've raised relevant Spice parameters to the maximal reasonable level and the problem is still present. ![Undecided](http://www.sonsivri.to/forum/Smileys/SoLoSMiLeYS1/undecided.gif)
|
|
|
Logged
|
|
|
|
optikon
Cracking Team
Hero Member
![*](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/star.gif) ![*](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/star.gif) ![*](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/star.gif)
Offline
Posts: 856
Thank You
-Given: 1113
-Receive: 2007
|
![](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/post/xx.gif) |
« Reply #6 on: May 22, 2017, 10:49:25 22:49 » |
|
Ive seen singular matrix errors before with Tables in G sources.. can you try commenting some of them out?
BTW, what characteristics are important for your driver model? The model seems rather complex (perhaps necessarily so)
Ive found that the tricky / important stuff for MOSFET drivers tends to not match very well in real world.. but YMMV of course.
|
|
|
Logged
|
I can explain this to you. I can't comprehend it for you.
|
|
|
LithiumOverdosE
Senior Member
![*](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/star.gif) ![*](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/star.gif) ![*](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/star.gif)
Offline
Posts: 361
Thank You
-Given: 383
-Receive: 588
|
![](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/post/xx.gif) |
« Reply #7 on: May 24, 2017, 03:21:55 15:21 » |
|
Actually, I have just removed the model from the test schematic, saved schematic and then added model back. Now simulation works. ![Undecided](http://www.sonsivri.to/forum/Smileys/SoLoSMiLeYS1/undecided.gif) Strange occurrences indeed. ![Huh](http://www.sonsivri.to/forum/Smileys/SoLoSMiLeYS1/huh.gif)
|
|
|
Logged
|
|
|
|
2N5109
Junior Member
![*](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/star.gif)
Offline
Posts: 67
Thank You
-Given: 26
-Receive: 14
|
![](http://www.sonsivri.to/forum/Themes/dilbermc-rc3/images/post/xx.gif) |
« Reply #8 on: June 23, 2017, 03:41:35 15:41 » |
|
For what its worth here is LTSPICE's NE-2 model:
.subckt neonbulb 1 2 S1 1 2 2 N001 G S2 2 1 N001 2 G R1 1 N001 100Meg C1 N001 2 {Tau/100Meg} .model G SW(Ron={Zon} Roff=1T Vt={.5*(Vstrike+Vhold)} Vh={.5*(Vstrike-Vhold)} Vser={Vhold-Ihold*Zon}) .param Vstrike=100 Vhold=50 Zon=2K Ihold=200u Tau=100u .ends neonbulb
To run this you probably need this info from LTSPICE help file:
S Voltage Controlled Switch Symbol Names: SW
Syntax: Sxxx n1 n2 nc+ nc- <model> [on,off]
Example:
S1 out 0 in 0 MySwitch .model MySwitch SW(Ron=.1 Roff=1Meg Vt=0 Vh=-.5 Lser=10n Vser=.6)
The voltage between nodes nc+ and nc- controls the switch's impedance between nodes n1 and n2. A model card is required to define the behavior of the switch.
Voltage Controlled Switch Model Parameters:
Name Description Units Default Vt Threshold voltage V 0. Vh Hysteresis voltage V 0. Ron On resistance Ω 1. Roff Off resistance Ω 1/Gmin Lser Series inductance H 0. Vser Series voltage V 0. Ilimit Current limit A Infin.
--2N5109
|
|
« Last Edit: June 26, 2017, 01:52:31 01:52 by 2N5109 »
|
Logged
|
|
|
|
|