当前位置:网站首页>容差分析相关的计算公式
容差分析相关的计算公式
2022-04-23 13:59:00 【流苏1990】
1、尺寸链公式解析:采用逆波兰式算法解决字符串表达式的解析,例如 K=A+B-C
2、根据尺寸链公式解析得到各个因子,并获取组件编号和因子数量
3、填写每个组件的平均值以及标准差(如果有样品数据则使用样品数据进行有效计算得到平均值以及标准差)
4、根据各个组件的平均值以及标准差生成仿真数据(需填入仿真次数)
4.1、采用boost库生成高质量 符合正态分布的随机数
5、循环遍历 仿真次数,并依据尺寸链公式,获取K值数组,如下:
//因子数量
int factorCount = this.keyPairDataList.Keys.Count;
//根据公式计算K值
double[] kValueList = new double[sumCount];
RPN rpn = new RPN();
string formula = string.Empty;
for (int index = 0; index < sumCount; index++)
{
formula = "A+B-C";
foreach (string strPair in this.keyPairDataList.Keys)
formula = formula.Replace(strPair, this.keyPairDataList[strPair].ElementAt(index).ToString());
if (rpn.Parse(formula))
kValueList[index] = Convert.ToDouble(rpn.Evaluate());
}
6、计算K值数组的标准差以及平均值
7、根据规格上限、规格下限、目标CPK计算得到参考的标准差以及参考平均值。公式如下:
7.1、参考平均值:(规格上限+规格下限)/2
7.2、参考标准差:(规格上限-规格下限)/(目标CPK*6)
8、根据标准差计算得到方差,公式如下:
8.1、参考方差:参考标准差的平方
9、计算敏感度
9.1、确定敏感度公式(公式1:敏感度=差值/(∑Math.abs(差值)+0.00001),公式2:敏感度=(差值/ Math.Abs(差值)) * Math.Pow(差值, 2) * Math.Pow(当前因子数量的标准差, 2) / 参考方差)
9.2、差值计算:
9.2.1、根据尺寸链公式以及各组件的平均值(将平均值带入公式计算),计算得到Y值;
9.2.2、计算得到y1 ,
9.2.2.1、计算当前组件则当前组件平均值+1,带入尺寸链公式,计算得到y1值。
9.2.2.2、差值=Y值跟y1值的差;
9.2.3、∑Math.abs(差值)= 各个组件的差值的和;
9.2.4、敏感度=敏感度=组件差值/(∑Math.abs(差值)+0.00001)
10、优化设计
10.1、选取敏感度因子最大的项目进行优化,调整均值、调整标准差
10.1.1、调整均值,然后重新生成仿真数据进行计算 得到CPK的值在合理的范围内(与目标CPK差值在0.01左右)
10.1.2、调整标准差,然后重新生成仿真数据进行计算 得到CPK的值在合理的范围内(与目标CPK差值在0.01左右)
10.1.3、先确定调整方向,在依次做数值调整。
10.2、选取多个因子时可以根据比例调整,如每个因子调整50%
10.3、如下列出计算逻辑:
10.3.1、按照敏感度的绝对值从大到小排列,并排除冻结调整的因子
10.3.2、就算目标值,目标CPK=(手工输入),目标平均值=(规格上限+规格下限)/2,目标标准差=(目标平均值-规格下限)/(3*目标CPK)
10.3.4、计算需要调整多少个因子
10.3.4.1、循环遍历当前因子
10.3.4.2、设定当前因子的标准差=当前因子的标准差下限
10.3.4.3、生成仿真数据,计算得到Y的平均值与Y的标准差,以及CPK
10.3.4.4、判定计算得到的标准差小于目标标准差时则进行break,并得到需要变更多少个因子
10.3.5、确认需要变更的因子数量,并进行遍历
10.3.6、while(true) 循环计算,通过因子的平均值与因子的标准差生成仿真数据,并计算得到Y的平均值与Y的标准差,以及CPK
10.3.7、计算平均值的差异=Y的平均值-目标平均值;
10.3.8、进步step=(平均值的差异/2)/当前因子的敏感度
10.3.9、设定下一次计算的平均值=当前因子的平均值+进步step;
10.3.10、计算标准差差异=Math.Sqrt(Math.Abs(Math.Pow(Y的标准差, 2) - Math.Pow(目标标准差, 2)));
10.3.11、标准差进步step=Math.Sqrt(Math.Pow(标准差差异, 2) / 2);
10.3.12、Y的标准差小于目标标准差则,取反方向
10.3.13、设定下一次计算的标准差=当前因子的标准差-标准差进步step
10.3.4、设定计算得到的CPK大于目标标准差时推出循环
版权声明
本文为[流苏1990]所创,转载请带上原文链接,感谢
https://blog.csdn.net/fuweiping/article/details/116610379
边栏推荐
- 1256:献给阿尔吉侬的花束
- JS 烧脑面试题大赏
- 19c RAC steps for modifying VIP and scanip - same network segment
- Modify the Jupiter notebook style
- China creates vast research infrastructure to support ambitious climate goals
- Ora-600 encountered in Oracle environment [qkacon: fjswrwo]
- 村上春树 --《当我谈跑步时,我谈些什么》句子摘录
- scikit-learn构建模型的万能模板
- Three characteristics of volatile keyword [data visibility, prohibition of instruction rearrangement and no guarantee of operation atomicity]
- UML统一建模语言
猜你喜欢
elmo(BiLSTM-CRF+elmo)(Conll-2003 命名实体识别NER)
UML Unified Modeling Language
服务器中挖矿病毒了,屮
商家案例 | 运动健康APP用户促活怎么做?做好这几点足矣
Express ② (routing)
1256:献给阿尔吉侬的花束
10g database cannot be started when using large memory host
Un modèle universel pour la construction d'un modèle d'apprentissage scikit
Taobao released the baby prompt "your consumer protection deposit is insufficient, and the expiration protection has been started"
联想产品经理林林:天津当地网络运营商网络故障 ZUI系统后台服务器暂时无法正常工作
随机推荐
freeCodeCamp----time_ Calculator exercise
Function executes only the once function for the first time
Force deduction brush question 101 Symmetric binary tree
[code analysis (3)] communication efficient learning of deep networks from decentralized data
零拷貝技術
淘宝发布宝贝提示“您的消保保证金额度不足,已启动到期保障”
Analysis and understanding of atomicintegerarray source code
JS brain burning interview question reward
JS force deduction brush question 102 Sequence traversal of binary tree
初识go语言
Modify the Jupiter notebook style
JS 力扣刷题 102. 二叉树的层序遍历
What is the difference between blue-green publishing, rolling publishing and gray publishing?
收藏博客贴
Tensorflow & pytorch common error reporting
项目中遇到的问题(五)操作Excel接口Poi的理解
leetcode--357. 统计各位数字都不同的数字个数
Dynamic subset division problem
Using Baidu Intelligent Cloud face detection interface to achieve photo quality detection
ACFs file system creation, expansion, reduction and other configuration steps