## 4 System Software Realization  
### Integrated Interface and Scheduling Module on Software  
The software system can be considered as an integrated interface that consists of two parts: the software interface and data interface, as illustrated in Figure 7.  
The data interface, running on an MCU, drives the underlying hardware, including the impedance analyzer and analog switches. Based on the IIC of the data preprocess block and serial communication, it can deliver the data from the software interface to the hardware and vice versa.  
The software interface, running on a computer, mainly handles the subfunctions with the scheduling module, and the results from the scheduling module are processed by the postprocessing module for being ready to display. Finally, the data will be presented to the user on the GUI, which is a human-computer interaction interface and achieves an easy-to-use software system.  
More importantly, the integrated interface is also extensible. For example, when the SHM method based on vibration needs to be implemented, only a corresponding block needs to be added in the subfunction block to tell the scheduling module how to handle the new function, instead of redesigning and rewriting the software architecture for the entire upper computer.  
\begin{table}
\begin{tabular}{c c} \hline
**Parameter** & **Value** \\ \hline Size (mm) & \(98\times 70\times 10\) \\ \hline Weight (g) & 125 \\ \hline Channels & 8 \\ \hline \multirow{2}{*}{Power consumption (mW)} & Power Down & \(<2\) \\ \cline{2-3}  & Impact Mode & \(<66\) \\ \cline{2-3}  & EMI Mode & \(<231\) \\ \hline Power supply (V) & 3.3 \\ \hline Frequency range (Hz) & 10–100 k \\ \hline Impedance measure range (\(\Omega\)) & 100–2 M \\ \hline Frequency Resolution (Hz) & 0.1–1 k \\ \hline Impedance Measurement Error & \(<\)0.5\% \\ \hline ADC Measurement Error (mV) & \(<\)1 \\ \hline \end{tabular}
\end{table}
Table 2: Parameters of the SHM system hardware.  
The scheduling module plays a key role in realizing the reasonable collocation of each SHM method. Before running the integrated interface, information of the different subfunctions is programmed into the scheduling model. After the integrated interface starting, this module runs each subfunction according to the information. To be specific, the information for a subfunction contains: (1) whether the subfunction is for impact detecting or damage detecting and (2) when to switch this subfunction to the other subfunction. The first one tells the module how to display the output of this subfunction on the GUI, whereas the second one helps the module form a task chain.  
Figure 8 shows how this module works for a typical task chain employed in this study. When the SHM system software is running, the scheduling module first runs the impact monitoring function continuously. If the impact is greater than the preset threshold, the module will stop this function to perform impedance measurements for evaluating the damage. If the damage is detected, then the system will send a message that a repair is needed. If not, the module switch to the impact monitoring function back again. As can be seen, this configuration can avoid running both methods all the time and then save energy.