核主元分析KPCA的降维特征提取以及故障检测应用-data.rar 本帖最后由 iqiukp 于 2018-11-9 15:02 编辑      核主元分析(Kernel principal component analysis ,KPCA)在降维、特征提取以及故障检测中的应用。主要功能有:(1)训练数据和测试数据的非线性主元提取(降维、特征提取) (2)SPE和T2统计量及其控制限的计算 (3)故障检测 参考文献: Lee J M, Yoo C K, Choi S W, et al. Nonlinear process monitoring using kernel principal component analysis[J]. Chemical engineering science, 2004, 59: 223-234. 1. KPCA的建模过程(故障检测): (1)获取训练数据(工业过程数据需要进行标准化处理) (2)计算核矩阵 (3)核矩阵中心化 (4)特征值分解 (5)特征向量的标准化处理 (6)主元个数的选取 (7)计算非线性主成分(即降维结果或者特征提取结果) (8)SPE和T2统计量的控制限计算 function model = kpca_train % DESCRIPTION % Kernel principal component analysis % %       mappedX = kpca_train % % INPUT %   X            Training samples %                N: number of samples %                d: number of features %   options      Parameters setting % % OUTPUT %   model        KPCA model % % % Created on 9th November, 2018, by Kepeng Qiu. % number of training samples L = size; % Compute the kernel matrix K = computeKM; % Centralize the kernel matrix unit = ones/L; K_c = K-unit*K-K*unit unit*K*unit; % Solve the eigenvalue problem [V,D] = eigs; lambda = diag; % Normalize the eigenvalue V_s = V ./ sqrt'; % Compute the numbers of principal component % Extract the nonlinear component if options.type == 1 % fault detection     dims = find) >= 0.85,1, 'first'); else     dims = options.dims; end mappedX  = K_c* V_s ; % Store the results model.mappedX =  mappedX ; model.V_s = V_s; model.lambda = lambda; model.K_c = K_c; model.L = L; model.dims = dims; model.X = X; model.K = K; model.unit = unit; model.sigma = options.sigma; % Compute the threshold model.beta = options.beta;% corresponding probabilities [SPE_limit,T2_limit] = comtupeLimit; model.SPE_limit = SPE_limit; model.T2_limit = T2_limit; end复制代码2. KPCA的测试过程: (1)获取测试数据(工业过程数据需要利用训练数据的均值和标准差进行标准化处理) (2)计算核矩阵 (3)核矩阵中心化 (4)计算非线性主成分(即降维结果或者特征提取结果) (5)SPE和T2统计量的计算 function [SPE,T2,mappedY] = kpca_test % DESCRIPTION % Compute the T2 statistic, SPE statistic,and the nonlinear component of Y % %       [SPE,T2,mappedY] = kpca_test % % INPUT %   model       KPCA model %   Y           test data % % OUTPUT %   SPE         the SPE statistic %   T2          the T2 statistic %   mappedY     the nonlinear component of Y % % Created on 9th November, 2018, by Kepeng Qiu. % Compute Hotelling's T2 statistic % T2 = diag)*model.mappedX'); % the number of test samples L = size; % Compute the kernel matrix Kt = computeKM; % Centralize the kernel matrix unit = ones/model.L; Kt_c = Kt-unit*model.K-Kt*model.unit unit*model.K*model.unit; % Extract the nonlinear component mappedY = Kt_c*model.V_s; % Compute Hotelling's T2 statistic T2 = diag)*mappedY'); % Compute the squared prediction error SPE = sum.^2,2)-sum; end复制代码 3. demo1: 降维、特征提取 源代码 % Demo1: dimensionality reduction or feature extraction % ---------------------------------------------------------------------% clc clear all close all addpath) % 4 circles load circledata % X = circledata; for i = 1:4     scatter:250*i,1),X:250*i,2))     hold on end % Parameters setting options.sigma = 5;   % kernel width options.dims  = 2;   % output dimension options.type  = 0;   % 0:dimensionality reduction or feature extraction                      % 1:fault detection options.beta  = 0.9; % corresponding probabilities options.cpc  = 0.85; % Principal contribution rate % Train KPCA model model = kpca_train; figure for i = 1:4     scatter:250*i,1), ...         model.mappedX:250*i,2))     hold on end 复制代码(2)结果 (分别为原图和特征提取后的图) demo1-1.png demo1-2.png 4. demo2: 故障检测(需要调节核宽度、主元贡献率和置信度等参数来提高故障检测效果) (1)源代码 % Demo2: Fault detection % X: training samples % Y: test samples % Improve the performance of fault detection by adjusting parameters % 1. options.sigma = 16;   % kernel width % 2. options.beta          % corresponding probabilities % 3. options.cpc  ;        % principal contribution rate % ---------------------------------------------------------------------% clc clear all close all addpath) % X = rand; Y = rand; Y = rand 3; Y = rand*3; % Normalization % mu = mean; % st = std; % X = zscore; % Y = bsxfun,st); % Parameters setting options.sigma = 16;   % kernel width options.dims  = 2;   % output dimension options.type  = 1;   % 0:dimensionality reduction or feature extraction                      % 1:fault detection options.beta  = 0.9; % corresponding probabilities options.cpc  = 0.85; % principal contribution rate % Train KPCA model model = kpca_train; % Test a new sample Y [SPE,T2,mappedY] = kpca_test; % Plot the result plotResult; plotResult; 复制代码(2)结果(分别是SPE统计量和T2统计量的结果图) demo2-1.png demo2-2.png    附件是基于KPCA的降维、特征提取和故障检测程序源代码。如有错误的地方请指出,谢谢。 Kernel Principal Component Analysis .zip KPCA
2022-03-22 10:16:23 184KB matlab
1
2.应变与位移的关系(几何矩阵) 轴对称问题中表示应变与位移关系的几何方程与弹性力学平面问题相似,所不同的是:单元内一点在径向产生的位移u,会在圆周方向引起相应的应变 。一个半径为r的圆环,周长为2 r,环上的各点都沿各自的径向产生位移u后,其圆周长度变成 。因此,在圆周方向的应变为
2022-03-21 08:50:35 14.81MB ansys ppt
1
层次分析matlab代码THB花键-FE 一维有限元分析,带有截断的层次B样条(THB样条) 免责声明 2017年11月,乔纳森·詹克(Jonathan Jahnke) 无保证或担保 此规范已作为硕士论文开发 要使用它,必须将所有文件夹和子文件夹添加到MATLAB路径########################## 内容 2DPlots:用于生成2D基础函数图的脚本 AdditionalFunctions:包含其他功能,例如用于HB和THB细化,高斯点和权重的生成以及误差分析。 CurvePlot:生成B样条曲线的算法 NurbsBookAlgorithms:包含Piegl和Tiller的NURBS书中的算法,用于B样条曲线和B样条曲线的基本评估 BSplClasses:包含bSplBas类和继承的类bSplBasFun(一个基本函数),hbSplBas(分层)和一个多层类hbSplBasML。 此外,thbSplBas继承自hbSplBas,thbSplBasML继承自hbSplBasML。 boundCond是用于保存Dirichlet或Neumann边界条件的类。 Poiss
2022-03-20 14:16:23 42KB 系统开源
1
【典型例题】5.2.2(7) 平面梁单元形状函数的性质 平面纯弯梁单元如图 5-4 所示。 图 5-4 平面纯弯梁单元的节点位移及节点力 该单元的位移函数为 ( ) 1 1 2 1 3 2 4 2v x N v N N v Nθ θ= + + + = Nq (5-25) 其中 为形状函数矩阵,1 2 3 4[N N N N=N ] ]1 1 2 2[ Tv vθ θ=q 为节点位移列阵。 试讨论该形状函数矩阵的性质。 解答:梁单元的节点位移列阵中既包含有对应于 问题的位移(即线位移 )又包含有 对应于 问题的位移(即转角 0C 1 2[v v ] ]1C 1 2[θ θ ),因而使得该单元的形状函数和刚度矩阵系数的性质 和一般 问题不一样,变得更为复杂;下面考察梁单元作刚体运动的过程。 0C 由于该单元是只有挠度和转角的纯弯梁,所以只考虑三种情形下的刚体位移:沿垂直方 向的刚体平动、绕左端点的刚体转动、一般性刚体运动,分别在这三种情形下,讨论形状函 数矩阵和刚度矩阵的性质。 case 1:沿垂直方向的刚体平动 (a) 梁单元在垂直方向的刚体平动 (b) 梁单元绕节点 1 的刚体转动 图 5-5 梁单元的刚体位移 174
2022-03-20 12:49:24 6.66MB 有限元分析
1
《ABAQUS有限元分析实例详解》内容从实际应用出发,侧重于ABAQUS的实际操作和工程问题的解决,教会读者如何根据问题的特点来选择ABAQUS的相应功能,寻求解决问题的最佳方案。书中还着重讨论了用户常犯的错误和经常碰到的疑难问题,以及ABAQUS的常见错误信息和警言信息,并给出了相应的解决方法。
2022-03-20 11:14:43 33.41MB ABAQUS
1
零阶和一阶优化算法,公式推导详细在有限元分析中有较好的应用
2022-03-16 15:22:57 213KB 零阶和一阶优化算法
1
为分析矿井提升机动态运行过程中的动力学特性,为其设计提供依据,利用Catia建立了矿井提升机三维数字模型,将其导入Abaqus软件,在Abaqus中建立了钢丝绳模型,通过加载提升机转动与钢丝绳缠绕过程,模拟了提升机在启动-平稳-箕斗启动-再次平稳的工作过程,提取了不同位置监测点数据,研究了矿井提升机,重点是钢丝绳在整个提升过程中的动态变化及钢丝绳轴力变化情况和分布规律,结果表明:拉伸区域的钢丝绳单元轴力水平较高,缠绕区域的钢丝绳单元轴力水平较低;提升机启动阶段轴力水平急剧增大、平稳阶段较大的轴力单元不均匀分布于卷筒区域,所建模型、仿真参数设置、钢丝绳轴力变化情况等相关数据基本符合实际情况。
2022-03-16 09:28:53 613KB Abaqus 矿井提升机 动力学 有限元分析
1
六、单元刚度矩阵 五、应力 四、应变 七、等效结点力
2022-03-14 19:58:10 14.81MB ansys ppt
1
元分析(PCA)理论分析及应用的英文原版
2022-03-14 13:57:44 324KB 主元分析
1
新型高效低位放顶煤液压支架是近十几年发展起来的一种架型,它是实现厚煤层开采高产高效的三大设备之一。
2022-03-07 02:20:18 1.9MB 矿山机械类
1