Presentation on theme: "Using Finite State Automata to Model Manufacturing Systems"— Presentation transcript:
1Using Finite State Automata to Model Manufacturing Systems R. Wysk
2Agenda – Systems Theory according to Wysk Typical manufacturing systemsModeling a manufacturing system as a state machineWhat is a finite state machine?Notation and variablesExamples
3Basic types of systems Continuous Discrete (DES) Normally modeled as differential state based entitiesDiscrete (DES)Not adequately modeled as differential or difference entitiesCheckers, chess, many manufacturing systems
5The Concept of a Language Every DES has an underlying event set, E associated with it.The set E is thought of as the “alphabet” of a language.The event sequences for a DES are thought of as “words” in the language.Different modeling prospective can be taken for most DES
6Examples - chess Model with respect to one piece Model with respect to one colorModel with respect to all pieces
7Examples - manufacturing Model with respect to a partModel with respect to a machineModel with respect to all resources82345671Machine 1 M1Machine 2 M2RLUL
18Modeling a state graph States/nodes - X ( x , y, z ) Events/transistions - E ( a , b, g )Graph constructionF (x , a ) = xF (y , a ) = xF (z , b ) = zF (x , b ) = F (x , g ) = zF (y , b ) = F (y , g ) = yF (z , a ) = F (z , g ) = y
20So FSAs Formal way to model discrete systems Can symbolically build complex systemsCapture lots of system detailProvide the grain for modeling a systemSo what about a DC?
21Deterministic Automaton A Deterministic Automaton, denoted by G, is a six-tupleG = (X,E, f, Γ, x0,Xm)where:X is the set of statesE is the finite set of events associated with Gf : X × E → X is the transition function: f(x, e) = y means that there is a transitionlabeled by event e from state x to state y; in general, f is a partial function on itsdomainΓ : X → 2E is the active event function (or feasible event function); Γ(x) is the set ofall events e for which f(x, e) is defined and it is called the active event set (or feasibleevent set) of G at xx0 is the initial stateXm ⊆ X is the set of marked states.
22The words state machine and generator (which explains the notation G) are also often used to describe the above object.If X is a finite set, we call G a deterministic finite-state automaton, often abbreviated as DFA.The functions f and Γ are completely described by the state transition diagram of the automaton.The automaton is said to be deterministic because f is a function from X × E to X, namely, there cannot be two transitions with the same event label out of a state.In contrast, the transition structure of a nondeterministic automaton is defined by means of a function from X × E to 2X; in this case, there can be multiple transitions with the same event label out of a state. Note that by default, the word automaton will refer to deterministic automaton.The fact that we allow the transition function f to be partially defined over its domain X × E is a variation over the usual definition of automaton in the computer science literature that is quite important in DES theory.
23Planning, Scheduling, and Execution Planning Determining what tasks the system needs to performScheduling Sequencing planned tasksExecution Performing the scheduled tasks at the appropriate time
30A communicating automata An FSA that interacts with a decision makerDecision maker can be a person, algorithm, …Messages create changes in the graphGo_to_Dock #1 equivalent to the controller telling a driver to proceed to dock #1Input and Output messagesInput messages update the status of the graphOutput messages signal the start of an event
31Deterministic and non-deterministic FSAs YardGate HouseDock 1Dock 2Dock 3DepartTruck ArrivalRequestGo to 1Go to 2Go to 3
34Some Observations about this Perspective Generic -- applies to any discrete systemOther application specificsPartsNumberRoutingBuffers (none in our system)
35RapidCIM Model Message-based part state graph (MPSG) Execution formalism based on finite automataMimic controller behavior from part point of viewExplicitly separate scheduling from executionreference: Smith and Joshi, 1992web site:
36Generated FSA Execution model -- based on the rules, but manual yet 1RM2M3ASDue to limited space, these two arrows are expanded in this figureIOTRobots IndexR 1Stations IndexAS 1M1 2M2 3M3 4Blocking attributes are set to 1: must be blockedM1
37RapidCIM Project Built formal models for shop floor control (MPSG) Developed a compiler to automatically generate code for controlCreated Arena RT messagingUsed process plans to define part routes
38Message-based Part State Graph (MPSG) An MPSG is a deterministic finite automaton representing the processing protocol for a part.An MPSG state provides information about the current processing state of the part that is needed to determine the behavior on subsequent events.State transitions are caused by receiving messages about the part and by performing functions specified by the scheduler.
39Mealy MachineA Mealy machine is essentially a finite automaton with output. Formally, a Mealy machine M defined as follows:So, a Mealy machine is a finite automaton in which an output (defined by and ) is generated during state transitions.
42MPSG Characteristics Explicitly separate scheduling from execution. Extensible at multiple levels to facilitate software developmentGeneric MPSG can be used unmodified.Extraneous transitions can be removed.Specified messages and tasks can be rearranged.New messages and tasks can be specified.Execution portion of the control software is automatically generated from the MPSG description.
45Uses of FSAs Can generate controllers automatically Software can be created directly from this formal modelCan be used to define resources and events in a discrete systemBernie Zeigler won the IEEE Gold Metal for his work on DEVS (2002)Can be used to automatically generate simulation modelSon created both software controllers as well as simulation for messaging
46Summary - Process a part part_enter_sb1remove_kardex_sb2pick_ns_sb3return_sbmove_to_mach_sb7move_to_kardex_sb6put_sb5move_to_mach_sb4put_ns_sbprocess_sbpick_sb8return_sb9