<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>A = &lt;X</institution>
          ,
          <addr-line>Y, S, s</addr-line>
        </aff>
      </contrib-group>
      <abstract>
        <p>  Known models of control automata of systems describe only the necessary cause-and-effect relationships between sets of an automaton, except for the relationship between sets of outputs and inputs. This complicates the analysis of non-standard situations associated with the diagnosis and development of machines. A model of an automaton in the form of activity and control loops is proposed, which reflects the cause-and-effect relationships in the control automata of the system, including the relations between the elements of the set of outputs and the set of inputs of the automaton. These circuits interact through the machine states. The classification and models of the machine states are proposed. The structure of the knowledge base along the automaton contours and the predicates types describing causal relationships in the automaton are proposed. An example of constructing the contours of activity, control and Prolog program for diagnosing the technical state of the machine using the knowledge base is given.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction and Analysis of Publications </title>
      <p>In [4], the influence of the outputs of the control automaton on its inputs is modeled by
constructing a control loop, which includes the control automaton and the finite automaton
representing the control object. This circuit is used to synthesize a control automaton, which specifies
a certain behavior of the system object. At the same time, the work [4] does not detail the structure of
the control loop, does not consider objects with continuous behavior, as well as cause-and-effect
relationships that arise in the event of a change in the technical state of system elements.</p>
      <p>Further development of logical programming methods and the growth of requirements for
adaptation and development of system behavior led to the use of semantic information to describe the
behavior of the control automata.</p>
      <p>The sematic model of control automata element is a system of tuples [5]</p>
      <p>
        SMS=&lt;Sa, Sc&gt;; Si=&lt;Ni, CDi, KBi&gt;; Nij=&lt;Np, Npr, Nf&gt;;
(
        <xref ref-type="bibr" rid="ref2">2</xref>
        )
where Sa, Sc is a set of activity and control contours, respectively; Si is a set included in the sets Sa, or
Sc; Nij is a complex of names of the j-th element in the i-th contour; CDi is direction of causality in the
i-th contour; KBi is knowledge base of the i-th contour; Np, Npr, Nf, are the set of names of the j-th
element in the i-th contour in the style of the prehistory, the current choice and the expected events,
respectively. The knowledge base consists of rules of the form KBij: IF CDi THEN Nik &lt;= Nim, where
KBij is an element of the knowledge base of the j-th element in the i-th contour. The expression Nik &lt;=
Nim indicates the fact that Nim is a consequence of Nik, where Nik, Nim are knowledge in the form of
names for elements k and m in the i-th contour. At the same time, work [5] does not detail the role of
states of an automaton in the interaction of activity and control circuits, does not describe a method
for constructing cause-and-effect relationships in hierarchical states.
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Research Objectives </title>
      <p>The purpose of this article is to provide research on aspects of the behavior of systems associated
with a change in the technical state of their elements and parameters of the control object by
expanding the knowledge base of the system, detailing the interaction of the activity contours and
control of the system through the states of the automaton.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Research Content </title>
      <p>As you know, the "classic automaton" has three sets, which are connected by two functional
relationships, as shown in Figure 1a.</p>
      <p>a b
Figure 1: Functional relations in the "classic" (a) and the proposed (b) automaton </p>
      <p>In this version of the description of the automaton, and its semantic version, there are causal
relationships between states and outputs (actions), as well as between current states, inputs and
subsequent states. But in this description there are no causal links between outputs (actions) and
inputs (events). In addition to the control machine, the control object and the operating machines of
the control device take part in the formation of these connections.</p>
      <p>The proposed function of the object (Figure 1b) establishes the functional causal dependence of the
inputs of the control machine on its outputs. In a more detailed description of the function of the
object, the functions of influences and reactions should be taken into account, as shown in Figure 2.</p>
      <p>The elements of the "control automaton – object of control" system form the contours of the
activity and control of the finite automaton, which interact in the states of the automaton. Let us
clarify that the activity contour describes a chain of cause-and-effect relationships ensuring the
continuation of the impact on the system object in a given active state. A control loop describes the
cause-and-effect relationship that controls the transition of the automaton to another state.
Accordingly, the number of control loops passing through this state is equal to the number of
transitions from this state to others.</p>
      <p>To describe the relationship of the state with the rest of the machine, we introduce the following
elements: event control inputs (ECI) – inputs) and event control outputs (ECO) of control loop events,
activity outputs (AO) – and reaction of object inputs (RI) for these actions in the contours of activity
[5]. Between these elements of the external interface of the state in the framework of Laplace
causality and the direction of causality from entry to exit of the state, the following types of causal
relations are possible: ECI &lt;= AO, (activity is a consequence of the state transaction); RI &lt;= ECO
(transaction is a consequence of the reaction).</p>
      <p>If in some state of the machine intersect certain circuits of activity and control, then the above
