Corresponding author: Irina V. Trykova ( trykova@kvantprogramm.ru ) Academic editor: Yury Korovin
© 2021 Konstantin I. Kotsoyev, Yevgeny L. Trykov, Irina V. Trykova.
This is an open access article distributed under the terms of the Creative Commons Attribution License (CC BY 4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
Citation:
Kotsoyev KI, Trykov YeL, Trykova IV (2021) Use of a convolutional neural network to segment signals of motor operated valves. Nuclear Energy and Technology 7(3): 207213. https://doi.org/10.3897/nucet.7.73489

Motor operated valves (MOV) are one of the most numerous classes of the nuclear power plant components. An important issue concerned with the MOV diagnostics is the lack of inprocess (online) automated control for the MOV technical condition during full power operation of the NPP unit.
In this regard, a vital task is that of the MOV diagnostics based on the signals of the current and voltage consumed during MOV ‘opening’ and ‘closing’ operations. The current and voltage signals represent time series measured at regular intervals. The current (and voltage) signals can be received online and contain all necessary information for the online diagnostics of the MOV status.
Essentially, the approach allows active power signals to be calculated from the current and voltage signals, and characteristics (‘diagnostic signs’) to be extracted from particular portions (segments) of the active power signals using the values of which MOVs can be diagnosed.
The paper deals with the problem of automating the segmentation of active power signals. To accomplish this, an algorithm has been developed based on using a convolutional neural network.
Convolutional neural network, time series segmentation, motor operated valves, automated system
It often happens in timeseries analysis problems that a series is produced by different generation mechanisms. Time series partitioning into internally homogeneous segments is therefore an important issue involved in data mining since it makes it possible to select the key characteristics of a time series from large data arrays in a more compact form (
An example of such time series is signals of the MOV active power during “opening” and “closing” operations, and diagnostics consists in partitioning of signals into segments and further extraction of ‘diagnostic signs’ (numerical values based on which conclusions are made as to the MOV serviceability or unserviceability) from each segment (
Such partitioning is manual in most MOV diagnostics systems, this taking more time and making it impossible to automate diagnostics. To address this issue, a deep neural network has been proposed which segments automatically the active power signal.
In accordance with methodology (MT 1.2.3.02.999.00852010), MOV diagnostics is based on a set of numerical values at representative points and in particular time intervals of the active power signal in the MOV actuation cycle. The representative points in Fig.
The drawback of this approach is the humandependent algorithm of identifying time intervals. Therefore, automation of the MOV diagnostics process required automatic partitioning of the active power signal into segments so that to extract further from these the numerical values that characterize the MOV technical condition.
It was shown in (
Electrical current and voltage parameters from the MOV motor stator windings (for three phases) were used to calculate the active power signal. The active power was calculated using the formula
$P\left(t\right)=\frac{1}{T}\xb7{\int}_{t}^{t+T}u\left(\tau \right)\xb7i\left(\tau \right)dt$ , (1)
where Т is the carrier frequency cycle (50 Hz); and u (τ), i (τ) are the voltage and current values at time τ respectively.
The following time intervals were selected for the neural network training:
The result of the segmentation is therefore the partitioning of the active power signal into four segments (Fig.
For the network training, the available active power signals were integrated into a unidimensional array and “cut” into sections of the length 100000. These sections were marked in an interactive mode using a code written in the Python language where the respective class was set to match each point in the signal. Further, a target vector was generated using the One hot coder. The coder takes a column with categorical data and creates several new columns for this. Numbers are replaced for unities and zeroes depending on which value is specific to the given column. In our case, there were five columns which denote
As a result, the initial data is represented by a set of 571 portions of an equal length and their respective masks with designation of each pixel in the signal belonging to the class (segment) in Fig.
For clarity, Table
Class  Revers  Podriv  Flat  Stop  No_label 

Respective time interval (segment)  Motor reversal  Gate shift  Gate moving  Gate seal  Signal portions not considered in analysis 
Pixel ratio, %  0.69  0.68  95.93  0.38  2.32 
Number of segments in sample  333  121  330  137  838 
Sample size  571 
The UNet network proposed in (
The network consists of an encoder and a decoder connected in series. The encoder is responsible for capturing different features in various scales, and the decoder uses these features to build the final segmentation map. A distinction of this model is that it includes “skipconnection” components which connect the decoder and encoder parts in each scale, that is, the symmetrical encoder output and the output of the preceding decoder layer are connected for the tensor transmission to the decoder input. These layers make it possible to use repeatedly the maps of features from any scale in the decoder, this leading to a more detailed segmentation.
Batch normalization was also added after all convolutional layers which improved the convergence process and the training rate. Besides, it helps monitoring the network weights since their values are at all times saved in the limits of rated values.
As can be seen in Table
Various loss functions were studied to address this issue and to achieve the best segmentation quality.
The most commonly used loss function for an image segmentation problem is the cross entropy loss which investigates each pixel individually and compares the class predictions with the given target vector.
Since the cross entropy loss evaluates the class predictions for each pixel vector individually and then undertakes averaging over all pixels, it is essentially states that the training of each pixel in the image is identical. This poses a problem since the classes under consideration have an unbalanced presentation for the sample.
In (
$WCE=\frac{1}{N}\xb7\sum _{i}{\omega}_{i}\sum _{j}{y}_{ij}\mathrm{lg}{p}_{ij}$, (2)
where N is the number of classes; y is the actual value of the class the pixel belongs to; and p is the predicted value of the class for the pixel.
A loss weighing pattern is discussed in (
The final formula for the pixelweighed categorical cross entropy takes therefore the form
$PWCE=\frac{1}{N}\xb7\sum _{i}\sum _{j}\left({\omega}_{i}+{\omega}_{ij}\right){y}_{ij}\mathrm{lg}{p}_{ij}$, (3)
${\omega}_{i}=\mathrm{lg}\frac{n{n}_{i}}{{n}_{i}},{\omega}_{ij}={\omega}_{0}\mathrm{exp}\left[{d}_{ij}^{2}/\left(2{\sigma}^{2}\right)\right]$,
where ω_{i} is the weight of the class which was calculated using the formula proposed in (
This strategy can be used to control the segmentation results both at the class level and at the pixel level with the loss function adjustment as desired.
Fig.
Dice coefficient described in (
Dice = 2A ∩ B / (A + B). (4)
Here, the numerator is a doubled set of the elements shared by sets A and B, and the denominator is the sum of the quantities of the elements in these sets.
In the event of the Dice coefficient estimation on predicted segmentation masks, one can approximate A ∩ B as the elementwise multiplication between the prediction and the target mask, and then sum up the resultant matrix.
Since the target mask is binary for each class, then all pixels from the prediction, which are not “activated” in the target mask, are nulled effectively. For the rest of the pixels, in essence, less valid predictions are penalized; a higher value of this expression leads to a better Dice coefficient.
A simple sum is used by some researchers (
$\text{Dice}=\frac{2{\sum}_{i}{y}_{i}\xb7{p}_{i}}{{\sum}_{i}{y}_{i}^{2}+{\sum}_{i}{p}_{i}^{2}}$, (5)
where y_{i} and p_{i} are the actual and predicted probabilities of the class membership.
Then the loss function is determined as
Dice_loss = 1 – Dice. (6)
As to the neural network’s output data, the numerator in (5) presents the common activations between the prediction and the target mask, as the denominator takes into account the number of the activations in each mask individually. This leads to the normalization of losses in accordance with the target mask size, so no Dice_loss hampers the training of classes with a smaller spatial representation in the input data.
Similarly to formulas (3) and (4), we shall introduce the notion of pixelweighed Dice_loss:
$\text{PWDice\_loss}=\text{Dice\_loss}+\frac{1}{N}\sum _{i}\sum _{j}{\omega}_{ij}\xb7{\left({y}_{ij}{p}_{ij}\right)}^{2}$. (7)
A function called Intersection over Union (IoU), also known as the Jaccard index and being one of the most commonly used indicators in semantic segmentation, was used as the metric for the neural network quality evaluation. IoU is the overlapping region between the predicted segmentation and the actual segmentation divided into the union region between the former and the latter. This indicator is in the range [0, 1] (0–100%) where zero means no overlapping and unity means the complete overlapping of segmentation. For a multiclass segmentation, the mean value of IoU (Mean_IoU) is computed by taking IoU of each class and averaging these.
The formula for the IoU coefficient determination bears resemblance to Dice coefficient but differs in the denominator and looks as follows:
IoU = A ∩ B / A ∪ B, (8)
where A ∩ B is the intersection of objects A and B; and A ∪ B is their cohesion.
The neural network was trained with a fixed set of hyperparameters for all tests. The Adam algorithm (
Fig.
A categorical cross entropy leads to better results on the training sample but to worse results during validation, this indicating a better generalizing capability of the Dice function.
As can be seen in the diagrams above, adding pixel weighing to the loss function leads to a better convergence of the network and, in the event of the weighed PWDiceloss, the values for the training sample of the Mean_IoU metric are 5 to 10% as large as those for Dice_loss without weighing. However, the values of the Mean IoU metric for the test sample of these functions are approximately equal.
The values of the IoU metric for each class (see Table
Class  Loss function  

PWDice_loss  PWCCE_loss  Dice_loss  CCE_loss  
Revers  98.12  97.98  97.68  98.28 
Podriv  81.32  71.44  92.60  73.21 
Flat  99.65  99.64  99.73  99.14 
Stop  69.38  62.61  71.65  63.01 
No_label  88.49  87.99  90.06  87.32 
The neural network predicts the probability of a particular class for each time point of the active power signal. Therefore, by selecting a set of the active power signal points, the probability for which is close to unity in the Flat class, one can state that these points belong to the Stroke segment.
An example of the active power signal segmentation is presented in Fig.
A novel approach to segmenting the MOV active power signals has been developed and investigated using a convolutional neural network. It has been found that the Dice_loss loss function allows achieving the best results.
The neural network has shown highquality results and makes it possible to automate the MOV diagnostics process, to avoid the human factor effects, to increase greatly the diagnostics rate, and to detect the MOV failures, as well as to exclude potential errors caused by the human factor effects.
Thanks to automating the process of partitioning the active power signals into segments, the MOV technical condition diagnostics can be undertaken both offline and online.