cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

SOLVED
Newbie

## Electronic boards design: assessment of the component tolerances

I'm using Mathcad prime 2.0 (express version) but the question can be solved using premium version.
I would use Matcad to study the effect of the tolerance of the components I choose on the electronic circuits that I projected:
suppose, for example, you have a resistive divider formed by R1 and R2 powered from Vcc ..
we know that the voltage of R2 is:
f(Vcc, R1, R2): = (Vcc / (R1 + R2)) * R2

I want to ask Matcad which values ​​(maximum and minimum) can f() assume if
R1 has a nominal value of 1000, with a tolerance of 1% (therefore can have a value from 990 to 1010)
R2 has a nominal value of 2000, with a tolerance of 1% (therefore can have a value from 1980 to 2020)
The right way would be to use the function minimize () but I can not figure out how to properly set up the command

Thank you

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions

## Re: Electronic boards design: assessment of the component tolerances

Find attached a version which (I hope) works in Prime Express, too.

EDIT: No, it can't work in Express as Express does not allow for programming

It uses two custom function: The first creates a vector of values given nominal value, tolerance and number of intervals. The second routine was a bit tricky to write. It takes a function and a vector of arguments and cycles through all the arguments finding max and min. The function has to be one with only one argument being a vector. This is necessary mainly because we are not allowed to write functions with a variable number of arguments.

Hope the attached sheet helps. You can apply this method to more complicated expressions with more than only two restistors, too.

14 REPLIES 14

## Re: Electronic boards design: assessment of the component tolerances

See if this helps.

## Re: Electronic boards design: assessment of the component tolerances

I fear, if he is only using the Express version of Prime he will not be able to read that worksheet and even if, he will not be allowed to use solve blocks.

## Re: Electronic boards design: assessment of the component tolerances

Find attached a version which (I hope) works in Prime Express, too.

EDIT: No, it can't work in Express as Express does not allow for programming

It uses two custom function: The first creates a vector of values given nominal value, tolerance and number of intervals. The second routine was a bit tricky to write. It takes a function and a vector of arguments and cycles through all the arguments finding max and min. The function has to be one with only one argument being a vector. This is necessary mainly because we are not allowed to write functions with a variable number of arguments.

Hope the attached sheet helps. You can apply this method to more complicated expressions with more than only two restistors, too.

## Re: Electronic boards design: assessment of the component tolerances

Many thanks for the answer, thankyou very much

## Re: Electronic boards design: assessment of the component tolerances

Many thanks for the answer, I get this work using a 30days trial version, thankyou very much

## Re: Electronic boards design: assessment of the component tolerances

Hello,

I take your worksheet for electronics computing. It works well, but i've a problem when the equation is too long...

With the first equation, result isn't diplay because no solution are found (for R265).

But for the second equation with "*" instead of "+" a solution is found.

http://sendbox.fr/pro/josjvto20jfs/tolerance_FULL_V3.mcdx.html

http://www.filedropper.com/tolerancefullv3

I try to define TOl and CTOL variable with value from 0.001 to 1, but no convergence (no solution).

have you got an idea for the problem?

=> Maybe this exemple could be help you to help me in order to find the problem

1) In green : equation + 0 => Convergence is OK

2)In red : equation + 0.1 => Convergence is NOK

Why?

Thank You, Emilien

Highlighted

## Re: Electronic boards design: assessment of the component tolerances

Did you try to change the guess values?

I looks like you should omit R.464 completely, I can't spot in in your expression.

You may consider attaching your file directly here - to get the option to attach files you have to chose "Use advanced editor" at the upper right of the posting window.

## Re: Electronic boards design: assessment of the component tolerances

I just had look at one of the sheets you provided.

You have a unit mismatch problem in your function f(). You have to type 12V instead of just 12 to make it work!

It seems to be the same problem in the last pic you provided - add 0.1V instead of just 0.1. By adding + 0 Prime (sometimes) guesses the correct unit itself and thats the reason it works in your screenshot.