# Optimization of Sensor Placement for Modal Testing Using Machine Learning
## 4 Application of the Random Forest Sensor Selection Approach to a One-Dimensional Structure
### Effect of Excitation Signals on Sensor Selection Using a Random Forest Regressor (Case 3)  
To study the effect that the choice of excitation signal has on sensor selection using the proposed methodology, two different excitation signals were chosen for comparison. Although traditional methods should select sensors for modal testing independently of the excitation signal, the random forest method is sensitive to the chosen excitation frequency due to how the input database is constructed. The first excitation consists of the Gaussian  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & **FEA** & **(a) ODS** & **(b) norm ODS** & **(c) Avg. FRF** \\ \hline
**Mode \#** & \(f\) **(Hz)** & \(f\) **(Hz)** & **\% Err** & \(f\) **(Hz)** & **\% Err** & \(f\) **(Hz)** & **\% Err** \\ \hline
1 & 42.8 & – & 100\% & 54.3 & 27\% & – & 100\% \\ \hline
2 & 268.3 & 277.5 & 3\% & 281.6 & 5\% & 278.0 & 4\% \\ \hline
3 & 750.5 & 755.7 & 1\% & 757.5 & 1\% & 751.7 & 0\% \\ \hline
4 & 1468.7 & 1471.0 & 0\% & 1462.8 & 0\% & 1462.6 & 0\% \\ \hline
5 & 2424.1 & 2397.1 & 1\% & 2395.1 & 1\% & 2398.2 & 1\% \\ \hline
6 & 3614.8 & 3526.0 & 2\% & 3531.6 & 2\% & 3499.3 & 3\% \\ \hline
7 & 5039.1 & 4834.3 & 4\% & 4747.1 & 6\% & – & – \\ \hline \hline \end{tabular}
\end{table}
Table 7: Extracted natural frequencies, case 2.  
Figure 13: Modes 5–7, as predicted using the first 10 features, case 2. (**a**): Raw ODS, (**b**): normalized ODS, (c): average FRF.  
white-noise input signal used in the previous sections (cases 1 and 2), and the second excitation signal is a linear chirp, as described below (case 3). The comparison will be based on a mesh size of 20 elements identical to case 2.  
The beam was excited using a linear chirp signal, whose single-sided amplitude is depicted in Figure 14 as a function of frequency.  
The same three global parameters were considered for this case. The sensors selected by the approach for this different excitation signal are listed in Table 8.  
The positions of the first eight sensors identified by the RF approach for the three outputs are depicted in Figure 15.  
To better visualize the locations of the sensors and the potential for the sensors to capture the desired mode shapes, each selected sensor location is also plotted on the finite element-derived mode shape for the first seven modes (Figures 16 and 17).  
All global parameter options appear to track the first two mode shapes adequately; however, the normalized ODS- (global parameter b) and FRF-based (global parameter c) methodologies miss more peaks than the ODS (global parameter a) method, especially at higher frequencies. Both the normalized ODS- and FRF-based methods exhibit peak clipping starting at mode 4 and place sensors at inflection points; therefore, they will not be able to capture those frequencies.  
As a validation of the approach, the first seven natural frequencies are extracted using modal analysis of the first eight selected locations. The calculated natural frequencies are listed in Table 9. All three approaches are able to identify the first three natural frequencies,  
Figure 14: Single-sided amplitude of linear chirp from 20 Hz to 20 kHz, case 3.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Feature Importance Rank** & **(a) ODS** & **(b) Normalized ODS** & **(c) Avg. FRF** \\ \hline
1 & 10 & 19 & 20 \\ \hline
2 & 19 & 13 & 9 \\ \hline
3 & 4 & 8 & 19 \\ \hline
4 & 14 & 16 & 21 \\ \hline
5 & 8 & 12 & 14 \\ \hline
6 & 3 & 10 & 13 \\ \hline
7 & 16 & 11 & 5 \\ \hline
8 & 18 & 17 & 8 \\ \hline \hline \end{tabular}
\end{table}
Table 8: Most important sensor locations for case 3, ranked by feature importance.