## 3 Formal Semantics of the Supervisor Machine Interaction  
### Formal Semantics of the Supervisor Model  
We are assuming that we are considering only one supervisor in our system. This supervisor must merge the several users who are operating their machines. The functions and responsibility of supervisor is that she/he must inform the users of their tasks initially. After that the supervisor will also play their role by modifying the product through different user and machine interactions and obtain information through the supervisor interface [27]. Therefore, the supervisor interface should be correct [28] and meaningful otherwise the outcome of product will not be as per the requirement of customer. We used the four-machine cell \(N_{S1},\ N_{S2},\ N_{S3}\) and \(N_{S4}\) operated by the four different users. At each cell we have states for operation for example in \(N_{S1}\) we have four states like wise \(L_{1},\ L_{2}\) represent the low having the same class while \(M_{1},\ M_{2}\) represent the medium having same class as shown in Figure 1. In between of these states we have transitions and these transitions are labelled as per our definitions. The dotted line represents the machine transitions while the dark line represents the user transition within the cell or if the transition is incoming or outgoing the cell then it termed as supervisor transition. The supervisor has also the same character as the individual user, as shown in Table 2. The observable and controllable events \(\alpha_{SUI}\in\left(\sum_{S}^{com^{\prime}}\right)_{choice>1}\) is formed due to the execution of a supervisor task. The \(\alpha_{SUI}\in\left(\sum_{S}^{com^{\prime}}\right)_{choice>1}\) is the communication of the supervisor with the user and the supervisor has more than one choice in their state. All of them are observable and controllable. The machine transition which is also observable but uncontrollable \(\beta_{si}\in\sum_{S}^{obs}\) likewise moving the lathe to milling operation. If there is change inside the system without a user task, then the event must fall into the unobservable and uncontrollable category \(\gamma_{si}\in\sum_{S}^{int}\) for the supervisor. \[\sum_{S}=(\sum_{S}^{com})_{choice=1}\cup(\sum_{S}^{com^{\prime}})_{choice>1} \cup\sum_{S}^{obs}\cup\sum_{S}^{int} \tag{1}\]  
The supervisor model can be represented as the timed automata;  
\(M_{S}=\left\langle N_{S},n_{OS},E_{S},I_{S}\right\rangle\) Where,  
\(N_{S}:\) Set of supervisor states,  
\(n_{OS}\in N_{S}:\) Initial (starting) state in the supervisor,  
\(E_{S}\subseteq N_{S}\times B(C)\times\sum_{S}\times 2^{C}\times N_{S}:\) Set of edges termed as transition among the system states,  
\(I_{S}:N_{S}\to B(C)\) Assigns invariants to locations. \(B(C)\) is the clock constraint where \(x\sim n\) or \(x-y\sim n\) for \(x,y\in C,\ \ \ \sim\in\ [\leq,<,=,>,\geq]\) and \(n\in.\) In our modelling, We used \(T_{Si}\) for supervisor modelling state to state time constraint while, \(T_{xi}\) is used for user station. The \(x\) is representing the station, we used as a, b, c and d station respectively while the \(i\in\mathbb{N}\). According to the above definition we can write \(n_{S}:\stackrel{{ g,a,r}}{{\rightarrow}}n_{S}^{r}\) if and only if \(\left\langle n_{S},g_{S},a_{S},r_{S},n_{S}^{\prime}\right\rangle\in E_{S}\). \(g_{S}:\) is the guard of \(e_{s}=\left\langle n_{S},g_{S},a_{S},r_{S},n_{S}^{\prime}\right\rangle\in E_{ S}\), \(a_{S}:\) is the action of \(e_{s}\), \(r_{s}\): is the set of clocks that is reset by \(e_{s}\), \(\sum_{S}\): Set of events among the supervisor states. **Definition 1**. : _The appearance of observable and controllable event \(\eta_{S1}\in\left(\sum_{S}^{com}\right)_{choice=1}\) will change the state of the supervisor interface through supervisor action. The formation of this event \(\eta_{i,j}\) by any state will yield the only choice of user operations. When it appears in a state then it will become \(\left(N_{SM},\ N_{S}\right)\in B_{RSM}\) or \(\left(\left(N_{SM0}\right),\ \left(N_{S0}\right)\right)\in B_{RSM}\).