This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

THS4520 Spice Model for Multisim

Other Parts Discussed in Thread: THS4520, THS4509

I tried to use the Spice Model provided on the TI product folder for the THS4520 in a Spice simulation using Multisim, but I get the following errors:

------ Checking SPICE netlist for SpiceVoltAmpTest - 2010-06-29 18:18:23 ------

SPICE Netlist Error in schematic RefDes 'u2', element 'e_u2':  Node '$n_0005' referenced in voltage expression/controlled source does not exist in scope

SPICE Netlist Error in schematic RefDes 'u2', element 'e_u2':  Node '$n_0022' referenced in voltage expression/controlled source does not exist in scope

SPICE Netlist Error in schematic RefDes 'u2', element 'e_u2':  Node '$n_0023' referenced in voltage expression/controlled source does not exist in scope

SPICE Netlist Error in schematic RefDes 'u2', element 'e_u3':  Node '$n_0018' referenced in voltage expression/controlled source does not exist in scope

SPICE Netlist Error in schematic RefDes 'u2', element 'e_u3':  Node '$n_0024' referenced in voltage expression/controlled source does not exist in scope

SPICE Netlist Error in schematic RefDes 'u2', element 'e_u3':  Node '$n_0025' referenced in voltage expression/controlled source does not exist in scope

======= SPICE Netlist check completed, 6 error(s), 0 warning(s) =======

The netlist lines in the model causing the problems are:

E_U2         Out- $N_0021  VALUE
+ {LIMIT(V($N_0005,Vmid)*1,V($N_0022,Vmid),V($N_0023,Vmid))}

E_U3         Out+ $N_0021  VALUE
+ {LIMIT(V($N_0018,Vmid)*1,V($N_0024,Vmid),V($N_0025,Vmid))}

I checked on the Multisim tech support website, and only found one item relating to this type of error.  It appears to be caused when Multisim reassigns node names, and somehow the nodes referred to in the LIMIT function get disassociated with their proper connections.  Their answer was very unsatisfying, basically, "if it hurts when you do that, then don't do that"!!!

I substituted the TI spice model for the THS4509, and it works correctly in my circuit. 

I guess my question is: can these two lines be changed to something that will compile properly in Multisim?

