Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline alyles  
#1 Posted : 18 January 2018 00:37:34(UTC)
alyles


Rank: Advanced Member

Groups: Registered
Joined: 23/03/2016(UTC)
Posts: 275
United States

Was thanked: 91 time(s) in 57 post(s)
This is something I've developed along the way to help me perform various Worst Case Analyses in my job. I primarily use this for different types of circuit analysis, but it may prove useful to someone else.

I have this setup as a snippet and put it at the top of each of my worksheets. I've devised my own system for creating functions and defining variables that allows me to automatically perform these types of analyses fairly quickly within SMath.

I have another set of snippets which I'll upload later that automatically compute some of the 3sigma tolerances for resistors and capacitors based on initial tolerance, temperature, and life.

WC_Analysis.sm (87kb) downloaded 127 time(s).
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
thanks 2 users thanked alyles for this useful post.
on 18/01/2018(UTC),  on 24/03/2018(UTC)

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline alyles  
#2 Posted : 23 March 2018 22:50:26(UTC)
alyles


Rank: Advanced Member

Groups: Registered
Joined: 23/03/2016(UTC)
Posts: 275
United States

Was thanked: 91 time(s) in 57 post(s)
Realized I had an error in the RSS calculation. I forgot to take the final square root.

Here's a fixed version.
WC_Analysis.sm (89kb) downloaded 135 time(s).
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
thanks 2 users thanked alyles for this useful post.
on 24/03/2018(UTC),  on 24/03/2018(UTC)
Offline babElec  
#3 Posted : 06 January 2022 12:56:18(UTC)
babElec

Rank: Newbie

Groups: Registered
Joined: 06/01/2022(UTC)
Posts: 5
France
Location: grenoble

Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: alyles Go to Quoted Post
Realized I had an error in the RSS calculation. I forgot to take the final square root.

Here's a fixed version.
WC_Analysis.sm (89kb) downloaded 135 time(s).


Hello,
Thank you for your job.
I'm trying to use your toolset, and I have a strange result for the RSS because it's higher than the EVA.

EVA :
EVA

Rss :
RSS
WC_Analysis_FO058.sm (106kb) downloaded 11 time(s).

Did I make a mistake? Or it is a bug on the RSS function?

Another question :
On the "Defining Function", could it work if I had an "if statement" like :
If (P28V-VD) > Vz
0mA
Else
{P28V-VD-VZ}/R_LIM-I_CAP/B (actual define function)

Thank you, Emilien
Offline alyles  
#4 Posted : 06 January 2022 16:28:18(UTC)
alyles


Rank: Advanced Member

Groups: Registered
Joined: 23/03/2016(UTC)
Posts: 275
United States

Was thanked: 91 time(s) in 57 post(s)
Hi Emilien

RSS is a statistical analysis performed on Normal distributions. The RSS function I have written assumes that the the inputs are normal and that the μ of the normal function is the middle value in each input vector. This is generally how I define my inputs.

Then it determines the sigma based on the min/max values of the input. I have assumed in my RSS calc that the nominal value of the input may not fall directly in between the min/max. So I compute the sigma from nominal to max and nominal to min and take the maximum of that result when performing the RSS. This can result in solutions such as you are seeing.

I do this intentionally because an RSS analysis does not make sense when the input aren't normal. I could take the min/max of each input, calculate μ from that and then determine sigma, but if I define my inputs such that the middle value is truly the nominal or μ value, then the analysis will provide min/max results that may fall in between the worst case min/max, but aren't statistically accurate.

That being said, the only input in your function that is really lopsided is the P28V input. What you could do for the RSS is redfine the P28V input so that it's centered around middle value of 16 and 31.5 as shown below. Notice the nominal value has changed, but for RSS we really only care about the min/max. You still have to ask yourself if this is a meaningful result, however.

redfineP28.png

Another potential, and perhaps more meaningful alternative, is to fix the input voltage and perform the RSS analysis at each operating point of concern. Note that the minimum value calculated for P28V.MIN is still beyond the worst case value. So you also have to take that with a grain of salt.

fixedP28.png

Edited by user 06 January 2022 16:30:26(UTC)  | Reason: Not specified

Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
Offline babElec  
#5 Posted : 07 January 2022 13:26:28(UTC)
babElec

