# Indirect System Condition Monitoring Using Online Bayesian Changepoint Detection

Emil Tochev, Harald Pfifer, Svetan Ratchev

► To cite this version:

Emil Tochev, Harald Pfifer, Svetan Ratchev. Indirect System Condition Monitoring Using Online Bayesian Changepoint Detection. 9th International Precision Assembly Seminar (IPAS), Dec 2020, Held virtually, Unknown Region. pp.81-92, 10.1007/978-3-030-72632-4_6. hal-03520390

HAL Id: hal-03520390

https://inria.hal.science/hal-03520390

Submitted on 11 Jan 2022

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Indirect System Condition Monitoring using Online
Bayesian Changepoint Detection

E. Tochev¹[0000-0001-8294-781X], H. Pfifer¹[0000-0001-6734-704X] and S. Ratchev¹[0000-0001-9955-2806]

¹ University of Nottingham, Nottingham, UK

**Abstract.** This paper presents a method for online vibration analysis and a simple test bench analogue for the solder pumping system in an industrial wave-soldering machine at a Siemens factory. A common machine fault is caused by solder build-up within the pipes of the machine. This leads to a pressure drop in the system, which is replicated in the test bench by restricting the flow of water using a gate valve. The pump's vibrational response is recorded using an accelerometer. The captured data is passed through an online Bayesian Changepoint Detection algorithm, adapted from existing literature, to detect the point at which the change in flow rate affects the pump, and thus the PCB assembly capability of the machine. This information can be used to trigger machine maintenance operations, or to isolate the vibrational response indicative of the machine fault.

**Keywords:** Predictive Maintenance, Bayesian Changepoint Detection, Industrial application.

# 1 Introduction

This paper is a follow up to an offline fault detection algorithm applied to the presented machine use case [1]. It describes an online, non-disruptive technique to detect a machine fault in a wave-soldering machine in Printed Circuit Board (PCB) manufacturing. This machine works by maintaining a constant flow of solder in the form of a set wave height, over which PCBs are passed in order to connect large numbers of through-hole components efficiently. The fault in question is solder build-up in the machine pipes, which was considered the most common recurring machine fault in the wave-soldering process by Siemens Congleton. As time passes there is a buildup of solder dross in the pipes, which leads to a pressure drop and reduced solder flow rate. Due to the resultant reduced solder wave height, PCBs passing over the wave are left unsoldered, needing repairs and touch ups. The response to these is manual adjustment of the wave height by increasing the pump power. This can be performed a set number of times before full machine maintenance is performed. This process is reactive and repeated on a weekly to monthly basis depending on the solder quality and machine uptime. The project brief set by Siemens requires a non-disruptive and low-cost solution to monitor the machine. The goal is to improve the fault detection rate and reduce the number of unsoldered products.
Awareness of a machine's state at any given time is valuable for making predictive maintenance decisions. Costly maintenance and machine downtime can be minimized effectively by implementing early and accurate fault detection [2]. This is particularly valuable during the current push towards Industry 4.0 (I4.0) [3] and is enabled by the increased prevalence of Industrial Internet of Things (IIoTs) allowing for a greater ability of factories to gather and process machine data [4]. However, the financial and time costs of directly replacing and upgrading machines can dissuade a lot of companies from investing in these technologies. As such, a "wrap and re-use" approach is generally taken instead [5]. This concept of minimal disruption to existing machine setups and production lines, alongside the extraction of new data, without machine downtime is a key motivator for this paper and the proposed methodology.

Due to its age and the hostile internal environment, the wave-soldering machine use case presented in this paper is significantly limited in the usable data that can be collected from it. As such, pump vibrations are used for the vibration analysis in this paper as access to other components is effectively impossible. Pump vibration monitoring is not unique, and many examples can be found in literature [6], [7]. Techniques include comparing recorded pump vibrations against a model of the expected vibrations [8] and using pump vibrations to predict cavitation by training an Artificial Neural Network (ANN) [9]. Similarly, time-frequency analysis of vibrations have been used to diagnose wear in pump valve plates [10]. These analyses can notifying operators when pump maintenance needs to take place in a timely manner, and are particularly effective at detecting issues such as cavitation, resonance and misaligned or warped components.