causal links provide the interaction of these circuits as shown in Figure 3.</p>
      <p>The mechanism of interaction is as follows:
1. The change in the circuit of activity comes to the input of the reactions of the RI state.
2. Due to internal causation in the state, it is transmitted to the ECO output and is the cause of
changes in the control loop.</p>
      <p>3. Changes in the control loop lead to activation of the ECI input.</p>
      <p>4. Due to the internal causal links in the state, Due to the internal causal links in the state, this
activation is manifested at the output AO and initiates changes in the contour of activity.</p>
      <p>A special case of the control circuit is the arc of the graph of the automaton, which exits state A
and closes in the same state.</p>
      <p>With the help of causation and the external arc of the graph of the automaton, which comes out of
state A and closes in the same state, you can perform a transition forward (conditional causality) or
backward (looping of the site) in the control or activity contour.</p>
      <p>To enter the cause-and-effect relationship ECI1 &lt;= ECO2 (transaction2 is a consequence of
transaction1 or the original transaction event is a consequence of the input transaction event) in state
A we use the external arc of the automaton graph, which exits AO of state A and closes to RI input in
the same state and the internal connection RI &lt;= ECO. Similarly, using an external arc between the
ECO output and the ECI input, you can create a ratio of RI &lt;= AO (activity is a consequence of the
reaction).</p>
      <p>The proposed classification of states of the control automaton depending on the logic of processing
input events is given in Table 1.</p>
      <p>In the "classic" finite state machine, the output (activity) does not depend on how the activation of
the state is performed. That is, if such a state has more than one input event, then it is a combinational
state with the processing of input events by logic OR in relation to the activity output of the state. And
the automatic state in such automatic machines represents the control subautomatа unit of the lower
level. This machine is executed if the state in which it is placed is currently active.</p>
      <p>The state of the Si machine can be described by a tuple</p>
      <p>
        Si = &lt;ECI, RI, ECO, AO, μs, ts &gt;,
(
        <xref ref-type="bibr" rid="ref3">3</xref>
        )
where ECI is a set of inputs of control events; RI is a set of inputs of reactions to activities; ECO is a
set of outputs of control events; AO is a set of outputs of activity events; μs, ts is a function of activity
and state transactions, respectively.
      </p>
      <p>The μs function describes the mapping of the set of ECI inputs to the set of AO outputs μs: ECI ×
AO, and the ts function describes the mapping of the set of RI inputs to the set of ECO outputs ts: RI ×
ECO.</p>
      <p>The type of functions μs, ts depends on the type of state. For the switching state it is enough to list
the relations ECIi &lt;= AOj and RIi &lt;= ECOj, where i, j are the numbers of elements in the
corresponding sets.</p>
      <p>
        To describe the combinational state, you need to specify the output functions of the inputs for all i
AOi = F(ECI1,..,ECIn);
ECOi = F(RI1,..,RIm),
(
        <xref ref-type="bibr" rid="ref4">4</xref>
        )
(
        <xref ref-type="bibr" rid="ref5">5</xref>
        )
      </p>
      <p>
        From expressions (
        <xref ref-type="bibr" rid="ref4">4</xref>
        ) and (
        <xref ref-type="bibr" rid="ref5">5</xref>
        ) it is seen that the switching state is a special case of combinational
state, when the function in the right part of these equations takes a constant value equal to the value of
a certain input event.
      </p>
      <p>
        In the automatic state, the functions μs, ts describe two automata – activities and transactions, each
of which is a tuple similar to the tuple (
        <xref ref-type="bibr" rid="ref1">1</xref>
        )
μs =&lt;ECI, AO, Sμ, sμ0, μμ, tμ&gt;;
ts = &lt;RI, ECO, St, st0, μt, tt&gt;,
where ECI, AO, RI, ECO are the sets described in expression (
        <xref ref-type="bibr" rid="ref3">3</xref>
        ); Sμ, St is the set of states of
automatic machines of activity and transactions, respectively; sμ0, st0 is an initial state of automatic
machines state of activity and transactions, respectively; μμ, μt is a function of outputs of automatic
machines state of activity and transactions, respectively; tμ, tt is is a function of transactions of
automatic machines state of activity and transactions, respectively. In this way we can describe the
hierarchy in the semantic and logical model of automata/
      </p>
      <p>We write the functions μs, ts in the form of information arrays of size m × n (MS) and l × k (TS),
