• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. PCB Design
  3. PSPICE tolerance a passed parameter

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 165
  • Views 17304
  • Members are here 0
More Content
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

PSPICE tolerance a passed parameter

jake65892
jake65892 over 15 years ago

I have 2 questions I have ran into while trying to run a monte carlo analysis:

1. How can I tolerance a parameter passed into a sub-circuit such that it will vary over a monte-carlo run?

For instance, a 3 or 4 resistor values getting passed into a suckt as a parameter, but i would like it to vary one +/- 10%, one 5%, one 7%, and another 3%.  Is it possible to pass these values into the subckt as voltages that get varied as the result of a current source and a resistor with a tolerance?

 2. Also, if I tolerance an inductor value, how can I pass the value of the inductor for that particular monte carlo run into a parameter that is passed into a subcircuit. 

For instance, I would like to vary an inductor (nominal = 10uH) 10%.  For a particular monte carlo run, lets assume it gets set to 10%, or 11uH.  I would then like to pass that 11uH into a parameter to be multiplied in a subckt.  On the next monte carlo run, lets say it gets set to -10%, or 9uH.  I would then like to pass that 9uH into the same parameter to be multiplied in that same subckt.

  • Cancel
  • oldmouldy
    oldmouldy over 15 years ago

    You could have parts with "DEV=10%", "DEV=5%", DEV="7%", "DEV=3%" and so on to get the differing tolerances. I am pretty sure that you canot get this parameter from a circuit note since the "%" is required for the evaluated parameter.

    You probably need to look at parametric analysis to get these values passed into circuits / sub-circuits.

    Monte Carlo is going to randomly vary the value of any devices with DEV (and LOT) tolerances applied, so any two components are unlikely to have the same value, Parametric Analysis might get you what you want.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • jake65892
    jake65892 over 15 years ago

     The problem is that these are not parts in the subckt.  These are simply constants that are being passed parameters.

    I'm not sure what you are suggesting in the last paragraph, but I need to be doing monte carlo analysis. I'm not sure how parametric analysis would work unless I could vary multiple parameters to multiple values.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • oldmouldy
    oldmouldy over 15 years ago

    OK, take a look at these netlists, you can pass parametric values into the DEV parameters, I have one parameter and two resistors but the same would apply to different tolerance parameters to each resistor:

    ## calling circuit

    V_V1         IN 0 DC 0Vdc AC 1Vac
    R_R1         0 OUT  1G TC=0,0
    X_U1         IN N1 RC_CIRCUIT PARAMS:  DEVTOL={TOL1}
    X_U2         N1 N2 RC_CIRCUIT PARAMS:  DEVTOL={TOL2}
    X_U3         N2 N3 RC_CIRCUIT PARAMS:  DEVTOL={TOL3}
    X_U4         N3 N4 RC_CIRCUIT PARAMS:  DEVTOL={TOL4}
    X_U5         N4 OUT RC_CIRCUIT PARAMS:  DEVTOL={TOL5}
    .PARAM  tol1=1% tol2=2% tol3=3% tol4=4% tol5=5%


    ## subcircuit definition

    .SUBCKT RC_Circuit IN OUT PARAMS: DEVTOL=5%
    R_R2         OUT IN R_R2 1k TC=0,0
    .model        R_R2 RES R=1 DEV={DEVTOL}TC1=0 TC2=0
    R_R3         0 OUT R_R3 1k TC=0,0
    .model        R_R3 RES R=1 DEV={DEVTOL}TC1=0 TC2=0
    C_C1         0 OUT  1n  TC=0,0
    .ENDS

    This at least netlists and runs, you would need to check the results to ensure that the tolerances were being processed correctly.

    The other point was that, the Monte Carlo run will independently apply the random tolerance to each component with a DEV (or LOT) tolerance, so one value could be 9.1uH but another value could be 9.2uH (or any other value in the tolerance range specified), parameters, and parametric analysis, would allow you to specify the actual value of circuit elements.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information