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

SOLVED

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

Thank you very much, it works when I add the "V" units.

And thank you for the tips in order to attached a file.

Emilien

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

Hello,

happy new year Everybody!

I begin the new year with a problem on my Worksheet.

For a value of a capacitor, constraints aren't respected. I don't understand why.

All computed value are not optimised when I add this capacitor.

No errors appears.

Function on my worksheet :

Find a minimize :

Result

We see that, they are no optimisation on any component (value are in the middle) and value for C127 are not between (1nF -150pF < C127 < 1nF + 150pF).

If a put a fixed capacitor value (1nF) on the function :

Other components in this case are "optimize" in order to find the minimum of the function.

I don't find why, when a put the C127 capacitor, constraints are not respected? Where is the mistake?

File is included in the message

Thank You, Emilien

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

When using a solveblock with Minimize constraints are NOT hard constraints. Prime tries to find an overall good fit - you may not get the absolute minimum of your function and constraints may not be fully respected. You may weight the one or the other constraint by using a factor like the 10^3 in the example below. If the constraint isn't respected, the absolute error gets bigger that way and so Mathcad tries to to a better job. There is no guarantee that all constraints will ever be respected.

In case of your function the capacitor C127, which is a factor of the function, has a very big influence on the outcome of f_temp(). The absolute minimum for f_temp (which is negative infinity) is achieved if C127 approaches negative infinity. Its only your constraint which stops Prime from assigning a value like -10^23 to C127.

So Mathcad primarily "plays" with C127 as the other variables don't affect the outcome of the function that much.

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

But, If I change the factor from "1" to "10^3", C127 will be at the good value for a minimum f_temps function, but other components will not optimized.

With C127 capacitor from 900pF to 1100pF :

If a had a factor of "1.10^3"

f_temps = 3.85µs (C127_min = 900.39pF)

If I don't had any factor :

f_temps = 2.79µs (C127_min = 653pF)

If a replace C127 by 900pF with fixed value :

f_temps = 2.575µs

This one is apparently the minimum of f_temps function.

Computing results are not OK like you say. What is the best solution for my problem?

Is it possible to give only 2 value for C127 (C127_min and C127_max) in order to simplify computation?

Can I force "Prime" to compute with more precision the minimum of the function?

Thank you

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

 What is the best solution for my problem? Can I force "Prime" to compute with more precision the minimum of the function?

As already said, the problem arouses mainly from the way your function is built. You get (with all the other variables staying constant) the minimum when C127 is at its minumum. So the best solution seems to set C127 at its minimal value (850 pF) manually and let Prime optimize the rest of the variables which seems to work.

The algorithm Prime uses is, as I guess, Levenberg-Marquardt. In MC15 and below we were able to chose from different algorithms but in Prime we miss this feature. But I guess it wouldn't help in this situation anyway.

Another approach to that kind of problem is brute force. Thats the method I posted some times ago in this thread (its just the posting below, file is MinMax.mcdx). You have to setup a function with a 11x1 vector as argument and create vectors of values for all the eleven variables used. Then the routine will combine every value in each vector with all the others and returns minimum an maximum of the function along with the parameters to get there. Depending on the number of variables in play and the number of values for each variable this may take quite some time to finish. Using a coarse grid you may miss the real minimum, using a much finer grid it may take a lifetime to finsh. Working with 100 values for each variable would mean that your function has to be evaluated 100^11=10^22 times - not sure how long it would take Prime to do so, but I guess its not acceptable, but then, you may give it a try.