## 5 Case Study: COTS-based Embedded Real-Time Control of a Time Mash Delivery Machine
### The COTS-Based Controller
#### 5.2.2 COTS-Based Control Software
During the testing, internal data regarding the flow quantity (volume) measured by each of the controllers, were collected and examined for their accuracy, based on the flowmeter's nominal values for the corresponding volume load. During all the experiments, the operating conditions (e.g., tank internal pressure, total lime mash quantity, temperature, etc.) were kept constant and the same for both controllers. In both cases, the internal diameter of the flowmeter's metering tube was 5 inches (sensor dimension of DN 125), and the frequency was set to 1 pulse/unit (e.g., m\({}^{3}\)). The results obtained are shown in Table 1.

The measurements were performed at a variable pulse width (the flowmeter's measuring signal) and time of execution (time of operation), recording the response of each controller in measuring the flow quantity (volume in m\({}^{3}\)). The volume measurements of each controller are quite close to each other, and to the nominal value. These are within the flow rate range, a minimum (13.2 m\({}^{3}\)/min) and maximum volume (792 m\({}^{3}\)/h). The COTS-based controller tends to be more accurate for shorter running times and pulse widths. Taking into consideration that the flowmeter's measuring error (accuracy) is \(\pm\)0.5% of the actual flow rate, it is evident that both controllers' results are in general within this range. The obtained results suggest that our COTS-based design approach is competitive with that of the custom-build controller, at a shorter development time and a lower cost. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Min Volume Per Pulse (m\({}^{3}\))** & **Pulse Width (ms)** & **Time Run (min)** & **Nominal Volume (m\({}^{3}\))** & **80C188 EB Controller (m\({}^{3}\))** & **RPi3 Controller (m\({}^{3}\))** & **Accuracy (\(\pm\)0.5\%)** \\ \hline
0.0011 & 5 & 1 & 13.2 & 12.5 & 13 & 0.066 \\
0.0022 & 10 & 5 & 66 & 64 & 65 & 0



## 6 Discussion

The proposed framework and design methodology primarily aim to present the development flow and determine the key architectural attributes and hardware/software components in advance of the implementation of particular COTS-based system architecture. This architectural prototype is based on methods and approaches, which do not necessarily involve extensive quantitative descriptions. The results produced from the implementation of this architectural framework in a case study in manufacturing, verify and validate the applicability of this specific structural framework and methodological flow, particularly from a software and hardware co-design point of view. This is documented with system-specific measurements (e.g., accuracy and timing metrics), which are examined and compared against the previous implementation, as indicated in Table 1, and other approaches examined earlier in related work. The goal of the case study system application was to verify the validity and feasibility of the research concept and methodology in applying the proposed open architectural framework and infrastructure into the development and exploration of reliable real-time control systems, based primarily on standardized/general-purpose hardware/software architectural components. The case study system application infrastructure proves the efficient integration and communication of COTS hardware and software components in real-time control, making applications work together as one integrated system. The COTS-based control system developed is shown to behave according to the design criteria and essential requirements. The RPi3 system controller is capable of achieving accurate flow rate control within an optimal working range. The most pronounced performance improvement, compared to the previous controller, is the advanced but at the same time friendly, way of reliable control. The proposed framework architecture, design, and development methodology take into consideration specific requirements regarding the availability, reusability, reliability, and cost efficiency of hardware and software COTS components.