Supervisory Controller Synthesis

For supervisory control of DES the alphabet Sigma is decomposed in two disjoint subsets Sigma_c and Sigma_uc. This is implemented by an extended Generator class called cGenerator ("c" for controllable) that assigns an optional controllability attribute to each event.

We demonstrate the use of cGenerator objects by a scenario in which workpieces are processed by two (very simple) machines consecutively. The two machines are linked via a buffer to hold one workpiece max. Our task is to synthesise a controller that prevents a buffer overflow.

Plant Model

A single machine is represented by a generator


verysimple

The controllable event alpha models the beginning of the process and, in our scenario, can be prevented by the supervisor. The event beta represents completion of the process. Once the process has started, beta is guaranted to occur and can not be prevented. In fact, our simple model assumes that the machine is never down.

In our scenario, the plant consists of two independant machines. The overall plant model is constructed as the shuffle product of two copies of the machine model with subscripts _1 and _2, respectively.

  // compose plant dynamics from two very simple machines 
  cGenerator tempgen, machine1, machine2, cplant12;  
  tempgen.Read("data/verysimple.gen");
  tempgen.Version("1",machine1);
  tempgen.Version("2",machine2);
  cParallel(machine1,machine2,cplant12);
  cplant12.Write("cplant12.gen")


cplant12

Specification

We treat the buffer as our specification. Machine 1 feeds the buffer, and machine 2 takes workpieces from the buffer.


buffer

Technically, we need to extend the buffer model to accept all machine events that do not affect the buffer. This is done by a self-loop operation.

  // read specification 
  Generator specification;
  specification.Read("data/buffer.gen");
  InvProject(specification,cplant12.Alphabet()); 
  specification.Name("simple machines specification");

Supervisor

Given the plant and the specification generators, we compute the least restrictive non-blocking supervisor according to Ramadge/Womham supervisory controll theory.

  Generator supervisor;
  cSupConNB(cplant12,specification,supervisor);
  supervisor.Name("simple machines supervisor");
  supervisor.Write("supervisor.gen");


supervisor