where m, n, l, k are the power of the sets ECI, AO, RI, ECO, respectively. Herewith
where i, j are the numbers of the elements in the array, i ≤ m, j ≤n.</p>
      <p>
        1,if ECIi  AO j
MSi, j  
 0, else
1, if RIi  ECO j
TS[i, j]  
 0, else
,
,
(
        <xref ref-type="bibr" rid="ref6">6</xref>
        )
(
        <xref ref-type="bibr" rid="ref7">7</xref>
        )
(8)
(9)
where i, j is the row and column number of the element in the array, i ≤ l, j ≤k.
      </p>
      <p>An example of a graphical interpretation of the causal relationship of the simple state of the control
machine is shown in Figure 4.</p>
      <p> 
Figure  4:  Graphical  interpretation  of  the  causal  relationship  of  the  simple  state  of  the  control 
machine 
 </p>
      <p>The set of ECI in Figure 4 is represented by inputs ECI1, ECI2, ECI3, ECI4 (ECI = {ECI1, ECI2,
ECI3, ECI4}). Similarly, we describe the sets RI = {RI1, RI2, RI3}, ECO = {ECO1, ECO2, ECO3}
and AO = {AO1, AO2}. The function of the state activity includes the following causal relationships:
μs = {ECI1 &lt;= AO1, ECI2 &lt;= AO1, ECI3 &lt;= AO1, ECI4 &lt;= AO2} (event-driven activity). According
to (8), this function is also described by an MS data array of size 3 × 3</p>
      <p>MS  1 0 0 .</p>
      <p>0 0 1
0 1 0</p>
      <p>And the function of state transactions is represented by the following relations ts = {RI1 &lt;= ECO3,
RI1 &lt;= ECO2, RI3 &lt;= ECO2} (event controlled by the sensor) or in the form of a data array TS of
size 4 × 2 which according to (9) has the form</p>
      <p>
        In Figure 4, the relationship of activities and transactions is represented by dashed and dotted lines,
respectively. Note also that in the presence of an external connection ECO3 – ECI3, you can
implement the ratio RI1 &lt;= ECO3 &lt;= ECI3 &lt;= AO1 (the sensor controls the activity), using external
connection AO2 – RI3 ratio ECI4 &lt;= AO2 &lt;= RI3 &lt;= ECO2 can be implemented (event driven event).
Figure 4 shows a general case of the state structure. In some cases, the individual elements of the
tuple (
        <xref ref-type="bibr" rid="ref3">3</xref>
        ) may be empty. For example, in the initial state there may be no ECI, and in the final – ECO.
The empty set AO states are possible as well.
      </p>
      <p>An example of a graphical interpretation of the causal relationship of the automatic state of the
control machine is shown in Figure 5.
S2 = &lt;2ECI, 2RI, 2ECO, 2AO, 2μs, 2ts&gt;,
where 1ECI, 1RI, 1ECO, 1AO are a set of interface elements of state S1; 2ECI, 2RI, 2ECO, 2AO are
a set of interface elements of state S2; 1μs, 1ts is a function of activity and state transactions of state S1,
respectively; 2μs, 2ts is a function of activity and state transactions of state S2, respectively.</p>
      <p>These sets consist of the following elements: 1ECI = &lt;1ECI1, 1ECI2&gt;, 1RI = &lt;1RI1, 1RI2&gt;,
1ECO = &lt;1ECO1, 1ECO2&gt;, 1AO = &lt;1AO1&gt;, 2ECI = &lt;2ECI0, 2ECI1, 2ECI2&gt;, 2RI = &lt;2RI1, 2RI2&gt;,
2ECO = &lt;2ECO1, 2ECO2&gt;, 2AO = &lt;2AO1&gt;.
(12)
(13)
(14)
(15)</p>
      <p>
        In terms of transactions, states S1 and S2 are switching. We detail expression (
        <xref ref-type="bibr" rid="ref5">5</xref>
        ) using the
following connections
1АО1=1ECI ˅ 1EC2;
2АО1=2ECI0 ˅ 2ECI1 ˅ 1EC2.
1RI1&lt;= 1ECO2; 1RI2&lt;= 1ECO1;
2RI1&lt;= 1ECO1; 2RI2&lt;= 1ECO2.
      </p>
      <p>
        In terms of activity, states S1 and S2 are combinational. We detail expression (
        <xref ref-type="bibr" rid="ref4">4</xref>
        ) using the logical
OR function
      </p>
      <p>The proposed causal relations of the states of the automaton allow to determine the causal relations
in the contours of the automaton. For example, the following relationship results from diagram Figure
6:
1. The output 1AO1 is a consequence of any entry into state S1.
2. If the active output 1AO1, the input of the heater receives the command "on".</p>
      <p>3. If the heater input receives the command "on", the heater generates heat flow to the control
