When talking about Manufacturing, data are becoming more and more important. I’ve studied different kinds of manufacturing processes and I can say that we can understand if there can be some manufacturing issues in the process, just by analyzing the data; of course, after the analysis, if we think that some manufacturing issues might exist, the process has to be investigated in the manufacturing production environment.
Before going on, I’ve to say that this methodology is tested and validated on real case studies, but the plots I’m going to show in this article have been generated on simulated data. Of course, even if the numbers are simulated, this does not influence the process, which remains valid as it is: the numbers shown are just references to understand the process.
The first thing to know is that I’ve analyzed just manufacturing processes realized by human operators: I’ve never (until now) analyzed manufacturing processes made by robots, or automated in some way (for which, I think, the study has to be conducted differently). This way of analyzing manufacturing data can give good results in lots of manual manufacturing processes; they can be: welding, assembling, functional testing, sheet metal bending, and similar.
So, let’s say we have a product that is realized in ‘x’ manufacturing phases. It is not important what’s the value of ‘x’, because this methodology is general and it’s useful to study one phase at a time. Let’s say we have registered and stored the manufacturing data for our product. The data we have are the time needed to manufacture the product, for each phase, and we even know when is manufactured (the date, expressed as day, month and year). Finally, we define ‘cycle time’ as the time needed to manufacture our product, for each phase.
So, now let’s say we have imported and cleaned our data (the ‘cycle times’) and we want to see the cycle times, for each month, scattered with a regression line.Let’s call our data frame ‘phase’. First of all, we want to extract the ‘month’ from the column ‘date’ and we want to add the ‘month’ as a new column of our data frame; we can do it this way:
#Pandas as pd already imported
phase['month'] = pd.DatetimeIndex(phase['date']).month
Now, we can plot a scatterplot of the cycle times, for each month, with a Regression line:
import seaborn as sns
import matplotlib.pyplot as plt
#plotting the time series analysis with a regression line
sns.regplot(data=phase, x="month", y="time",
line_kws={"color": "red"})
#labeling
plt.title(f"LINEAR REGRESSION OF THE TIME SERIES ANALYSIS", fontsize=25) #plot TITLE
plt.xlabel("MONTH", fontsize=20) #x-axis label
plt.ylabel("CYCLE TIMES [m]", fontsize=20) #y-axis label
And this is the outcome:
So, from April (month 4) to October (month 10), the mean cycle time has increased, as the regression line has a positive slope. Is this all we can say? Can we analyze this phase a little deeper?
We can try a box plot analysis and see if it can help us. Let’s create the box plots:
#boxplot
sns.boxplot(data=phase, x='month', y='time')
#labeling
plt.title(f"BOXPLOT", fontsize=16) #plot TITLE
plt.xlabel("MONTH", fontsize=14) #x-axis label
plt.ylabel("CYCLE TIME[m]", fontsize=14) #y-axis label
#adding an horizotal line to the mean cycle time
plt.axhline(mean, color="red") #horizontal line of mean cycle time
red_line = mpatches.Patch(color="red",
label=f"mean value: {mean:.1f} [m]")
#handling the legend
plt.legend(handles=[red_line],prop={"size":12})
And this is the outcome:
The boxplot seems to be more helpful. In fact, we can see that from April to June the boxes ‘fluctuate’ a bit, and this is ok; but then…from July to October there is a clear shift of the boxes to higher cycle times!
Of course, we have no information on what caused this shift, but since the shift is clear, even according to the regression line, there is an increase in the cycle time.
This analysis gives us the input to go into the details, trying to understand what caused the increase in the cycle time and understand if it can be removed or not. Because, since we are in manufacturing, the increase in the cycle time can be due to the need to increase the quality of the product (I manufacture it slower, increasing the quality and decreasing the errors, for example).
Conclusions
I think this methodology is really helpful to understand if there can be a ‘systemic manufacturing issue’, analyzing the data we have. Of course, after this analysis, the manufacturing process has to be analyzed in the production environment to understand why this systemic manufacturing issue occurred, what is it, and if has to be removed or not.
Let’s connect together!
LINKEDIN (send me a connection request)
If you want, you can subscribe to my mailing list so you can stay always updated!
Consider becoming a member: you could support me and other writers like me with no additional fee. Click here to become a member.