Emeric

 

  • I am a bit surprised with the support from NI, they are usually pretty good.  I will suspect you will not get an answer here either.  Every manufacture says "Our models are AS IS" and "Use our simulator."  The problem with that, from a customer's perspective, is that I am not willing to download Multisim for ADI models, Simplis/SIMETRIX for Intersil Models, IntuSoft for ON Semi models, or TINA for TI models so on and so forth.

    My preferred simulator has been PSpice in Cadence 16.3.  When I have problems with the PSpice models I suffer with TINA.  It is not a bad simulator, it is just frustrating because I do not only use TI op-amps.

    If by chance you are not bound to Multisim, I would suggest LT Spice which I have been using heavily as of late and will probably migrate to using it.  Linear does not directly support it themselves, besides normal updates, but they have a very active users group on Yahoo that is very helpful.

    It is not your ideal answer, but I would suggest trying out LT Spice and joining their user forum.  They may actually HELP you with the THS4520 model.

     

    -Ken

  • Hi Emeric,

    What version of Multisim are you using? One of my colleagues will attempt to reformat the model for you tomorrow. We suspect that MultiSim does not like node names that contain "$N_". This is one of the differences between the THS4509 and the THS4520 models.

    Regards,

    Michael

  • Hi Michael,

    I am using Microsim 10.1, which is either the most recent or at least a very recent version.

    I did notice the different node numbers in the THS4509 model.  I tried doing a search and replace on the "$N_" node numbers, and that did not seem to do anything.  The new node numbers I used started at 1 and went up to something under 100, I don't recall exactly.  I got the same spice errors with the new node numbers.  Of course, I could have screwed up my fix some way that I did not see.

    Another significant difference I noticed between the THS4509 model and the THS4520 model is that the THS4509 model seems to be built with transistor models, while the THS4520 model is built using a lot of controlled sources and no transistors.  The spice errors I get have to do with controlled sources.

    I appreciate your help.

    Emeric

  • Hi Ken,

    I pretty much want to use Multisim, since the rest of my design is done there.  I have not used PSpice for about 6 or 8 years, and do not presently have a copy available.  I do use LTspice, but only for smaller models.  What I might try is to use LTspice to see how different the THS4509 is from the THS4520, and if they are close enough, use the THS4509 model as a substitute in Multisim.

    Thanks for your help.

    Emeric

     

  • Emeric,

    I am attaching a file here with a new subcircuit for the THS4520. I have removed the $N_ and replaced it with an N. I have also added a = sign to the Value atatement. We have loaded this into the Student Version and run a quick simulation and it appears to pass the node checking.

    Based on the Multisim users guide, the Limit function and the nodes referenced seem to follow the required syntax. Please give it a try and let us know if this works for you.

    Thanks for your interest in TI products.

    Britt Brooks

    2018.THS4520.txt
    *THS4520 Wideband, Low Noise, Low Distortion Fully Differential Amplifier with Rail-to-Rail Output
    * REV. A - Created 10/30/06 X-ramus2@ti.com
    *
    *
    * NOTES:
    *   1- This macromodel predicts well: DC, small-signal AC, noise,
    *      , and transient performance under a wide range
    *      of conditions.
    *   2- This macromodel does not predict well: distortion
    *      (harmonic, intermod, diff. gain & phase, ...),
    *      temperature effects, board parasitics, differences
    *      between package styles, and process changes
    *   3- For some simulators the subckt for the F statement need to be placed 
    *      inside the ends statement followed by carriage return  
    *   4- Known Problems: - Do not simulate Iout
    *
    * |-------------------------------------------------------------|
    * |  This macro model is being supplied as an aid to            |
    * |  circuit designs.  While it reflects reasonably close       |
    * |  similarity to the actual device in terms of performance,   |
    * |  it is not suggested as a replacement for breadboarding.    |
    * |  Simulation should be used as a forerunner or a supplement  |
    * |  to traditional lab testing.                                |
    * |                                                             |
    * |  Neither this library nor any part may be copied without    |
    * |  the express written consent of Texas Instruments Corp.     |
    * |-------------------------------------------------------------|
    *
    * CONNECTIONS: Changes order of pins compareed to original version
    *                                      NonInverting Input
    *                                       |    Inverting Input
    *                                       |    |     Positive Supply
    *                                       |    |     |    Negative Supply
    *                                       |    |     |     |     Negative Output
    *                                       |    |     |     |     |      Positive Supply
    *                                       |    |     |     |     |      |     Common Mode Input
    *                                       |    |     |     |     |      |     |
    *                                       |     |     |     |       |      |      |
    *                                       |     |     |     |       |      |      |
    *$
    .SUBCKT THS4520_Model In+ In- Vs+ Vs- Out- Out+ CM
    
    .PARAM Raol = 1.2k
    .PARAM Lp = 30n
    
    C_C1         Vmid N0001  99.47n  
    R_R3         N0002 N0001  {Raol}  
    R_R5         N0001 Vmid  1T  
    E_E2         N0003 Vmid N0001 Vmid 1
    R_R7         N0003 N0004  8  
    L_L1         N0004 N0005  0.5nH  
    C_C3         Vmid N0005  250p  
    R_R1         N0007 N0006  30  
    R_R2         N0009 N0008  30  
    E_E1         N0002 N0010 N0007 N0009 1.02MEG
    G_G1         Vs+ N0012 Vs+ N0011 0.7m
    E_E10         N0014 Vmid N0013 Vmid 125u
    R_R4         N0010 N0015  {Raol}  
    E_E3         N0016 Vmid N0015 Vmid 1
    R_R8         N0016 N0017  8  
    L_L2         N0017 N0018  0.5nH  
    C_C4         N0018 Vmid  250p  
    C_C2         N0015 Vmid  99.47n  
    R_R6         Vmid N0015  1T  
    C_C5         Vmid N0019  1p  
    L_L5         CM N0020  900nH  
    R_R9         N0020 N0019  900  
    E_E6         N0021 N0014 N0019 Vmid 1
    E_U2         Out- N0021  VALUE={LIMIT(V(N0005,Vmid)*1,V(N0022,Vmid),V(N0023,Vmid))}
    V_V12         N0022 Vs- DC 0.25 
    R_RV12        N0022 Vmid 1e6
    E_U3         Out+ N0021  VALUE={LIMIT(V(N0018,Vmid)*1,V(N0024,Vmid),V(N0025,Vmid))}
    V_V14         N0024 Vs- DC 0.25  
    R_RV14        N0024 Vmid 1e6
    V_V13         Vs+ N0025 DC 0.25  
    R_RV13  	   N0025 Vmid 1e6
    E_E11         N0013 Vmid POLY(2) In- Vmid  In+ Vmid  0 0.5 0.5
    Q_Q2         N0009 In- N0026 NPN8 1
    E_E4         Vmid Vs- Vs+ Vs- 0.5
    V_V6         N0011 Vs- DC 3V  
    V_V7         N0012 Vs- DC 0V
    I_I5         Vs+ Vs- DC 10.8mA  
    Q_Q1         N0007 In+ N0026 NPN8 1
    I_I2         Vs+ In+ DC 9.2uA  
    I_I3         Vs+ In- DC 9uA  
    L_L4         N0008 Vs+  {Lp}  
    L_L3         N0006 Vs+  {Lp}  
    V_V11         Vs+ N0023 DC 0.25  
    R_RV11        N0023 Vmid 1e6
    I_I4         CM Vs- DC 0.6uA  
    X_S2    Vs+ Vs- N0027 Vs- THS4520_Model_S2
    R_R19         N0027 N0026  1m  
    
    .MODEL NPN8 NPN
    + IS = 7.604E-18 BF = 1.570E+02 NF = 1.000E+00 VAF= 7.871E+01
    + IKF= 3.975E-02 ISE= 3.219E-14 NE = 2.000E+00 BR = 7.614E-01
    + NR = 1.000E+00 VAR= 1.452E+00 IKR= 8.172E-02 ISC= 7.618E-21
    + NC = 1.847E+00 RB = 1.060E+02 IRB= 0.000E+00 RBM= 2.400E+00
    + RE = 2.520E+00 RC = 1.270E+02 CJE= 1.120E-13 VJE= 7.591E-01
    + MJE= 5.406E-01 TF = 1.213E-11 XTF= 2.049E+00 VTF= 1.813E+00
    + ITF= 4.293E-02 PTF= 0.000E+00 CJC= 8.208E-14 VJC= 6.666E-01
    + MJC= 4.509E-01 XCJC=8.450E-02 TR = 4.000E-11 CJS= 1.160E-13
    + VJS= 5.286E-01 MJS= 4.389E-01 XTB= 1.022E+00 EG = 1.120E+00
    + XTI= 1.780E+00 KF = 3.500E-16 AF = 1.000E+00 FC = 8.273E-01
    
    
    .ENDS    THS4520_Model
    *$
    
    .subckt THS4520_Model_S2 1 2 3 4  
    S_S2         3 4 1 2 _S2
    RS_S2         1 2 1G
    .MODEL         _S2 VSWITCH Roff=0.166748625431493 Ron=932.790061092598
    +  Voff=-8.102659644524 Von=6.08261917857915
    .ends THS4520_Model_S2
    *$
    

  • 5736.THS4520.ms10

     

    Emeric,

    Did you mean to say "Microsim 10.1" or "Multisim 10.1"? I assume you use Multisim...

    Anyhow, following Britt's comment (by simply replacing all the $ sign with nothing) I created test bench that run on my version 10.1.1

    I attached the .ms10 on this reply.. check it if it works for you.. it runs for me.. it shows the correct current consumption 

    as well as the output frequency response.

     

    Cheers,

    Herman

  • Hi Britt and Herman,

    Woops, I meant Multisim 10.1.  Typing fingers got ahead of the brain thinking, I guess.

    I finally got a chance to try some of this stuff again, and while the new model fixes the spice errors I was getting and allows the circuit to simulate, there still seems to be an error in the spice model.  I have attached 4 different trial simulations, and for people without Multisim, *.pdfs of the schematics:

    TestTHS4520splitVs.* - This works OK, and is similar to Herman's Multisim circuit.
    TestTHS4520model.* - This is Britt's spice model pasted into my Multisim part - The output common mode voltage is wrong
    Test5736.THS4520model.* - This is Herman's Multisim part copied out of his test circuit and pasted into my test circuit - The output common mode voltage is wrong
    TestTHS4509model.* - The THS4509 part included with Multisim is used in my test circuit - the output common mode voltage is as expected and this seems to work correctly.

    Any ideas anyone?  Thanks for the help so far.

    Emeric

    THS4520model.zip
  • Emeric,

    I'll take a look at this, and I'll let you know what I find..

    Cheers,

    Herman

  • Emeric,

    I made a small modification into the netlist to make it work.

     

    The value of R_R5 and R_R6 in the netlist are originally 1T ohms. 1T ohms is quite bit sensitive or

    too high. My suspection is that even though the netlist works in Pspice and TINA, the convergence control 

    in Multisim is different from that of Pspice and TINA. Thus causing wrong result.

     

    I have modified the value of both R_R5 and R_R6 to 100Meg ohms.

    Attached is the modified test bench and/or netlist.

     

    Hopefully this will do it for you. If not, let us know.

    Cheers,

    Herman

     

    6685.Test5736.THS4520_modelv2.ms10

     

  • Hi Herman,

    That works great.  The model in you last post works correctly in my circuit when I use it in Multisim 10.1

    Thanks

    Emeric