Jump to content

Scale automated Cpk calculations across product types

Recommended Posts

Use Case: Cpk measures process capability to produce a given product type at target and within its sales specifications. Cpk analysis can be used to inform selling prices for products that are particularly challenging to run on production units and can in some cases warrant abandoning certain products to free up reactor space for product grades that are more easily made on specification. 

Challenges: Cpk calculations are done infrequently and retroactively in most cases due to the time consuming nature of the analysis. A large chunk of time is spent dividing up data into different product types and then calculating the metrics for each type. When the analysis is requested again, the process is repeated leading to significant drain on engineering resources. 

Solution: Seeq's asset groups can be used to address this use case in a highly automated and scalable manner. By building as asset group that creates "assets" for each product type, we can automatically segment the data for a given quality parameter into different data sets by product type. Using asset groups allows us to build out Cpk calculations for a single product type and then instantly calculate them for the remaining product types with just a couple of clicks. Seeq capsules, aggregations, and formulas are integral to performing this analysis. 


Analysis Steps:

1. Locate the signal of interest, the upper specification limit, the lower specification limit, and a signal that can be used to detect the current production grade (ideally a grade code signal - if this does not exist for your product, you can use process set points to stitch together a calculated grade signal). 

2. Build the asset group. Seeq asset groups can be used to generate small-medium-sized use-case-specific asset structures to help scale analytics. General instructions for how to build an asset group are available on the Seeq Knowledge Base

For this asset group, create an asset for each product type produced on your production line using the Add Asset button. Click on the asset name to rename it to the product type. Note that asset groups are evergreen, and you can always add additional product types to the asset group if new grades are developed. 

Screen Shot 2022-03-23 at 6.24.02 PM.png

Add columns to your asset group for the Quality parameter signal, the grade code, and the upper and lower specification limits. Use the "+" button in each table cell to map the correct signal to each of the assets. Note, the signal will be the same for each product type asset (same for each row in a given column). 

Screen Shot 2022-03-23 at 6.28.47 PM.png

Create a filtered version of the Viscosity, Viscosity LSL, and Viscosity USL signals by creating a new Column with a Calculated item. The following formula be used for a grade code signal that is numeric:


Alternatively, for a string grade code, the value of the grade should be entered in quotes, for example,

$viscosity.within($grade=='Grade 101') 

The calculated formulas will automatically be applied to all other rows in the asset group table. Edit each row to ensure the correct grade is used in the filtering formula. 

Repeat the steps above for each of the filtered signals needed for the analysis. 

At this point, the asset group is ready for use. Make sure to click save before closing. 

For those comfortable programming in python, an identical asset tree with the original and filtered signals can be created using Seeq Data Lab and spy.assets or spy.trees. 

3. Optional Step: To leverage chain view to see data from each of the campaigns of a given product back-to-back, create a condition for when there is data. The Value Search tool can be used to do this, by looking for time periods when the viscosity signal is not equal to zero. 

Screen Shot 2022-03-23 at 7.32.25 PM.png

With the condition defined you can use chain view to view the campaigns end-to-end. 

Screen Shot 2022-03-23 at 7.30.53 PM.png

4. Begin to build the Cpk calculations. The first step is to define the window over which Cpk will be calculated. This could be periodic, rolling, or relative to the current time. In this example, we will use formula to create a condition containing a single capsule beginning 3 months prior to now and ending at now. 

Screen Shot 2022-03-23 at 7.34.57 PM.png

The following formula can be used to create such a condition, where 94 days is the maximum capsule duration -- longer than the longest possible 3-month period. 

condition(94d, capsule(now()-3months,now()))

5. Calculate the inputs into the Cpk formula, beginning with the sample mean. This can be calculated using the Signal from Condition tool. 

Screen Shot 2022-03-23 at 7.36.47 PM.png

6. Calculate the sample standard deviation using the Signal from Condition tool. 

Screen Shot 2022-03-23 at 7.36.47 PM.png

7. Calculate Cpk using formula with the input variables: sample mean, sample standard deviation, viscosity LSL, viscosity USL. 

min($ucl-$avg, $avg-$lcl)/(3*$sd)

Screen Shot 2022-03-23 at 7.39.17 PM.png

8. View the Cpk value in a table by toggling to table view. 

Screen Shot 2022-03-23 at 7.03.52 PM.png

9. Scale the Cpk calculation across all product types in the asset group using the asset functionality available in tables.

Screen Shot 2022-03-23 at 7.04.54 PM.png

Screen Shot 2022-03-23 at 7.05.01 PM.png

10. Alternatively, view the Cpk values across assets as a bar chart, to better visualize the magnitude of Cpk values relative to those of other product grades. 

Screen Shot 2022-03-23 at 7.05.21 PM.png

Final result:

Screen Shot 2022-03-23 at 7.05.35 PM.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...