<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//TaxonX//DTD Taxonomic Treatment Publishing DTD v0 20100105//EN" "../../nlm/tax-treatment-NS0.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:tp="http://www.plazi.org/taxpub" article-type="research-article" dtd-version="3.0" xml:lang="en">
  <front>
    <journal-meta>
      <journal-id journal-id-type="publisher-id">79</journal-id>
      <journal-id journal-id-type="index">urn:lsid:arphahub.com:pub:D015427E-53F6-553C-9279-2E51CD684756</journal-id>
      <journal-title-group>
        <journal-title xml:lang="en">Nuclear Energy and Technology</journal-title>
        <abbrev-journal-title xml:lang="en">NUCET</abbrev-journal-title>
      </journal-title-group>
      <issn pub-type="epub">2452-3038</issn>
      <publisher>
        <publisher-name>National Research Nuclear University MEPhI (Moscow Engineering Physics Institute)</publisher-name>
      </publisher>
    </journal-meta>
    <article-meta>
      <article-id pub-id-type="doi">10.3897/nucet.7.73489</article-id>
      <article-id pub-id-type="publisher-id">73489</article-id>
      <article-categories>
        <subj-group subj-group-type="heading">
          <subject>Research Article</subject>
        </subj-group>
        <subj-group subj-group-type="scientific_subject">
          <subject>Nuclear physics</subject>
          <subject> Fusion and Radiation application</subject>
        </subj-group>
      </article-categories>
      <title-group>
        <article-title>Use of a convolutional neural network to segment signals of motor operated valves</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author" xlink:type="simple" corresp="no">
          <name name-style="western">
            <surname>Kotsoyev</surname>
            <given-names>Konstantin I.</given-names>
          </name>
          <xref ref-type="aff" rid="A1">1</xref>
          <xref ref-type="aff" rid="A3">3</xref>
        </contrib>
        <contrib contrib-type="author" xlink:type="simple" corresp="no">
          <name name-style="western">
            <surname>Trykov</surname>
            <given-names>Yevgeny L.</given-names>
          </name>
          <xref ref-type="aff" rid="A2">2</xref>
        </contrib>
        <contrib contrib-type="author" xlink:type="simple" corresp="yes">
          <name name-style="western">
            <surname>Trykova</surname>
            <given-names>Irina V.</given-names>
          </name>
          <xref ref-type="aff" rid="A3">3</xref>
          <email xlink:type="simple">trykova@kvantprogramm.ru</email>
        </contrib>
      </contrib-group>
      <aff id="A1">
        <label>1</label>
        <addr-line content-type="verbatim">Bauman Moscow State Technical University, 5 Vtoraya Baumanskaya St., bld.1, 105005 Moscow, Russia</addr-line>
        <institution>Bauman Moscow State Technical University</institution>
        <addr-line content-type="city">Moscow</addr-line>
        <country>Russia</country>
      </aff>
      <aff id="A2">
        <label>2</label>
        <addr-line content-type="verbatim">JSC STC Diaprom, 6 Korolev St., rooms 22-23, 249031 Obninsk, Kaluga Reg., Russia</addr-line>
        <institution>KVANT PROGRAMM LTD</institution>
        <addr-line content-type="city">Moscow</addr-line>
        <country>Russia</country>
      </aff>
      <aff id="A3">
        <label>3</label>
        <addr-line content-type="verbatim">KVANT PROGRAMM LTD, 5/12 Zeleny Ave., bld. 3, room B1, 111558 Moscow, Russia</addr-line>
        <institution>JSC STC Diaprom</institution>
        <addr-line content-type="city">Moscow</addr-line>
        <country>Russia</country>
      </aff>
      <author-notes>
        <fn fn-type="corresp">
          <p>Corresponding author: Irina V. Trykova (trykova@kvantprogramm.ru)</p>
        </fn>
        <fn fn-type="edited-by">
          <p>Academic editor: Yury Korovin</p>
        </fn>
      </author-notes>
      <pub-date pub-type="collection">
        <year>2021</year>
      </pub-date>
      <pub-date pub-type="epub">
        <day>23</day>
        <month>09</month>
        <year>2021</year>
      </pub-date>
      <volume>7</volume>
      <issue>3</issue>
      <fpage>207</fpage>
      <lpage>213</lpage>
      <uri content-type="arpha" xlink:href="http://openbiodiv.net/B4261A30-6EF3-5601-BCDF-9618156D726E">B4261A30-6EF3-5601-BCDF-9618156D726E</uri>
      <history>
        <date date-type="received">
          <day>24</day>
          <month>02</month>
          <year>2021</year>
        </date>
        <date date-type="accepted">
          <day>09</day>
          <month>06</month>
          <year>2021</year>
        </date>
      </history>
      <permissions>
        <copyright-statement>Konstantin I. Kotsoyev, Yevgeny L. Trykov, Irina V. Trykova</copyright-statement>
        <license license-type="creative-commons-attribution" xlink:href="http://creativecommons.org/licenses/by/4.0/" xlink:type="simple">
          <license-p>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.</license-p>
        </license>
      </permissions>
      <abstract>
        <label>Abstract</label>
        <p>Motor operated valves (<abbrev xlink:title="Motor operated valves" id="ABBRID0EXD">MOV</abbrev>) are one of the most numerous classes of the nuclear power plant components. An important issue concerned with the <abbrev xlink:title="Motor operated valves" id="ABBRID0E2D">MOV</abbrev> diagnostics is the lack of in-process (online) automated control for the <abbrev xlink:title="Motor operated valves" id="ABBRID0E6D">MOV</abbrev> technical condition during full power operation of the NPP unit.</p>
        <p>In this regard, a vital task is that of the <abbrev xlink:title="Motor operated valves" id="ABBRID0EFE">MOV</abbrev> diagnostics based on the signals of the current and voltage consumed during <abbrev xlink:title="Motor operated valves" id="ABBRID0EJE">MOV</abbrev> ‘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 <abbrev xlink:title="Motor operated valves" id="ABBRID0ENE">MOV</abbrev> status.</p>
        <p>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.</p>
        <p>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.</p>
      </abstract>
      <kwd-group>
        <label>Keywords</label>
        <kwd>Convolutional neural network, time series segmentation, motor operated valves, automated system</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec sec-type="Introduction" id="SECID0EXE">
      <title>Introduction</title>
      <p>It often happens in time-series 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 (<xref ref-type="bibr" rid="B1">Abonyi et al. 2002</xref>).</p>
      <p>An example of such time series is signals of the <abbrev xlink:title="Motor operated valves" id="ABBRID0EDF">MOV</abbrev> 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 <abbrev xlink:title="Motor operated valves" id="ABBRID0EHF">MOV</abbrev> serviceability or unserviceability) from each segment (<xref ref-type="bibr" rid="B5">Matveyev et al. 2009</xref>). Each segment is responsible for the actuation of particular <abbrev xlink:title="Motor operated valves" id="ABBRID0EPF">MOV</abbrev> parts and components and has specific features of its own.</p>
      <p>Such partitioning is manual in most <abbrev xlink:title="Motor operated valves" id="ABBRID0EVF">MOV</abbrev> 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.</p>
    </sec>
    <sec sec-type="Problem statement" id="SECID0EZF">
      <title>Problem statement</title>
      <p>In accordance with methodology (MT 1.2.3.02.999.0085-2010), <abbrev xlink:title="Motor operated valves" id="ABBRID0E6F">MOV</abbrev> diagnostics is based on a set of numerical values at representative points and in particular time intervals of the active power signal in the <abbrev xlink:title="Motor operated valves" id="ABBRID0EDG">MOV</abbrev> actuation cycle. The representative points in Fig. <xref ref-type="fig" rid="F1">1</xref> have been selected with regard for the factors affecting the <abbrev xlink:title="Motor operated valves" id="ABBRID0ELG">MOV</abbrev> technical condition and the active power signal changes, and based on the valve gate motion cycles.</p>
      <fig id="F1" position="float" orientation="portrait">
        <object-id content-type="doi">10.3897/nucet.7.73489.figure1</object-id>
        <object-id content-type="arpha">AC96FB0F-E2C8-5F50-A8A9-AF6E6BCB2379</object-id>
        <label>Figure 1.</label>
        <caption>
          <p>Representative points of an active power signal: <bold>a</bold>) gate opening, <bold>b</bold>) gate closing; <abbrev xlink:title="upper bound" id="ABBRID0E2G">UB</abbrev> – upper bound; <abbrev xlink:title="lower bound" id="ABBRID0E6G">LB</abbrev> – lower bound.</p>
        </caption>
        <graphic xlink:href="nucet-07-e73489-g001.jpg" position="float" orientation="portrait" xlink:type="simple" id="oo_592096.jpg">
          <uri content-type="original_file">https://binary.pensoft.net/fig/592096</uri>
        </graphic>
      </fig>
      <p>The drawback of this approach is the human-dependent algorithm of identifying time intervals. Therefore, automation of the <abbrev xlink:title="Motor operated valves" id="ABBRID0EKH">MOV</abbrev> 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 <abbrev xlink:title="Motor operated valves" id="ABBRID0EOH">MOV</abbrev> technical condition.</p>
      <p>It was shown in (<xref ref-type="bibr" rid="B8">Ronneberger et al. 2015</xref>) that artificial neural networks coped well with the time series segmentation.</p>
    </sec>
    <sec sec-type="Initial data" id="SECID0EYH">
      <title>Initial data</title>
      <p>Electrical current and voltage parameters from the <abbrev xlink:title="Motor operated valves" id="ABBRID0E5H">MOV</abbrev> motor stator windings (for three phases) were used to calculate the active power signal. The active power was calculated using the formula</p>
      <p><mml:math id="M1"><mml:mi>P</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mfrac><mml:mn>1</mml:mn><mml:mi>T</mml:mi></mml:mfrac><mml:mo>·</mml:mo><mml:msubsup><mml:mo>∫</mml:mo><mml:mi>t</mml:mi><mml:mrow><mml:mi>t</mml:mi><mml:mo>+</mml:mo><mml:mi>T</mml:mi></mml:mrow></mml:msubsup><mml:mi>u</mml:mi><mml:mo>(</mml:mo><mml:mi>τ</mml:mi><mml:mo>)</mml:mo><mml:mo>·</mml:mo><mml:mi>i</mml:mi><mml:mo>(</mml:mo><mml:mi>τ</mml:mi><mml:mo>)</mml:mo><mml:mi>d</mml:mi><mml:mi>t</mml:mi></mml:math>