object.</p>
      <p>4. If there is heat flow to the control object, its temperature rises.</p>
      <p>5. If the temperature of the control object rises, sooner or later there will come a time when the
output of the operating machine OA2 will form an event E2 which is transmitted to the input 1RI1.</p>
      <p>6. The consequence of the event at the input 1RI1 is the event of transition to the state S2, which is
formed at the output 1ECO2.</p>
      <p>7. At any input to state S2 according to (13) the command "Off" is formed at the input of the
heater.</p>
      <p>In cases where you want to focus on the management structure, it is advisable to show the outline
of the generalization (see Figure 7).</p>
      <p>The heating continuation circuit in this case contains: 1AO1 – Heating circuit – 1RI2 – 1ECO1 –
1ECI1 – 1AO1, and the cooling switch control circuit: 1AO1 – Heating circuit – 1RI1 – 1ECO2 –
2ECI1 – 2AO1.</p>
      <p>The above causal relationships in the contours of activity and control describe the behavior of
control of the object of the system. Modern systems, for example, cognitive systems [7], have other
behaviors, such as target, scenario, emergency, diagnostic and other behaviors that are associated with
the behavior of controlling the object of the system.</p>
      <p>As an example, let us consider the use of cause-and-effect relationships for diagnosing the
technical state of the elements of the control device and changing the parameters of the object of the
temperature control system. An enlarged block diagram of this system is shown in Figure 8.</p>
      <p>Based on the diagram in Figure 8, we describe the predicates of the input / output ratios with the
assessment of the health of the node: heater (P, E, X1); object (E, T, X2); sensor1 (T, V, C1, X3),
sensor2 (T, V, C2, X4), sensor3 (T, V, C3, X5), sensor4 (T, V, C4, X6). An example of the
knowledge base of the system Figure 8 (facts and rules) is shown in Figure 9 as a fragment of the
Prolog program of the SWI version.</p>
      <p>The facts of this program describe the functioning of the system with the following
simplifications:
 The heater has one level of output power;
 The rate of heating and cooling of the object is constant;
 The time markers of the experiment are chosen in such a way that the “big” time is sufficient
to heat the object from θon to θoff and its cooling from θoff to θon, but the time “little” and “middle” is
not enough;</p>
      <p> Events C1 – C4 are considered mutually exclusive.</p>
      <p>In the experiments, the head of the rule with different variants of the predicate temperature is
selected as the target of the Prolog program. The experimental results are shown in Figure 10.</p>
      <p>As you can see from Figure 10, the results of the responses differ, which serves as a diagnostic
sign of a malfunction. Opposite answers are marked with arrows, the answer typical for a faulty
sensor 1 is underlined.</p>
      <p>The program (figure 9) describes a chain of cause-and-effect relationships in the contour from
point A to B (Figure 8), namely, B &lt;= A. For example, from the command “to turn on the heater”
(point A) it follows that the temperature of the object will rise, but for some time the event “continue
heating” (point B) will remain true. On the other hand, from the event “continue heating”, the
command “to turn on the heater” follows. Accordingly, A &lt;= B.</p>
      <p>The structure of the causal relationships of the automaton that controls the temperature of the
object from its input events through its states and arcs to the outputs is shown in Figure 11a.
a b c
Figure 11: The structure of the causal relationships (a) Prolog program (b) and modeling results (c) of 
the control automata </p>
      <p>The knowledge base of this automaton in the form of a Prolog program in the SWI version is
shown in Figure 11b. This program contains predicates turnon, turnoff and automata that associate
input conditions (cond1, ncond1, cond2, ncond2) or their absence (n0, n1, n2, n3) with the automaton
outputs (on, off) or their absence (k0, m0). Figure 11c shows the goal and simulation results, which
confirm the dependence of the outputs of the machine on their inputs.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusion </title>
      <p>Traditional design technologies use formal models of control automata obtained as a result of the
analysis of the verbal description of the control problem. The use of control automata narrows the
knowledge base that is used by the system for control and reduces the quality of control under
conditions of unpredictable changes in the system object, the environment and the technical state of
the control device elements. The desire to take into account unused knowledge leads to the need to
return to the verbal description of the problem, the identification and use of cause-and-effect
relationships in the system, which are combined into the contours of activity and control through the
object of the system.</p>
      <p>The loops of activity in each active state support the conditions for the continuation of activity in
