Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Microsoft .Net
 SPC Control Chart Tools for .Net
 Nelson Rules starting from a point

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
gsoldavi Posted - 09 Jan 2017 : 08:55:40
Hi there,

Is there a way to let charts (in this case XbarR) start evaluating Nelson rules starting from a specific point?
I.e.: I have 40 points but first ones (20) are used only for calculating control limits and should be excluded also for rules.

Thank you for the support in advance.
Giorgio
10   L A T E S T    R E P L I E S    (Newest First)
gsoldavi Posted - 14 Feb 2017 : 02:42:02
Hi,

thank you. I send you a small project in order to show you what's happening.
Thank you for your support.
quinncurtis Posted - 13 Feb 2017 : 16:40:29
Sorry but there are too many unknowns in your example. We cannot reproduce the problem. A calculated LCL value < 0 is means that there is no LCL value, since you cannot have a negative ABS(Range) value in the range chart. In the AutoCalculateControl method this value is clamped to 0 if the calculated value is < 0. In the case of UpdateControlLimitsUsingMeanAndSigma, it is not clamped to 0. If that is what you intend to use you should set it to 0 in this special case.

For the secondary (Range) chart

if ( (mean - 3 * standarddeviation) < 0 )
this.SecondaryChart.GetControlLimitData(SPCChartObjects.SPC_LOWER_CONTROL_LIMIT).LimitValue = 0;


Please send us (support@quinn-curtis.com) the a zipped project of the simplest possible example which uses your data to reproduce the problem.
gsoldavi Posted - 13 Feb 2017 : 16:11:35
Dear,

I've found a strange behavior with UpdateControlLimitsUsingMeanAndSigma method; you can easely test it with following data:

