My Bivariate Ppk Error Ellipse Graphing Tool

JaxonH

Registered
Ok. Let me start off by saying this is not something you'll read about in a textbook, nor is it standard practice.

However.

I believe the way we think about 2D coordinate data and positional capability is inadequate. Here is a good example of why that is:

Error Ellipse Why It Matters.png

So how can we assess positional capability accounting for it's 2-dimensional nature? There have been many proposed methods, but I have found the error ellipse to be the most informative approach, though it does have its drawbacks.

Drawback #1: "Bivariate Ppk" is a term I came up with to describe Ppk of a 2-dimensional nature. Customers won't know what this is. So this tool is really for internal analysis only (though I have found customers love seeing the ellipse graphed against the positional tolerance).

Drawback #2: If the centroid of the distribution lies outside the tolerance, the bivariate Ppk cannot be calculated. In 1 dimension, you can simply go left or right, so means which lie beyond the spec limit only have one direction to go. But in 2 dimensions, there are infinite directions, and since Ppk technically reports "worst case", the worst case cannot be calculated. The best case can be calculated, in the direction toward nominal, but that is not how Ppk works. However, if your centroid lies outside the tolerance, I don't think you need a bivariate Ppk to tell you that you have problems :)

So allow me to explain where this all came from, and how I calculated the error ellipse mathematically:

Error Ellipse Explanation.png

Because the data is not time-ordered, Cpk and Cp go out the window. It is what it is. I experimented with a Cpk Ellipse using sigmas calculated from Moving Range, but ultimately it didn't add much value. If your process is in control, the Cpk Error Ellipse is virtually identical to the Ppk Error Ellipse anyways. And as we all know, capability analysis is useless with an out of control process. So there ya go.

Here is what the Error Ellipse looks like. Click the graph to auto-resize. You must enter the nominal (x,y) and tolerance for the TP, then paste the data underneath. If it's using material condition, you must also enter the USL and LSL for diameter, and paste that data underneath. Because the expanded tolerance would be different for every part, and that would make the graph too messy, i use the minimum of either "mean minus 3 st dev" and the "min data point". Whichever is lowest, that is used for the expanded tolerance calculation, as a safety net.

The 3 sigma ellipse is based off the square of the mahalanobis distance which follows the Chi-Square distribution, and is set to cover exactly 99% of the process.

I've used this for many years now, and was always reluctant to share it because it's a novel approach, and I feared criticism from statistical gurus who would pick it apart. But, it's been so useful I just can't keep it to myself any longer.

Error Ellipse Example.png
 

Attachments

  • Error Ellipse.xlsm
    1.1 MB · Views: 55
  • Error Ellipse Example.png
    Error Ellipse Example.png
    75.4 KB · Views: 9

Miner

Forum Moderator
Leader
Admin
Actually, you have raised many excellent points and that there are many problems with applying capability indices to GD&T callouts, particularly for position. This has come up before, and another Cover has done a lot of work on this topic. I will try to locate it and link it to this thread.
 

Miner

Forum Moderator
Leader
Admin
@JaxonH I could not locate the threads that I mentioned, but I reached out to the poster on LinkedIn and asked him to reply. I have not talked with him since pre-pandemic, so I hope that he will respond. He did some excellent work along similar lines to your efforts.
 

JaxonH

Registered
@JaxonH I could not locate the threads that I mentioned, but I reached out to the poster on LinkedIn and asked him to reply. I have not talked with him since pre-pandemic, so I hope that he will respond. He did some excellent work along similar lines to your efforts.

I think I know the thread you're referring to. I remember seeing the dual histograms plotted for the position and diameters, if it's the same one I'm thinking of. It was an interesting approach, and actually inspired me to create the error ellipse in the first place (well, credit should also be given to a certain engineer from GKN who was first to bring this issue to my attention, though he couldn't figure out a way to work out the math).
 

Miner

Forum Moderator
Leader
Admin
(well, credit should also be given to a certain engineer from GKN who was first to bring this issue to my attention, though he couldn't figure out a way to work out the math).
That is probably the same person (definitely the same company), and he had figured out the math when I last discussed it with him.
 

MOester

Starting to get Involved
I think I know the thread you're referring to. I remember seeing the dual histograms plotted for the position and diameters, if it's the same one I'm thinking of. It was an interesting approach, and actually inspired me to create the error ellipse in the first place (well, credit should also be given to a certain engineer from GKN who was first to bring this issue to my attention, though he couldn't figure out a way to work out the math).

Hi Jaxon. I'm the guy from GKN and I HAVE sorted out how to do this. What do you need to know?
 

JaxonH

Registered
Hi Jaxon. I'm the guy from GKN and I HAVE sorted out how to do this. What do you need to know?

Hey Mark, how's it going? I figured you would by now, as that was many years ago when we spoke about this. At the time, I remember you had suggested regression analysis could work to find the major axis of the ellipse, but hadn't yet developed a spreadsheet to do the calculations.

I tried using that approach, and did use it for a few years, but ultimately ran into some problems with it. It worked some times, but other times not as well. So I tried something different- using a covariance matrix to derive the eigenvalues/eigenvectors of the major and minor axis of the ellipse. This has worked better for me than the regression, actually. You can get an ellipse from it based on the mahalanubis distance- basically a distance that's equal to a standard deviation in all directions based on the variation in each direction.

I am curious though what your approach is when the centroid lies outside the tolerance. I can find no solution to this aside from calculating in the direction toward nominal, which doesn't seem very useful.
 

MOester

Starting to get Involved
So first, using the major and minor axes of the ellipse and THEN finding the "closest" edge to the tolerance is challenging. With the mindset having something simple that others could replicate, THAT solution would require software or a macro heavy spreadsheet.

Ages ago, I tried using something I called "principle standard deviation" method. In this, you basically square root the sum of the squares of the standard deviations of the coordinates. Then just use THAT as the standard deviation. Again, running lots of simulations, that didn't work in every case. Especially if the shape of the distribution was close to round/uniform. It tended to understate capability in those cases.

So I looked for a trigger point and actually found one. With this approach I found satisfactory results in all cases without all the crazy number crunching. It agreed to 2 decimal places with the strict approach in every case I tried. To me, that's good enough. (Honestly, how many decimal places do we believe when we calculate capability anyway?)

What I do, that's easy to code is:

1) Get the x,y data for the true position (the TP data is not needed at all)
2) Calculate the mean and sigma of x and y
3) Examine the two standard deviations:
3a) If max_sigma/min_sigma > 3.5, calculate principle_sigma = SQRT(sigma_x^2+sigma_y^2) and use principle_principle sigma for sigma
3b) Otherwise, just use max_sigma for sigma
4) Calculate your metrics thus:

Cp = (True position tolerance) / 6sigma

Cpk = (Half TP tolerance - distance from nominal to xmean,ymean) / 3sigma

What I found was you only needed to really start worrying about how "squashed" the distribution was if it had a ratio of 3.5 or more.

(This is from memory, I will try and find the writeup I did. I don't know if I can post something with company branding on it. So it will take me some time to get it on a neutral presentation)
 
Top Bottom