However, pump vibration analysis is not (to the author's knowledge) used to monitor general system health and predict faults that occur outside of the pump itself. This is largely assessed using pipe vibrations [11], [12], which can provide insights into general system performance, or be used to locate discrete blockages downstream of pumps [13]. In the motivating scenario, access to the pipes is unavailable, and solder build-up does not form a localized blockage. Any solution needs to have low complexity so that it can be implemented on a low-cost microcontroller. Additionally, there is no pre-existing vibration data with which to establish baseline readings.

This paper uses online sequential Bayesian Changepoint Detection (BCD) based on an existing algorithm [14] and assesses its suitability on a test bench. The use case fault can be presented as an unsupervised segmentation problem as the machine transitions from a functional to a non-functional state. BCD is particularly suitable for this type of problem [15]. It provides a measurement of the probability that, based on the collected information, a change in behaviour has occurred at a certain point [16], [17]. This can then directly notify machine operators of the change in machine state, or be used to isolate the vibrational response of the pump at the point where the solder build-up is affecting the flow rate. In rare cases where the deterioration of the pipe state is instantaneous rather than gradual (such as in the case of seal failure), the change in vibrational response will still be able to inform machine operators of the need for maintenance. Successful applications in literature include the assessment of climate records to locate changepoints in climate regimes [17], detecting faults and failures in valves in an Unmanned Aerial Vehicle (UAV) fuel system [18], and detecting changes in the behaviour
<figure><img src="image_2.png" /><figcaption>**Figure 1.** Wave Soldering Machine process diagram. Dotted arrows represent the movement of data. Solid arrows represent the movement of physical parts. The green box represents the non-disruptive paper contribution.</figcaption></figure>

of a user of a text-messaging service [16]. Online applications of BCD are used to pro-
cess live data [19] and predict the likelihood of newly recorded data being part of a
"current run" between two changepoints. BCD has also been used for online signal
segmentation of epileptic brain activity [20] as well as activity recognition in a home
[21]. The variety of applications demonstrates the flexibility of BCD. Alongside the
number of changepoints, BCD can also provide an indication of the size of the changes
[17], which can highlight significant events. The computational cost of this approach
increases as the number of time steps increase, although this can be managed by imple-
menting a maximum length of time for assessment, and storing and reusing previous
calculations [14]. Another drawback of this approach is a sensitivity to the prior distri-
bution assigned to the changepoints present in the system.

## 2 Methodology

The research methodology as illustrated in Fig. 1 aims to use data analytics for improved
process control in wave soldering. The data analytics approach is based on non-disrup-
tive data extraction and processing using online sequential Bayesian Changepoint De-
tection. A test bench setup has been developed to replicate the wave-soldering machine
behavior as the industrial machine and environment is not suitable for development. To
keep it manageable in a laboratory environment, water is used instead of solder. The
difference between the vibrational characteristics of water and solder should not affect
the results of the BCD so long as the deterioration of the pipe leads to a change in
measured vibrations that the BCD can detect. The experimental set-up and data collection are discussed in sections 2.1 and 2.2. As this is virtually identical setup to the setup presented in [1] these sections will largely remain as presented in that earlier work.
The BCD formulation is discussed in section 2.3.

**2.1 Test bench setup**

The test bench presented in this paper considers the behaviour of a pump moving water through a closed system. The flow rate is controlled by a gate valve, which is closed in discrete increments and goes from completely open to completely closed. It mimics the effects of solder dross build up in a wave soldering machine, which takes place over several weeks. As such, the steady state behaviour of the pump is the most relevant to this investigation. The schematic for this can be seen in Fig. 2, with a photo of the realised test bench in Fig. 3.

<figure><img src="image_3.png" /><figcaption>**Figure 2** Test bench schematic</figcaption></figure>

<figure><img src="image_4.png" /><figcaption>**Figure 3:** Test bench photo. Yellow: gate valve; blue: pump and accelerometer; red: flowmeter</figcaption></figure>
<figure><img src="image_5.png" /><figcaption>**Figure 4:** Flow rate vs. valve closure</figcaption></figure>

<figure><img src="image_6.png" /><figcaption>**Figure 5:** FFT of pump vibrations while valve is open</figcaption></figure>

<figure><img src="image_7.png" /><figcaption>**Figure 6:** FFT of pump vibrations while valve is closed</figcaption></figure>
As the valve is closed, the change in the fluid's flow rate is monitored using the flow rate sensor YF-S201, connected to an Arduino. The vibration of the pump is recorded, using an accelerometer (LSM9DS1), at each increment to build up its response profile. This data is then processed at a Raspberry Pi 3B, and the results can be displayed in real time or uploaded to online networks, including any available IIoTs.

## 2.2 Data collection from the test bench

The change in flowrate as the valve is closed is shown in Fig. 4. There is a small drop in the flow rate until the valve is approximately 70% before a transition period, and an almost linear drop to no flow from approximately 80% closed onwards. The minimal initial change is a result of the low flow rates used in this experiment. Pump vibrations are recorded with a sampling rate of 350Hz. Each collected sample is 10,000 data points in size. The accelerometer has a range of ±2g, a sensitivity of 0.061 mg/LSB, and collects samples in the X, Y and Z axis. This is then converted into the absolute acceleration.

A fast Fourier transform (FFT) algorithm is used to extract the frequency and amplitude data from the vibrations [6]. Fig. 5 and Fig. 6 show the results of the FFT on the vibration data recorded from an open and shut valve respectively. The difference between the two is clearly visible, as the peak frequency shifts to the left. Additionally, it is clear that a lot of noise is present in the system – as would be present in an industrial setting. The solder in the use case might result in different vibrational characteristics. Despite this, the solder blockage should still result in a change in the recorded vibrations over time, which can be detected by the BCD algorithm. This is a significant benefit of the proposed methodology: as long as the input changes in a way that can be detected, the BCD algorithm will be able to assess the probability that a changepoint has occurred at a given point in time. This reduces the need for calibration procedures, which can be expensive and time consuming.

## 2.3 Online Bayesian Changepoint Detection

Fig. 7 presents some of the pump data gathered by the accelerometer. Analysis of the time-domain vibration data has shown that it is not suitable for the analysis – it does not vary significantly enough across the different valve states to be a useful feature for predicting the current state. The mean of the amplitude of the time-domain data is shown to remain roughly constant throughout. However, the plotted features extracted from the FFT (peak frequency and maximum amplitude) can be seen to respond to the change in valve state. As such, these are the features used in the BCD algorithm presented.

The algorithm is based on a simplified version of the sequential BCD algorithm described in [14], modified to detect a single changepoint in the datasets used. The simplified equations are presented below, and [14] should be referenced for additional detail and an extended version of this algorithm. As the algorithm processes the peak frequencies and maximum amplitudes in the same way, the following example will be presented for only the amplitude. An initial assumption is made about the data model:
<figure><img src="image_8.png" /><figcaption>Figure 7: Data extraction from recorded pump vibrations</figcaption></figure>

in this case, a linear regression model is used to predict the distribution of the data. Notably, other models can be used, depending on experience with the data.

$$A = \sum_{l=1}^{m} \beta_l V_l + \varepsilon \quad (1)$$

Equation (1) presents the linear regression model used to represent the data gathered, where A is the amplitude of the pump vibrations and $V_l$ is the level of valve closure. $\beta_l$ is the lth regression coefficient and $\varepsilon$ is the random error term. The assumptions made about $\beta$ and $\varepsilon$ are the same as in [14], with the same conjugate priors assigned here for both.

$$f(A_{i:j}) = f(A_{i:j} | V) \quad (2)$$

Assuming that this regression model applies to the data between the start of the dataset up until the changepoint, and from the changepoint to the end of the dataset, for each possible subset of the data i:j, the probability of the data given the regression model is calculated using equation (2) and stored.

$$P_1(A_{1:j}) = \sum_{v=1}^{j-1} f(A_{1:v}) f(A_{v+1:j}) \quad (3)$$

In equation (3), the probability density of the first j data points containing the changepoint is calculated and stored. Starting at the beginning of the time series, two non-overlapping subsets of data (assumed to be independent as per [22]) are pieced together. By multiplying together the probabilities of the two subsets (calculated in (2)) and summing over all of the placements of the changepoint, the probability density of the data can be calculated.

The final quantity that needs to be specified is the prior distribution of the location of the changepoint. By using an uninformative prior distribution which assumes that the location of the changepoint is equally likely at any datapoint, bias in the algorithm
can be avoided. From here, sampling from within the distributions defined above can be performed to ascertain the location of the changepoint and the regression parameters for the subsets of data either side of it.

This is extended in [14] to search for additional changepoints up to a defined maximum number of changepoints $k_{max}$. This is outside of the scope of this paper, but is achieved by extending equation (3) such that the term $f(A_{1:v})$ contains $k-1$ changepoints when calculating the probability of the location of the $k$th changepoint. The prior distribution for the number of changepoints is specified, and sampling for changepoints between 0 and $k_{max}$ takes places before sampling for the locations of the change ponts. Additional tuning can be done based on the values of the linear regression model used, as described in [14], [17]. A minimum distance between changepoints can also be specified.

The described algorithm will locate a changepoint in a single set of data of a set length. To expand it efficiently to process incoming data points, the matrices storing the results of equations (2) and (3) are expanded. New rows and columns are added to hold the new probabilities calculated for each newly generated subset of data (by equation (2)). A new column is added for the new probability density $P_1(A_{1:N})$ where N is the most recently added datapoint. The full implementation details can be found in [14].

## 3 Results and Discussion

Fig. 4 shows that the flow rate reduction as a result of the valve closure is minimal until the valve is approximately 70% shut. A short transition period can then be seen until the valve is about 80% shut. The flow rate reduction from that point on is nearly linear until it reaches 0 litres/s. During the experiment, a total of 260 pump vibration samples were collected as the valve went from completely open to completely closed.

Fig. 8 plots the extracted amplitudes at against the resultant posterior probability of the changepoint's location as calculated by the algorithm. It suggests that a changepoint has taken place as the valve is 70% closed and shows a high certainty over a small area. This corresponds with the start of the transitional flow rate period in Fig.4. A plot of the linear model inferred by the algorithm can also be seen in green in Fig. 8. It follows the collected data quite closely up until the last few readings. Had there been additional samples collected afterwards, the algorithm would have adjusted the inferred model to better match the data.

Performing the same analysis on the peak frequencies gives the results plotted in Fig. 9. In this case, the changepoint is detected later, when the valve is approximated 80% closed, and the posterior probability is lower and spread over a larger area. It corresponds more closely with the end of the transitional period of flow rate noted in Fig. 4. The inferred model follows the extracted frequencies very closely.

Plotting the posterior probabilities of the changepoint as calculated from the amplitude and frequencies extracted from the pump vibrations against the flow rate produced by the pump as the valve is closed produces Fig. 10. By applying this algorithm to the two different sources of data extracted from the pump vibrations, it has been demonstrated that the state of this system can be assessed by the vibrational response of the
<figure><img src="image_9.png" /><figcaption>**Figure 8:** Predicted changepoint based on extracted amplitudes. The inferred linear model is represented in green.</figcaption></figure>

<figure><img src="image_10.png" /><figcaption>**Figure 9:** Predicted changepoint based on extracted frequencies. The inferred linear model is represented in green.</figcaption></figure>

pump. Using the amplitude leads to an earlier detection of a changepoint, which is valuable in processes sensitive to changes in the monitored parameters. The frequency leads to a later detection of the changepoint, more valuable in processes that do not require immediate maintenance or are less sensitive to changes. The wave soldering machine use case presented in this paper falls into the former category and benefits from early detection of a change in flow rate so that maintenance can be performed before faulty products are released.
## 4 Conclusions

Presented in this paper is an online BCD algorithm adapted from existing literature and applied to an industrial use case. A test bench analogue is used to simulate pipe blockage due to solder build-up in a wave-soldering machine. The pipe state is indirectly monitored using a cheap, non-disruptive device that collects vibration data from the pump feeding the system. The collected data has two features extracted from it, the maximum pump vibrational amplitude and peak frequency as the valve is closed. The BCD algorithm then generates the likelihood of a changepoint having occurred in the flow rate as a result of the pipe blockage. This information is processed online and can be used to identify the current machine state (differentiating between a faulty and non-faulty state) and informs machine operators of the need for maintenance.

This work will be expanded upon in the future with data collected directly from the wave-soldering machine, to assess the suitability of the algorithm and non-disruptive methodology in an industrial environment, as well as the accuracy of the test bench analogue. Additional tests with an accelerometer capable of a faster sampling rate could also be valuable, to ensure that information isn't being lost at higher frequencies the current hardware cannot detect. Integration with local IIoT and cloud platforms is also key to ensuring the data is accessible and useful.

## 5 Acknowledgements

The authors would like to thank Siemens Congleton, especially Mr Carl German, for their helpful advice. This work is supported by the ESPRC iCASE entitled "Factory of the Future – Flexible, adaptable and self-optimised manufacturing systems".

<figure><img src="image_11.png" /><figcaption>**Figure 10:** Predicted changepoints plotted against the flow rate</figcaption></figure>
References

[1] E. Tochev, D. Rengasamy, H. Pfifer, and S. Ratchev, "System condition monitoring through Bayesian changepoint detection using pump vibrations," in *IEEE International Conference on Automation Science and Engineering*, 2020, vol. 2020-Augus, pp. 667-672.

[2] L. H. Chiang, E. L. Russell, and R. D. Braatz, *Fault Detection and Diagnosis in Industrial Systems*, 1st ed. London: Springer London, 2001.

[3] W. Wahlster et al., "Recommendations for implementing the strategic initiative INDUSTRIE 4.0" 2013.

[4] J. Manyika et al., "The Internet of Things: Mapping the value beyond the hype," *McKinsey Glob. Inst.*, no. June, p. 144, 2015.

[5] J. Conway, "The Industrial Internet of Things: An Evolution to a Smart Manufacturing Enterprise," *White Pap. Schneider Electr.*, 2016.

[6] C. Scheffer, "Pump Condition Monitoring Through Vibration Analysis," *PUMPS Maintenance, Des. Reliab. Conf. 2008-IDC Technol.*, pp. 1-20, 2008.

[7] R. Birajdar, R. Patil, and K. Khanzode, "Vibration and noise in centrifugal pump - sources and diagnosis methods," *3rd Int. Conf. Integrity, Reliab. Fail.*, no. July, pp. 20-24, 2009.

[8] D. L. Rivera, M. R. Scholz, M. Fritscher, M. Krauss, and K. Schilling, "Towards a Predictive Maintenance System of a Hydraulic Pump," *16th IFAC Symp. Inf. Control Probl. Manuf.*, 2018.

[9] D. Siano and M. A. Panza, "Diagnostic method by using vibration analysis for pump fault detection," *Energy Procedia*, vol. 148, no. Ati, pp. 10-17, 2018.

[10] J. Stojek, "Application of Time-Frequency Analysis for Diagnostics of Valve Plate Wear in Axial-Piston Pump," *Arch. Mech. Eng.*, vol. 57, no. 3, pp. 309-322, 2010.

[11] M. F. Kim, Y. I., Simpson, A. R. and Lambert, "Behavior of orifices and blockages in unsteady pipe flows," no. January 2007, pp. 15-19, 2007.

[12] Å. S. A. COLLET and M. KÄLLMAN, *Pipe Vibrations Measurement. Energiforsk*, 2017.

[13] N. L. T. Lile, M. H. M. Jaafar, M. R. Roslan, and M. S. M. Azmi, "Blockage Detection in Circular Pipe Using Vibration Analysis," *Int. J. Adv. Sci. Eng. Inf. Technol.*, vol. 2, no. 3, p. 252, 2016.

[14] E. Ruggieri and M. Antonellis, "An exact approach to Bayesian sequential changepoint detection," *Comput. Stat. Data Anal.*, vol. 97, pp. 71-86, May 2016.

[15] A. Mohammad-Djafari and O. Féron, "A Bayesian approach to changepoints detection in time series," *Int. J. Imaging Syst. Technol.*, vol. 16, no. 5, pp. 215-221, 2006.

[16] C. Davidson-Pilon, *Bayesian Methods for Hackers: Probabilistic Programming and Bayesian Inference* (Addison-Wesley Data and Analytics), 1st ed. Addison-Wesley Professional, 2015.

[17] E. Ruggieri, "A Bayesian approach to detecting changepoints in climatic records," *Int. J. Climatol.*, vol. 33, no. 2, pp. 520-528, 2013.
[18] O. Niculita, Z. Skaf, and I. K. Jennions, “The application of Bayesian changepoint detection in UAV fuel systems,” in *Procedia CIRP*, 2014, vol. 22, no. 1, pp. 115–121.

[19] R. P. Adams and D. J. C. MacKay, “Bayesian Online Changepoint Detection,” *Tech. Report, Univ. Cambridge*, 2007.

[20] R. Malladi, G. P. Kalamangalam, and B. Aazhang, “Online Bayesian changepoint detection algorithms for segmentation of epileptic activity,” in *Asilomar Conference on Signals, Systems and Computers*, 2013, no. November 2013, pp. 1833–1837.

[21] S. Aminikhanghahi and D. J. Cook, “Using changepoint detection to automate daily activity segmentation,” *2017 IEEE Int. Conf. Pervasive Comput. Commun. Work. PerCom Work. 2017*, pp. 262–267, 2017.

[22] D. Barry and J. A. Hartigan, “A Bayesian Analysis for Changepoint Problems,” *J. Am. Stat. Assoc.*, vol. 88, no. 421, p. 309, 1993.