SortedDictionary<DateTime , double[]> lstData = new SortedDictionary<DateTime , double[]>();
private void SetData()
{
lstData.Add(DateTime.Parse("2017-01-27 15:12:59.087"), new double[] { 0.240, 0.250, 0.260 });
lstData.Add(DateTime.Parse("2017-01-26 16:34:27.243"), new double[] { 0.270, 0.370, 0.320 });
lstData.Add(DateTime.Parse("2017-01-26 14:07:35.947"), new double[] { 0.240, 0.280, 0.290 });
lstData.Add(DateTime.Parse("2017-01-25 09:18:54.097"), new double[] { 0.260, 0.230, 0.240 });
lstData.Add(DateTime.Parse("2017-01-13 17:41:36.010"), new double[] { 0.250, 0.280, 0.270 });
lstData.Add(DateTime.Parse("2017-01-12 14:29:08.527"), new double[] { 0.250, 0.240, 0.240 });
lstData.Add(DateTime.Parse("2017-01-12 11:06:28.777"), new double[] { 0.280, 0.450, 0.160 });
lstData.Add(DateTime.Parse("2017-01-11 18:15:51.697"), new double[] { 0.200, 0.200, 0.250 });
lstData.Add(DateTime.Parse("2017-01-11 17:32:29.550"), new double[] { 0.250, 0.250, 0.250 });
lstData.Add(DateTime.Parse("2017-01-11 16:23:49.710"), new double[] { 0.260, 0.270, 0.240 });
lstData.Add(DateTime.Parse("2017-01-10 16:21:05.347"), new double[] { 0.260, 0.240, 0.230 });
lstData.Add(DateTime.Parse("2017-01-10 14:37:24.940"), new double[] { 0.260, 0.270, 0.280 });
lstData.Add(DateTime.Parse("2017-01-05 11:11:34.193"), new double[] { 0.350, 0.240, 0.250 });
lstData.Add(DateTime.Parse("2017-01-04 17:20:42.967"), new double[] { 0.400, 0.260, 0.250 });
lstData.Add(DateTime.Parse("2017-01-04 14:13:56.110"), new double[] { 0.270, 0.240, 0.250 });
lstData.Add(DateTime.Parse("2017-01-04 09:08:19.700"), new double[] { 0.250, 0.330, 0.290 });
lstData.Add(DateTime.Parse("2017-01-03 16:07:22.420"), new double[] { 0.250, 0.300, 0.230 });
lstData.Add(DateTime.Parse("2017-01-03 15:32:56.863"), new double[] { 0.250, 0.260, 0.240 });
lstData.Add(DateTime.Parse("2017-01-02 14:49:42.240"), new double[] { 0.250, 0.280, 0.270 });
lstData.Add(DateTime.Parse("2017-01-02 09:23:41.553"), new double[] { 0.185, 0.188, 0.175 });
lstData.Add(DateTime.Parse("2016-12-30 11:54:00.193"), new double[] { 0.250, 0.300, 0.275 });
lstData.Add(DateTime.Parse("2016-12-28 09:28:58.377"), new double[] { 0.260, 0.240, 0.400 });
lstData.Add(DateTime.Parse("2016-12-27 16:58:43.743"), new double[] { 0.250, 0.200, 0.400 });
lstData.Add(DateTime.Parse("2016-12-27 16:16:18.253"), new double[] { 0.250, 0.450, 0.460 });
lstData.Add(DateTime.Parse("2016-12-27 15:56:55.037"), new double[] { 0.250, 0.260, 0.220 });
lstData.Add(DateTime.Parse("2016-12-27 15:51:44.213"), new double[] { 0.240, 0.250, 0.260 });
lstData.Add(DateTime.Parse("2016-11-14 17:27:47.240"), new double[] { 0.270, 0.390, 0.190 });
lstData.Add(DateTime.Parse("2016-11-14 16:24:21.253"), new double[] { 0.220, 0.420, 0.300 });
lstData.Add(DateTime.Parse("2016-11-14 15:15:59.083"), new double[] { 0.250, 0.252, 0.251 });
lstData.Add(DateTime.Parse("2016-11-14 14:11:05.863"), new double[] { 0.220, 0.260, 0.340 });
lstData.Add(DateTime.Parse("2016-11-14 12:29:40.247"), new double[] { 0.250, 0.280, 0.270 });
lstData.Add(DateTime.Parse("2016-11-11 12:20:39.910"), new double[] { 0.250, 0.150, 0.150 });
lstData.Add(DateTime.Parse("2016-10-13 14:02:24.693"), new double[] { 0.250, 0.250, 0.250 });
lstData.Add(DateTime.Parse("2016-10-06 14:05:48.317"), new double[] { 0.260, 0.220, 0.250 });
lstData.Add(DateTime.Parse("2016-08-29 16:35:08.193"), new double[] { 0.100, 0.200, 0.150 });
}


I use this sample data to calculate LCL/UCL/TARGET with AutoCalculateControlLimits(), with following results:
Xbar
---------------
Target 0,262
UCL 0,339
LCL 0,185
sigma 0,026

Range
---------------
Target 0,075
UCL 0,194
LCL 0,000
sigma 0,040

First of all I get two different graphical results using (or not) Nelson Rules.

Not using Nelson Rules:
After using Mean and Sigma on both charts, primary seems working correctly but secondary LCL is set to -0.043 (sigma approssimated?).

Using Nelson Rules
After using Mean and Sigma on both charts, primary seems working correctly but secondary LCL seems to be equals Target.
quinncurtis Posted - 10 Jan 2017 : 13:18:17
You should use the UpdateControlLimitsUsingMeanAndSigma method, calling it for the Primary, and Secondary chart. If you know the +3 sigma control limit (HCL), and mean for each chart, you can easily calculate the sigma value as: sigma = ( HCL - mean)/3. It recalculates every control limit for the chart, based on the mean and sigma values.

this.PrimaryChart.UseNamedRuleSet(SPCControlLimitRecord.NELSON_RULES);

