File Exchange

image thumbnail

Kernel PCA Contour Maps for Fault Detection

version 1.1.0 (15.6 KB) by Karl Ezra Pilario
Visualizations of the T2 and Q statistical indices for KPCA-based fault detection using contour maps


Updated 25 Apr 2019

View License

This submission contains the following files:
1) dataset.mat
2) KPCAsurface.m
3) PCAsurface.m
4) greenmag.m

dataset.mat contains a 2-dimensional data set taken from a simulated process example. This data is used for training and testing Kernel PCA for fault detection. After training, the widely used T2 and Q statistical indices for fault detection are computed for every location in the output data space, hence producing contour maps. The 99% significance level detection limit is then superimposed on the map, serving as a boundary between the normal (green) and faulty (magenta) regions of the data space.

Using the contour maps, one can visualize the effects of various kernel types and parameter choices to the decision boundary between normal and faulty process states.

This work is supplementary to the results in Ref [1]. Further work can proceed by investigating the impact of kernel behavior to process monitoring performance.

[1] K.E.S. Pilario, Y. Cao, and M. Shafiee. Mixed Kernel Canonical Variate Dissimilarity Analysis for Incipient Fault Monitoring in Nonlinear Dynamic Processes. Comput. and Chem. Eng., 123, 143-154. 2019. doi: 10.1016/j.compchemeng.2018.12.027

Cite As

Karl Ezra Pilario (2020). Kernel PCA Contour Maps for Fault Detection (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (2)

I need to generate the t2 contribution plot for diagnosis purpose. Suppose; I have 6 variables, and my training samples consist of 500 observations. Trained kernel dimension is 500*500. When I calculate the T2 contribution; it gives a row of 500 columns. In the case of PCA, I used to get only 6 columns. Can you please help me to generate the contribution plots?

This is an excellent file. Can you please help me to generate T2 and SPE the contribution plots as well? It will be a great help. I am dealing with diagnosis problems mainly. Looking forward to hearing from you soon.



Plotted the T2 and Q contour maps into 2 different figures to keep their colormap settings separate.


Corrected typographical errors.

MATLAB Release Compatibility
Created with R2018b
Compatible with any release
Platform Compatibility
Windows macOS Linux