Rank: Newbie

Groups: Registered
Joined: 06/01/2022(UTC)
Posts: 5
France
Location: grenoble

Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: alyles Go to Quoted Post
Hi Emilien

RSS is a statistical analysis performed on Normal distributions. The RSS function I have written assumes that the the inputs are normal and that the μ of the normal function is the middle value in each input vector. This is generally how I define my inputs.
[...]


Thank you very much for your answer.
I understand the point, but before to see your message, I changed a little bit the RSS function.

I took the "diff_sign#" function from WC.DIFFEVA and I used it the sum the TOL.RSS positive and negative coefficient.


I changed my variable in order to have WCA_MIN equal to the nominal value, so not centered inputs at all.


EVA :


RSS :


I think it's not so stupid for not centered input vector ?


My another question :

Do you know why an if statement doesn't work like this one?
WC_Analysis_FO058.sm (150kb) downloaded 18 time(s).

Thank you, Emilien.

Edited by user 10 January 2022 17:43:15(UTC)  | Reason: Not specified

Offline cesarescudero  
#6 Posted : 04 May 2023 17:28:01(UTC)
cesarescudero

Rank: Newbie

Groups: Registered
Joined: 28/03/2021(UTC)
Posts: 2
Canada

Hi,

I am not sure how your code works because I am still getting familiar with Smath, I got an error on the Monte Carlo function
the last line= WC.MC(f(_1),I):WC.MC(f(_1),I#,1000), the error is "input string was not in the correct format" I assume is either a typo or something change on Smath that is not expecting the same format.

Also, do you have more examples with more complicated circuits that you can share? Transistor circuits, temperature changes.

Thank you.
Offline alyles  
#7 Posted : 21 June 2023 21:55:27(UTC)
alyles


Rank: Advanced Member

Groups: Registered
Joined: 23/03/2016(UTC)
Posts: 275
United States

Was thanked: 91 time(s) in 57 post(s)
Sorry for the late reply.. There was an error in my definition of WC.MC(f(_1),I). It's fixed in the attached. To be honest, I don't use the Monte Carlo function much as Smath doesn't handle large number of calculations that well. For example just 100k iterations takes ~2.5 minutes on my machine. It's not ideal.

WC_Analysis.sm (94kb) downloaded 599 time(s).

Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
Offline cesarescudero  
#8 Posted : 21 June 2023 23:22:18(UTC)
cesarescudero

Rank: Newbie

Groups: Registered
Joined: 28/03/2021(UTC)
Posts: 2
Canada

Originally Posted by: alyles Go to Quoted Post
Sorry for the late reply.. There was an error in my definition of WC.MC(f(_1),I). It's fixed in the attached. To be honest, I don't use the Monte Carlo function much as Smath doesn't handle large number of calculations that well. For example just 100k iterations takes ~2.5 minutes on my machine. It's not ideal.

WC_Analysis.sm (94kb) downloaded 599 time(s).



Thanks!!!Clap
Offline Jean Giraud  
#9 Posted : 22 June 2023 17:02:14(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: cesarescudero Go to Quoted Post
Also, do you have more examples with more complicated circuits that you can share? Transistor circuits, temperature changes.

The sole laboratory that collects Global Warming data ... HadCRU.
Global Warming reached the peak 2010 [~ 0.8 °C]
From the stable reference period 1951 ... 1960
Since 2010, Global Warming has decreased ~ 0.75 °C.
Can you explain what you mean temperature changes ?
Cheers ... Jean.
Offline Jean Giraud  
#10 Posted : 22 June 2023 17:21:23(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Weibull failure Analysis. I have few more ...

Stat Treasury_8 Weibull FailureAnalysis.sm (26kb) downloaded 15 time(s).

Offline Jean Giraud  
#11 Posted : 23 June 2023 16:04:18(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Weibull infectious evolution
is typical of Medic data [Mathsoft Collaboratory]
Many other PDF can be considered as applicable.
WWeibull is like Bible ...
Cheers ... Jean.

Stat Treasury_8 Weibull [log vraisemblance] Copy.sm (90kb) downloaded 11 time(s).
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.