About error with AD8336 model in LTspice

Hi,

I'm simulating with LTspice
I get a "syntax error" and it doesn't work.

Looking at the following posts, it seems that there is a cause in the model of AD8336, is there a solution?

https://ez.analog.com/amplifiers/f/q-a/14190/problem-with-ad8336-model-in-ltspice

https://ez.analog.com/amplifiers/f/q-a/538758/ad8336-ad8336-model

Even if I add ".options cshunt = 1e-15" here, it doesn't work.
I'm in trouble!

By the way, the circuit I'm trying to run is "Figure 5. AGC Circuit Using the AD8336" here.
https://www.analog.com/media/en/technical-documentation/application-notes/AN_934.pdf

The symbols are made by myself.
Please let me know if that is the cause too.

Best Regards,

Naohisa

  • 0
    •  Analog Employees 
    on May 3, 2021 1:05 AM

    Hi Naohisa,

    Are you encountering the "nonzero()" syntax error?
    This function is not recognized by LTSpice. 

    I'm currently unable to upload files here in the forum, so, can you try modifying the netlist?
    on line 82, remove the nonzero function and replace it with this instead:

    Also on line 33 you may want to add an initial current value for this specific capacitor:

    Let me know how it turns out Naohisa.

    Thanks and Best Regards,
    Dann

  • Hi Dann,

    Dann, thank you for your answer.

    I corrected it based on the answer I received.
    Then the syntax error disappeared,
    but「Unknown parameter "np"」 is displayed and simulation is not possible.
    The following syntax in the AD8336.CIR file seems to be the cause.
    E_U3_E4 U3_RIN 0 VALUE {V (VGAI, 0) * V (AGAIN, 0)} np
    If you have any idea, please let me know.

    Best Regards,

    Naohisa

  • Dann, Naohisa,

    The .cir file you're referencing is likely downloaded directly from the AD8336 page? However, a newer file is available from this Q&A forum here: AD8336 Simulation in PSPICE Issues
    [
    The .cir from this link fixes the "np" issue you mentioned.]

    The .cir file linked above has a bunch of syntax fixes from the main AD8336 page, but does not seem to work in the end, and instead produces this error:

    ERROR: Node U1:U4_N24227 is floating and connected to current source G:U1:_U4_G4

    This EZ post reports a working symbol, but no ZIP file is attached: Problem with AD8336 model in LTspice

    Finally, ARoxas showed a working simulation here: AD8336;AD8336 model
    But upon recreating that simulation, it still does not work with any .cir file I can find. Below is an image of my test circuit, and the corresponding files are in the ZIP here: AD8336-test-ARoxas.zip

    In case it matters, I'm running:
    LTspice XVII(x64) (17.0.27.0), May 9 2021, 17:30:53 US Pacific

    In summary:
    Does ADI have an updated .cir (or .asy) for the AD8336?

    Thank you!