Capability analysis CPK vs PPK calculation?

20 vues (au cours des 30 derniers jours)
Cailin
Cailin le 23 Oct 2023
Réponse apportée : Abhaya le 9 Août 2024
The S = capability(data,specs) function provides a capability analysis with resultant CPK (capability within subgroups), is there a way to calculate PPK (overall capability) for a data set?

Réponses (1)

Abhaya
Abhaya le 9 Août 2024
Hi,
I understand you want to calculate process performance index.
I have calculated the Ppk value for vector ‘x’ using following code. I have set the lower specification limit (LSL) = 9.8 and upper specification limit (USL) = 10.2 .
The code is as follows:
function S=ppkCalc(data,spec)
%claculate mean
S.mu=mean(mean(data));
%find the sum of square of each number
sumSq=sumsqr(data);
%find standard deviation
sz=size(data);
n=sz(1)*sz(2);
S.sigma=sqrt((sumSq-n*(S.mu^2))/(n-1));
LSL=spec(1);
USL=spec(2);
S.Ppk=min((S.mu-LSL)/(3*S.sigma),(USL-S.mu)/(3*S.sigma));
end
% the following measurement are for five different objects with target of 10 and tolerance 0.2
mat=[10.1 10.0 9.9 10.2 10.0;
10.0 10.1 9.8 10.2 10.1;
10.3 10.0 10.1 9.9 10.2;
10.0 9.9 10.1 10.0 10.2;
9.8 10.1 10.0 10.2 10.0];
%call the function
x=ppkCalc(mat,[9.8 10.2])
x = struct with fields:
mu: 10.0480 sigma: 0.1295 Ppk: 0.3913

Produits


Version

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by