SPC block data quality overview
How the SPC block handles data of bad quality
All data coming into the SPC block (both good and bad data) is stored in a time window. The data is then resampled according to the user configuration (sampling rate, subgroup size, and number of subgroups). If a data point is bad at the resampled data point, it is not added to the list of data points for that subgroup.
Quality requirements to produce SPC statistics
Subgroup requirements: For a subgroup to return an SPC value (such as subgroup mean) there must be at least two valid data points in that subgroup.
Window requirements: For a window to return an SPC statistic, at least two of the subgroups must have valid results.
Note: These requirements are only for the SPC block running on a subgroup size greater than one. There are special case calculations when the subgroup size is set to 1.
How SPC handles irregular samples
Irregular samples are handled automatically because data is resampled according to the user configuration (sampling rate and subgroup size).
For example:
The user configures a sampling rate of 60 seconds, 4 samples per subgroup, and a total of 5 subgroups. This means that the subgroup size is 4 minutes and the total window size is 20 minutes. The block executes at timestamp T0. Irregular samples come into the block at T-20 (20mins ago), T-18 (18 mins ago), T-14 (14 mins ago), T-7 (7 mins ago), and T-1 (on the previous execute).
When the block executes it resamples the window in 60 second intervals. This creates the samples for the subgroups as follows:
Subgroup number | Data point in subgroup | Timestamp | Value |
1 | 1 | T-20 | 1 |
1 | 2 | T-19 | 1 |
1 | 3 | T-18 | 2 |
1 | 4 | T-17 | 2 |
2 | 1 | T-16 | 2 |
2 | 2 | T-15 | 2 |
2 | 3 | T-14 | 3 |
2 | 4 | T-13 | 3 |
3 | 1 | T-12 | 3 |
3 | 2 | T-11 | 3 |
3 | 3 | T-10 | 3 |
3 | 4 | T-9 | 3 |
4 | 1 | T-8 | 3 |
4 | 2 | T-7 | 4 |
4 | 3 | T-6 | 4 |
4 | 4 | T-5 | 4 |
5 | 1 | T-4 | 4 |
5 | 2 | T-3 | 4 |
5 | 3 | T-2 | 4 |
5 | 4 | T-1 | 5 |
This data is then used in the SPC calculation. Here you can see that the block received only 5 data points in the previous 20 minutes, but that the data was resampled into 20 data points for the subgroup data to be used in the SPC calculation.
Bad quality data with irregular samples:
If the data point at T-14 was of bad quality, it would mean that data points T-14 to T-8 would not be added to the subgroups. This gives us the following data:
Subgroup number | Data point in subgroup | Timestamp | Value |
1 | 1 | T-20 | 1 |
1 | 2 | T-19 | 1 |
1 | 3 | T-18 | 2 |
1 | 4 | T-17 | 2 |
2 | 1 | T-16 | 2 |
2 | 2 | T-15 | 2 |
3 | |||
4 | 2 | T-7 | 4 |
4 | 3 | T-6 | 4 |
4 | 4 | T-5 | 4 |
5 | 1 | T-4 | 4 |
5 | 2 | T-3 | 4 |
5 | 3 | T-2 | 4 |
5 | 4 | T-1 | 5 |
Here we see that:
-
Subgroup 2 now has only 2 data points.
-
Subgroup 3 is empty because the bad quality data is not used.
-
Subgroup 4 now has only 3 data points.
However, we can however still get an output at the execute time of T0 because we still have enough subgroups to produce results.
Related topics: