主成分分析是一种经典算法,可以利用其进行故障检测。利用主成分分析进行故障诊断的MATLAB程序,包括T2统计量和SPE统计量,进行故障检测与诊断的效果非常好。
2022-04-27 14:09:17 6KB 机器学习 人工智能
1
N=12; % 每个染色体段数(十进制编码位数) M=200; % 进化代数 popsize=200; %设置初始参数,群体大小 length=10; % length为每段基因的二进制编码位数 chromlength=N*length; %字符串长度(个体长度),染色体的二进制编码长度 pc=0.7; %设置交叉概率,本例中交叉概率是定值,若想设置变化的交叉概率可用表达式表示,或从写一个交叉概率函数,例如用神经网络训练得到的值作为交叉概率 pm=0.3; %设置变异概率,同理也可设置为变化的 bound={-100*ones(popsize,1),zeros(popsize,1)};min=bound{1};max=bound{2}; pop=initpop(popsize,chromlength); %运行初始化函数,随机产生初始群体 ymax=500; K=1;
2022-04-19 15:07:42 6KB 算法 免疫算法 故障检测
KPCA MATLAB故障检测代码,可以直接用
2022-04-15 13:17:23 990KB matlab 开发语言
1
针对功率变换器故障导致的故障相绕组不能正常励磁或续流的问题,以12/8极开关磁阻电机驱动系统三相不对称半桥型功率变换器为研究对象,分析其故障类型,推导出正常状态和故障状态下相绕组电流的解析解。讨论了不同工况下直流母线电流的变化规律及其数字化分析结果,并结合功率开关器件的PWM驱动信号和直流母线电流,提出了一种功率变换器主开关器件短路和开路故障检测方案。最后利用Matlab对功率变换器进行了故障仿真和故障判别,主开关器件短路和开路的仿真结果与理论分析结果相吻合,能够识别出故障相,并判别出故障相的故障类型,仿真结果验证了方案的可行性。
1
第七单元微机故障检测与定位组装检修高新考试题.doc
2022-04-06 01:20:58 28KB 接口
基于扩展卡尔曼滤波器的矢量控制感应电动机实时传感器故障检测,隔离与重构方法
2022-03-31 22:46:52 1.44MB 研究论文
1
故障诊断代码matlab 基于观察者的故障检测与诊断(FDD) 抽象的 该代码介绍了一种故障检测与诊断(FDD)方案的设计,该方案由两种类型的观察者组成,并应用于线性参数变化(LPV)系统。 第一个使用降阶LPV观测器(LPV-RUIO)的组合来检测,隔离和估计执行器故障。 第二个由一组全阶LPV未知输入观察器(LPV-UIOO)组成,用于检测,隔离和估计传感器故障。 根据线性矩阵不等式(LMI),可以保证观察者的设计,收敛和稳定性条件。 因此,这项工作的主要目的是提供一种基于新颖模型的观察者技术来检测和诊断非线性系统上的故障。 给出了基于两个典型化学工业过程的仿真结果,以说明这种方法的实现和性能。 要求 至少一个具有6 GB RAM的i5-3337U CPU@2.7 GHz(2核)。 R2016b或更高 包装方式: LMI实验室 论文信息 伊曼纽尔·伯纳迪(Emanuel Bernardi)和爱德华多·J·亚当(Eduardo J.Adam)。 《基于观察者的工业过程故障检测和诊断策略》。 于:富兰克林学院学报357(14 2020),第9895-9922页。 ISSN:0016-0
2022-03-25 20:45:45 19.44MB 系统开源
1
核主元分析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