David Naviaux

5 Badges

1 years, 313 days
Micro Dynamics Engineering, Inc.
Springfield, Oregon, United States

Great example and explanation!...

I see that I have so much more to learn!  Thank you so much for the detailed answer and the example worksheet.  I have been evaluating my electrical designs for years using Jacobian matricies to calculate the total uncertainty and the "Effect" of each of the contributors so that I could verify that my design meets my design goals. By examining the "Effect" of each contributor, I could then make appropriate component changes as required to meet my goals (e.g. change a resistor from a 1% to a 0.1% resistor, use a better opamp, etc.) or change the design specifications.

Using the Jacobian matricies, I am able to predict an uncertainty that matches the value returned by the SEA combine(f(),errors) function:

Using the Jacobian I am essentially calculating the following:

uncertainty = sqrt( (diff(y, a) * sa)^2 +  (diff(y, b)* sb)^2 + ...)

Using the Jacobian I can also calculate the worst case uncertainty as follows:

worst case uncertainty = abs(diff(y, a) * sa) + abs(diff(y, b) * sb) + ...)

In generally I list both of the results for my clients.  The worst case results are exceedingly conservative since in practice it is unrealistic to expect every parameter to be at its worst case value.

I really like the SEA app and by your explanation, I can see how I can also use it to see the effects of each contibutor.  My next step (after I review a bit of statistics that you response alerted me to) will be to compare the SEA vs Jacobian matricies implementation efforts.

effect of contributor?...

Are you refering to giving credit to the person that developed the code?

Tolerance package does not work for me...

I have tried the Tolerance package but is seems that my equations are too complicated for it to work properly.  However the ScientificErrorAnalysis package works great and rerturns the same results that I get from my analysis code.  However, I can only see how I can analyze the total error.  My existing code examines the contributing error of each error source.  Is it possible to do this with SEA?

old link was helpful...

Thank you for re-posting the old link.   It took a while, but I think that I understand it.  If I only need a few special symbols and I know their decimal equivalent Unicode, I could do this to create the printfable symbols:

plusmn := nprintf("&#%a;", 177);
Omega := nprintf("&#%a;", 937);

printf("%g %s %s %g%%\n", 2200, Omega, plusmn, 1);
2200 Ω ± 1%

It's a little clunky but a lot better than not being able to printf symbols.

Thanks

Thank you!

I'll do that in the future...

I'm new to MaplePrime.  I will "Comment/Reply" in the future.

Not exactly what I want......

The output example is what I could figure out how to do from Maple.  I would like the various component values to show their units and tolerances, e.g.:

rgp = 1000.1 Ω ± 0.01%

I know that it might seem unimportant, but 6 months from now 'rgp' might not mean much to me and having the units and tolerance shown is important to me since it shows what design parameters applied to the output results (I often experiement with other resistance tolerances in the design phase).

I realize that I can use the code that you posted in another thread and will likely do that.

Thank you!

GetStdRes proc...

Here some information that might help.

I realize that the comments in my StandardValues package are slim to say the least.  The only proc in it at the moment is the CalcStdRes proc which does the following:

In addition to setting the value of some global variables (in parentheses) the proc takes a desired resistor value and standard resistor tolerance and returns a 5 element vector containing (in the following order):

the closest standard value to the specified resistance (EQ)

the closest standard value less than the specified resistance (LT)

the closest standard value greater than the specified resistance (GT)

the closest standard value less than or equat to the specified resistance (LTEQ)

the closest standard value greater than or equal to the specified resistance (GTEQ)

The specified tolerance sets what standard values are available (i.e. 1% resistors have different values than 5% available).

Thanks again....

Thanks again. I have so much more to learn before I have much proficiency with Maple and have appreciated all those that have helped.

Adding more symbols...

Thank you.  In addition to Greek letters, I frequently use other symbols that I see I could add to the listed code.  I would stick to the Latex names for the simbols to keep things simple.

Example report output that is fine with ...

Matlab does have a really nice conversion to html if instead of "running" the script, you "publish" it.  It is the only way to get graphics into any Matlab script output.

Because I want to understand what I did some time in the future, I need graphics incorported into the output that maple does very well.  Of course, I am able to automatically output some very useful infomation (without the special symbols yet). Example:

rgp = 1000.1
rfp = 27697.2
rgn = 999.9
rfn = 27702.8
rsens = 0.02
vofs = 0.06
vpos = 5
vref = 2.5
LED current = 0.4A

4000D IMON Uncalibrated Uncertainty
typical uncertainty = 1.4265[%]
maximum uncertainty = 3.0953[%]

Parameter  Contribution
rgp: -0.2152[%]
rfp:  0.2152[%]
rgn:  0.2052[%]
rfn: -0.2052[%]
rsens:  0.9999[%]
vofs:  0.9026[%]
vpos: -0.1742[%]
vref: -0.1010[%]
ibp: -0.0125[%]
ibn:  0.0125[%]
vos:  0.0518[%]
olgain:  0.0000[%]

Example posted......

Thank you for the detailed explanation.  I have posted the code that produced to design and analyze a simple differential amplifer.  In analyzing the effects of component and parameter variations, I am taking the elemental product of the Jacobian matrix (well vector) and a vector holding the maximum various component variations. The result being a vector where each element contains how much the output is affected by the associated parameter.

I have always done it this way, but welcome any other suggestions.

StandardValues module...

Here is link to module that I wrote StandardValues.mw .

Keep in mind that I am new to programming in maple and there are likely better ways to do things and would welcome suggestions.

@mmcdara  Here is an example the c...

Here is an example the code I developed to design and analyze a roll-your-own differential amplifier.

The link to the code is DiffAmpDesignExample.mw

The StandardValues module that I wrote is used to calculate the closest standard value resistors to the ideal calculated values.

I would be glad to post that too, but it seems I can only post one file per message.  I will post that in the next message.

Another great example...

Thank you again Carl!

That little code snippet taught me a great deal, not just about Unicode.

 1 2 3 Page 2 of 3
﻿