X-bar R control chart
What Is an Xbar-R Control Chart?
The Xbar-R control chart is a typical control chart used in statistical process control (SPC).
It can monitor changes in the process mean and variation at the same time, so it is widely used in manufacturing quality control.
| Index | Use |
|---|---|
| Xbar-R | Detecting process anomalies |
| Cp | Process capability evaluation |
| Cpk | Process capability evaluation including bias |
Examples of using Xbar-R control charts
- Dimension control
- Weight control
- Temperature control
- Pressure control
- Takt time control
Overview
Analyzes quality variation based on judgment rules
Samples are taken as groups of a few items each, and the groups are taken multiple times to create the Xbar-R control chart
The Xbar control chart is drawn at the top of the graph (blue)
Each blue dot is the mean of one group, and 90 groups are shown
Using the mean of the 90 groups as the center, the upper control limit (UCL) and lower control limit (LCL) are calculated, and each side is split into three
The R control chart is drawn at the bottom of the graph (green)
The R control chart shows the difference between the maximum and minimum within one group (variation)
Calculation
Calculate the subgroup average \(\bar{x}\) and the range R as maximum minus minimum
Calculate the average of all subgroup averages \(\bar{\bar{x}}\) and the average range
Calculate the UCL and LCL of the X-bar chart
\begin{align}
UCL = \bar{\bar{x}} + A_{2}\bar{R} \\
LCL = \bar{\bar{x}} - A_{2}\bar{R} \\
\end{align}
Calculate the UCL and LCL of the R chart
\begin{align}
UCL = D_{4} \times \bar{R} \\
LCL = D_{3} \times \bar{R} \\
\end{align}
| Subgroup size | A2 | D3 | D4 |
|---|---|---|---|
| 2 | 1.880 | 0.0 | 3.267 |
| 3 | 1.023 | 0.0 | 2.574 |
| 4 | 0.729 | 0.0 | 2.282 |
| 5 | 0.577 | 0.0 | 2.114 |
| 6 | 0.483 | 0.0 | 2.004 |
| 7 | 0.419 | 0.076 | 1.924 |
| 8 | 0.373 | 0.136 | 1.864 |
| 9 | 0.337 | 0.184 | 1.816 |
| 10 | 0.308 | 0.223 | 1.777 |
Judgment rules
JIS Z 9021:1998 defines the following decision rules as guidelines

Rule 1: one point beyond zone A

Rule 2: nine points in a row on the same side of the center line

Rule 3: six points in a row steadily increasing or decreasing

Rule 4: fourteen points in a row alternating up and down

Rule 5: two out of three consecutive points in zone A or beyond

Rule 6: four out of five consecutive points in zone B or beyond

Rule 7: fifteen consecutive points in zone C

Rule 8: eight consecutive points beyond zone C
Symbols
XbarR

- InData[]
- Input data
- Num
- Number of data inputs
- Xdata[]
- Xbar
- Rdata[]
- R
- Judge
- Judgment result (bits 0-7 correspond to rules 1-8)
- Xbarbar
- X average
- X_UCL
- X upper control limit
- X_LCL
- X lower control limit
- Rbar
- R average
- R_UCL
- R upper control limit
- R_LCL
- R lower control limit
Example
Ladder logic

Turning the Run contact ON captures the values of Data[] (set the number of array elements to the number of samples per group)
The calculated values are added to XbarData and RData, and judgment results and Xbarbar are output
At the same time, the execution count is incremented and output to Num
The in-out variables Num, XbarData and RData are used inside the FUN, so do not change them
To clear the data, clear Num, XbarData and RData
Also, values such as Xbarbar are calculated from XbarData and RData, so they are not stable until the amount of data increases
