Jump to content
  • To Search the Seeq Knowledgebase:

    button_seeq-knowledgebase.png.ec0acc75c6f5b14c9e2e09a6e4fc8d12.png.4643472239090d47c54cbcd358bd485f.png

Search the Community

Showing results for tags 'statistics'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Community Technical Forums
    • Tips & Tricks
    • General Seeq Discussions
    • Seeq Data Lab
    • Seeq Developer Club
    • Seeq Admin Forum
    • Feature Requests

Categories

  • Seeq FAQs
  • Online Manual
    • General Information

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Company


Title


Level of Seeq User

Found 3 results

  1. How would you go about calculating the deviation of one signal (in this case the bushing well 01 temp signal) from a setpoint signal? Please see the following signals below.
  2. Statistical Process Control (SPC) can give production teams a uniform way to view and interpret data to improve processes and identify and prevent production issues. Control charts and run rule conditions can be created in Seeq to monitor near-real time data and flag when the data indicates abnormal or out of control behavior. Creating a Control Chart 1. Find the signal of interest and a signal that can be used to detect the current production grade (ideally a grade code or similar signal - if this does not exist for your product, you can use process set points to stitch together a calculated grade signal). Use .tocondition() in formula to create a condition for each change in the Grade_Code signal. 2. Check data for normalcy and other statistical assumptions prior to proceeding. To check for normalcy, use the Histogram tool in Seeq. Find more information on the Histogram tool in the Seeq Knowledge Base. Note that for this analysis we are using a subgroup size of one and assuming normalcy. 3. Determine the methodology to use to create the average and standard deviation for each grade. In this case, we will identify periods after start-up when the process was in control using Manual Condition, and select these times across each grade. 4. Calculate the mean and standard deviation for each grade, based on the times the process was in-control. Choose a time window that captures all capsules created for the in-control period. To use an unweighted mean, use .toDiscrete() before calculating average. The same calculation for the mean can be used for the standard deviation, by replacing average() with stddev(). //Define the time period that contains all in control capsules $capsule = capsule('2020-10-16T00:00-00:00', '2021-09-21T00:00-00:00') //Narrow down data to when process is in control, use keep() to filter the condition by the specific grade code capsule property $g101 = $allgrades.keep('Grade Code',isMatch('Grade 101')).intersect($inControl) $g102 = $allgrades.keep('Grade Code',isMatch('Grade 102')).intersect($inControl) $g103 = $allgrades.keep('Grade Code',isMatch('Grade 103')).intersect($inControl) //Create average based on the times the product is in control, use .toDiscrete to create an unweighted average $g101_ave = $viscosity.remove(not $g101).toDiscrete().average($capsule) $g102_ave = $viscosity.remove(not $g102).toDiscrete().average($capsule) $g103_ave = $viscosity.remove(not $g103).toDiscrete().average($capsule) //Create average for all grades in one signal using splice(), use keep() to filter the condition by the specific grade code capsule property //use within() to show only average only during the condition 0.splice($g101_ave, $allgrades.keep('Grade Code',isMatch('Grade 101'))) .splice($g102_ave, $allgrades.keep('Grade Code',isMatch('Grade 102'))) .splice($g103_ave, $allgrades.keep('Grade Code',isMatch('Grade 103'))) .within($allgrades) 5. Use the mean and standard deviation to create +/- 1 sigma limits, +/-2 sigma limits, and +/-3sigma limits (sometimes called upper and lower control limits). Here is an example of creating the +2 sigma limit: //Add 2*standard deviation to the mean to create the $plus2sd limit, use within() to show limits only during the time periods of interest ($mean + (2*$standardDeviation)).within($grade_code) 6. Overlay the standard deviation limits and mean with the signal of interest by placing on one lane and one y-axis, remove standard deviation. Creating Run Rules Once the control chart is created, run rule conditions can be created to detect instability and the presence of assignable cause in the process. In this example, Western Electric Run Rules are used, but other run rules can be applied using similar principles. Western Electric Run Rules: Run Rule 1: Any single data point falls outside the 3sigma-limit from the centerline. Run Rule 2: Two out of three consecutive points fall beyond the 2sigma-limit, on the same side of the centerline. Run Rule 3: Four out of five consecutive points fall beyond the 1sigma-limit, on the same side of the centerline. Run Rule 4: NINE consecutive points fall on the same side of the centerline. 7. The following formulas can be used to create a condition for each run rule: Run Rule 1: //convert to a step signal $signalStep = $signal.toStep() //find when one data point goes outside the plus3sigma or minus 3sigma limits ($signalStep < $minus3sd or $signalStep > $plus3sd) //set the property on the condition .setProperty('Run Rule', 'Run Rule 1') Run Rule 2: *Note that the function toCapsulesByCount() is available in Seeq versions R54+ //Create step-interpolated signal to keep from capturing the linear interpolation between sample points $signalStep = $signal.toStep() //create capsules for every 3 samples ($toCapsulesbyCount) and for every sample ($toCapsules) $toCapsulesbyCount = $signalStep.toCapsulesByCount(3,3*$maxinterp) //set the maximum interpolation based on the longest time you would expect between samples $toCapsules = $signalStep.toCapsules() //Create condition for when the signal is not between +/-2 sigma limits //separate upper and lower to capture when the rule violations occur on the same side of the centerline $condLess = ($signalStep <= $minus2sd) $condGreater = ($signalStep >= $plus2sd) //within 3 data points ($toCapsulesByCount), count how many sample points are not between +/-2 sigma limits $countLess = $signal.todiscrete().remove(not $condLess).aggregate(count(),$toCapsulesbyCount,durationKey()) $countGreater = $signal.todiscrete() .remove(not $condGreater).aggregate(count(),$toCapsulesbyCount,durationKey()) //Find when 2+ out of 3 are outside of +/-2 sigma limits //by setting the count as a property on $toCapsulesByCount and keeping only capsules greater than or equal to 2 $RR5below = $toCapsulesbyCount.setProperty('Run Rule 5 Violations', $countLess, endvalue()) .keep('Run Rule 5 Violations', isGreaterThanOrEqualto(2)) $RR5above = $toCapsulesbyCount.setProperty('Run Rule 5 Violations', $countGreater, endvalue()) .keep('Run Rule 5 Violations', isGreaterThanOrEqualto(2)) //Find every sample point capsule that touches a run rule violation capsule //Combine upper and lower into one condition and use merge to combine overlapping capsules and to remove properties $toCapsules.touches($RR5below or $RR5above).merge(true) .setProperty('Run Rule', 'Run Rule 2') Run Rule 3: *Note that the function toCapsulesByCount() is available in Seeq versions R54+ //Create step-interpolated signal to keep from capturing the linear interpolation between sample points $signalStep = $signal.toStep() //create capsules for every 5 samples ($toCapsulesbyCount) and for every sample ($toCapsules) $toCapsulesbyCount = $signalStep.toCapsulesByCount(5,5*$maxinterp) //set the maximum interpolation based on the longest time you would expect between samples $toCapsules = $signalStep.toCapsules() //Create condition for when the signal is not between +/-1 sigma limits //separate upper and lower to capture when the rule violations occur on the same side of the centerline $condLess = ($signalStep <= $minus1sd) $condGreater = ($signalStep >= $plus1sd) //within 5 data points ($toCapsulesByCount), count how many sample points ($toCapsules) are not between +/-1 sigma limits $countLess = $signal.toDiscrete().remove(not $condLess).aggregate(count(),$toCapsulesbyCount, durationkey()) $countGreater = $signal.toDiscrete() .remove(not $condGreater).aggregate(count(),$toCapsulesbyCount,durationkey()) //Find when 4+ out of 5 are outside of +/-1 sigma limits //by setting the count as a property on $toCapsulesByCount and keeping only capsules greater than or equal to 4 $RR6below = $toCapsulesbyCount.setProperty('Run Rule 6 Violations', $countLess, endvalue()) .keep('Run Rule 6 Violations', isGreaterThanOrEqualto(4)) $RR6above = $toCapsulesbyCount.setProperty('Run Rule 6 Violations', $countGreater, endvalue()) .keep('Run Rule 6 Violations', isGreaterThanOrEqualto(4)) //Find every sample point capsule ($toCapsules) that touches a run rule violation capsule //Combine upper and lower into one condition and use merge to combine overlapping capsules and to remove properties $toCapsules.touches($RR6below or $RR6above).merge(true) .setproperty('Run Rule', 'Run Rule 3') Run Rule 4: //Create step-interpolated signal to keep from capturing the linear interpolation between sample points $signalStep = $signal.toStep() //create capsules for every 9 samples ($toCapsulesbyCount) and for every sample ($toCapsules) $toCapsulesbyCount = $signalStep.toCapsulesByCount(9,9*$maxinterp) //set the maximum interpolation based on the longest time you would expect between samples $toCapsules = $signalStep.toCapsules() //Create condition for when the signal is either greater than or less than the mean //separate upper and lower to capture when the rule violations occur on the same side of the centerline $condLess = $signalStep.isLessThan($mean) $condGreater = $signalStep.isGreaterThan($mean) //Find when the last 9 samples are fuly within the greater than or less than the mean //use merge to combine overlapping capsules and remove properties $toCapsules.touches(combinewith($toCapsulesbyCount.inside($condLess), $toCapsulesbyCount.inside($condGreater))).merge(true) .setproperty('Run Rule', 'Run Rule 4') **To make it easier to use these run rules in Seeq, custom formula functions can be created for each run rule using the User Defined Formula Function Editor Add-on which can be found in Seeq’s Open Source Gallery along with user guides and instructions for installation. For example, Run Rule 2 can be simplified to the following formula using the User-Defined Formula Functions Add-on with Seeq Data Lab: $signal.WesternElectric_runRule2($minus2sd, $plus2sd) 9. If desired, all run rules can be combined into one condition in formula using .combinewith(): combineWith($runRule1,$runRule2,$runRule3, $runRule4) 10. As a final step, a table can be created detailing the run rule violations in the trend view. Here, the header column is set as ‘Capsule Property’ >> ‘Run Rule’ and the capsule properties, start, end, and duration were added as columns. The last value of the signal ‘Grade_Code’ was also added as a column to the table. For more information on Tables, see the Seeq Knowledge Base.
  3. 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. 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). 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: $viscosity.within($grade==101) 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. With the condition defined you can use chain view to view the campaigns end-to-end. 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. 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. 6. Calculate the sample standard deviation using the Signal from Condition tool. 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) 8. View the Cpk value in a table by toggling to table view. 9. Scale the Cpk calculation across all product types in the asset group using the asset functionality available in tables. 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. Final result:
×
×
  • Create New...