, (1)</p>
      <p>where <italic>Т</italic> is the carrier frequency cycle (50 Hz); and <italic>u</italic> (τ), <italic>i</italic> (τ) are the voltage and current values at time τ respectively.</p>
    </sec>
    <sec sec-type="Determination of segments for the neural network training" id="SECID0EMAAC">
      <title>Determination of segments for the neural network training</title>
      <p>The following time intervals were selected for the neural network training:</p>
      <list list-type="bullet">
        <list-item>
          <p>motor reversal;</p>
        </list-item>
        <list-item>
          <p>gate shift (for the ‘opening’ signal);</p>
        </list-item>
        <list-item>
          <p>gate moving;</p>
        </list-item>
        <list-item>
          <p>gate seal (for the ‘closing’ signal).</p>
        </list-item>
      </list>
      <p>The result of the segmentation is therefore the partitioning of the active power signal into four segments (Fig. <xref ref-type="fig" rid="F2">2</xref>).</p>
      <fig id="F2" position="float" orientation="portrait">
        <object-id content-type="doi">10.3897/nucet.7.73489.figure2</object-id>
        <object-id content-type="arpha">6674C7EC-CD22-5733-97A2-BE7A8ED49E05</object-id>
        <label>Figure 2.</label>
        <caption>
          <p>Segmentation of an active power signal: 1 – motor reversal; 2 – gate shift (‘opening’); 3 – gate moving; 4 – gate seal (‘closing’).</p>
        </caption>
        <graphic xlink:href="nucet-07-e73489-g002.jpg" position="float" orientation="portrait" xlink:type="simple" id="oo_592097.jpg">
          <uri content-type="original_file">https://binary.pensoft.net/fig/592097</uri>
        </graphic>
      </fig>
      <p>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</p>
      <list list-type="bullet">
        <list-item>
          <p>four classes (see Fig. 2) with the marks 1 through 4 matching the segment number and colored grey;</p>
        </list-item>
        <list-item>
          <p>one class with the mark “No_label” (the remaining signal portions of no interest in terms of analysis and uncolored, see Fig. 2).</p>
        </list-item>
      </list>
      <p>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. <xref ref-type="fig" rid="F2">2</xref>.</p>
      <p>For clarity, Table <xref ref-type="table" rid="T1">1</xref> presents data on the segments marked and their quantity and ratio.</p>
      <table-wrap id="T1" position="float" orientation="portrait">
        <label>Table 1.</label>
        <caption>
          <p>Segment data</p>
        </caption>
        <table id="TID0ETDAE" rules="all">
          <tbody>
            <tr>
              <th rowspan="1" colspan="1">Class</th>
              <th rowspan="1" colspan="1">Revers</th>
              <th rowspan="1" colspan="1">Podriv</th>
              <th rowspan="1" colspan="1">Flat</th>
              <th rowspan="1" colspan="1">Stop</th>
              <th rowspan="1" colspan="1">No_label</th>
            </tr>
            <tr>
              <td rowspan="1" colspan="1">Respective time interval (segment)</td>
              <td rowspan="1" colspan="1">Motor reversal</td>
              <td rowspan="1" colspan="1">Gate shift</td>
              <td rowspan="1" colspan="1">Gate moving</td>
              <td rowspan="1" colspan="1">Gate seal</td>
              <td rowspan="1" colspan="1">Signal portions not considered in analysis</td>
            </tr>
            <tr>
              <td rowspan="1" colspan="1">Pixel ratio, %</td>
              <td rowspan="1" colspan="1">0.69</td>
              <td rowspan="1" colspan="1">0.68</td>
              <td rowspan="1" colspan="1">95.93</td>
              <td rowspan="1" colspan="1">0.38</td>
              <td rowspan="1" colspan="1">2.32</td>
            </tr>
            <tr>
              <td rowspan="1" colspan="1">Number of segments in sample</td>
              <td rowspan="1" colspan="1">333</td>
              <td rowspan="1" colspan="1">121</td>
              <td rowspan="1" colspan="1">330</td>
              <td rowspan="1" colspan="1">137</td>
              <td rowspan="1" colspan="1">838</td>
            </tr>
            <tr>
              <td rowspan="1" colspan="1">Sample size</td>
              <td rowspan="1" colspan="5">571</td>
            </tr>
          </tbody>
        </table>
      </table-wrap>
    </sec>
    <sec sec-type="Network architecture" id="SECID0EDFAC">
      <title>Network architecture</title>
      <p>The U-Net network proposed in (<xref ref-type="bibr" rid="B8">Ronneberger et al. 2015</xref>) and generated in 2015 for segmentation of biomedical images was taken as the basis. Its architecture represents a convolutional network modified such that it could handle less examples (training patterns) and would make segmentation more accurate.</p>
      <p>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 “skip-connection” 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.</p>
      <p>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.</p>
    </sec>
    <sec sec-type="Loss functions" id="SECID0EPFAC">
      <title>Loss functions</title>
      <p>As can be seen in Table <xref ref-type="table" rid="T1">1</xref>, there is an unbalance of classes clearly observed in data. Unbalance of data is common to computer-aided training problems such as segmentation and classification. In such situation, where all data is used as is, the classifier will be highly likely to demonstrate a biased capacity in favor of the most represented classes.</p>
      <p>Various loss functions were studied to address this issue and to achieve the best segmentation quality.</p>
    </sec>
    <sec sec-type="Cross entropy" id="SECID0E1FAC">
      <title>Cross entropy</title>
      <p>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.</p>
      <p>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.</p>
      <p>In (<xref ref-type="bibr" rid="B4">Long et al. 2015</xref>), it is proposed that this loss is weighed for each output channel so that to oppose the unbalance of classes which the dataset contains. The formula for the categorical cross entropy weighed by classes is written as follows:</p>
      <p><mml:math id="M2"><mml:mi>W</mml:mi><mml:mi>C</mml:mi><mml:mi>E</mml:mi><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mfrac><mml:mn>1</mml:mn><mml:mi>N</mml:mi></mml:mfrac><mml:mo>·</mml:mo><mml:munder><mml:mo>∑</mml:mo><mml:mi>i</mml:mi></mml:munder><mml:msub><mml:mi>ω</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:munder><mml:mo>∑</mml:mo><mml:mi>j</mml:mi></mml:munder><mml:msub><mml:mi>y</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mi>lg</mml:mi><mml:msub><mml:mi>p</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:math>, (2)</p>
      <p>where <italic>N</italic> is the number of classes; <italic>y</italic> is the actual value of the class the pixel belongs to; and <italic>p</italic> is the predicted value of the class for the pixel.</p>
      <p>A loss weighing pattern is discussed in (<xref ref-type="bibr" rid="B8">Ronneberger et al. 2015</xref>) for each pixel so that there is a greater weight at the boundaries of the segmented items. This loss weighing pattern has helped the U-Net model segmenting cells in biomedical images in a discontinuous manner such that certain cells can be easily identified in the binary segmentation map.</p>
      <p>The final formula for the pixel-weighed categorical cross entropy takes therefore the form</p>
      <p><mml:math id="M3"><mml:mi>P</mml:mi><mml:mi>W</mml:mi><mml:mi>C</mml:mi><mml:mi>E</mml:mi><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mfrac><mml:mn>1</mml:mn><mml:mi>N</mml:mi></mml:mfrac><mml:mo>·</mml:mo><mml:munder><mml:mo>∑</mml:mo><mml:mi>i</mml:mi></mml:munder><mml:munder><mml:mo>∑</mml:mo><mml:mi>j</mml:mi></mml:munder><mml:mfenced><mml:mrow><mml:msub><mml:mi>ω</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi>ω</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfenced><mml:msub><mml:mi>y</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mi>lg</mml:mi><mml:msub><mml:mi>p</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:math>, (3)</p>
      <p><mml:math id="M4"><mml:msub><mml:mi>ω</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mi>lg</mml:mi><mml:mfrac><mml:mrow><mml:mi>n</mml:mi><mml:mo>-</mml:mo><mml:msub><mml:mi>n</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mfrac><mml:mo>,</mml:mo><mml:msub><mml:mi>ω</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>ω</mml:mi><mml:mn>0</mml:mn></mml:msub><mml:mi>exp</mml:mi><mml:mfenced open="[" close="]"><mml:mrow><mml:mo>-</mml:mo><mml:msubsup><mml:mi>d</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow><mml:mn>2</mml:mn></mml:msubsup><mml:mo>/</mml:mo><mml:mfenced><mml:mrow><mml:mn>2</mml:mn><mml:msup><mml:mi>σ</mml:mi><mml:mn>2</mml:mn></mml:msup></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced></mml:math>,</p>
      <p>where ω<italic><sub>i</sub></italic> is the weight of the class which was calculated using the formula proposed in (<xref ref-type="bibr" rid="B10">Xiaoya 2020</xref>); <italic>n<sub>i</sub></italic> is the number of elements in the <italic>i</italic><sup>th</sup> class; <italic>n</italic> is the total number of elements; <italic>d</italic> is the distance to the nearest boundary; and ω<italic><sub>ij</sub></italic> is the pixel weight.</p>
      <p>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.</p>
      <p>Fig. <xref ref-type="fig" rid="F3">3</xref> shows how the pixel weights calculated using formula (3) look like.</p>
      <fig id="F3" position="float" orientation="portrait">
        <object-id content-type="doi">10.3897/nucet.7.73489.figure3</object-id>
        <object-id content-type="arpha">CC5A494D-6E66-513D-BA8A-224AAF945E0C</object-id>
        <label>Figure 3.</label>
        <caption>
          <p>Diagram of pixel weights.</p>
        </caption>
        <graphic xlink:href="nucet-07-e73489-g003.jpg" position="float" orientation="portrait" xlink:type="simple" id="oo_592098.jpg">
          <uri content-type="original_file">https://binary.pensoft.net/fig/592098</uri>
        </graphic>
      </fig>
    </sec>
    <sec sec-type="Dice coefficient" id="SECID0ECIAC">
      <title>
        Dice coefficient</title>
      <p>
        Dice coefficient described in (<xref ref-type="bibr" rid="B6">Milletari 2016</xref>) and presented for the first time in (<xref ref-type="bibr" rid="B9">Sørensen 1948</xref>) was also considered as a loss function in (<xref ref-type="bibr" rid="B8">Ronneberger et al. 2015</xref>). This function has proved itself to perform well in solving semantic segmentation problems with extremely unbalanced classes. This indicator is in the range [0, 1] where the Dice coefficient, equal to unity, means an ideal and complete overlap. Dice coefficient was initially developed for binary data and can be calculated using the formula</p>
      <p><italic>Dice</italic> = 2|<italic>A</italic> ∩ <italic>B</italic>| / (|<italic>A</italic>| + |<italic>B</italic>|). (4)</p>
      <p>Here, the numerator is a doubled set of the elements shared by sets <italic>A</italic> and <italic>B</italic>, and the denominator is the sum of the quantities of the elements in these sets.</p>
      <p>In the event of the Dice coefficient estimation on predicted segmentation masks, one can approximate |<italic>A</italic> ∩ <italic>B</italic>| as the element-wise multiplication between the prediction and the target mask, and then sum up the resultant matrix.</p>
      <p>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.</p>
      <p>A simple sum is used by some researchers (<xref ref-type="bibr" rid="B2">Drozdzal et al. 2016</xref>) to quantitatively estimate |<italic>А</italic>| and |<italic>B</italic>|, while others (<xref ref-type="bibr" rid="B10">Xiaoya 2020</xref>) prefer to use the sum of squares for this computation. Preference was given in this paper to the sum of squares since this loss function offers a better convergence. In this connection, the formula for the Dice coefficient calculation takes the form</p>
      <p><mml:math id="M5"><mml:mtext> Dice </mml:mtext><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mn>2</mml:mn><mml:msub><mml:mo>∑</mml:mo><mml:mi>i</mml:mi></mml:msub><mml:msub><mml:mi>y</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>·</mml:mo><mml:msub><mml:mi>p</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mo>∑</mml:mo><mml:mi>i</mml:mi></mml:msub><mml:msubsup><mml:mi>y</mml:mi><mml:mi>i</mml:mi><mml:mn>2</mml:mn></mml:msubsup><mml:mo>+</mml:mo><mml:msub><mml:mo>∑</mml:mo><mml:mi>i</mml:mi></mml:msub><mml:msubsup><mml:mi>p</mml:mi><mml:mi>i</mml:mi><mml:mn>2</mml:mn></mml:msubsup></mml:mrow></mml:mfrac></mml:math>, (5)</p>
      <p>where <italic>y<sub>i</sub></italic> and <italic>p<sub>i</sub></italic> are the actual and predicted probabilities of the class membership.</p>
      <p>Then the loss function is determined as</p>
      <p><italic>Dice_loss</italic> = 1 – <italic>Dice</italic>. (6)</p>
      <p>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 <italic>Dice_loss</italic> hampers the training of classes with a smaller spatial representation in the input data.</p>
      <p>Similarly to formulas (3) and (4), we shall introduce the notion of pixel-weighed <italic>Dice_loss</italic>:</p>
      <p><mml:math id="M6"><mml:mtext> PWDice_loss </mml:mtext><mml:mo>=</mml:mo><mml:mtext>Dice_loss</mml:mtext><mml:mo>+</mml:mo><mml:mfrac><mml:mn>1</mml:mn><mml:mi>N</mml:mi></mml:mfrac><mml:munder><mml:mo>∑</mml:mo><mml:mi>i</mml:mi></mml:munder><mml:munder><mml:mo>∑</mml:mo><mml:mi>j</mml:mi></mml:munder><mml:msub><mml:mi>ω</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>·</mml:mo><mml:msup><mml:mfenced><mml:mrow><mml:msub><mml:mi>y</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi>p</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfenced><mml:mn>2</mml:mn></mml:msup></mml:math>. (7)</p>
    </sec>
    <sec sec-type="Evaluation of the neural network quality" id="SECID0EQMAC">
      <title>Evaluation of the neural network quality</title>
      <p>A function called Intersection over Union (<italic><abbrev xlink:title="Intersection over Union" id="ABBRID0EXMAC">IoU</abbrev></italic>), 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. <italic><abbrev xlink:title="Intersection over Union" id="ABBRID0E3MAC">IoU</abbrev></italic> 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 <italic><abbrev xlink:title="Intersection over Union" id="ABBRID0EBNAC">IoU</abbrev></italic> (<italic>Mean_IoU</italic>) is computed by taking <italic><abbrev xlink:title="Intersection over Union" id="ABBRID0EINAC">IoU</abbrev></italic> of each class and averaging these.</p>
      <p>The formula for the <italic><abbrev xlink:title="Intersection over Union" id="ABBRID0EPNAC">IoU</abbrev></italic> coefficient determination bears resemblance to Dice coefficient but differs in the denominator and looks as follows:</p>
      <p><italic><abbrev xlink:title="Intersection over Union" id="ABBRID0E3NAC">IoU</abbrev></italic> = |<italic>A</italic> ∩ <italic>B</italic>| / |<italic>A</italic> ∪ <italic>B</italic>|, (8)</p>
      <p>where |<italic>A</italic> ∩ <italic>B</italic>| is the intersection of objects <italic>A</italic> and <italic>B</italic>; and |<italic>A</italic> ∪ <italic>B</italic>| is their cohesion.</p>
    </sec>
    <sec sec-type="Training" id="SECID0EWOAC">
      <title>Training</title>
      <p>The neural network was trained with a fixed set of hyperparameters for all tests. The Adam algorithm (<xref ref-type="bibr" rid="B3">Kingma and Ba 2017</xref>) with a lot size of 20 and a training rate of 0.001 was selected as the optimizer. Each time, after 10 epochs with no improvement, the training rate was reduced by 20%.</p>
      <p>Fig. <xref ref-type="fig" rid="F4">4</xref> presents the results of the network training based on training and valdiation samples using different loss functions.</p>
      <fig id="F4" position="float" orientation="portrait">
        <object-id content-type="doi">10.3897/nucet.7.73489.figure4</object-id>
        <object-id content-type="arpha">6EF8AFC6-3E70-5897-BA42-9FC368FB09D9</object-id>
        <label>Figure 4.</label>
        <caption>
          <p><italic>Mean <abbrev xlink:title="Intersection over Union" id="ABBRID0EQPAC">IoU</abbrev></italic> metric during network training with different loss functions (see formulas 8, 3, 7 and 2): <bold>a</bold>) – training sample; <bold>b</bold>) – validation sample.</p>
        </caption>
        <graphic xlink:href="nucet-07-e73489-g004.jpg" position="float" orientation="portrait" xlink:type="simple" id="oo_592099.jpg">
          <uri content-type="original_file">https://binary.pensoft.net/fig/592099</uri>
        </graphic>
      </fig>
      <p>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 <italic>Dice</italic> function.</p>
      <p>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 <italic>PWDice-loss</italic>, the values for the training sample of the <italic>Mean_IoU</italic> metric are 5 to 10% as large as those for <italic>Dice_loss</italic> without weighing. However, the values of the <italic>Mean <abbrev xlink:title="Intersection over Union" id="ABBRID0ERAAE">IoU</abbrev></italic> metric for the test sample of these functions are approximately equal.</p>
      <p>The values of the <italic><abbrev xlink:title="Intersection over Union" id="ABBRID0EYAAE">IoU</abbrev></italic> metric for each class (see Table <xref ref-type="table" rid="T1">1</xref>) computed by the network with different loss functions are presented in Table <xref ref-type="table" rid="T2">2</xref> for a more detailed evaluation of the segmentation results.</p>
      <table-wrap id="T2" position="float" orientation="portrait">
        <label>Table 2.</label>
        <caption>
          <p><italic><abbrev xlink:title="Intersection over Union" id="ABBRID0EOBAE">IoU</abbrev></italic> by classes (in percent terms) for the test sample</p>
        </caption>
        <table id="TID0EALAE" rules="all">
          <tbody>
            <tr>
              <th rowspan="2" colspan="1">Class</th>
              <th rowspan="1" colspan="4">Loss function</th>
            </tr>
            <tr>
              <th rowspan="1" colspan="1">
                <italic>PWDice_loss</italic>
              </th>
              <th rowspan="1" colspan="1">
                <italic>PWCCE_loss</italic>
              </th>
              <th rowspan="1" colspan="1">
                <italic>Dice_loss</italic>
              </th>
              <th rowspan="1" colspan="1">
                <italic>CCE_loss</italic>
              </th>
            </tr>
            <tr>
              <td rowspan="1" colspan="1">Revers</td>
              <td rowspan="1" colspan="1">98.12</td>
              <td rowspan="1" colspan="1">97.98</td>
              <td rowspan="1" colspan="1">97.68</td>
              <td rowspan="1" colspan="1">
                <bold>98.28</bold>
              </td>
            </tr>
            <tr>
              <td rowspan="1" colspan="1">Podriv</td>
              <td rowspan="1" colspan="1">81.32</td>
              <td rowspan="1" colspan="1">71.44</td>
              <td rowspan="1" colspan="1">
                <bold>92.60</bold>
              </td>
              <td rowspan="1" colspan="1">73.21</td>
            </tr>
            <tr>
              <td rowspan="1" colspan="1">Flat</td>
              <td rowspan="1" colspan="1">99.65</td>
              <td rowspan="1" colspan="1">99.64</td>
              <td rowspan="1" colspan="1">
                <bold>99.73</bold>
              </td>
              <td rowspan="1" colspan="1">99.14</td>
            </tr>
            <tr>
              <td rowspan="1" colspan="1">Stop</td>
              <td rowspan="1" colspan="1">69.38</td>
              <td rowspan="1" colspan="1">62.61</td>
              <td rowspan="1" colspan="1">
                <bold>71.65</bold>
              </td>
              <td rowspan="1" colspan="1">63.01</td>
            </tr>
            <tr>
              <td rowspan="1" colspan="1">No_label</td>
              <td rowspan="1" colspan="1">88.49</td>
              <td rowspan="1" colspan="1">87.99</td>
              <td rowspan="1" colspan="1">
                <bold>90.06</bold>
              </td>
              <td rowspan="1" colspan="1">87.32</td>
            </tr>
          </tbody>
        </table>
      </table-wrap>
      <p>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.</p>
      <p>An example of the active power signal segmentation is presented in Fig. <xref ref-type="fig" rid="F5">5</xref>. The lines show the probabilities for the classes (Flat, Podriv, Revers, Stop). By isolating these probabilities with a threshold of, e.g., over 0.95, we get the boundaries of the segments.</p>
      <fig id="F5" position="float" orientation="portrait">
        <object-id content-type="doi">10.3897/nucet.7.73489.figure5</object-id>
        <object-id content-type="arpha">92DC3D22-1977-594B-9F33-7B61388A01A9</object-id>
        <label>Figure 5.</label>
        <caption>
          <p>Results of the active power signal segmentation by a neural network.</p>
        </caption>
        <graphic xlink:href="nucet-07-e73489-g005.jpg" position="float" orientation="portrait" xlink:type="simple" id="oo_592100.jpg">
          <uri content-type="original_file">https://binary.pensoft.net/fig/592100</uri>
        </graphic>
      </fig>
    </sec>
    <sec sec-type="Conclusions" id="SECID0EIGAE">
      <title>Conclusions</title>
      <p>A novel approach to segmenting the <abbrev xlink:title="Motor operated valves" id="ABBRID0EOGAE">MOV</abbrev> active power signals has been developed and investigated using a convolutional neural network. It has been found that the <italic>Dice_loss</italic> loss function allows achieving the best results.</p>
      <p>The neural network has shown high-quality results and makes it possible to automate the <abbrev xlink:title="Motor operated valves" id="ABBRID0EWGAE">MOV</abbrev> diagnostics process, to avoid the human factor effects, to increase greatly the diagnostics rate, and to detect the <abbrev xlink:title="Motor operated valves" id="ABBRID0E1GAE">MOV</abbrev> failures, as well as to exclude potential errors caused by the human factor effects.</p>
      <p>Thanks to automating the process of partitioning the active power signals into segments, the <abbrev xlink:title="Motor operated valves" id="ABBRID0EAHAE">MOV</abbrev> technical condition diagnostics can be undertaken both offline and online.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <title>References</title>
      <ref id="B1">
        <mixed-citation xlink:type="simple"><person-group><name name-style="western"><surname>Abonyi</surname><given-names>J</given-names></name><name name-style="western"><surname>Szeifert</surname><given-names>F</given-names></name><name name-style="western"><surname>Babuska</surname><given-names>R</given-names></name></person-group> (<year>2002</year>) Modified Gath-Geva fuzzy clustering for identification of Takagi-Sugeno fuzzy models. In: IEEE Systems, Man and Cybernetics, Part B (Cybernetics), vol. 32, no. 5, 612–621. [Oct. 2002] <ext-link xlink:type="simple" ext-link-type="doi" xlink:href="10.1109/TSMCB.2002.1033180">https://doi.org/10.1109/TSMCB.2002.1033180</ext-link></mixed-citation>
      </ref>
      <ref id="B2">
        <mixed-citation xlink:type="simple"><person-group><name name-style="western"><surname>Drozdzal</surname><given-names>M</given-names></name><name name-style="western"><surname>Vorontsov</surname><given-names>E</given-names></name><name name-style="western"><surname>Chartrand</surname><given-names>G</given-names></name><name name-style="western"><surname>Kadoury</surname><given-names>S</given-names></name><name name-style="western"><surname>Pal</surname><given-names>Ch</given-names></name></person-group> (<year>2016</year>) The Importance of Skip Connections in Biomedical Image Segmentation. arXiv:1608.04117v2 [cs.CV]. [22 Sep, 9 pp.] In: Carneiro G et al. (Eds) Deep Learning and Data Labeling for Medical Applications. DLMIA 2016, LABELS 2016. Lecture Notes in Computer Science, vol 10008. Springer, Cham, 179–187. <ext-link xlink:type="simple" ext-link-type="doi" xlink:href="10.1007/978-3-319-46976-8_19">https://doi.org/10.1007/978-3-319-46976-8_19</ext-link></mixed-citation>
      </ref>
      <ref id="B3">
        <mixed-citation xlink:type="simple"><person-group><name name-style="western"><surname>Kingma</surname><given-names>DP</given-names></name><name name-style="western"><surname>Ba</surname><given-names>J</given-names></name></person-group> (<year>2017</year>) Adam: A Method for Stochastic Optimization. arXiv:1412.6980v9 [cs.LG]. 30 Jan, 15 pp.</mixed-citation>
      </ref>
      <ref id="B4">
        <mixed-citation xlink:type="simple"><person-group><name name-style="western"><surname>Long</surname><given-names>J</given-names></name><name name-style="western"><surname>Shelhamer</surname><given-names>E</given-names></name><name name-style="western"><surname>Darrell</surname><given-names>T</given-names></name></person-group> (<year>2015</year>) Fully Convolutional Networks for Semantic Segmentation. arXiv:1411.4038v2 [cs.CV]. 8 Mar 2015, 10 pp. In: 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2015, 3431–3440. <ext-link xlink:type="simple" ext-link-type="doi" xlink:href="10.1109/CVPR.2015.7298965">https://doi.org/10.1109/CVPR.2015.7298965</ext-link></mixed-citation>
      </ref>
      <ref id="B5">
        <mixed-citation xlink:type="simple"><person-group><name name-style="western"><surname>Matveyev</surname><given-names>AV</given-names></name><name name-style="western"><surname>Zhidkov</surname><given-names>SV</given-names></name><name name-style="western"><surname>Adamenkov</surname><given-names>AK</given-names></name><name name-style="western"><surname>Galivets</surname><given-names>YeYu</given-names></name><name name-style="western"><surname>Usanov</surname><given-names>DA</given-names></name></person-group> (<year>2009</year>) <article-title>An integrated approach to diagnostics of motor operated valves as applied to lifetime management problems.</article-title><source>Armaturostroyeniye</source><volume>2</volume>(<issue>59</issue>): <fpage>53</fpage>–<lpage>59</lpage>. [in Russian]</mixed-citation>
      </ref>
      <ref id="B6">
        <mixed-citation xlink:type="simple"><person-group><name name-style="western"><surname>Milletari</surname><given-names>F</given-names></name></person-group> (<year>2016</year>) V-Net: Fully Convolutional Neural Networks for Volumetric Medical Image Segmentation. arXiv:1606.04797v1 [cs.CV]. 15 Jun, 11 pp.</mixed-citation>
      </ref>
      <ref id="B7">
        <mixed-citation xlink:type="simple"><institution xlink:type="simple">MT 1.2.3.02.999.0085-2010</institution> (<year>2010</year>) <source>Diagnostics of Motor Operated Pipeline Valves. Methodology.</source><publisher-name>Rosenergoatom Publ.</publisher-name>, <publisher-loc>Moscow</publisher-loc>, <size units="page">239 pp</size>. [in Russian]</mixed-citation>
      </ref>
      <ref id="B8">
        <mixed-citation xlink:type="simple"><person-group><name name-style="western"><surname>Ronneberger</surname><given-names>O</given-names></name><name name-style="western"><surname>Fischer</surname><given-names>P</given-names></name><name name-style="western"><surname>Brox</surname><given-names>T</given-names></name></person-group> (<year>2015</year>) U-Net: Convolutional Networks for Biomedical Image Segmentation. arXiv:1505.04597v1 [cs.CV]. 18 May, 8 pp.</mixed-citation>
      </ref>
      <ref id="B9">
        <mixed-citation xlink:type="simple"><person-group><name name-style="western"><surname>Sørensen</surname><given-names>Th</given-names></name></person-group> (<year>1948</year>) <article-title>A method of establishing groups of equal amplitude in plant sociology based on similarity of species content and its application to analyses of the vegetation on Danish Cc of the vegetation on Danish commons.</article-title><source>Biologiske Skrifter</source><volume>5</volume>: <fpage>1</fpage>–<lpage>34</lpage>.</mixed-citation>
      </ref>
      <ref id="B10">
        <mixed-citation xlink:type="simple"><person-group><name name-style="western"><surname>Xiaoya</surname><given-names>Li</given-names></name></person-group> (<year>2020</year>) Dice Loss for Data-imbalanced NLP Tasks. arXiv:1911.02855v3 [cs.CL]. 29 Aug, 12 pp.</mixed-citation>
      </ref>
    </ref-list>
    <fn-group>
      <fn id="fntitle">
        <p>* Russian text published: Izvestiya vuzov. Yadernaya Energetika (ISSN 0204-3327), 2021, n. 2, pp. 158–168.</p>
      </fn>
    </fn-group>
  </back>
</article>
