## 3 QoS Management Architecture
\[DMR_{i}(k)=\frac{N_{i}(k)}{\left\lfloor T_{{}_{\mathit{PLC}}}/h_{i}(k)\right\rfloor} \tag{1}\]  
where \(k\) corresponds to the \(k\)-th invocation interval, \(N_{i}(k)\) is the number of deadline misses recorded in this interval, \(\left\lfloor\raisebox{-1.72 pt}{\scalebox{1.0}{$\bullet$}}\right\rfloor\) the mathematical operator rounding towards minus infinity, and \(h_{i}\) is the sampling period of \(s_{i}\). At the beginning of a new invocation interval, \(a_{j}\) sends the value of \(DMR_{i}(k)\) to \(s_{i}\). With respect to this current deadline miss ratio and the desired level, the QoS manager generates the new sampling period \(h_{i}(k{+}1)\) using a fuzzy logic control algorithm, which will be designed in the next section. The sampling period of \(s_{i}\) will remain constant during the course of every invocation interval, though it might be changed at the invocation instants. The FLC-QM scheme has the advantages of generality, scalability, and simplicity. * _Generality_. The FLC-QM scheme is generic because it does not depend on any specific hardware (sensor nodes) or networking technologies. It is applicable to a large number of WSANs built upon different sensor/actuator nodes, with different network topologies, or using different routing and/or MAC protocols. It is well suited for various types of applications in which QoS is a concern. * _Scalability_. The FLC-QM scheme is a distributed solution since the adjustment of sampling period is performed by a separate QoS management module for each source sensor node. When a new source node is introduced, a corresponding QoS manager can be designed for the node. * _Simplicity_. The FLC-QM is simple because the fuzzy logic control algorithm used in the FLC-QM is computationally-cheap and is easy to implement. The small overhead makes it well-suited for resource-constrained systems like WSANs. In addition, the use of fuzzy logic control [25] in QoS management in WSANs has the following potential advantages [17]:  
* In fuzzy logic control, controllers are usually designed based on heuristic information that mainly comes from practitioners. Modelling of the process to be controlled is not required for fuzzy control system design. This is very important for complex systems such as WSANs where the relationship between system output (e.g. deadline miss ratio) and control input (e.g. sampling period) is very hard, if not impossible, to be formulated explicitly with mathematical equations. Figure 2: Fuzzy logic control based QoS management. This feature of fuzzy logic control makes it possible to fully exploit the potential of feedback control technology for QoS management in WSANs. * As a formal methodology to emulate the intelligent decision-making process of a human expert, fuzzy logic control provides an effective and flexible way to arrive at a definite conclusion based on imprecise, noisy, or incomplete input information. Therefore, it can easily deal with various uncertainties inside WSANs, such as noise in the measurement of deadline miss ratio, unpredictable changes in traffic load and network topology. * Fuzzy logic control is robust and adaptable since it can deliver good performance no matter whether or not the controlled process is linear. This powerful capability in handling non-linearity will reinforce good performance of QoS management in dynamic, unpredictable environments.