Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Virtual finite-state machine

From Wikipedia, the free encyclopedia
This article includes alist of references,related reading, orexternal links,but its sources remain unclear because it lacksinline citations. Please helpimprove this article byintroducing more precise citations.(October 2024) (Learn how and when to remove this message)

Avirtual finite-state machine (VFSM) is afinite-state machine (FSM) defined in avirtual environment. The VFSM concept provides a softwarespecification method to describe the behaviour of a control system using assigned names ofinput control properties and output actions.

The VFSM method introduces anexecution model and facilitates the idea of an executable specification. This technology is mainly used in complexmachine control,instrumentation, andtelecommunication applications.

Why

[edit]

Implementing a state machine necessitates the generation of logical conditions (state transition conditions and action conditions). In the hardware environment, where state machines found their original use, this is trivial: all signals areBoolean. In contrast state machines specified and implemented in software require logical conditions that are per semultivalued:

  • Temperature could be Low, OK, High
  • Commands may have several values: Init, Start, Stop, Break, Continue
  • In ahierarchical control system the subordinate state machines can have many states that are used as conditions of the superior state machine

In addition input signals can be unknown due to errors or malfunctions, meaning even digital input signals (considered as classical Boolean values) are in fact 3 values: Low, High, Unknown.

A Positive Logical Algebra solves this problem viavirtualization, by creating a Virtual Environment which allows specification of state machines for software using multivalued variables.

Control properties

[edit]

Astate variable in the VFSM environment may have one or more values which are relevant for theControl—in such a case it is an input variable. Those values are the control properties of this variable. Control properties are not necessarily specific data values but are rather certainstates of the variable. For instance, a digital variable could provide three control properties: TRUE, FALSE and UNKNOWN according to its possible boolean values. A numerical (analog) input variable has control properties such as: LOW, HIGH, OK, BAD, UNKNOWN according to its range of desired values. A timer can have its OVER state (time-out occurred) as its most significant control value; other values could be STOPPED or RUNNING.

Actions

[edit]

Otherstate variables in the VFSM environment may be activated by actions—in such a case it is an output variable. For instance, a digital output has two actions: True and False. A numerical (analog) output variable has an action: Set. A timer which is both: an input and output variable can be triggered by actions like: Start, Stop or Reset.

Virtual environment

[edit]
Figure 1: VFSM in the Virtual Environment

The virtual environment characterises theruntime environment in which avirtual machine operates. It is defined by three sets of names:

  • input names represent the control properties of all available variables
  • output names represent the available actions on the variables
  • state names, as defined for each of the states of the FSM.

The input names build virtual conditions to performstate transitions or input actions. The virtual conditions are built using thepositive logic algebra. The output names trigger actions;entry actions, exit actions, input actions or transition actions.

Positive logic algebra

[edit]

The rules to build a virtual condition are as follows:

Input names and virtual input

[edit]

A state of an input is described by Input Names which create aset:

  • input A:Anames = {A1,A2,A3}
  • input B:Bnames = {B1,B2}
  • input C:Cnames = {C1,C2,C3,C4,C5}

etc.

Virtual inputVI is a set ofmutually exclusive elements of input names. AVI always contains the elementalways:

VI = {always}VI = {always,A1}VI = {always,A1,B2,C4}

Logical operations on input names

[edit]

& (AND) operation is a set of input names:

A1 &B3 &C2 =>{A1,B3,C2}


| (OR) operation is a table of sets of input names:

A1 |B3 |C2 =>[{A1}{B3}{C2}]{\displaystyle {\begin{bmatrix}\{&A1&\}\\\{&B3&\}\\\{&C2&\}\\\end{bmatrix}}}

~ (Complement) is acomplement of a set of input names:

~A2 ={A1,A3}

Logical expression

[edit]

A logical expression is an OR-table of AND-sets (adisjunctive normal form):

A1 &B3 |A1 &B2 &C4 |C2 =>[{A1B3}{A1B2C4}{C2}]{\displaystyle {\begin{bmatrix}\{&A1&B3&\}\\\{&A1&B2&C4&\}\\\{&C2&\}\\\end{bmatrix}}}

Logical expressions are used to express any logical function.

Evaluation of a logical expression

[edit]

The logical value (true, false) of a logical expression is calculated by testing whether any of the AND-sets in the OR-table is asubset ofVI.

Output names and virtual output

[edit]

A state of an output is described by Output Names which create a set:

  • output X:Xnames = {X1,X2}
  • output Y:Ynames = {Y1,Y2,Y3}

Virtual outputVO is a set of mutually exclusive elements of output names.

Virtual environment

[edit]

The Virtual Name and Virtual Output completed by State Names create the Virtual EnvironmentVE where the behaviour is specified.

VFSM execution model

[edit]
Figure 2: VFSM executor flow chart

A subset of all defined input names, which can exist only in a certain situation, is called virtual input orVI. For instance temperature can be either "too low", "good" or "too high". Although there are three input names defined, only one of them can exist in a real situation. This one builds theVI.

A subset of all defined output names, which can exist only in a certain situation is called virtual output orVO. This is built by the current action(s) of the VFSM.

The behavior specification is built by a state table which describes all details of all states of the VFSM.

The VFSM executor is triggered byVI and the current state of the VFSM. In consideration of the behavior specification of the current state, theVO is set.

Figure 2 shows one possible implementation of a VFSM executor. Based on this implementation a typical behavior characteristics must be considered.

State table

[edit]
Further information:State-transition table

Astate table defines all details of the behavior of a state of a VFSM. It consists of three columns; the first column names the state, the second lists virtual conditions built out of input names using the positive logic algebra, and the third column contains the output names:

State NameCondition(s)Actions(s)
Current stateEntry actionOutput name(s)
Exit actionOutput name(s)
Virtual conditionOutput name(s)
......
Next state nameVirtual conditionOutput name(s)
Next state nameVirtual conditionOutput name(s)
.........

Read the table as following: the first two lines define the entry and exit actions of the current state. The following lines which do not provide the next state represent the input actions. Finally the lines providing the next state represent the state transition conditions and transition actions. All fields are optional. A purecombinatorial VFSM is possible in cases only where input actions are used, but no state transitions are defined. The transition action can be replaced by the proper use of other actions.

Tools

[edit]

References

[edit]
Retrieved from "https://en.wikipedia.org/w/index.php?title=Virtual_finite-state_machine&oldid=1253869525"
Category:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp