当前位置:网站首页>容差分析相关的计算公式
容差分析相关的计算公式
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
边栏推荐
- Tensorflow Download
- Crontab timing task output generates a large number of mail and runs out of file system inode problem processing
- Detailed explanation of redis (Basic + data type + transaction + persistence + publish and subscribe + master-slave replication + sentinel + cache penetration, breakdown and avalanche)
- Chapter 15 new technologies of software engineering
- L2-024 tribe (25 points)
- Move blog to CSDN
- Analysis of the problem that the cluster component GIPC in RAC environment cannot correctly identify the heartbeat network state
- Atcoder beginer contest 248c dice sum (generating function)
- freeCodeCamp----time_ Calculator exercise
- Using Baidu Intelligent Cloud face detection interface to achieve photo quality detection
猜你喜欢
groutine
零拷貝技術
【报名】TF54:工程师成长地图与卓越研发组织打造
Express ② (routage)
Detailed explanation of redis (Basic + data type + transaction + persistence + publish and subscribe + master-slave replication + sentinel + cache penetration, breakdown and avalanche)
JS 烧脑面试题大赏
第一章 电商秒杀商品回顾
freeCodeCamp----arithmetic_ Arranger exercise
2022年江西最新建筑八大员(质量员)模拟考试题库及答案解析
Quartus prime hardware experimental development (de2-115 board) experiment 1 CPU instruction calculator design
随机推荐
try --finally
项目中遇到的问题(五)操作Excel接口Poi的理解
Atcoder beginer contest 248c dice sum (generating function)
函数只执行第一次的执行一次 once函数
Solution of discarding evaluate function in surprise Library
Reading notes: fedgnn: Federated graph neural network for privacy preserving recommendation
Question bank and answer analysis of the 2022 simulated examination of the latest eight members of Jiangxi construction (quality control)
SQL learning | set operation
10g database cannot be started when using large memory host
leetcode--380.O(1) 时间插入、删除和获取随机元素
Decentralized Collaborative Learning Framework for Next POI Recommendation
JS 烧脑面试题大赏
Business case | how to promote the activity of sports and health app users? It is enough to do these points well
elmo(BiLSTM-CRF+elmo)(Conll-2003 命名实体识别NER)
scikit-learn構建模型的萬能模板
[code analysis (5)] communication efficient learning of deep networks from decentralized data
初识go语言
第一章 电商秒杀商品回顾
Android 面试主题集合整理
Using Jupiter notebook in virtual environment