this state, and the loops of control contain causal relationships for the completion of activities and
transition to other states. The states of automata interact with contours through their interface
elements: inputs and outputs of control events, outputs of activity and inputs of object reactions. A
classification of states of an automaton is proposed, based on the logic of transformation of input
elements of their interface into outputs, as well as a model of switching, combinational and automatic
states.</p>
      <p>The introduction of contours into control automata allows building chains of cause-and-effect
relationships in the models of the system based on the principles of circular causality. The elements of
these chains are described by the predicates "cause", "should" and others with arguments in the form
of elements of the structure of the automaton or signals at its points. The arity of predicates can be
expanded if we relate knowledge about the connections in the structure of the system with knowledge
in the aspect of the research goal: usefulness, serviceability, testability, adaptability, reliability, and
others. The knowledge base based on facts and rules with these predicates is explored by means of
logical programming.</p>
      <p>The proposed models have been tested on an object temperature control system. For this purpose, a
knowledge base on the contours of systems has been developed in the form of facts and program rules
in the Prolog language of the SWI version, describing the structure of cause-and-effect relationships
in the system with the account the technical state of its elements. The program responses to the set
goals contain diagnostic signs of malfunctions of system elements, such as the system object and its
operating automata. In order to check the completeness of the behavior of the control automaton of
the system, a knowledge base has been developed on the structure of causal-logical relationships in
this automaton, which is also implemented as a program in the Prolog language of the SWI version.
The simulation results confirmed the completeness of the behavior of the control automaton of the
temperature control system.</p>
      <p>The considered models of the contours of causality of links in the system are supposed to be used
when assessing the usefulness of changes in the structures of hierarchical control automata in the
processes of adaptation of the system.</p>
    </sec>
    <sec id="sec-5">
      <title>5. References </title>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>V. M.</given-names>
            <surname>Glushkov</surname>
          </string-name>
          ,
          <article-title>Synthesis of digital automata (Sintez tsifrovykh avtomatov</article-title>
          ), Fizmatizdat, Moscow,
          <year>1962</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>S. P.</given-names>
            <surname>Eugene</surname>
          </string-name>
          <string-name>
            <surname>Xavier</surname>
          </string-name>
          ,
          <article-title>Theory of automata, formal language and computation</article-title>
          , New age international Pvt Ltd, New Delhi,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>V. N.</given-names>
            <surname>Zakharov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. A.</given-names>
            <surname>Pospelov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Ye</surname>
          </string-name>
          . Khazatskiy,
          <article-title>Control systems</article-title>
          .
          <source>The task. Design</source>
          .
          <article-title>Implementation (Sistemy upravleniya</article-title>
          . Zadaniye. Proyektirovaniye. Realizatsiya),
          <source>Ed. 2nd, rev. and add., "Energy"</source>
          , Moscow,
          <year>1977</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>V.V.</given-names>
            <surname>Rudnev</surname>
          </string-name>
          ,
          <article-title>Finite automaton as a control object ( Konechnyy avtomat kak ob"yekt upravleniya)</article-title>
          ,
          <source>Automation and Telemechanics</source>
          ,
          <volume>9</volume>
          ,
          <year>1978</year>
          :
          <fpage>126</fpage>
          -
          <lpage>135</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>M.</given-names>
            <surname>Poliakov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Subbotin</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Andrias</surname>
          </string-name>
          ,
          <article-title>Control System Control Unit FSM Semantic Models, System technologies</article-title>
          .
          <article-title>Regional interuniversity compendium of scientific works</article-title>
          ,
          <source>Dnipro</source>
          ,
          <volume>5</volume>
          (
          <year>2019</year>
          ):
          <fpage>43</fpage>
          -
          <lpage>53</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>M.</given-names>
            <surname>Polyakov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Polyakov</surname>
          </string-name>
          ,
          <article-title>State Models for FSM Semantic Models(Modeli sostoyaniy konechnogo avtomata dlya yego semanticheskoy modeli)</article-title>
          , in S.V.
          <string-name>
            <surname>Morshchavka</surname>
          </string-name>
          (Ed.),
          <article-title>Abstracts reports of the X International scientific-practical conference of Modern problems and achievements in the field of Radio Engineering, Telecommunications</article-title>
          and Information Technology,
          <fpage>07</fpage>
          -09
          <source>October</source>
          <year>2020</year>
          , Zaporizhzhia [Electronic resource]
          <source>Electron. data. - Zaporizhzhia, NU "Zaporizhzhia Polytechnic"</source>
          ,
          <year>2020</year>
          :
          <fpage>86</fpage>
          -
          <lpage>87</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>D.</given-names>
            <surname>Vernon Artificial Cognitive Systems</surname>
          </string-name>
          : A Primer, Cambridge, Massachusetts: The MIT Press,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>