1. Introduction
The nuclear power system, as a critical component of nuclear power plants, bears the important responsibility of powering the plant [
1,
2]. It mainly consists of a primary loop system and a secondary loop system [
3]. The primary loop system is filled with high-temperature and high-pressure coolant, which converts thermal energy into mechanical and electrical energy through changes in coolant temperature [
4]. Currently, water coolant remains predominant in nuclear power plants, with relatively less use of gas coolants such as carbon dioxide and metal coolants like sodium and lead–bismuth alloys [
5]. A leak of the high-temperature, high-pressure water medium within it can, at best, cause power loss to the nuclear power plant, leading to economic damage, and at worst, result in casualties [
6,
7]. To prevent economic losses and casualties, it is imperative to carry out steam leakage detection in nuclear power systems. Currently, the means of detecting steam leaks are relatively limited, primarily relying on pressure gauges, ceramic humidity sensors [
8], or multiple temperature monitoring points [
9]. Although these methods can identify steam leaks in the nuclear power system, they are subject to certain subjective factors. Particularly in high-temperature, high-pressure situations, minor leaks can cause a slight decrease in pressure readings, which operators often misinterpret as normal pressure fluctuations within the loop. Similarly, minor steam leaks are often overlooked by staff in surveillance videos. Therefore, it is important to investigate an effective method for detecting leakage within a nuclear power system. In addition, due to the harsh working conditions of the nuclear power system, irradiation, vibration, high temperature [
10] and other environmental factors, such as pressure gauge fluctuations on site, may be mistaken for normal conditions, and inspectors cannot be sent to check during the loop operation, resulting in misjudgments and other situations.
Given the urgency of steam leakage detection in nuclear power systems and the singularity and subjectivity of detection methods, this paper proposes an improved background difference method for steam leakage detection in nuclear power systems. Based on the traditional background difference method [
11,
12], this method adopts an adaptive approach to obtain the binarization threshold [
13,
14] of the background difference image, effectively overcoming the problem of threshold setting relying on expert experience. For example, in Ref. [
15], the combination of the three-frame difference method and background difference method was effectively utilized to develop a multi-decision, efficient, multi-target tracking method, which can track the motion target speed faster and can be effectively applied to speed estimation and vehicle counting tasks. Similarly, in Ref. [
16], the combination of the three-frame difference method and background difference method effectively solved the problem of voids being present in the two-frame difference method, making the target detection area wider and more accurate, and can allow for the effective detection of moving targets. However, the application of image recognition in the nuclear field, especially in the identification of steam leakage in nuclear power systems, is relatively limited. As far as the domestic nuclear power plants are concerned, the image recognition method has not been used to identify the steam leakage of the nuclear power system, and the image recognition method is only used in the aspect of human behavior to avoid the occurrence of major accidents caused by human factors.
To contrast and demonstrate the accuracy and effectiveness of the proposed method in this paper, two case studies of high-temperature and high-pressure steam leaks in the circuits are taken as examples. Traditional background difference method, adaptive threshold improvement algorithm, and the proposed method in this paper are used for comparison. It is found that the traditional background difference method and the adaptive threshold improvement algorithm are not applicable in threshold setting and noise processing. However, the proposed method in this paper further improves the background difference method based on adaptive threshold, effectively overcoming the above shortcomings. Therefore, this method can accurately and effectively detect steam leakage in nuclear power systems. Moreover, since the proposed method does not require a large number of steam leakage images for model training, it avoids the problem of the difficult acquisition of engineering data. Thus, it provides an effective and practical detection method for steam leakage detection in nuclear power systems and also serves as a reference for leakage detection of high-temperature and high-pressure media in other fields.
The method proposed in this paper can effectively detect steam leaks in nuclear power systems. The rest of this paper briefly introduces the background subtraction, adjacent frame difference method, and improved adaptive threshold method in
Section 2. In
Section 3, the implementation process of the method proposed in this paper is systematically introduced. In addition,
Section 4 details two cases to demonstrate the effectiveness of the proposed method. Finally,
Section 5 summarizes the main conclusions drawn from this review.
2. Basic Theory
2.1. Background Subtraction
Background subtraction [
11] is a common method used in object detection. Its basic principle involves comparing the input image with a background model and segmenting the target image based on changes in features such as the grayscale. To conduct object detection using background subtraction, it is first necessary to establish a background model [
17]. The current frame image is then different to this background model. If the result of the difference operation is greater than or equal to a set threshold, the pixel is identified as part of the foreground object. If the difference [
18] is less than the set threshold, the pixel is identified as part of the background image, as shown in the following equation:
where
represents the background model,
represents the previous frame image,
represents the difference image of two images, and
is the threshold. If
, then it indicates that this pixel is part of the foreground target area to be detected; if
, then this pixel is part of the background area.
2.2. Adjacent Frame Difference Method
The adjacent frame difference method was proposed by T. Meier and K. N. Ngan in 1998 [
19]. This method targets an image sequence and selects two adjacent frames for pixel difference calculation. If the result of the difference operation is greater than or equal to a set threshold, then the pixel is considered to be part of a moving target to be detected. If the result of the difference operation is less than the set threshold, then the pixel is considered to be part of the background. The calculation formula is shown in Equation (2).
where
denotes the difference result between kth frame image and the (k-1)th frame image
. If
, then it indicates that this pixel is part of the foreground target area to be detected; if
, then this pixel is part of the background area.
2.3. Improved Adaptive Threshold Method
Setting or calculating the threshold is an inevitable key step in the image differencing method [
20]. The traditional method of obtaining thresholds is through manual setting based on extensive practical experience. In this approach, the threshold remains constant during the target detection process and involves certain subjective factors. Another method is the adaptive threshold technique [
21], which includes methods like Otsu’s method [
22] and the mean method [
23,
24]. This technique dynamically determines the threshold size for each pixel based on the distribution of pixel values within its neighborhood block.
Although the adaptive threshold method can dynamically determine the threshold size for each pixel without relying on subjective experience, it cannot handle low noise issues. In the following cases, the above problems will be compared and explained, including (1) the influence of threshold setting on steam leakage detection, and (2) the drawbacks of traditional adaptive methods. Based on this, this paper proposes an improved adaptive threshold method, where the threshold is obtained by adding the background threshold to the combined maximum and minimum average thresholds. Background threshold
is obtained by calculating the average of corresponding pixel points in the background difference image of S-1 frames, and the process is shown in
Figure 1.
The calculation formula for the background threshold
in
Figure 1 is shown in Equation (3):
where
is the average pixel difference value of the
frames difference image,
is the number of difference image,
and
are the range of values for pixel positions.
The combined maximum and minimum average thresholds can be derived using the following equation:
where
is calculated by taking the pixel value at a certain point in the image as the center and computing the average value of the pixel values in its neighborhood block, and w is the length of the pixel point. Suppose that the pixel value
is the point
in the image, the size of the neighborhood block centered on that point is then (2w + 1) × (2w + 1).
In Equation (4), by changing the values of a and b, it is possible to access all the pixel points within the neighborhood of the current pixel. Ultimately, the adaptive threshold T can be obtained through Equation (5).
3. Improved Algorithm
Considering the urgency of detecting steam leaks in nuclear power systems [
1] and the fact that the threshold acquisition in traditional background subtraction methods relies too heavily on experience [
25,
26] and existing improved background subtraction methods cannot eliminate low noise influence, this paper proposes an improved background subtraction method for the detection of steam leaks in nuclear power systems. The proposed method can not only overcome the subjective influence of threshold setting, but also eliminate the influence of noise on the detection results, and at the same time meet the high efficiency and accuracy of steam leakage detection. The algorithmic process of this method is shown in
Figure 2.
According to
Figure 2, the improved background subtraction method is divided into two parts: pre-training and detection. The pre-training is carried out to provide a background threshold and a background model image for detection. The specific detection steps are as follows:
A. Pre-training
Step 1: Obtain S-frame background surveillance video;
Step 2: Extract the background video into S frames of background images;
Step 3: Convert S frames of background images into S frames of background grayscale images;
Step 4: Apply Gaussian smoothing filtering to each frame of the background grayscale images;
Step 5: Calculate the mean of the S frames of background grayscale images to obtain the background model image H;
Step 6: For the S frames of background grayscale images, apply the adjacent frame difference method to obtain S-1 frames of background difference images;
Step 7: Calculate the average of the S-1 frames of background difference images, round the result up to the nearest integer, and obtain the background threshold image .
B. Detection
Step 1: For the current surveillance video to be inspected, extract the current frame image (the frame image);
Step 2: Convert the current frame image into grayscale and use Gaussian smoothing filtering to obtain a low-noise grayscale image;
Step 3: Use the low-noise grayscale image and the background model image H to obtain the frame difference image;
Step 4: Process the frame difference image using the maximum–minimum average method to obtain the threshold ;
Step 5: Sum the background threshold and the threshold to obtain the adaptive threshold ;
Step 6: Use the adaptive threshold to binarize the frame difference image, obtaining a binarized image;
Step 7: After morphological processing of the binarized image, the areas where the value is 255 are identified as leaked steam.
The above steps make full use of the background model diagram to eliminate the effects of image noise and improve the adaptive threshold.
4. Experimental Case Study
An experimental case study will be introduced to demonstrate the proposed method. In this section, two types of nuclear-grade valve reliability tests involving steam leaks are used as examples. In particular, the test loop involved in the test is consistent with the material and equipment of the loop in the actual use scenario of the valve, so the steam leakage of the test is very representative.
In order to verify the effectiveness of the proposed method, it is compared with the traditional adaptive method (AM_ONE), the adaptive method (AM_TWO) in Ref. [
27], and the adaptive method (AM_THREE) in Ref. [
28]. AM_ONE adopts the adaptive method before the improvement in this paper; that is, the threshold
obtained by the max-min average method. AM_TWO in Ref. [
27] uses the calculation results for the mean value and standard deviation of the entire difference image as the adaptive threshold, which is unable to reflect the local features of the difference image. AM_THREE in Ref. [
28] determines the adaptive threshold using stationary wavelet transforms and a weighted median.
Both the method proposed in this paper and traditional methods are used for detection to illustrate the advantages of the method proposed in this paper.
4.1. Example One
During the reliability test of a certain type of nuclear-grade electric regulating valve, steam leakage occurred during the filling due to process issues. In the initial stage of steam leakage, the system pressure did not decrease, causing the operating personnel to fail to detect the system leakage in time. It was not until the sudden drop in pressure due to the large-scale leakage was noticed that the leakage in the circuit was discovered. To illustrate the steam leakage, image recognition methods were used for judgment. Firstly, this paper adopted the traditional background difference method, adjacent two-frame difference method, and three-frame difference method for detection. The threshold was iteratively set to T = 4. The detection results for the same frame image out of 1013 frames are shown in
Figure 3, Chinese characters in the figure indicate the location of the surveillance video.
Figure 3a–c are the difference, binary, and detection images obtained using the traditional background subtraction method, respectively.
Figure 3d–f are the difference, binary, and detection images obtained using the two-frame difference method.
Figure 3g–i are the difference, binary, and detection images obtained using the three-frame difference method. Different colored boxes in the detection image indicate where the steam leak was detected.
According to
Figure 3, when the threshold for the difference method is set appropriately, the traditional difference method can effectively detect steam leaks. However, the setting of the threshold relies too heavily on subjective factors and is prone to causing errors in the detection results. A threshold set too low can easily generate noise, while a threshold set too high may fail to detect leaks. Therefore, this paper adopts an improved adaptive threshold method for threshold setting. It also compares the detection results of the same frame image with the traditional background subtraction method, AM_ONE, AM_TWO, AM_THREE, and the proposed method, and the results are shown in
Figure 4. Chinese characters in
Figure 4 indicate the location of the surveillance video.
Figure 4a–c are the difference, binary, and detection images obtained using the traditional background subtraction method with threshold T = 0.5, respectively.
Figure 4d–f are the difference, binary, and detection images obtained using the traditional background subtraction method with threshold T = 146.
Figure 4g–o are the difference, binary, and detection images obtained by AM_ONE, AM_TWO and AM_THREE.
Figure 4p–r are the difference, binary, and detection images obtained using the proposed method. The green boxes in the detection image indicate where the steam leak was detected.
As can be seen from
Figure 4, when the threshold of the traditional background difference method is set to 0.5, there are a lot of noise signals in the detected image, and when the threshold is set to 146, steam leakage cannot be effectively detected. However, there are a lot of low noise signals in the detection of AM_ONE and AM_THREE. AM_TWO also has some noise, especially when the leakage is small and the dynamic target is not obvious, the noise is more serious. Therefore, the method proposed in this paper can effectively overcome the shortcomings of traditional background difference method, AM_ONE, AM_TWO and AM_THREE, and improve the detection effect of steam leakage. To further demonstrate the importance of the threshold value in the frame difference method,
Figure 5 calculates the comparative relationship between the background subtraction method, the adjacent two-frame difference method, and the three-frame difference method with the method suggested in this paper under different threshold conditions.
According to
Figure 5, the total number of leaked image frames detected by the background difference method, two-frame difference method, and three frame difference method decreases with the increase in the threshold value, but the method proposed in this paper is not affected by the threshold value, and the number of leaked image frames detected by the method proposed is significantly better than the two-frame difference method and three-frame difference method, and is better than the background difference method in most intervals of the threshold set. At the same time, the number of image frames in which steam leakage is first detected is consistent with two-frame difference method, three-frame difference method, and background difference method when the threshold is optimally set and is not affected by the threshold value. However, to begin with, the two-frame difference method, three-frame difference method, and background difference method detect that the frame number of steam leakage image increases with the increase in threshold value, which proves that the detection efficiency of the proposed method is improved.
4.2. Example Two
During the certification test of a certain type of nuclear-grade electric valve, steam leakage occurred at the electric heater plug. The background of the test site resulted in the failure of the operator to detect the steam leak in time. The traditional background subtraction method, the adjacent two-frame difference method, and the three-frame difference method were used for detection. The threshold was iteratively set to
. The detection results for the same frame image in a total of 1814 frames are shown in
Figure 6.
Figure 6a–c are the difference, binary, and detection images obtained using the traditional background subtraction method, respectively.
Figure 6d–f are the difference, binary, and detection images obtained using the two-frame difference method.
Figure 6g–i are the difference, binary, and detection images obtained using the three-frame difference method. The green boxes in the detection image indicate where the steam leak was detected.
According to
Figure 6, similar to the first case, when the threshold of the difference method is set appropriately, the traditional difference method can effectively detect steam leaks. However, the setting of the threshold relies too heavily on subjective factors. The same improved adaptive threshold method suggested in this paper was used for threshold setting. The detection results of the same frame image are compared with those of the traditional background subtraction method, AM_ONE, AM_TWO, and AM_THREE. The results show that with the traditional method, when the threshold is set too low, there is interference from other noises, and when the threshold is set too high, the detection of steam leaks is incomplete. The traditional adaptive threshold method also cannot completely avoid the issue of noise interference, as specifically shown in
Figure 7.
Figure 7a–c are the difference, binary, and detection images obtained using the traditional background subtraction method with threshold T = 1, respectively.
Figure 7d–f are the difference, binary, and detection images obtained using the traditional background subtraction method with threshold T = 45.
Figure 7g–o are the difference, binary, and detection images obtained using AM_ONE, AM_TWO, and AM_THREE.
Figure 7p–r are the difference, binary, and detection images obtained using the proposed method. The green boxes in the detection image indicate where the steam leak was detected.
As can be seen from
Figure 7, when the threshold of the traditional background difference method is set to 1, there are a large number of noise signals in the detected image, and when the threshold is set to 45, steam leakage cannot be effectively detected. However, there are a lot of low noise signals in the detection of AM_ONE, AM_TWO, and AM_THREE. Therefore, case two also proves that the method proposed in this paper can effectively overcome the shortcomings of the traditional background difference method and traditional adaptive background difference method, and improve the detection of steam leakage. To specifically illustrate steam leak detection,
Figure 8 shows the comparative relationship between the background subtraction method, the adjacent two-frame difference method, and the three-frame difference method with the method suggested in this paper under different threshold conditions.
In
Figure 8, the upper graph has the threshold setting value as the x-axis and the total number of detectable frames as the y-axis. The lower graph has the number of frames when steam leakage is first detected as the y-axis. The figure shows that the method proposed in this paper can overcome the issue of threshold values being dependent on expert experience, and its detection effectiveness is significantly better than the adjacent frame difference method and is comparable to the best threshold effect of the traditional background subtraction method. Specifically, the total frame number of steam leakage images detected by the proposed method is greater than two difference method and three difference method, and it is also better than the background difference method within a certain threshold range, and is not affected by the threshold fluctuation. At the same time, the sensitivity of the proposed method to detect steam leakage for the first time is better than two frame difference method and three frame difference method, and it is better than the background difference method within a certain threshold range, and it is not affected by the threshold fluctuation.
4.3. Results and Discussion
The following results were obtained from case one and case two:
(1) The traditional background difference method, two-frame difference method, and three-frame difference method can identify steam leakage, but these methods rely too much on threshold setting and cannot accurately identify whether steam leakage occurs.
(2) The traditional adaptive method can identify steam leakage, but it is easy to introduce low-noise signals, resulting in misjudgment. From the comparison results, it can be seen that there is obvious noise in AM_ONE and AM_THREE, and there is also some noise in AM_TWO when there is a small amount of leakage.
(3) The method proposed in this paper is significantly better than the traditional method in detecting steam leakage. This method can not only identify steam leakage, but can also avoid noise problems in the whole process.
5. Conclusions
The detection of steam leaks in nuclear power systems, the enhancement of early warning capabilities for steam leakage, and the assurance of system operator safety are addressed in this paper through the proposition of a steam leak detection method based on an improved background subtraction technique. This method has been implemented in the detection of steam leaks within two sets of primary circuit system nuclear-grade valve test devices. The outcomes of this study reveal that the proposed method mitigates the issue of relying on expert experience for threshold settings in traditional difference methods, while also tackling the challenge of noise elimination, which is often arduous with traditional adaptive threshold difference approaches.
Through the comparison of multiple detection methods, it is evident that the method advocated in this paper effectively identifies steam leaks in their early stages. Consequently, it facilitates the provision of timely and efficient early warnings during the onset of steam leakage in nuclear power systems, thereby mitigating potential economic losses and reducing the likelihood of personnel casualties.
Future research endeavors will focus on further optimization of the detection algorithm with the objective of shortening the duration required for steam leak detection. Additionally, efforts will be directed towards the attainment of online detection capabilities to ensure the safety of operational personnel.