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.

INA283-Q1: PSpice Sim model errors in Altium

Part Number: INA283-Q1
Other Parts Discussed in Thread: INA283

I am using the PSpice sim model from the TI web design resources in Altium and get the following error messages (attached pic). Could you help resolve the errors?

  • Hello Appreciated Engineer,

    I am looking this over and will respond shortly.

    Sincerely,

    Peter

  • Hey Avdit,

    I apologize for the non-business hours delay. 

    This model was not tested in Altium spice, but maybe there is some sematic rule that is being violated. Maybe one possibility is that there are too many spaces in between "VCLKF1" and "2" in line 470? Or something like this.

    I have edited the model netlist to reduce spaces here to one and attached.

    Can you try re-testing the simulation with this netlist to see if this fixes error messages concerning VCLKF1_0?

    Do you have other necessary Altium SPICE libraries installed, such as the Simulation Sources library which contains PWL?

    Can you send back the complete error messages log?

    Did you use the Altium Spice macro import wizard/extension for pspice models?

    Sincerely,

    Peter

  • Hi Peter,

    Thank you for your help.

    I got the following message from Altium support -

    "Unfortunately our engine doesn't support such a syntax for PWL signal, which includes TIME_SCALE_FACTOR and REPEAT ... ENDREPEAT statements"

    Can you recommend modifications to the sim file to continue using the SIM model without the above?

    Best,

    Avdit

  • Hey Avdit,

    You could just simply delete the lines containing TIMESCALE_FACTOR to ENDREPEAT and then run the model in the Non-switching mode (TR_MODE = 0). So basically blank out the PWL sources (make them constant DC sources) and then run the model without these switching circuits.

    Sincerely,

    Peter

  • Hi Peter,

    Your suggestions helped remove the errors but the simulation is not working like expected. Is it possible for you to upload the .ckt file with the modifications that you suggested.

    Best

  • ina283.lib

    Hey Avdit,

    Here is the edited netlist (still with the original .lib extension, but this should be easily changeable).

    Can you send me screen shots of the not unexpected simulation behavior?

    Are you setting TR_MODE to 0.

    Sincerely,

    Peter

  • Hi Peter,

    I had to edit your file to remove the PWL instances.

    I have a dumb circuit with the input expected to amplify by 200x for the ina283, so for a 5mV input the output should be around 1V but as you can see the output is around 4mV even with the changes to the input voltage.

    I did a sanity check with LTSpice and it works there but LTSpice does not have a problem with the PWL instances either.

    If you have Altium, can you try the circuit out with the model file like suggested?

    Best,

    Avdit

  • Hey Advit,

    I performed the simulation in Altium 23 and I get the same result. I do get many warnings, which are probably interfering with model operation. See my simulation log below.

    For some reason Altium spice does not recognize certain model parameter nor use of Laplace function. When I deleted the use of the Laplace function in .SUBCKT ZOH_0.E1 and replaced it with a VCVS with gain of 1, the error with Zoh goes away, but now device output is railing into Vs rail. See below on my 2nd modification:

    I wonder if the RDS parameter being ignored in the PMOS models is affecting the railing the output. I do not know why they would not be recognized, but maybe the PMOS models need to be adjusted according to Altium spice syntax in order for this model to work. 

    Can you please contact Altium for syntax documentation on what PMOS levels and/or parameters they accept?

    Sincerely,

    Peter

  • Hi Peter,

    The following is the feedback I got from Altium support-



    This is our knowledge-based article that describes the supported spice engines that are currently used by our mixed sim engine.

    www.altium.com/.../understand-spice-models-supported-in-altium

    Doing some digging Laplace transforms are not supported by NGSpice so by default It will not be supported by our spice engine.

    nmg.gitlab.io/.../laplace.html

    Here is the official manual that we use for NGSPICE and the RDS parameter is only used for the VDMOS model. So it is not supported by other mosfet models. If you use the Generic simulation models and view their parameters this will be reflected as well. Only the VDMOS model has an RDS parameter.

    https://ngspice.sourceforge.io/docs/ngspice-manual.pdf

    Hope the above helps!

    Best,

    Avdit

  • Hey Avdit,

    I don't know what happened but I re-instantiated my INA283 model in Altium and then made the same corrections: (deleted PWL and replaced the Laplace function with "IN1 IN2 1") and the model seems to be working now. I have attached the .lib I am using.

    4705.ina283.lib

    Sincerely,

    Peter

  • This edit worked. Thanks for your help, Peter!

  • Hi Peter,

    Can you also share the parameters you are using for the Altium PWM generic simulation model? Esentially, I am trying to create a pulse train like you did but have only been able to use the voltage pulse with no N cycle parameter like other simulators.

    Best

  • Hey Avdit, 

    Here are my PWM generator parameters:

    Sincerely,

    Peter