double primean = 31.6;
double prisigma = 5.1;
this.ChartData.UpdateControlLimitsUsingMeanAndSigma(SPCChartObjects.PRIMARY_CHART, primean, prisigma);

double secmean = 5.1;
double secsigma = 1.4;
this.ChartData.UpdateControlLimitsUsingMeanAndSigma(SPCChartObjects.SECONDARY_CHART, secmean, secsigma);
gsoldavi Posted - 10 Jan 2017 : 12:42:19
Yes, I will probably show only data with limits already calculated as you suggest.

Please can you tell me something more about 3-sigma settings.
I mean: I can add samples specifying also custom Target/UCL-3/LCL-3 values for both charts (primary and secondary).
Should I also set sigma-2 and sigma-1? If yes, which is the correct order on the array?

Thank you again for the support
quinncurtis Posted - 10 Jan 2017 : 11:51:22
I can tell you how to disable the alarm lines and/or the control rule checking for an entire graph, but not for individual sample intervals, or a block of sample intervals.

You can display two charts, side by side, as two separate instances of the chart control (placed that way in a form), each with different data. The first would display the first set of values, with no alarm checking, and the second would display subsequent values, with alarm checking. It would take a wide screen, but would give you both, independently scrollable, charts that you want.
gsoldavi Posted - 10 Jan 2017 : 11:21:59
Basically I'm working like this:

On first object (ucChart)
- Load first 20 samples and autocalculate limits
- Store limits on software

On second object (ucChart)
- disable autocalculate limits
- load samples with limits specified manually
In this case first 20 samples are not added with limits.

This seems working good except that rules are applied for the entire set.
quinncurtis Posted - 10 Jan 2017 : 09:28:37
Sorry, but your cannot mark a data point as in or out of alarm. The control limits determine when a sample interval is in alarm.

It sounds like you should run the 20 data points, auto-calculate the control limits, and then add your additional points. It seems a very small thing that the control limits are applied to the first 20 data points, which after all should be specifically chosen for when the process is in-control, therefore alarms should be very rare in that sample group.
gsoldavi Posted - 10 Jan 2017 : 03:57:49
Thank you for the reply!
yes this is what actually I'm doing but, and it's my fault, I missed on my first post to specify that customer would like to see also first points.

By the way I understand chart behavior and I'm thinking about using two charts: one for calculating and rising alarms and another one (with rules disabled) for dispalying data. Because of this, my next question is: is it possible to manually mark a point as alarm?

Thank you for the support.
Giorgio
quinncurtis Posted - 09 Jan 2017 : 13:21:21
This answer applies to all of the SPC chart types, not just the Nelson Rules.

Setup the chart the way you want to see it, up to the point where you start to add data.

You can enter the first 20 sample intervals into the software. We do this in all of our examples using a SimulateData method. We assume your method is AddFirst20SampleIntervalsForControlLimits.

Then, call AutoCalculateControlLimits to calculate the control limits. This will create control limits based on the first 20 sample intervals. Then, reset the data back to empty using the ResetSPCChartData method.

Then add your data after the first 20 data points you used to calculate the control limits. We assume your method is AddDataYouWantToPlot.

Finish off with the AutoScale and Rebuild routines.

The original 20 points you used in the calculation will not be present in the chart. Only the ones you entered after the reset of the data will be present. There is no way to start the control rule evaluation in the middle of the chart data.


// This is your function
AddFirst20SampleIntervalsForControlLimits();

// Calculate the SPC control limits for both graphs of the current SPC chart (X-Bar R)
this.AutoCalculateControlLimits();

//Clear the data
this.ResetSPCChartData();

// This is your function
AddDataYouWantToPlot();

// Scale the y-axis of the X-Bar chart to display all data and control limits
this.AutoScalePrimaryChartYRange();

// Scale the y-axis of the Range chart to display all data and control limits
this.AutoScaleSecondaryChartYRange();

// Rebuild the chart using the current data and settings
this.RebuildChartUsingCurrentData();



Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07